@digabi/exam-engine-core 20.2.3 → 20.2.4-meta-attribute.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. package/dist/__tests__/testExamRendering.js +12 -0
  2. package/dist/__tests__/testExamRendering.js.map +1 -1
  3. package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
  4. package/dist/components/context/TOCContext.d.ts +9 -0
  5. package/dist/components/context/TOCContext.d.ts.map +1 -0
  6. package/dist/components/context/TOCContext.js +3 -0
  7. package/dist/components/context/TOCContext.js.map +1 -0
  8. package/dist/components/exam/Exam.d.ts +1 -1
  9. package/dist/components/exam/Exam.d.ts.map +1 -1
  10. package/dist/components/exam/Exam.js +97 -108
  11. package/dist/components/exam/Exam.js.map +1 -1
  12. package/dist/components/exam/Question.d.ts.map +1 -1
  13. package/dist/components/exam/Question.js +14 -6
  14. package/dist/components/exam/Question.js.map +1 -1
  15. package/dist/components/exam/SectionTitle.d.ts.map +1 -1
  16. package/dist/components/exam/SectionTitle.js +10 -2
  17. package/dist/components/exam/SectionTitle.js.map +1 -1
  18. package/dist/components/shared/TOCQuestion.d.ts +4 -0
  19. package/dist/components/shared/TOCQuestion.d.ts.map +1 -0
  20. package/dist/components/shared/TOCQuestion.js +77 -0
  21. package/dist/components/shared/TOCQuestion.js.map +1 -0
  22. package/dist/components/shared/TOCSection.d.ts +7 -0
  23. package/dist/components/shared/TOCSection.d.ts.map +1 -0
  24. package/dist/components/shared/TOCSection.js +15 -0
  25. package/dist/components/shared/TOCSection.js.map +1 -0
  26. package/dist/components/shared/TOCSectionTitle.d.ts +4 -0
  27. package/dist/components/shared/TOCSectionTitle.d.ts.map +1 -0
  28. package/dist/components/shared/TOCSectionTitle.js +34 -0
  29. package/dist/components/shared/TOCSectionTitle.js.map +1 -0
  30. package/dist/components/shared/TableOfContents.d.ts.map +1 -1
  31. package/dist/components/shared/TableOfContents.js +30 -104
  32. package/dist/components/shared/TableOfContents.js.map +1 -1
  33. package/dist/dom-utils.d.ts +1 -0
  34. package/dist/dom-utils.d.ts.map +1 -1
  35. package/dist/dom-utils.js +17 -1
  36. package/dist/dom-utils.js.map +1 -1
  37. package/dist/main-bundle.js +1 -1
  38. package/dist/main.css +1 -1
  39. package/package.json +2 -2
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ExamComponentProps } from '../../createRenderChildNodes';
3
+ export declare const TOCSectionTitle: React.FunctionComponent<ExamComponentProps>;
4
+ //# sourceMappingURL=TOCSectionTitle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TOCSectionTitle.d.ts","sourceRoot":"","sources":["../../../src/components/shared/TOCSectionTitle.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAUjE,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAyCvE,CAAA"}
@@ -0,0 +1,34 @@
1
+ import classNames from 'classnames';
2
+ import React, { useContext } from 'react';
3
+ import { useSelector } from 'react-redux';
4
+ import { useIsElementInViewport } from '../../dom-utils';
5
+ import { useExamTranslation } from '../../i18n';
6
+ import { tocSectionTitleId } from '../../ids';
7
+ import AnsweringInstructions from '../AnsweringInstructions';
8
+ import { CommonExamContext } from '../context/CommonExamContext';
9
+ import { SectionContext } from '../context/SectionContext';
10
+ import { TOCContext } from '../context/TOCContext';
11
+ export const TOCSectionTitle = ({ element, renderChildNodes }) => {
12
+ const { sections } = useContext(CommonExamContext);
13
+ const { childQuestions, displayNumber, minAnswers, maxAnswers } = useContext(SectionContext);
14
+ const { t } = useExamTranslation();
15
+ const { isInSidebar } = useContext(TOCContext);
16
+ const showAnsweringInstructions = true;
17
+ const showSectionValidationErrors = isInSidebar &&
18
+ !!useSelector((state) => { var _a, _b; return (_b = (_a = state.answers) === null || _a === void 0 ? void 0 : _a.validationErrors) === null || _b === void 0 ? void 0 : _b.find(i => i.displayNumber === displayNumber && (i === null || i === void 0 ? void 0 : i.elementType) === 'section'); });
19
+ const isVisible = useIsElementInViewport('section', displayNumber);
20
+ return (React.createElement("div", { className: isVisible ? 'current' : '' },
21
+ element.hasChildNodes() && (React.createElement("div", { className: "toc-section-header-container" },
22
+ React.createElement("h4", { className: "toc-section-header", id: tocSectionTitleId(displayNumber) },
23
+ sections.length > 1 && t('section', { displayNumber }),
24
+ " ",
25
+ renderChildNodes(element)))),
26
+ showAnsweringInstructions && maxAnswers && (React.createElement("div", { style: { display: 'grid' }, className: `answer-instructions-container section-${displayNumber}` },
27
+ React.createElement("div", { className: classNames('answer-instructions', {
28
+ error: showSectionValidationErrors
29
+ }) },
30
+ showSectionValidationErrors && React.createElement("div", { className: "error-mark" }, "!"),
31
+ React.createElement("span", { className: "error-reason" },
32
+ React.createElement(AnsweringInstructions, { maxAnswers, minAnswers, childQuestions, elementType: 'toc-section' })))))));
33
+ };
34
+ //# sourceMappingURL=TOCSectionTitle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TOCSectionTitle.js","sourceRoot":"","sources":["../../../src/components/shared/TOCSectionTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAE7C,OAAO,qBAAqB,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAElD,MAAM,CAAC,MAAM,eAAe,GAAgD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AAE,MAAM,EAAE,EAAE,SAAS,EAAE,yCAAyC,aAAa,EAAE;YAClG,6BACE,SAAS,EAAE,UAAU,CAAC,qBAAqB,EAAE;oBAC3C,KAAK,EAAE,2BAA2B;iBACnC,CAAC;gBAED,2BAA2B,IAAI,6BAAK,SAAS,EAAC,YAAY,QAAQ;gBACnE,8BAAM,SAAS,EAAC,cAAc;oBAC5B,oBAAC,qBAAqB,IAAO,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,GAAM,CAChG,CACH,CACF,CACP,CACG,CACP,CAAA;AACH,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"TableOfContents.d.ts","sourceRoot":"","sources":["../../../src/components/shared/TableOfContents.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,EAA0B,kBAAkB,EAAiB,MAAM,8BAA8B,CAAA;AAiBxG,eAAO,MAAM,iBAAiB,YAAa;IACzC,mBAAmB,EAAE,OAAO,CAAA;IAC5B,yBAAyB,EAAE,OAAO,CAAA;IAClC,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,mDA8NA,CAAA"}
1
+ {"version":3,"file":"TableOfContents.d.ts","sourceRoot":"","sources":["../../../src/components/shared/TableOfContents.tsx"],"names":[],"mappings":"AACA,OAAO,KAAgC,MAAM,OAAO,CAAA;AAEpD,OAAO,EAA0B,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAWzF,eAAO,MAAM,iBAAiB,YAAa;IACzC,mBAAmB,EAAE,OAAO,CAAA;IAC5B,yBAAyB,EAAE,OAAO,CAAA;IAClC,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,mDAsEA,CAAA"}
@@ -1,110 +1,17 @@
1
- import React, { useContext } from 'react';
1
+ import classNames from 'classnames';
2
+ import React, { useContext, useEffect } from 'react';
3
+ import { useSelector } from 'react-redux';
2
4
  import { createRenderChildNodes } from '../../createRenderChildNodes';
