@nocobase/client 1.2.20-alpha → 1.2.21-alpha

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/es/index.mjs CHANGED
@@ -3941,7 +3941,7 @@ function addAppVersion(e, t) {
3941
3941
  addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
3942
3942
  }), e;
3943
3943
  }
3944
- const name = "@nocobase/client", version$1 = "1.2.20-alpha", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
3944
+ const name = "@nocobase/client", version$1 = "1.2.21-alpha", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
3945
3945
  "@ahooksjs/use-url-state": "3.5.1",
3946
3946
  "@ant-design/cssinjs": "^1.11.1",
3947
3947
  "@ant-design/icons": "^5.1.4",
@@ -3962,9 +3962,9 @@ const name = "@nocobase/client", version$1 = "1.2.20-alpha", license = "AGPL-3.0
3962
3962
  "@formily/reactive-react": "^2.2.27",
3963
3963
  "@formily/shared": "^2.2.27",
3964
3964
  "@formily/validator": "^2.2.27",
3965
- "@nocobase/evaluators": "1.2.20-alpha",
3966
- "@nocobase/sdk": "1.2.20-alpha",
3967
- "@nocobase/utils": "1.2.20-alpha",
3965
+ "@nocobase/evaluators": "1.2.21-alpha",
3966
+ "@nocobase/sdk": "1.2.21-alpha",
3967
+ "@nocobase/utils": "1.2.21-alpha",
3968
3968
  ahooks: "^3.7.2",
3969
3969
  antd: "^5.12.8",
3970
3970
  "antd-style": "3.4.5",
@@ -21380,6 +21380,29 @@ const actionSettingsItems = [
21380
21380
  return isValid((t = e == null ? void 0 : e["x-action-settings"]) == null ? void 0 : t.triggerWorkflows);
21381
21381
  }
21382
21382
  },
21383
+ {
21384
+ type: "switch",
21385
+ name: "clearDefaultValue",
21386
+ useComponentProps() {
21387
+ var n;
21388
+ const { t: e } = useTranslation(), t = useFieldSchema(), { dn: o } = useDesignable();
21389
+ return {
21390
+ title: e("Clear default value"),
21391
+ checked: (n = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : n.clearDefaultValue,
21392
+ onChange: (r) => {
21393
+ o.deepMerge({
21394
+ "x-uid": t["x-uid"],
21395
+ "x-component-props": {
21396
+ clearDefaultValue: r
21397
+ }
21398
+ });
21399
+ }
21400
+ };
21401
+ },
21402
+ useVisible() {
21403
+ return useFieldSchema()["x-use-component-props"] === "useResetBlockActionProps";
21404
+ }
21405
+ },
21383
21406
  {
21384
21407
  name: "remove",
21385
21408
  sort: 100,
@@ -23730,7 +23753,10 @@ const useCreateActionProps = () => {
23730
23753
  const e = useForm(), t = useFieldSchema(), { getDataBlocks: o } = useFilterBlock(), { targets: n, uid: r } = findFilterTargets(t), { doFilter: i, getFilterFromCurrentForm: a } = useDoFilter();
23731
23754
  return {
23732
23755
  doReset: () => V(void 0, null, function* () {
23733
- if (yield e.reset(), _.isEmpty(a()))
23756
+ var l;
23757
+ if (yield e.reset(void 0, {
23758
+ forceClear: !!((l = t == null ? void 0 : t["x-component-props"]) != null && l.clearDefaultValue)
23759
+ }), _.isEmpty(a()))
23734
23760
  return doReset({ getDataBlocks: o, targets: n, uid: r });
23735
23761
  yield i();
23736
23762
  })