@flowgram.ai/form-materials 0.3.3 → 0.3.4
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/index.js +61 -30
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.mts +14 -18
- package/dist/index.d.ts +14 -18
- package/dist/index.js +164 -133
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/components/condition-row/constants.ts +2 -2
- package/src/components/condition-row/hooks/useOp.tsx +13 -9
- package/src/components/condition-row/hooks/useRule.ts +6 -3
- package/src/components/condition-row/index.tsx +22 -6
- package/src/components/condition-row/types.ts +4 -6
- package/src/components/json-schema-editor/index.tsx +7 -4
- package/src/components/type-selector/index.tsx +2 -4
- package/src/components/variable-selector/index.tsx +2 -1
- package/src/plugins/json-schema-preset/type-definition/array.tsx +3 -1
- package/src/plugins/json-schema-preset/type-definition/boolean.tsx +4 -3
- package/src/plugins/json-schema-preset/type-definition/integer.tsx +2 -1
- package/src/plugins/json-schema-preset/type-definition/number.tsx +2 -1
- package/src/plugins/json-schema-preset/type-definition/object.tsx +3 -1
- package/src/plugins/json-schema-preset/type-definition/string.tsx +7 -1
package/dist/index.d.mts
CHANGED
|
@@ -220,25 +220,17 @@ declare function DynamicValueInput({ value, onChange, readonly, style, schema: s
|
|
|
220
220
|
* SPDX-License-Identifier: MIT
|
|
221
221
|
*/
|
|
222
222
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
NIN = "nin",
|
|
232
|
-
CONTAINS = "contains",
|
|
233
|
-
NOT_CONTAINS = "not_contains",
|
|
234
|
-
IS_EMPTY = "is_empty",
|
|
235
|
-
IS_NOT_EMPTY = "is_not_empty",
|
|
236
|
-
IS_TRUE = "is_true",
|
|
237
|
-
IS_FALSE = "is_false"
|
|
238
|
-
}
|
|
223
|
+
interface OpConfig {
|
|
224
|
+
label: string;
|
|
225
|
+
abbreviation: string;
|
|
226
|
+
rightDisplay?: string;
|
|
227
|
+
}
|
|
228
|
+
type OpConfigs = Record<string, OpConfig>;
|
|
229
|
+
type IRule = Partial<Record<string, string | null>>;
|
|
230
|
+
type IRules = Record<string, IRule>;
|
|
239
231
|
interface ConditionRowValueType {
|
|
240
232
|
left?: IFlowRefValue;
|
|
241
|
-
operator?:
|
|
233
|
+
operator?: string;
|
|
242
234
|
right?: IFlowConstantRefValue;
|
|
243
235
|
}
|
|
244
236
|
|
|
@@ -252,8 +244,12 @@ interface PropTypes {
|
|
|
252
244
|
onChange: (value?: ConditionRowValueType) => void;
|
|
253
245
|
style?: React$1.CSSProperties;
|
|
254
246
|
readonly?: boolean;
|
|
247
|
+
ruleConfig?: {
|
|
248
|
+
ops?: OpConfigs;
|
|
249
|
+
rules?: IRules;
|
|
250
|
+
};
|
|
255
251
|
}
|
|
256
|
-
declare function ConditionRow({ style, value, onChange, readonly }: PropTypes): React$1.JSX.Element;
|
|
252
|
+
declare function ConditionRow({ style, value, onChange, readonly, ruleConfig, }: PropTypes): React$1.JSX.Element;
|
|
257
253
|
|
|
258
254
|
/**
|
|
259
255
|
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
package/dist/index.d.ts
CHANGED
|
@@ -220,25 +220,17 @@ declare function DynamicValueInput({ value, onChange, readonly, style, schema: s
|
|
|
220
220
|
* SPDX-License-Identifier: MIT
|
|
221
221
|
*/
|
|
222
222
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
NIN = "nin",
|
|
232
|
-
CONTAINS = "contains",
|
|
233
|
-
NOT_CONTAINS = "not_contains",
|
|
234
|
-
IS_EMPTY = "is_empty",
|
|
235
|
-
IS_NOT_EMPTY = "is_not_empty",
|
|
236
|
-
IS_TRUE = "is_true",
|
|
237
|
-
IS_FALSE = "is_false"
|
|
238
|
-
}
|
|
223
|
+
interface OpConfig {
|
|
224
|
+
label: string;
|
|
225
|
+
abbreviation: string;
|
|
226
|
+
rightDisplay?: string;
|
|
227
|
+
}
|
|
228
|
+
type OpConfigs = Record<string, OpConfig>;
|
|
229
|
+
type IRule = Partial<Record<string, string | null>>;
|
|
230
|
+
type IRules = Record<string, IRule>;
|
|
239
231
|
interface ConditionRowValueType {
|
|
240
232
|
left?: IFlowRefValue;
|
|
241
|
-
operator?:
|
|
233
|
+
operator?: string;
|
|
242
234
|
right?: IFlowConstantRefValue;
|
|
243
235
|
}
|
|
244
236
|
|
|
@@ -252,8 +244,12 @@ interface PropTypes {
|
|
|
252
244
|
onChange: (value?: ConditionRowValueType) => void;
|
|
253
245
|
style?: React$1.CSSProperties;
|
|
254
246
|
readonly?: boolean;
|
|
247
|
+
ruleConfig?: {
|
|
248
|
+
ops?: OpConfigs;
|
|
249
|
+
rules?: IRules;
|
|
250
|
+
};
|
|
255
251
|
}
|
|
256
|
-
declare function ConditionRow({ style, value, onChange, readonly }: PropTypes): React$1.JSX.Element;
|
|
252
|
+
declare function ConditionRow({ style, value, onChange, readonly, ruleConfig, }: PropTypes): React$1.JSX.Element;
|
|
257
253
|
|
|
258
254
|
/**
|
|
259
255
|
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|