@flowgram.ai/form-materials 0.4.17 → 0.4.19

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 (77) hide show
  1. package/bin/run.sh +2 -1
  2. package/dist/cjs/components/code-editor/editor-all.js +52 -0
  3. package/dist/cjs/components/code-editor/editor-json.js +71 -0
  4. package/dist/cjs/components/code-editor/editor-python.js +63 -0
  5. package/dist/cjs/components/code-editor/editor-shell.js +63 -0
  6. package/dist/cjs/components/code-editor/editor-sql.js +71 -0
  7. package/dist/cjs/components/code-editor/editor-ts.js +80 -0
  8. package/dist/cjs/components/code-editor/editor.js +41 -30
  9. package/dist/cjs/components/code-editor/factory.js +96 -0
  10. package/dist/cjs/components/code-editor/index.js +31 -36
  11. package/dist/cjs/components/code-editor/utils.js +1 -0
  12. package/dist/cjs/components/index.js +38 -3
  13. package/dist/cjs/components/json-editor-with-variables/editor.js +1 -2
  14. package/dist/cjs/components/sql-editor-with-variables/editor.js +53 -0
  15. package/dist/cjs/components/sql-editor-with-variables/index.js +57 -0
  16. package/dist/cjs/index.js +35 -2
  17. package/dist/cjs/plugins/json-schema-preset/type-definition/array.js +3 -3
  18. package/dist/cjs/plugins/json-schema-preset/type-definition/map.js +3 -3
  19. package/dist/cjs/plugins/json-schema-preset/type-definition/object.js +3 -3
  20. package/dist/esm/components/code-editor/editor-all.mjs +18 -0
  21. package/dist/esm/components/code-editor/editor-json.mjs +16 -0
  22. package/dist/esm/components/code-editor/editor-python.mjs +8 -0
  23. package/dist/esm/components/code-editor/editor-shell.mjs +8 -0
  24. package/dist/esm/components/code-editor/editor-sql.mjs +16 -0
  25. package/dist/esm/components/code-editor/editor-ts.mjs +22 -0
  26. package/dist/esm/components/code-editor/editor.mjs +38 -28
  27. package/dist/esm/components/code-editor/factory.mjs +36 -0
  28. package/dist/esm/components/code-editor/index.mjs +8 -8
  29. package/dist/esm/components/code-editor/utils.mjs +1 -0
  30. package/dist/esm/components/index.mjs +4 -2
  31. package/dist/esm/components/json-editor-with-variables/editor.mjs +2 -3
  32. package/dist/esm/components/sql-editor-with-variables/editor.mjs +19 -0
  33. package/dist/esm/components/sql-editor-with-variables/index.mjs +5 -0
  34. package/dist/esm/index.mjs +2 -2
  35. package/dist/esm/plugins/json-schema-preset/type-definition/array.mjs +3 -3
  36. package/dist/esm/plugins/json-schema-preset/type-definition/map.mjs +3 -3
  37. package/dist/esm/plugins/json-schema-preset/type-definition/object.mjs +3 -3
  38. package/dist/tsconfig.tsbuildinfo +1 -1
  39. package/dist/types/components/code-editor/editor-all.d.ts +8 -0
  40. package/dist/types/components/code-editor/editor-json.d.ts +6 -0
  41. package/dist/types/components/code-editor/editor-python.d.ts +6 -0
  42. package/dist/types/components/code-editor/editor-shell.d.ts +6 -0
  43. package/dist/types/components/code-editor/editor-sql.d.ts +6 -0
  44. package/dist/types/components/code-editor/editor-ts.d.ts +6 -0
  45. package/dist/types/components/code-editor/editor.d.ts +3 -2
  46. package/dist/types/components/code-editor/factory.d.ts +13 -0
  47. package/dist/types/components/code-editor/index.d.ts +7 -2
  48. package/dist/types/components/code-editor/utils.d.ts +1 -1
  49. package/dist/types/components/code-editor-mini/index.d.ts +3 -0
  50. package/dist/types/components/index.d.ts +4 -2
  51. package/dist/types/components/sql-editor-with-variables/editor.d.ts +9 -0
  52. package/dist/types/components/sql-editor-with-variables/index.d.ts +6 -0
  53. package/dist/types/index.d.ts +1 -1
  54. package/package.json +7 -8
  55. package/src/components/code-editor/editor-all.tsx +30 -0
  56. package/src/components/code-editor/editor-json.tsx +25 -0
  57. package/src/components/code-editor/editor-python.tsx +18 -0
  58. package/src/components/code-editor/editor-shell.tsx +18 -0
  59. package/src/components/code-editor/editor-sql.tsx +24 -0
  60. package/src/components/code-editor/editor-ts.tsx +31 -0
  61. package/src/components/code-editor/editor.tsx +45 -33
  62. package/src/components/code-editor/factory.tsx +61 -0
  63. package/src/components/code-editor/index.tsx +7 -9
  64. package/src/components/code-editor/utils.ts +4 -0
  65. package/src/components/code-editor-mini/index.tsx +3 -0
  66. package/src/components/index.ts +25 -2
  67. package/src/components/json-editor-with-variables/editor.tsx +3 -4
  68. package/src/components/sql-editor-with-variables/editor.tsx +28 -0
  69. package/src/components/sql-editor-with-variables/index.tsx +12 -0
  70. package/src/index.ts +19 -3
  71. package/src/plugins/json-schema-preset/type-definition/array.tsx +3 -3
  72. package/src/plugins/json-schema-preset/type-definition/map.tsx +3 -3
  73. package/src/plugins/json-schema-preset/type-definition/object.tsx +3 -3
  74. package/dist/cjs/components/code-editor/language-features.js +0 -124
  75. package/dist/esm/components/code-editor/language-features.mjs +0 -51
  76. package/dist/types/components/code-editor/language-features.d.ts +0 -8
  77. package/src/components/code-editor/language-features.ts +0 -61
