@nocobase/client 1.2.19-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.
@@ -228,3 +228,28 @@ export declare const collection: ({
228
228
  selected?: undefined;
229
229
  schema?: undefined;
230
230
  })[];
231
+ export declare const richText: ({
232
+ label: string;
233
+ value: string;
234
+ selected: boolean;
235
+ schema: {
236
+ type: string;
237
+ 'x-component': string;
238
+ };
239
+ noValue?: undefined;
240
+ } | {
241
+ label: string;
242
+ value: string;
243
+ schema: {
244
+ type: string;
245
+ 'x-component': string;
246
+ };
247
+ selected?: undefined;
248
+ noValue?: undefined;
249
+ } | {
250
+ label: string;
251
+ value: string;
252
+ noValue: boolean;
253
+ selected?: undefined;
254
+ schema?: undefined;
255
+ })[];
@@ -82,10 +82,18 @@ export declare class RichTextFieldInterface extends CollectionFieldInterface {
82
82
  label: string;
83
83
  value: string;
84
84
  selected: boolean;
85
+ schema: {
86
+ type: string;
87
+ 'x-component': string;
88
+ };
85
89
  noValue?: undefined;
86
90
  } | {
87
91
  label: string;
88
92
  value: string;
93
+ schema: {
94
+ type: string;
95
+ 'x-component': string;
96
+ };
89
97
  selected?: undefined;
90
98
  noValue?: undefined;
91
99
  } | {
@@ -93,6 +101,7 @@ export declare class RichTextFieldInterface extends CollectionFieldInterface {
93
101
  value: string;
94
102
  noValue: boolean;
95
103
  selected?: undefined;
104
+ schema?: undefined;
96
105
  })[];
97
106
  };
