Skip to content

Commit 944fbde

Browse files
authored
Merge pull request #51 from RTIInternational/2025-02-dep-updates
2025 02 dep updates
2 parents cdf8846 + 7e29b08 commit 944fbde

File tree

11 files changed

+6731
-3452
lines changed

11 files changed

+6731
-3452
lines changed

.eslintrc.cjs

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
with:
1212
node-version: '20.x'
1313
- run: npm ci
14-
- run: npm run lint --no-fix --no-error-on-unmatched-patt
14+
- run: npm run lint
1515

1616
- name: Configure AWS Credentials
1717
uses: aws-actions/configure-aws-credentials@v4

docs/.vitepress/config.js

Lines changed: 64 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,67 @@
11
export default {
2-
title: 'Harness-Vue-Bootstrap',
3-
description: '',
4-
themeConfig: {
5-
sidebar: [
6-
{
7-
text: 'Introduction',
8-
collapsible: true,
9-
items: [
10-
{text: 'About', link: '/introduction/'},
11-
{text: 'Usage', link: '/introduction/usage'}
12-
]
13-
},
14-
{
15-
text: 'Layouts',
16-
collapsible: true,
17-
items: [
18-
{text:'Filter Grid', link: '/components/layouts/filterGrid'},
19-
{text:'Chart Grid', link: '/components/layouts/chartGrid'},
20-
]
21-
},
22-
{
23-
text: 'Filters',
24-
collapsible: true,
25-
items: [
26-
{text: 'Input', link: '/components/filters/input'},
27-
{text: 'Select', link: '/components/filters/select'},
28-
{text: 'Checkbox Group', link: '/components/filters/checkboxGroup'},
29-
{text: 'Multi-Select Listbox', link: '/components/filters/multiselectListbox'},
30-
{text: 'Validation, Styling, Accessibility', link: '/components/filters/validationAndStyling'},
31-
]
32-
},
33-
{
34-
text: 'Charts and Tables',
35-
collapsible: true,
36-
items: [
37-
{text: 'Basic Table', link: '/components/charts-and-tables/basicTable'},
38-
{text: 'Chart with Table', link: '/components/charts-and-tables/chartWithTable'}
39-
]
40-
}
2+
title: "Harness-Vue-Bootstrap",
3+
description: "",
4+
themeConfig: {
5+
sidebar: [
6+
{
7+
text: "Introduction",
8+
collapsible: true,
9+
items: [
10+
{ text: "About", link: "/introduction/" },
11+
{ text: "Usage", link: "/introduction/usage" },
4112
],
42-
footer: {
43-
message: 'Released under the MIT License.',
44-
copyright: 'Built by <span class="vp-doc"><a href="https://www.rti.org">RTI International</a></span> Center for Data Science'
45-
},
46-
nav: [
47-
{ text: 'Guide', link: '/introduction/' },
13+
},
14+
{
15+
text: "Layouts",
16+
collapsible: true,
17+
items: [
18+
{ text: "Filter Grid", link: "/components/layouts/filterGrid" },
19+
{ text: "Chart Grid", link: "/components/layouts/chartGrid" },
4820
],
49-
socialLinks: [
50-
{ icon: 'github', link: 'https://github.com/RTIInternational/harness-vue-bootstrap' }
51-
]
52-
}
53-
}
21+
},
22+
{
23+
text: "Filters",
24+
collapsible: true,
25+
items: [
26+
{ text: "Input", link: "/components/filters/input" },
27+
{ text: "Select", link: "/components/filters/select" },
28+
{ text: "Checkbox Group", link: "/components/filters/checkboxGroup" },
29+
{
30+
text: "Multi-Select Listbox",
31+
link: "/components/filters/multiselectListbox",
32+
},
33+
{
34+
text: "Validation, Styling, Accessibility",
35+
link: "/components/filters/validationAndStyling",
36+
},
37+
],
38+
},
39+
{
40+
text: "Charts and Tables",
41+
collapsible: true,
42+
items: [
43+
{
44+
text: "Basic Table",
45+
link: "/components/charts-and-tables/basicTable",
46+
},
47+
{
48+
text: "Chart with Table",
49+
link: "/components/charts-and-tables/chartWithTable",
50+
},
51+
],
52+
},
53+
],
54+
footer: {
55+
message: "Released under the MIT License.",
56+
copyright:
57+
'Built by <span class="vp-doc"><a href="https://www.rti.org">RTI International</a></span> Center for Data Science',
58+
},
59+
nav: [{ text: "Guide", link: "/introduction/" }],
60+
socialLinks: [
61+
{
62+
icon: "github",
63+
link: "https://github.com/RTIInternational/harness-vue-bootstrap",
64+
},
65+
],
66+
},
67+
};

docs/.vitepress/harness-pages/examplePage.js

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export default class ExamplePage {
33
key = "examplePage";
44
pageComponent = {};
55
pageProps = {};
6-
loadData = async (state, pageObject, hs) => {
6+
loadData = async () => {
77
return {
88
exampleChartWithTable: {
99
labels: Array(5)
@@ -116,7 +116,8 @@ export default class ExamplePage {
116116
{
117117
key: "exampleOption",
118118
label: "Example Option",
119-
description: "This is a sample description replacing the title attribute",
119+
description:
120+
"This is a sample description replacing the title attribute",
120121
default: true,
121122
},
122123
{
@@ -126,7 +127,7 @@ export default class ExamplePage {
126127
{
127128
key: "exampleOption3",
128129
label: "Example Option 3",
129-
description: "This is a sample description for Example Option 3"
130+
description: "This is a sample description for Example Option 3",
130131
},
131132
],
132133
},
@@ -167,20 +168,19 @@ export default class ExamplePage {
167168
exampleInputDatalist: {
168169
label: "Example Input With Datalist",
169170
component: "HarnessVueBootstrapInput",
170-
options: [{key: "", value: ""}, ...searchableOptions],
171+
options: [{ key: "", value: "" }, ...searchableOptions],
171172
},
172173
exampleInputMinMaxStep: {
173174
key: "exampleInputMinMaxStep",
174175
label: "Example Input",
175176
component: "HarnessVueBootstrapInput",
176177
props: {
177-
type: 'number',
178+
type: "number",
178179
min: 0.05,
179180
max: 0.24,
180-
step: 0.001
181+
step: 0.001,
181182
},
182183
options: [],
183-
184184
},
185185
exampleOptionInput: {
186186
key: "exampleOptionInput",
@@ -253,30 +253,29 @@ export default class ExamplePage {
253253
step: 1,
254254
helperText: "Range: 40-50",
255255
allowValidation: true,
256-
invalidFeedback: "Please choose a number between 40 and 50"
257-
}
256+
invalidFeedback: "Please choose a number between 40 and 50",
257+
},
258258
},
259259
exampleCheckPickTwo: {
260260
label: "Example Checkbox With Validation",
261261
component: "HarnessVueBootstrapCheckboxGroup",
262262
valueType: "array",
263263
valueValidator: (harness, value) => value.length >= 2,
264264
props: {
265-
266265
helperText: "Choose at least two",
267266
allowValidation: true,
268267
showValid: true,
269268
showInvalid: true,
270269
invalidFeedback: "Please choose at least two",
271270
validFeedback: "Well done!",
272-
multiple: true
271+
multiple: true,
273272
},
274273
options: [
275-
{key: "foo", label: "foo"},
276-
{key: "bar", label: "bar"},
277-
{key: "foobar", label: "foobar"},
278-
{key: "barfoo", label: "barfoo"},
279-
]
274+
{ key: "foo", label: "foo" },
275+
{ key: "bar", label: "bar" },
276+
{ key: "foobar", label: "foobar" },
277+
{ key: "barfoo", label: "barfoo" },
278+
],
280279
},
281280
};
282281
range.forEach((num) => {
@@ -439,7 +438,7 @@ export default class ExamplePage {
439438
? datum[key].toUpperCase() + " TRANSFORMED UPPERCASE"
440439
: datum[key].toLocaleString();
441440
return acc;
442-
}, {})
441+
}, {}),
443442
);
444443
});
445444
return newData;
@@ -481,7 +480,7 @@ export default class ExamplePage {
481480
acc[map[key]] =
482481
datum[key].toUpperCase() + " TRANSFORMED UPPERCASE";
483482
return acc;
484-
}, {})
483+
}, {}),
485484
);
486485
});
487486
return newData.length ? newData : [];
@@ -506,7 +505,7 @@ export default class ExamplePage {
506505
acc[map[key]] =
507506
datum[key].toUpperCase() + " TRANSFORMED UPPERCASE";
508507
return acc;
509-
}, {})
508+
}, {}),
510509
);
511510
});
512511
return newData.length ? newData : [];

