@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/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
- declare enum Op {
224
- EQ = "eq",
225
- NEQ = "neq",
226
- GT = "gt",
227
- GTE = "gte",
228
- LT = "lt",
229
- LTE = "lte",
230
- IN = "in",
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?: Op;
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
- declare enum Op {
224
- EQ = "eq",
225
- NEQ = "neq",
226
- GT = "gt",
227
- GTE = "gte",
228
- LT = "lt",
229
- LTE = "lte",
230
- IN = "in",
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?: Op;
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