@matdata/yasr 4.7.4 → 4.8.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.
- package/build/ts/src/bindingsToCsv.js +14 -0
- package/build/ts/src/bindingsToCsv.js.map +1 -0
- package/build/ts/src/defaults.js +28 -0
- package/build/ts/src/defaults.js.map +1 -0
- package/build/ts/src/helpers/addCSS.js +8 -0
- package/build/ts/src/helpers/addCSS.js.map +1 -0
- package/build/ts/src/helpers/addScript.js +13 -0
- package/build/ts/src/helpers/addScript.js.map +1 -0
- package/build/ts/src/helpers/index.js +4 -0
- package/build/ts/src/helpers/index.js.map +1 -0
- package/build/ts/src/helpers/sanitize.js +9 -0
- package/build/ts/src/helpers/sanitize.js.map +1 -0
- package/build/ts/src/imgs.js +5 -0
- package/build/ts/src/imgs.js.map +1 -0
- package/build/ts/src/index.d.ts +3 -2
- package/build/ts/src/index.js +581 -0
- package/build/ts/src/index.js.map +1 -0
- package/build/ts/src/parsers/csv.js +26 -0
- package/build/ts/src/parsers/csv.js.map +1 -0
- package/build/ts/src/parsers/index.js +267 -0
- package/build/ts/src/parsers/index.js.map +1 -0
- package/build/ts/src/parsers/json.js +21 -0
- package/build/ts/src/parsers/json.js.map +1 -0
- package/build/ts/src/parsers/tsv.js +40 -0
- package/build/ts/src/parsers/tsv.js.map +1 -0
- package/build/ts/src/parsers/turtleFamily.js +58 -0
- package/build/ts/src/parsers/turtleFamily.js.map +1 -0
- package/build/ts/src/parsers/xml.js +77 -0
- package/build/ts/src/parsers/xml.js.map +1 -0
- package/build/ts/src/plugins/boolean/index.d.ts +1 -0
- package/build/ts/src/plugins/boolean/index.js +31 -0
- package/build/ts/src/plugins/boolean/index.js.map +1 -0
- package/build/ts/src/plugins/error/index.d.ts +1 -0
- package/build/ts/src/plugins/error/index.js +123 -0
- package/build/ts/src/plugins/error/index.js.map +1 -0
- package/build/ts/src/plugins/index.js +2 -0
- package/build/ts/src/plugins/index.js.map +1 -0
- package/build/ts/src/plugins/response/index.d.ts +9 -0
- package/build/ts/src/plugins/response/index.js +139 -0
- package/build/ts/src/plugins/response/index.js.map +1 -0
- package/build/ts/src/plugins/table/index.d.ts +3 -0
- package/build/ts/src/plugins/table/index.js +350 -0
- package/build/ts/src/plugins/table/index.js.map +1 -0
- package/build/yasr.min.css +2 -2
- package/build/yasr.min.css.map +7 -1
- package/build/yasr.min.js +103 -3
- package/build/yasr.min.js.map +7 -1
- package/package.json +1 -1
- package/src/index.ts +3 -3
- package/src/jquery/extendJquery.js +1 -1
- package/src/jquery/tableToCsv.js +2 -2
- package/src/plugins/boolean/index.ts +1 -1
- package/src/plugins/error/index.ts +1 -1
- package/src/plugins/response/index.ts +10 -10
- package/src/plugins/table/index.ts +4 -4
- package/build/yasr.html +0 -32
- package/build/yasr.min.js.LICENSE.txt +0 -34
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from "events";
|
|
2
2
|
import { merge, filter, mapValues, uniqueId } from "lodash-es";
|
|
3
3
|
import getDefaults from "./defaults";
|
|
4
|
-
import { Plugin } from "./plugins";
|
|
4
|
+
import type { Plugin } from "./plugins";
|
|
5
5
|
import {
|
|
6
6
|
Storage as YStorage,
|
|
7
7
|
drawFontAwesomeIconAsSvg,
|
|
@@ -16,7 +16,7 @@ import { addScript, addCss, sanitize } from "./helpers";
|
|
|
16
16
|
import * as faDownload from "@fortawesome/free-solid-svg-icons/faDownload";
|
|
17
17
|
import * as faQuestionCircle from "@fortawesome/free-solid-svg-icons/faQuestionCircle";
|
|
18
18
|
import * as imgs from "./imgs";
|
|
19
|
-
|
|
19
|
+
import "./main.scss";
|
|
20
20
|
|
|
21
21
|
export interface PersistentConfig {
|
|
22
22
|
selectedPlugin?: string;
|
|
@@ -683,6 +683,6 @@ Yasr.registerPlugin("boolean", YasrPluginBoolean.default as any);
|
|
|
683
683
|
Yasr.registerPlugin("response", YasrPluginResponse.default as any);
|
|
684
684
|
Yasr.registerPlugin("error", YasrPluginError.default as any);
|
|
685
685
|
|
|
686
|
-
export { Plugin, DownloadInfo } from "./plugins";
|
|
686
|
+
export type { Plugin, DownloadInfo } from "./plugins";
|
|
687
687
|
|
|
688
688
|
export default Yasr;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import "./tableToCsv.js";
|
package/src/jquery/tableToCsv.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
import $ from "jquery";
|
|
3
3
|
|
|
4
4
|
$.fn.tableToCsv = function (config) {
|
|
5
5
|
var csvString = "";
|
|
@@ -9,7 +9,7 @@ $.fn.tableToCsv = function (config) {
|
|
|
9
9
|
delimiter: ",",
|
|
10
10
|
lineBreak: "\n",
|
|
11
11
|
},
|
|
12
|
-
config
|
|
12
|
+
config,
|
|
13
13
|
);
|
|
14
14
|
|
|
15
15
|
var needToQuoteString = function (value) {
|
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { Plugin } from "../";
|
|
5
5
|
import Yasr from "../../";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
import "./index.scss";
|
|
7
|
+
import CodeMirror from "codemirror";
|
|
8
|
+
import "codemirror/addon/fold/foldcode.js";
|
|
9
|
+
import "codemirror/addon/fold/foldgutter.js";
|
|
10
|
+
import "codemirror/addon/fold/xml-fold.js";
|
|
11
|
+
import "codemirror/addon/fold/brace-fold.js";
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
import "codemirror/addon/edit/matchbrackets.js";
|
|
14
|
+
import "codemirror/mode/xml/xml.js";
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
import "codemirror/mode/javascript/javascript.js";
|
|
17
|
+
import "codemirror/lib/codemirror.css";
|
|
18
18
|
import { drawSvgStringAsElement, addClass, removeClass, drawFontAwesomeIconAsSvg } from "@matdata/yasgui-utils";
|
|
19
19
|
import * as faAlignIcon from "@fortawesome/free-solid-svg-icons/faAlignLeft";
|
|
20
20
|
import { DeepReadonly } from "ts-essentials";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Make sure not to include any deps from our main index file. That way, we can easily publish the plugin as standalone build
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import "./index.scss";
|
|
5
|
+
import "datatables.net-dt/css/dataTables.dataTables.min.css";
|
|
6
|
+
import "datatables.net";
|
|
7
7
|
//@ts-ignore (jquery _does_ expose a default. In es6, it's the one we should use)
|
|
8
8
|
import $ from "jquery";
|
|
9
9
|
import Parser from "../../parsers";
|
|
@@ -17,7 +17,7 @@ import { cloneDeep } from "lodash-es";
|
|
|
17
17
|
import sanitize from "../../helpers/sanitize";
|
|
18
18
|
import type { Api, ConfigColumns, CellMetaSettings, Config } from "datatables.net";
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
import ColumnResizer from "column-resizer";
|
|
21
21
|
const DEFAULT_PAGE_SIZE = 50;
|
|
22
22
|
|
|
23
23
|
export interface PluginConfig {
|
package/build/yasr.html
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<!doctype html><html><head><meta charset="UTF-8"/><style>body {
|
|
2
|
-
font-family: "Roboto", sans-serif;
|
|
3
|
-
margin: 0px;
|
|
4
|
-
}
|
|
5
|
-
.navItem a {
|
|
6
|
-
color: #555;
|
|
7
|
-
text-decoration: none;
|
|
8
|
-
padding: 5px;
|
|
9
|
-
padding-right:15px;
|
|
10
|
-
}
|
|
11
|
-
.navItem a:hover {
|
|
12
|
-
color:#222
|
|
13
|
-
}
|
|
14
|
-
.navItem.active a {
|
|
15
|
-
color: black;
|
|
16
|
-
font-size:110%;
|
|
17
|
-
}</style><link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"/><script src="../../packages/yasgui/static/yasgui.polyfill.min.js"></script><script defer="defer" src="/yasqe.min.js"></script><script defer="defer" src="/yasr.min.js"></script><link href="/yasqe.min.css" rel="stylesheet"><link href="/yasr.min.css" rel="stylesheet"></head><body><div style="background:#eee"><nav style="display: flex"><img src="webpack/yasgui.png" style="max-height:50px;padding:5px;margin-left: 10px" alt="Yasgui Logo"><ul style="display: flex; list-style: none; align-self: center"><li class="navItem false"><a class="nav-link" href="yasgui.html">Yasgui</a></li><li class="navItem false"><a class="nav-link" href="yasqe.html">Yasqe</a></li><li class="navItem active"><a class="nav-link" href="yasr.html">Yasr</a></li></ul></nav></div><div id="yasqe"></div><div id="yasr"></div><script>window.onpageshow = function() {
|
|
18
|
-
window.yasqe = new Yasqe(document.getElementById("yasqe"), {
|
|
19
|
-
requestConfig: {
|
|
20
|
-
endpoint: "https://dbpedia.org/sparql"
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
yasqe.on("queryResponse", function(yasqe, response, duration) {
|
|
24
|
-
console.log({ response: response });
|
|
25
|
-
window.yasr.setResponse(response, duration);
|
|
26
|
-
});
|
|
27
|
-
window.yasr = new Yasr(document.getElementById("yasr"), {
|
|
28
|
-
prefixes: function() {
|
|
29
|
-
return yasqe.getPrefixesFromQuery();
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
};</script></body></html>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/* @license
|
|
2
|
-
Papa Parse
|
|
3
|
-
v5.5.3
|
|
4
|
-
https://github.com/mholt/PapaParse
|
|
5
|
-
License: MIT
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/*!
|
|
9
|
-
* The buffer module from node.js, for the browser.
|
|
10
|
-
*
|
|
11
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
12
|
-
* @license MIT
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
/*!
|
|
16
|
-
* jQuery JavaScript Library v3.7.1
|
|
17
|
-
* https://jquery.com/
|
|
18
|
-
*
|
|
19
|
-
* Copyright OpenJS Foundation and other contributors
|
|
20
|
-
* Released under the MIT license
|
|
21
|
-
* https://jquery.org/license
|
|
22
|
-
*
|
|
23
|
-
* Date: 2023-08-28T13:37Z
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */
|
|
27
|
-
|
|
28
|
-
/*! DataTables 2.3.5
|
|
29
|
-
* © SpryMedia Ltd - datatables.net/license
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
33
|
-
|
|
34
|
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|