@@ -1,26 +1,5 @@
1
1
  "use strict";
2
- var __webpack_modules__ = {
3
- "./editor": function(module) {
4
- module.exports = import("./editor.js").then(function(module) {
5
- return module;
6
- });
7
- },
8
- "./theme": function(module) {
9
- module.exports = import("./theme/index.js").then(function(module) {
10
- return module;
11
- });
12
- }
13
- };
14
- var __webpack_module_cache__ = {};
15
- function __webpack_require__(moduleId) {
16
- var cachedModule = __webpack_module_cache__[moduleId];
17
- if (void 0 !== cachedModule) return cachedModule.exports;
18
- var module = __webpack_module_cache__[moduleId] = {
19
- exports: {}
20
- };
21
- __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
22
- return module.exports;
23
- }
2
+ var __webpack_require__ = {};
24
3
  (()=>{
25
4
  __webpack_require__.d = (exports1, definition)=>{
26
5
  for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
@@ -43,22 +22,38 @@ function __webpack_require__(moduleId) {
43
22
  };
44
23
  })();
45
24
  var __webpack_exports__ = {};
46
- (()=>{
47
- __webpack_require__.r(__webpack_exports__);
48
- __webpack_require__.d(__webpack_exports__, {
49
- CodeEditor: ()=>CodeEditor
50
- });
51
- const index_js_namespaceObject = require("../../shared/index.js");
52
- const CodeEditor = (0, index_js_namespaceObject.lazySuspense)(()=>Promise.all([
53
- Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "./editor")),
54
- Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "./theme"))
55
- ]).then(([editorModule])=>({
56
- default: editorModule.CodeEditor
57
- })));
58
- })();
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ SQLCodeEditor: ()=>external_editor_sql_js_namespaceObject.SQLCodeEditor,
28
+ CodeEditor: ()=>external_editor_all_js_namespaceObject.CodeEditor,
29
+ PythonCodeEditor: ()=>external_editor_python_js_namespaceObject.PythonCodeEditor,
30
+ JsonCodeEditor: ()=>external_editor_json_js_namespaceObject.JsonCodeEditor,
31
+ BaseCodeEditor: ()=>external_editor_js_namespaceObject.BaseCodeEditor,
32
+ TypeScriptCodeEditor: ()=>external_editor_ts_js_namespaceObject.TypeScriptCodeEditor,
33
+ ShellCodeEditor: ()=>external_editor_shell_js_namespaceObject.ShellCodeEditor
34
+ });
35
+ const external_editor_all_js_namespaceObject = require("./editor-all.js");
36
+ const external_editor_ts_js_namespaceObject = require("./editor-ts.js");
37
+ const external_editor_shell_js_namespaceObject = require("./editor-shell.js");
38
+ const external_editor_json_js_namespaceObject = require("./editor-json.js");
39
+ const external_editor_sql_js_namespaceObject = require("./editor-sql.js");
40
+ const external_editor_python_js_namespaceObject = require("./editor-python.js");
41
+ const external_editor_js_namespaceObject = require("./editor.js");
42
+ exports.BaseCodeEditor = __webpack_exports__.BaseCodeEditor;
59
43
  exports.CodeEditor = __webpack_exports__.CodeEditor;
44
+ exports.JsonCodeEditor = __webpack_exports__.JsonCodeEditor;
45
+ exports.PythonCodeEditor = __webpack_exports__.PythonCodeEditor;
46
+ exports.SQLCodeEditor = __webpack_exports__.SQLCodeEditor;
47
+ exports.ShellCodeEditor = __webpack_exports__.ShellCodeEditor;
48
+ exports.TypeScriptCodeEditor = __webpack_exports__.TypeScriptCodeEditor;
60
49
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
61
- "CodeEditor"
50
+ "BaseCodeEditor",
51
+ "CodeEditor",
52
+ "JsonCodeEditor",
53
+ "PythonCodeEditor",
54
+ "SQLCodeEditor",
55
+ "ShellCodeEditor",
56
+ "TypeScriptCodeEditor"
62
57
  ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
