@tachybase/client 0.23.48 → 0.23.58

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.
Files changed (101) hide show
  1. package/es/application/Application.d.ts +3 -0
  2. package/es/application/Application.mjs +8 -0
  3. package/es/application/hooks/index.d.ts +1 -0
  4. package/es/application/hooks/index.mjs +1 -0
  5. package/es/application/hooks/useGlobalVariable.d.ts +1 -0
  6. package/es/application/hooks/useGlobalVariable.mjs +18 -0
  7. package/es/application/schema-settings/hooks/index.d.ts +1 -1
  8. package/es/application/schema-settings/hooks/index.mjs +6 -8
  9. package/es/block-provider/hooks/index.mjs +4 -1
  10. package/es/built-in/index.mjs +3 -0
  11. package/es/built-in/locale/LocalePlugin.mjs +5 -1
  12. package/es/built-in/system-settings/SystemSettingsProvider.d.ts +2 -3
  13. package/es/built-in/system-settings/SystemSettingsProvider.mjs +4 -3
  14. package/es/built-in/system-settings/SystemSettingsShortcut.mjs +11 -8
  15. package/es/collection-manager/Configuration/AddCollectionAction.mjs +12 -2
  16. package/es/collection-manager/Configuration/ImportXlsx/ImportXlsxMetaAction.d.ts +2 -0
  17. package/es/collection-manager/Configuration/ImportXlsx/ImportXlsxMetaAction.mjs +255 -0
  18. package/es/collection-manager/Configuration/ImportXlsx/XlsxCollectionSchema.d.ts +89 -0
  19. package/es/collection-manager/Configuration/ImportXlsx/XlsxCollectionSchema.mjs +96 -0
  20. package/es/collection-manager/Configuration/ImportXlsx/XlsxEditFieldAction.d.ts +3 -0
  21. package/es/collection-manager/Configuration/ImportXlsx/XlsxEditFieldAction.mjs +47 -0
  22. package/es/collection-manager/Configuration/ImportXlsx/setUpdateXlsxCollectionField.d.ts +3 -0
  23. package/es/collection-manager/Configuration/ImportXlsx/setUpdateXlsxCollectionField.mjs +44 -0
  24. package/es/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.d.ts +1 -0
  25. package/es/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.mjs +380 -0
  26. package/es/collection-manager/Configuration/ImportXlsx/xlsxFormValueContextProvider.d.ts +8 -0
  27. package/es/collection-manager/Configuration/ImportXlsx/xlsxFormValueContextProvider.mjs +4 -0
  28. package/es/collection-manager/Configuration/ImportXlsx/xlsxImportAction.d.ts +1 -0
  29. package/es/collection-manager/Configuration/ImportXlsx/xlsxImportAction.mjs +187 -0
  30. package/es/collection-manager/Configuration/ImportXlsx/xlsxPreviewTable.d.ts +1 -0
  31. package/es/collection-manager/Configuration/ImportXlsx/xlsxPreviewTable.mjs +30 -0
  32. package/es/collection-manager/collectionPlugin.mjs +3 -1
  33. package/es/collection-manager/templates/import.mjs +1 -1
  34. package/es/collection-manager/templates/xlsx.d.ts +11 -0
  35. package/es/collection-manager/templates/xlsx.mjs +19 -0
  36. package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.mjs +4 -2
  37. package/es/modules/fields/component/Radio/radioComponentFieldSettings.mjs +0 -4
  38. package/es/schema-component/antd/action/Action.Designer.mjs +5 -2
  39. package/es/schema-component/antd/action/Action.Modal.mjs +20 -31
  40. package/es/schema-component/antd/action/Action.Modal.style.d.ts +4 -0
  41. package/es/schema-component/antd/action/Action.Modal.style.mjs +35 -0
  42. package/es/schema-component/antd/action/utils.d.ts +1 -1
  43. package/es/schema-component/antd/action/utils.mjs +70 -70
  44. package/es/schema-component/antd/checkbox/Checkbox.mjs +6 -1
  45. package/es/schema-component/antd/page/Page.d.ts +1 -5
  46. package/es/schema-component/antd/page/Page.mjs +227 -146
  47. package/es/schema-component/antd/page/Page.style.d.ts +5 -0
  48. package/es/schema-component/antd/page/Page.style.mjs +45 -0
  49. package/es/schema-component/antd/page/PageDesigner.d.ts +3 -0
  50. package/es/schema-component/antd/page/PageDesigner.mjs +28 -0
  51. package/es/schema-component/antd/page/PageTabDesigner.d.ts +0 -3
  52. package/es/schema-component/antd/page/PageTabDesigner.mjs +3 -50
  53. package/es/schema-component/antd/page/style.d.ts +1 -1
  54. package/es/schema-component/antd/page/style.mjs +3 -13
  55. package/es/schema-component/antd/password/Password.d.ts +1 -1
  56. package/es/schema-component/antd/scroll-area/ScrollArea.d.ts +1 -1
  57. package/es/schema-component/antd/scroll-area/ScrollArea.mjs +2 -1
  58. package/es/schema-component/antd/variable/TextArea.mjs +1 -1
  59. package/es/schema-component/antd/variable/TextAreaWithGlobalScope.d.ts +13 -0
  60. package/es/schema-component/antd/variable/TextAreaWithGlobalScope.mjs +59 -0
  61. package/es/schema-component/antd/variable/index.d.ts +1 -0
  62. package/es/schema-component/antd/variable/index.mjs +3 -0
  63. package/lib/application/Application.js +8 -0
  64. package/lib/application/hooks/index.js +9 -0
  65. package/lib/application/hooks/useGlobalVariable.js +52 -0
  66. package/lib/application/schema-settings/hooks/index.js +6 -8
  67. package/lib/block-provider/hooks/index.js +6 -3
  68. package/lib/built-in/index.js +3 -0
  69. package/lib/built-in/locale/LocalePlugin.js +5 -1
  70. package/lib/built-in/system-settings/SystemSettingsProvider.js +4 -3
  71. package/lib/built-in/system-settings/SystemSettingsShortcut.js +11 -8
  72. package/lib/collection-manager/Configuration/AddCollectionAction.js +12 -2
  73. package/lib/collection-manager/Configuration/ImportXlsx/ImportXlsxMetaAction.js +304 -0
  74. package/lib/collection-manager/Configuration/ImportXlsx/XlsxCollectionSchema.js +130 -0
  75. package/lib/collection-manager/Configuration/ImportXlsx/XlsxEditFieldAction.js +81 -0
  76. package/lib/collection-manager/Configuration/ImportXlsx/setUpdateXlsxCollectionField.js +78 -0
  77. package/lib/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.js +414 -0
  78. package/lib/collection-manager/Configuration/ImportXlsx/xlsxFormValueContextProvider.js +53 -0
  79. package/lib/collection-manager/Configuration/ImportXlsx/xlsxImportAction.js +235 -0
  80. package/lib/collection-manager/Configuration/ImportXlsx/xlsxPreviewTable.js +64 -0
  81. package/lib/collection-manager/collectionPlugin.js +3 -1
  82. package/lib/collection-manager/templates/import.js +1 -1
  83. package/lib/collection-manager/templates/xlsx.js +53 -0
  84. package/lib/locale/zh-CN.js +4 -1
  85. package/lib/modules/blocks/data-blocks/table/hooks/useTableBlockProps.js +4 -2
  86. package/lib/modules/fields/component/Radio/radioComponentFieldSettings.js +0 -4
  87. package/lib/schema-component/antd/action/Action.Designer.js +5 -2
  88. package/lib/schema-component/antd/action/Action.Modal.js +20 -31
  89. package/lib/schema-component/antd/action/Action.Modal.style.js +69 -0
  90. package/lib/schema-component/antd/action/utils.js +70 -70
  91. package/lib/schema-component/antd/checkbox/Checkbox.js +6 -1
  92. package/lib/schema-component/antd/page/Page.js +227 -146
  93. package/lib/schema-component/antd/page/Page.style.js +79 -0
  94. package/lib/schema-component/antd/page/PageDesigner.js +62 -0
  95. package/lib/schema-component/antd/page/PageTabDesigner.js +2 -50
  96. package/lib/schema-component/antd/page/style.js +3 -13
  97. package/lib/schema-component/antd/scroll-area/ScrollArea.js +2 -1
  98. package/lib/schema-component/antd/variable/TextArea.js +1 -1
  99. package/lib/schema-component/antd/variable/TextAreaWithGlobalScope.js +94 -0
  100. package/lib/schema-component/antd/variable/index.js +13 -1
  101. package/package.json +7 -7
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = function(exports1, definition) {
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = function(obj, prop) {
13
+ return Object.prototype.hasOwnProperty.call(obj, prop);
14
+ };
15
+ })();
16
+ (()=>{
17
+ __webpack_require__.r = function(exports1) {
18
+ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
19
+ value: 'Module'
20
+ });
21
+ Object.defineProperty(exports1, '__esModule', {
22
+ value: true
23
+ });
24
+ };
25
+ })();
26
+ var __webpack_exports__ = {};
27
+ __webpack_require__.r(__webpack_exports__);
28
+ __webpack_require__.d(__webpack_exports__, {
29
+ useStyles: ()=>useStyles
30
+ });
31
+ const external_antd_style_namespaceObject = require("antd-style");
32
+ function _tagged_template_literal(strings, raw) {
33
+ if (!raw) raw = strings.slice(0);
34
+ return Object.freeze(Object.defineProperties(strings, {
35
+ raw: {
36
+ value: Object.freeze(raw)
37
+ }
38
+ }));
39
+ }
40
+ function _templateObject() {
41
+ const data = _tagged_template_literal([
42
+ "\n .ant-tabs-nav-wrap.ant-tabs-nav-wrap {\n flex: none;\n }\n .ant-tabs-tab.ant-tabs-tab {\n border: none;\n background-color: #ffffff;\n }\n\n .ant-tabs-tab-active.ant-tabs-tab-active.ant-tabs-tab-active.ant-tabs-tab-active {\n border-radius: 8px 8px 0 0;\n box-shadow: none;\n text-shadow: none;\n background-color: var(--tb-box-bg);\n }\n .ant-tabs-extra-content {\n flex: 1;\n }\n "
43
+ ]);
44
+ _templateObject = function() {
45
+ return data;
46
+ };
47
+ return data;
48
+ }
49
+ function _templateObject1() {
50
+ const data = _tagged_template_literal([
51
+ "\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n\n &.designable {\n justify-content: space-between;\n }\n\n .scroll-area-extra-content {\n align-self: flex-end;\n }\n "
52
+ ]);
53
+ _templateObject1 = function() {
54
+ return data;
55
+ };
56
+ return data;
57
+ }
58
+ function _templateObject2() {
59
+ const data = _tagged_template_literal([
60
+ "\n position: relative;\n &:hover {\n .tab-designer-wrapper {\n display: block;\n }\n }\n .tab-designer-wrapper {\n display: none;\n position: absolute;\n top: 0;\n right: 0;\n padding: 0 2px;\n border-radius: 3px;\n color: #000000;\n background-color: #ffffff;\n\n &:hover {\n color: #ffffff;\n background-color: var(--colorSettings);\n }\n }\n "
61
+ ]);
62
+ _templateObject2 = function() {
63
+ return data;
64
+ };
65
+ return data;
66
+ }
67
+ const useStyles = (0, external_antd_style_namespaceObject.createStyles)((param)=>{
68
+ let { css, token } = param;
69
+ return {
70
+ tabComponentClass: css(_templateObject()),
71
+ tabWrapper: css(_templateObject1()),
72
+ tabItemClass: css(_templateObject2())
73
+ };
74
+ });
75
+ var __webpack_export_target__ = exports;
76
+ for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
77
+ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
78
+ value: true
79
+ });
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = function(exports1, definition) {
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = function(obj, prop) {
13
+ return Object.prototype.hasOwnProperty.call(obj, prop);
14
+ };
15
+ })();
16
+ (()=>{
17
+ __webpack_require__.r = function(exports1) {
18
+ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
19
+ value: 'Module'
20
+ });
21
+ Object.defineProperty(exports1, '__esModule', {
22
+ value: true
23
+ });
24
+ };
25
+ })();
26
+ var __webpack_exports__ = {};
27
+ __webpack_require__.r(__webpack_exports__);
28
+ __webpack_require__.d(__webpack_exports__, {
29
+ PageDesigner: ()=>PageDesigner
30
+ });
31
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
32
+ const schema_namespaceObject = require("@tachybase/schema");
33
+ const external_antd_namespaceObject = require("antd");
34
+ const external_index_js_namespaceObject = require("../../index.js");
35
+ const index_js_namespaceObject = require("../../../application/schema-settings/hooks/index.js");
36
+ const context_index_js_namespaceObject = require("../../../application/schema-toolbar/context/index.js");
37
+ const PageDesigner = (param)=>{
38
+ let { title } = param;
39
+ const { designable } = (0, external_index_js_namespaceObject.useDesignable)();
40
+ const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
41
+ const { render } = (0, index_js_namespaceObject.useSchemaSettingsRender)(fieldSchema['x-settings'] || 'PageSettings', fieldSchema['x-settings-props']);
42
+ if (!designable) return null;
43
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(context_index_js_namespaceObject.SchemaToolbarProvider, {
44
+ title: title,
45
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
46
+ className: 'general-schema-designer',
47
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
48
+ className: 'general-schema-designer-icons',
49
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Space, {
50
+ size: 2,
51
+ align: 'center',
52
+ children: render()
53
+ })
54
+ })
55
+ })
56
+ });
57
+ };
58
+ var __webpack_export_target__ = exports;
59
+ for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
60
+ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
61
+ value: true
62
+ });
@@ -26,70 +26,22 @@ var __webpack_require__ = {};
26
26
  var __webpack_exports__ = {};
