@digabi/exam-engine-core 23.18.1-alpha.0 → 23.19.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/dist/__tests__/tsconfig.tsbuildinfo +1 -1
- package/dist/components/shared/Image.d.ts +1 -5
- package/dist/components/shared/Image.d.ts.map +1 -1
- package/dist/components/shared/Image.js +3 -9
- package/dist/components/shared/Image.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/main-bundle.js +1 -1
- package/package.json +2 -2
@@ -1,10 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { ExamComponentProps } from '../../createRenderChildNodes';
|
3
|
-
declare function Image(
|
4
|
-
export declare function ImageBase({ element, className, renderChildNodes, resolveAttachment, disableZoomIn }: ExamComponentProps & {
|
5
|
-
resolveAttachment: (filename: string) => string;
|
6
|
-
disableZoomIn?: boolean;
|
7
|
-
}): React.JSX.Element;
|
3
|
+
declare function Image({ element, className, renderChildNodes }: ExamComponentProps): React.JSX.Element;
|
8
4
|
declare const _default: React.MemoExoticComponent<typeof Image>;
|
9
5
|
export default _default;
|
10
6
|
//# sourceMappingURL=Image.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../src/components/shared/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAQjE,iBAAS,KAAK,CAAC,
|
1
|
+
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../src/components/shared/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAQjE,iBAAS,KAAK,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,qBA8C1E;;AAED,wBAAgC"}
|
@@ -5,11 +5,9 @@ import { imageCaptionId } from '../../ids';
|
|
5
5
|
import { CommonExamContext } from '../context/CommonExamContext';
|
6
6
|
import ResponsiveMediaContainer from './internal/ResponsiveMediaContainer';
|
7
7
|
import { isWhitespace } from '../../utils';
|
8
|
-
function Image(
|
8
|
+
function Image({ element, className, renderChildNodes }) {
|
9
9
|
const { resolveAttachment } = useContext(CommonExamContext);
|
10
|
-
|
11
|
-
}
|
12
|
-
export function ImageBase({ element, className, renderChildNodes, resolveAttachment, disableZoomIn }) {
|
10
|
+
const { t } = useExamTranslation();
|
13
11
|
const src = getAttribute(element, 'src');
|
14
12
|
const width = getNumericAttribute(element, 'width');
|
15
13
|
const height = getNumericAttribute(element, 'height');
|
@@ -26,11 +24,7 @@ export function ImageBase({ element, className, renderChildNodes, resolveAttachm
|
|
26
24
|
height,
|
27
25
|
caption,
|
28
26
|
captionId,
|
29
|
-
bordered: hasCaption || queryAncestors(element, 'choice-answer') != null },
|
30
|
-
}
|
31
|
-
function ZoomInImage({ image, imgUrl, hasCaption }) {
|
32
|
-
const { t } = useExamTranslation();
|
33
|
-
return (React.createElement("a", { title: t.raw('zoom-in'), href: imgUrl, target: "original-picture", className: "e-zoomable", "aria-hidden": !hasCaption, tabIndex: -1 }, image));
|
27
|
+
bordered: hasCaption || queryAncestors(element, 'choice-answer') != null }, queryAncestors(element, ['choice-answer', 'hint']) != null ? (image) : (React.createElement("a", { title: t.raw('zoom-in'), href: imgUrl, target: "original-picture", className: "e-zoomable", "aria-hidden": !hasCaption, tabIndex: -1 }, image)))));
|
34
28
|
}
|
35
29
|
export default React.memo(Image);
|
36
30
|
//# sourceMappingURL=Image.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Image.js","sourceRoot":"","sources":["../../../src/components/shared/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAA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CAAC,CAAA"}
|
package/dist/index.d.ts
CHANGED
@@ -7,7 +7,6 @@ import parseExam from './parser/parseExam';
|
|
7
7
|
export { Attachments, Exam, GradingInstructions, Results, parseExam };
|
8
8
|
export type { ExamComponentProps } from './createRenderChildNodes';
|
9
9
|
export { GradingAnswer } from './components/grading/GradingAnswer';
|
10
|
-
export { ImageBase } from './components/shared/Image';
|
11
10
|
export * from './types/ExamAnswer';
|
12
11
|
export * from './types/ExamServerAPI';
|
13
12
|
export * from './types/GradingStructure';
|
package/dist/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAA;AAC7B,OAAO,WAAW,MAAM,sCAAsC,CAAA;AAC9D,OAAO,IAAI,MAAM,wBAAwB,CAAA;AACzC,OAAO,mBAAmB,MAAM,uDAAuD,CAAA;AACvF,OAAO,OAAO,MAAM,8BAA8B,CAAA;AAClD,OAAO,SAAS,MAAM,oBAAoB,CAAA;AAE1C,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,SAAS,EAAE,CAAA;AACrE,YAAY,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAClE,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAA;AAC7B,OAAO,WAAW,MAAM,sCAAsC,CAAA;AAC9D,OAAO,IAAI,MAAM,wBAAwB,CAAA;AACzC,OAAO,mBAAmB,MAAM,uDAAuD,CAAA;AACvF,OAAO,OAAO,MAAM,8BAA8B,CAAA;AAClD,OAAO,SAAS,MAAM,oBAAoB,CAAA;AAE1C,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,SAAS,EAAE,CAAA;AACrE,YAAY,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAClE,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,0BAA0B,CAAA;AACxC,cAAc,eAAe,CAAA;AAC7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AAEjE,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,OAAO,WAAW,CAAA;IAC/B,IAAI,EAAE,OAAO,IAAI,CAAA;IACjB,SAAS,EAAE,OAAO,SAAS,CAAA;IAC3B,OAAO,EAAE,OAAO,OAAO,CAAA;CACxB"}
|
package/dist/index.js
CHANGED
@@ -6,7 +6,6 @@ import Results from './components/results/Results';
|
|
6
6
|
import parseExam from './parser/parseExam';
|
7
7
|
export { Attachments, Exam, GradingInstructions, Results, parseExam };
|
8
8
|
export { GradingAnswer } from './components/grading/GradingAnswer';
|
9
|
-
export { ImageBase } from './components/shared/Image';
|
10
9
|
export * from './types/ExamAnswer';
|
11
10
|
export * from './types/ExamServerAPI';
|
12
11
|
export * from './types/GradingStructure';
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAA;AAC7B,OAAO,WAAW,MAAM,sCAAsC,CAAA;AAC9D,OAAO,IAAI,MAAM,wBAAwB,CAAA;AACzC,OAAO,mBAAmB,MAAM,uDAAuD,CAAA;AACvF,OAAO,OAAO,MAAM,8BAA8B,CAAA;AAClD,OAAO,SAAS,MAAM,oBAAoB,CAAA;AAE1C,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,SAAS,EAAE,CAAA;AAErE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAClE,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAA;AAC7B,OAAO,WAAW,MAAM,sCAAsC,CAAA;AAC9D,OAAO,IAAI,MAAM,wBAAwB,CAAA;AACzC,OAAO,mBAAmB,MAAM,uDAAuD,CAAA;AACvF,OAAO,OAAO,MAAM,8BAA8B,CAAA;AAClD,OAAO,SAAS,MAAM,oBAAoB,CAAA;AAE1C,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,SAAS,EAAE,CAAA;AAErE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAClE,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,0BAA0B,CAAA;AACxC,cAAc,eAAe,CAAA;AAC7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA"}
|