@theia/preferences 1.67.0-next.56 → 1.67.0-next.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/lib/browser/folder-preference-provider.d.ts +23 -0
  2. package/lib/browser/folder-preference-provider.d.ts.map +1 -0
  3. package/lib/browser/folder-preference-provider.js +57 -0
  4. package/lib/browser/folder-preference-provider.js.map +1 -0
  5. package/lib/browser/folders-preferences-provider.d.ts +27 -0
  6. package/lib/browser/folders-preferences-provider.d.ts.map +1 -0
  7. package/lib/browser/folders-preferences-provider.js +237 -0
  8. package/lib/browser/folders-preferences-provider.js.map +1 -0
  9. package/lib/browser/frontend-preference-storage.d.ts +20 -0
  10. package/lib/browser/frontend-preference-storage.d.ts.map +1 -0
  11. package/lib/browser/frontend-preference-storage.js +63 -0
  12. package/lib/browser/frontend-preference-storage.js.map +1 -0
  13. package/lib/browser/index.d.ts +5 -0
  14. package/lib/browser/index.d.ts.map +1 -0
  15. package/lib/browser/index.js +23 -0
  16. package/lib/browser/index.js.map +1 -0
  17. package/lib/browser/monaco-jsonc-editor.d.ts +10 -0
  18. package/lib/browser/monaco-jsonc-editor.d.ts.map +1 -0
  19. package/lib/browser/monaco-jsonc-editor.js +73 -0
  20. package/lib/browser/monaco-jsonc-editor.js.map +1 -0
  21. package/lib/browser/package.spec.d.ts +1 -0
  22. package/lib/browser/package.spec.d.ts.map +1 -0
  23. package/lib/browser/package.spec.js +26 -0
  24. package/lib/browser/package.spec.js.map +1 -0
  25. package/lib/browser/preference-bindings.d.ts +4 -0
  26. package/lib/browser/preference-bindings.d.ts.map +1 -0
  27. package/lib/browser/preference-bindings.js +49 -0
  28. package/lib/browser/preference-bindings.js.map +1 -0
  29. package/lib/browser/preference-frontend-contribution.d.ts +9 -0
  30. package/lib/browser/preference-frontend-contribution.d.ts.map +1 -0
  31. package/lib/browser/preference-frontend-contribution.js +45 -0
  32. package/lib/browser/preference-frontend-contribution.js.map +1 -0
  33. package/lib/browser/preference-frontend-module.d.ts +7 -0
  34. package/lib/browser/preference-frontend-module.d.ts.map +1 -0
  35. package/lib/browser/preference-frontend-module.js +67 -0
  36. package/lib/browser/preference-frontend-module.js.map +1 -0
  37. package/lib/browser/preference-open-handler.d.ts +10 -0
  38. package/lib/browser/preference-open-handler.d.ts.map +1 -0
  39. package/lib/browser/preference-open-handler.js +57 -0
  40. package/lib/browser/preference-open-handler.js.map +1 -0
  41. package/lib/browser/preference-transaction-manager.d.ts +98 -0
  42. package/lib/browser/preference-transaction-manager.d.ts.map +1 -0
  43. package/lib/browser/preference-transaction-manager.js +279 -0
  44. package/lib/browser/preference-transaction-manager.js.map +1 -0
  45. package/lib/browser/preference-tree-model.d.ts +60 -0
  46. package/lib/browser/preference-tree-model.d.ts.map +1 -0
  47. package/lib/browser/preference-tree-model.js +247 -0
  48. package/lib/browser/preference-tree-model.js.map +1 -0
  49. package/lib/browser/preferences-contribution.d.ts +35 -0
  50. package/lib/browser/preferences-contribution.d.ts.map +1 -0
  51. package/lib/browser/preferences-contribution.js +263 -0
  52. package/lib/browser/preferences-contribution.js.map +1 -0
  53. package/lib/browser/preferences-json-schema-contribution.d.ts +17 -0
  54. package/lib/browser/preferences-json-schema-contribution.d.ts.map +1 -0
  55. package/lib/browser/preferences-json-schema-contribution.js +84 -0
  56. package/lib/browser/preferences-json-schema-contribution.js.map +1 -0
  57. package/lib/browser/preferences-monaco-contribution.d.ts +2 -0
  58. package/lib/browser/preferences-monaco-contribution.d.ts.map +1 -0
  59. package/lib/browser/preferences-monaco-contribution.js +28 -0
  60. package/lib/browser/preferences-monaco-contribution.js.map +1 -0
  61. package/lib/browser/util/preference-layout.d.ts +23 -0
  62. package/lib/browser/util/preference-layout.d.ts.map +1 -0
  63. package/lib/browser/util/preference-layout.js +441 -0
  64. package/lib/browser/util/preference-layout.js.map +1 -0
  65. package/lib/browser/util/preference-scope-command-manager.d.ts +18 -0
  66. package/lib/browser/util/preference-scope-command-manager.d.ts.map +1 -0
  67. package/lib/browser/util/preference-scope-command-manager.js +80 -0
  68. package/lib/browser/util/preference-scope-command-manager.js.map +1 -0
  69. package/lib/browser/util/preference-tree-generator.d.ts +48 -0
  70. package/lib/browser/util/preference-tree-generator.d.ts.map +1 -0
  71. package/lib/browser/util/preference-tree-generator.js +277 -0
  72. package/lib/browser/util/preference-tree-generator.js.map +1 -0
  73. package/lib/browser/util/preference-tree-label-provider.d.ts +12 -0
  74. package/lib/browser/util/preference-tree-label-provider.d.ts.map +1 -0
  75. package/lib/browser/util/preference-tree-label-provider.js +74 -0
  76. package/lib/browser/util/preference-tree-label-provider.js.map +1 -0
  77. package/lib/browser/util/preference-tree-label-provider.spec.d.ts +2 -0
  78. package/lib/browser/util/preference-tree-label-provider.spec.d.ts.map +1 -0
  79. package/lib/browser/util/preference-tree-label-provider.spec.js +90 -0
  80. package/lib/browser/util/preference-tree-label-provider.spec.js.map +1 -0
  81. package/lib/browser/util/preference-types.d.ts +69 -0
  82. package/lib/browser/util/preference-types.d.ts.map +1 -0
  83. package/lib/browser/util/preference-types.js +133 -0
  84. package/lib/browser/util/preference-types.js.map +1 -0
  85. package/lib/browser/views/components/preference-array-input.d.ts +29 -0
  86. package/lib/browser/views/components/preference-array-input.d.ts.map +1 -0
  87. package/lib/browser/views/components/preference-array-input.js +176 -0
  88. package/lib/browser/views/components/preference-array-input.js.map +1 -0
  89. package/lib/browser/views/components/preference-boolean-input.d.ts +18 -0
  90. package/lib/browser/views/components/preference-boolean-input.d.ts.map +1 -0
  91. package/lib/browser/views/components/preference-boolean-input.js +75 -0
  92. package/lib/browser/views/components/preference-boolean-input.js.map +1 -0
  93. package/lib/browser/views/components/preference-file-input.d.ts +30 -0
  94. package/lib/browser/views/components/preference-file-input.d.ts.map +1 -0
  95. package/lib/browser/views/components/preference-file-input.js +103 -0
  96. package/lib/browser/views/components/preference-file-input.js.map +1 -0
  97. package/lib/browser/views/components/preference-json-input.d.ts +20 -0
  98. package/lib/browser/views/components/preference-json-input.d.ts.map +1 -0
  99. package/lib/browser/views/components/preference-json-input.js +86 -0
  100. package/lib/browser/views/components/preference-json-input.js.map +1 -0
  101. package/lib/browser/views/components/preference-markdown-renderer.d.ts +15 -0
  102. package/lib/browser/views/components/preference-markdown-renderer.d.ts.map +1 -0
  103. package/lib/browser/views/components/preference-markdown-renderer.js +86 -0
  104. package/lib/browser/views/components/preference-markdown-renderer.js.map +1 -0
  105. package/lib/browser/views/components/preference-node-renderer-creator.d.ts +49 -0
  106. package/lib/browser/views/components/preference-node-renderer-creator.d.ts.map +1 -0
  107. package/lib/browser/views/components/preference-node-renderer-creator.js +122 -0
  108. package/lib/browser/views/components/preference-node-renderer-creator.js.map +1 -0
  109. package/lib/browser/views/components/preference-node-renderer.d.ts +118 -0
  110. package/lib/browser/views/components/preference-node-renderer.d.ts.map +1 -0
  111. package/lib/browser/views/components/preference-node-renderer.js +442 -0
  112. package/lib/browser/views/components/preference-node-renderer.js.map +1 -0
  113. package/lib/browser/views/components/preference-null-input.d.ts +16 -0
  114. package/lib/browser/views/components/preference-null-input.d.ts.map +1 -0
  115. package/lib/browser/views/components/preference-null-input.js +59 -0
  116. package/lib/browser/views/components/preference-null-input.js.map +1 -0
  117. package/lib/browser/views/components/preference-number-input.d.ts +35 -0
  118. package/lib/browser/views/components/preference-number-input.d.ts.map +1 -0
  119. package/lib/browser/views/components/preference-number-input.js +174 -0
  120. package/lib/browser/views/components/preference-number-input.js.map +1 -0
  121. package/lib/browser/views/components/preference-select-input.d.ts +29 -0
  122. package/lib/browser/views/components/preference-select-input.d.ts.map +1 -0
  123. package/lib/browser/views/components/preference-select-input.js +131 -0
  124. package/lib/browser/views/components/preference-select-input.js.map +1 -0
  125. package/lib/browser/views/components/preference-string-input.d.ts +18 -0
  126. package/lib/browser/views/components/preference-string-input.d.ts.map +1 -0
  127. package/lib/browser/views/components/preference-string-input.js +85 -0
  128. package/lib/browser/views/components/preference-string-input.js.map +1 -0
  129. package/lib/browser/views/preference-editor-widget.d.ts +75 -0
  130. package/lib/browser/views/preference-editor-widget.d.ts.map +1 -0
  131. package/lib/browser/views/preference-editor-widget.js +391 -0
  132. package/lib/browser/views/preference-editor-widget.js.map +1 -0
  133. package/lib/browser/views/preference-scope-tabbar-widget.d.ts +55 -0
  134. package/lib/browser/views/preference-scope-tabbar-widget.d.ts.map +1 -0
  135. package/lib/browser/views/preference-scope-tabbar-widget.js +337 -0
  136. package/lib/browser/views/preference-scope-tabbar-widget.js.map +1 -0
  137. package/lib/browser/views/preference-searchbar-widget.d.ts +54 -0
  138. package/lib/browser/views/preference-searchbar-widget.d.ts.map +1 -0
  139. package/lib/browser/views/preference-searchbar-widget.js +163 -0
  140. package/lib/browser/views/preference-searchbar-widget.js.map +1 -0
  141. package/lib/browser/views/preference-tree-widget.d.ts +20 -0
  142. package/lib/browser/views/preference-tree-widget.d.ts.map +1 -0
  143. package/lib/browser/views/preference-tree-widget.js +106 -0
  144. package/lib/browser/views/preference-tree-widget.js.map +1 -0
  145. package/lib/browser/views/preference-widget-bindings.d.ts +4 -0
  146. package/lib/browser/views/preference-widget-bindings.d.ts.map +1 -0
  147. package/lib/browser/views/preference-widget-bindings.js +91 -0
  148. package/lib/browser/views/preference-widget-bindings.js.map +1 -0
  149. package/lib/browser/views/preference-widget.d.ts +38 -0
  150. package/lib/browser/views/preference-widget.d.ts.map +1 -0
  151. package/lib/browser/views/preference-widget.js +120 -0
  152. package/lib/browser/views/preference-widget.js.map +1 -0
  153. package/lib/browser/workspace-file-preference-provider.d.ts +24 -0
  154. package/lib/browser/workspace-file-preference-provider.d.ts.map +1 -0
  155. package/lib/browser/workspace-file-preference-provider.js +103 -0
  156. package/lib/browser/workspace-file-preference-provider.js.map +1 -0
  157. package/lib/browser/workspace-preference-provider.d.ts +36 -0
  158. package/lib/browser/workspace-preference-provider.d.ts.map +1 -0
  159. package/lib/browser/workspace-preference-provider.js +147 -0
  160. package/lib/browser/workspace-preference-provider.js.map +1 -0
  161. package/lib/common/abstract-resource-preference-provider.d.ts +69 -0
  162. package/lib/common/abstract-resource-preference-provider.d.ts.map +1 -0
  163. package/lib/common/abstract-resource-preference-provider.js +207 -0
  164. package/lib/common/abstract-resource-preference-provider.js.map +1 -0
  165. package/lib/common/abstract-resource-preference-provider.spec.d.ts +2 -0
  166. package/lib/common/abstract-resource-preference-provider.spec.d.ts.map +1 -0
  167. package/lib/common/abstract-resource-preference-provider.spec.js +84 -0
  168. package/lib/common/abstract-resource-preference-provider.spec.js.map +1 -0
  169. package/lib/common/cli-preferences.d.ts +6 -0
  170. package/lib/common/cli-preferences.d.ts.map +1 -0
  171. package/lib/common/cli-preferences.js +21 -0
  172. package/lib/common/cli-preferences.js.map +1 -0
  173. package/lib/common/jsonc-editor.d.ts +10 -0
  174. package/lib/common/jsonc-editor.d.ts.map +1 -0
  175. package/lib/common/jsonc-editor.js +68 -0
  176. package/lib/common/jsonc-editor.js.map +1 -0
  177. package/lib/common/section-preference-provider.d.ts +20 -0
  178. package/lib/common/section-preference-provider.d.ts.map +1 -0
  179. package/lib/common/section-preference-provider.js +84 -0
  180. package/lib/common/section-preference-provider.js.map +1 -0
  181. package/lib/common/user-configs-preference-provider.d.ts +24 -0
  182. package/lib/common/user-configs-preference-provider.d.ts.map +1 -0
  183. package/lib/common/user-configs-preference-provider.js +134 -0
  184. package/lib/common/user-configs-preference-provider.js.map +1 -0
  185. package/lib/common/user-preference-provider.d.ts +14 -0
  186. package/lib/common/user-preference-provider.d.ts.map +1 -0
  187. package/lib/common/user-preference-provider.js +37 -0
  188. package/lib/common/user-preference-provider.js.map +1 -0
  189. package/lib/node/backend-preference-storage.d.ts +34 -0
  190. package/lib/node/backend-preference-storage.d.ts.map +1 -0
  191. package/lib/node/backend-preference-storage.js +100 -0
  192. package/lib/node/backend-preference-storage.js.map +1 -0
  193. package/lib/node/preference-backend-module.d.ts +4 -0
  194. package/lib/node/preference-backend-module.d.ts.map +1 -0
  195. package/lib/node/preference-backend-module.js +41 -0
  196. package/lib/node/preference-backend-module.js.map +1 -0
  197. package/lib/node/preference-bindings.d.ts +3 -0
  198. package/lib/node/preference-bindings.d.ts.map +1 -0
  199. package/lib/node/preference-bindings.js +33 -0
  200. package/lib/node/preference-bindings.js.map +1 -0
  201. package/lib/node/preference-cli-contribution.d.ts +11 -0
  202. package/lib/node/preference-cli-contribution.d.ts.map +1 -0
  203. package/lib/node/preference-cli-contribution.js +48 -0
  204. package/lib/node/preference-cli-contribution.js.map +1 -0
  205. package/package.json +8 -8
