@theia/property-view 1.45.0 → 1.46.0-next.72

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 (56) hide show
  1. package/README.md +44 -44
  2. package/lib/browser/empty-property-view-widget-provider.d.ts +32 -32
  3. package/lib/browser/empty-property-view-widget-provider.js +83 -83
  4. package/lib/browser/property-data-service.d.ts +28 -28
  5. package/lib/browser/property-data-service.js +19 -19
  6. package/lib/browser/property-view-content-widget.d.ts +10 -10
  7. package/lib/browser/property-view-content-widget.js +17 -17
  8. package/lib/browser/property-view-contribution.d.ts +5 -5
  9. package/lib/browser/property-view-contribution.js +48 -48
  10. package/lib/browser/property-view-frontend-module.d.ts +4 -4
  11. package/lib/browser/property-view-frontend-module.js +42 -42
  12. package/lib/browser/property-view-service.d.ts +17 -17
  13. package/lib/browser/property-view-service.js +81 -81
  14. package/lib/browser/property-view-widget-provider.d.ts +57 -57
  15. package/lib/browser/property-view-widget-provider.js +84 -84
  16. package/lib/browser/property-view-widget.d.ts +26 -26
  17. package/lib/browser/property-view-widget.js +130 -130
  18. package/lib/browser/resource-property-view/index.d.ts +1 -1
  19. package/lib/browser/resource-property-view/index.js +28 -28
  20. package/lib/browser/resource-property-view/resource-property-data-service.d.ts +17 -17
  21. package/lib/browser/resource-property-view/resource-property-data-service.js +72 -72
  22. package/lib/browser/resource-property-view/resource-property-data-service.spec.d.ts +1 -1
  23. package/lib/browser/resource-property-view/resource-property-data-service.spec.js +101 -101
  24. package/lib/browser/resource-property-view/resource-property-view-label-provider.d.ts +10 -10
  25. package/lib/browser/resource-property-view/resource-property-view-label-provider.js +60 -60
  26. package/lib/browser/resource-property-view/resource-property-view-label-provider.spec.d.ts +1 -1
  27. package/lib/browser/resource-property-view/resource-property-view-label-provider.spec.js +129 -129
  28. package/lib/browser/resource-property-view/resource-property-view-tree-container.d.ts +2 -2
  29. package/lib/browser/resource-property-view/resource-property-view-tree-container.js +43 -43
  30. package/lib/browser/resource-property-view/resource-property-view-tree-items.d.ts +27 -27
  31. package/lib/browser/resource-property-view/resource-property-view-tree-items.js +41 -41
  32. package/lib/browser/resource-property-view/resource-property-view-tree-widget.d.ts +40 -40
  33. package/lib/browser/resource-property-view/resource-property-view-tree-widget.js +191 -191
  34. package/lib/browser/resource-property-view/resource-property-view-widget-provider.d.ts +16 -16
  35. package/lib/browser/resource-property-view/resource-property-view-widget-provider.js +66 -66
  36. package/lib/package.spec.js +25 -25
  37. package/package.json +5 -5
  38. package/src/browser/empty-property-view-widget-provider.tsx +83 -83
  39. package/src/browser/property-data-service.ts +48 -48
  40. package/src/browser/property-view-content-widget.ts +27 -27
  41. package/src/browser/property-view-contribution.ts +36 -36
  42. package/src/browser/property-view-frontend-module.ts +47 -47
  43. package/src/browser/property-view-service.ts +62 -62
  44. package/src/browser/property-view-widget-provider.ts +112 -112
  45. package/src/browser/property-view-widget.tsx +118 -118
  46. package/src/browser/resource-property-view/index.ts +17 -17
  47. package/src/browser/resource-property-view/resource-property-data-service.spec.ts +127 -127
  48. package/src/browser/resource-property-view/resource-property-data-service.ts +64 -64
  49. package/src/browser/resource-property-view/resource-property-view-label-provider.spec.ts +153 -153
  50. package/src/browser/resource-property-view/resource-property-view-label-provider.ts +49 -49
  51. package/src/browser/resource-property-view/resource-property-view-tree-container.ts +47 -47
  52. package/src/browser/resource-property-view/resource-property-view-tree-items.ts +53 -53
  53. package/src/browser/resource-property-view/resource-property-view-tree-widget.tsx +219 -219
  54. package/src/browser/resource-property-view/resource-property-view-widget-provider.ts +55 -55
  55. package/src/browser/style/property-view.css +51 -51
  56. package/src/package.spec.ts +29 -29
