@tachybase/client 1.2.10 → 1.2.12

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.
@@ -3,6 +3,7 @@ import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
3
3
  import * as __WEBPACK_EXTERNAL_MODULE_react_helmet__ from "react-helmet";
4
4
  import * as __WEBPACK_EXTERNAL_MODULE_react_i18next__ from "react-i18next";
5
5
  import * as __WEBPACK_EXTERNAL_MODULE__application_Plugin_mjs__ from "../../application/Plugin.mjs";
6
+ import * as __WEBPACK_EXTERNAL_MODULE__schema_component_index_mjs__ from "../../schema-component/index.mjs";
6
7
  import * as __WEBPACK_EXTERNAL_MODULE__system_settings_index_mjs__ from "../system-settings/index.mjs";
7
8
  const DocumentTitleContext = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.createContext)({
8
9
  title: null,
@@ -10,10 +11,11 @@ const DocumentTitleContext = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__
10
11
  });
11
12
  DocumentTitleContext.displayName = 'DocumentTitleContext';
12
13
  const DocumentTitleProvider = (props)=>{
14
+ const compile = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_index_mjs__.useCompile)();
13
15
  const { addonBefore, addonAfter } = props;
14
16
  const { t } = (0, __WEBPACK_EXTERNAL_MODULE_react_i18next__.useTranslation)();
15
17
  const [title, setTitle] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)('');
16
- const documentTitle = "".concat(addonBefore ? " - ".concat(t(addonBefore)) : '').concat(t(title || '')).concat(addonAfter ? " - ".concat(t(addonAfter)) : '');
18
+ const documentTitle = "".concat(addonBefore ? " - ".concat(t(addonBefore)) : '').concat(t(compile(title) || '')).concat(addonAfter ? " - ".concat(t(addonAfter)) : '');
17
19
  return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsxs)(DocumentTitleContext.Provider, {
18
20
  value: {
19
21
  title,
@@ -38,17 +38,19 @@ const external_react_namespaceObject = require("react");
38
38
  const external_react_helmet_namespaceObject = require("react-helmet");
39
39
  const external_react_i18next_namespaceObject = require("react-i18next");
40
40
  const Plugin_js_namespaceObject = require("../../application/Plugin.js");
41
- const index_js_namespaceObject = require("../system-settings/index.js");
41
+ const index_js_namespaceObject = require("../../schema-component/index.js");
42
+ const external_system_settings_index_js_namespaceObject = require("../system-settings/index.js");
42
43
  const DocumentTitleContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)({
43
44
  title: null,
44
45
  setTitle () {}
45
46
  });
46
47
  DocumentTitleContext.displayName = 'DocumentTitleContext';
47
48
  const DocumentTitleProvider = (props)=>{
49
+ const compile = (0, index_js_namespaceObject.useCompile)();
48
50
  const { addonBefore, addonAfter } = props;
49
51
  const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
50
52
  const [title, setTitle] = (0, external_react_namespaceObject.useState)('');
51
- const documentTitle = "".concat(addonBefore ? " - ".concat(t(addonBefore)) : '').concat(t(title || '')).concat(addonAfter ? " - ".concat(t(addonAfter)) : '');
53
+ const documentTitle = "".concat(addonBefore ? " - ".concat(t(addonBefore)) : '').concat(t(compile(title) || '')).concat(addonAfter ? " - ".concat(t(addonAfter)) : '');
52
54
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(DocumentTitleContext.Provider, {
53
55
  value: {
54
56
  title,
@@ -66,7 +68,7 @@ const DocumentTitleProvider = (props)=>{
66
68
  };
67
69
  const RemoteDocumentTitleProvider = (props)=>{
68
70
  var _ctx_data_data, _ctx_data;
69
- const ctx = (0, index_js_namespaceObject.useSystemSettings)();
71
+ const ctx = (0, external_system_settings_index_js_namespaceObject.useSystemSettings)();
70
72
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentTitleProvider, {
71
73
  addonAfter: null == ctx ? void 0 : null === (_ctx_data = ctx.data) || void 0 === _ctx_data ? void 0 : null === (_ctx_data_data = _ctx_data.data) || void 0 === _ctx_data_data ? void 0 : _ctx_data_data.title,
72
74
  children: props.children
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tachybase/client",
3
- "version": "1.2.10",
3
+ "version": "1.2.12",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.mjs",
@@ -65,12 +65,12 @@
65
65
  "react-zoom-pan-pinch": "^3.6.1",
66
66
  "sanitize-html": "2.14.0",
67
67
  "use-deep-compare-effect": "^1.8.1",
68
- "@tachybase/components": "1.2.10",
69
- "@tachybase/evaluators": "1.2.10",
70
- "@tachybase/requirejs": "1.2.10",
71
- "@tachybase/schema": "1.2.10",
72
- "@tachybase/utils": "1.2.10",
73
- "@tachybase/sdk": "1.2.10"
68
+ "@tachybase/components": "1.2.12",
69
+ "@tachybase/evaluators": "1.2.12",
70
+ "@tachybase/schema": "1.2.12",
71
+ "@tachybase/sdk": "1.2.12",
72
+ "@tachybase/utils": "1.2.12",
73
+ "@tachybase/requirejs": "1.2.12"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@testing-library/react": "^16.2.0",