@kengic/vue 0.21.5-beta.2 → 0.22.1-beta.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. package/CHANGELOG.md +156 -68
  2. package/dist/index.css +1 -1
  3. package/dist/kengic-vue.js +10150 -10225
  4. package/dist/project/index.ts +1 -1
  5. package/dist/src/apis/WMS/Controllers/{VarVariableCatalogController → VarConfigDescriptionController}/Add.d.ts +2 -2
  6. package/dist/src/apis/WMS/Controllers/{VarVariableCatalogController → VarConfigDescriptionController}/Delete.d.ts +1 -1
  7. package/dist/src/apis/WMS/Controllers/{VarVariableCatalogController → VarConfigDescriptionController}/DeleteBatch.d.ts +1 -1
  8. package/dist/src/apis/WMS/Controllers/{VarVariableCatalogController → VarConfigDescriptionController}/Edit.d.ts +2 -2
  9. package/dist/src/apis/WMS/Controllers/{VarVariableCatalogController → VarConfigDescriptionController}/ExportXls.d.ts +1 -1
  10. package/dist/src/apis/WMS/Controllers/{VarVariableCatalogController → VarConfigDescriptionController}/ImportExcel.d.ts +1 -1
  11. package/dist/src/apis/WMS/Controllers/{VarVariableCatalogController → VarConfigDescriptionController}/List.d.ts +2 -2
  12. package/dist/src/apis/WMS/Controllers/{VarContextController → VarConfigDescriptionController}/QueryById.d.ts +2 -2
  13. package/dist/src/apis/WMS/Controllers/{VarContextController → VarVariableController}/Add.d.ts +1 -1
  14. package/dist/src/apis/WMS/Controllers/{VarContextController → VarVariableController}/Edit.d.ts +1 -1
  15. package/dist/src/apis/WMS/Controllers/{VarContextController → VarVariableController}/List.d.ts +1 -1
  16. package/dist/src/apis/WMS/Controllers/{VarVariableCatalogController → VarVariableController}/QueryById.d.ts +2 -2
  17. package/dist/src/apis/WMS/Controllers/index.d.ts +2 -2
  18. package/dist/src/apis/WMS/models.d.ts +179 -251
  19. package/dist/src/components/KgButton/index.hooks.d.ts +141 -68
  20. package/dist/src/components/KgButton/index.store.d.ts +175 -54
  21. package/dist/src/components/KgForm.Item/KgForm.Item.hooks.d.ts +4 -6
  22. package/dist/src/components/KgForm.Item/components/KgForm.Item.Checkbox.d.ts +3 -3
  23. package/dist/src/components/KgForm.Item/components/KgForm.Item.CheckboxGroup.d.ts +1 -1
  24. package/dist/src/components/KgForm.Item/components/KgForm.Item.Date.d.ts +1 -1
  25. package/dist/src/components/KgForm.Item/components/KgForm.Item.DateRange.d.ts +1 -1
  26. package/dist/src/components/KgForm.Item/components/KgForm.Item.Input.d.ts +1 -1
  27. package/dist/src/components/KgForm.Item/components/KgForm.Item.InputNumber.d.ts +1 -1
  28. package/dist/src/components/KgForm.Item/components/KgForm.Item.RadioGroup.d.ts +5 -3
  29. package/dist/src/components/KgForm.Item/components/KgForm.Item.Select.d.ts +5 -3
  30. package/dist/src/components/KgForm.Item/components/KgForm.Item.Select.hooks.d.ts +3 -3
  31. package/dist/src/components/KgForm.Item/components/KgForm.Item.Switch.d.ts +1 -1
  32. package/dist/src/components/KgForm.Item/components/KgForm.Item.TextArea.d.ts +1 -1
  33. package/dist/src/components/KgForm.Item/index.vm.d.ts +5 -5
  34. package/dist/src/components/KgSearch/KgSearch.hooks.d.ts +0 -7
  35. package/dist/src/components/KgSubmit/KgSubmit.hooks.d.ts +4 -4
  36. package/dist/src/components/KgSubmit/index.hooks.d.ts +316 -19
  37. package/dist/src/components/KgSubmit/index.store.d.ts +247 -24
  38. package/dist/src/components/KgVar/index.hooks.d.ts +2642 -2027
  39. package/dist/src/components/KgVar/index.store.d.ts +2421 -2395
  40. package/dist/src/components/KgVar/index.store.service.d.ts +3 -3
  41. package/dist/src/components/KgVarConfig/components/submit/{KgVarConfig.Modal.Submit.VarSubmitField.d.ts → KgVarConfig.Modal.Submit.VarSubmitDetail.d.ts} +2 -2
  42. package/dist/src/components/KgVarConfig/index.store.d.ts +7 -7
  43. package/dist/src/consts/i18n/en.d.ts +5 -4
  44. package/dist/src/consts/i18n/zh_CN.d.ts +5 -4
  45. package/dist/src/consts/index.d.ts +4 -4
  46. package/dist/src/consts/index.vm.d.ts +8 -11
  47. package/dist/src/pages/KgPageDda/components/KgPageDda.Create.store.d.ts +170 -440
  48. package/dist/src/utils/kg-route.util.d.ts +3 -2
  49. package/dist/src/utils/kg-var.util.d.ts +23 -11
  50. package/dist/src/utils/kg.util.d.ts +19 -10
  51. package/package.json +4 -4
  52. /package/dist/src/apis/WMS/Controllers/{VarContextController → VarConfigDescriptionController}/index.d.ts +0 -0
  53. /package/dist/src/apis/WMS/Controllers/{VarContextController → VarVariableController}/Delete.d.ts +0 -0
  54. /package/dist/src/apis/WMS/Controllers/{VarContextController → VarVariableController}/DeleteBatch.d.ts +0 -0
  55. /package/dist/src/apis/WMS/Controllers/{VarContextController → VarVariableController}/ExportXls.d.ts +0 -0
  56. /package/dist/src/apis/WMS/Controllers/{VarContextController → VarVariableController}/ImportExcel.d.ts +0 -0
  57. /package/dist/src/apis/WMS/Controllers/{VarVariableCatalogController → VarVariableController}/index.d.ts +0 -0
  58. /package/dist/src/components/KgVarConfig/components/var/{KgVarConfig.Modal.Var.VarVariableCatalog.d.ts → KgVarConfig.Modal.Var.VarConfigDescription.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,92 +1,180 @@
1
- # 0.21.0
1
+ # 0.22.0
2
2
 
3
- 1. 查询条件中的日期范围, 对右侧的日期做了处理, 如果格式是 `YYYY-MM-DD` 则加上一天, 如果格式是 `YYYY-MM-DD HH:mm:ss` 则加上一秒,
3
+ ### 1. 重命名类
4
4
 
5
- ---
5
+ | 旧 | 新 |
6
+ | :--------------------- | :------------------- |
7
+ | VarContext | VarVariable |
8
+ | VarVariableConfig | VarConfigControl |
9
+ | VarVariableCatalog | VarConfigDescription |
10
+ | VarVariableInput | VarConfigInput |
11
+ | VarVariableLookup | VarConfigLookup |
12
+ | VarVariablePossibility | VarConfigPossibility |
13
+ | VarSubmitField | VarSubmitDetail |
6
14
 
7
- # 0.20.0
15
+ ### 2. 重命名表
8
16
 
9
- 1. `kg-search-header-teleport` 重命名为 `kg-layout-header-teleport`,
10
- 2. 添加配置 `IKgOption.KgLayoutTab.isTeleportToHeader` 并且默认为 `true`, 即多标签页默认会放到页面头部,
17
+ | 旧 | 新 |
18
+ | :---------- | :--------------------- |
19
+ | var_ctx | var_variable |
20
+ | var_btn | var_button |
21
+ | var_cfg | var_config_control |
22
+ | var_cat | var_config_description |
23
+ | var_var_ipt | var_config_input |
24
+ | var_lkp | var_config_lookup |
25
+ | var_psb | var_config_possibility |
26
+ | var_grd_cfg | var_grid_config |
27
+ | var_grd_dtl | var_grid_detail |
28
+ | var_grd_mst | var_grid_master |
29
+ | var_prf_cfg | var_profile_config |
30
+ | var_prf_dtl | var_profile_detail |
31
+ | var_prf_mst | var_profile_master |
32
+ | var_sbt_cfg | var_submit_config |
33
+ | var_sbt_fld | var_submit_detail |
11
34
 
12
- ---
35
+ ### 3. `KgSearch`,`KgButton`,`KgTable`,`KgSubmit` 等组件的 API 不用再单独获取, 可以直接从 `kgVar` 中获取,
13
36
 
14
- # 0.19.0
37
+ ```typescript
38
+ // 旧
39
+ // --------------------------------------------------
40
+ const kgVar = useKgVar();
41
+ const kgSearch = useKgSearch();
42
+ const kgButton = usekgButton();
43
+ // ...
15
44
 
16
- 1. 支持新版本的 DDA 的创建, 需要更新数据 `20240401000000000.sql`
45
+ kgVar.onRetrieve();
46
+ kgSearch.onSearch();
47
+ kgButton.onClick();
48
+ // ...
17
49
 
18
- ---
50
+ // 新
51
+ // --------------------------------------------------
52
+ const kgVar = useKgVar();
19
53
 
20
- # 0.18.0
54
+ kgVar.onRetrieve();
55
+ kgVar.kgSearch().onSearch();
56
+ kgVar.kgButton().onClick();
57
+ // ...
58
+ ```
21
59
 
22
- 1. `kgTable.store.setDatas()` 方法参数类型变更,
60
+ ### 4. `kgVar` 中的部分方法移到对应的组件的 API 中并且重命名:
23
61
 
24
- ```typescript
25
- // 旧
26
- // --------------------------------------------------
27
- kgTable.store.setDatas(frmId, datas);
62
+ #### 4.1. kgButton
28
63
 
29
- //
30
- // --------------------------------------------------
31
- kgTable.store.setDatas({ frmId: frmId, datas: datas });
32
- ```
64
+ `kgVar.setIsCreating(true)` 变更为 `kgVar.kgButton().setCurrentButton({ type: KG_BUTTON_TYPE.CREATE });`
33
65
 
34
- 2. 移除 `kgTable.onBeforeSetDatas()` 事件回调函数参数中的 `setDatas` 方法, 改为直接调用 `kgTable.store.setDatas()` 方法,
66
+ `kgVar.setIsUpdating(true)` 变更为 `kgVar.kgButton().setCurrentButton({ type: KG_BUTTON_TYPE.UPDATE });`
35
67
 
36
- ```typescript
37
- // 旧
38
- // --------------------------------------------------
39
- kgTable.onBeforeSetDatas(async ({ datas, setDatas }) => {
40
- setDatas([]);
41
- });
68
+ `kgVar.setIsCopying(true)` 变更为 `kgVar.kgButton().setCurrentButton({ type: KG_BUTTON_TYPE.COPY });`
42
69
 
43
- //
44
- // --------------------------------------------------
45
- kgTable.onBeforeSetDatas(async ({ datas }) => {
46
- kgTable.store.setDatas({
47
- frmId: '',
48
- datas: [],
49
- });
50
- });
51
- ```
70
+ `kgVar.setIsDeleting(true)` 变更为 `kgVar.kgButton().setCurrentButton({ type: KG_BUTTON_TYPE.DELETE });`
52
71
 
53
- 3. 移除 `kgTable.onAfterSearch()` 事件回调函数参数中的 `setDatas` 方法, 改为直接调用 `kgTable.store.setDatas()` 方法,
72
+ `kgVar.setIsCreating(false)` 变更为 `kgVar.kgButton().setCurrentButton(null);`
54
73
 
55
- ```typescript
56
- // 旧
57
- // --------------------------------------------------
58
- kgTable.onAfterSearch(async ({ datas, setDatas }) => {
59
- setDatas([]);
60
- });
74
+ `kgVar.setIsUpdating(false)` 变更为 `kgVar.kgButton().setCurrentButton(null);`
61
75
 
62
- //
63
- // --------------------------------------------------
64
- kgTable.onAfterSearch(async ({ datas }) => {
65
- kgTable.store.setDatas({
66
- frmId: '',
67
- datas: [],
68
- });
69
- });
70
- ```
76
+ `kgVar.setIsCopying(false)` 变更为 `kgVar.kgButton().setCurrentButton(null);`
71
77
 
72
- ---
78
+ `kgVar.setIsDeleting(false)` 变更为 `kgVar.kgButton().setCurrentButton(null);`
73
79
 
74
- # 0.17.0
80
+ #### 4.2. kgSubmit
75
81
 
76
- 1. `kgForm.onSelectChange()` 事件回调函数参数类型变更,
82
+ `kgVar.patchVarSubmitField()` 变更为 `kgVar.kgSubmit().patchVarSubmitDetail()`
77
83
 
78
- ```typescript
79
- // 旧
80
- // --------------------------------------------------
81
- kgForm.onSelectChange(async ({ rows }) => {
82
- // rows 是单个对象
83
- const item = rows as any;
84
- });
84
+ ### 5. kgVar.kgButton().onClick() 事件回调函数参数类型变更,
85
+
86
+ ```typescript
87
+ //
88
+ // --------------------------------------------------
89
+ kgVar.kgButton().onClick(async (button) => {});
90
+
91
+ // 新
92
+ // --------------------------------------------------
93
+ kgVar.kgButton().onClick(async ({ button }) => {});
94
+ ```
95
+
96
+ # 0.21.0
85
97
 
86
- //
87
- // --------------------------------------------------
88
- kgForm.onSelectChange(async ({ rows }) => {
89
- // rows 是数组
90
- const item = rows?.[0] as any;
98
+ ### 1. 查询条件中的日期范围, 对右侧的日期做了处理, 如果格式是 `YYYY-MM-DD` 则加上一天, 如果格式是 `YYYY-MM-DD HH:mm:ss` 则加上一秒,
99
+
100
+ # 0.20.0
101
+
102
+ ### 1. `kg-search-header-teleport` 重命名为 `kg-layout-header-teleport`,
103
+
104
+ ### 2. 添加配置 `IKgOption.KgLayoutTab.isTeleportToHeader` 并且默认为 `true`, 即多标签页默认会放到页面头部,
105
+
106
+ # 0.19.0
107
+
108
+ ### 1. 支持新版本的 DDA 的创建, 需要更新数据 `20240401000000000.sql`
109
+
110
+ # 0.18.0
111
+
112
+ ### 1. `kgTable.store.setDatas()` 方法参数类型变更,
113
+
114
+ ```typescript
115
+ // 旧
116
+ // --------------------------------------------------
117
+ kgTable.store.setDatas(frmId, datas);
118
+
119
+ // 新
120
+ // --------------------------------------------------
121
+ kgTable.store.setDatas({ frmId: frmId, datas: datas });
122
+ ```
123
+
124
+ ### 2. 移除 `kgTable.onBeforeSetDatas()` 事件回调函数参数中的 `setDatas` 方法, 改为直接调用 `kgTable.store.setDatas()` 方法,
125
+
126
+ ```typescript
127
+ // 旧
128
+ // --------------------------------------------------
129
+ kgTable.onBeforeSetDatas(async ({ datas, setDatas }) => {
130
+ setDatas([]);
131
+ });
132
+
133
+ // 新
134
+ // --------------------------------------------------
135
+ kgTable.onBeforeSetDatas(async ({ datas }) => {
136
+ kgTable.store.setDatas({
137
+ frmId: '',
138
+ datas: [],
139
+ });
140
+ });
141
+ ```
142
+
143
+ ### 3. 移除 `kgTable.onAfterSearch()` 事件回调函数参数中的 `setDatas` 方法, 改为直接调用 `kgTable.store.setDatas()` 方法,
144
+
145
+ ```typescript
146
+ // 旧
147
+ // --------------------------------------------------
148
+ kgTable.onAfterSearch(async ({ datas, setDatas }) => {
149
+ setDatas([]);
150
+ });
151
+
152
+ // 新
153
+ // --------------------------------------------------
154
+ kgTable.onAfterSearch(async ({ datas }) => {
155
+ kgTable.store.setDatas({
156
+ frmId: '',
157
+ datas: [],
91
158
  });
92
- ```
159
+ });
160
+ ```
161
+
162
+ # 0.17.0
163
+
164
+ ### 1. `kgForm.onSelectChange()` 事件回调函数参数类型变更,
165
+
166
+ ```typescript
167
+ // 旧
168
+ // --------------------------------------------------
169
+ kgForm.onSelectChange(async ({ rows }) => {
170
+ // rows 是单个对象
171
+ const item = rows as any;
172
+ });
173
+
174
+ // 新
175
+ // --------------------------------------------------
176
+ kgForm.onSelectChange(async ({ rows }) => {
177
+ // rows 是数组
178
+ const item = rows?.[0] as any;
179
+ });
180
+ ```