@@ -1,44 +1,44 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2020 EclipseSource 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.bindResourcePropertyView = void 0;
19
- const browser_1 = require("@theia/core/lib/browser");
20
- const property_data_service_1 = require("../property-data-service");
21
- const property_view_widget_provider_1 = require("../property-view-widget-provider");
22
- const resource_property_data_service_1 = require("./resource-property-data-service");
23
- const resource_property_view_label_provider_1 = require("./resource-property-view-label-provider");
24
- const resource_property_view_tree_widget_1 = require("./resource-property-view-tree-widget");
25
- const resource_property_view_widget_provider_1 = require("./resource-property-view-widget-provider");
26
- const RESOURCE_PROPERTY_VIEW_TREE_PROPS = {
27
- multiSelect: true,
28
- search: true,
29
- };
30
- function createResourcePropertyViewTreeWidget(parent) {
31
- const child = (0, browser_1.createTreeContainer)(parent, {
32
- props: RESOURCE_PROPERTY_VIEW_TREE_PROPS,
33
- widget: resource_property_view_tree_widget_1.ResourcePropertyViewTreeWidget,
34
- });
35
- return child.get(resource_property_view_tree_widget_1.ResourcePropertyViewTreeWidget);
36
- }
37
- function bindResourcePropertyView(bind) {
38
- bind(browser_1.LabelProviderContribution).to(resource_property_view_label_provider_1.ResourcePropertiesLabelProvider).inSingletonScope();
39
- bind(property_data_service_1.PropertyDataService).to(resource_property_data_service_1.ResourcePropertyDataService).inSingletonScope();
40
- bind(property_view_widget_provider_1.PropertyViewWidgetProvider).to(resource_property_view_widget_provider_1.ResourcePropertyViewWidgetProvider).inSingletonScope();
41
- bind(resource_property_view_tree_widget_1.ResourcePropertyViewTreeWidget).toDynamicValue(ctx => createResourcePropertyViewTreeWidget(ctx.container));
42
- }
43
- exports.bindResourcePropertyView = bindResourcePropertyView;
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2020 EclipseSource 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.bindResourcePropertyView = void 0;
19
+ const browser_1 = require("@theia/core/lib/browser");
20
+ const property_data_service_1 = require("../property-data-service");
21
+ const property_view_widget_provider_1 = require("../property-view-widget-provider");
22
+ const resource_property_data_service_1 = require("./resource-property-data-service");
23
+ const resource_property_view_label_provider_1 = require("./resource-property-view-label-provider");
24
+ const resource_property_view_tree_widget_1 = require("./resource-property-view-tree-widget");
25
+ const resource_property_view_widget_provider_1 = require("./resource-property-view-widget-provider");
26
+ const RESOURCE_PROPERTY_VIEW_TREE_PROPS = {
27
+ multiSelect: true,
28
+ search: true,
29
+ };
30
+ function createResourcePropertyViewTreeWidget(parent) {
31
+ const child = (0, browser_1.createTreeContainer)(parent, {
32
+ props: RESOURCE_PROPERTY_VIEW_TREE_PROPS,
33
+ widget: resource_property_view_tree_widget_1.ResourcePropertyViewTreeWidget,
34
+ });
35
+ return child.get(resource_property_view_tree_widget_1.ResourcePropertyViewTreeWidget);
36
+ }
37
+ function bindResourcePropertyView(bind) {
38
+ bind(browser_1.LabelProviderContribution).to(resource_property_view_label_provider_1.ResourcePropertiesLabelProvider).inSingletonScope();
39
+ bind(property_data_service_1.PropertyDataService).to(resource_property_data_service_1.ResourcePropertyDataService).inSingletonScope();
40
+ bind(property_view_widget_provider_1.PropertyViewWidgetProvider).to(resource_property_view_widget_provider_1.ResourcePropertyViewWidgetProvider).inSingletonScope();
41
+ bind(resource_property_view_tree_widget_1.ResourcePropertyViewTreeWidget).toDynamicValue(ctx => createResourcePropertyViewTreeWidget(ctx.container));
42
+ }
43
+ exports.bindResourcePropertyView = bindResourcePropertyView;
44
44
  //# sourceMappingURL=resource-property-view-tree-container.js.map
