@tachybase/client 1.3.22 → 1.3.23

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.
Files changed (182) hide show
  1. package/es/application/schema-settings/SchemaSettings.d.ts +1 -1
  2. package/es/application/schema-settings/SchemaSettings.mjs +5 -3
  3. package/es/application/schema-settings/SchemaSettingsManager.d.ts +6 -0
  4. package/es/application/schema-settings/SchemaSettingsManager.mjs +15 -0
  5. package/es/application/utils/globalDeps.mjs +2 -1
  6. package/es/built-in/attachment-preview/previewers/file-pdf.mjs +1 -1
  7. package/es/built-in/locale/LocalePlugin.mjs +0 -2
  8. package/es/built-in/pm/PluginDetail.mjs +0 -2
  9. package/es/collection-manager/Configuration/components/index.mjs +1 -1
  10. package/es/collection-manager/Configuration/index.d.ts +1 -0
  11. package/es/collection-manager/Configuration/index.mjs +2 -0
  12. package/es/collection-manager/hooks/index.d.ts +1 -0
  13. package/es/collection-manager/hooks/index.mjs +2 -0
  14. package/es/collection-manager/index.d.ts +1 -1
  15. package/es/collection-manager/index.mjs +2 -2
  16. package/es/collection-manager/interfaces/checkbox.d.ts +1 -0
  17. package/es/collection-manager/interfaces/checkbox.mjs +1 -1
  18. package/es/collection-manager/interfaces/checkboxGroup.d.ts +1 -0
  19. package/es/collection-manager/interfaces/checkboxGroup.mjs +1 -1
  20. package/es/collection-manager/interfaces/chinaRegion.d.ts +1 -0
  21. package/es/collection-manager/interfaces/chinaRegion.mjs +1 -1
  22. package/es/collection-manager/interfaces/collection.d.ts +1 -0
  23. package/es/collection-manager/interfaces/collection.mjs +2 -2
  24. package/es/collection-manager/interfaces/color.d.ts +1 -0
  25. package/es/collection-manager/interfaces/color.mjs +1 -1
  26. package/es/collection-manager/interfaces/createdAt.d.ts +1 -0
  27. package/es/collection-manager/interfaces/createdAt.mjs +1 -1
  28. package/es/collection-manager/interfaces/createdBy.d.ts +1 -0
  29. package/es/collection-manager/interfaces/createdBy.mjs +1 -1
  30. package/es/collection-manager/interfaces/datetime.d.ts +1 -0
  31. package/es/collection-manager/interfaces/datetime.mjs +1 -1
  32. package/es/collection-manager/interfaces/email.d.ts +1 -0
  33. package/es/collection-manager/interfaces/email.mjs +1 -1
  34. package/es/collection-manager/interfaces/icon.d.ts +1 -0
  35. package/es/collection-manager/interfaces/icon.mjs +1 -1
  36. package/es/collection-manager/interfaces/input.d.ts +1 -0
  37. package/es/collection-manager/interfaces/input.mjs +1 -1
  38. package/es/collection-manager/interfaces/integer.d.ts +1 -0
  39. package/es/collection-manager/interfaces/integer.mjs +1 -1
  40. package/es/collection-manager/interfaces/json.d.ts +1 -0
  41. package/es/collection-manager/interfaces/json.mjs +1 -1
  42. package/es/collection-manager/interfaces/m2m.d.ts +1 -0
  43. package/es/collection-manager/interfaces/m2m.mjs +1 -1
  44. package/es/collection-manager/interfaces/m2o.d.ts +1 -0
  45. package/es/collection-manager/interfaces/m2o.mjs +1 -1
  46. package/es/collection-manager/interfaces/markdown.d.ts +1 -0
  47. package/es/collection-manager/interfaces/markdown.mjs +1 -1
  48. package/es/collection-manager/interfaces/multipleSelect.d.ts +1 -0
  49. package/es/collection-manager/interfaces/multipleSelect.mjs +2 -2
  50. package/es/collection-manager/interfaces/nanoid.d.ts +1 -0
  51. package/es/collection-manager/interfaces/nanoid.mjs +1 -1
  52. package/es/collection-manager/interfaces/number.d.ts +1 -0
  53. package/es/collection-manager/interfaces/number.mjs +1 -1
  54. package/es/collection-manager/interfaces/o2m.d.ts +1 -0
  55. package/es/collection-manager/interfaces/o2m.mjs +1 -1
  56. package/es/collection-manager/interfaces/o2o.d.ts +1 -0
  57. package/es/collection-manager/interfaces/o2o.mjs +1 -1
  58. package/es/collection-manager/interfaces/password.d.ts +1 -0
  59. package/es/collection-manager/interfaces/password.mjs +1 -1
  60. package/es/collection-manager/interfaces/percent.d.ts +1 -0
  61. package/es/collection-manager/interfaces/percent.mjs +2 -2
  62. package/es/collection-manager/interfaces/phone.d.ts +1 -0
  63. package/es/collection-manager/interfaces/phone.mjs +1 -1
  64. package/es/collection-manager/interfaces/radioGroup.d.ts +1 -0
  65. package/es/collection-manager/interfaces/radioGroup.mjs +1 -1
  66. package/es/collection-manager/interfaces/richText.d.ts +1 -0
  67. package/es/collection-manager/interfaces/richText.mjs +1 -1
  68. package/es/collection-manager/interfaces/select.d.ts +1 -0
  69. package/es/collection-manager/interfaces/select.mjs +2 -2
  70. package/es/collection-manager/interfaces/sort.d.ts +1 -0
  71. package/es/collection-manager/interfaces/sort.mjs +1 -1
  72. package/es/collection-manager/interfaces/subTable.d.ts +1 -0
  73. package/es/collection-manager/interfaces/subTable.mjs +1 -1
  74. package/es/collection-manager/interfaces/tableoid.d.ts +1 -0
  75. package/es/collection-manager/interfaces/tableoid.mjs +1 -1
  76. package/es/collection-manager/interfaces/textarea.d.ts +1 -0
  77. package/es/collection-manager/interfaces/textarea.mjs +1 -1
  78. package/es/collection-manager/interfaces/time.d.ts +1 -0
  79. package/es/collection-manager/interfaces/time.mjs +1 -1
  80. package/es/collection-manager/interfaces/unixTimestamp.d.ts +1 -0
  81. package/es/collection-manager/interfaces/unixTimestamp.mjs +1 -1
  82. package/es/collection-manager/interfaces/updatedAt.d.ts +1 -0
  83. package/es/collection-manager/interfaces/updatedAt.mjs +1 -1
  84. package/es/collection-manager/interfaces/updatedBy.d.ts +1 -0
  85. package/es/collection-manager/interfaces/updatedBy.mjs +1 -1
  86. package/es/collection-manager/interfaces/url.d.ts +1 -0
  87. package/es/collection-manager/interfaces/url.mjs +1 -1
  88. package/es/collection-manager/interfaces/uuid.d.ts +1 -0
  89. package/es/collection-manager/interfaces/uuid.mjs +1 -1
  90. package/es/data-source/collection-field-interface/CollectionFieldInterface.d.ts +1 -0
  91. package/es/data-source/collection-field-interface/CollectionFieldInterface.mjs +1 -0
  92. package/es/filter-provider/utils.mjs +2 -1
  93. package/es/icon/preloaded.mjs +0 -1
  94. package/es/index.d.ts +3 -0
  95. package/es/index.mjs +4 -1
  96. package/es/preload.d.ts +16 -0
  97. package/es/preload.mjs +33 -0
  98. package/es/schema-component/antd/association-field/index.d.ts +1 -0
  99. package/es/schema-component/antd/association-field/index.mjs +2 -1
  100. package/es/schema-component/antd/color-picker/util.d.ts +1 -1
  101. package/es/schema-component/antd/color-picker/util.mjs +2 -1
  102. package/es/schema-component/antd/date-picker/util.d.ts +1 -1
  103. package/es/schema-component/antd/date-picker/util.mjs +2 -1
  104. package/es/schema-component/antd/filter/index.d.ts +1 -0
  105. package/es/schema-component/antd/filter/index.mjs +1 -0
  106. package/es/schema-component/antd/form-v2/index.d.ts +1 -0
  107. package/es/schema-component/antd/form-v2/index.mjs +1 -0
  108. package/es/schema-component/antd/table-v2/index.d.ts +1 -0
  109. package/es/schema-component/antd/table-v2/index.mjs +1 -0
  110. package/es/schema-component/common/sortable-item/DragHandlePageTab.mjs +6 -7
  111. package/es/schema-settings/LinkageRules/index.d.ts +2 -0
  112. package/es/schema-settings/LinkageRules/index.mjs +2 -0
  113. package/es/schema-settings/VariableInput/index.d.ts +1 -0
  114. package/es/schema-settings/VariableInput/index.mjs +1 -0
  115. package/es/schema-settings/index.d.ts +3 -0
  116. package/es/schema-settings/index.mjs +3 -0
  117. package/es/variables/hooks/useBuiltinVariables.mjs +1 -1
  118. package/lib/application/schema-settings/SchemaSettings.js +5 -3
  119. package/lib/application/schema-settings/SchemaSettingsManager.js +15 -0
  120. package/lib/application/utils/globalDeps.js +3 -1
  121. package/lib/built-in/attachment-preview/previewers/file-pdf.js +1 -1
  122. package/lib/built-in/locale/LocalePlugin.js +72 -92
  123. package/lib/built-in/pm/PluginDetail.js +0 -3
  124. package/lib/collection-manager/Configuration/components/index.js +1 -1
  125. package/lib/collection-manager/Configuration/index.js +79 -19
  126. package/lib/collection-manager/hooks/index.js +28 -5
  127. package/lib/collection-manager/index.js +37 -17
  128. package/lib/collection-manager/interfaces/checkbox.js +1 -1
  129. package/lib/collection-manager/interfaces/checkboxGroup.js +1 -1
  130. package/lib/collection-manager/interfaces/chinaRegion.js +1 -1
  131. package/lib/collection-manager/interfaces/collection.js +2 -2
  132. package/lib/collection-manager/interfaces/color.js +1 -1
  133. package/lib/collection-manager/interfaces/createdAt.js +1 -1
  134. package/lib/collection-manager/interfaces/createdBy.js +1 -1
  135. package/lib/collection-manager/interfaces/datetime.js +1 -1
  136. package/lib/collection-manager/interfaces/email.js +1 -1
  137. package/lib/collection-manager/interfaces/icon.js +1 -1
  138. package/lib/collection-manager/interfaces/input.js +1 -1
  139. package/lib/collection-manager/interfaces/integer.js +1 -1
  140. package/lib/collection-manager/interfaces/json.js +1 -1
  141. package/lib/collection-manager/interfaces/m2m.js +1 -1
  142. package/lib/collection-manager/interfaces/m2o.js +1 -1
  143. package/lib/collection-manager/interfaces/markdown.js +1 -1
  144. package/lib/collection-manager/interfaces/multipleSelect.js +2 -2
  145. package/lib/collection-manager/interfaces/nanoid.js +1 -1
  146. package/lib/collection-manager/interfaces/number.js +1 -1
  147. package/lib/collection-manager/interfaces/o2m.js +1 -1
  148. package/lib/collection-manager/interfaces/o2o.js +1 -1
  149. package/lib/collection-manager/interfaces/password.js +1 -1
  150. package/lib/collection-manager/interfaces/percent.js +2 -2
  151. package/lib/collection-manager/interfaces/phone.js +1 -1
  152. package/lib/collection-manager/interfaces/radioGroup.js +1 -1
  153. package/lib/collection-manager/interfaces/richText.js +1 -1
  154. package/lib/collection-manager/interfaces/select.js +2 -2
  155. package/lib/collection-manager/interfaces/sort.js +1 -1
  156. package/lib/collection-manager/interfaces/subTable.js +1 -1
  157. package/lib/collection-manager/interfaces/tableoid.js +1 -1
  158. package/lib/collection-manager/interfaces/textarea.js +1 -1
  159. package/lib/collection-manager/interfaces/time.js +1 -1
  160. package/lib/collection-manager/interfaces/unixTimestamp.js +1 -1
  161. package/lib/collection-manager/interfaces/updatedAt.js +1 -1
  162. package/lib/collection-manager/interfaces/updatedBy.js +1 -1
  163. package/lib/collection-manager/interfaces/url.js +1 -1
  164. package/lib/collection-manager/interfaces/uuid.js +1 -1
  165. package/lib/data-source/collection-field-interface/CollectionFieldInterface.js +1 -0
  166. package/lib/filter-provider/utils.js +3 -1
  167. package/lib/icon/preloaded.js +0 -1
  168. package/lib/index.js +234 -125
  169. package/lib/locale/zh-CN.js +3 -0
  170. package/lib/preload.js +77 -0
  171. package/lib/schema-component/antd/association-field/index.js +10 -2
  172. package/lib/schema-component/antd/color-picker/util.js +17 -6
  173. package/lib/schema-component/antd/date-picker/util.js +29 -18
  174. package/lib/schema-component/antd/filter/index.js +9 -0
  175. package/lib/schema-component/antd/form-v2/index.js +14 -0
  176. package/lib/schema-component/antd/table-v2/index.js +9 -0
  177. package/lib/schema-component/common/sortable-item/DragHandlePageTab.js +6 -7
  178. package/lib/schema-settings/LinkageRules/index.js +271 -180
  179. package/lib/schema-settings/VariableInput/index.js +9 -0
  180. package/lib/schema-settings/index.js +75 -48
  181. package/lib/variables/hooks/useBuiltinVariables.js +13 -3
  182. package/package.json +6 -6
