@nocobase/client 1.6.29 → 1.6.30

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
@@ -9218,7 +9218,7 @@ function addAppVersion(e, t) {
9218
9218
  addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
9219
9219
  }), e;
9220
9220
  }
9221
- const name = "@nocobase/client", version = "1.6.29", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
9221
+ const name = "@nocobase/client", version = "1.6.30", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
9222
9222
  "@ahooksjs/use-url-state": "3.5.1",
9223
9223
  "@ant-design/cssinjs": "^1.11.1",
9224
9224
  "@ant-design/icons": "^5.6.1",
@@ -9240,9 +9240,9 @@ const name = "@nocobase/client", version = "1.6.29", license = "AGPL-3.0", main
9240
9240
  "@formily/reactive-react": "^2.2.27",
9241
9241
  "@formily/shared": "^2.2.27",
9242
9242
  "@formily/validator": "^2.2.27",
9243
- "@nocobase/evaluators": "1.6.29",
9244
- "@nocobase/sdk": "1.6.29",
9245
- "@nocobase/utils": "1.6.29",
9243
+ "@nocobase/evaluators": "1.6.30",
9244
+ "@nocobase/sdk": "1.6.30",
9245
+ "@nocobase/utils": "1.6.30",
9246
9246
  ahooks: "^3.7.2",
9247
9247
  antd: "5.12.8",
9248
9248
  "antd-style": "3.7.1",
@@ -35431,7 +35431,14 @@ const tableBlockSettings = new SchemaSettings({
35431
35431
  },
35432
35432
  ellipsisSettingsItem
35433
35433
  ]