@@ -1,28 +1,28 @@
1
- import { CompositeTreeNode, ExpandableTreeNode, SelectableTreeNode, TreeNode } from '@theia/core/lib/browser';
2
- export declare const ROOT_ID = "ResourcePropertiesTree";
3
- export interface ResourcePropertiesRoot extends CompositeTreeNode {
4
- children: ResourcePropertiesCategoryNode[];
5
- }
6
- export declare namespace ResourcePropertiesRoot {
7
- function is(node: unknown): node is ResourcePropertiesRoot;
8
- }
9
- export interface ResourcePropertiesCategoryNode extends ExpandableTreeNode, SelectableTreeNode {
10
- name: string;
11
- icon?: string;
12
- children: ResourcePropertiesItemNode[];
13
- parent: ResourcePropertiesRoot;
14
- categoryId: string;
15
- }
16
- export declare namespace ResourcePropertiesCategoryNode {
17
- function is(node: TreeNode | undefined): node is ResourcePropertiesCategoryNode;
18
- }
19
- export interface ResourcePropertiesItemNode extends SelectableTreeNode {
20
- name: string;
21
- icon?: string;
22
- parent: ResourcePropertiesCategoryNode;
23
- property: string;
24
- }
25
- export declare namespace ResourcePropertiesItemNode {
26
- function is(node: TreeNode | undefined): node is ResourcePropertiesItemNode;
27
- }
1
+ import { CompositeTreeNode, ExpandableTreeNode, SelectableTreeNode, TreeNode } from '@theia/core/lib/browser';
2
+ export declare const ROOT_ID = "ResourcePropertiesTree";
3
+ export interface ResourcePropertiesRoot extends CompositeTreeNode {
4
+ children: ResourcePropertiesCategoryNode[];
5
+ }
6
+ export declare namespace ResourcePropertiesRoot {
7
+ function is(node: unknown): node is ResourcePropertiesRoot;
8
+ }
9
+ export interface ResourcePropertiesCategoryNode extends ExpandableTreeNode, SelectableTreeNode {
10
+ name: string;
11
+ icon?: string;
12
+ children: ResourcePropertiesItemNode[];
13
+ parent: ResourcePropertiesRoot;
14
+ categoryId: string;
15
+ }
16
+ export declare namespace ResourcePropertiesCategoryNode {
17
+ function is(node: TreeNode | undefined): node is ResourcePropertiesCategoryNode;
18
+ }
19
+ export interface ResourcePropertiesItemNode extends SelectableTreeNode {
20
+ name: string;
21
+ icon?: string;
22
+ parent: ResourcePropertiesCategoryNode;
23
+ property: string;
24
+ }
25
+ export declare namespace ResourcePropertiesItemNode {
26
+ function is(node: TreeNode | undefined): node is ResourcePropertiesItemNode;
27
+ }
28
28
  //# sourceMappingURL=resource-property-view-tree-items.d.ts.map