3
- import { findChildElement, getAttribute, getNumericAttribute, query, queryAncestors } from '../../dom-utils';
5
+ import { getNumericAttribute } from '../../dom-utils';
4
6
  import { useExamTranslation } from '../../i18n';
5
- import { tocSectionTitleId, tocTitleId } from '../../ids';
6
- import { url } from '../../url';
7
- import AnsweringInstructions from '../AnsweringInstructions';
7
+ import { tocTitleId } from '../../ids';
8
8
  import { CommonExamContext } from '../context/CommonExamContext';
9
- import { QuestionContext, withQuestionContext } from '../context/QuestionContext';
10
- import { SectionContext, withSectionContext } from '../context/SectionContext';
11
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
12
- import { faPaperclip } from '@fortawesome/free-solid-svg-icons';
13
- import classNames from 'classnames';
14
- import { Indicator } from './AnswerIndicator';
15
- import { useSelector } from 'react-redux';
9
+ import { withQuestionContext } from '../context/QuestionContext';
10
+ import { withSectionContext } from '../context/SectionContext';
11
+ import { TOCQuestion } from './TOCQuestion';
12
+ import { TOCSection } from './TOCSection';
16
13
  export const mkTableOfContents = (options) => {
17
- const { showAttachmentLinks, showAnsweringInstructions, isInSidebar } = options;
18
- const TOCSectionTitle = ({ element }) => {
19
- const { sections } = useContext(CommonExamContext);
20
- const { childQuestions, displayNumber, minAnswers, maxAnswers } = useContext(SectionContext);
21
- const { t } = useExamTranslation();
22
- const showSectionValidationErrors = isInSidebar &&
23
- !!useSelector((state) => { var _a, _b; return (_b = (_a = state.answers) === null || _a === void 0 ? void 0 : _a.validationErrors) === null || _b === void 0 ? void 0 : _b.find(i => i.displayNumber === displayNumber && (i === null || i === void 0 ? void 0 : i.elementType) === 'section'); });
24
- return (React.createElement(React.Fragment, null,
25
- element.hasChildNodes() && (React.createElement("div", { className: "toc-section-header-container" },
26
- React.createElement("h4", { className: "toc-section-header", id: tocSectionTitleId(displayNumber) },
27
- sections.length > 1 && t('section', { displayNumber }),
28
- " ",
29
- renderChildNodes(element)))),
30
- showAnsweringInstructions && maxAnswers && (React.createElement("div", { style: { display: 'grid' }, className: `answer-instructions-container section-${displayNumber}` },
31
- React.createElement("div", { className: classNames('answer-instructions', {
32
- error: showSectionValidationErrors
33
- }) },
34
- showSectionValidationErrors && React.createElement("div", { className: "error-mark" }, "!"),
35
- React.createElement("span", { className: "error-reason" },
36
- React.createElement(AnsweringInstructions, { maxAnswers, minAnswers, childQuestions, elementType: 'toc-section' })))))));
37
- };
38
- const TOCSection = ({ element, answers, renderChildNodes }) => {
39
- const { displayNumber } = useContext(SectionContext);
40
- const sectionTitle = findChildElement(element, 'section-title');
41
- return (React.createElement("li", { "data-section-id": displayNumber },
42
- sectionTitle && (React.createElement(TOCSectionTitle, { element: sectionTitle,
43
- renderChildNodes,
44
- answers })),
45
- React.createElement("ol", { className: "e-list-data e-pad-l-0", "aria-labelledby": sectionTitle && tocSectionTitleId(displayNumber) }, renderChildNodes(element, 1 /* RenderOptions.SkipHTML */))));
46
- };
47
- const TOCQuestion = ({ element }) => {
48
- var _a;
49
- const { attachmentsURL } = useContext(CommonExamContext);
50
- const { displayNumber, maxScore, level } = useContext(QuestionContext);
51
- const { t } = useExamTranslation();
52
- const questionTitle = findChildElement(element, 'question-title');
53
- const externalMaterial = showAttachmentLinks && displayNumber != null && query(element, 'external-material');
54
- const subquestions = [];
55
- let answersById = {};
56
- let hasQuestionValidationError = false;
57
- if (isInSidebar) {
58
- const answers = useSelector((state) => state.answers);
59
- answersById = (answers === null || answers === void 0 ? void 0 : answers.answersById) || {};
60
- const subquestionNodes = element.querySelectorAll('[question-id]');
61
- const questionValidationErrors = (_a = answers.validationErrors) === null || _a === void 0 ? void 0 : _a.filter(i => (i === null || i === void 0 ? void 0 : i.elementType) === 'question');
62
- hasQuestionValidationError = !!(questionValidationErrors === null || questionValidationErrors === void 0 ? void 0 : questionValidationErrors.find(i => i.displayNumber === displayNumber));
63
- subquestionNodes.forEach(e => {
64
- var _a;
65
- const id = Number(e.getAttribute('question-id'));
66
- const type = e.getAttribute('type') || '';
67
- const subQuestionDisplayNumber = e.getAttribute('display-number') || '';
68
- const hasError = !!(questionValidationErrors === null || questionValidationErrors === void 0 ? void 0 : questionValidationErrors.find(i => i.displayNumber === subQuestionDisplayNumber));
69
- const childQuestionHasError = questionValidationErrors
70
- .flatMap(i => ('childQuestions' in i ? i.childQuestions : []))
71
- .includes(subQuestionDisplayNumber);
72
- const hasAnswer = !!((_a = answersById[id]) === null || _a === void 0 ? void 0 : _a.value);
73
- if (id) {
74
- subquestions.push({
75
- id,
76
- type,
77
- error: hasError || (childQuestionHasError && hasAnswer),
78
- displayNumber: Number(subQuestionDisplayNumber)
79
- });
80
- }
81
- });
82
- }
83
- const subQuestionError = !!subquestions.find(i => i.error);
84
- const subquestionsAnswered = subquestions === null || subquestions === void 0 ? void 0 : subquestions.filter(i => { var _a; return (_a = answersById[i.id]) === null || _a === void 0 ? void 0 : _a.value; }).length;
85
- const maxAnswers = Number(element.getAttribute('max-answers'));
86
- const requiredAnswers = maxAnswers || subquestions.length;
87
- return (React.createElement("li", { "data-list-number": `${displayNumber}.`, onClick: () => (isInSidebar ? (window.location.href = `#question-nr-${displayNumber}`) : undefined), className: classNames(`level-${level}`, { error: hasQuestionValidationError }) },
88
- React.createElement("span", { className: "e-column e-question-title" },
89
- React.createElement("a", { href: url('', { hash: `question-nr-${displayNumber}` }), tabIndex: isInSidebar ? -1 : undefined },
90
- React.createElement("span", null, renderChildNodes(questionTitle)))),
91
- React.createElement("div", { className: classNames('numeric-answer-indicator', {
92
- error: subQuestionError,
93
- ok: subquestionsAnswered === requiredAnswers
94
- }) },
95
- subquestionsAnswered,
96
- "/",
97
- requiredAnswers),
98
- !isInSidebar && externalMaterial && (React.createElement("span", { className: "e-column e-column--narrow e-external-material" },
99
- React.createElement("a", { href: url(attachmentsURL, {
100
- hash: getAttribute(queryAncestors(externalMaterial, 'question'), 'display-number')
101
- }), target: "attachments" }, t('material')))),
102
- React.createElement("span", { className: "e-column e-column--narrow table-of-contents--score-column" }, t('points', { count: maxScore })),
103
- isInSidebar && (React.createElement("span", { className: "e-column e-column--narrow e-external-material" }, externalMaterial && React.createElement(FontAwesomeIcon, { size: "sm", icon: faPaperclip, fixedWidth: true }))),
104
- React.createElement("div", { className: "answers" },
105
- subquestions.map(i => (React.createElement(Indicator, { key: i.id, type: i.type, id: i.id, answer: answersById[i.id], error: i.error, displayNumber: i.displayNumber }))),
106
- ' ')));
107
- };
14
+ const { showAnsweringInstructions, isInSidebar } = options;
108
15
  const renderChildNodes = createRenderChildNodes({
109
16
  section: withSectionContext(TOCSection),
110
17
  question: withQuestionContext(TOCQuestion)
@@ -115,7 +22,26 @@ export const mkTableOfContents = (options) => {
115
22
  const maxAnswers = getNumericAttribute(root, 'max-answers');
116
23
  const showExamValidationErrors = isInSidebar &&
117
24
  !!useSelector((state) => { var _a; return (_a = state.answers.validationErrors) === null || _a === void 0 ? void 0 : _a.find(i => (i === null || i === void 0 ? void 0 : i.elementType) === 'exam'); });
118
- return (React.createElement("nav", { className: "table-of-contents", "aria-labelledby": tocTitleId },
25
+ const ref = React.createRef();
26
+ useEffect(() => {
27
+ var _a;
28
+ // Prevent scrolling the whole page when scrolling the TOC
29
+ const handleTOCScroll = (e) => {
30
+ const toc = e.currentTarget;
31
+ if (toc.scrollHeight <= toc.clientHeight) {
32
+ return;
33
+ }
34
+ const deltaY = e.deltaY;
35
+ const hitsTop = deltaY < 0 && toc.scrollTop === 0;
36
+ const hitsBottom = deltaY > 0 && toc.scrollTop >= toc.scrollHeight - toc.clientHeight;
37
+ if (hitsTop || hitsBottom) {
38
+ e.preventDefault();
39
+ }
40
+ };
41
+ (_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.addEventListener('wheel', handleTOCScroll, { passive: false });
42
+ return () => { var _a; return (_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('wheel', handleTOCScroll); };
43
+ }, []);
44
+ return (React.createElement("nav", { className: "table-of-contents", "aria-labelledby": tocTitleId, ref: ref },
119
45
  !isInSidebar && (React.createElement("h2", { id: tocTitleId },
120
46
  React.createElement("span", { className: "e-toc-heading" }, t('toc-heading')))),
121
47
  showAnsweringInstructions && maxAnswers && (React.createElement("div", { style: { display: 'grid' } },
@@ -1 +1 @@
1
- {"version":3,"file":"TableOfContents.js","sourceRoot":"","sources":["../../../src/components/shared/TableOfContents.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,sBAAsB,EAAqC,MAAM,8BAA8B,CAAA;AACxG,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,mBAAmB,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAC5G,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACzD,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AAC/B,OAAO,qBAAqB,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AACjF,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAA;AAE/D,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAGzC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,OAIjC,EAAE,EAAE;IACH,MAAM,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,WAAW,EAAE,GAAG,OAAO,CAAA;IAE/E,MAAM,eAAe,GAAgD,CAAC,EAAE,OAA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CAAM;YACpE,6BAAK,SAAS,EAAC,WAAW;gBACxB,gCAAQ,SAAS,EAAC,kBAAkB,IAAE,CAAC,CAAC,YAAY,CAAC,CAAU;gBAC/D,gCAAQ,SAAS,EAAC,2DAA2D,IAC1E,CAAC,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAC1B;gBACR,WAAW,IAAI,8BAAM,SAAS,EAAC,+CAA+C,GAAG,CAC9E,CACF,CACP,CAAA;IACH,CAAC,CAAA;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;AACpC,CAAC,CAAA"}
@@ -14,5 +14,6 @@ export declare function findChildrenAnswers(element: Element): Element[];
14
14
  export declare function hasSiblingQuestions(answer: Element): boolean | undefined;
15
15
  export declare function createElement<K extends keyof HTMLElementTagNameMap>(tagName: K, properties?: Record<string, string> | null, ...children: Array<string | ChildNode>): HTMLElementTagNameMap[K];
16
16
  export declare function setProperties(element: HTMLElement, properties?: Record<string, string> | null): void;
17
+ export declare function useIsElementInViewport(elementType: 'question' | 'section', displayNumber: string): boolean;
17
18
  export {};
18
19
  //# sourceMappingURL=dom-utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dom-utils.d.ts","sourceRoot":"","sources":["../src/dom-utils.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,WAAW,CAAA;AAE5B,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,EAAE,CAU/E;AAED,KAAK,QAAQ,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,CAAA;AAUnE,wBAAgB,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,CAiB5E;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,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,EAAE,EAAE,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,EAAE,CAOtG;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,EAAE,CAO1G;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,EAAE,CAE/D;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,uBAIlD;AAED,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,qBAAqB,EACjE,OAAO,EAAE,CAAC,EACV,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,EAC1C,GAAG,QAAQ,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,GACrC,qBAAqB,CAAC,CAAC,CAAC,CAK1B;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,GAAG,IAAI,CAWpG;AAED,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,UAAU,GAAG,SAAS,EAAE,aAAa,EAAE,MAAM,WAehG"}
package/dist/dom-utils.js CHANGED
@@ -1,5 +1,7 @@
1
- import { ExamNamespaceURI } from './createRenderChildNodes';
2
1
  import * as _ from 'lodash-es';
2
+ import { ExamNamespaceURI } from './createRenderChildNodes';
3
+ import { useContext, useEffect, useState } from 'react';
4
+ import { TOCContext } from './components/context/TOCContext';
3
5
  export const NBSP = '\u00A0';
4
6
  export function parentElements(element, selector) {
5
7
  const predicate = selector != null ? mkPredicate(selector) : undefined;
@@ -129,4 +131,18 @@ export function setProperties(element, properties) {
129
131
  }
130
132
  });
131
133
  }
134
+ export function useIsElementInViewport(elementType, displayNumber) {
135
+ const { visibleTOCElements } = useContext(TOCContext);
136
+ const [isVisible, setIsVisible] = useState(false);
137
+ const id = `${elementType}-${displayNumber}`;
138
+ useEffect(() => {
139
+ if ((visibleTOCElements === null || visibleTOCElements === void 0 ? void 0 : visibleTOCElements.includes(id)) && !isVisible) {
140
+ setIsVisible(true);
141
+ }
142
+ else if (!(visibleTOCElements === null || visibleTOCElements === void 0 ? void 0 : visibleTOCElements.includes(id)) && isVisible) {
143
+ setIsVisible(false);
144
+ }
145
+ }, [visibleTOCElements]);
146
+ return isVisible;
147
+ }
132
148
  //# sourceMappingURL=dom-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dom-utils.js","sourceRoot":"","sources":["../src/dom-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,KAAK,CAAC,MAAM,WAAW,CAAA;AAE9B,MAAM,CAAC,MAAM,IAAI,GAAG,QAAQ,CAAA;AAE5B,MAAM,UAAU,cAAc,CAAC,OAAgB,EAAE,QAAmB;IAClE,MAAM,SAAS,GAAG,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IACtE,MAAM,MAAM,GAAG,EAAE,CAAA;IACjB,OAAO,OAAO,CAAC,aAAa,IAAI,IAAI,EAAE,CAAC;QACrC,OAAO,GAAG,OAAO,CAAC,aAAa,CAAA;QAC/B,IAAI,SAAS,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;YAC5C,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QACtB,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAID,SAAS,WAAW,CAAC,QAAkB;IACrC,OAAO,OAAO,QAAQ,KAAK,UAAU;QACnC,CAAC,CAAC,CAAC,OAAgB,EAAE,EAAE,CAAC,OAAO,CAAC,YAAY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