From 42d94ba929187e4b7e487e4d47f9b01b322ecfd3 Mon Sep 17 00:00:00 2001 From: E25EUK <53490657+E25EUK@users.noreply.github.com> Date: Mon, 18 Mar 2024 07:55:19 +0000 Subject: [PATCH 1/2] Initial commit From eb7b2286bf84073ffc617780b18b0db292c8a9d5 Mon Sep 17 00:00:00 2001 From: E25EUK <53490657+E25EUK@users.noreply.github.com> Date: Mon, 18 Mar 2024 07:55:20 +0000 Subject: [PATCH 2/2] Pending changes exported from your codespace --- docs/sheetsee-core.html | 16 ++--- docs/sheetsee-maps.html | 4 +- docs/sheetsee-tables.html | 4 +- package-lock.json | 137 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 149 insertions(+), 12 deletions(-) create mode 100644 package-lock.json diff --git a/docs/sheetsee-core.html b/docs/sheetsee-core.html index e368e0e8..bcbbd7b6 100644 --- a/docs/sheetsee-core.html +++ b/docs/sheetsee-core.html @@ -21,7 +21,7 @@
Sheetsee pairs with Tabletop.js which will fetch the data from your spreadsheet and return it as an array of objects. You'll use these methods from Sheetsee after you have that data.
Here are the functions you can use!
-Sheetsee.getKeywordCount(data, keyword)
Sheetsee.getKeywordCount(data, keyword)
data
array of objectskeyword
stringSheetsee.getKeywordCount(
getGroupCount(data, 'cat')
// returns a number
-Sheetsee.getKeyword(data, keyword)
+Sheetsee.getKeyword(data, keyword)
data
array of objects
keyword
string
@@ -41,7 +41,7 @@ Sheetsee.getKeyword(data, keyw
getKeyword(data, 'cat')
// returns array of objects
-Sheetsee.getColumnTotal(data, column)
+Sheetsee.getColumnTotal(data, column)
data
array of objects
column
string
@@ -52,7 +52,7 @@ Sheetsee.getColumnTotal(dat
getColumnTotal(data, 'cuddlability')
// returns number
-Sheetsee.getColumnAverage(data, column)
+Sheetsee.getColumnAverage(data, column)
data
array of objects
column
string
@@ -62,7 +62,7 @@ Sheetsee.getColumnAverage
getColumnAverage(data, 'cuddlability')
// returns number
-Sheetsee.getMin(data, column)
+Sheetsee.getMin(data, column)
data
array of objects
column
string
@@ -72,7 +72,7 @@ Sheetsee.getMin(data, column)
getMin(data, 'cuddlability')
// returns array
-Sheetsee.getMax(data, column)
+Sheetsee.getMax(data, column)
data
array of objects
column
string
@@ -82,7 +82,7 @@ Sheetsee.getMax(data, column)
getMin(data, 'cuddlability')
// returns array of objects
-Sheetsee.getMatches(data, filter, column)
+Sheetsee.getMatches(data, filter, column)
data
array of objects
filter
string
@@ -94,7 +94,7 @@ Sheetsee.getMatches(data
// returns array of objects
// [{'name': 'coco', 'kind': 'dog'...}, {'name': 'wolfgang', 'kind': 'dog'...},{'name': 'cooc', 'kind': 'dog'...} ]
-Sheetsee.getOccurance(data, column)
+Sheetsee.getOccurance(data, column)
data
array of objects
column
string
diff --git a/docs/sheetsee-maps.html b/docs/sheetsee-maps.html
index a8fe451d..920ae971 100644
--- a/docs/sheetsee-maps.html
+++ b/docs/sheetsee-maps.html
@@ -40,7 +40,7 @@ To Use
You'll create a little bit of HTML and then some JavaScript in your HTML to use this. You can customize marker color, popup content and enable/disable clustering in your map.
Methods
Here are the functions you can use!
-Sheetsee.createGeoJSON(data, optionsJSON)
+Sheetsee.createGeoJSON(data, optionsJSON)
- data JSON array of data
- optionsJSON array of strings, spreadsheet column title
@@ -52,7 +52,7 @@ Sheetsee.createGeoJSON(
var geoJSON = Sheetsee.createGeoJSON(data, optionsJSON)
It will return an array in the special geoJSON format that map making things love.
-Sheetsee.loadMap(options)
+Sheetsee.loadMap(options)
This method will generate a map for you on the page (it also generates the geoJSON for the map).
- options object required
diff --git a/docs/sheetsee-tables.html b/docs/sheetsee-tables.html
index 7ee2c6ba..137d4cd6 100644
--- a/docs/sheetsee-tables.html
+++ b/docs/sheetsee-tables.html
@@ -38,7 +38,7 @@ Your Script
You'll want to set your table options and pass them into Sheetsee.makeTable()
. If you want to add a search/filter, pass your options into Sheetsee.initiateTableFilter()
.
Methods
Functions for you to use! There are just two, woo!
-Sheetsee.makeTable(tableOptions)
+Sheetsee.makeTable(tableOptions)
You pass in an object containing:
data
array your data from Tabletop.js required
@@ -70,7 +70,7 @@ Pagination
.pagination-pre {}
.no-pag {}
-Sheetsee.initiateTableFilter(tableOptions)
+Sheetsee.initiateTableFilter(tableOptions)
If you want to have an input to allow users to search/filter the data in the table, you'll add an input to your HTML. Give it an id and if you want add placeholder text. You'll also need to add a 'clear' button using the .clear
CSS class.
<input id="tableFilter" type="text" placeholder="filter by.."></input>
<a href="#" class=".clear">Clear</a>
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 00000000..36922e69
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,137 @@
+{
+ "name": "sheetsee.js",
+ "version": "0.0.0",
+ "lockfileVersion": 2,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "sheetsee.js",
+ "version": "0.0.0",
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "glob": "~3.2.8",
+ "marked": "~0.3.1",
+ "mustache": "^2.3.0",
+ "path": "~0.4.9"
+ },
+ "devDependencies": {}
+ },
+ "node_modules/glob": {
+ "version": "3.2.11",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz",
+ "integrity": "sha512-hVb0zwEZwC1FXSKRPFTeOtN7AArJcJlI6ULGLtrstaswKNlrTJqAA+1lYlSUop4vjA423xlBzqfVS3iWGlqJ+g==",
+ "dependencies": {
+ "inherits": "2",
+ "minimatch": "0.3"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+ },
+ "node_modules/lru-cache": {
+ "version": "2.7.3",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz",
+ "integrity": "sha512-WpibWJ60c3AgAz8a2iYErDrcT2C7OmKnsWhIcHOjkUHFjkXncJhtLxNSqUmxRxRunpb5I8Vprd7aNSd2NtksJQ=="
+ },
+ "node_modules/marked": {
+ "version": "0.3.19",
+ "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.19.tgz",
+ "integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==",
+ "bin": {
+ "marked": "bin/marked"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/minimatch": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz",
+ "integrity": "sha512-WFX1jI1AaxNTZVOHLBVazwTWKaQjoykSzCBNXB72vDTCzopQGtyP91tKdFK5cv1+qMwPyiTu1HqUriqplI8pcA==",
+ "deprecated": "Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue",
+ "dependencies": {
+ "lru-cache": "2",
+ "sigmund": "~1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/mustache": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/mustache/-/mustache-2.3.2.tgz",
+ "integrity": "sha512-KpMNwdQsYz3O/SBS1qJ/o3sqUJ5wSb8gb0pul8CO0S56b9Y2ALm8zCfsjPXsqGFfoNBkDwZuZIAjhsZI03gYVQ==",
+ "bin": {
+ "mustache": "bin/mustache"
+ },
+ "engines": {
+ "npm": ">=1.4.0"
+ }
+ },
+ "node_modules/path": {
+ "version": "0.4.10",
+ "resolved": "https://registry.npmjs.org/path/-/path-0.4.10.tgz",
+ "integrity": "sha512-OXGpluyRVdUQP5fOGYMsPQo9eba09SmxaFMpM+h61gp1Mz55vhBVJt/Q3cIxAUQ17sIJn7KSwZ2cbmwRRqS1Rw=="
+ },
+ "node_modules/sigmund": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
+ "integrity": "sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g=="
+ }
+ },
+ "dependencies": {
+ "glob": {
+ "version": "3.2.11",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz",
+ "integrity": "sha512-hVb0zwEZwC1FXSKRPFTeOtN7AArJcJlI6ULGLtrstaswKNlrTJqAA+1lYlSUop4vjA423xlBzqfVS3iWGlqJ+g==",
+ "requires": {
+ "inherits": "2",
+ "minimatch": "0.3"
+ }
+ },
+ "inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+ },
+ "lru-cache": {
+ "version": "2.7.3",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz",
+ "integrity": "sha512-WpibWJ60c3AgAz8a2iYErDrcT2C7OmKnsWhIcHOjkUHFjkXncJhtLxNSqUmxRxRunpb5I8Vprd7aNSd2NtksJQ=="
+ },
+ "marked": {
+ "version": "0.3.19",
+ "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.19.tgz",
+ "integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg=="
+ },
+ "minimatch": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz",
+ "integrity": "sha512-WFX1jI1AaxNTZVOHLBVazwTWKaQjoykSzCBNXB72vDTCzopQGtyP91tKdFK5cv1+qMwPyiTu1HqUriqplI8pcA==",
+ "requires": {
+ "lru-cache": "2",
+ "sigmund": "~1.0.0"
+ }
+ },
+ "mustache": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/mustache/-/mustache-2.3.2.tgz",
+ "integrity": "sha512-KpMNwdQsYz3O/SBS1qJ/o3sqUJ5wSb8gb0pul8CO0S56b9Y2ALm8zCfsjPXsqGFfoNBkDwZuZIAjhsZI03gYVQ=="
+ },
+ "path": {
+ "version": "0.4.10",
+ "resolved": "https://registry.npmjs.org/path/-/path-0.4.10.tgz",
+ "integrity": "sha512-OXGpluyRVdUQP5fOGYMsPQo9eba09SmxaFMpM+h61gp1Mz55vhBVJt/Q3cIxAUQ17sIJn7KSwZ2cbmwRRqS1Rw=="
+ },
+ "sigmund": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
+ "integrity": "sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g=="
+ }
+ }
+}