@@ -0,0 +1,442 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2020 Ericsson and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.PreferenceLeafNodeRenderer = exports.PreferenceHeaderRenderer = exports.PreferenceNodeRenderer = exports.SUBHEADER_CLASS = exports.HEADER_CLASS = exports.PreferenceNodeRendererFactory = void 0;
19
+ const tslib_1 = require("tslib");
20
+ const inversify_1 = require("@theia/core/shared/inversify");
21
+ const browser_1 = require("@theia/core/lib/browser");
22
+ const preference_types_1 = require("../../util/preference-types");
23
+ const preference_tree_label_provider_1 = require("../../util/preference-tree-label-provider");
24
+ const preference_scope_tabbar_widget_1 = require("../preference-scope-tabbar-widget");
25
+ const common_1 = require("@theia/core/lib/common");
26
+ const debounce = require("@theia/core/shared/lodash.debounce");
27
+ const preference_tree_model_1 = require("../../preference-tree-model");
28
+ const preference_searchbar_widget_1 = require("../preference-searchbar-widget");
29
+ const DOMPurify = require("@theia/core/shared/dompurify");
30
+ const uri_1 = require("@theia/core/lib/common/uri");
31
+ const preference_markdown_renderer_1 = require("./preference-markdown-renderer");
32
+ exports.PreferenceNodeRendererFactory = Symbol('PreferenceNodeRendererFactory');
33
+ exports.HEADER_CLASS = 'settings-section-category-title';
34
+ exports.SUBHEADER_CLASS = 'settings-section-subcategory-title';
35
+ let PreferenceNodeRenderer = class PreferenceNodeRenderer {
36
+ constructor() {
37
+ this.attached = false;
38
+ }
39
+ get node() {
40
+ return this.domNode;
41
+ }
42
+ get nodeId() {
43
+ return this.preferenceNode.id;
44
+ }
45
+ get id() {
46
+ return this._id;
47
+ }
48
+ get group() {
49
+ return this._group;
50
+ }
51
+ get visible() {
52
+ return !this.node.classList.contains('hidden');
53
+ }
54
+ init() {
55
+ this.setId();
56
+ this.domNode = this.createDomNode();
57
+ }
58
+ setId() {
59
+ var _a;
60
+ const { id, group } = preference_types_1.Preference.TreeNode.getGroupAndIdFromNodeId(this.preferenceNode.id);
61
+ const segments = id.split('.');
62
+ this._id = id;
63
+ this._group = group;
64
+ this._subgroup = (_a = (group === segments[0] ? segments[1] : segments[0])) !== null && _a !== void 0 ? _a : '';
65
+ }
66
+ getAdditionalNodeClassnames() {
67
+ return [];
68
+ }
69
+ insertBefore(nextSibling) {
70
+ nextSibling.insertAdjacentElement('beforebegin', this.domNode);
71
+ this.attached = true;
72
+ }
73
+ insertAfter(previousSibling) {
74
+ previousSibling.insertAdjacentElement('afterend', this.domNode);
75
+ }
76
+ appendTo(parent) {
77
+ parent.appendChild(this.domNode);
78
+ }
79
+ prependTo(parent) {
80
+ parent.prepend(this.domNode);
81
+ }
82
+ hide() {
83
+ this.domNode.classList.add('hidden');
84
+ }
85
+ show() {
86
+ this.domNode.classList.remove('hidden');
87
+ }
88
+ dispose() {
89
+ this.domNode.remove();
90
+ }
91
+ };
92
+ exports.PreferenceNodeRenderer = PreferenceNodeRenderer;
93
+ tslib_1.__decorate([
94
+ (0, inversify_1.inject)(preference_types_1.Preference.Node),
95
+ tslib_1.__metadata("design:type", Object)
96
+ ], PreferenceNodeRenderer.prototype, "preferenceNode", void 0);
97
+ tslib_1.__decorate([
98
+ (0, inversify_1.inject)(preference_tree_label_provider_1.PreferenceTreeLabelProvider),
99
+ tslib_1.__metadata("design:type", preference_tree_label_provider_1.PreferenceTreeLabelProvider)
100
+ ], PreferenceNodeRenderer.prototype, "labelProvider", void 0);
101
+ tslib_1.__decorate([
102
+ (0, inversify_1.postConstruct)(),
103
+ tslib_1.__metadata("design:type", Function),
104
+ tslib_1.__metadata("design:paramtypes", []),
105
+ tslib_1.__metadata("design:returntype", void 0)
106
+ ], PreferenceNodeRenderer.prototype, "init", null);
107
+ exports.PreferenceNodeRenderer = PreferenceNodeRenderer = tslib_1.__decorate([
108
+ (0, inversify_1.injectable)()
109
+ ], PreferenceNodeRenderer);
110
+ class PreferenceHeaderRenderer extends PreferenceNodeRenderer {
111
+ createDomNode() {
112
+ const wrapper = document.createElement('ul');
113
+ wrapper.className = 'settings-section';
114
+ wrapper.id = `${this.preferenceNode.id}-editor`;
115
+ const isCategory = preference_types_1.Preference.TreeNode.isTopLevel(this.preferenceNode);
116
+ const hierarchyClassName = isCategory ? exports.HEADER_CLASS : exports.SUBHEADER_CLASS;
117
+ const name = this.labelProvider.getName(this.preferenceNode);
118
+ const label = document.createElement('li');
119
+ label.classList.add('settings-section-title', hierarchyClassName);
120
+ label.textContent = name;
121
+ wrapper.appendChild(label);
122
+ return wrapper;
123
+ }
124
+ }
125
+ exports.PreferenceHeaderRenderer = PreferenceHeaderRenderer;
126
+ let PreferenceLeafNodeRenderer = class PreferenceLeafNodeRenderer extends PreferenceNodeRenderer {
127
+ constructor() {
128
+ super(...arguments);
129
+ this.isModifiedFromDefault = false;
130
+ this.setPreferenceWithDebounce = debounce(this.setPreferenceImmediately.bind(this), 500, { leading: false, trailing: true });
131
+ }
132
+ get schema() {
133
+ return this.preferenceNode.preference.data;
134
+ }
135
+ init() {
136
+ this.setId();
137
+ this.updateInspection();
138
+ this.domNode = this.createDomNode();
139
+ this.updateModificationStatus();
140
+ }
141
+ updateInspection() {
142
+ this.inspection = this.preferenceService.inspect(this.id, this.scopeTracker.currentScope.uri);
143
+ }
144
+ openLink(event) {
145
+ if (event.target instanceof HTMLAnchorElement) {
146
+ event.preventDefault();
147
+ event.stopPropagation();
148
+ // Exclude right click
149
+ if (event.button < 2) {
150
+ const uri = new uri_1.default(event.target.href);
151
+ (0, browser_1.open)(this.openerService, uri);
152
+ }
153
+ }
154
+ }
155
+ createDomNode() {
156
+ const wrapper = document.createElement('li');
157
+ wrapper.classList.add('single-pref');
158
+ wrapper.id = `${this.id}-editor`;
159
+ wrapper.tabIndex = 0;
160
+ wrapper.setAttribute('data-pref-id', this.id);
161
+ wrapper.setAttribute('data-node-id', this.preferenceNode.id);
162
+ const headlineWrapper = document.createElement('div');
163
+ headlineWrapper.classList.add('pref-name');
164
+ headlineWrapper.title = this.id;
165
+ this.headlineWrapper = headlineWrapper;
166
+ wrapper.appendChild(headlineWrapper);
167
+ this.updateHeadline();
168
+ const gutter = document.createElement('div');
169
+ gutter.classList.add('pref-context-gutter');
170
+ this.gutter = gutter;
171
+ wrapper.appendChild(gutter);
172
+ const cog = document.createElement('i');
173
+ cog.className = `${(0, browser_1.codicon)('settings-gear', true)} settings-context-menu-btn`;
174
+ cog.setAttribute('aria-label', 'Open Context Menu');
175
+ cog.setAttribute('role', 'button');
176
+ cog.onclick = this.handleCogAction.bind(this);
177
+ cog.onkeydown = this.handleCogAction.bind(this);
178
+ cog.title = common_1.nls.localizeByDefault('More Actions...');
179
+ gutter.appendChild(cog);
180
+ const contentWrapper = document.createElement('div');
181
+ contentWrapper.classList.add('pref-content-container', ...this.getAdditionalNodeClassnames());
182
+ wrapper.appendChild(contentWrapper);
183
+ const { description, markdownDescription } = this.preferenceNode.preference.data;
184
+ if (markdownDescription || description) {
185
+ const descriptionWrapper = document.createElement('div');
186
+ descriptionWrapper.classList.add('pref-description');
187
+ if (markdownDescription) {
188
+ const renderedDescription = this.markdownRenderer.render(markdownDescription);
189
+ descriptionWrapper.onauxclick = this.openLink.bind(this);
190
+ descriptionWrapper.onclick = this.openLink.bind(this);
191
+ descriptionWrapper.oncontextmenu = () => false;
192
+ descriptionWrapper.innerHTML = DOMPurify.sanitize(renderedDescription, {
193
+ ALLOW_UNKNOWN_PROTOCOLS: true
194
+ });
195
+ }
196
+ else if (description) {
197
+ descriptionWrapper.textContent = description;
198
+ }
199
+ contentWrapper.appendChild(descriptionWrapper);
200
+ }
201
+ const interactableWrapper = document.createElement('div');
202
+ interactableWrapper.classList.add('pref-input');
203
+ contentWrapper.appendChild(interactableWrapper);
204
+ this.createInteractable(interactableWrapper);
205
+ return wrapper;
206
+ }
207
+ handleCogAction({ currentTarget }) {
208
+ var _a;
209
+ const value = (_a = preference_types_1.Preference.getValueInScope(this.inspection, this.scopeTracker.currentScope.scope)) !== null && _a !== void 0 ? _a : this.getDefaultValue();
210
+ const target = currentTarget;
211
+ if (target && value !== undefined) {
212
+ this.showCog();
213
+ const domRect = target.getBoundingClientRect();
214
+ this.menuRenderer.render({
215
+ menuPath: preference_types_1.PreferenceMenus.PREFERENCE_EDITOR_CONTEXT_MENU,
216
+ anchor: { x: domRect.left, y: domRect.bottom },
217
+ args: [{ id: this.id, value }],
218
+ context: target,
219
+ onHide: () => this.hideCog()
220
+ });
221
+ }
222
+ }
223
+ addModifiedMarking() {
224
+ this.gutter.classList.add('theia-mod-item-modified');
225
+ }
226
+ removeModifiedMarking() {
227
+ this.gutter.classList.remove('theia-mod-item-modified');
228
+ }
229
+ showCog() {
230
+ this.gutter.classList.add('show-cog');
231
+ }
232
+ hideCog() {
233
+ this.gutter.classList.remove('show-cog');
234
+ }
235
+ updateModificationStatus(knownCurrentValue) {
236
+ const wasModified = this.isModifiedFromDefault;
237
+ const { inspection } = this;
238
+ const valueInCurrentScope = knownCurrentValue !== null && knownCurrentValue !== void 0 ? knownCurrentValue : preference_types_1.Preference.getValueInScope(inspection, this.scopeTracker.currentScope.scope);
239
+ this.isModifiedFromDefault = valueInCurrentScope !== undefined && !common_1.PreferenceUtils.deepEqual(valueInCurrentScope, this.getDefaultValue());
240
+ if (wasModified !== this.isModifiedFromDefault) {
241
+ this.gutter.classList.toggle('theia-mod-item-modified', this.isModifiedFromDefault);
242
+ }
243
+ }
244
+ updateHeadline(filtered = this.model.isFiltered) {
245
+ const { headlineWrapper } = this;
246
+ if (this.headlineWrapper.childElementCount === 0) {
247
+ const name = this.labelProvider.getName(this.preferenceNode);
248
+ const nameWrapper = document.createElement('span');
249
+ nameWrapper.classList.add('preference-leaf-headline-name');
250
+ nameWrapper.textContent = name;
251
+ headlineWrapper.appendChild(nameWrapper);
252
+ }
253
+ const prefix = this.labelProvider.getPrefix(this.preferenceNode, filtered);
254
+ const currentFirstChild = headlineWrapper.children[0];
255
+ const currentFirstChildIsPrefix = currentFirstChild.classList.contains('preference-leaf-headline-prefix');
256
+ if (prefix) {
257
+ let prefixWrapper;
258
+ if (currentFirstChildIsPrefix) {
259
+ prefixWrapper = currentFirstChild;
260
+ }
261
+ else {
262
+ prefixWrapper = document.createElement('span');
263
+ prefixWrapper.classList.add('preference-leaf-headline-prefix');
264
+ headlineWrapper.insertBefore(prefixWrapper, currentFirstChild);
265
+ }
266
+ prefixWrapper.textContent = prefix;
267
+ }
268
+ else if (currentFirstChildIsPrefix) {
269
+ headlineWrapper.removeChild(currentFirstChild);
270
+ }
271
+ const currentLastChild = headlineWrapper.lastChild;
272
+ if (currentLastChild.classList.contains('preference-leaf-headline-suffix')) {
273
+ this.compareOtherModifiedScopes(headlineWrapper, currentLastChild);
274
+ }
275
+ else {
276
+ this.createOtherModifiedScopes(headlineWrapper);
277
+ }
278
+ }
279
+ compareOtherModifiedScopes(headlineWrapper, currentSuffix) {
280
+ const modifiedScopes = this.getModifiedScopesAsStrings();
281
+ if (modifiedScopes.length === 0) {
282
+ headlineWrapper.removeChild(currentSuffix);
283
+ }
284
+ else {
285
+ const modifiedMessagePrefix = currentSuffix.children[0];
286
+ const newMessagePrefix = this.getModifiedMessagePrefix();
287
+ if (modifiedMessagePrefix.textContent !== newMessagePrefix) {
288
+ modifiedMessagePrefix.textContent = newMessagePrefix;
289
+ }
290
+ const [firstModifiedScope, secondModifiedScope] = modifiedScopes;
291
+ const firstScopeMessage = currentSuffix.children[1];
292
+ const secondScopeMessage = currentSuffix.children[2];
293
+ firstScopeMessage.children[0].textContent = common_1.PreferenceScope[firstModifiedScope];
294
+ this.addEventHandlerToModifiedScope(firstModifiedScope, firstScopeMessage.children[0]);
295
+ if (modifiedScopes.length === 1 && secondScopeMessage) {
296
+ currentSuffix.removeChild(secondScopeMessage);
297
+ }
298
+ else if (modifiedScopes.length === 2 && !secondScopeMessage) {
299
+ const newSecondMessage = this.createModifiedScopeMessage(secondModifiedScope);
300
+ currentSuffix.appendChild(newSecondMessage);
301
+ }
302
+ // If both scopes are modified and both messages are present, do nothing.
303
+ }
304
+ }
305
+ createOtherModifiedScopes(headlineWrapper) {
306
+ const modifiedScopes = this.getModifiedScopesAsStrings();
307
+ if (modifiedScopes.length !== 0) {
308
+ const wrapper = document.createElement('i');
309
+ wrapper.classList.add('preference-leaf-headline-suffix');
310
+ headlineWrapper.appendChild(wrapper);
311
+ const messagePrefix = this.getModifiedMessagePrefix();
312
+ const messageWrapper = document.createElement('span');
313
+ messageWrapper.classList.add('preference-other-modified-scope-alert');
314
+ messageWrapper.textContent = messagePrefix;
315
+ wrapper.appendChild(messageWrapper);
316
+ modifiedScopes.forEach((scopeName, i) => {
317
+ const scopeWrapper = this.createModifiedScopeMessage(scopeName);
318
+ wrapper.appendChild(scopeWrapper);
319
+ });
320
+ }
321
+ }
322
+ createModifiedScopeMessage(scope) {
323
+ const scopeWrapper = document.createElement('span');
324
+ scopeWrapper.classList.add('preference-modified-scope-wrapper');
325
+ const scopeInteractable = document.createElement('span');
326
+ scopeInteractable.classList.add('preference-scope-underlined');
327
+ const scopeName = common_1.PreferenceScope[scope];
328
+ this.addEventHandlerToModifiedScope(scope, scopeInteractable);
329
+ scopeInteractable.textContent = scopeName;
330
+ scopeWrapper.appendChild(scopeInteractable);
331
+ return scopeWrapper;
332
+ }
333
+ getModifiedMessagePrefix() {
334
+ return (this.isModifiedFromDefault ? common_1.nls.localizeByDefault('Also modified in') : common_1.nls.localizeByDefault('Modified in')) + ': ';
335
+ }
336
+ addEventHandlerToModifiedScope(scope, scopeWrapper) {
337
+ if (scope === common_1.PreferenceScope.User || scope === common_1.PreferenceScope.Workspace) {
338
+ const eventHandler = () => {
339
+ this.scopeTracker.setScope(scope);
340
+ this.searchbar.updateSearchTerm(this.id);
341
+ };
342
+ scopeWrapper.onclick = eventHandler;
343
+ scopeWrapper.onkeydown = eventHandler;
344
+ scopeWrapper.tabIndex = 0;
345
+ }
346
+ else {
347
+ scopeWrapper.onclick = null; // eslint-disable-line no-null/no-null
348
+ scopeWrapper.onkeydown = null; // eslint-disable-line no-null/no-null
349
+ scopeWrapper.tabIndex = -1;
350
+ }
351
+ }
352
+ getModifiedScopesAsStrings() {
353
+ const currentScopeInView = this.scopeTracker.currentScope.scope;
354
+ const { inspection } = this;
355
+ const modifiedScopes = [];
356
+ if (inspection) {
357
+ for (const otherScope of [common_1.PreferenceScope.User, common_1.PreferenceScope.Workspace]) {
358
+ if (otherScope !== currentScopeInView) {
359
+ const valueInOtherScope = preference_types_1.Preference.getValueInScope(inspection, otherScope);
360
+ if (valueInOtherScope !== undefined && !common_1.PreferenceUtils.deepEqual(valueInOtherScope, this.getDefaultValue())) {
361
+ modifiedScopes.push(otherScope);
362
+ }
363
+ }
364
+ }
365
+ }
366
+ return modifiedScopes;
367
+ }
368
+ // Many preferences allow `null` and even use it as a default regardless of the declared type.
369
+ getValue() {
370
+ let currentValue = preference_types_1.Preference.getValueInScope(this.inspection, this.scopeTracker.currentScope.scope);
371
+ if (currentValue === undefined) {
372
+ currentValue = this.getDefaultValue();
373
+ }
374
+ return currentValue;
375
+ }
376
+ setPreferenceImmediately(value) {
377
+ return this.preferenceService.set(this.id, value, this.scopeTracker.currentScope.scope, this.scopeTracker.currentScope.uri)
378
+ .catch(() => this.handleValueChange());
379
+ }
380
+ handleSearchChange(isFiltered = this.model.isFiltered) {
381
+ this.updateHeadline(isFiltered);
382
+ }
383
+ handleScopeChange(isFiltered = this.model.isFiltered) {
384
+ this.handleValueChange();
385
+ this.updateHeadline(isFiltered);
386
+ }
387
+ handleValueChange() {
388
+ this.doHandleValueChange();
389
+ this.updateHeadline();
390
+ }
391
+ /**
392
+ * Returns the default value for this preference.
393
+ * @returns The default value from the inspection or the fallback value if no default is specified.
394
+ */
395
+ getDefaultValue() {
396
+ var _a, _b;
397
+ return (_b = (_a = this.inspection) === null || _a === void 0 ? void 0 : _a.defaultValue) !== null && _b !== void 0 ? _b : this.getFallbackValue();
398
+ }
399
+ };
400
+ exports.PreferenceLeafNodeRenderer = PreferenceLeafNodeRenderer;
401
+ tslib_1.__decorate([
402
+ (0, inversify_1.inject)(preference_types_1.Preference.Node),
403
+ tslib_1.__metadata("design:type", Object)
404
+ ], PreferenceLeafNodeRenderer.prototype, "preferenceNode", void 0);
405
+ tslib_1.__decorate([
406
+ (0, inversify_1.inject)(common_1.PreferenceService),
407
+ tslib_1.__metadata("design:type", Object)
408
+ ], PreferenceLeafNodeRenderer.prototype, "preferenceService", void 0);
409
+ tslib_1.__decorate([
410
+ (0, inversify_1.inject)(browser_1.ContextMenuRenderer),
411
+ tslib_1.__metadata("design:type", browser_1.ContextMenuRenderer)
412
+ ], PreferenceLeafNodeRenderer.prototype, "menuRenderer", void 0);
413
+ tslib_1.__decorate([
414
+ (0, inversify_1.inject)(preference_scope_tabbar_widget_1.PreferencesScopeTabBar),
415
+ tslib_1.__metadata("design:type", preference_scope_tabbar_widget_1.PreferencesScopeTabBar)
416
+ ], PreferenceLeafNodeRenderer.prototype, "scopeTracker", void 0);
417
+ tslib_1.__decorate([
418
+ (0, inversify_1.inject)(preference_tree_model_1.PreferenceTreeModel),
419
+ tslib_1.__metadata("design:type", preference_tree_model_1.PreferenceTreeModel)
420
+ ], PreferenceLeafNodeRenderer.prototype, "model", void 0);
421
+ tslib_1.__decorate([
422
+ (0, inversify_1.inject)(preference_searchbar_widget_1.PreferencesSearchbarWidget),
423
+ tslib_1.__metadata("design:type", preference_searchbar_widget_1.PreferencesSearchbarWidget)
424
+ ], PreferenceLeafNodeRenderer.prototype, "searchbar", void 0);
425
+ tslib_1.__decorate([
426
+ (0, inversify_1.inject)(browser_1.OpenerService),
427
+ tslib_1.__metadata("design:type", Object)
428
+ ], PreferenceLeafNodeRenderer.prototype, "openerService", void 0);
429
+ tslib_1.__decorate([
430
+ (0, inversify_1.inject)(preference_markdown_renderer_1.PreferenceMarkdownRenderer),
431
+ tslib_1.__metadata("design:type", preference_markdown_renderer_1.PreferenceMarkdownRenderer)
432
+ ], PreferenceLeafNodeRenderer.prototype, "markdownRenderer", void 0);
433
+ tslib_1.__decorate([
434
+ (0, inversify_1.postConstruct)(),
435
+ tslib_1.__metadata("design:type", Function),
436
+ tslib_1.__metadata("design:paramtypes", []),
437
+ tslib_1.__metadata("design:returntype", void 0)
438
+ ], PreferenceLeafNodeRenderer.prototype, "init", null);
439
+ exports.PreferenceLeafNodeRenderer = PreferenceLeafNodeRenderer = tslib_1.__decorate([
440
+ (0, inversify_1.injectable)()
441
+ ], PreferenceLeafNodeRenderer);
442
+ //# sourceMappingURL=preference-node-renderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preference-node-renderer.js","sourceRoot":"","sources":["../../../../src/browser/views/components/preference-node-renderer.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,g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AAC;IACpE,CAAC;CAgBJ,CAAA;AA1UqB,gEAA0B;AAGS;IAApD,IAAA,kBAAM,EAAC,6BAAU,CAAC,IAAI,CAAC;;kEAAiE;AAC3C;IAA7C,IAAA,kBAAM,EAAC,0BAAiB,CAAC;;qEAAyD;AACnC;IAA/C,IAAA,kBAAM,EAAC,6BAAmB,CAAC;sCAAkC,6BAAmB;gEAAC;AAC/B;IAAlD,IAAA,kBAAM,EAAC,uDAAsB,CAAC;sCAAkC,uDAAsB;gEAAC;AACxC;IAA/C,IAAA,kBAAM,EAAC,2CAAmB,CAAC;sCAA2B,2CAAmB;yDAAC;AACpB;IAAtD,IAAA,kBAAM,EAAC,wDAA0B,CAAC;sCAA+B,wDAA0B;6DAAC;AACnD;IAAzC,IAAA,kBAAM,EAAC,uBAAa,CAAC;;iEAAiD;AAChB;IAAtD,IAAA,kBAAM,EAAC,yDAA0B,CAAC;sCAAsC,yDAA0B;oEAAC;AAajF;IADlB,IAAA,yBAAa,GAAE;;;;sDAMf;qCA5BiB,0BAA0B;IAD/C,IAAA,sBAAU,GAAE;GACS,0BAA0B,CA0U/C"}
@@ -0,0 +1,16 @@
1
+ import { interfaces } from '@theia/core/shared/inversify';
2
+ import { PreferenceLeafNodeRenderer, PreferenceNodeRenderer } from './preference-node-renderer';
3
+ import { Preference } from '../../util/preference-types';
4
+ import { PreferenceLeafNodeRendererContribution } from './preference-node-renderer-creator';
5
+ export declare class PreferenceNullInputRenderer extends PreferenceLeafNodeRenderer<null, HTMLElement> {
6
+ protected createInteractable(container: HTMLElement): void;
7
+ protected getFallbackValue(): null;
8
+ protected doHandleValueChange(): void;
9
+ }
10
+ export declare class PreferenceNullRendererContribution extends PreferenceLeafNodeRendererContribution {
11
+ static ID: string;
12
+ id: string;
13
+ canHandleLeafNode(node: Preference.LeafNode): number;
14
+ createLeafNodeRenderer(container: interfaces.Container): PreferenceNodeRenderer;
15
+ }
16
+ //# sourceMappingURL=preference-null-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preference-null-input.d.ts","sourceRoot":"","sources":["../../../../src/browser/views/components/preference-null-input.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAc,UAAU,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAChG,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,sCAAsC,EAAE,MAAM,oCAAoC,CAAC;AAE5F,qBAEa,2BAA4B,SAAQ,0BAA0B,CAAC,IAAI,EAAE,WAAW,CAAC;cACvE,kBAAkB,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI;cAMhD,gBAAgB,IAAI,IAAI;cAKxB,mBAAmB,IAAI,IAAI;CACjD;AAED,qBACa,kCAAmC,SAAQ,sCAAsC;IAC1F,MAAM,CAAC,EAAE,SAA8B;IACvC,EAAE,SAAyC;IAE3C,iBAAiB,CAAC,IAAI,EAAE,UAAU,CAAC,QAAQ,GAAG,MAAM;IAKpD,sBAAsB,CAAC,SAAS,EAAE,UAAU,CAAC,SAAS,GAAG,sBAAsB;CAGlF"}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2025 EclipseSource GmbH and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ var PreferenceNullRendererContribution_1;
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.PreferenceNullRendererContribution = exports.PreferenceNullInputRenderer = void 0;
20
+ const tslib_1 = require("tslib");
21
+ const inversify_1 = require("@theia/core/shared/inversify");
22
+ const preference_node_renderer_1 = require("./preference-node-renderer");
23
+ const preference_node_renderer_creator_1 = require("./preference-node-renderer-creator");
24
+ let PreferenceNullInputRenderer = class PreferenceNullInputRenderer extends preference_node_renderer_1.PreferenceLeafNodeRenderer {
25
+ createInteractable(container) {
26
+ const span = document.createElement('span');
27
+ this.interactable = span;
28
+ container.appendChild(span);
29
+ }
30
+ getFallbackValue() {
31
+ // eslint-disable-next-line no-null/no-null
32
+ return null;
33
+ }
34
+ doHandleValueChange() { }
35
+ };
36
+ exports.PreferenceNullInputRenderer = PreferenceNullInputRenderer;
37
+ exports.PreferenceNullInputRenderer = PreferenceNullInputRenderer = tslib_1.__decorate([
38
+ (0, inversify_1.injectable)()
39
+ /** For rendering preference items for which the only interesting feature is the description */
40
+ ], PreferenceNullInputRenderer);
41
+ let PreferenceNullRendererContribution = PreferenceNullRendererContribution_1 = class PreferenceNullRendererContribution extends preference_node_renderer_creator_1.PreferenceLeafNodeRendererContribution {
42
+ constructor() {
43
+ super(...arguments);
44
+ this.id = PreferenceNullRendererContribution_1.ID;
45
+ }
46
+ canHandleLeafNode(node) {
47
+ const isOnlyNull = node.preference.data.type === 'null' || Array.isArray(node.preference.data.type) && node.preference.data.type.every(candidate => candidate === 'null');
48
+ return isOnlyNull ? 5 : 0;
49
+ }
50
+ createLeafNodeRenderer(container) {
51
+ return container.get(PreferenceNullInputRenderer);
52
+ }
53
+ };
54
+ exports.PreferenceNullRendererContribution = PreferenceNullRendererContribution;
55
+ PreferenceNullRendererContribution.ID = 'preference-null-renderer';
56
+ exports.PreferenceNullRendererContribution = PreferenceNullRendererContribution = PreferenceNullRendererContribution_1 = tslib_1.__decorate([
57
+ (0, inversify_1.injectable)()
58
+ ], PreferenceNullRendererContribution);
59
+ //# sourceMappingURL=preference-null-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preference-null-input.js","sourceRoot":"","sources":["../../../../src/browser/views/components/preference-null-input.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,oDAAoD;AACpD,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;;AAEhF,4DAAsE;AACtE,yEAAgG;AAEhG,yFAA4F;AAIrF,IAAM,2BAA2B,GAAjC,MAAM,2BAA4B,SAAQ,qDAA6C;IACvE,kBAAkB,CAAC,SAAsB;QACxD,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAC5C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAEkB,gBAAgB;QAC/B,2CAA2C;QAC3C,OAAO,IAAI,CAAC;IAChB,CAAC;IAEkB,mBAAmB,KAAW,CAAC;CACrD,CAAA;AAbY,kEAA2B;sCAA3B,2BAA2B;IAFvC,IAAA,sBAAU,GAAE;IACb,+FAA+F;GAClF,2BAA2B,CAavC;AAGM,IAAM,kCAAkC,0CAAxC,MAAM,kCAAmC,SAAQ,yEAAsC;IAAvF;;QAEH,OAAE,GAAG,oCAAkC,CAAC,EAAE,CAAC;IAU/C,CAAC;IARG,iBAAiB,CAAC,IAAyB;QACvC,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC;QAC1K,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC;IAED,sBAAsB,CAAC,SAA+B;QAClD,OAAO,SAAS,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;IACtD,CAAC;;AAXQ,gFAAkC;AACpC,qCAAE,GAAG,0BAA0B,AAA7B,CAA8B;6CAD9B,kCAAkC;IAD9C,IAAA,sBAAU,GAAE;GACA,kCAAkC,CAY9C"}
@@ -0,0 +1,35 @@
1
+ import { interfaces } from '@theia/core/shared/inversify';
2
+ import { Preference } from '../../util/preference-types';
3
+ import { PreferenceLeafNodeRenderer, PreferenceNodeRenderer } from './preference-node-renderer';
4
+ import { PreferenceLeafNodeRendererContribution } from './preference-node-renderer-creator';
5
+ interface PreferenceNumberInputValidation {
6
+ /**
7
+ * the numeric value of the input. `NaN` if there is an error.
8
+ */
9
+ value: number;
10
+ /**
11
+ * the error message to display.
12
+ */
13
+ message: string;
14
+ }
15
+ export declare class PreferenceNumberInputRenderer extends PreferenceLeafNodeRenderer<number, HTMLInputElement> {
16
+ protected _errorMessage: HTMLElement | undefined;
17
+ protected interactableWrapper: HTMLElement;
18
+ get errorMessage(): HTMLElement;
19
+ protected createInteractable(parent: HTMLElement): void;
20
+ protected getFallbackValue(): number;
21
+ protected handleUserInteraction(): void;
22
+ protected handleBlur(): Promise<void>;
23
+ protected doHandleValueChange(): void;
24
+ protected getInputValidation(input: string): PreferenceNumberInputValidation;
25
+ protected showErrorMessage(message: string): void;
26
+ protected hideErrorMessage(): void;
27
+ }
28
+ export declare class PreferenceNumberInputRendererContribution extends PreferenceLeafNodeRendererContribution {
29
+ static ID: string;
30
+ id: string;
31
+ canHandleLeafNode(node: Preference.LeafNode): number;
32
+ createLeafNodeRenderer(container: interfaces.Container): PreferenceNodeRenderer;
33
+ }
34
+ export {};
35
+ //# sourceMappingURL=preference-number-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preference-number-input.d.ts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