@grafana/plugin-ui 0.1.16 → 0.2.0

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.
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DataSourceDescription = exports.InlineLabel = void 0;
3
+ exports.InlineLabel = void 0;
4
4
  var InlineLabel_1 = require("./InlineLabel");
5
5
  Object.defineProperty(exports, "InlineLabel", { enumerable: true, get: function () { return InlineLabel_1.InlineLabel; } });
6
- var DataSourceDescription_1 = require("./DataSourceDescription");
7
- Object.defineProperty(exports, "DataSourceDescription", { enumerable: true, get: function () { return DataSourceDescription_1.DataSourceDescription; } });
8
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ConfigEditor/index.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ConfigEditor/index.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAAnC,0GAAA,WAAW,OAAA"}
@@ -1,2 +1 @@
1
1
  export { InlineLabel } from "./InlineLabel";
2
- export { DataSourceDescription } from "./DataSourceDescription";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/plugin-ui",
3
- "version": "0.1.16",
3
+ "version": "0.2.0",
4
4
  "repository": "git@github.com:grafana/plugin-ui.git",
5
5
  "author": "Grafana Labs",
6
6
  "main": "dist/index.js",
@@ -16,7 +16,6 @@
16
16
  "@grafana/data": "^8.4.7",
17
17
  "@grafana/experimental": "^0.0.2-canary.39",
18
18
  "@grafana/runtime": "^8.4.7",
19
- "@grafana/toolkit": "^8.4.7",
20
19
  "@grafana/tsconfig": "1.2.0-rc1",
21
20
  "@grafana/ui": "^8.4.7",
22
21
  "@types/chance": "^1.1.0",
@@ -24,6 +23,7 @@
24
23
  "@types/react-calendar": "^3.1.2",
25
24
  "chance": "^1.1.7",
26
25
  "copyfiles": "^2.4.1",
26
+ "lodash": "^4.17.21",
27
27
  "memoize-one": "^5.1.1",
28
28
  "rc-cascader": "1.0.1",
29
29
  "react-awesome-query-builder": "^5.3.1",
@@ -49,7 +49,9 @@
49
49
  "@testing-library/jest-dom": "^5.11.6",
50
50
  "@testing-library/react": "^11.2.2",
51
51
  "@testing-library/user-event": "^12.8.3",
52
+ "@types/lodash": "^4.14.194",
52
53
  "@types/react": "17.0.38",
54
+ "@types/semver": "^7.5.0",
53
55
  "@types/testing-library__jest-dom": "^5.9.5",
54
56
  "babel-loader": "^8.2.2",
55
57
  "jest-fetch-mock": "^3.0.3",
@@ -1,42 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DataSourceDescription = void 0;
4
- const tslib_1 = require("tslib");
5
- const react_1 = tslib_1.__importDefault(require("react"));
6
- const css_1 = require("@emotion/css");
7
- const ui_1 = require("@grafana/ui");
8
- const DataSourceDescription = ({ dataSourceName, docsLink, hasRequiredFields = true, }) => {
9
- const theme = (0, ui_1.useTheme2)();
10
- const styles = {
11
- text: (0, css_1.css) `
12
- font-size: 14px;
13
- a {
14
- color: ${theme.colors.primary.text};
15
- text-decoration: underline;
16
- :hover {
17
- text-decoration: none;
18
- }
19
- }
20
- `,
21
- asterisk: (0, css_1.css) `
22
- color: ${theme.colors.error.main};
23
- `,
24
- };
25
- return (react_1.default.createElement(react_1.default.Fragment, null,
26
- react_1.default.createElement("p", { className: styles.text },
27
- "Before you can use the ",
28
- dataSourceName,
29
- " data source, you must configure it below or in the config file.",
30
- react_1.default.createElement("br", null),
31
- "For detailed instructions,",
32
- " ",
33
- react_1.default.createElement("a", { href: docsLink, target: "_blank", rel: "noreferrer" }, "view the documentation"),
34
- "."),
35
- hasRequiredFields && (react_1.default.createElement("p", { className: styles.text },
36
- react_1.default.createElement("em", null,
37
- "Fields marked in ",
38
- react_1.default.createElement("span", { className: styles.asterisk }, "*"),
39
- " are required")))));
40
- };
41
- exports.DataSourceDescription = DataSourceDescription;
42
- //# sourceMappingURL=DataSourceDescription.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataSourceDescription.js","sourceRoot":"","sources":["../../../src/components/ConfigEditor/DataSourceDescription.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,sCAAmC;AACnC,oCAAwC;AAQjC,MAAM,qBAAqB,GAAoB,CAAC,EACrD,cAAc,EACd,QAAQ,EACR,iBAAiB,GAAG,IAAI,GACzB,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,IAAA,cAAS,GAAE,CAAC;IAC1B,MAAM,MAAM,GAAG;QACb,IAAI,EAAE,IAAA,SAAG,EAAA;;;iBAGI,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI;;;;;;KAMrC;QACD,QAAQ,EAAE,IAAA,SAAG,EAAA;eACF,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI;KACjC;KACF,CAAC;IAEF,OAAO,CACL;QACE,qCAAG,SAAS,EAAE,MAAM,CAAC,IAAI;;YACC,cAAc;;YAEtC,yCAAM;;YACqB,GAAG;YAC9B,qCAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,YAAY,6BAE/C;gBAEF;QACH,iBAAiB,IAAI,CACpB,qCAAG,SAAS,EAAE,MAAM,CAAC,IAAI;YACvB;;gBACmB,wCAAM,SAAS,EAAE,MAAM,CAAC,QAAQ,QAAU;gCAExD,CACH,CACL,CACA,CACJ,CAAC;AACJ,CAAC,CAAC;AA5CW,QAAA,qBAAqB,yBA4ChC"}
@@ -1,8 +0,0 @@
1
- import React from "react";
2
- declare type Props = {
3
- dataSourceName: string;
4
- docsLink: string;
5
- hasRequiredFields?: boolean;
6
- };
7
- export declare const DataSourceDescription: React.FC<Props>;
8
- export {};