docs/.vitepress/theme/barChart.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<template>
2+
<div>
3+
<img src="/chart.png" />
4+
</div>
5+
</template>
6+
<script setup></script>

docs/.vitepress/theme/barchart.vue

Lines changed: 0 additions & 16 deletions
This file was deleted.

docs/.vitepress/theme/index.js

Lines changed: 42 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
1-
2-
import DefaultTheme from 'vitepress/theme'
1+
import DefaultTheme from "vitepress/theme";
32
import { createPinia } from "pinia";
4-
import { harnessPlugin, harnessMixin, useHarnessStore } from "@rtidatascience/harness-vue"
5-
import { harnessVueBootstrap } from "../../../src/harness-vue-bootstrap"
6-
import barchart from './barchart.vue'
7-
import pages from "../harness-pages/manifest"
8-
9-
import 'bootstrap/scss/bootstrap.scss'
10-
import 'bootstrap-icons/font/bootstrap-icons.css'
11-
12-
import './main.css'
13-
14-
15-
3+
import {
4+
harnessPlugin,
5+
harnessMixin,
6+
useHarnessStore,
7+
} from "@rtidatascience/harness-vue";
8+
import { harnessVueBootstrap } from "../../../src/harness-vue-bootstrap";
9+
import barchart from "./barChart.vue";
10+
import pages from "../harness-pages/manifest";
1611