@@ -1,42 +1,42 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2020 EclipseSource 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.ResourcePropertiesItemNode = exports.ResourcePropertiesCategoryNode = exports.ResourcePropertiesRoot = exports.ROOT_ID = void 0;
19
- const browser_1 = require("@theia/core/lib/browser");
20
- exports.ROOT_ID = 'ResourcePropertiesTree';
21
- var ResourcePropertiesRoot;
22
- (function (ResourcePropertiesRoot) {
23
- function is(node) {
24
- return browser_1.CompositeTreeNode.is(node) && node.id === exports.ROOT_ID;
25
- }
26
- ResourcePropertiesRoot.is = is;
27
- })(ResourcePropertiesRoot = exports.ResourcePropertiesRoot || (exports.ResourcePropertiesRoot = {}));
28
- var ResourcePropertiesCategoryNode;
29
- (function (ResourcePropertiesCategoryNode) {
30
- function is(node) {
31
- return browser_1.ExpandableTreeNode.is(node) && browser_1.SelectableTreeNode.is(node) && 'categoryId' in node;
32
- }
33
- ResourcePropertiesCategoryNode.is = is;
34
- })(ResourcePropertiesCategoryNode = exports.ResourcePropertiesCategoryNode || (exports.ResourcePropertiesCategoryNode = {}));
35
- var ResourcePropertiesItemNode;
36
- (function (ResourcePropertiesItemNode) {
37
- function is(node) {
38
- return !!node && browser_1.SelectableTreeNode.is(node) && 'property' in node;
39
- }
40
- ResourcePropertiesItemNode.is = is;
41
- })(ResourcePropertiesItemNode = exports.ResourcePropertiesItemNode || (exports.ResourcePropertiesItemNode = {}));
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2020 EclipseSource 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.ResourcePropertiesItemNode = exports.ResourcePropertiesCategoryNode = exports.ResourcePropertiesRoot = exports.ROOT_ID = void 0;
19
+ const browser_1 = require("@theia/core/lib/browser");
20
+ exports.ROOT_ID = 'ResourcePropertiesTree';
21
+ var ResourcePropertiesRoot;
22
+ (function (ResourcePropertiesRoot) {
23
+ function is(node) {
24
+ return browser_1.CompositeTreeNode.is(node) && node.id === exports.ROOT_ID;
25
+ }
26
+ ResourcePropertiesRoot.is = is;
27
+ })(ResourcePropertiesRoot = exports.ResourcePropertiesRoot || (exports.ResourcePropertiesRoot = {}));
28
+ var ResourcePropertiesCategoryNode;
29
+ (function (ResourcePropertiesCategoryNode) {
30
+ function is(node) {
31
+ return browser_1.ExpandableTreeNode.is(node) && browser_1.SelectableTreeNode.is(node) && 'categoryId' in node;
32
+ }
33
+ ResourcePropertiesCategoryNode.is = is;
34
+ })(ResourcePropertiesCategoryNode = exports.ResourcePropertiesCategoryNode || (exports.ResourcePropertiesCategoryNode = {}));
35
+ var ResourcePropertiesItemNode;
36
+ (function (ResourcePropertiesItemNode) {
37
+ function is(node) {
38
+ return !!node && browser_1.SelectableTreeNode.is(node) && 'property' in node;
39
+ }
40
+ ResourcePropertiesItemNode.is = is;
41
+ })(ResourcePropertiesItemNode = exports.ResourcePropertiesItemNode || (exports.ResourcePropertiesItemNode = {}));
42
42
  //# sourceMappingURL=resource-property-view-tree-items.js.map
