@flowgram.ai/form-materials 0.4.8 → 0.4.10
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/bin/run.sh +6 -0
- package/dist/cjs/components/assign-row/index.js +112 -0
- package/dist/cjs/components/assign-row/types.js +18 -0
- package/dist/cjs/components/assign-rows/index.js +85 -0
- package/dist/cjs/components/batch-outputs/index.js +91 -0
- package/dist/cjs/components/batch-outputs/styles.js +60 -0
- package/dist/cjs/components/batch-outputs/types.js +18 -0
- package/dist/cjs/components/batch-variable-selector/index.js +53 -0
- package/dist/cjs/components/blur-input/index.js +64 -0
- package/dist/cjs/components/code-editor/editor.js +117 -0
- package/dist/cjs/components/code-editor/index.js +57 -0
- package/dist/cjs/components/code-editor/init-worker.js +56 -0
- package/dist/cjs/components/code-editor/language-features.js +21 -0
- package/dist/cjs/components/code-editor/theme/dark.js +188 -0
- package/dist/cjs/components/code-editor/theme/index.js +11 -0
- package/dist/cjs/components/code-editor/theme/light.js +195 -0
- package/dist/cjs/components/code-editor/utils.js +42 -0
- package/dist/cjs/components/code-editor-mini/index.js +66 -0
- package/dist/cjs/components/condition-row/constants.js +165 -0
- package/dist/cjs/components/condition-row/hooks/useOp.js +78 -0
- package/dist/cjs/components/condition-row/hooks/useRule.js +68 -0
- package/dist/cjs/components/condition-row/index.js +123 -0
- package/dist/cjs/components/condition-row/styles.js +77 -0
- package/dist/cjs/components/condition-row/types.js +52 -0
- package/dist/cjs/components/constant-input/index.js +80 -0
- package/dist/cjs/components/constant-input/types.js +18 -0
- package/dist/cjs/components/db-condition-row/hooks/use-left.js +86 -0
- package/dist/cjs/components/db-condition-row/hooks/use-op.js +79 -0
- package/dist/cjs/components/db-condition-row/index.js +115 -0
- package/dist/cjs/components/db-condition-row/styles.js +94 -0
- package/dist/cjs/components/db-condition-row/types.js +18 -0
- package/dist/cjs/components/display-flow-value/index.js +64 -0
- package/dist/cjs/components/display-inputs-values/index.js +76 -0
- package/dist/cjs/components/display-inputs-values/styles.js +51 -0
- package/dist/cjs/components/display-outputs/index.js +72 -0
- package/dist/cjs/components/display-outputs/styles.js +51 -0
- package/dist/cjs/components/display-schema-tag/index.js +77 -0
- package/dist/cjs/components/display-schema-tag/styles.js +71 -0
- package/dist/cjs/components/display-schema-tree/index.js +93 -0
- package/dist/cjs/components/display-schema-tree/styles.js +135 -0
- package/dist/cjs/components/dynamic-value-input/hooks.js +99 -0
- package/dist/cjs/components/dynamic-value-input/index.js +174 -0
- package/dist/cjs/components/dynamic-value-input/styles.js +107 -0
- package/dist/cjs/components/index.js +156 -0
- package/dist/cjs/components/inputs-values/index.js +112 -0
- package/dist/cjs/components/inputs-values/styles.js +60 -0
- package/dist/cjs/components/inputs-values/types.js +18 -0
- package/dist/cjs/components/inputs-values-tree/hooks/use-child-list.js +77 -0
- package/dist/cjs/components/inputs-values-tree/index.js +87 -0
- package/dist/cjs/components/inputs-values-tree/row.js +183 -0
- package/dist/cjs/components/inputs-values-tree/styles.js +177 -0
- package/dist/cjs/components/inputs-values-tree/types.js +18 -0
- package/dist/cjs/components/json-editor-with-variables/editor.js +81 -0
- package/dist/cjs/components/json-editor-with-variables/extensions/variable-tag.js +151 -0
- package/dist/cjs/components/json-editor-with-variables/extensions/variable-tree.js +97 -0
- package/dist/cjs/components/json-editor-with-variables/index.js +57 -0
- package/dist/cjs/components/json-editor-with-variables/styles.js +89 -0
- package/dist/cjs/components/json-schema-editor/default-value.js +54 -0
- package/dist/cjs/components/json-schema-editor/hooks.js +130 -0
- package/dist/cjs/components/json-schema-editor/index.js +246 -0
- package/dist/cjs/components/json-schema-editor/styles.js +231 -0
- package/dist/cjs/components/json-schema-editor/types.js +18 -0
- package/dist/cjs/components/prompt-editor/editor.js +99 -0
- package/dist/cjs/components/prompt-editor/extensions/jinja.js +73 -0
- package/dist/cjs/components/prompt-editor/extensions/language-support.js +48 -0
- package/dist/cjs/components/prompt-editor/extensions/markdown.js +81 -0
- package/dist/cjs/components/prompt-editor/index.js +57 -0
- package/dist/cjs/components/prompt-editor/styles.js +55 -0
- package/dist/cjs/components/prompt-editor/types.js +7 -0
- package/dist/cjs/components/prompt-editor-with-inputs/editor.js +47 -0
- package/dist/cjs/components/prompt-editor-with-inputs/extensions/inputs-tree.js +101 -0
- package/dist/cjs/components/prompt-editor-with-inputs/index.js +57 -0
- package/dist/cjs/components/prompt-editor-with-inputs/inputs-picker.js +104 -0
- package/dist/cjs/components/prompt-editor-with-variables/editor.js +49 -0
- package/dist/cjs/components/prompt-editor-with-variables/extensions/variable-tag.js +151 -0
- package/dist/cjs/components/prompt-editor-with-variables/extensions/variable-tree.js +103 -0
- package/dist/cjs/components/prompt-editor-with-variables/index.js +57 -0
- package/dist/cjs/components/prompt-editor-with-variables/styles.js +89 -0
- package/dist/cjs/components/type-selector/index.js +139 -0
- package/dist/cjs/components/variable-selector/context.js +56 -0
- package/dist/cjs/components/variable-selector/index.js +143 -0
- package/dist/cjs/components/variable-selector/styles.js +114 -0
- package/dist/cjs/components/variable-selector/use-variable-tree.js +100 -0
- package/dist/cjs/effects/auto-rename-ref/index.js +98 -0
- package/dist/cjs/effects/index.js +60 -0
- package/dist/cjs/effects/listen-ref-schema-change/index.js +57 -0
- package/dist/cjs/effects/listen-ref-value-change/index.js +54 -0
- package/dist/cjs/effects/provide-batch-input/index.js +64 -0
- package/dist/cjs/effects/provide-json-schema-outputs/index.js +49 -0
- package/dist/cjs/effects/sync-variable-title/index.js +52 -0
- package/dist/cjs/effects/validate-when-variable-sync/index.js +49 -0
- package/dist/cjs/form-plugins/batch-outputs-plugin/index.js +97 -0
- package/dist/cjs/form-plugins/index.js +47 -0
- package/dist/cjs/form-plugins/infer-assign-plugin/index.js +72 -0
- package/dist/cjs/form-plugins/infer-inputs-plugin/index.js +47 -0
- package/dist/cjs/hooks/index.js +36 -0
- package/dist/cjs/hooks/use-object-list/index.js +136 -0
- package/dist/cjs/index.js +228 -0
- package/dist/cjs/plugins/disable-declaration-plugin/create-disable-declaration-plugin.js +51 -0
- package/dist/cjs/plugins/disable-declaration-plugin/index.js +36 -0
- package/dist/cjs/plugins/index.js +49 -0
- package/dist/cjs/plugins/json-schema-preset/create-type-preset-plugin.js +49 -0
- package/dist/cjs/plugins/json-schema-preset/index.js +57 -0
- package/dist/cjs/plugins/json-schema-preset/manager.js +18 -0
- package/dist/cjs/plugins/json-schema-preset/type-definition/array.js +49 -0
- package/dist/cjs/plugins/json-schema-preset/type-definition/boolean.js +63 -0
- package/dist/cjs/plugins/json-schema-preset/type-definition/date-time.js +52 -0
- package/dist/cjs/plugins/json-schema-preset/type-definition/index.js +53 -0
- package/dist/cjs/plugins/json-schema-preset/type-definition/integer.js +49 -0
- package/dist/cjs/plugins/json-schema-preset/type-definition/number.js +49 -0
- package/dist/cjs/plugins/json-schema-preset/type-definition/object.js +49 -0
- package/dist/cjs/plugins/json-schema-preset/type-definition/string.js +54 -0
- package/dist/cjs/shared/flow-value/index.js +36 -0
- package/dist/cjs/shared/flow-value/schema.js +82 -0
- package/dist/cjs/shared/flow-value/types.js +18 -0
- package/dist/cjs/shared/flow-value/utils.js +142 -0
- package/dist/cjs/shared/format-legacy-refs/index.js +99 -0
- package/dist/cjs/shared/index.js +73 -0
- package/dist/cjs/shared/inject-material/index.js +65 -0
- package/dist/cjs/shared/lazy-suspense/index.js +58 -0
- package/dist/cjs/shared/polyfill-create-root/index.js +53 -0
- package/dist/cjs/validate/index.js +36 -0
- package/dist/cjs/validate/validate-flow-value/index.js +63 -0
- package/dist/esm/components/assign-row/index.mjs +78 -0
- package/dist/esm/components/assign-row/types.mjs +0 -0
- package/dist/esm/components/assign-rows/index.mjs +51 -0
- package/dist/esm/components/batch-outputs/index.mjs +57 -0
- package/dist/esm/components/batch-outputs/styles.mjs +13 -0
- package/dist/esm/components/batch-outputs/types.mjs +0 -0
- package/dist/esm/components/batch-variable-selector/index.mjs +19 -0
- package/dist/esm/components/blur-input/index.mjs +20 -0
- package/dist/esm/components/code-editor/editor.mjs +55 -0
- package/dist/esm/components/code-editor/index.mjs +5 -0
- package/dist/esm/components/code-editor/init-worker.mjs +19 -0
- package/dist/esm/components/code-editor/language-features.mjs +15 -0
- package/dist/esm/components/code-editor/theme/dark.mjs +154 -0
- package/dist/esm/components/code-editor/theme/index.mjs +5 -0
- package/dist/esm/components/code-editor/theme/light.mjs +161 -0
- package/dist/esm/components/code-editor/utils.mjs +8 -0
- package/dist/esm/components/code-editor-mini/index.mjs +22 -0
- package/dist/esm/components/condition-row/constants.mjs +128 -0
- package/dist/esm/components/condition-row/hooks/useOp.mjs +44 -0
- package/dist/esm/components/condition-row/hooks/useRule.mjs +34 -0
- package/dist/esm/components/condition-row/index.mjs +89 -0
- package/dist/esm/components/condition-row/styles.mjs +21 -0
- package/dist/esm/components/condition-row/types.mjs +18 -0
- package/dist/esm/components/constant-input/index.mjs +36 -0
- package/dist/esm/components/constant-input/types.mjs +0 -0
- package/dist/esm/components/db-condition-row/hooks/use-left.mjs +52 -0
- package/dist/esm/components/db-condition-row/hooks/use-op.mjs +45 -0
- package/dist/esm/components/db-condition-row/index.mjs +81 -0
- package/dist/esm/components/db-condition-row/styles.mjs +32 -0
- package/dist/esm/components/db-condition-row/types.mjs +0 -0
- package/dist/esm/components/display-flow-value/index.mjs +30 -0
- package/dist/esm/components/display-inputs-values/index.mjs +39 -0
- package/dist/esm/components/display-inputs-values/styles.mjs +7 -0
- package/dist/esm/components/display-outputs/index.mjs +38 -0
- package/dist/esm/components/display-outputs/styles.mjs +7 -0
- package/dist/esm/components/display-schema-tag/index.mjs +33 -0
- package/dist/esm/components/display-schema-tag/styles.mjs +21 -0
- package/dist/esm/components/display-schema-tree/index.mjs +49 -0
- package/dist/esm/components/display-schema-tree/styles.mjs +79 -0
- package/dist/esm/components/dynamic-value-input/hooks.mjs +59 -0
- package/dist/esm/components/dynamic-value-input/index.mjs +137 -0
- package/dist/esm/components/dynamic-value-input/styles.mjs +54 -0
- package/dist/esm/components/index.mjs +26 -0
- package/dist/esm/components/inputs-values/index.mjs +78 -0
- package/dist/esm/components/inputs-values/styles.mjs +13 -0
- package/dist/esm/components/inputs-values/types.mjs +0 -0
- package/dist/esm/components/inputs-values-tree/hooks/use-child-list.mjs +43 -0
- package/dist/esm/components/inputs-values-tree/index.mjs +53 -0
- package/dist/esm/components/inputs-values-tree/row.mjs +149 -0
- package/dist/esm/components/inputs-values-tree/styles.mjs +105 -0
- package/dist/esm/components/inputs-values-tree/types.mjs +0 -0
- package/dist/esm/components/json-editor-with-variables/editor.mjs +47 -0
- package/dist/esm/components/json-editor-with-variables/extensions/variable-tag.mjs +117 -0
- package/dist/esm/components/json-editor-with-variables/extensions/variable-tree.mjs +63 -0
- package/dist/esm/components/json-editor-with-variables/index.mjs +5 -0
- package/dist/esm/components/json-editor-with-variables/styles.mjs +36 -0
- package/dist/esm/components/json-schema-editor/default-value.mjs +20 -0
- package/dist/esm/components/json-schema-editor/hooks.mjs +96 -0
- package/dist/esm/components/json-schema-editor/index.mjs +212 -0
- package/dist/esm/components/json-schema-editor/styles.mjs +138 -0
- package/dist/esm/components/json-schema-editor/types.mjs +0 -0
- package/dist/esm/components/prompt-editor/editor.mjs +52 -0
- package/dist/esm/components/prompt-editor/extensions/jinja.mjs +39 -0
- package/dist/esm/components/prompt-editor/extensions/language-support.mjs +14 -0
- package/dist/esm/components/prompt-editor/extensions/markdown.mjs +47 -0
- package/dist/esm/components/prompt-editor/index.mjs +5 -0
- package/dist/esm/components/prompt-editor/styles.mjs +11 -0
- package/dist/esm/components/prompt-editor/types.mjs +1 -0
- package/dist/esm/components/prompt-editor-with-inputs/editor.mjs +13 -0
- package/dist/esm/components/prompt-editor-with-inputs/extensions/inputs-tree.mjs +67 -0
- package/dist/esm/components/prompt-editor-with-inputs/index.mjs +5 -0
- package/dist/esm/components/prompt-editor-with-inputs/inputs-picker.mjs +70 -0
- package/dist/esm/components/prompt-editor-with-variables/editor.mjs +15 -0
- package/dist/esm/components/prompt-editor-with-variables/extensions/variable-tag.mjs +117 -0
- package/dist/esm/components/prompt-editor-with-variables/extensions/variable-tree.mjs +69 -0
- package/dist/esm/components/prompt-editor-with-variables/index.mjs +5 -0
- package/dist/esm/components/prompt-editor-with-variables/styles.mjs +36 -0
- package/dist/esm/components/type-selector/index.mjs +96 -0
- package/dist/esm/components/variable-selector/context.mjs +16 -0
- package/dist/esm/components/variable-selector/index.mjs +100 -0
- package/dist/esm/components/variable-selector/styles.mjs +58 -0
- package/dist/esm/components/variable-selector/use-variable-tree.mjs +66 -0
- package/dist/esm/effects/auto-rename-ref/index.mjs +64 -0
- package/dist/esm/effects/index.mjs +8 -0
- package/dist/esm/effects/listen-ref-schema-change/index.mjs +23 -0
- package/dist/esm/effects/listen-ref-value-change/index.mjs +20 -0
- package/dist/esm/effects/provide-batch-input/index.mjs +30 -0
- package/dist/esm/effects/provide-json-schema-outputs/index.mjs +15 -0
- package/dist/esm/effects/sync-variable-title/index.mjs +18 -0
- package/dist/esm/effects/validate-when-variable-sync/index.mjs +15 -0
- package/dist/esm/form-plugins/batch-outputs-plugin/index.mjs +60 -0
- package/dist/esm/form-plugins/index.mjs +4 -0
- package/dist/esm/form-plugins/infer-assign-plugin/index.mjs +38 -0
- package/dist/esm/form-plugins/infer-inputs-plugin/index.mjs +13 -0
- package/dist/esm/hooks/index.mjs +2 -0
- package/dist/esm/hooks/use-object-list/index.mjs +102 -0
- package/dist/esm/index.mjs +8 -0
- package/dist/esm/plugins/disable-declaration-plugin/create-disable-declaration-plugin.mjs +17 -0
- package/dist/esm/plugins/disable-declaration-plugin/index.mjs +2 -0
- package/dist/esm/plugins/index.mjs +3 -0
- package/dist/esm/plugins/json-schema-preset/create-type-preset-plugin.mjs +15 -0
- package/dist/esm/plugins/json-schema-preset/index.mjs +14 -0
- package/dist/esm/plugins/json-schema-preset/manager.mjs +0 -0
- package/dist/esm/plugins/json-schema-preset/type-definition/array.mjs +15 -0
- package/dist/esm/plugins/json-schema-preset/type-definition/boolean.mjs +29 -0
- package/dist/esm/plugins/json-schema-preset/type-definition/date-time.mjs +18 -0
- package/dist/esm/plugins/json-schema-preset/type-definition/index.mjs +19 -0
- package/dist/esm/plugins/json-schema-preset/type-definition/integer.mjs +15 -0
- package/dist/esm/plugins/json-schema-preset/type-definition/number.mjs +15 -0
- package/dist/esm/plugins/json-schema-preset/type-definition/object.mjs +15 -0
- package/dist/esm/plugins/json-schema-preset/type-definition/string.mjs +20 -0
- package/dist/esm/shared/flow-value/index.mjs +2 -0
- package/dist/esm/shared/flow-value/schema.mjs +26 -0
- package/dist/esm/shared/flow-value/types.mjs +0 -0
- package/dist/esm/shared/flow-value/utils.mjs +108 -0
- package/dist/esm/shared/format-legacy-refs/index.mjs +50 -0
- package/dist/esm/shared/index.mjs +6 -0
- package/dist/esm/shared/inject-material/index.mjs +21 -0
- package/dist/esm/shared/lazy-suspense/index.mjs +21 -0
- package/dist/esm/shared/polyfill-create-root/index.mjs +16 -0
- package/dist/esm/validate/index.mjs +2 -0
- package/dist/esm/validate/validate-flow-value/index.mjs +29 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/components/assign-row/index.d.ts +8 -0
- package/dist/types/components/assign-row/types.d.ts +20 -0
- package/dist/types/components/assign-rows/index.d.ts +11 -0
- package/dist/types/components/batch-outputs/index.d.ts +7 -0
- package/dist/types/components/batch-outputs/styles.d.ts +6 -0
- package/dist/types/components/batch-outputs/types.d.ts +18 -0
- package/dist/types/components/batch-variable-selector/index.d.ts +7 -0
- package/dist/types/components/blur-input/index.d.ts +7 -0
- package/dist/types/components/code-editor/editor.d.ts +23 -0
- package/dist/types/components/code-editor/index.d.ts +6 -0
- package/{src/validate/index.tsx → dist/types/components/code-editor/init-worker.d.ts} +1 -2
- package/{src/typings/index.ts → dist/types/components/code-editor/language-features.d.ts} +1 -2
- package/dist/types/components/code-editor/theme/dark.d.ts +6 -0
- package/{src/hooks/index.tsx → dist/types/components/code-editor/theme/index.d.ts} +1 -2
- package/dist/types/components/code-editor/theme/light.d.ts +6 -0
- package/dist/types/components/code-editor/utils.d.ts +5 -0
- package/dist/types/components/code-editor-mini/index.d.ts +7 -0
- package/dist/types/components/condition-row/constants.d.ts +7 -0
- package/dist/types/components/condition-row/hooks/useOp.d.ts +18 -0
- package/dist/types/components/condition-row/hooks/useRule.d.ts +9 -0
- package/dist/types/components/condition-row/index.d.ts +22 -0
- package/dist/types/components/condition-row/styles.d.ts +9 -0
- package/dist/types/components/condition-row/types.d.ts +34 -0
- package/dist/types/components/constant-input/index.d.ts +8 -0
- package/dist/types/components/constant-input/types.d.ts +16 -0
- package/dist/types/components/db-condition-row/hooks/use-left.d.ts +18 -0
- package/dist/types/components/db-condition-row/hooks/use-op.d.ts +18 -0
- package/dist/types/components/db-condition-row/index.d.ts +19 -0
- package/dist/types/components/db-condition-row/styles.d.ts +12 -0
- package/dist/types/components/db-condition-row/types.d.ts +25 -0
- package/dist/types/components/display-flow-value/index.d.ts +15 -0
- package/dist/types/components/display-inputs-values/index.d.ts +14 -0
- package/dist/types/components/display-inputs-values/styles.d.ts +5 -0
- package/dist/types/components/display-outputs/index.d.ts +14 -0
- package/dist/types/components/display-outputs/styles.d.ts +5 -0
- package/dist/types/components/display-schema-tag/index.d.ts +14 -0
- package/dist/types/components/display-schema-tag/styles.d.ts +8 -0
- package/dist/types/components/display-schema-tree/index.d.ts +16 -0
- package/dist/types/components/display-schema-tree/styles.d.ts +11 -0
- package/dist/types/components/dynamic-value-input/hooks.d.ts +28 -0
- package/dist/types/components/dynamic-value-input/index.d.ts +27 -0
- package/dist/types/components/dynamic-value-input/styles.d.ts +8 -0
- package/dist/types/components/index.d.ts +29 -0
- package/dist/types/components/inputs-values/index.d.ts +7 -0
- package/dist/types/components/inputs-values/styles.d.ts +6 -0
- package/dist/types/components/inputs-values/types.d.ts +19 -0
- package/dist/types/components/inputs-values-tree/hooks/use-child-list.d.ts +19 -0
- package/dist/types/components/inputs-values-tree/index.d.ts +7 -0
- package/dist/types/components/inputs-values-tree/row.d.ts +15 -0
- package/dist/types/components/inputs-values-tree/styles.d.ts +23 -0
- package/dist/types/components/inputs-values-tree/types.d.ts +18 -0
- package/dist/types/components/json-editor-with-variables/editor.d.ts +9 -0
- package/dist/types/components/json-editor-with-variables/extensions/variable-tag.d.ts +5 -0
- package/dist/types/components/json-editor-with-variables/extensions/variable-tree.d.ts +6 -0
- package/dist/types/components/json-editor-with-variables/index.d.ts +6 -0
- package/dist/types/components/json-editor-with-variables/styles.d.ts +9 -0
- package/dist/types/components/json-schema-editor/default-value.d.ts +17 -0
- package/dist/types/components/json-schema-editor/hooks.d.ts +12 -0
- package/dist/types/components/json-schema-editor/index.d.ts +14 -0
- package/dist/types/components/json-schema-editor/styles.d.ts +30 -0
- package/dist/types/components/json-schema-editor/types.d.ts +20 -0
- package/dist/types/components/prompt-editor/editor.d.ts +15 -0
- package/dist/types/components/prompt-editor/extensions/jinja.d.ts +6 -0
- package/dist/types/components/prompt-editor/extensions/language-support.d.ts +6 -0
- package/dist/types/components/prompt-editor/extensions/markdown.d.ts +6 -0
- package/dist/types/components/prompt-editor/index.d.ts +6 -0
- package/dist/types/components/prompt-editor/styles.d.ts +7 -0
- package/dist/types/components/prompt-editor/types.d.ts +16 -0
- package/dist/types/components/prompt-editor-with-inputs/editor.d.ts +10 -0
- package/dist/types/components/prompt-editor-with-inputs/extensions/inputs-tree.d.ts +9 -0
- package/dist/types/components/prompt-editor-with-inputs/index.d.ts +6 -0
- package/dist/types/components/prompt-editor-with-inputs/inputs-picker.d.ts +9 -0
- package/dist/types/components/prompt-editor-with-variables/editor.d.ts +9 -0
- package/dist/types/components/prompt-editor-with-variables/extensions/variable-tag.d.ts +5 -0
- package/dist/types/components/prompt-editor-with-variables/extensions/variable-tree.d.ts +6 -0
- package/dist/types/components/prompt-editor-with-variables/index.d.ts +6 -0
- package/dist/types/components/prompt-editor-with-variables/styles.d.ts +9 -0
- package/dist/types/components/type-selector/index.d.ts +23 -0
- package/dist/types/components/variable-selector/context.d.ts +16 -0
- package/dist/types/components/variable-selector/index.d.ts +29 -0
- package/dist/types/components/variable-selector/styles.d.ts +14 -0
- package/dist/types/components/variable-selector/use-variable-tree.d.ts +18 -0
- package/dist/types/effects/auto-rename-ref/index.d.ts +17 -0
- package/dist/types/effects/index.d.ts +11 -0
- package/dist/types/effects/listen-ref-schema-change/index.d.ts +22 -0
- package/dist/types/effects/listen-ref-value-change/index.d.ts +22 -0
- package/dist/types/effects/provide-batch-input/index.d.ts +6 -0
- package/dist/types/effects/provide-json-schema-outputs/index.d.ts +6 -0
- package/dist/types/effects/sync-variable-title/index.d.ts +6 -0
- package/dist/types/effects/validate-when-variable-sync/index.d.ts +8 -0
- package/dist/types/form-plugins/batch-outputs-plugin/index.d.ts +12 -0
- package/dist/types/form-plugins/index.d.ts +7 -0
- package/dist/types/form-plugins/infer-assign-plugin/index.d.ts +10 -0
- package/dist/types/form-plugins/infer-inputs-plugin/index.d.ts +11 -0
- package/dist/types/hooks/index.d.ts +5 -0
- package/dist/types/hooks/use-object-list/index.d.ts +22 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/plugins/disable-declaration-plugin/create-disable-declaration-plugin.d.ts +5 -0
- package/dist/types/plugins/disable-declaration-plugin/index.d.ts +5 -0
- package/dist/types/plugins/index.d.ts +6 -0
- package/dist/types/plugins/json-schema-preset/create-type-preset-plugin.d.ts +9 -0
- package/dist/types/plugins/json-schema-preset/index.d.ts +13 -0
- package/dist/types/plugins/json-schema-preset/manager.d.ts +17 -0
- package/dist/types/plugins/json-schema-preset/type-definition/array.d.ts +6 -0
- package/dist/types/plugins/json-schema-preset/type-definition/boolean.d.ts +6 -0
- package/dist/types/plugins/json-schema-preset/type-definition/date-time.d.ts +6 -0
- package/dist/types/plugins/json-schema-preset/type-definition/index.d.ts +5 -0
- package/dist/types/plugins/json-schema-preset/type-definition/integer.d.ts +6 -0
- package/dist/types/plugins/json-schema-preset/type-definition/number.d.ts +6 -0
- package/dist/types/plugins/json-schema-preset/type-definition/object.d.ts +6 -0
- package/dist/types/plugins/json-schema-preset/type-definition/string.d.ts +6 -0
- package/dist/types/shared/flow-value/index.d.ts +6 -0
- package/dist/types/shared/flow-value/schema.d.ts +107 -0
- package/dist/types/shared/flow-value/types.d.ts +32 -0
- package/dist/types/shared/flow-value/utils.d.ts +65 -0
- package/dist/types/shared/format-legacy-refs/index.d.ts +84 -0
- package/dist/types/shared/index.d.ts +9 -0
- package/dist/types/shared/inject-material/index.d.ts +46 -0
- package/dist/types/shared/lazy-suspense/index.d.ts +7 -0
- package/dist/types/shared/polyfill-create-root/index.d.ts +10 -0
- package/dist/types/validate/index.d.ts +5 -0
- package/dist/types/validate/validate-flow-value/index.d.ts +19 -0
- package/package.json +19 -21
- package/src/components/assign-row/index.tsx +3 -3
- package/src/components/assign-row/types.ts +1 -1
- package/src/components/batch-outputs/types.ts +1 -1
- package/src/components/code-editor/editor.tsx +10 -9
- package/src/components/code-editor/init-worker.ts +27 -0
- package/src/components/code-editor/language-features.ts +6 -27
- package/src/components/code-editor/theme/dark.ts +1 -1
- package/src/components/code-editor/theme/index.ts +1 -1
- package/src/components/code-editor/theme/light.ts +1 -1
- package/src/components/condition-row/hooks/useRule.ts +1 -1
- package/src/components/condition-row/types.ts +1 -1
- package/src/components/constant-input/index.tsx +1 -1
- package/src/components/db-condition-row/types.ts +1 -1
- package/src/components/display-flow-value/index.tsx +1 -1
- package/src/components/dynamic-value-input/hooks.ts +1 -1
- package/src/components/dynamic-value-input/index.tsx +1 -1
- package/src/components/index.ts +50 -25
- package/src/components/inputs-values/index.tsx +1 -1
- package/src/components/inputs-values/types.ts +1 -1
- package/src/components/inputs-values-tree/row.tsx +1 -1
- package/src/components/json-editor-with-variables/editor.tsx +2 -2
- package/src/components/json-editor-with-variables/extensions/variable-tag.tsx +1 -1
- package/src/components/json-editor-with-variables/extensions/variable-tree.tsx +3 -3
- package/src/components/prompt-editor/editor.tsx +2 -2
- package/src/components/prompt-editor/extensions/jinja.tsx +2 -2
- package/src/components/prompt-editor/extensions/language-support.tsx +2 -2
- package/src/components/prompt-editor/extensions/markdown.tsx +2 -2
- package/src/components/prompt-editor/types.tsx +1 -1
- package/src/components/prompt-editor-with-inputs/extensions/inputs-tree.tsx +4 -4
- package/src/components/prompt-editor-with-variables/extensions/variable-tag.tsx +1 -1
- package/src/components/prompt-editor-with-variables/extensions/variable-tree.tsx +3 -3
- package/src/effects/auto-rename-ref/index.ts +1 -1
- package/src/effects/index.ts +7 -7
- package/src/effects/listen-ref-schema-change/index.ts +1 -1
- package/src/effects/listen-ref-value-change/index.ts +1 -1
- package/src/effects/provide-batch-input/index.ts +1 -1
- package/src/form-plugins/batch-outputs-plugin/index.ts +1 -1
- package/src/form-plugins/index.ts +3 -3
- package/src/form-plugins/infer-assign-plugin/index.ts +1 -1
- package/src/hooks/index.ts +6 -0
- package/src/index.ts +98 -8
- package/src/plugins/index.ts +11 -2
- package/src/plugins/json-schema-preset/index.tsx +4 -4
- package/src/shared/flow-value/index.ts +11 -1
- package/src/shared/flow-value/utils.ts +1 -2
- package/src/shared/index.ts +26 -5
- package/src/validate/index.ts +6 -0
- package/src/validate/validate-flow-value/index.tsx +1 -1
- package/bin/index.ts +0 -80
- package/bin/materials.ts +0 -134
- package/bin/project.ts +0 -95
- package/bin/utils/import.ts +0 -127
- package/bin/utils/traverse-file.ts +0 -60
- package/dist/esm/chunk-727SU246.js +0 -13
- package/dist/esm/chunk-727SU246.js.map +0 -1
- package/dist/esm/chunk-DEZUEMUM.js +0 -284
- package/dist/esm/chunk-DEZUEMUM.js.map +0 -1
- package/dist/esm/chunk-IHOHRV5V.js +0 -477
- package/dist/esm/chunk-IHOHRV5V.js.map +0 -1
- package/dist/esm/editor-4X7K477H.js +0 -282
- package/dist/esm/editor-4X7K477H.js.map +0 -1
- package/dist/esm/editor-6UMULJYB.js +0 -180
- package/dist/esm/editor-6UMULJYB.js.map +0 -1
- package/dist/esm/editor-E2BQTPCD.js +0 -388
- package/dist/esm/editor-E2BQTPCD.js.map +0 -1
- package/dist/esm/editor-OXPGKPF5.js +0 -167
- package/dist/esm/editor-OXPGKPF5.js.map +0 -1
- package/dist/esm/editor-Z24WLBPO.js +0 -249
- package/dist/esm/editor-Z24WLBPO.js.map +0 -1
- package/dist/esm/index.js +0 -2668
- package/dist/esm/index.js.map +0 -1
- package/dist/index.d.mts +0 -1002
- package/dist/index.d.ts +0 -1002
- package/dist/index.js +0 -5127
- package/dist/index.js.map +0 -1
- package/src/components/assign-row/components/blur-input.tsx +0 -27
- /package/src/{typings/flow-value/index.ts → shared/flow-value/types.ts} +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { isNil } from "lodash-es";
|
|
2
|
+
import { FeedbackLevel, getNodeScope } from "@flowgram.ai/editor";
|
|
3
|
+
import { FlowValueUtils } from "../../shared/index.mjs";
|
|
4
|
+
function validateFlowValue(value, ctx) {
|
|
5
|
+
const { node, required, errorMessages } = ctx;
|
|
6
|
+
const { required: requiredMessage = 'Field is required', unknownVariable: unknownVariableMessage = 'Unknown Variable' } = errorMessages || {};
|
|
7
|
+
if (required && (isNil(value) || isNil(value?.content) || value?.content === '')) return {
|
|
8
|
+
level: FeedbackLevel.Error,
|
|
9
|
+
message: requiredMessage
|
|
10
|
+
};
|
|
11
|
+
if (value?.type === 'ref') {
|
|
12
|
+
const variable = getNodeScope(node).available.getByKeyPath(value?.content || []);
|
|
13
|
+
if (!variable) return {
|
|
14
|
+
level: FeedbackLevel.Error,
|
|
15
|
+
message: unknownVariableMessage
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
if (value?.type === 'template') {
|
|
19
|
+
const allRefs = FlowValueUtils.getTemplateKeyPaths(value);
|
|
20
|
+
for (const ref of allRefs){
|
|
21
|
+
const variable = getNodeScope(node).available.getByKeyPath(ref);
|
|
22
|
+
if (!variable) return {
|
|
23
|
+
level: FeedbackLevel.Error,
|
|
24
|
+
message: unknownVariableMessage
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export { validateFlowValue };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["../src/index.ts","../src/components/index.ts","../src/components/assign-row/index.tsx","../src/components/assign-row/types.ts","../src/components/assign-rows/index.tsx","../src/components/batch-outputs/index.tsx","../src/components/batch-outputs/styles.tsx","../src/components/batch-outputs/types.ts","../src/components/batch-variable-selector/index.tsx","../src/components/blur-input/index.tsx","../src/components/code-editor/editor.tsx","../src/components/code-editor/index.tsx","../src/components/code-editor/init-worker.ts","../src/components/code-editor/language-features.ts","../src/components/code-editor/utils.ts","../src/components/code-editor/theme/dark.ts","../src/components/code-editor/theme/index.ts","../src/components/code-editor/theme/light.ts","../src/components/code-editor-mini/index.tsx","../src/components/condition-row/constants.ts","../src/components/condition-row/index.tsx","../src/components/condition-row/styles.tsx","../src/components/condition-row/types.ts","../src/components/condition-row/hooks/useOp.tsx","../src/components/condition-row/hooks/useRule.ts","../src/components/constant-input/index.tsx","../src/components/constant-input/types.ts","../src/components/db-condition-row/index.tsx","../src/components/db-condition-row/styles.tsx","../src/components/db-condition-row/types.ts","../src/components/db-condition-row/hooks/use-left.tsx","../src/components/db-condition-row/hooks/use-op.tsx","../src/components/display-flow-value/index.tsx","../src/components/display-inputs-values/index.tsx","../src/components/display-inputs-values/styles.ts","../src/components/display-outputs/index.tsx","../src/components/display-outputs/styles.ts","../src/components/display-schema-tag/index.tsx","../src/components/display-schema-tag/styles.ts","../src/components/display-schema-tree/index.tsx","../src/components/display-schema-tree/styles.tsx","../src/components/dynamic-value-input/hooks.ts","../src/components/dynamic-value-input/index.tsx","../src/components/dynamic-value-input/styles.tsx","../src/components/inputs-values/index.tsx","../src/components/inputs-values/styles.tsx","../src/components/inputs-values/types.ts","../src/components/inputs-values-tree/index.tsx","../src/components/inputs-values-tree/row.tsx","../src/components/inputs-values-tree/styles.tsx","../src/components/inputs-values-tree/types.ts","../src/components/inputs-values-tree/hooks/use-child-list.tsx","../src/components/json-editor-with-variables/editor.tsx","../src/components/json-editor-with-variables/index.tsx","../src/components/json-editor-with-variables/styles.tsx","../src/components/json-editor-with-variables/extensions/variable-tag.tsx","../src/components/json-editor-with-variables/extensions/variable-tree.tsx","../src/components/json-schema-editor/default-value.tsx","../src/components/json-schema-editor/hooks.tsx","../src/components/json-schema-editor/index.tsx","../src/components/json-schema-editor/styles.tsx","../src/components/json-schema-editor/types.ts","../src/components/prompt-editor/editor.tsx","../src/components/prompt-editor/index.tsx","../src/components/prompt-editor/styles.tsx","../src/components/prompt-editor/types.tsx","../src/components/prompt-editor/extensions/jinja.tsx","../src/components/prompt-editor/extensions/language-support.tsx","../src/components/prompt-editor/extensions/markdown.tsx","../src/components/prompt-editor-with-inputs/editor.tsx","../src/components/prompt-editor-with-inputs/index.tsx","../src/components/prompt-editor-with-inputs/inputs-picker.tsx","../src/components/prompt-editor-with-inputs/extensions/inputs-tree.tsx","../src/components/prompt-editor-with-variables/editor.tsx","../src/components/prompt-editor-with-variables/index.tsx","../src/components/prompt-editor-with-variables/styles.tsx","../src/components/prompt-editor-with-variables/extensions/variable-tag.tsx","../src/components/prompt-editor-with-variables/extensions/variable-tree.tsx","../src/components/type-selector/index.tsx","../src/components/variable-selector/context.tsx","../src/components/variable-selector/index.tsx","../src/components/variable-selector/styles.tsx","../src/components/variable-selector/use-variable-tree.tsx","../src/effects/index.ts","../src/effects/auto-rename-ref/index.ts","../src/effects/listen-ref-schema-change/index.ts","../src/effects/listen-ref-value-change/index.ts","../src/effects/provide-batch-input/index.ts","../src/effects/provide-json-schema-outputs/index.ts","../src/effects/sync-variable-title/index.ts","../src/effects/validate-when-variable-sync/index.ts","../src/form-plugins/index.ts","../src/form-plugins/batch-outputs-plugin/index.ts","../src/form-plugins/infer-assign-plugin/index.ts","../src/form-plugins/infer-inputs-plugin/index.ts","../src/hooks/index.ts","../src/hooks/use-object-list/index.tsx","../src/plugins/index.ts","../src/plugins/disable-declaration-plugin/create-disable-declaration-plugin.ts","../src/plugins/disable-declaration-plugin/index.tsx","../src/plugins/json-schema-preset/create-type-preset-plugin.tsx","../src/plugins/json-schema-preset/index.tsx","../src/plugins/json-schema-preset/manager.ts","../src/plugins/json-schema-preset/type-definition/array.tsx","../src/plugins/json-schema-preset/type-definition/boolean.tsx","../src/plugins/json-schema-preset/type-definition/date-time.tsx","../src/plugins/json-schema-preset/type-definition/index.tsx","../src/plugins/json-schema-preset/type-definition/integer.tsx","../src/plugins/json-schema-preset/type-definition/number.tsx","../src/plugins/json-schema-preset/type-definition/object.tsx","../src/plugins/json-schema-preset/type-definition/string.tsx","../src/shared/index.ts","../src/shared/flow-value/index.ts","../src/shared/flow-value/schema.ts","../src/shared/flow-value/types.ts","../src/shared/flow-value/utils.ts","../src/shared/format-legacy-refs/index.ts","../src/shared/inject-material/index.tsx","../src/shared/lazy-suspense/index.tsx","../src/shared/polyfill-create-root/index.tsx","../src/validate/index.ts","../src/validate/validate-flow-value/index.tsx"],"version":"5.8.3"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { AssignRowProps } from './types';
|
|
7
|
+
export declare function AssignRow(props: AssignRowProps): React.JSX.Element;
|
|
8
|
+
export { type AssignValueType } from './types';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import { IFlowRefValue, IFlowValue } from '../../shared';
|
|
6
|
+
export type AssignValueType = {
|
|
7
|
+
operator: 'assign';
|
|
8
|
+
left?: IFlowRefValue;
|
|
9
|
+
right?: IFlowValue;
|
|
10
|
+
} | {
|
|
11
|
+
operator: 'declare';
|
|
12
|
+
left?: string;
|
|
13
|
+
right?: IFlowValue;
|
|
14
|
+
};
|
|
15
|
+
export interface AssignRowProps {
|
|
16
|
+
value?: AssignValueType;
|
|
17
|
+
onChange?: (value?: AssignValueType) => void;
|
|
18
|
+
onDelete?: () => void;
|
|
19
|
+
readonly?: boolean;
|
|
20
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
interface AssignRowsProps {
|
|
7
|
+
name: string;
|
|
8
|
+
readonly?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function AssignRows(props: AssignRowsProps): React.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
export declare const UIRows: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const UIRow: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import { IFlowRefValue } from '../../shared';
|
|
6
|
+
export type ValueType = Record<string, IFlowRefValue | undefined>;
|
|
7
|
+
export interface OutputItem {
|
|
8
|
+
id: number;
|
|
9
|
+
key?: string;
|
|
10
|
+
value?: IFlowRefValue;
|
|
11
|
+
}
|
|
12
|
+
export interface PropsType {
|
|
13
|
+
value?: ValueType;
|
|
14
|
+
onChange: (value?: ValueType) => void;
|
|
15
|
+
readonly?: boolean;
|
|
16
|
+
hasError?: boolean;
|
|
17
|
+
style?: React.CSSProperties;
|
|
18
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { VariableSelectorProps } from '../variable-selector';
|
|
7
|
+
export declare function BatchVariableSelector(props: VariableSelectorProps): React.JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { InputProps } from '@douyinfe/semi-ui/lib/es/input';
|
|
7
|
+
export declare function BlurInput(props: InputProps): React.JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { InferValues } from '@flowgram.ai/coze-editor/react';
|
|
7
|
+
import preset from '@flowgram.ai/coze-editor/preset-code';
|
|
8
|
+
import './theme';
|
|
9
|
+
import './language-features';
|
|
10
|
+
type Preset = typeof preset;
|
|
11
|
+
type Options = Partial<InferValues<Preset[number]>>;
|
|
12
|
+
export interface CodeEditorPropsType extends React.PropsWithChildren<{}> {
|
|
13
|
+
value?: string;
|
|
14
|
+
onChange?: (value: string) => void;
|
|
15
|
+
languageId: 'python' | 'typescript' | 'shell' | 'json';
|
|
16
|
+
theme?: 'dark' | 'light';
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
activeLinePlaceholder?: string;
|
|
19
|
+
readonly?: boolean;
|
|
20
|
+
options?: Options;
|
|
21
|
+
}
|
|
22
|
+
export declare function CodeEditor({ value, onChange, languageId, theme, children, placeholder, activeLinePlaceholder, options, readonly, }: CodeEditorPropsType): React.JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { type CodeEditorPropsType } from '../code-editor';
|
|
7
|
+
export declare function CodeEditorMini(props: CodeEditorPropsType): React.JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { IRule, OpConfigs } from '../types';
|
|
7
|
+
interface HookParams {
|
|
8
|
+
rule?: IRule;
|
|
9
|
+
op?: string;
|
|
10
|
+
onChange: (op: string) => void;
|
|
11
|
+
readonly?: boolean;
|
|
12
|
+
userOps?: OpConfigs;
|
|
13
|
+
}
|
|
14
|
+
export declare function useOp({ rule, op, onChange, readonly, userOps }: HookParams): {
|
|
15
|
+
renderOpSelect: () => React.JSX.Element;
|
|
16
|
+
opConfig: import("../types").OpConfig;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import { IFlowRefValue } from '../../../shared';
|
|
6
|
+
import { IRules } from '../types';
|
|
7
|
+
export declare function useRule(left?: IFlowRefValue, userRules?: IRules): {
|
|
8
|
+
rule: Partial<Record<string, string | null>> | undefined;
|
|
9
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { ConditionRowValueType, IRules, OpConfigs } from './types';
|
|
7
|
+
interface PropTypes {
|
|
8
|
+
value?: ConditionRowValueType;
|
|
9
|
+
onChange: (value?: ConditionRowValueType) => void;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
readonly?: boolean;
|
|
12
|
+
ruleConfig?: {
|
|
13
|
+
ops?: OpConfigs;
|
|
14
|
+
rules?: IRules;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export declare function ConditionRow({ style, value, onChange, readonly, ruleConfig, }: PropTypes): React.JSX.Element;
|
|
18
|
+
export declare namespace ConditionRow {
|
|
19
|
+
var defaultRules: IRules;
|
|
20
|
+
var defaultOpConfigs: OpConfigs;
|
|
21
|
+
}
|
|
22
|
+
export { type ConditionRowValueType };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
export declare const UIContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const UIOperator: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
|
+
export declare const UILeft: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
|
+
export declare const UIRight: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
|
+
export declare const UIValues: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import { IFlowConstantRefValue, IFlowRefValue } from '../../shared';
|
|
6
|
+
export declare enum Op {
|
|
7
|
+
EQ = "eq",
|
|
8
|
+
NEQ = "neq",
|
|
9
|
+
GT = "gt",
|
|
10
|
+
GTE = "gte",
|
|
11
|
+
LT = "lt",
|
|
12
|
+
LTE = "lte",
|
|
13
|
+
IN = "in",
|
|
14
|
+
NIN = "nin",
|
|
15
|
+
CONTAINS = "contains",
|
|
16
|
+
NOT_CONTAINS = "not_contains",
|
|
17
|
+
IS_EMPTY = "is_empty",
|
|
18
|
+
IS_NOT_EMPTY = "is_not_empty",
|
|
19
|
+
IS_TRUE = "is_true",
|
|
20
|
+
IS_FALSE = "is_false"
|
|
21
|
+
}
|
|
22
|
+
export interface OpConfig {
|
|
23
|
+
label: string;
|
|
24
|
+
abbreviation: string;
|
|
25
|
+
rightDisplay?: string;
|
|
26
|
+
}
|
|
27
|
+
export type OpConfigs = Record<string, OpConfig>;
|
|
28
|
+
export type IRule = Partial<Record<string, string | null>>;
|
|
29
|
+
export type IRules = Record<string, IRule>;
|
|
30
|
+
export interface ConditionRowValueType {
|
|
31
|
+
left?: IFlowRefValue;
|
|
32
|
+
operator?: string;
|
|
33
|
+
right?: IFlowConstantRefValue;
|
|
34
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { PropsType, Strategy as ConstantInputStrategy } from './types';
|
|
7
|
+
export { type ConstantInputStrategy };
|
|
8
|
+
export declare function ConstantInput(props: PropsType): React.JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import { IJsonSchema } from '@flowgram.ai/json-schema';
|
|
6
|
+
import { ConstantRendererProps } from '../../plugins';
|
|
7
|
+
export interface Strategy<Value = any> {
|
|
8
|
+
hit: (schema: IJsonSchema) => boolean;
|
|
9
|
+
Renderer: React.FC<ConstantRendererProps<Value>>;
|
|
10
|
+
}
|
|
11
|
+
export interface PropsType extends ConstantRendererProps {
|
|
12
|
+
schema: IJsonSchema;
|
|
13
|
+
strategies?: Strategy[];
|
|
14
|
+
fallbackRenderer?: React.FC<ConstantRendererProps>;
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { DBConditionOptionType, IRules } from '../types';
|
|
7
|
+
interface HookParams {
|
|
8
|
+
left?: string;
|
|
9
|
+
options?: DBConditionOptionType[];
|
|
10
|
+
userRules?: IRules;
|
|
11
|
+
readonly?: boolean;
|
|
12
|
+
onChange: (leftKey: string) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function useLeft({ left, options, userRules, readonly, onChange }: HookParams): {
|
|
15
|
+
rule: Partial<Record<string, string | null>> | undefined;
|
|
16
|
+
renderDBOptionSelect: () => React.JSX.Element;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { IRule, OpConfigs } from '../types';
|
|
7
|
+
interface HookParams {
|
|
8
|
+
rule?: IRule;
|
|
9
|
+
op?: string;
|
|
10
|
+
onChange: (op: string) => void;
|
|
11
|
+
readonly?: boolean;
|
|
12
|
+
userOps?: OpConfigs;
|
|
13
|
+
}
|
|
14
|
+
export declare function useOp({ rule, op, onChange, readonly, userOps }: HookParams): {
|
|
15
|
+
renderOpSelect: () => React.JSX.Element;
|
|
16
|
+
opConfig: import("../../condition-row/types").OpConfig;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { DBConditionOptionType, DBConditionRowValueType, IRules, OpConfigs } from './types';
|
|
7
|
+
interface PropTypes {
|
|
8
|
+
value?: DBConditionRowValueType;
|
|
9
|
+
onChange: (value?: DBConditionRowValueType) => void;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
options?: DBConditionOptionType[];
|
|
12
|
+
readonly?: boolean;
|
|
13
|
+
ruleConfig?: {
|
|
14
|
+
ops?: OpConfigs;
|
|
15
|
+
rules?: IRules;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export declare function DBConditionRow({ style, value, onChange, readonly, options, ruleConfig, }: PropTypes): React.JSX.Element;
|
|
19
|
+
export { type DBConditionRowValueType, type DBConditionOptionType };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import { Select } from '@douyinfe/semi-ui';
|
|
6
|
+
export declare const UIContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
|
+
export declare const UIOperator: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
|
+
export declare const UILeft: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
|
+
export declare const UIRight: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
10
|
+
export declare const UIValues: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
11
|
+
export declare const UIOptionLabel: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
12
|
+
export declare const UISelect: import("styled-components").StyledComponent<typeof Select, any, {}, never>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import { IJsonSchema } from '@flowgram.ai/json-schema';
|
|
6
|
+
import { IFlowConstantRefValue } from '../../shared';
|
|
7
|
+
export interface OpConfig {
|
|
8
|
+
label: string;
|
|
9
|
+
abbreviation: string;
|
|
10
|
+
rightDisplay?: string;
|
|
11
|
+
}
|
|
12
|
+
export type OpConfigs = Record<string, OpConfig>;
|
|
13
|
+
export type IRule = Partial<Record<string, string | null>>;
|
|
14
|
+
export type IRules = Record<string, IRule>;
|
|
15
|
+
export interface DBConditionRowValueType {
|
|
16
|
+
left?: string;
|
|
17
|
+
schema?: IJsonSchema;
|
|
18
|
+
operator?: string;
|
|
19
|
+
right?: IFlowConstantRefValue;
|
|
20
|
+
}
|
|
21
|
+
export interface DBConditionOptionType {
|
|
22
|
+
label: string | JSX.Element;
|
|
23
|
+
value: string;
|
|
24
|
+
schema: IJsonSchema;
|
|
25
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { JsonSchemaTypeManager } from '@flowgram.ai/json-schema';
|
|
7
|
+
import { IFlowValue } from '../../shared';
|
|
8
|
+
interface PropsType {
|
|
9
|
+
value?: IFlowValue;
|
|
10
|
+
title?: JSX.Element | string;
|
|
11
|
+
showIconInTree?: boolean;
|
|
12
|
+
typeManager?: JsonSchemaTypeManager;
|
|
13
|
+
}
|
|
14
|
+
export declare function DisplayFlowValue({ value, title, showIconInTree }: PropsType): React.JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
interface PropsType {
|
|
7
|
+
value?: any;
|
|
8
|
+
showIconInTree?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function DisplayInputsValues({ value, showIconInTree }: PropsType): React.JSX.Element;
|
|
11
|
+
export declare function DisplayInputsValueAllInTag({ value, title, showIconInTree, }: PropsType & {
|
|
12
|
+
title: string;
|
|
13
|
+
}): React.JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { IJsonSchema, JsonSchemaTypeManager } from '@flowgram.ai/json-schema';
|
|
7
|
+
interface PropsType {
|
|
8
|
+
value?: IJsonSchema;
|
|
9
|
+
showIconInTree?: boolean;
|
|
10
|
+
displayFromScope?: boolean;
|
|
11
|
+
typeManager?: JsonSchemaTypeManager;
|
|
12
|
+
}
|
|
13
|
+
export declare function DisplayOutputs({ value, showIconInTree, displayFromScope }: PropsType): React.JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { IJsonSchema } from '@flowgram.ai/json-schema';
|
|
7
|
+
interface PropsType {
|
|
8
|
+
title?: JSX.Element | string;
|
|
9
|
+
value?: IJsonSchema;
|
|
10
|
+
showIconInTree?: boolean;
|
|
11
|
+
warning?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function DisplaySchemaTag({ value, showIconInTree, title, warning }: PropsType): React.JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import { Tag } from '@douyinfe/semi-ui';
|
|
6
|
+
export declare const PopoverContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
|
+
export declare const StyledTag: import("styled-components").StyledComponent<typeof Tag, any, {}, never>;
|
|
8
|
+
export declare const TitleSpan: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { IJsonSchema, JsonSchemaTypeManager } from '@flowgram.ai/json-schema';
|
|
7
|
+
interface PropsType {
|
|
8
|
+
value?: IJsonSchema;
|
|
9
|
+
parentKey?: string;
|
|
10
|
+
depth?: number;
|
|
11
|
+
drilldown?: boolean;
|
|
12
|
+
showIcon?: boolean;
|
|
13
|
+
typeManager?: JsonSchemaTypeManager;
|
|
14
|
+
}
|
|
15
|
+
export declare function DisplaySchemaTree(props: Omit<PropsType, 'parentKey' | 'depth'>): React.JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
export declare const TreeRow: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const HorizontalLine: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
|
+
export declare const TreeTitle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
|
+
export declare const TreeLevel: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
|
+
export declare const TreeItem: import("styled-components").StyledComponent<"div", any, {
|
|
10
|
+
depth: number;
|
|
11
|
+
}, never>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import { IJsonSchema } from '@flowgram.ai/json-schema';
|
|
6
|
+
import { IFlowConstantRefValue } from '../../shared';
|
|
7
|
+
export declare function useRefVariable(value?: IFlowConstantRefValue): import("@flowgram.ai/variable-core").BaseVariableField<any> | undefined;
|
|
8
|
+
export declare function useSelectSchema(schemaFromProps?: IJsonSchema, constantProps?: {
|
|
9
|
+
schema?: IJsonSchema;
|
|
10
|
+
}, value?: IFlowConstantRefValue): readonly [IJsonSchema<string>, (schema: IJsonSchema) => void];
|
|
11
|
+
export declare function useIncludeSchema(schemaFromProps?: IJsonSchema): IJsonSchema<string>[] | {
|
|
12
|
+
extra: {
|
|
13
|
+
index?: number;
|
|
14
|
+
weak: boolean;
|
|
15
|
+
formComponent?: string;
|
|
16
|
+
};
|
|
17
|
+
type?: string | undefined;
|
|
18
|
+
format?: string;
|
|
19
|
+
default?: any;
|
|
20
|
+
title?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
enum?: (string | number)[];
|
|
23
|
+
properties?: Record<string, IJsonSchema<string>> | undefined;
|
|
24
|
+
additionalProperties?: IJsonSchema<string> | undefined;
|
|
25
|
+
items?: IJsonSchema<string> | undefined;
|
|
26
|
+
required?: string[];
|
|
27
|
+
$ref?: string;
|
|
28
|
+
} | undefined;
|