63
58
  Object.defineProperty(exports, '__esModule', {
64
59
  value: true
@@ -31,6 +31,7 @@ function getSuffixByLanguageId(languageId) {
31
31
  if ("typescript" === languageId) return '.ts';
32
32
  if ('shell' === languageId) return '.sh';
33
33
  if ('json' === languageId) return '.json';
34
+ if ('sql' === languageId) return '.sql';
34
35
  return '';
35
36
  }
36
37
  exports.getSuffixByLanguageId = __webpack_exports__.getSuffixByLanguageId;
@@ -25,6 +25,7 @@ var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
27
  BatchVariableSelector: ()=>external_batch_variable_selector_index_js_namespaceObject.BatchVariableSelector,
28
+ JsonCodeEditor: ()=>external_code_editor_index_js_namespaceObject.JsonCodeEditor,
28
29
  AssignRow: ()=>index_js_namespaceObject.AssignRow,
29
30
  TypeSelector: ()=>external_type_selector_index_js_namespaceObject.TypeSelector,
30
31
  CodeEditorMini: ()=>external_code_editor_mini_index_js_namespaceObject.CodeEditorMini,
@@ -33,28 +34,38 @@ __webpack_require__.d(__webpack_exports__, {
33
34
  AssignRows: ()=>external_assign_rows_index_js_namespaceObject.AssignRows,
34
35
  ConditionRow: ()=>external_condition_row_index_js_namespaceObject.ConditionRow,
35
36
  EditorInputsTree: ()=>external_coze_editor_extensions_index_js_namespaceObject.EditorInputsTree,
37
+ ConditionProvider: ()=>external_condition_context_index_js_namespaceObject.ConditionProvider,
36
38
  InjectDynamicValueInput: ()=>external_dynamic_value_input_index_js_namespaceObject.InjectDynamicValueInput,
37
- PromptEditorWithVariables: ()=>external_prompt_editor_with_variables_index_js_namespaceObject.PromptEditorWithVariables,
38
39
  JsonEditorWithVariables: ()=>external_json_editor_with_variables_index_js_namespaceObject.JsonEditorWithVariables,
39
40
  InjectVariableSelector: ()=>external_variable_selector_index_js_namespaceObject.InjectVariableSelector,
41
+ PromptEditorWithVariables: ()=>external_prompt_editor_with_variables_index_js_namespaceObject.PromptEditorWithVariables,
40
42
  DisplayOutputs: ()=>external_display_outputs_index_js_namespaceObject.DisplayOutputs,
43
+ BaseCodeEditor: ()=>external_code_editor_index_js_namespaceObject.BaseCodeEditor,
44
+ useConditionContext: ()=>external_condition_context_index_js_namespaceObject.useConditionContext,
41
45
  DisplaySchemaTree: ()=>external_display_schema_tree_index_js_namespaceObject.DisplaySchemaTree,
46
+ useCondition: ()=>external_condition_context_index_js_namespaceObject.useCondition,
42
47
  PromptEditor: ()=>external_prompt_editor_index_js_namespaceObject.PromptEditor,
43
48
  ConstantInput: ()=>external_constant_input_index_js_namespaceObject.ConstantInput,
44
49
  BlurInput: ()=>external_blur_input_index_js_namespaceObject.BlurInput,
45
50
  DisplaySchemaTag: ()=>external_display_schema_tag_index_js_namespaceObject.DisplaySchemaTag,
51
+ ConditionPresetOp: ()=>external_condition_context_index_js_namespaceObject.ConditionPresetOp,
46
52
  InputsValues: ()=>external_inputs_values_index_js_namespaceObject.InputsValues,
47
- useVariableTree: ()=>external_variable_selector_index_js_namespaceObject.useVariableTree,
53
+ PythonCodeEditor: ()=>external_code_editor_index_js_namespaceObject.PythonCodeEditor,
54
+ SQLCodeEditor: ()=>external_code_editor_index_js_namespaceObject.SQLCodeEditor,
48
55
  InjectTypeSelector: ()=>external_type_selector_index_js_namespaceObject.InjectTypeSelector,
56
+ ShellCodeEditor: ()=>external_code_editor_index_js_namespaceObject.ShellCodeEditor,
49
57
  VariableSelectorProvider: ()=>external_variable_selector_index_js_namespaceObject.VariableSelectorProvider,
58
+ useVariableTree: ()=>external_variable_selector_index_js_namespaceObject.useVariableTree,
50
59
  DisplayFlowValue: ()=>external_display_flow_value_index_js_namespaceObject.DisplayFlowValue,
51
60
  JsonSchemaEditor: ()=>external_json_schema_editor_index_js_namespaceObject.JsonSchemaEditor,
52
61
  EditorVariableTagInject: ()=>external_coze_editor_extensions_index_js_namespaceObject.EditorVariableTagInject,
53
62
  InputsValuesTree: ()=>external_inputs_values_tree_index_js_namespaceObject.InputsValuesTree,
54
63
  PromptEditorWithInputs: ()=>external_prompt_editor_with_inputs_index_js_namespaceObject.PromptEditorWithInputs,
55
- parseTypeSelectValue: ()=>external_type_selector_index_js_namespaceObject.parseTypeSelectValue,
64
+ SQLEditorWithVariables: ()=>external_sql_editor_with_variables_index_js_namespaceObject.SQLEditorWithVariables,
65
+ TypeScriptCodeEditor: ()=>external_code_editor_index_js_namespaceObject.TypeScriptCodeEditor,
56
66
  CodeEditor: ()=>external_code_editor_index_js_namespaceObject.CodeEditor,
57
67
  DisplayInputsValueAllInTag: ()=>external_display_inputs_values_index_js_namespaceObject.DisplayInputsValueAllInTag,
68
+ parseTypeSelectValue: ()=>external_type_selector_index_js_namespaceObject.parseTypeSelectValue,
58
69
  EditorVariableTree: ()=>external_coze_editor_extensions_index_js_namespaceObject.EditorVariableTree,
59
70
  getTypeSelectValue: ()=>external_type_selector_index_js_namespaceObject.getTypeSelectValue,
60
71
  DisplayInputsValues: ()=>external_display_inputs_values_index_js_namespaceObject.DisplayInputsValues,
@@ -68,6 +79,7 @@ const external_batch_variable_selector_index_js_namespaceObject = require("./bat
68
79
  const external_blur_input_index_js_namespaceObject = require("./blur-input/index.js");
69
80
  const external_code_editor_index_js_namespaceObject = require("./code-editor/index.js");
70
81
  const external_code_editor_mini_index_js_namespaceObject = require("./code-editor-mini/index.js");
82
+ const external_condition_context_index_js_namespaceObject = require("./condition-context/index.js");
71
83
  const external_condition_row_index_js_namespaceObject = require("./condition-row/index.js");
72
84
  const external_constant_input_index_js_namespaceObject = require("./constant-input/index.js");
73
85
  const external_coze_editor_extensions_index_js_namespaceObject = require("./coze-editor-extensions/index.js");
@@ -85,15 +97,19 @@ const external_json_schema_editor_index_js_namespaceObject = require("./json-sch
85
97
  const external_prompt_editor_index_js_namespaceObject = require("./prompt-editor/index.js");
86
98
  const external_prompt_editor_with_inputs_index_js_namespaceObject = require("./prompt-editor-with-inputs/index.js");
87
99
  const external_prompt_editor_with_variables_index_js_namespaceObject = require("./prompt-editor-with-variables/index.js");
100
+ const external_sql_editor_with_variables_index_js_namespaceObject = require("./sql-editor-with-variables/index.js");
88
101
  const external_type_selector_index_js_namespaceObject = require("./type-selector/index.js");
89
102
  const external_variable_selector_index_js_namespaceObject = require("./variable-selector/index.js");
90
103
  exports.AssignRow = __webpack_exports__.AssignRow;
91
104
  exports.AssignRows = __webpack_exports__.AssignRows;
105
+ exports.BaseCodeEditor = __webpack_exports__.BaseCodeEditor;
92
106
  exports.BatchOutputs = __webpack_exports__.BatchOutputs;
93
107
  exports.BatchVariableSelector = __webpack_exports__.BatchVariableSelector;
94
108
  exports.BlurInput = __webpack_exports__.BlurInput;
95
109
  exports.CodeEditor = __webpack_exports__.CodeEditor;
96
110
  exports.CodeEditorMini = __webpack_exports__.CodeEditorMini;
111
+ exports.ConditionPresetOp = __webpack_exports__.ConditionPresetOp;
112
+ exports.ConditionProvider = __webpack_exports__.ConditionProvider;
97
113
  exports.ConditionRow = __webpack_exports__.ConditionRow;
98
114
  exports.ConstantInput = __webpack_exports__.ConstantInput;
99
115
  exports.DBConditionRow = __webpack_exports__.DBConditionRow;
@@ -112,25 +128,36 @@ exports.InjectTypeSelector = __webpack_exports__.InjectTypeSelector;
112
128
  exports.InjectVariableSelector = __webpack_exports__.InjectVariableSelector;
113
129
  exports.InputsValues = __webpack_exports__.InputsValues;
114
130
  exports.InputsValuesTree = __webpack_exports__.InputsValuesTree;
131
+ exports.JsonCodeEditor = __webpack_exports__.JsonCodeEditor;
115
132
  exports.JsonEditorWithVariables = __webpack_exports__.JsonEditorWithVariables;
116
133
  exports.JsonSchemaEditor = __webpack_exports__.JsonSchemaEditor;
117
134
  exports.PromptEditor = __webpack_exports__.PromptEditor;
118
135
  exports.PromptEditorWithInputs = __webpack_exports__.PromptEditorWithInputs;
119
136
  exports.PromptEditorWithVariables = __webpack_exports__.PromptEditorWithVariables;
137
+ exports.PythonCodeEditor = __webpack_exports__.PythonCodeEditor;
138
+ exports.SQLCodeEditor = __webpack_exports__.SQLCodeEditor;
139
+ exports.SQLEditorWithVariables = __webpack_exports__.SQLEditorWithVariables;
140
+ exports.ShellCodeEditor = __webpack_exports__.ShellCodeEditor;
141
+ exports.TypeScriptCodeEditor = __webpack_exports__.TypeScriptCodeEditor;
120
142
  exports.TypeSelector = __webpack_exports__.TypeSelector;
121
143
  exports.VariableSelector = __webpack_exports__.VariableSelector;
122
144
  exports.VariableSelectorProvider = __webpack_exports__.VariableSelectorProvider;
123
145
  exports.getTypeSelectValue = __webpack_exports__.getTypeSelectValue;
124
146
  exports.parseTypeSelectValue = __webpack_exports__.parseTypeSelectValue;
147
+ exports.useCondition = __webpack_exports__.useCondition;
148
+ exports.useConditionContext = __webpack_exports__.useConditionContext;
125
149
  exports.useVariableTree = __webpack_exports__.useVariableTree;
126
150
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
127
151
  "AssignRow",
128
152
  "AssignRows",
153
+ "BaseCodeEditor",
129
154
  "BatchOutputs",
130
155
  "BatchVariableSelector",
131
156
  "BlurInput",
132
157
  "CodeEditor",
133
158
  "CodeEditorMini",
159
+ "ConditionPresetOp",
160
+ "ConditionProvider",
134
161
  "ConditionRow",
135
162
  "ConstantInput",
136
163
  "DBConditionRow",
@@ -149,16 +176,24 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
149
176
  "InjectVariableSelector",
150
177
  "InputsValues",
151
178
  "InputsValuesTree",
179
+ "JsonCodeEditor",
152
180
  "JsonEditorWithVariables",
153
181
  "JsonSchemaEditor",
154
182
  "PromptEditor",
155
183
  "PromptEditorWithInputs",
156
184
  "PromptEditorWithVariables",
185
+ "PythonCodeEditor",
186
+ "SQLCodeEditor",
187
+ "SQLEditorWithVariables",
188
+ "ShellCodeEditor",
189
+ "TypeScriptCodeEditor",
157
190
  "TypeSelector",
158
191
  "VariableSelector",
159
192
  "VariableSelectorProvider",
160
193
  "getTypeSelectValue",
161
194
  "parseTypeSelectValue",
195
+ "useCondition",
196
+ "useConditionContext",
162
197
  "useVariableTree"
163
198
  ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
164
199
  Object.defineProperty(exports, '__esModule', {
@@ -60,8 +60,7 @@ const transformer = (0, preset_code_namespaceObject.transformerCreator)((text)=>
60
60
  return text;
61
61
  });
62
62
  function JsonEditorWithVariables(props) {
63
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_code_editor_index_js_namespaceObject.CodeEditor, {
64
- languageId: "json",
63
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_code_editor_index_js_namespaceObject.JsonCodeEditor, {
65
64
  activeLinePlaceholder: editor_namespaceObject.I18n.t("Press '@' to Select variable"),
66
65
  ...props,
67
66
  options: {
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (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 = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ SQLEditorWithVariables: ()=>SQLEditorWithVariables
28
+ });
29
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
+ require("react");
31
+ const editor_namespaceObject = require("@flowgram.ai/editor");
32
+ const index_js_namespaceObject = require("../coze-editor-extensions/index.js");
33
+ const external_code_editor_index_js_namespaceObject = require("../code-editor/index.js");
34
+ function SQLEditorWithVariables(props) {
35
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_code_editor_index_js_namespaceObject.SQLCodeEditor, {
36
+ activeLinePlaceholder: editor_namespaceObject.I18n.t("Press '@' to Select variable"),
37
+ ...props,
38
+ options: {
39
+ ...props.options || {}
40
+ },
41
+ children: [
42
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.EditorVariableTree, {}),
43
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.EditorVariableTagInject, {})
44
+ ]
45
+ });
46
+ }
47
+ exports.SQLEditorWithVariables = __webpack_exports__.SQLEditorWithVariables;
48
+ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
49
+ "SQLEditorWithVariables"
50
+ ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
51
+ Object.defineProperty(exports, '__esModule', {
52
+ value: true
53
+ });
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __webpack_modules__ = {
3
+ "./editor": function(module) {
4
+ module.exports = import("./editor.js").then(function(module) {
5
+ return module;
6
+ });
7
+ }
8
+ };
9
+ var __webpack_module_cache__ = {};
10
+ function __webpack_require__(moduleId) {
11
+ var cachedModule = __webpack_module_cache__[moduleId];
12
+ if (void 0 !== cachedModule) return cachedModule.exports;
13
+ var module = __webpack_module_cache__[moduleId] = {
14
+ exports: {}
15
+ };
16
+ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
17
+ return module.exports;
18
+ }
19
+ (()=>{
20
+ __webpack_require__.d = (exports1, definition)=>{
21
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
22
+ enumerable: true,
23
+ get: definition[key]
24
+ });
25
+ };
26
+ })();
27
+ (()=>{
28
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
29
+ })();
30
+ (()=>{
31
+ __webpack_require__.r = (exports1)=>{
32
+ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
33
+ value: 'Module'
34
+ });
35
+ Object.defineProperty(exports1, '__esModule', {
36
+ value: true
37
+ });
38
+ };
39
+ })();
40
+ var __webpack_exports__ = {};
41
+ (()=>{
42
+ __webpack_require__.r(__webpack_exports__);
43
+ __webpack_require__.d(__webpack_exports__, {
44
+ SQLEditorWithVariables: ()=>SQLEditorWithVariables
45
+ });
46
+ const index_js_namespaceObject = require("../../shared/index.js");
47
+ const SQLEditorWithVariables = (0, index_js_namespaceObject.lazySuspense)(()=>Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "./editor")).then((module)=>({
48
+ default: module.SQLEditorWithVariables
49
+ })));
50
+ })();
51
+ exports.SQLEditorWithVariables = __webpack_exports__.SQLEditorWithVariables;
52
+ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
53
+ "SQLEditorWithVariables"
54
+ ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
55
+ Object.defineProperty(exports, '__esModule', {
56
+ value: true
57
+ });
package/dist/cjs/index.js CHANGED
@@ -24,6 +24,7 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
+ JsonCodeEditor: ()=>index_js_namespaceObject.JsonCodeEditor,
27
28
  TypeSelector: ()=>index_js_namespaceObject.TypeSelector,
28
29
  createInjectMaterial: ()=>external_shared_index_js_namespaceObject.createInjectMaterial,
29
30
  AssignRows: ()=>index_js_namespaceObject.AssignRows,
@@ -34,20 +35,27 @@ __webpack_require__.d(__webpack_exports__, {
34
35
  JsonEditorWithVariables: ()=>index_js_namespaceObject.JsonEditorWithVariables,
35
36
  createTypePresetPlugin: ()=>external_plugins_index_js_namespaceObject.createTypePresetPlugin,
36
37
  provideBatchInputEffect: ()=>external_effects_index_js_namespaceObject.provideBatchInputEffect,
38
+ useConditionContext: ()=>index_js_namespaceObject.useConditionContext,
39
+ BaseCodeEditor: ()=>index_js_namespaceObject.BaseCodeEditor,
37
40
  PromptEditor: ()=>index_js_namespaceObject.PromptEditor,
38
41
  validateWhenVariableSync: ()=>external_effects_index_js_namespaceObject.validateWhenVariableSync,
39
42
  listenRefValueChange: ()=>external_effects_index_js_namespaceObject.listenRefValueChange,
40
43
  JsonSchemaTypePresetProvider: ()=>external_plugins_index_js_namespaceObject.JsonSchemaTypePresetProvider,
41
44
  useTypeManager: ()=>external_plugins_index_js_namespaceObject.useTypeManager,
42
45
  DisplaySchemaTag: ()=>index_js_namespaceObject.DisplaySchemaTag,
43
- provideBatchOutputsEffect: ()=>external_form_plugins_index_js_namespaceObject.provideBatchOutputsEffect,
46
+ ConditionPresetOp: ()=>index_js_namespaceObject.ConditionPresetOp,
44
47
  InputsValues: ()=>index_js_namespaceObject.InputsValues,
48
+ PythonCodeEditor: ()=>index_js_namespaceObject.PythonCodeEditor,
49
+ SQLCodeEditor: ()=>index_js_namespaceObject.SQLCodeEditor,
50
+ provideBatchOutputsEffect: ()=>external_form_plugins_index_js_namespaceObject.provideBatchOutputsEffect,
45
51
  useVariableTree: ()=>index_js_namespaceObject.useVariableTree,
46
52
  formatLegacyRefOnSubmit: ()=>external_shared_index_js_namespaceObject.formatLegacyRefOnSubmit,
47
53
  DisplayFlowValue: ()=>index_js_namespaceObject.DisplayFlowValue,
48
54
  EditorVariableTagInject: ()=>index_js_namespaceObject.EditorVariableTagInject,
55
+ SQLEditorWithVariables: ()=>index_js_namespaceObject.SQLEditorWithVariables,
49
56
  formatLegacyRefToNewRef: ()=>external_shared_index_js_namespaceObject.formatLegacyRefToNewRef,
50
57
  formatLegacyRefOnInit: ()=>external_shared_index_js_namespaceObject.formatLegacyRefOnInit,
58
+ TypeScriptCodeEditor: ()=>index_js_namespaceObject.TypeScriptCodeEditor,
51
59
  CodeEditor: ()=>index_js_namespaceObject.CodeEditor,
52
60
  DisplayInputsValueAllInTag: ()=>index_js_namespaceObject.DisplayInputsValueAllInTag,
53
61
  getTypeSelectValue: ()=>index_js_namespaceObject.getTypeSelectValue,
@@ -63,17 +71,20 @@ __webpack_require__.d(__webpack_exports__, {
63
71
  EditorInputsTree: ()=>index_js_namespaceObject.EditorInputsTree,
64
72
  PromptEditorWithVariables: ()=>index_js_namespaceObject.PromptEditorWithVariables,
65
73
  lazySuspense: ()=>external_shared_index_js_namespaceObject.lazySuspense,
74
+ ConditionProvider: ()=>index_js_namespaceObject.ConditionProvider,
66
75
  provideJsonSchemaOutputs: ()=>external_effects_index_js_namespaceObject.provideJsonSchemaOutputs,
67
- unstableSetCreateRoot: ()=>external_shared_index_js_namespaceObject.unstableSetCreateRoot,
68
76
  createInferInputsPlugin: ()=>external_form_plugins_index_js_namespaceObject.createInferInputsPlugin,
69
77
  InjectVariableSelector: ()=>index_js_namespaceObject.InjectVariableSelector,
78
+ unstableSetCreateRoot: ()=>external_shared_index_js_namespaceObject.unstableSetCreateRoot,
70
79
  DisplayOutputs: ()=>index_js_namespaceObject.DisplayOutputs,
71
80
  isLegacyFlowRefValueSchema: ()=>external_shared_index_js_namespaceObject.isLegacyFlowRefValueSchema,
72
81
  DisplaySchemaTree: ()=>index_js_namespaceObject.DisplaySchemaTree,
82
+ useCondition: ()=>index_js_namespaceObject.useCondition,
73
83
  createDisableDeclarationPlugin: ()=>external_plugins_index_js_namespaceObject.createDisableDeclarationPlugin,
74
84
  validateFlowValue: ()=>external_validate_index_js_namespaceObject.validateFlowValue,
75
85
  ConstantInput: ()=>index_js_namespaceObject.ConstantInput,
76
86
  BlurInput: ()=>index_js_namespaceObject.BlurInput,
87
+ ShellCodeEditor: ()=>index_js_namespaceObject.ShellCodeEditor,
77
88
  isNewFlowRefValueSchema: ()=>external_shared_index_js_namespaceObject.isNewFlowRefValueSchema,
78
89
  FlowValueUtils: ()=>external_shared_index_js_namespaceObject.FlowValueUtils,
79
90
  InjectTypeSelector: ()=>index_js_namespaceObject.InjectTypeSelector,
@@ -100,11 +111,14 @@ const external_shared_index_js_namespaceObject = require("./shared/index.js");
100
111
  const external_validate_index_js_namespaceObject = require("./validate/index.js");
101
112
  exports.AssignRow = __webpack_exports__.AssignRow;
102
113
  exports.AssignRows = __webpack_exports__.AssignRows;
114
+ exports.BaseCodeEditor = __webpack_exports__.BaseCodeEditor;
103
115
  exports.BatchOutputs = __webpack_exports__.BatchOutputs;
104
116
  exports.BatchVariableSelector = __webpack_exports__.BatchVariableSelector;
105
117
  exports.BlurInput = __webpack_exports__.BlurInput;
106
118
  exports.CodeEditor = __webpack_exports__.CodeEditor;
107
119
  exports.CodeEditorMini = __webpack_exports__.CodeEditorMini;
120
+ exports.ConditionPresetOp = __webpack_exports__.ConditionPresetOp;
121
+ exports.ConditionProvider = __webpack_exports__.ConditionProvider;
108
122
  exports.ConditionRow = __webpack_exports__.ConditionRow;
109
123
  exports.ConstantInput = __webpack_exports__.ConstantInput;
110
124
  exports.DBConditionRow = __webpack_exports__.DBConditionRow;
@@ -124,6 +138,7 @@ exports.InjectTypeSelector = __webpack_exports__.InjectTypeSelector;
124
138
  exports.InjectVariableSelector = __webpack_exports__.InjectVariableSelector;
125
139
  exports.InputsValues = __webpack_exports__.InputsValues;
126
140
  exports.InputsValuesTree = __webpack_exports__.InputsValuesTree;
141
+ exports.JsonCodeEditor = __webpack_exports__.JsonCodeEditor;
127
142
  exports.JsonEditorWithVariables = __webpack_exports__.JsonEditorWithVariables;
128
143
  exports.JsonSchemaEditor = __webpack_exports__.JsonSchemaEditor;
129
144
  exports.JsonSchemaTypePresetProvider = __webpack_exports__.JsonSchemaTypePresetProvider;
@@ -131,6 +146,11 @@ exports.JsonSchemaUtils = __webpack_exports__.JsonSchemaUtils;
131
146
  exports.PromptEditor = __webpack_exports__.PromptEditor;
132
147
  exports.PromptEditorWithInputs = __webpack_exports__.PromptEditorWithInputs;
133
148
  exports.PromptEditorWithVariables = __webpack_exports__.PromptEditorWithVariables;
149
+ exports.PythonCodeEditor = __webpack_exports__.PythonCodeEditor;
150
+ exports.SQLCodeEditor = __webpack_exports__.SQLCodeEditor;
151
+ exports.SQLEditorWithVariables = __webpack_exports__.SQLEditorWithVariables;
152
+ exports.ShellCodeEditor = __webpack_exports__.ShellCodeEditor;
153
+ exports.TypeScriptCodeEditor = __webpack_exports__.TypeScriptCodeEditor;
134
154
  exports.TypeSelector = __webpack_exports__.TypeSelector;
135
155
  exports.VariableSelector = __webpack_exports__.VariableSelector;
136
156
  exports.VariableSelectorProvider = __webpack_exports__.VariableSelectorProvider;
@@ -158,6 +178,8 @@ exports.provideBatchOutputsEffect = __webpack_exports__.provideBatchOutputsEffec
158
178
  exports.provideJsonSchemaOutputs = __webpack_exports__.provideJsonSchemaOutputs;
159
179
  exports.syncVariableTitle = __webpack_exports__.syncVariableTitle;
160
180
  exports.unstableSetCreateRoot = __webpack_exports__.unstableSetCreateRoot;
181
+ exports.useCondition = __webpack_exports__.useCondition;
182
+ exports.useConditionContext = __webpack_exports__.useConditionContext;
161
183
  exports.useObjectList = __webpack_exports__.useObjectList;
162
184
  exports.useTypeManager = __webpack_exports__.useTypeManager;
163
185
  exports.useVariableTree = __webpack_exports__.useVariableTree;
@@ -167,11 +189,14 @@ exports.withSuspense = __webpack_exports__.withSuspense;
167
189
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
168
190
  "AssignRow",
169
191
  "AssignRows",
192
+ "BaseCodeEditor",
170
193
  "BatchOutputs",
171
194
  "BatchVariableSelector",
172
195
  "BlurInput",
173
196
  "CodeEditor",
174
197
  "CodeEditorMini",
198
+ "ConditionPresetOp",
199
+ "ConditionProvider",
175
200
  "ConditionRow",
176
201
  "ConstantInput",
177
202
  "DBConditionRow",
@@ -191,6 +216,7 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
191
216
  "InjectVariableSelector",
192
217
  "InputsValues",
193
218
  "InputsValuesTree",
219
+ "JsonCodeEditor",
194
220
  "JsonEditorWithVariables",
195
221
  "JsonSchemaEditor",
196
222
  "JsonSchemaTypePresetProvider",
@@ -198,6 +224,11 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
198
224
  "PromptEditor",
199
225
  "PromptEditorWithInputs",
200
226
  "PromptEditorWithVariables",
227
+ "PythonCodeEditor",
228
+ "SQLCodeEditor",
229
+ "SQLEditorWithVariables",
230
+ "ShellCodeEditor",
231
+ "TypeScriptCodeEditor",
201
232
  "TypeSelector",
202
233
  "VariableSelector",
203
234
  "VariableSelectorProvider",
@@ -225,6 +256,8 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
225
256
  "provideJsonSchemaOutputs",
226
257
  "syncVariableTitle",
227
258
  "unstableSetCreateRoot",
259
+ "useCondition",
260
+ "useConditionContext",
228
261
  "useObjectList",
229
262
  "useTypeManager",
230
263
  "useVariableTree",
@@ -30,12 +30,12 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
30
  require("react");
31
31
  const editor_namespaceObject = require("@flowgram.ai/editor");
32
32
  const op_js_namespaceObject = require("../../../components/condition-context/op.js");
33
- const index_js_namespaceObject = require("../../../components/code-editor-mini/index.js");
33
+ const index_js_namespaceObject = require("../../../components/code-editor/index.js");
34
34
  const arrayRegistry = {
35
35
  type: 'array',
36
- ConstantRenderer: (props)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.CodeEditorMini, {
36
+ ConstantRenderer: (props)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.JsonCodeEditor, {
37
+ mini: true,
37
38
  value: props.value,
38
- languageId: "json",
39
39
  onChange: (v)=>props.onChange?.(v),
40
40
  placeholder: editor_namespaceObject.I18n.t('Please Input Array'),
41
41
  readonly: props.readonly
@@ -30,13 +30,13 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
30
  require("react");
31
31
  const editor_namespaceObject = require("@flowgram.ai/editor");
32
32
  const op_js_namespaceObject = require("../../../components/condition-context/op.js");
33
- const index_js_namespaceObject = require("../../../components/code-editor-mini/index.js");
33
+ const index_js_namespaceObject = require("../../../components/code-editor/index.js");
34
34
  const mapRegistry = {
35
35
  type: 'map',
36
- ConstantRenderer: (props)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.CodeEditorMini, {
36
+ ConstantRenderer: (props)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.JsonCodeEditor, {
37
+ mini: true,
37
38
  value: props.value,
38
39
  onChange: (v)=>props.onChange?.(v),
39
- languageId: "json",
40
40
  placeholder: editor_namespaceObject.I18n.t('Please Input Map'),
41
41
  readonly: props.readonly
42
42
  }),
@@ -30,13 +30,13 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
30
  require("react");
31
31
  const editor_namespaceObject = require("@flowgram.ai/editor");
32
32
  const op_js_namespaceObject = require("../../../components/condition-context/op.js");
33
- const index_js_namespaceObject = require("../../../components/code-editor-mini/index.js");
33
+ const index_js_namespaceObject = require("../../../components/code-editor/index.js");
34
34
  const objectRegistry = {
35
35
  type: 'object',
36
- ConstantRenderer: (props)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.CodeEditorMini, {
36
+ ConstantRenderer: (props)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.JsonCodeEditor, {
37
+ mini: true,
37
38
  value: props.value,
38
39
  onChange: (v)=>props.onChange?.(v),
39
- languageId: "json",
40
40
  placeholder: editor_namespaceObject.I18n.t('Please Input Object'),
41
41
  readonly: props.readonly
42
42
  }),
@@ -0,0 +1,18 @@
1
+ import { CodeEditorFactory } from "./factory.mjs";
2
+ import { loadTypescriptLanguage } from "./editor-ts.mjs";
3
+ import { loadSqlLanguage } from "./editor-sql.mjs";
4
+ import { loadShellLanguage } from "./editor-shell.mjs";
5
+ import { loadPythonLanguage } from "./editor-python.mjs";
6
+ import { loadJsonLanguage } from "./editor-json.mjs";
7
+ const languageLoaders = {
8
+ json: loadJsonLanguage,
9
+ python: loadPythonLanguage,
10
+ sql: loadSqlLanguage,
11
+ typescript: loadTypescriptLanguage,
12
+ shell: loadShellLanguage
13
+ };
14
+ const CodeEditor = CodeEditorFactory((languageId)=>languageLoaders[languageId]?.(languageId), {
15
+ displayName: 'CodeEditor',
16
+ fixLanguageId: void 0
17
+ });
18
+ export { CodeEditor };
@@ -0,0 +1,16 @@
1
+ import { languages } from "@flowgram.ai/coze-editor/preset-code";
2
+ import { mixLanguages } from "@flowgram.ai/coze-editor";
3
+ import { CodeEditorFactory } from "./factory.mjs";
4
+ const loadJsonLanguage = ()=>import("@flowgram.ai/coze-editor/language-json").then((module)=>{
5
+ languages.register('json', {
6
+ language: mixLanguages({
7
+ outerLanguage: module.json.language
8
+ }),
9
+ languageService: module.json.languageService
10
+ });
11
+ });
12
+ const JsonCodeEditor = CodeEditorFactory(loadJsonLanguage, {
13
+ displayName: 'JsonCodeEditor',
14
+ fixLanguageId: 'json'
15
+ });
16
+ export { JsonCodeEditor, loadJsonLanguage };
@@ -0,0 +1,8 @@
1
+ import { languages } from "@flowgram.ai/coze-editor/preset-code";
2
+ import { CodeEditorFactory } from "./factory.mjs";
3
+ const loadPythonLanguage = ()=>import("@flowgram.ai/coze-editor/language-python").then((module)=>languages.register('python', module.python));
4
+ const PythonCodeEditor = CodeEditorFactory(loadPythonLanguage, {
5
+ displayName: 'PythonCodeEditor',
6
+ fixLanguageId: 'python'
7
+ });
8
+ export { PythonCodeEditor, loadPythonLanguage };
@@ -0,0 +1,8 @@
1
+ import { languages } from "@flowgram.ai/coze-editor/preset-code";
2
+ import { CodeEditorFactory } from "./factory.mjs";
3
+ const loadShellLanguage = ()=>import("@flowgram.ai/coze-editor/language-shell").then((module)=>languages.register('shell', module.shell));
4
+ const ShellCodeEditor = CodeEditorFactory(loadShellLanguage, {
5
+ displayName: 'ShellCodeEditor',
6
+ fixLanguageId: 'shell'
7
+ });
8
+ export { ShellCodeEditor, loadShellLanguage };
@@ -0,0 +1,16 @@
1
+ import { languages } from "@flowgram.ai/coze-editor/preset-code";
2
+ import { mixLanguages } from "@flowgram.ai/coze-editor";
3
+ import { CodeEditorFactory } from "./factory.mjs";
4
+ const loadSqlLanguage = ()=>import("@flowgram.ai/coze-editor/language-sql").then((module)=>{
5
+ languages.register('sql', {
6
+ ...module.sql,
7
+ language: mixLanguages({
8
+ outerLanguage: module.sql.language
9
+ })
10
+ });
11
+ });
12
+ const SQLCodeEditor = CodeEditorFactory(loadSqlLanguage, {
13
+ displayName: 'SQLCodeEditor',
14
+ fixLanguageId: 'sql'
15
+ });
16
+ export { SQLCodeEditor, loadSqlLanguage };