@@ -1,41 +1,41 @@
1
- /// <reference types="react" />
2
- import { ContextMenuRenderer, NodeProps, TreeModel, TreeNode, TreeProps, TreeWidget } from '@theia/core/lib/browser';
3
- import { FileStat } from '@theia/filesystem/lib/common/files';
4
- import * as React from '@theia/core/shared/react';
5
- import { PropertyDataService } from '../property-data-service';
6
- import { PropertyViewContentWidget } from '../property-view-content-widget';
7
- import { ResourcePropertiesCategoryNode, ResourcePropertiesItemNode } from './resource-property-view-tree-items';
8
- /**
9
- * This widget fetches the property data for {@link FileSelection}s and selections of {@link Navigatable}s
10
- * and renders that property data as a {@link TreeWidget}.
11
- * This widget is provided by the registered `ResourcePropertyViewWidgetProvider`.
12
- */
13
- export declare class ResourcePropertyViewTreeWidget extends TreeWidget implements PropertyViewContentWidget {
14
- static readonly ID = "resource-properties-tree-widget";
15
- static readonly LABEL = "Resource Properties Tree";
16
- protected propertiesTree: Map<string, ResourcePropertiesCategoryNode>;
17
- protected currentSelection: Object | undefined;
18
- constructor(props: TreeProps, model: TreeModel, contextMenuRenderer: ContextMenuRenderer);
19
- protected init(): void;
20
- protected updateNeeded(selection: Object | undefined): boolean;
21
- updatePropertyViewContent(propertyDataService?: PropertyDataService, selection?: Object | undefined): void;
22
- protected fillPropertiesTree(fileStatObject?: FileStat): void;
23
- protected getLocationString(fileStat: FileStat): string;
24
- protected getFileName(fileStat: FileStat): string;
25
- protected getFilePath(fileStat: FileStat): string;
26
- protected getLastModificationString(fileStat: FileStat): string;
27
- protected getCreationTimeString(fileStat: FileStat): string;
28
- protected getSizeString(fileStat: FileStat): string;
29
- protected createCategoryNode(categoryId: string, name: string): ResourcePropertiesCategoryNode;
30
- protected createResultLineNode(id: string, name: string, property: boolean | string | undefined, parent: ResourcePropertiesCategoryNode): ResourcePropertiesItemNode;
31
- /**
32
- * Rendering
33
- */
34
- protected refreshModelChildren(): Promise<void>;
35
- protected renderCaption(node: TreeNode, props: NodeProps): React.ReactNode;
36
- protected renderExpandableNode(node: ResourcePropertiesCategoryNode): React.ReactNode;
37
- protected renderItemNode(node: ResourcePropertiesItemNode): React.ReactNode;
38
- protected createNodeAttributes(node: TreeNode, props: NodeProps): React.Attributes & React.HTMLAttributes<HTMLElement>;
39
- protected getNodeTooltip(node: TreeNode): string | undefined;
40
- }
1
+ /// <reference types="react" />
2
+ import { ContextMenuRenderer, NodeProps, TreeModel, TreeNode, TreeProps, TreeWidget } from '@theia/core/lib/browser';
3
+ import { FileStat } from '@theia/filesystem/lib/common/files';
4
+ import * as React from '@theia/core/shared/react';
5
+ import { PropertyDataService } from '../property-data-service';
6
+ import { PropertyViewContentWidget } from '../property-view-content-widget';
7
+ import { ResourcePropertiesCategoryNode, ResourcePropertiesItemNode } from './resource-property-view-tree-items';
8
+ /**
9
+ * This widget fetches the property data for {@link FileSelection}s and selections of {@link Navigatable}s
10
+ * and renders that property data as a {@link TreeWidget}.
11
+ * This widget is provided by the registered `ResourcePropertyViewWidgetProvider`.
12
+ */
13
+ export declare class ResourcePropertyViewTreeWidget extends TreeWidget implements PropertyViewContentWidget {
14
+ static readonly ID = "resource-properties-tree-widget";
15
+ static readonly LABEL = "Resource Properties Tree";
16
+ protected propertiesTree: Map<string, ResourcePropertiesCategoryNode>;
17
+ protected currentSelection: Object | undefined;
18
+ constructor(props: TreeProps, model: TreeModel, contextMenuRenderer: ContextMenuRenderer);
19
+ protected init(): void;
20
+ protected updateNeeded(selection: Object | undefined): boolean;
21
+ updatePropertyViewContent(propertyDataService?: PropertyDataService, selection?: Object | undefined): void;
22
+ protected fillPropertiesTree(fileStatObject?: FileStat): void;
23
+ protected getLocationString(fileStat: FileStat): string;
24
+ protected getFileName(fileStat: FileStat): string;
25
+ protected getFilePath(fileStat: FileStat): string;
26
+ protected getLastModificationString(fileStat: FileStat): string;
27
+ protected getCreationTimeString(fileStat: FileStat): string;
28
+ protected getSizeString(fileStat: FileStat): string;
29
+ protected createCategoryNode(categoryId: string, name: string): ResourcePropertiesCategoryNode;
30
+ protected createResultLineNode(id: string, name: string, property: boolean | string | undefined, parent: ResourcePropertiesCategoryNode): ResourcePropertiesItemNode;
31
+ /**
32
+ * Rendering
33
+ */
34
+ protected refreshModelChildren(): Promise<void>;
35
+ protected renderCaption(node: TreeNode, props: NodeProps): React.ReactNode;
36
+ protected renderExpandableNode(node: ResourcePropertiesCategoryNode): React.ReactNode;
37
+ protected renderItemNode(node: ResourcePropertiesItemNode): React.ReactNode;
38
+ protected createNodeAttributes(node: TreeNode, props: NodeProps): React.Attributes & React.HTMLAttributes<HTMLElement>;
39
+ protected getNodeTooltip(node: TreeNode): string | undefined;
40
+ }
41
41
  //# sourceMappingURL=resource-property-view-tree-widget.d.ts.map