27
27
  __webpack_require__.r(__webpack_exports__);
28
28
  __webpack_require__.d(__webpack_exports__, {
29
- PageDesigner: ()=>PageDesigner,
30
29
  PageTabDesigner: ()=>PageTabDesigner
31
30
  });
32
31
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
33
- require("react");
34
32
  const schema_namespaceObject = require("@tachybase/schema");
35
- const icons_namespaceObject = require("@ant-design/icons");
36
- const external_antd_namespaceObject = require("antd");
37
33
  const external_index_js_namespaceObject = require("../../index.js");
38
34
  const index_js_namespaceObject = require("../../../application/schema-settings/hooks/index.js");
39
35
  const context_index_js_namespaceObject = require("../../../application/schema-toolbar/context/index.js");
40
- const useGetAriaLabelOfDesigner_js_namespaceObject = require("../../../schema-settings/hooks/useGetAriaLabelOfDesigner.js");
41
- const PageDesigner = (param)=>{
42
- let { title } = param;
43
- const { designable } = (0, external_index_js_namespaceObject.useDesignable)();
44
- const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
45
- const { render } = (0, index_js_namespaceObject.useSchemaSettingsRender)(fieldSchema['x-settings'] || 'PageSettings', fieldSchema['x-settings-props']);
46
- if (!designable) return null;
47
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(context_index_js_namespaceObject.SchemaToolbarProvider, {
48
- title: title,
49
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
50
- className: 'general-schema-designer',
51
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
52
- className: 'general-schema-designer-icons',
53
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Space, {
54
- size: 2,
55
- align: 'center',
56
- children: render()
57
- })
58
- })
59
- })
60
- });
61
- };
62
36
  const PageTabDesigner = (param)=>{
63
37
  let { schema } = param;
64
38
  const { designable } = (0, external_index_js_namespaceObject.useDesignable)();
65
- const { getAriaLabel } = (0, useGetAriaLabelOfDesigner_js_namespaceObject.useGetAriaLabelOfDesigner)();
66
39
  const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
67
- const { render } = (0, index_js_namespaceObject.useSchemaSettingsRender)(fieldSchema['x-settings'] || 'PageTabSettings', fieldSchema['x-settings-props']);
40
+ const { render: renderDesigner } = (0, index_js_namespaceObject.useSchemaSettingsRender)(fieldSchema['x-settings'] || 'PageTabSettings', fieldSchema['x-settings-props']);
68
41
  if (!designable) return null;
69
42
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(context_index_js_namespaceObject.SchemaToolbarProvider, {
70
43
  schema: schema,
71
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
72
- className: 'general-schema-designer',
73
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
74
- className: 'general-schema-designer-icons',
75
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_antd_namespaceObject.Space, {
76
- size: 3,
77
- align: 'center',
78
- children: [
79
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject.DragHandler, {
80
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.DragOutlined, {
81
- style: {
82
- marginRight: 0
83
- },
84
- role: "button",
85
- "aria-label": getAriaLabel('drag-handler', 'tab')
86
- })
87
- }),
88
- render()
89
- ]
90
- })
91
- })
92
- })
44
+ children: renderDesigner()
93
45
  });
