1 | "use strict";
|
2 | var __extends = (this && this.__extends) || (function () {
|
3 | var extendStatics = function (d, b) {
|
4 | extendStatics = Object.setPrototypeOf ||
|
5 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
7 | return extendStatics(d, b);
|
8 | }
|
9 | return function (d, b) {
|
10 | extendStatics(d, b);
|
11 | function __() { this.constructor = d; }
|
12 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13 | };
|
14 | })();
|
15 | var __assign = (this && this.__assign) || function () {
|
16 | __assign = Object.assign || function(t) {
|
17 | for (var s, i = 1, n = arguments.length; i < n; i++) {
|
18 | s = arguments[i];
|
19 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
20 | t[p] = s[p];
|
21 | }
|
22 | return t;
|
23 | };
|
24 | return __assign.apply(this, arguments);
|
25 | };
|
26 | var __importStar = (this && this.__importStar) || function (mod) {
|
27 | if (mod && mod.__esModule) return mod;
|
28 | var result = {};
|
29 | if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
30 | result["default"] = mod;
|
31 | return result;
|
32 | };
|
33 | var __importDefault = (this && this.__importDefault) || function (mod) {
|
34 | return (mod && mod.__esModule) ? mod : { "default": mod };
|
35 | };
|
36 | Object.defineProperty(exports, "__esModule", { value: true });
|
37 | var React = __importStar(require("react"));
|
38 | var projected_layer_1 = __importDefault(require("./projected-layer"));
|
39 | var classname_1 = require("./util/classname");
|
40 | exports.defaultClassName = ['mapboxgl-popup'];
|
41 | var Popup = (function (_super) {
|
42 | __extends(Popup, _super);
|
43 | function Popup() {
|
44 | return _super !== null && _super.apply(this, arguments) || this;
|
45 | }
|
46 | Popup.prototype.render = function () {
|
47 | var _a = this.props, children = _a.children, className = _a.className;
|
48 | var props = __assign({}, this.props, { children: undefined });
|
49 | var childrenClassName = classname_1.getClassName(exports.defaultClassName, className);
|
50 | return (React.createElement(projected_layer_1.default, __assign({}, props, { type: "popup", className: childrenClassName }),
|
51 | React.createElement("div", { className: "mapboxgl-popup-tip" }),
|
52 | React.createElement("div", { className: "mapboxgl-popup-content" }, children)));
|
53 | };
|
54 | return Popup;
|
55 | }(React.Component));
|
56 | exports.default = Popup;
|
57 |
|
\ | No newline at end of file |