@shelf/global-renderer 1.0.2 → 1.0.3-beta.1
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/CHANGELOG.md +2398 -44
- package/lib/DecisionTreeContent/DecisionTreeContent.d.ts +2 -2
- package/lib/DecisionTreeContent/DecisionTreeContent.js +84 -0
- package/lib/DecisionTreeContent/DecisionTreeContent.styled.d.ts +47 -11483
- package/lib/DecisionTreeContent/DecisionTreeContent.styled.js +225 -0
- package/lib/DecisionTreeContent/components/Condition.d.ts +2 -2
- package/lib/DecisionTreeContent/components/Condition.js +73 -0
- package/lib/DecisionTreeContent/components/ContentTable.d.ts +2 -2
- package/lib/DecisionTreeContent/components/ContentTable.js +26 -0
- package/lib/DecisionTreeContent/components/ExportedMeta.d.ts +3 -3
- package/lib/DecisionTreeContent/components/ExportedMeta.js +29 -0
- package/lib/DecisionTreeContent/components/Link.d.ts +2 -2
- package/lib/DecisionTreeContent/components/Link.js +18 -0
- package/lib/DecisionTreeContent/components/Question.d.ts +2 -2
- package/lib/DecisionTreeContent/components/Question.js +55 -0
- package/lib/DecisionTreeContent/components/Solution.d.ts +2 -2
- package/lib/DecisionTreeContent/components/Solution.js +20 -0
- package/lib/DecisionTreeContent/components/StepHeader.d.ts +2 -2
- package/lib/DecisionTreeContent/components/StepHeader.js +46 -0
- package/lib/DecisionTreeContent/components/StepTypeIcon.js +30 -0
- package/lib/DecisionTreeContent/helpers.d.ts +3 -3
- package/lib/DecisionTreeContent/helpers.js +54 -0
- package/lib/DecisionTreeContent/renderDTContent.js +12 -0
- package/lib/DecisionTreeContent/types.d.ts +1 -1
- package/lib/DecisionTreeDiagram/StaticTreeContainer.d.ts +2 -2
- package/lib/DecisionTreeDiagram/StaticTreeContainer.js +27 -0
- package/lib/DecisionTreeDiagram/renderStaticDTDiagram.js +26 -0
- package/lib/_virtual/client.js +4 -0
- package/lib/_virtual/index.js +4 -0
- package/lib/_virtual/index2.js +4 -0
- package/lib/_virtual/react-dom.development.js +4 -0
- package/lib/_virtual/react-dom.production.min.js +4 -0
- package/lib/_virtual/scheduler.development.js +4 -0
- package/lib/_virtual/scheduler.production.min.js +4 -0
- package/lib/i18next/index.js +18 -0
- package/lib/index.js +4 -20383
- package/lib/node_modules/react-dom/cjs/react-dom.development.js +12880 -0
- package/lib/node_modules/react-dom/cjs/react-dom.production.min.js +5643 -0
- package/lib/node_modules/react-dom/client.js +28 -0
- package/lib/node_modules/react-dom/index.js +17 -0
- package/lib/node_modules/scheduler/cjs/scheduler.development.js +278 -0
- package/lib/node_modules/scheduler/cjs/scheduler.production.min.js +231 -0
- package/lib/node_modules/scheduler/index.js +12 -0
- package/package.json +17 -22
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import t from "react";
|
|
2
|
+
import "../node_modules/react-dom/client.js";
|
|
3
|
+
import n from "./DecisionTreeContent.js";
|
|
4
|
+
import i from "../i18next/index.js";
|
|
5
|
+
import { __exports as m } from "../_virtual/client.js";
|
|
6
|
+
const u = (e, o = "#root") => {
|
|
7
|
+
const r = document.querySelector(o);
|
|
8
|
+
e.language && i.changeLanguage(e.language), m.createRoot(r).render(t.createElement(n, e, null));
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
u as renderDTContent
|
|
12
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import type { DecisionTree } from '@shelf/types-ddb';
|
|
3
3
|
declare const StaticTreeContainer: ({ tree, variables, }: {
|
|
4
4
|
tree: DecisionTree.Step[];
|
|
5
5
|
variables: DecisionTree.ContextualVariableDefaults[];
|
|
6
|
-
}) =>
|
|
6
|
+
}) => JSX.Element;
|
|
7
7
|
export default StaticTreeContainer;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { I18nextProvider as n } from "react-i18next";
|
|
2
|
+
import { StaticTree as a } from "@shelf/decision-tree-editor-components";
|
|
3
|
+
import t from "../i18next/index.js";
|
|
4
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
5
|
+
const p = ({
|
|
6
|
+
tree: r,
|
|
7
|
+
variables: o
|
|
8
|
+
}) => {
|
|
9
|
+
const i = {
|
|
10
|
+
conditionDefaultTitle: t.t("pdf-viewer.exportDTPDF.conditionDefaultTitle"),
|
|
11
|
+
containsLabel: t.t("pdf-viewer.exportDTPDF.contains"),
|
|
12
|
+
notContainsLabel: t.t("pdf-viewer.exportDTPDF.notContains"),
|
|
13
|
+
andOperator: t.t("pdf-viewer.exportDTPDF.andOperator"),
|
|
14
|
+
orOperator: t.t("pdf-viewer.exportDTPDF.orOperator")
|
|
15
|
+
};
|
|
16
|
+
return /* @__PURE__ */ e(n, {
|
|
17
|
+
i18n: t,
|
|
18
|
+
children: /* @__PURE__ */ e(a, {
|
|
19
|
+
tree: r,
|
|
20
|
+
...i,
|
|
21
|
+
variables: o
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
}, s = p;
|
|
25
|
+
export {
|
|
26
|
+
s as default
|
|
27
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import n from "react";
|
|
2
|
+
import "../node_modules/react-dom/client.js";
|
|
3
|
+
import m from "./StaticTreeContainer.js";
|
|
4
|
+
import a from "../i18next/index.js";
|
|
5
|
+
import { __exports as c } from "../_virtual/client.js";
|
|
6
|
+
const u = ({
|
|
7
|
+
language: r,
|
|
8
|
+
tree: e,
|
|
9
|
+
variables: t,
|
|
10
|
+
containerSelector: o = "#diagram-container"
|
|
11
|
+
}) => {
|
|
12
|
+
const i = document.querySelector(o);
|
|
13
|
+
r && a.changeLanguage(r), c.createRoot(i).render(
|
|
14
|
+
n.createElement(
|
|
15
|
+
m,
|
|
16
|
+
{
|
|
17
|
+
tree: e,
|
|
18
|
+
variables: t
|
|
19
|
+
},
|
|
20
|
+
null
|
|
21
|
+
)
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
u as renderStaticDTDiagram
|
|
26
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { resources as n } from "@shelf/i18n/lib/bundles/pdf-viewer/index.js";
|
|
2
|
+
import { initReactI18next as e } from "react-i18next";
|
|
3
|
+
import r from "i18next";
|
|
4
|
+
import { defaultInterpolation as i } from "@shelf/i18n";
|
|
5
|
+
const t = r.createInstance();
|
|
6
|
+
t.init({
|
|
7
|
+
lng: "en",
|
|
8
|
+
resources: n,
|
|
9
|
+
fallbackLng: "en",
|
|
10
|
+
interpolation: i,
|
|
11
|
+
missingKeyHandler: () => "\u26D4\uFE0F"
|
|
12
|
+
});
|
|
13
|
+
t.use(e);
|
|
14
|
+
const l = t;
|
|
15
|
+
export {
|
|
16
|
+
l as default,
|
|
17
|
+
t as i18next
|
|
18
|
+
};
|