@flowgram.ai/form-materials 0.4.6 → 0.4.8
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/dist/esm/{chunk-6OZSB6PD.js → chunk-727SU246.js} +6 -3
- package/dist/esm/chunk-727SU246.js.map +1 -0
- package/dist/esm/{chunk-QIJ4QVB2.js → chunk-DEZUEMUM.js} +17 -4
- package/dist/esm/chunk-DEZUEMUM.js.map +1 -0
- package/dist/esm/{chunk-G4HQ7OSI.js → chunk-IHOHRV5V.js} +67 -30
- package/dist/esm/chunk-IHOHRV5V.js.map +1 -0
- package/dist/esm/{editor-H2R7JJLO.js → editor-4X7K477H.js} +4 -4
- package/dist/esm/editor-4X7K477H.js.map +1 -0
- package/dist/esm/{editor-YMNCDGUR.js → editor-OXPGKPF5.js} +4 -4
- package/dist/esm/editor-OXPGKPF5.js.map +1 -0
- package/dist/esm/{editor-JX42GFAZ.js → editor-Z24WLBPO.js} +5 -5
- package/dist/esm/editor-Z24WLBPO.js.map +1 -0
- package/dist/esm/index.js +34 -23
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.mts +21 -3
- package/dist/index.d.ts +21 -3
- package/dist/index.js +532 -446
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/src/components/code-editor/index.tsx +2 -2
- package/src/components/condition-row/constants.ts +8 -0
- package/src/components/display-inputs-values/index.tsx +1 -1
- package/src/components/dynamic-value-input/hooks.ts +1 -1
- package/src/components/inputs-values-tree/hooks/use-child-list.tsx +1 -1
- package/src/components/json-editor-with-variables/extensions/variable-tag.tsx +1 -1
- package/src/components/json-editor-with-variables/index.tsx +2 -2
- package/src/components/json-schema-editor/hooks.tsx +1 -1
- package/src/components/prompt-editor/index.tsx +2 -2
- package/src/components/prompt-editor-with-inputs/index.tsx +2 -2
- package/src/components/prompt-editor-with-inputs/inputs-picker.tsx +1 -1
- package/src/components/prompt-editor-with-variables/extensions/variable-tag.tsx +1 -1
- package/src/components/prompt-editor-with-variables/index.tsx +2 -2
- package/src/components/variable-selector/context.tsx +28 -0
- package/src/components/variable-selector/index.tsx +10 -1
- package/src/components/variable-selector/use-variable-tree.tsx +3 -3
- package/src/effects/validate-when-variable-sync/index.ts +1 -1
- package/src/form-plugins/infer-assign-plugin/index.ts +1 -1
- package/src/form-plugins/infer-inputs-plugin/index.ts +1 -1
- package/src/hooks/use-object-list/index.tsx +1 -1
- package/src/plugins/json-schema-preset/type-definition/date-time.tsx +25 -0
- package/src/plugins/json-schema-preset/type-definition/index.tsx +2 -0
- package/src/shared/flow-value/utils.ts +1 -1
- package/src/shared/format-legacy-refs/index.ts +1 -1
- package/src/shared/index.ts +1 -0
- package/src/shared/lazy-suspense/index.tsx +28 -0
- package/src/validate/validate-flow-value/index.tsx +1 -1
- package/dist/esm/chunk-6OZSB6PD.js.map +0 -1
- package/dist/esm/chunk-G4HQ7OSI.js.map +0 -1
- package/dist/esm/chunk-QIJ4QVB2.js.map +0 -1
- package/dist/esm/editor-H2R7JJLO.js.map +0 -1
- package/dist/esm/editor-JX42GFAZ.js.map +0 -1
- package/dist/esm/editor-YMNCDGUR.js.map +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PromptEditor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-727SU246.js";
|
|
4
4
|
import {
|
|
5
5
|
CodeEditor,
|
|
6
6
|
CodeEditorMini,
|
|
@@ -8,11 +8,12 @@ import {
|
|
|
8
8
|
JsonSchemaTypePresetProvider,
|
|
9
9
|
JsonSchemaUtils,
|
|
10
10
|
VariableSelector,
|
|
11
|
+
VariableSelectorProvider,
|
|
11
12
|
createDisableDeclarationPlugin,
|
|
12
13
|
createTypePresetPlugin,
|
|
13
14
|
useTypeManager,
|
|
14
15
|
useVariableTree
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-IHOHRV5V.js";
|
|
16
17
|
import {
|
|
17
18
|
FlowValueUtils,
|
|
18
19
|
createInjectMaterial,
|
|
@@ -22,9 +23,11 @@ import {
|
|
|
22
23
|
formatNewRefToLegacyRef,
|
|
23
24
|
isLegacyFlowRefValueSchema,
|
|
24
25
|
isNewFlowRefValueSchema,
|
|
26
|
+
lazySuspense,
|
|
25
27
|
polyfillCreateRoot,
|
|
26
|
-
unstableSetCreateRoot
|
|
27
|
-
|
|
28
|
+
unstableSetCreateRoot,
|
|
29
|
+
withSuspense
|
|
30
|
+
} from "./chunk-DEZUEMUM.js";
|
|
28
31
|
|
|
29
32
|
// src/components/type-selector/index.tsx
|
|
30
33
|
import React, { useMemo } from "react";
|
|
@@ -274,7 +277,7 @@ var ConstantInputWrapper = styled.div`
|
|
|
274
277
|
|
|
275
278
|
// src/components/json-schema-editor/hooks.tsx
|
|
276
279
|
import { useEffect as useEffect2, useRef, useState as useState2 } from "react";
|
|
277
|
-
import { difference, omit } from "lodash";
|
|
280
|
+
import { difference, omit } from "lodash-es";
|
|
278
281
|
import { produce } from "immer";
|
|
279
282
|
import { useTypeManager as useTypeManager2 } from "@flowgram.ai/json-schema";
|
|
280
283
|
var _id = 0;
|
|
@@ -679,7 +682,7 @@ function useIncludeSchema(schemaFromProps) {
|
|
|
679
682
|
if (schemaFromProps?.type === "number") {
|
|
680
683
|
return [schemaFromProps, { type: "integer" }];
|
|
681
684
|
}
|
|
682
|
-
return { ...schemaFromProps, extra: { ...schemaFromProps?.extra
|
|
685
|
+
return { ...schemaFromProps, extra: { weak: true, ...schemaFromProps?.extra } };
|
|
683
686
|
}, [schemaFromProps]);
|
|
684
687
|
return includeSchema;
|
|
685
688
|
}
|
|
@@ -872,6 +875,14 @@ var defaultRules = {
|
|
|
872
875
|
map: {
|
|
873
876
|
["is_empty" /* IS_EMPTY */]: null,
|
|
874
877
|
["is_not_empty" /* IS_NOT_EMPTY */]: null
|
|
878
|
+
},
|
|
879
|
+
["date-time"]: {
|
|
880
|
+
["eq" /* EQ */]: "date-time",
|
|
881
|
+
["neq" /* NEQ */]: "date-time",
|
|
882
|
+
["gt" /* GT */]: "date-time",
|
|
883
|
+
["gte" /* GTE */]: "date-time",
|
|
884
|
+
["lt" /* LT */]: "date-time",
|
|
885
|
+
["lte" /* LTE */]: "date-time"
|
|
875
886
|
}
|
|
876
887
|
};
|
|
877
888
|
var defaultOpConfigs = {
|
|
@@ -1212,7 +1223,7 @@ import { IconDelete, IconPlus as IconPlus2 } from "@douyinfe/semi-icons";
|
|
|
1212
1223
|
// src/hooks/use-object-list/index.tsx
|
|
1213
1224
|
import { useEffect as useEffect4, useRef as useRef3, useState as useState5 } from "react";
|
|
1214
1225
|
import { nanoid } from "nanoid";
|
|
1215
|
-
import { difference as difference2, get, isObject, set } from "lodash";
|
|
1226
|
+
import { difference as difference2, get, isObject, set } from "lodash-es";
|
|
1216
1227
|
function genId2() {
|
|
1217
1228
|
return nanoid();
|
|
1218
1229
|
}
|
|
@@ -1370,21 +1381,18 @@ function BatchOutputs(props) {
|
|
|
1370
1381
|
}
|
|
1371
1382
|
|
|
1372
1383
|
// src/components/prompt-editor-with-variables/index.tsx
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
() => import("./editor-JX42GFAZ.js").then((module) => ({ default: module.PromptEditorWithVariables }))
|
|
1384
|
+
var PromptEditorWithVariables = lazySuspense(
|
|
1385
|
+
() => import("./editor-Z24WLBPO.js").then((module) => ({ default: module.PromptEditorWithVariables }))
|
|
1376
1386
|
);
|
|
1377
1387
|
|
|
1378
1388
|
// src/components/prompt-editor-with-inputs/index.tsx
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
() => import("./editor-YMNCDGUR.js").then((module) => ({ default: module.PromptEditorWithInputs }))
|
|
1389
|
+
var PromptEditorWithInputs = lazySuspense(
|
|
1390
|
+
() => import("./editor-OXPGKPF5.js").then((module) => ({ default: module.PromptEditorWithInputs }))
|
|
1382
1391
|
);
|
|
1383
1392
|
|
|
1384
1393
|
// src/components/json-editor-with-variables/index.tsx
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
() => import("./editor-H2R7JJLO.js").then((module) => ({ default: module.JsonEditorWithVariables }))
|
|
1394
|
+
var JsonEditorWithVariables = lazySuspense(
|
|
1395
|
+
() => import("./editor-4X7K477H.js").then((module) => ({ default: module.JsonEditorWithVariables }))
|
|
1388
1396
|
);
|
|
1389
1397
|
|
|
1390
1398
|
// src/components/inputs-values/index.tsx
|
|
@@ -1698,7 +1706,7 @@ function DisplayFlowValue({ value, title, showIconInTree }) {
|
|
|
1698
1706
|
|
|
1699
1707
|
// src/components/display-inputs-values/index.tsx
|
|
1700
1708
|
import React20, { useMemo as useMemo12 } from "react";
|
|
1701
|
-
import { isPlainObject } from "lodash";
|
|
1709
|
+
import { isPlainObject } from "lodash-es";
|
|
1702
1710
|
import { useScopeAvailable as useScopeAvailable4 } from "@flowgram.ai/editor";
|
|
1703
1711
|
|
|
1704
1712
|
// src/components/display-inputs-values/styles.ts
|
|
@@ -1982,7 +1990,7 @@ import { IconChevronDown as IconChevronDown2, IconChevronRight as IconChevronRig
|
|
|
1982
1990
|
|
|
1983
1991
|
// src/components/inputs-values-tree/hooks/use-child-list.tsx
|
|
1984
1992
|
import { useMemo as useMemo13 } from "react";
|
|
1985
|
-
import { isPlainObject as isPlainObject2 } from "lodash";
|
|
1993
|
+
import { isPlainObject as isPlainObject2 } from "lodash-es";
|
|
1986
1994
|
function useChildList(value, onChange) {
|
|
1987
1995
|
const canAddField = useMemo13(() => {
|
|
1988
1996
|
if (!isPlainObject2(value)) {
|
|
@@ -2322,7 +2330,7 @@ var syncVariableTitle = [
|
|
|
2322
2330
|
];
|
|
2323
2331
|
|
|
2324
2332
|
// src/effects/validate-when-variable-sync/index.ts
|
|
2325
|
-
import { isEmpty } from "lodash";
|
|
2333
|
+
import { isEmpty } from "lodash-es";
|
|
2326
2334
|
import {
|
|
2327
2335
|
DataEvent as DataEvent3,
|
|
2328
2336
|
getNodeScope,
|
|
@@ -2477,7 +2485,7 @@ var createBatchOutputsFormPlugin = defineFormPluginCreator({
|
|
|
2477
2485
|
});
|
|
2478
2486
|
|
|
2479
2487
|
// src/form-plugins/infer-inputs-plugin/index.ts
|
|
2480
|
-
import { get as get2, set as set2 } from "lodash";
|
|
2488
|
+
import { get as get2, set as set2 } from "lodash-es";
|
|
2481
2489
|
import { defineFormPluginCreator as defineFormPluginCreator2, getNodePrivateScope as getNodePrivateScope3, getNodeScope as getNodeScope5 } from "@flowgram.ai/editor";
|
|
2482
2490
|
var createInferInputsPlugin = defineFormPluginCreator2({
|
|
2483
2491
|
onSetupFormMeta({ addFormatOnSubmit }, { sourceKey, targetKey, scope }) {
|
|
@@ -2499,7 +2507,7 @@ var createInferInputsPlugin = defineFormPluginCreator2({
|
|
|
2499
2507
|
});
|
|
2500
2508
|
|
|
2501
2509
|
// src/form-plugins/infer-assign-plugin/index.ts
|
|
2502
|
-
import { set as set3, uniqBy } from "lodash";
|
|
2510
|
+
import { set as set3, uniqBy } from "lodash-es";
|
|
2503
2511
|
import { JsonSchemaUtils as JsonSchemaUtils8 } from "@flowgram.ai/json-schema";
|
|
2504
2512
|
import {
|
|
2505
2513
|
ASTFactory as ASTFactory4,
|
|
@@ -2555,7 +2563,7 @@ var createInferAssignPlugin = defineFormPluginCreator3({
|
|
|
2555
2563
|
});
|
|
2556
2564
|
|
|
2557
2565
|
// src/validate/validate-flow-value/index.tsx
|
|
2558
|
-
import { isNil } from "lodash";
|
|
2566
|
+
import { isNil } from "lodash-es";
|
|
2559
2567
|
import { FeedbackLevel, getNodeScope as getNodeScope7 } from "@flowgram.ai/editor";
|
|
2560
2568
|
function validateFlowValue(value, ctx) {
|
|
2561
2569
|
const { node, required, errorMessages } = ctx;
|
|
@@ -2625,6 +2633,7 @@ export {
|
|
|
2625
2633
|
PromptEditorWithVariables,
|
|
2626
2634
|
TypeSelector,
|
|
2627
2635
|
VariableSelector,
|
|
2636
|
+
VariableSelectorProvider,
|
|
2628
2637
|
autoRenameRefEffect,
|
|
2629
2638
|
createBatchOutputsFormPlugin,
|
|
2630
2639
|
createDisableDeclarationPlugin,
|
|
@@ -2639,6 +2648,7 @@ export {
|
|
|
2639
2648
|
getTypeSelectValue,
|
|
2640
2649
|
isLegacyFlowRefValueSchema,
|
|
2641
2650
|
isNewFlowRefValueSchema,
|
|
2651
|
+
lazySuspense,
|
|
2642
2652
|
listenRefSchemaChange,
|
|
2643
2653
|
listenRefValueChange,
|
|
2644
2654
|
parseTypeSelectValue,
|
|
@@ -2652,6 +2662,7 @@ export {
|
|
|
2652
2662
|
useTypeManager,
|
|
2653
2663
|
useVariableTree,
|
|
2654
2664
|
validateFlowValue,
|
|
2655
|
-
validateWhenVariableSync
|
|
2665
|
+
validateWhenVariableSync,
|
|
2666
|
+
withSuspense
|
|
2656
2667
|
};
|
|
2657
2668
|
//# sourceMappingURL=index.js.map
|