@aplus-frontend/ui 0.6.0-beta.13 → 0.6.0-beta.15

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 (48) hide show
  1. package/es/src/ap-grid/editable/form-item.vue.mjs +38 -35
  2. package/es/src/ap-grid/editable/index.vue.mjs +13 -10
  3. package/es/src/ap-grid/hooks/use-row-selection.d.ts +100 -0
  4. package/es/src/ap-grid/hooks/use-row-selection.mjs +122 -0
  5. package/es/src/ap-grid/index.vue.mjs +271 -222
  6. package/es/src/ap-grid/interface.d.ts +16 -0
  7. package/es/src/ap-grid/utils/table.mjs +15 -15
  8. package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +6 -1
  9. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +99 -96
  10. package/es/src/business/ap-copy/ApCopy.mjs +43 -43
  11. package/es/src/business/ap-label/group/ApLabelGroup.mjs +15 -16
  12. package/es/src/business/ap-label/interface.d.ts +2 -3
  13. package/es/src/business/ap-product-info/ApProductInfo.mjs +23 -24
  14. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +43 -42
  15. package/es/src/business/ap-view/ap-view.vue.d.ts +4 -1
  16. package/es/src/business/ap-view/ap-view.vue2.mjs +96 -84
  17. package/es/src/business/ap-view/index.d.ts +12 -3
  18. package/es/src/business/ap-view/interface.d.ts +7 -0
  19. package/es/src/business/hooks/usePageListApGrid.mjs +17 -20
  20. package/es/src/version.d.ts +1 -1
  21. package/es/src/version.mjs +1 -1
  22. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  23. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  24. package/lib/src/ap-grid/hooks/use-row-selection.d.ts +100 -0
  25. package/lib/src/ap-grid/hooks/use-row-selection.js +1 -0
  26. package/lib/src/ap-grid/index.vue.js +1 -1
  27. package/lib/src/ap-grid/interface.d.ts +16 -0
  28. package/lib/src/ap-grid/utils/table.js +1 -1
  29. package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +6 -1
  30. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  31. package/lib/src/business/ap-copy/ApCopy.js +1 -1
  32. package/lib/src/business/ap-label/group/ApLabelGroup.js +1 -1
  33. package/lib/src/business/ap-label/interface.d.ts +2 -3
  34. package/lib/src/business/ap-product-info/ApProductInfo.js +1 -1
  35. package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
  36. package/lib/src/business/ap-view/ap-view.vue.d.ts +4 -1
  37. package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
  38. package/lib/src/business/ap-view/index.d.ts +12 -3
  39. package/lib/src/business/ap-view/interface.d.ts +7 -0
  40. package/lib/src/business/hooks/usePageListApGrid.js +1 -1
  41. package/lib/src/version.d.ts +1 -1
  42. package/lib/src/version.js +1 -1
  43. package/package.json +4 -3
  44. package/theme/ap-copy/ap-copy.css +2 -0
  45. package/theme/ap-copy/ap-copy.less +2 -0
  46. package/theme/ap-table-modal/index.css +15 -13
  47. package/theme/ap-table-modal/index.less +15 -13
  48. package/theme/index.css +17 -13
@@ -2,9 +2,12 @@ import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicP
2
2
  import { ApViewProps } from './interface';
3
3
  export * from './interface';
