1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
18 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
19 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
20 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
21 | return c > 3 && r && Object.defineProperty(target, key, r), r;
|
22 | };
|
23 | Object.defineProperty(exports, "__esModule", { value: true });
|
24 | exports.DefaultBreadcrumbRenderer = exports.BreadcrumbRenderer = void 0;
|
25 | const React = require("react");
|
26 | const inversify_1 = require("inversify");
|
27 | const breadcrumbs_constants_1 = require("./breadcrumbs-constants");
|
28 | exports.BreadcrumbRenderer = Symbol('BreadcrumbRenderer');
|
29 | let DefaultBreadcrumbRenderer = class DefaultBreadcrumbRenderer {
|
30 | render(breadcrumb, onMouseDown) {
|
31 | return React.createElement("li", { key: breadcrumb.id, title: breadcrumb.longLabel, className: breadcrumbs_constants_1.Styles.BREADCRUMB_ITEM + (!onMouseDown ? '' : ' ' + breadcrumbs_constants_1.Styles.BREADCRUMB_ITEM_HAS_POPUP), onMouseDown: event => onMouseDown && onMouseDown(breadcrumb, event), tabIndex: 0, "data-breadcrumb-id": breadcrumb.id },
|
32 | breadcrumb.iconClass && React.createElement("span", { className: breadcrumb.iconClass }),
|
33 | " ",
|
34 | React.createElement("span", null,
|
35 | " ",
|
36 | breadcrumb.label));
|
37 | }
|
38 | };
|
39 | DefaultBreadcrumbRenderer = __decorate([
|
40 | (0, inversify_1.injectable)()
|
41 | ], DefaultBreadcrumbRenderer);
|
42 | exports.DefaultBreadcrumbRenderer = DefaultBreadcrumbRenderer;
|
43 |
|
\ | No newline at end of file |