@@ -29,7 +29,7 @@ class O2MFieldInterface extends CollectionFieldInterface {
29
29
  }
30
30
  }
31
31
  constructor(...args){
32
- super(...args), _define_property(this, "name", 'o2m'), _define_property(this, "type", 'object'), _define_property(this, "group", 'relation'), _define_property(this, "order", 4), _define_property(this, "title", '{{t("One to many")}}'), _define_property(this, "description", '{{t("One to many description")}}'), _define_property(this, "isAssociation", true), _define_property(this, "default", {
32
+ super(...args), _define_property(this, "name", 'o2m'), _define_property(this, "type", 'object'), _define_property(this, "group", 'relation'), _define_property(this, "order", 4), _define_property(this, "title", '{{t("One to many")}}'), _define_property(this, "icon", 'DeploymentUnitOutlined'), _define_property(this, "description", '{{t("One to many description")}}'), _define_property(this, "isAssociation", true), _define_property(this, "default", {
33
33
  type: 'hasMany',
34
34
  uiSchema: {
35
35
  'x-component': 'AssociationField',
@@ -5,6 +5,7 @@ export declare class O2OFieldInterface extends CollectionFieldInterface {
5
5
  type: string;
6
6
  group: string;
7
7
  order: number;
8
+ icon: string;
8
9
  title: string;
9
10
  description: string;
10
11
  isAssociation: boolean;
@@ -29,7 +29,7 @@ class O2OFieldInterface extends CollectionFieldInterface {
29
29
  schema['x-component-props'].fieldNames.label = (null == targetCollection ? void 0 : targetCollection.titleField) || getUniqueKeyFromCollection(targetCollection);
30
30
  }
31
31
  constructor(...args){
32
- super(...args), _define_property(this, "name", 'o2o'), _define_property(this, "type", 'object'), _define_property(this, "group", 'relation'), _define_property(this, "order", 3), _define_property(this, "title", '{{t("One to one")}}'), _define_property(this, "description", '{{t("One to one description")}}'), _define_property(this, "isAssociation", true), _define_property(this, "default", {
32
+ super(...args), _define_property(this, "name", 'o2o'), _define_property(this, "type", 'object'), _define_property(this, "group", 'relation'), _define_property(this, "order", 3), _define_property(this, "icon", 'DeploymentUnitOutlined'), _define_property(this, "title", '{{t("One to one")}}'), _define_property(this, "description", '{{t("One to one description")}}'), _define_property(this, "isAssociation", true), _define_property(this, "default", {
33
33
  type: 'hasOne',
34
34
  uiSchema: {
35
35
  'x-component': 'AssociationField',
@@ -3,6 +3,7 @@ export declare class PasswordFieldInterface extends CollectionFieldInterface {
3
3
  name: string;
4
4
  type: string;
5
5
  group: string;
6
+ icon: string;
6
7
  order: number;
7
8
  title: string;
8
9
  default: {
@@ -13,7 +13,7 @@ function _define_property(obj, key, value) {
13
13
  }
14
14
  class PasswordFieldInterface extends CollectionFieldInterface {
15
15
  constructor(...args){
16
- super(...args), _define_property(this, "name", 'password'), _define_property(this, "type", 'object'), _define_property(this, "group", 'basic'), _define_property(this, "order", 9), _define_property(this, "title", '{{t("Password")}}'), _define_property(this, "default", {
16
+ super(...args), _define_property(this, "name", 'password'), _define_property(this, "type", 'object'), _define_property(this, "group", 'basic'), _define_property(this, "icon", 'LockOutlined'), _define_property(this, "order", 9), _define_property(this, "title", '{{t("Password")}}'), _define_property(this, "default", {
17
17
  type: 'password',
18
18
  hidden: true,
19
19
  uiSchema: {
@@ -6,6 +6,7 @@ export declare class PercentFieldInterface extends CollectionFieldInterface {
6
6
  group: string;
7
7
  order: number;
8
8
  title: string;
9
+ icon: string;
9
10
  sortable: boolean;
10
11
  default: {
11
12
  type: string;
@@ -43,12 +43,12 @@ class PercentFieldInterface extends CollectionFieldInterface {
43
43
  let { field, block, readPretty, action } = param;
44
44
  const props = schema['x-component-props'] = schema['x-component-props'] || {};
45
45
  schema['x-component-props'].style = {
46
- ...props.style || {},
46
+ ...props.style,
47
47
  width: '100%'
48
48
  };
49
49
  }
50
50
  constructor(...args){
51
- super(...args), _define_property(this, "name", 'percent'), _define_property(this, "type", 'object'), _define_property(this, "group", 'basic'), _define_property(this, "order", 8), _define_property(this, "title", '{{t("Percent")}}'), _define_property(this, "sortable", true), _define_property(this, "default", {
51
+ super(...args), _define_property(this, "name", 'percent'), _define_property(this, "type", 'object'), _define_property(this, "group", 'basic'), _define_property(this, "order", 8), _define_property(this, "title", '{{t("Percent")}}'), _define_property(this, "icon", 'PercentageOutlined'), _define_property(this, "sortable", true), _define_property(this, "default", {
52
52
  type: 'float',
53
53
  uiSchema: {
54
54
  type: 'string',
@@ -5,6 +5,7 @@ export declare class PhoneFieldInterface extends CollectionFieldInterface {
5
5
  group: string;
6
6
  order: number;
7
7
  title: string;
8
+ icon: string;
8
9
  sortable: boolean;
9
10
  default: {
10
11
  type: string;
@@ -12,7 +12,7 @@ function _define_property(obj, key, value) {
12
12
  }
13
13
  class PhoneFieldInterface extends CollectionFieldInterface {
14
14
  constructor(...args){
15
- super(...args), _define_property(this, "name", 'phone'), _define_property(this, "type", 'object'), _define_property(this, "group", 'basic'), _define_property(this, "order", 3), _define_property(this, "title", '{{t("Phone")}}'), _define_property(this, "sortable", true), _define_property(this, "default", {
15
+ super(...args), _define_property(this, "name", 'phone'), _define_property(this, "type", 'object'), _define_property(this, "group", 'basic'), _define_property(this, "order", 3), _define_property(this, "title", '{{t("Phone")}}'), _define_property(this, "icon", 'TabletOutlined'), _define_property(this, "sortable", true), _define_property(this, "default", {
16
16
  type: 'string',
17
17
  uiSchema: {
18
18
  type: 'string',
@@ -5,6 +5,7 @@ export declare class RadioGroupFieldInterface extends CollectionFieldInterface {
5
5
  group: string;
6
6
  order: number;
7
7
  title: string;
8
+ icon: string;
8
9
  sortable: boolean;
9
10
  default: {
10
11
  type: string;
@@ -12,7 +12,7 @@ function _define_property(obj, key, value) {
12
12
  }
13
13
  class RadioGroupFieldInterface extends CollectionFieldInterface {
14
14
  constructor(...args){
15
- super(...args), _define_property(this, "name", 'radioGroup'), _define_property(this, "type", 'object'), _define_property(this, "group", 'choices'), _define_property(this, "order", 4), _define_property(this, "title", '{{t("Radio group")}}'), _define_property(this, "sortable", true), _define_property(this, "default", {
15
+ super(...args), _define_property(this, "name", 'radioGroup'), _define_property(this, "type", 'object'), _define_property(this, "group", 'choices'), _define_property(this, "order", 4), _define_property(this, "title", '{{t("Radio group")}}'), _define_property(this, "icon", 'TagsOutlined'), _define_property(this, "sortable", true), _define_property(this, "default", {
16
16
  type: 'string',
17
17
  uiSchema: {
18
18
  type: 'string',
@@ -6,6 +6,7 @@ export declare class RichTextFieldInterface extends CollectionFieldInterface {
6
6
  group: string;
7
7
  order: number;
8
8
  title: string;
9
+ icon: string;
9
10
  default: {
10
11
  interface: string;
11
12
  type: string;
@@ -23,7 +23,7 @@ class RichTextFieldInterface extends CollectionFieldInterface {
23
23
  }
24
24
  }
25
25
  constructor(...args){
26
- super(...args), _define_property(this, "name", 'richText'), _define_property(this, "type", 'object'), _define_property(this, "group", 'media'), _define_property(this, "order", 2), _define_property(this, "title", '{{t("Rich Text")}}'), _define_property(this, "default", {
26
+ super(...args), _define_property(this, "name", 'richText'), _define_property(this, "type", 'object'), _define_property(this, "group", 'media'), _define_property(this, "order", 2), _define_property(this, "title", '{{t("Rich Text")}}'), _define_property(this, "icon", 'AlignLeftOutlined'), _define_property(this, "default", {
27
27
  interface: 'richText',
28
28
  type: 'text',
29
29
  uiSchema: {
@@ -6,6 +6,7 @@ export declare class SelectFieldInterface extends CollectionFieldInterface {
6
6
  group: string;
7
7
  order: number;
8
8
  title: string;
9
+ icon: string;
9
10
  sortable: boolean;
10
11
  default: {
11
12
  type: string;
@@ -15,7 +15,7 @@ class SelectFieldInterface extends CollectionFieldInterface {
15
15
  let { block } = param;
16
16
  const props = schema['x-component-props'] = schema['x-component-props'] || {};
17
17
  props.style = {
18
- ...props.style || {},
18
+ ...props.style,
19
19
  width: '100%'
20
20
  };
21
21
  if ([
@@ -24,7 +24,7 @@ class SelectFieldInterface extends CollectionFieldInterface {
24
24
  ].includes(block)) props['ellipsis'] = true;
25
25
  }
26
26
  constructor(...args){
27
- super(...args), _define_property(this, "name", 'select'), _define_property(this, "type", 'object'), _define_property(this, "group", 'choices'), _define_property(this, "order", 2), _define_property(this, "title", '{{t("Single select")}}'), _define_property(this, "sortable", true), _define_property(this, "default", {
27
+ super(...args), _define_property(this, "name", 'select'), _define_property(this, "type", 'object'), _define_property(this, "group", 'choices'), _define_property(this, "order", 2), _define_property(this, "title", '{{t("Single select")}}'), _define_property(this, "icon", 'SelectOutlined'), _define_property(this, "sortable", true), _define_property(this, "default", {
28
28
  type: 'string',
29
29
  uiSchema: {
30
30
  type: 'string',
@@ -5,6 +5,7 @@ export declare class SortFieldInterface extends CollectionFieldInterface {
5
5
  group: string;
6
6
  order: number;
7
7
  title: string;
8
+ icon: string;
8
9
  sortable: boolean;
9
10
  titleUsable: boolean;
10
11
  description: string;
@@ -13,7 +13,7 @@ function _define_property(obj, key, value) {
13
13
  }
14
14
  class SortFieldInterface extends CollectionFieldInterface {
15
15
  constructor(...args){
16
- super(...args), _define_property(this, "name", 'sort'), _define_property(this, "type", 'object'), _define_property(this, "group", 'advanced'), _define_property(this, "order", 1), _define_property(this, "title", '{{t("Sort")}}'), _define_property(this, "sortable", true), _define_property(this, "titleUsable", true), _define_property(this, "description", '{{t("Used for drag and drop sorting scenarios, supporting grouping sorting")}}'), _define_property(this, "default", {
16
+ super(...args), _define_property(this, "name", 'sort'), _define_property(this, "type", 'object'), _define_property(this, "group", 'advanced'), _define_property(this, "order", 1), _define_property(this, "title", '{{t("Sort")}}'), _define_property(this, "icon", 'ProfileOutlined'), _define_property(this, "sortable", true), _define_property(this, "titleUsable", true), _define_property(this, "description", '{{t("Used for drag and drop sorting scenarios, supporting grouping sorting")}}'), _define_property(this, "default", {
17
17
  type: 'sort',
18
18
  uiSchema: {
19
19
  type: 'number',
@@ -6,6 +6,7 @@ export declare class SubTableFieldInterface extends CollectionFieldInterface {
6
6
  group: string;
7
7
  order: number;
8
8
  title: string;
9
+ icon: string;
9
10
  isAssociation: boolean;
10
11
  default: {
11
12
  type: string;
@@ -56,7 +56,7 @@ class SubTableFieldInterface extends CollectionFieldInterface {
56
56
  };
57
57
  }
58
58
  constructor(...args){
59
- super(...args), _define_property(this, "name", 'subTable'), _define_property(this, "type", 'object'), _define_property(this, "group", 'relation'), _define_property(this, "order", 2), _define_property(this, "title", '{{t("Sub-table")}}'), _define_property(this, "isAssociation", true), _define_property(this, "default", {
59
+ super(...args), _define_property(this, "name", 'subTable'), _define_property(this, "type", 'object'), _define_property(this, "group", 'relation'), _define_property(this, "order", 2), _define_property(this, "title", '{{t("Sub-table")}}'), _define_property(this, "icon", 'FolderOpenOutlined'), _define_property(this, "isAssociation", true), _define_property(this, "default", {
60
60
  type: 'hasMany',
61
61
  uiSchema: {
62
62
  type: 'void',
@@ -5,6 +5,7 @@ export declare class TableoidFieldInterface extends CollectionFieldInterface {
5
5
  group: string;
6
6
  order: number;
7
7
  title: string;
8
+ icon: string;
8
9
  sortable: boolean;
9
10
  default: {
10
11
  name: string;
@@ -12,7 +12,7 @@ function _define_property(obj, key, value) {
12
12
  }
13
13
  class TableoidFieldInterface extends CollectionFieldInterface {
14
14
  constructor(...args){
15
- super(...args), _define_property(this, "name", 'tableoid'), _define_property(this, "type", 'object'), _define_property(this, "group", 'systemInfo'), _define_property(this, "order", 0), _define_property(this, "title", '{{t("Table OID")}}'), _define_property(this, "sortable", true), _define_property(this, "default", {
15
+ super(...args), _define_property(this, "name", 'tableoid'), _define_property(this, "type", 'object'), _define_property(this, "group", 'systemInfo'), _define_property(this, "order", 0), _define_property(this, "title", '{{t("Table OID")}}'), _define_property(this, "icon", 'FieldNumberOutlined'), _define_property(this, "sortable", true), _define_property(this, "default", {
16
16
  name: '__collection',
17
17
  type: 'virtual',
18
18
  uiSchema: {
@@ -6,6 +6,7 @@ export declare class TextareaFieldInterface extends CollectionFieldInterface {
6
6
  group: string;
7
7
  order: number;
8
8
  title: string;
9
+ icon: string;
9
10
  default: {
10
11
  interface: string;
11
12
  type: string;
@@ -23,7 +23,7 @@ class TextareaFieldInterface extends CollectionFieldInterface {
23
23
  }
24
24
  }
25
25
  constructor(...args){
26
- super(...args), _define_property(this, "name", 'textarea'), _define_property(this, "type", 'object'), _define_property(this, "group", 'basic'), _define_property(this, "order", 2), _define_property(this, "title", '{{t("Long text")}}'), _define_property(this, "default", {
26
+ super(...args), _define_property(this, "name", 'textarea'), _define_property(this, "type", 'object'), _define_property(this, "group", 'basic'), _define_property(this, "order", 2), _define_property(this, "title", '{{t("Long text")}}'), _define_property(this, "icon", 'FileTextOutlined'), _define_property(this, "default", {
27
27
  interface: 'textarea',
28
28
  type: 'text',
29
29
  uiSchema: {
@@ -5,6 +5,7 @@ export declare class TimeFieldInterface extends CollectionFieldInterface {
5
5
  group: string;
6
6
  order: number;
7
7
  title: string;
8
+ icon: string;
8
9
  sortable: boolean;
9
10
  default: {
10
11
  type: string;
@@ -12,7 +12,7 @@ function _define_property(obj, key, value) {
12
12
  }
13
13
  class TimeFieldInterface extends CollectionFieldInterface {
14
14
  constructor(...args){
15
- super(...args), _define_property(this, "name", 'time'), _define_property(this, "type", 'object'), _define_property(this, "group", 'datetime'), _define_property(this, "order", 2), _define_property(this, "title", '{{t("Time")}}'), _define_property(this, "sortable", true), _define_property(this, "default", {
15
+ super(...args), _define_property(this, "name", 'time'), _define_property(this, "type", 'object'), _define_property(this, "group", 'datetime'), _define_property(this, "order", 2), _define_property(this, "title", '{{t("Time")}}'), _define_property(this, "icon", 'FieldTimeOutlined'), _define_property(this, "sortable", true), _define_property(this, "default", {
16
16
  type: 'time',
17
17
  uiSchema: {
18
18
  type: 'string',
@@ -5,6 +5,7 @@ export declare class UnixTimestampFieldInterface extends CollectionFieldInterfac
5
5
  group: string;
6
6
  order: number;
7
7
  title: string;
8
+ icon: string;
8
9
  sortable: boolean;
9
10
  default: {
10
11
  type: string;
@@ -12,7 +12,7 @@ function _define_property(obj, key, value) {
12
12
  }
13
13
  class UnixTimestampFieldInterface extends CollectionFieldInterface {
14
14
  constructor(...args){
15
- super(...args), _define_property(this, "name", 'unixTimestamp'), _define_property(this, "type", 'object'), _define_property(this, "group", 'datetime'), _define_property(this, "order", 1), _define_property(this, "title", '{{t("Unix Timestamp")}}'), _define_property(this, "sortable", true), _define_property(this, "default", {
15
+ super(...args), _define_property(this, "name", 'unixTimestamp'), _define_property(this, "type", 'object'), _define_property(this, "group", 'datetime'), _define_property(this, "order", 1), _define_property(this, "title", '{{t("Unix Timestamp")}}'), _define_property(this, "icon", 'HistoryOutlined'), _define_property(this, "sortable", true), _define_property(this, "default", {
16
16
  type: 'bigInt',
17
17
  uiSchema: {
18
18
  type: 'number',
@@ -5,6 +5,7 @@ export declare class UpdatedAtFieldInterface extends CollectionFieldInterface {
5
5
  group: string;
6
6
  order: number;
7
7
  title: string;
8
+ icon: string;
8
9
  sortable: boolean;
9
10
  default: {
10
11
  type: string;
@@ -12,7 +12,7 @@ function _define_property(obj, key, value) {
12
12
  }
13
13
  class UpdatedAtFieldInterface extends CollectionFieldInterface {
14
14
  constructor(...args){
15
- super(...args), _define_property(this, "name", 'updatedAt'), _define_property(this, "type", 'object'), _define_property(this, "group", 'systemInfo'), _define_property(this, "order", 2), _define_property(this, "title", '{{t("Last updated at")}}'), _define_property(this, "sortable", true), _define_property(this, "default", {
15
+ super(...args), _define_property(this, "name", 'updatedAt'), _define_property(this, "type", 'object'), _define_property(this, "group", 'systemInfo'), _define_property(this, "order", 2), _define_property(this, "title", '{{t("Last updated at")}}'), _define_property(this, "icon", 'FieldTimeOutlined'), _define_property(this, "sortable", true), _define_property(this, "default", {
16
16
  type: 'date',
17
17
  field: 'updatedAt',
18
18
  uiSchema: {
@@ -6,6 +6,7 @@ export declare class UpdatedByFieldInterface extends CollectionFieldInterface {
6
6
  group: string;
7
7
  order: number;
8
8
  title: string;
9
+ icon: string;
9
10
  isAssociation: boolean;
10
11
  default: {
11
12
  type: string;
@@ -26,7 +26,7 @@ class UpdatedByFieldInterface extends CollectionFieldInterface {
26
26
  }
27
27
  }
28
28
  constructor(...args){
29
- super(...args), _define_property(this, "name", 'updatedBy'), _define_property(this, "type", 'object'), _define_property(this, "group", 'systemInfo'), _define_property(this, "order", 4), _define_property(this, "title", '{{t("Last updated by")}}'), _define_property(this, "isAssociation", true), _define_property(this, "default", {
29
+ super(...args), _define_property(this, "name", 'updatedBy'), _define_property(this, "type", 'object'), _define_property(this, "group", 'systemInfo'), _define_property(this, "order", 4), _define_property(this, "title", '{{t("Last updated by")}}'), _define_property(this, "icon", 'UserOutlined'), _define_property(this, "isAssociation", true), _define_property(this, "default", {
30
30
  type: 'belongsTo',
31
31
  target: 'users',
32
32
  foreignKey: 'updatedById',
@@ -6,6 +6,7 @@ export declare class UrlFieldInterface extends CollectionFieldInterface {
6
6
  group: string;
7
7
  order: number;
8
8
  title: string;
9
+ icon: string;
9
10
  default: {
10
11
  type: string;
11
12
  uiSchema: {
@@ -15,7 +15,7 @@ class UrlFieldInterface extends CollectionFieldInterface {
15
15
  let { block } = param;
16
16
  }
17
17
  constructor(...args){
18
- super(...args), _define_property(this, "name", 'url'), _define_property(this, "type", 'string'), _define_property(this, "group", 'basic'), _define_property(this, "order", 5), _define_property(this, "title", '{{t("URL")}}'), _define_property(this, "default", {
18
+ super(...args), _define_property(this, "name", 'url'), _define_property(this, "type", 'string'), _define_property(this, "group", 'basic'), _define_property(this, "order", 5), _define_property(this, "title", '{{t("URL")}}'), _define_property(this, "icon", 'GlobalOutlined'), _define_property(this, "default", {
19
19
  type: 'text',
20
20
  uiSchema: {
21
21
  type: 'string',
@@ -5,6 +5,7 @@ export declare class UUIDFieldInterface extends CollectionFieldInterface {
5
5
  group: string;
6
6
  order: number;
7
7
  title: string;
8
+ icon: string;
8
9
  hidden: boolean;
9
10
  sortable: boolean;
10
11
  default: {
@@ -12,7 +12,7 @@ function _define_property(obj, key, value) {
12
12
  }
13
13
  class UUIDFieldInterface extends CollectionFieldInterface {
14
14
  constructor(...args){
15
- super(...args), _define_property(this, "name", 'uuid'), _define_property(this, "type", 'object'), _define_property(this, "group", 'advanced'), _define_property(this, "order", 0), _define_property(this, "title", '{{t("UUID")}}'), _define_property(this, "hidden", false), _define_property(this, "sortable", true), _define_property(this, "default", {
15
+ super(...args), _define_property(this, "name", 'uuid'), _define_property(this, "type", 'object'), _define_property(this, "group", 'advanced'), _define_property(this, "order", 0), _define_property(this, "title", '{{t("UUID")}}'), _define_property(this, "icon", 'FieldNumberOutlined'), _define_property(this, "hidden", false), _define_property(this, "sortable", true), _define_property(this, "default", {
16
16
  type: 'uuid',
17
17
  uiSchema: {
18
18
  type: 'string',
@@ -14,6 +14,7 @@ export declare abstract class CollectionFieldInterface {
14
14
  name: string;
15
15
  group: string;
16
16
  title?: string;
17
+ icon?: string;
17
18
  description?: string;
18
19
  order?: number;
19
20
  default?: {
@@ -18,6 +18,7 @@ class CollectionFieldInterface {
18
18
  _define_property(this, "name", void 0);
19
19
  _define_property(this, "group", void 0);
20
20
  _define_property(this, "title", void 0);
21
+ _define_property(this, "icon", void 0);
21
22
  _define_property(this, "description", void 0);
22
23
  _define_property(this, "order", void 0);
23
24
  _define_property(this, "default", void 0);
@@ -1,6 +1,7 @@
1
1
  import { useCallback, useEffect, useState } from "react";
2
2
  import { useFieldSchema } from "@tachybase/schema";
3
- import { dayjs, flatten, getValuesByPath } from "@tego/client";
3
+ import { flatten, getValuesByPath } from "@tego/client";
4
+ import dayjs from "dayjs";
4
5
  import lodash from "lodash";
5
6
  import { findFilterTargets } from "../block-provider/hooks/index.mjs";
6
7
  import { useCollectionManager_deprecated, useCollection_deprecated } from "../collection-manager/index.mjs";
@@ -1,5 +1,4 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import "react";
3
2
  const Apps = ()=>/*#__PURE__*/ jsx("svg", {
4
3
  width: "1em",
5
4
  height: "1em",
package/es/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import 'antd/dist/reset.css';
2
2
  import './global.less';
3
+ import './preload';
3
4
  export * from './built-in/acl';
4
5
  export * from './api-client';
5
6
  export * from './application';
@@ -40,7 +41,9 @@ export * from './modules/blocks/data-blocks/details-multi/setDataLoadingModeSett
40
41
  export * from './modules/blocks/data-blocks/form';
41
42
  export * from './modules/blocks/data-blocks/table';
42
43
  export * from './modules/blocks/data-blocks/table-selector';
44
+ export * from './modules/fields/component/SubTable/secondLevelSelect';
43
45
  export { useTranslation } from 'react-i18next';
44
46
  export * from 'react-i18next';
45
47
  export { useHotkeys } from 'react-hotkeys-hook';
46
48
  export * from './modules/blocks/useParentRecordCommon';
49
+ export { findSchema as findSchemaUtils, removeGridFormItem } from './schema-initializer/utils';
package/es/index.mjs CHANGED
@@ -1,9 +1,11 @@
1
1
  import "antd/dist/reset.css";
2
2
  import "./global.css";
3
+ import "./preload.mjs";
3
4
  import locale from "./locale/index.mjs";
4
5
  import { withDynamicSchemaProps } from "./application/hoc/withDynamicSchemaProps.mjs";
5
6
  import { useTranslation } from "react-i18next";
6
7
  import { useHotkeys } from "react-hotkeys-hook";
8
+ import { findSchema, removeGridFormItem } from "./schema-initializer/utils.mjs";
7
9
  export * from "./built-in/acl/index.mjs";
8
10
  export * from "./api-client/index.mjs";
9
11
  export * from "./application/index.mjs";
@@ -41,6 +43,7 @@ export * from "./modules/blocks/data-blocks/details-multi/setDataLoadingModeSett
41
43
  export * from "./modules/blocks/data-blocks/form/index.mjs";
42
44
  export * from "./modules/blocks/data-blocks/table/index.mjs";
43
45
  export * from "./modules/blocks/data-blocks/table-selector/index.mjs";
46
+ export * from "./modules/fields/component/SubTable/secondLevelSelect.mjs";
44
47
  export * from "react-i18next";
45
48
  export * from "./modules/blocks/useParentRecordCommon.mjs";
46
- export { locale, useHotkeys, useTranslation, withDynamicSchemaProps };
49
+ export { findSchema as findSchemaUtils, locale, removeGridFormItem, useHotkeys, useTranslation, withDynamicSchemaProps };
@@ -0,0 +1,16 @@
1
+ import 'dayjs/plugin/advancedFormat';
2
+ import 'dayjs/plugin/calendar';
3
+ import 'dayjs/plugin/customParseFormat';
4
+ import 'dayjs/plugin/isBetween';
5
+ import 'dayjs/plugin/isoWeek';
6
+ import 'dayjs/plugin/isSameOrAfter';
7
+ import 'dayjs/plugin/isSameOrBefore';
8
+ import 'dayjs/plugin/localeData';
9
+ import 'dayjs/plugin/quarterOfYear';
10
+ import 'dayjs/plugin/relativeTime';
11
+ import 'dayjs/plugin/timezone';
12
+ import 'dayjs/plugin/updateLocale';
13
+ import 'dayjs/plugin/utc';
14
+ import 'dayjs/plugin/weekday';
15
+ import 'dayjs/plugin/weekOfYear';
16
+ import 'dayjs/plugin/weekYear';
package/es/preload.mjs ADDED
@@ -0,0 +1,33 @@
1
+ import dayjs from "dayjs";
2
+ import advancedFormat from "dayjs/plugin/advancedFormat";
3
+ import calendar from "dayjs/plugin/calendar";
4
+ import customParseFormat from "dayjs/plugin/customParseFormat";
5
+ import isBetween from "dayjs/plugin/isBetween";
6
+ import isoWeek from "dayjs/plugin/isoWeek";
7
+ import isSameOrAfter from "dayjs/plugin/isSameOrAfter";
8
+ import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
9
+ import localeData from "dayjs/plugin/localeData";
10
+ import quarterOfYear from "dayjs/plugin/quarterOfYear";
11
+ import relativeTime from "dayjs/plugin/relativeTime";
12
+ import timezone from "dayjs/plugin/timezone";
13
+ import updateLocale from "dayjs/plugin/updateLocale";
14
+ import utc from "dayjs/plugin/utc";
15
+ import weekday from "dayjs/plugin/weekday";
16
+ import weekOfYear from "dayjs/plugin/weekOfYear";
17
+ import weekYear from "dayjs/plugin/weekYear";
18
+ dayjs.extend(weekday);
19
+ dayjs.extend(localeData);
20
+ dayjs.extend(timezone);
21
+ dayjs.extend(utc);
22
+ dayjs.extend(quarterOfYear);
23
+ dayjs.extend(isoWeek);
24
+ dayjs.extend(isBetween);
25
+ dayjs.extend(isSameOrAfter);
26
+ dayjs.extend(isSameOrBefore);
27
+ dayjs.extend(weekOfYear);
28
+ dayjs.extend(weekYear);
29
+ dayjs.extend(customParseFormat);
30
+ dayjs.extend(advancedFormat);
31
+ dayjs.extend(calendar);
32
+ dayjs.extend(relativeTime);
33
+ dayjs.extend(updateLocale);
@@ -1,2 +1,3 @@
1
1
  export declare const AssociationField: any;
2
2
  export * from './SubTabs';
3
+ export { isSubMode } from './util';
@@ -5,6 +5,7 @@ import { InternalPicker } from "./InternalPicker.mjs";
5
5
  import { Nester } from "./Nester.mjs";
6
6
  import { ReadPretty } from "./ReadPretty.mjs";
7
7
  import { SubTable } from "./SubTable.mjs";
8
+ import { isSubMode } from "./util.mjs";
8
9
  export * from "./SubTabs/index.mjs";
9
10
  const AssociationField = connect(Editable, mapReadPretty(ReadPretty));
10
11
  AssociationField.SubTable = SubTable;
@@ -14,4 +15,4 @@ AssociationField.Selector = Action.Container;
14
15
  AssociationField.Viewer = Action.Container;
15
16
  AssociationField.InternalSelect = InternalPicker;
16
17
  AssociationField.ReadPretty = ReadPretty;
17
- export { AssociationField };
18
+ export { AssociationField, isSubMode };
@@ -1,4 +1,4 @@
1
- import { dayjs, type Dayjs } from '@tego/client';
1
+ import dayjs, { type Dayjs } from 'dayjs';
2
2
  export interface Moment2strOptions {
3
3
  showTime?: boolean;
4
4
  gmt?: boolean;
@@ -1,4 +1,5 @@
1
- import { dayjs, getDefaultFormat, str2moment, toGmt, toLocal } from "@tego/client";
1
+ import { getDefaultFormat, str2moment, toGmt, toLocal } from "@tego/client";
2
+ import dayjs from "dayjs";
2
3
  const toStringByPicker = (value, picker, timezone)=>{
3
4
  if (!dayjs.isDayjs(value)) return value;
4
5
  if ('local' === timezone) {
@@ -1,4 +1,4 @@
1
- import { dayjs, type Dayjs } from '@tego/client';
1
+ import dayjs, { type Dayjs } from 'dayjs';
2
2
  export interface Moment2strOptions {
3
3
  showTime?: boolean;
4
4
  gmt?: boolean;
@@ -1,4 +1,5 @@
1
- import { dayjs, getDefaultFormat, str2moment, toGmt, toLocal } from "@tego/client";
1
+ import { getDefaultFormat, str2moment, toGmt, toLocal } from "@tego/client";
2
+ import dayjs from "dayjs";
2
3
  const toStringByPicker = (value, picker, timezone)=>{
3
4
  if (!dayjs.isDayjs(value)) return value;
4
5
  if ('local' === timezone) {
@@ -1,3 +1,4 @@
1
1
  export * from './Filter';
2
2
  export * from './FilterAction';
3
3
  export * from './useFilterActionProps';
4
+ export * from './DynamicComponent';
@@ -1,3 +1,4 @@
1
1
  export * from "./Filter.mjs";
2
2
  export * from "./FilterAction.mjs";
3
3
  export * from "./useFilterActionProps.mjs";
4
+ export * from "./DynamicComponent.mjs";
@@ -5,3 +5,4 @@ export { DetailsDesigner, FormV2, fetchTemplateData };
5
5
  export type { ITemplate };
6
6
  export * from './Form.Settings';
7
7
  export * from './FormField';
8
+ export * from './utils';
@@ -4,6 +4,7 @@ import { FilterDesigner } from "./Form.FilterDesigner.mjs";
4
4
  import { Templates, fetchTemplateData } from "./Templates.mjs";
5
5
  export * from "./Form.Settings.mjs";
6
6
  export * from "./FormField.mjs";
7
+ export * from "./utils.mjs";
7
8
  Form.Designer = FormDesigner;
8
9
  Form.FilterDesigner = FilterDesigner;
9
10
  Form.ReadPrettyDesigner = ReadPrettyFormDesigner;
@@ -1,5 +1,6 @@
1
1
  export * from './TableBlockDesigner';
2
2
  export * from './TableField';
3
3
  export * from './TableSelectorDesigner';
4
+ export * from './Table.Column.Designer';
4
5
  export { useColumnSchema } from './Table.Column.Decorator';
5
6
  export declare const TableV2: any;
@@ -9,6 +9,7 @@ import { TableSelector } from "./TableSelector.mjs";
9
9
  export * from "./TableBlockDesigner.mjs";
10
10
  export * from "./TableField.mjs";
11
11
  export * from "./TableSelectorDesigner.mjs";
12
+ export * from "./Table.Column.Designer.mjs";
12
13
  const TableV2 = Table;
13
14
  TableV2.Column = TableColumn;
14
15
  TableV2.Column.ActionBar = TableColumnActionBar;