@ndlib/component-library 0.0.14 → 0.0.15
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.
|
@@ -40,8 +40,8 @@ export const Markdown = (_a) => {
|
|
|
40
40
|
ol: (props) => _jsx(List, Object.assign({}, props, { ordered: true, sx: { mt: 4 } })),
|
|
41
41
|
ul: (props) => _jsx(List, Object.assign({}, props, { sx: { mt: 4 } })),
|
|
42
42
|
li: (_a) => {
|
|
43
|
-
var { index
|
|
44
|
-
return
|
|
43
|
+
var { index } = _a, props = __rest(_a, ["index"]);
|
|
44
|
+
return _jsx(ListItem, Object.assign({ index: index }, props));
|
|
45
45
|
},
|
|
46
46
|
p: (props) => _jsx(Paragraph, Object.assign({}, props, { sx: paragraphStyles })),
|
|
47
47
|
strong: (props) => _jsx(Bold, Object.assign({}, props)),
|
|
@@ -57,7 +57,6 @@ export const Heading = (_a) => {
|
|
|
57
57
|
typography =
|
|
58
58
|
LEVEL_TYPOGRAPHY_MAP[level];
|
|
59
59
|
}
|
|
60
|
-
console.log(typography, level, size);
|
|
61
60
|
if (type !== GROUP_TYPE.REGION && !standalone) {
|
|
62
61
|
flagInDevelopment('Heading component should be used within a Group component with property type={GROUP_TYPE.REGION} or given the standalone flag');
|
|
63
62
|
}
|
|
@@ -58,7 +58,8 @@ const composeGraphqlQuery = ({ startTime, endTime, }) => {
|
|
|
58
58
|
},
|
|
59
59
|
});
|
|
60
60
|
};
|
|
61
|
-
const
|
|
61
|
+
const DEFAULT_DATE = new Date().toISOString();
|
|
62
|
+
const useAlertsQuery = ({ domain = ALERT_DOMAIN.LIBRARY, endpoint = DEFAULT_ENDPOINT, startTime = DEFAULT_DATE, endTime = DEFAULT_DATE, disable = false, }) => {
|
|
62
63
|
const [alerts, setAlerts] = useState([]);
|
|
63
64
|
useEffect(() => {
|
|
64
65
|
const fetchData = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -77,7 +78,6 @@ const useAlertsQuery = ({ domain = ALERT_DOMAIN.LIBRARY, endpoint = DEFAULT_ENDP
|
|
|
77
78
|
});
|
|
78
79
|
const json = yield response.json();
|
|
79
80
|
const results = (_c = (_b = (_a = json === null || json === void 0 ? void 0 : json.data) === null || _a === void 0 ? void 0 : _a.alerts) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.map((a) => a === null || a === void 0 ? void 0 : a.attributes);
|
|
80
|
-
console.log('results', results, alerts);
|
|
81
81
|
setAlerts(results);
|
|
82
82
|
}
|
|
83
83
|
catch (error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndlib/component-library",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"files": [
|
|
@@ -18,8 +18,10 @@
|
|
|
18
18
|
"url": "https://github.com/ndlibrary/hesburgh-component-library.git"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
|
-
"
|
|
22
|
-
"
|
|
21
|
+
"prepare": "husky install",
|
|
22
|
+
"test-build": "echo '\n\nTesting Build...' && tsc --noEmit",
|
|
23
|
+
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives && yarn prettier && yarn test-build",
|
|
24
|
+
"lint:fix": "eslint src --ext ts,tsx --report-unused-disable-directives --fix && yarn prettify && yarn test-build",
|
|
23
25
|
"test": "vitest",
|
|
24
26
|
"prettier": "prettier --check \"src/**/*.{ts,tsx}\"",
|
|
25
27
|
"prettify": "prettier --write \"src/**/*.{ts,tsx}\"",
|
|
@@ -58,6 +60,7 @@
|
|
|
58
60
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
59
61
|
"eslint-plugin-react-refresh": "^0.3.4",
|
|
60
62
|
"eslint-plugin-storybook": "^0.6.12",
|
|
63
|
+
"husky": "^8.0.3",
|
|
61
64
|
"jsdom": "^22.1.0",
|
|
62
65
|
"prettier": "^2.8.8",
|
|
63
66
|
"prop-types": "^15.8.1",
|