12+
import "bootstrap/scss/bootstrap.scss";
13+
import "bootstrap-icons/font/bootstrap-icons.css";
1714

15+
import "./main.css";
1816

1917
export default {
2018
...DefaultTheme,
@@ -25,34 +23,37 @@ export default {
2523
ctx.app.use(harnessPlugin, { pinia, pages });
2624
ctx.app.mixin(harnessMixin(pinia));
2725
ctx.app.use(harnessVueBootstrap);
28-
ctx.app.component('barchart', barchart)
29-
if(!import.meta.env.SSR){
26+
ctx.app.component("barchart", barchart);
27+
if (!import.meta.env.SSR) {
3028
// this function syncs dark mode to bootstrap
3129
// vitepress uses "dark" as a class on the HTML element
3230
// bootstrap uses an attribute called "data-bs-theme"
33-
function darkModeSyncer(mutationList, observer){
34-
mutationList.forEach(mutation => {
35-
// sync dark mode to dark
36-
if(mutation.target.classList.contains("dark") && mutation.target.getAttribute("data-bs-theme") !== "dark"){
37-
mutation.target.setAttribute("data-bs-theme", "dark");
38-
}
39-
40-
// sync dark mode to light
41-
if(!mutation.target.classList.contains("dark") && mutation.target.getAttribute("data-bs-theme") === "dark"){
42-
mutation.target.setAttribute("data-bs-theme", "");
43-
}
44-
})
45-
}
46-
const html = document.querySelector('html');
47-
const observer = new MutationObserver(darkModeSyncer)
48-
observer.observe(html, {attributes: true})
31+
function darkModeSyncer(mutationList) {
32+
mutationList.forEach((mutation) => {
33+
// sync dark mode to dark
34+
if (
35+
mutation.target.classList.contains("dark") &&
36+
mutation.target.getAttribute("data-bs-theme") !== "dark"
37+
) {
38+
mutation.target.setAttribute("data-bs-theme", "dark");
39+
}
40+
41+
// sync dark mode to light
42+
if (
43+
!mutation.target.classList.contains("dark") &&
44+
mutation.target.getAttribute("data-bs-theme") === "dark"
45+
) {
46+
mutation.target.setAttribute("data-bs-theme", "");
47+
}
48+
});
49+
}
50+
const html = document.querySelector("html");
51+
const observer = new MutationObserver(darkModeSyncer);
52+
observer.observe(html, { attributes: true });
4953
}
50-
51-
52-
const harness = useHarnessStore(pinia)
53-
const page = harness.getPageStores['examplePage'](pinia)
54-
page.loadData()
55-
56-
57-
}
58-
}
54+
55+
const harness = useHarnessStore(pinia);
56+
const page = harness.getPageStores["examplePage"](pinia);
57+
page.loadData();
58+
},
59+
};

0 commit comments

Comments
 (0)