4
4
  declare const ApView: {
5
- new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApViewProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
5
+ new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApViewProps> & Readonly<{}>, {
6
+ setFirstDefaultSystemView: (value: boolean) => void;
7
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
6
8
  maxViewNum: number;
7
9
  isDefaultSystemView: boolean;
10
+ isFirstDefaultSystemView: boolean;
8
11
  }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
9
12
  P: {};
10
13
  B: {};
@@ -12,16 +15,22 @@ declare const ApView: {
12
15
  C: {};
13
16
  M: {};
14
17
  Defaults: {};
15
- }, Readonly< ApViewProps> & Readonly<{}>, {}, {}, {}, {}, {
18
+ }, Readonly< ApViewProps> & Readonly<{}>, {
19
+ setFirstDefaultSystemView: (value: boolean) => void;
20
+ }, {}, {}, {}, {
16
21
  maxViewNum: number;
17
22
  isDefaultSystemView: boolean;
23
+ isFirstDefaultSystemView: boolean;
18
24
  }>;
19
25
  __isFragment?: never;
20
26
  __isTeleport?: never;
21
27
  __isSuspense?: never;
22
- } & ComponentOptionsBase<Readonly< ApViewProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
28
+ } & ComponentOptionsBase<Readonly< ApViewProps> & Readonly<{}>, {
29
+ setFirstDefaultSystemView: (value: boolean) => void;
30
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
23
31
  maxViewNum: number;
24
32
  isDefaultSystemView: boolean;
33
+ isFirstDefaultSystemView: boolean;
25
34
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & ( Plugin & (new (...args: any[]) => {
26
35
  $props: {
27
36
  onClick?: () => void;
@@ -59,4 +59,11 @@ export interface ApViewProps {
59
59
  * 指定默认视图为系统视图
60
60
  */
61
61
  isDefaultSystemView?: boolean;
62
+ /**
63
+ * 指定初始化默认视图为系统视图(仅初始化生效)
64
+ */
65
+ isFirstDefaultSystemView?: boolean;
66
+ }
67
+ export interface ApViewExpose {
68
+ setFirstDefaultSystemView: (value: boolean) => void;
62
69
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../config-provider/index.js");require("../index.js");const u=require("lodash-unified"),v=require("vue"),b=require("../../config-provider/hooks/use-global-config.js"),q=require("./useTableRefresh.js");function G(a){const o=v.ref(null),{isShowRowSelection:c=!0,clearSelectionOnRequest:d=!0,transformSearchFormValues:s,api:l,tableRefresh:f=!0,virtual:h,...p}=a||{};let n=null;const S=b.useGlobalConfig("uiMode","aplus"),i=()=>{var e,r;(r=(e=o.value)==null?void 0:e.rowSelection)==null||r.clearAll()};q.useTableRefresh({...R(f),apTableRef:o});const g=async e=>{n=e.sort;const r=s?s(e):e;try{if(!l)throw new Error("api is not defined");const{records:t,total:m}=await l(r);return d&&i(),{data:t,total:m}}catch(t){return console.error(t),{data:[],total:0}}};return[u.merge({scroll:{x:"100%",y:"100%"},columnResizable:!0,request:l?g:void 0,rowSelection:c?{fixed:"left",columnWidth:34}:void 0,ref(e){o.value=e},virtual:u.merge({oSize:20,y:20},h),card:!0,bordered:S.value==="admin"},p),{reload:()=>{var e;(e=o.value)==null||e.submit()},reset:()=>{var e;(e=o.value)==null||e.reset()},getSearchFormValues:(e=!0)=>{var t;const r=((t=o.value)==null?void 0:t.getSearchFormValues(!!e))||{};return s?s(r):r},getApGridInstance:()=>o.value,getSearchFormValuesAndSorted:(e=!0)=>{var t;const r=((t=o.value)==null?void 0:t.getSearchFormValues(!!e))||{};return r.sort=n&&u.cloneDeep(n),s?s(r):r},clearSelection:i}]}function R(a){return a===!0?{}:a===!1?{refreshBefore:()=>!1}:a}exports.usePageListApGrid=G;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../index.js");const u=require("lodash-unified"),g=require("vue"),v=require("./useTableRefresh.js");function b(a){const o=g.ref(null),{isShowRowSelection:i=!0,clearSelectionOnRequest:d=!0,transformSearchFormValues:s,api:n,tableRefresh:f=!0,virtual:h,...S}=a||{};let l=null;const c=()=>{var e,r;(r=(e=o.value)==null?void 0:e.rowSelection)==null||r.clearAll()};v.useTableRefresh({...R(f),apTableRef:o});const p=async e=>{l=e.sort;const r=s?s(e):e;try{if(!n)throw new Error("api is not defined");const{records:t,total:m}=await n(r);return d&&c(),{data:t,total:m}}catch(t){return console.error(t),{data:[],total:0}}};return[u.merge({scroll:{x:"100%",y:"100%"},columnResizable:!0,request:n?p:void 0,rowSelection:i?{fixed:"left",columnWidth:34}:void 0,ref(e){o.value=e},virtual:u.merge({oSize:20,y:20},h),card:!0},S),{reload:()=>{var e;(e=o.value)==null||e.submit()},reset:()=>{var e;(e=o.value)==null||e.reset()},getSearchFormValues:(e=!0)=>{var t;const r=((t=o.value)==null?void 0:t.getSearchFormValues(!!e))||{};return s?s(r):r},getApGridInstance:()=>o.value,getSearchFormValuesAndSorted:(e=!0)=>{var t;const r=((t=o.value)==null?void 0:t.getSearchFormValues(!!e))||{};return r.sort=l&&u.cloneDeep(l),s?s(r):r},clearSelection:c}]}function R(a){return a===!0?{}:a===!1?{refreshBefore:()=>!1}:a}exports.usePageListApGrid=b;
@@ -1,2 +1,2 @@
1
- declare const _default: "0.6.0-beta.13";
1
+ declare const _default: "0.6.0-beta.15";
2
2
  export default _default;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="0.6.0-beta.13";exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="0.6.0-beta.15";exports.default=e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aplus-frontend/ui",
3
- "version": "0.6.0-beta.13",
3
+ "version": "0.6.0-beta.15",
4
4
  "main": "./lib/index.js",
5
5
  "type": "module",
6
6
  "files": [
@@ -34,7 +34,7 @@
34
34
  "hooks": {
35
35
  "after:init": "echo Start publish ${npm.name}.",
36
36
  "after:git:release": "gulp -f ./script/build/index.ts",
37
- "after:release": "pnpm run pub:cb"
37
+ "after:release": "pnpm run pub:cb && pnpm send:changelog"
38
38
  }
39
39
  },
40
40
  "sideEffects": [
@@ -96,7 +96,8 @@
96
96
  "release:major:beta": "release-it major --preRelease=beta",
97
97
  "release:minor:beta": "release-it minor --preRelease=beta",
98
98
  "release:patch:beta": "release-it patch --preRelease=beta",
99
- "generate:version": "gulp -f ./script/generate-version.ts"
99
+ "generate:version": "gulp -f ./script/generate-version.ts",
100
+ "send:changelog": "gulp -f ./script/send-changelog.ts"
100
101
  },
101
102
  "module": "./es/index.mjs",
102
103
  "typings": "lib/index.d.ts"
@@ -84,6 +84,8 @@
84
84
  .aplus-ap-copy__copy-btn .aplus-frontend-icon {
85
85
  cursor: pointer;
86
86
  color: #ABB7CC;
87
+ height: 14px;
88
+ line-height: 14px;
87
89
  }
88
90
  .aplus-ap-copy__copy-btn:hover .aplus-frontend-icon {
89
91
  cursor: pointer;
@@ -41,6 +41,8 @@
41
41
  .aplus-frontend-icon{
42
42
  cursor: pointer;
43
43
  color:#ABB7CC;
44
+ height: 14px;
45
+ line-height: 14px;
44
46
  }
45
47
  }
46
48
  &__copy-btn:hover{
@@ -883,38 +883,40 @@
883
883
  height: 100%;
884
884
  }
885
885
  .aplus-ap-table-modal--table-layout.complex-layout {
886
+ height: 100%;
886
887
  position: relative;
887
888
  }
888
- .aplus-ap-table-modal--table-layout.complex-layout::before {
889
- content: '';
890
- width: calc(100% + 40px);
891
- height: 1px;
892
- background-color: #dee4ed;
893
- position: absolute;
894
- left: -20px;
895
- bottom: 0px;
896
- }
897
889
  .aplus-ap-table-modal--table-layout-left {
898
890
  width: calc(100% - 410px);
899
891
  padding-right: 20px;
900
- padding-bottom: 16px;
901
892
  box-sizing: border-box;
893
+ display: flex;
894
+ flex-direction: column;
895
+ }
896
+ .aplus-ap-table-modal--table-layout-left-content {
897
+ flex: 1;
898
+ }
899
+ .aplus-ap-table-modal--table-layout-left-content .ant-table-body {
900
+ height: 100%;
902
901
  }
903
902
  .aplus-ap-table-modal--table-layout-right {
904
903
  width: 410px;
905
904
  padding-left: 20px;
906
905
  position: relative;
906
+ display: flex;
907
+ flex-direction: column;
907
908
  }
908
909
  .aplus-ap-table-modal--table-layout-right-content {
909
- max-height: calc(100vh - 280px);
910
+ flex: 1;
911
+ max-height: 540px;
910
912
  overflow-y: auto;
911
913
  }
912
914
  .aplus-ap-table-modal--table-layout-right::before {
913
915
  content: '';
914
- height: calc(100% + 20px);
916
+ height: calc(100% + 16px);
915
917
  width: 1px;
916
918
  background-color: #dee4ed;
917
919
  position: absolute;
918
920
  left: 0px;
919
- top: -20px;
921
+ top: -16px;
920
922
  }
@@ -11,42 +11,44 @@
11
11
  justify-content: space-between;
12
12
  height: 100%;
13
13
  &.complex-layout {
14
+ height: 100%;
14
15
  position: relative;
15
- &::before {
16
- content: '';
17
- width: calc(100% + 40px);
18
- height: 1px;
19
- background-color: @border-color;
20
- position: absolute;
21
- left: -20px;
22
- bottom: 0px;
23
- }
24
16
  }
25
17
 
26
18
 
27
19
  &-left {
28
20
  width: calc(100% - 410px);
29
21
  padding-right: 20px;
30
- padding-bottom: 16px;
31
22
  box-sizing: border-box;
23
+ display: flex;
24
+ flex-direction: column;
25
+ &-content {
26
+ flex: 1;
27
+ .ant-table-body {
28
+ height: 100%;
29
+ }
30
+ }
32
31
  }
33
32
 
34
33
  &-right {
35
34
  width: 410px;
36
35
  padding-left: 20px;
37
36
  position: relative;
37
+ display: flex;
38
+ flex-direction: column;
38
39
  &-content {
39
- max-height: calc(100vh - 280px);
40
+ flex: 1;
41
+ max-height: 540px;
40
42
  overflow-y: auto;
41
43
  }
42
44
  &::before {
43
45
  content: '';
44
- height: calc(100% + 20px);
46
+ height: calc(100% + 16px);
45
47
  width: 1px;
46
48
  background-color: @border-color;
47
49
  position: absolute;
48
50
  left: 0px;
49
- top:-20px;
51
+ top:-16px;
50
52
  }
51
53
  }
52
54
  }
package/theme/index.css CHANGED
@@ -1136,6 +1136,8 @@
1136
1136
  .aplus-ap-copy__copy-btn .aplus-frontend-icon {
1137
1137
  cursor: pointer;
1138
1138
  color: #ABB7CC;
1139
+ height: 14px;
1140
+ line-height: 14px;
1139
1141
  }
1140
1142
  .aplus-ap-copy__copy-btn:hover .aplus-frontend-icon {
1141
1143
  cursor: pointer;
@@ -2334,40 +2336,42 @@ div.aplus-ap-info-layout-admin__header-shadow.aplus-ap-info-layout-admin__sticky
2334
2336
  height: 100%;
2335
2337
  }
2336
2338
  .aplus-ap-table-modal--table-layout.complex-layout {
2339
+ height: 100%;
2337
2340
  position: relative;
2338
2341
  }
2339
- .aplus-ap-table-modal--table-layout.complex-layout::before {
2340
- content: '';
2341
- width: calc(100% + 40px);
2342
- height: 1px;
2343
- background-color: #dee4ed;
2344
- position: absolute;
2345
- left: -20px;
2346
- bottom: 0px;
2347
- }
2348
2342
  .aplus-ap-table-modal--table-layout-left {
2349
2343
  width: calc(100% - 410px);
2350
2344
  padding-right: 20px;
2351
- padding-bottom: 16px;
2352
2345
  box-sizing: border-box;
2346
+ display: flex;
2347
+ flex-direction: column;
2348
+ }
2349
+ .aplus-ap-table-modal--table-layout-left-content {
2350
+ flex: 1;
2351
+ }
2352
+ .aplus-ap-table-modal--table-layout-left-content .ant-table-body {
2353
+ height: 100%;
2353
2354
  }
2354
2355
  .aplus-ap-table-modal--table-layout-right {
2355
2356
  width: 410px;
2356
2357
  padding-left: 20px;
2357
2358
  position: relative;
2359
+ display: flex;
2360
+ flex-direction: column;
2358
2361
  }
2359
2362
  .aplus-ap-table-modal--table-layout-right-content {
2360
- max-height: calc(100vh - 280px);
2363
+ flex: 1;
2364
+ max-height: 540px;
2361
2365
  overflow-y: auto;
2362
2366
  }
2363
2367
  .aplus-ap-table-modal--table-layout-right::before {
2364
2368
  content: '';
2365
- height: calc(100% + 20px);
2369
+ height: calc(100% + 16px);
2366
2370
  width: 1px;
2367
2371
  background-color: #dee4ed;
2368
2372
  position: absolute;
2369
2373
  left: 0px;
2370
- top: -20px;
2374
+ top: -16px;
2371
2375
  }
2372
2376
  .aplus-scroll-bar {
2373
2377
  position: relative;