94
46
  };
95
47
  var __webpack_export_target__ = exports;
@@ -26,10 +26,10 @@ var __webpack_require__ = {};
26
26
  var __webpack_exports__ = {};
27
27
  __webpack_require__.r(__webpack_exports__);
28
28
  __webpack_require__.d(__webpack_exports__, {
29
- useStyles: ()=>useStyles
29
+ getStyles: ()=>getStyles
30
30
  });
31
31
  const index_js_namespaceObject = require("../__builtins__/index.js");
32
- const useStyles = (0, index_js_namespaceObject.genStyleHook)('tb-page', (token)=>{
32
+ const getStyles = (0, index_js_namespaceObject.genStyleHook)('tb-page', (token)=>{
33
33
  const { componentCls } = token;
34
34
  return {
35
35
  [componentCls]: {
@@ -76,8 +76,7 @@ const useStyles = (0, index_js_namespaceObject.genStyleHook)('tb-page', (token)=
76
76
  }
77
77
  },
78
78
  '.tb-page-header-wrapper': {
79
- zIndex: 10,
80
- boxShadow: '1px 1px 10px 1px rgba(0, 0, 0, 0.1)'
79
+ zIndex: 10
81
80
  },
82
81
  '.pageHeaderCss': {
83
82
  backgroundColor: token.colorBgContainer,
@@ -101,10 +100,6 @@ const useStyles = (0, index_js_namespaceObject.genStyleHook)('tb-page', (token)=
101
100
  fontSize: 0,
102
101
  height: 0
103
102
  },
104
- '.addTabBtn': {
105
- borderColor: 'var(--colorSettings)',
106
- color: 'var(--colorSettings)'
107
- },
108
103
  '.designerCss': {
109
104
  position: 'relative',
110
105
  '&:hover': {
@@ -161,11 +156,6 @@ const useStyles = (0, index_js_namespaceObject.genStyleHook)('tb-page', (token)=
161
156
  paddingBottom: 0,
162
157
  overflowX: 'hidden',
163
158
  overflowY: 'scroll'
164
- },
165
- '.tb-tabs-wrapper': {
166
- display: 'flex',
167
- flexDirection: 'row',
168
- justifyContent: 'flex-end'
169
159
  }
170
160
  }
171
161
  };
@@ -33,7 +33,7 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
33
33
  const external_react_namespaceObject = require("react");
34
34
  const external_index_js_namespaceObject = require("../../../index.js");
35
35
  const useJoystick_js_namespaceObject = require("../../../built-in/scroll-assistant/useJoystick.js");
36
- const ScrollArea = ()=>{
36
+ const ScrollArea = (props)=>{
37
37
  const ref = (0, external_react_namespaceObject.useRef)(null);
38
38
  const { t } = (0, external_index_js_namespaceObject.useTranslation)();
39
39
  (0, useJoystick_js_namespaceObject.useJoystick)(ref);
@@ -50,6 +50,7 @@ const ScrollArea = ()=>{
50
50
  cursor: 'pointer',
51
51
  userSelect: 'none'
52
52
  },
53
+ ...props,
53
54
  children: t('Horizontal scrolling area')
54
55
  });
55
56
  };
@@ -187,7 +187,7 @@ function getCurrentRange(element) {
187
187
  function TextArea(props) {
188
188
  const { value: propsValue, scope, onChange, multiline = true, changeOnSelect } = props;
189
189
  const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
190
- const value = propsValue || fieldSchema.default || '';
190
+ const value = propsValue || (null == fieldSchema ? void 0 : fieldSchema.default) || '';
191
191
  const { styles } = (0, external_style_js_namespaceObject.useStyles)({
192
192
  multiline
193
193
  });
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = function(exports1, definition) {
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = function(obj, prop) {
13
+ return Object.prototype.hasOwnProperty.call(obj, prop);
14
+ };
15
+ })();
16
+ (()=>{
17
+ __webpack_require__.r = function(exports1) {
18
+ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
19
+ value: 'Module'
20
+ });
21
+ Object.defineProperty(exports1, '__esModule', {
22
+ value: true
23
+ });
24
+ };
25
+ })();
26
+ var __webpack_exports__ = {};
27
+ __webpack_require__.r(__webpack_exports__);
28
+ __webpack_require__.d(__webpack_exports__, {
29
+ useEnvironmentVariableOptions: ()=>useEnvironmentVariableOptions,
30
+ TextAreaWithGlobalScope: ()=>TextAreaWithGlobalScope
31
+ });
32
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
33
+ const external_react_namespaceObject = require("react");
34
+ const schema_namespaceObject = require("@tachybase/schema");
35
+ const useGlobalVariable_js_namespaceObject = require("../../../application/hooks/useGlobalVariable.js");
36
+ const index_js_namespaceObject = require("../input/index.js");
37
+ const external_password_index_js_namespaceObject = require("../password/index.js");
38
+ const external_RawTextArea_js_namespaceObject = require("./RawTextArea.js");
39
+ const external_TextArea_js_namespaceObject = require("./TextArea.js");
40
+ const external_Variable_js_namespaceObject = require("./Variable.js");
41
+ const useEnvironmentVariableOptions = (scope)=>{
42
+ const environmentVariables = (0, useGlobalVariable_js_namespaceObject.useGlobalVariable)('$env');
43
+ return (0, external_react_namespaceObject.useMemo)(()=>{
44
+ if (environmentVariables) return [
45
+ environmentVariables
46
+ ].filter(Boolean);
47
+ return scope;
48
+ }, [
49
+ environmentVariables,
50
+ scope
51
+ ]);
52
+ };
53
+ const isVariable = (value)=>{
54
+ const regex = /{{.*?}}/;
55
+ return regex.test(value);
56
+ };
57
+ const TextAreaWithGlobalScope = (0, schema_namespaceObject.connect)((props)=>{
58
+ const { supportsLineBreak, password, number, boolean, ...others } = props;
59
+ const scope = useEnvironmentVariableOptions(props.scope);
60
+ const fieldNames = {
61
+ value: 'name',
62
+ label: 'title'
63
+ };
64
+ if (supportsLineBreak) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_RawTextArea_js_namespaceObject.RawTextArea, {
65
+ ...others,
66
+ scope: scope,
67
+ fieldNames: fieldNames,
68
+ rows: 3
69
+ });
70
+ if (number) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_Variable_js_namespaceObject.Variable.Input, {
71
+ ...props,
72
+ scope: scope,
73
+ fieldNames: fieldNames
74
+ });
75
+ if (password && props.value && !isVariable(props.value)) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_password_index_js_namespaceObject.Password, {
76
+ ...others,
77
+ autoFocus: true
78
+ });
79
+ if (boolean) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_Variable_js_namespaceObject.Variable.Input, {
80
+ ...props,
81
+ scope: scope,
82
+ fieldNames: fieldNames
83
+ });
84
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_TextArea_js_namespaceObject.TextArea, {
85
+ ...others,
86
+ scope: scope,
87
+ fieldNames: fieldNames
88
+ });
89
+ }, (0, schema_namespaceObject.mapReadPretty)(index_js_namespaceObject.Input.ReadPretty));
90
+ var __webpack_export_target__ = exports;
91
+ for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
92
+ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
93
+ value: true
94
+ });
@@ -1,5 +1,8 @@
1
1
  "use strict";