98
107
  }
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.19-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.19-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.19-alpha",
3966
- "@nocobase/sdk": "1.2.19-alpha",
3967
- "@nocobase/utils": "1.2.19-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",
@@ -16146,7 +16146,7 @@ const useFormItemInitializerFields = (e) => {
16146
16146
  var h;
16147
16147
  return (m == null ? void 0 : m.interface) && ((h = n(m.interface)) == null ? void 0 : h.filterable);
16148
16148
  })) == null ? void 0 : p.map((m) => {
16149
- var S, b, y;
16149
+ var S, b, y, v, I, k, A;
16150
16150
  const h = n(m.interface), f = r(m.target);
16151
16151
  let x = {
16152
16152
  type: "string",
@@ -16159,7 +16159,9 @@ const useFormItemInitializerFields = (e) => {
16159
16159
  "x-decorator": "FormItem",
16160
16160
  "x-use-decorator-props": "useFormItemProps",
16161
16161
  "x-collection-field": `${t}.${m.name}`,
16162
- "x-component-props": {}
16162
+ "x-component-props": {
16163
+ component: (v = (y = (b = (S = h == null ? void 0 : h.filterable) == null ? void 0 : S.operators) == null ? void 0 : b[0]) == null ? void 0 : y.schema) == null ? void 0 : v["x-component"]
16164
+ }
16163
16165
  };
16164
16166
  return isAssocField(m) && (x = {
16165
16167
  type: "string",
@@ -16172,16 +16174,16 @@ const useFormItemInitializerFields = (e) => {
16172
16174
  "x-decorator": "FormItem",
16173
16175
  "x-use-decorator-props": "useFormItemProps",
16174
16176
  "x-collection-field": `${t}.${m.name}`,
16175
- "x-component-props": (S = m.uiSchema) == null ? void 0 : S["x-component-props"]
16177
+ "x-component-props": (I = m.uiSchema) == null ? void 0 : I["x-component-props"]
16176
16178
  }), {
16177
- name: ((b = m == null ? void 0 : m.uiSchema) == null ? void 0 : b.title) || m.name,
16179
+ name: ((k = m == null ? void 0 : m.uiSchema) == null ? void 0 : k.title) || m.name,
16178
16180
  type: "item",
16179
- title: ((y = m == null ? void 0 : m.uiSchema) == null ? void 0 : y.title) || m.name,
16181
+ title: ((A = m == null ? void 0 : m.uiSchema) == null ? void 0 : A.title) || m.name,
16180
16182
  Component: "CollectionFieldInitializer",
16181
16183
  remove: removeGridFormItem,
16182
- schemaInitialize: (v) => {
16183
- var I;
16184
- (I = h == null ? void 0 : h.schemaInitialize) == null || I.call(h, v, {
16184
+ schemaInitialize: (w) => {
16185
+ var M;
16186
+ (M = h == null ? void 0 : h.schemaInitialize) == null || M.call(h, w, {
16185
16187
  field: m,
16186
16188
  block: l,
16187
16189
  readPretty: a,
@@ -21378,6 +21380,29 @@ const actionSettingsItems = [
21378
21380
  return isValid((t = e == null ? void 0 : e["x-action-settings"]) == null ? void 0 : t.triggerWorkflows);
21379
21381
  }
21380
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
+ },
21381
21406
  {
21382
21407
  name: "remove",
21383
21408
  sort: 100,
@@ -23728,7 +23753,10 @@ const useCreateActionProps = () => {
23728
23753
  const e = useForm(), t = useFieldSchema(), { getDataBlocks: o } = useFilterBlock(), { targets: n, uid: r } = findFilterTargets(t), { doFilter: i, getFilterFromCurrentForm: a } = useDoFilter();
23729
23754
  return {
23730
23755
  doReset: () => V(void 0, null, function* () {
23731
- 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()))
23732
23760
  return doReset({ getDataBlocks: o, targets: n, uid: r });
23733
23761
  yield i();
23734
23762
  })
@@ -44236,6 +44264,42 @@ const string = [
44236
44264
  },
44237
44265
  { label: '{{t("is empty")}}', value: "$empty", noValue: !0 },
44238
44266
  { label: '{{t("is not empty")}}', value: "$notEmpty", noValue: !0 }
44267
+ ], richText = [
44268
+ {
44269
+ label: '{{t("contains")}}',
44270
+ value: "$includes",
44271
+ selected: !0,
44272
+ schema: {
44273
+ type: "string",
44274
+ "x-component": "Input"
44275
+ }
44276
+ },
44277
+ {
44278
+ label: '{{t("does not contain")}}',
44279
+ value: "$notIncludes",
44280
+ schema: {
44281
+ type: "string",
44282
+ "x-component": "Input"
44283
+ }
44284
+ },
44285
+ {
44286
+ label: '{{t("is")}}',
44287
+ value: "$eq",
44288
+ schema: {
44289
+ type: "string",
44290
+ "x-component": "Input"
44291
+ }
44292
+ },
44293
+ {
44294
+ label: '{{t("is not")}}',
44295
+ value: "$ne",
44296
+ schema: {
44297
+ type: "string",
44298
+ "x-component": "Input"
44299
+ }
44300
+ },
44301
+ { label: '{{t("is empty")}}', value: "$empty", noValue: !0 },
44302
+ { label: '{{t("is not empty")}}', value: "$notEmpty", noValue: !0 }
44239
44303
  ], operators = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
44240
44304
  __proto__: null,
44241
44305
  array,
@@ -44246,6 +44310,7 @@ const string = [
44246
44310
  id,
44247
44311
  number,
44248
44312
  object,
44313
+ richText,
44249
44314
  string,
44250
44315
  tableoid,
44251
44316
  time
@@ -47383,7 +47448,7 @@ class RichTextFieldInterface extends CollectionFieldInterface {
47383
47448
  }
47384
47449
  }));
47385
47450
  P(this, "filterable", {
47386
- operators: string
47451
+ operators: richText
47387
47452
  });
47388
47453
  }
47389
47454
  schemaInitialize(o, { block: n }) {