35434
- }), fieldComponent$5 = {
35434
+ }), fileSizeOptions = [
35435
+ { label: "{{t('Large')}}", value: "large" },
35436
+ { label: "{{t('Default')}}", value: "default" },
35437
+ { label: "{{t('Small')}}", value: "small" },
35438
+ { label: 500, value: 500 },
35439
+ { label: 400, value: 400 },
35440
+ { label: 300, value: 300 }
35441
+ ], fieldComponent$5 = {
35435
35442
  name: "fieldComponent",
35436
35443
  type: "select",
35437
35444
  useComponentProps() {
@@ -35450,6 +35457,30 @@ const tableBlockSettings = new SchemaSettings({
35450
35457
  }
35451
35458
  };
35452
35459
  }
35460
+ }, fileSizeSetting = {
35461
+ name: "size",
35462
+ type: "select",
35463
+ useVisible() {
35464
+ const e = useIsFieldReadPretty(), { fieldSchema: t } = useColumnSchema$1();
35465
+ return e && !t;
35466
+ },
35467
+ useComponentProps() {
35468
+ var i;
35469
+ const { t: e } = useTranslation(), t = useField(), n = useFieldSchema(), { dn: o } = useDesignable(), r = useCompile();
35470
+ return {
35471
+ title: e("Size"),
35472
+ options: r(fileSizeOptions),
35473
+ value: ((i = t == null ? void 0 : t.componentProps) == null ? void 0 : i.size) || "default",
35474
+ onChange(a) {
35475
+ const l = {
35476
+ "x-uid": n["x-uid"]
35477
+ };
35478
+ n["x-component-props"] = n["x-component-props"] || {}, n["x-component-props"].size = a, l["x-component-props"] = n["x-component-props"], t.componentProps = t.componentProps || {}, t.componentProps.size = a, o.emit("patch", {
35479
+ schema: l
35480
+ }), o.refresh();
35481
+ }
35482
+ };
35483
+ }
35453
35484
  }, showFileName = {
35454
35485
  name: "showFileName",
35455
35486
  type: "switch",
@@ -35521,35 +35552,7 @@ const tableBlockSettings = new SchemaSettings({
35521
35552
  return !((e == null ? void 0 : e["x-read-pretty"]) || t.readPretty || n.readPretty);
35522
35553
  }
35523
35554
  },
35524
- {
35525
- name: "size",
35526
- type: "select",
35527
- useVisible() {
35528
- const e = useIsFieldReadPretty(), { fieldSchema: t } = useColumnSchema$1();
35529
- return e && !t;
35530
- },
35531
- useComponentProps() {
35532
- var r;
35533
- const { t: e } = useTranslation(), t = useField(), n = useFieldSchema(), { dn: o } = useDesignable();
35534
- return {
35535
- title: e("Size"),
35536
- options: [
35537
- { label: e("Large"), value: "large" },
35538
- { label: e("Default"), value: "default" },
35539
- { label: e("Small"), value: "small" }
35540
- ],
35541
- value: ((r = t == null ? void 0 : t.componentProps) == null ? void 0 : r.size) || "default",
35542
- onChange(i) {
35543
- const a = {
35544
- "x-uid": n["x-uid"]
35545
- };
35546
- n["x-component-props"] = n["x-component-props"] || {}, n["x-component-props"].size = i, a["x-component-props"] = n["x-component-props"], t.componentProps = t.componentProps || {}, t.componentProps.size = i, o.emit("patch", {
35547
- schema: a
35548
- }), o.refresh();
35549
- }
35550
- };
35551
- }
35552
- },
35555
+ fileSizeSetting,
35553
35556
  showFileName,
35554
35557
  P(x({}, getAllowMultiple()), {
35555
35558
  useVisible() {
@@ -35622,71 +35625,25 @@ const tableBlockSettings = new SchemaSettings({
35622
35625
  }, previewComponentFieldSettings = new SchemaSettings({
35623
35626
  name: "fieldSettings:component:Preview",
35624
35627
  items: [
35625
- {
35626
- name: "size",
35627
- type: "select",
35628
+ P(x({}, fileSizeSetting), {
35628
35629
  useVisible() {
35629
35630
  var n;
35630
35631
  const { fieldSchema: e } = useColumnSchema();
35631
35632
  return !(((n = e == null ? void 0 : e.parent) == null ? void 0 : n["x-component"]) === "TableV2.Column");
35632
- },
35633
- useComponentProps() {
35634
- var r;
35635
- const { t: e } = useTranslation(), t = useField(), n = useFieldSchema(), { dn: o } = useDesignable();
35636
- return {
35637
- title: e("Size"),
35638
- options: [
35639
- { label: e("Large"), value: "large" },
35640
- { label: e("Default"), value: "default" },
35641
- { label: e("Small"), value: "small" }
35642
- ],
35643
- value: ((r = t == null ? void 0 : t.componentProps) == null ? void 0 : r.size) || "default",
35644
- onChange(i) {
35645
- const a = {
35646
- "x-uid": n["x-uid"]
35647
- };
35648
- n["x-component-props"] = n["x-component-props"] || {}, n["x-component-props"].size = i, a["x-component-props"] = n["x-component-props"], t.componentProps = t.componentProps || {}, t.componentProps.size = i, o.emit("patch", {
35649
- schema: a
35650
- }), o.refresh();
35651
- }
35652
- };
35653
35633
  }
35654
- },
35634
+ }),
35655
35635
  showFileName
35656
35636
  ]
35657
35637
  }), uploadAttachmentComponentFieldSettings = new SchemaSettings({
35658
35638
  name: "fieldSettings:component:Upload.Attachment",
35659
35639
  items: [
35660
- {
35661
- name: "size",
35662
- type: "select",
35640
+ P(x({}, fileSizeSetting), {
35663
35641
  useVisible() {
35664
35642
  var o;
35665
35643
  const { fieldSchema: e } = useColumnSchema$1(), t = ((o = e == null ? void 0 : e.parent) == null ? void 0 : o["x-component"]) === "TableV2.Column";
35666
35644
  return useIsFieldReadPretty() && !t;
35667
- },
35668
- useComponentProps() {
35669
- var r;
35670
- const { t: e } = useTranslation(), t = useField(), n = useFieldSchema(), { dn: o } = useDesignable();
35671
- return {
35672
- title: e("Size"),
35673
- options: [
35674
- { label: e("Large"), value: "large" },
35675
- { label: e("Default"), value: "default" },
35676
- { label: e("Small"), value: "small" }
35677
- ],
35678
- value: ((r = t == null ? void 0 : t.componentProps) == null ? void 0 : r.size) || "default",
35679
- onChange(i) {
35680
- const a = {
35681
- "x-uid": n["x-uid"]
35682
- };
35683
- n["x-component-props"] = n["x-component-props"] || {}, n["x-component-props"].size = i, a["x-component-props"] = n["x-component-props"], t.componentProps = t.componentProps || {}, t.componentProps.size = i, o.emit("patch", {
35684
- schema: a
35685
- }), o.refresh();
35686
- }
35687
- };
35688
35645
  }
35689
- },
35646
+ }),
35690
35647
  showFileName
35691
35648
  ]
35692
35649
  }), inputJSONSettings = new SchemaSettings({
@@ -41298,7 +41255,13 @@ function ReadPretty$9(a) {
41298
41255
  `${d}-picture-card-wrapper`,
41299
41256
  "nb-upload",
41300
41257
  r ? `nb-upload-${r}` : null,
41301
- u
41258
+ u,
41259
+ css`
41260
+ .ant-upload-list-picture-card-container {
41261
+ width: ${r}px !important;
41262
+ height: ${r}px !important;
41263
+ }
41264
+ `
41302
41265
  ),
41303
41266
  children: /* @__PURE__ */ jsx("div", { className: cls(`${d}-list`, `${d}-list-picture-card`), children: /* @__PURE__ */ jsx(
41304
41267
  AttachmentList,
@@ -63624,7 +63587,8 @@ const commonOptions$h = {
63624
63587
  "x-component-props": {
63625
63588
  layout: "one-column",
63626
63589
  style: {
63627
- float: "right"
63590
+ float: "right",
63591
+ overflow: "hidden"
63628
63592
  }
63629
63593
  }
63630
63594
  }
@@ -7,5 +7,13 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import { SchemaSettings } from '../../../../application/schema-settings/SchemaSettings';
10
+ export declare const fileSizeOptions: ({
11
+ label: string;
12
+ value: string;
13
+ } | {
14
+ label: number;
15
+ value: number;
16
+ })[];
17
+ export declare const fileSizeSetting: any;
10
18
  export declare const showFileName: any;
11
19
  export declare const fileManagerComponentFieldSettings: SchemaSettings<{}>;