2
2
  var __webpack_modules__ = {
3
+ "./TextAreaWithGlobalScope": function(module) {
4
+ module.exports = require("./TextAreaWithGlobalScope.js");
5
+ },
3
6
  "./Variable": function(module) {
4
7
  module.exports = require("./Variable.js");
5
8
  }
@@ -52,12 +55,21 @@ function __webpack_require__(moduleId) {
52
55
  })();
53
56
  var __webpack_exports__ = {};
54
57
  __webpack_require__.r(__webpack_exports__);
58
+ __webpack_require__.d(__webpack_exports__, {
59
+ TextAreaWithGlobalScope: function() {
60
+ return _TextAreaWithGlobalScope__WEBPACK_IMPORTED_MODULE_1__.TextAreaWithGlobalScope;
61
+ }
62
+ });
55
63
  var _Variable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./Variable");
56
64
  var __WEBPACK_REEXPORT_OBJECT__ = {};
57
- for(var __WEBPACK_IMPORT_KEY__ in _Variable__WEBPACK_IMPORTED_MODULE_0__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
65
+ for(var __WEBPACK_IMPORT_KEY__ in _Variable__WEBPACK_IMPORTED_MODULE_0__)if ([
66
+ "default",
67
+ "TextAreaWithGlobalScope"
68
+ ].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
58
69
  return _Variable__WEBPACK_IMPORTED_MODULE_0__[key];
59
70
  }).bind(0, __WEBPACK_IMPORT_KEY__);
