@flowgram.ai/form-materials 0.2.31 → 0.2.32

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.js CHANGED
@@ -1938,7 +1938,7 @@ function useRule(left) {
1938
1938
  var import_react14 = __toESM(require("react"));
1939
1939
  var import_semi_ui9 = require("@douyinfe/semi-ui");
1940
1940
  var import_semi_icons7 = require("@douyinfe/semi-icons");
1941
- function useOp({ rule, op, onChange }) {
1941
+ function useOp({ rule, op, onChange, readonly }) {
1942
1942
  const options2 = (0, import_react14.useMemo)(
1943
1943
  () => Object.keys(rule || {}).map((_op) => ({
1944
1944
  ...opConfigs[_op] || {},
@@ -1951,6 +1951,7 @@ function useOp({ rule, op, onChange }) {
1951
1951
  import_semi_ui9.Select,
1952
1952
  {
1953
1953
  style: { height: 22 },
1954
+ disabled: readonly,
1954
1955
  size: "small",
1955
1956
  value: op,
1956
1957
  optionList: options2,
@@ -1970,7 +1971,8 @@ function ConditionRow({ style, value, onChange, readonly }) {
1970
1971
  const { renderOpSelect, opConfig } = useOp({
1971
1972
  rule,
1972
1973
  op: operator,
1973
- onChange: (v) => onChange({ ...value, operator: v })
1974
+ onChange: (v) => onChange({ ...value, operator: v }),
1975
+ readonly
1974
1976
  });
1975
1977
  const targetSchema = (0, import_react15.useMemo)(() => {
1976
1978
  const targetType = rule?.[operator] || null;