@malloydata/render 0.0.1
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.
- package/README.md +7 -0
- package/dist/data_styles.d.ts +181 -0
- package/dist/data_styles.js +15 -0
- package/dist/drill.d.ts +10 -0
- package/dist/drill.js +103 -0
- package/dist/html/bar_chart.d.ts +7 -0
- package/dist/html/bar_chart.js +48 -0
- package/dist/html/boolean.d.ts +5 -0
- package/dist/html/boolean.js +26 -0
- package/dist/html/bytes.d.ts +5 -0
- package/dist/html/bytes.js +26 -0
- package/dist/html/cartesian_chart.d.ts +7 -0
- package/dist/html/cartesian_chart.js +88 -0
- package/dist/html/chart.d.ts +21 -0
- package/dist/html/chart.js +105 -0
- package/dist/html/container.d.ts +21 -0
- package/dist/html/container.js +43 -0
- package/dist/html/currency.d.ts +5 -0
- package/dist/html/currency.js +32 -0
- package/dist/html/dashboard.d.ts +7 -0
- package/dist/html/dashboard.js +224 -0
- package/dist/html/date.d.ts +7 -0
- package/dist/html/date.js +38 -0
- package/dist/html/html_view.d.ts +23 -0
- package/dist/html/html_view.js +217 -0
- package/dist/html/image.d.ts +7 -0
- package/dist/html/image.js +34 -0
- package/dist/html/index.d.ts +1 -0
- package/dist/html/index.js +18 -0
- package/dist/html/json.d.ts +7 -0
- package/dist/html/json.js +31 -0
- package/dist/html/line_chart.d.ts +7 -0
- package/dist/html/line_chart.js +51 -0
- package/dist/html/link.d.ts +7 -0
- package/dist/html/link.js +35 -0
- package/dist/html/list.d.ts +9 -0
- package/dist/html/list.js +63 -0
- package/dist/html/list_detail.d.ts +5 -0
- package/dist/html/list_detail.js +23 -0
- package/dist/html/number.d.ts +6 -0
- package/dist/html/number.js +30 -0
- package/dist/html/percent.d.ts +5 -0
- package/dist/html/percent.js +26 -0
- package/dist/html/point_map.d.ts +8 -0
- package/dist/html/point_map.js +147 -0
- package/dist/html/scatter_chart.d.ts +7 -0
- package/dist/html/scatter_chart.js +51 -0
- package/dist/html/segment_map.d.ts +8 -0
- package/dist/html/segment_map.js +128 -0
- package/dist/html/shape_map.d.ts +10 -0
- package/dist/html/shape_map.js +171 -0
- package/dist/html/state_codes.d.ts +3 -0
- package/dist/html/state_codes.js +127 -0
- package/dist/html/table.d.ts +7 -0
- package/dist/html/table.js +111 -0
- package/dist/html/text.d.ts +8 -0
- package/dist/html/text.js +35 -0
- package/dist/html/utils.d.ts +18 -0
- package/dist/html/utils.js +175 -0
- package/dist/html/vega_spec.d.ts +18 -0
- package/dist/html/vega_spec.js +499 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +19 -0
- package/dist/renderer.d.ts +21 -0
- package/dist/renderer.js +23 -0
- package/package.json +17 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* This program is free software; you can redistribute it and/or
|
|
6
|
+
* modify it under the terms of the GNU General Public License
|
|
7
|
+
* version 2 as published by the Free Software Foundation.
|
|
8
|
+
*
|
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
* GNU General Public License for more details.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.JSONView = exports.HTMLView = void 0;
|
|
16
|
+
var html_view_1 = require("./html/html_view");
|
|
17
|
+
Object.defineProperty(exports, "HTMLView", { enumerable: true, get: function () { return html_view_1.HTMLView; } });
|
|
18
|
+
Object.defineProperty(exports, "JSONView", { enumerable: true, get: function () { return html_view_1.JSONView; } });
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DataColumn } from "@malloydata/malloy";
|
|
2
|
+
import { DrillFunction } from "./drill";
|
|
3
|
+
export declare type ChildRenderers = {
|
|
4
|
+
[fieldName: string]: Renderer;
|
|
5
|
+
};
|
|
6
|
+
export interface Renderer {
|
|
7
|
+
render(value: DataColumn): Promise<HTMLElement>;
|
|
8
|
+
}
|
|
9
|
+
export declare abstract class RenderTree implements Renderer {
|
|
10
|
+
protected readonly document: Document;
|
|
11
|
+
protected readonly options: {
|
|
12
|
+
isDrillingEnabled?: boolean;
|
|
13
|
+
onDrill?: DrillFunction;
|
|
14
|
+
};
|
|
15
|
+
constructor(document: Document, options: {
|
|
16
|
+
isDrillingEnabled?: boolean;
|
|
17
|
+
onDrill?: DrillFunction;
|
|
18
|
+
});
|
|
19
|
+
protected abstract get childRenderers(): ChildRenderers;
|
|
20
|
+
abstract render(value: DataColumn): Promise<HTMLElement>;
|
|
21
|
+
}
|
package/dist/renderer.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* This program is free software; you can redistribute it and/or
|
|
6
|
+
* modify it under the terms of the GNU General Public License
|
|
7
|
+
* version 2 as published by the Free Software Foundation.
|
|
8
|
+
*
|
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
* GNU General Public License for more details.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.RenderTree = void 0;
|
|
16
|
+
class RenderTree {
|
|
17
|
+
constructor(document, options) {
|
|
18
|
+
this.document = document;
|
|
19
|
+
this.options = options;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.RenderTree = RenderTree;
|
|
23
|
+
//# sourceMappingURL=renderer.js.map
|
package/package.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@malloydata/render",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"license": "GPL-2.0",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"lint": "eslint '**/*.ts{,x}'",
|
|
9
|
+
"lint-fix": "eslint '**/*.ts{,x}' --fix",
|
|
10
|
+
"test": "jest --config=../../jest.config.js",
|
|
11
|
+
"build": "tsc --build"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@malloydata/malloy": "^0.0.1",
|
|
15
|
+
"us-atlas": "^3.0.0"
|
|
16
|
+
}
|
|
17
|
+
}
|