60
71
  __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
72
+ var _TextAreaWithGlobalScope__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./TextAreaWithGlobalScope");
61
73
  var __webpack_export_target__ = exports;
62
74
  for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
63
75
  if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tachybase/client",
3
- "version": "0.23.48",
3
+ "version": "0.23.58",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.mjs",
@@ -64,12 +64,12 @@
64
64
  "react-zoom-pan-pinch": "^3.6.1",
65
65
  "sanitize-html": "2.14.0",
66
66
  "use-deep-compare-effect": "^1.8.1",
67
- "@tachybase/components": "0.23.48",
68
- "@tachybase/requirejs": "0.23.48",
69
- "@tachybase/evaluators": "0.23.48",
70
- "@tachybase/schema": "0.23.48",
71
- "@tachybase/utils": "0.23.48",
72
- "@tachybase/sdk": "0.23.48"
67
+ "@tachybase/evaluators": "0.23.58",
68
+ "@tachybase/components": "0.23.58",
69
+ "@tachybase/requirejs": "0.23.58",
70
+ "@tachybase/schema": "0.23.58",
71
+ "@tachybase/sdk": "0.23.58",
72
+ "@tachybase/utils": "0.23.58"
73
73
  },
74
74
  "devDependencies": {
75
75
  "@testing-library/react": "^16.2.0",