orion-design 0.1.5 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. package/dist/Throne/index.d.ts +10 -0
  2. package/dist/Throne/index.js +20 -0
  3. package/dist/Throne/index.js.map +1 -0
  4. package/dist/_commonjsHelpers-DaMA6jEr.js +9 -0
  5. package/dist/_commonjsHelpers-DaMA6jEr.js.map +1 -0
  6. package/dist/components/Button/Button.vue.d.ts +15 -1
  7. package/dist/components/Button/ButtonGroup/ButtonGroup.d.ts +4 -0
  8. package/dist/components/Button/ButtonGroup/ButtonGroup.js +2 -0
  9. package/dist/components/Button/ButtonGroup/ButtonGroup.js.map +1 -0
  10. package/dist/components/Button/ButtonGroup/ButtonGroup.vue.d.ts +17 -0
  11. package/dist/components/Button/ButtonGroup/index.d.ts +1 -0
  12. package/dist/components/Button/ButtonGroup/index.js +2 -0
  13. package/dist/components/Button/ButtonGroup/index.js.map +1 -0
  14. package/dist/components/Button/index.d.ts +21 -4
  15. package/dist/components/Button/index.js +37 -19
  16. package/dist/components/Button/index.js.map +1 -1
  17. package/dist/components/Form/ButtonGroup/ButtonGroup.d.ts +5 -0
  18. package/dist/components/Form/ButtonGroup/ButtonGroup.js +2 -0
  19. package/dist/components/Form/ButtonGroup/ButtonGroup.js.map +1 -0
  20. package/dist/components/Form/ButtonGroup/ButtonGroup.vue.d.ts +17 -0
  21. package/dist/components/Form/ButtonGroup/index.d.ts +1 -0
  22. package/dist/components/Form/ButtonGroup/index.js +2 -0
  23. package/dist/components/Form/ButtonGroup/index.js.map +1 -0
  24. package/dist/components/Form/Checkbox/Checkbox.d.ts +9 -0
  25. package/dist/components/Form/Checkbox/Checkbox.js +2 -0
  26. package/dist/components/Form/Checkbox/Checkbox.js.map +1 -0
  27. package/dist/components/Form/Checkbox/Checkbox.vue.d.ts +3 -0
  28. package/dist/components/Form/Checkbox/index.d.ts +1 -0
  29. package/dist/components/Form/Checkbox/index.js +2 -0
  30. package/dist/components/Form/Checkbox/index.js.map +1 -0
  31. package/dist/components/Form/CheckboxGroup/CheckboxGroup.d.ts +14 -0
  32. package/dist/components/Form/CheckboxGroup/CheckboxGroup.js +2 -0
  33. package/dist/components/Form/CheckboxGroup/CheckboxGroup.js.map +1 -0
  34. package/dist/components/Form/CheckboxGroup/CheckboxGroup.vue.d.ts +3 -0
  35. package/dist/components/Form/CheckboxGroup/index.d.ts +1 -0
  36. package/dist/components/Form/CheckboxGroup/index.js +2 -0
  37. package/dist/components/Form/CheckboxGroup/index.js.map +1 -0
  38. package/dist/components/Form/DateInput/DateInput.d.ts +17 -0
  39. package/dist/components/Form/DateInput/DateInput.js +2 -0
  40. package/dist/components/Form/DateInput/DateInput.js.map +1 -0
  41. package/dist/components/Form/DateInput/DateInput.vue.d.ts +3 -0
  42. package/dist/components/Form/DateInput/index.d.ts +1 -0
  43. package/dist/components/Form/DateInput/index.js +2 -0
  44. package/dist/components/Form/DateInput/index.js.map +1 -0
  45. package/dist/components/Form/DiyItem/DiyItem.d.ts +9 -0
  46. package/dist/components/Form/DiyItem/DiyItem.js +2 -0
  47. package/dist/components/Form/DiyItem/DiyItem.js.map +1 -0
  48. package/dist/components/Form/DiyItem/DiyItem.vue.d.ts +17 -0
  49. package/dist/components/Form/DiyItem/index.d.ts +1 -0
  50. package/dist/components/Form/DiyItem/index.js +2 -0
  51. package/dist/components/Form/DiyItem/index.js.map +1 -0
  52. package/dist/components/Form/FileInput/FileInput.d.ts +10 -0
  53. package/dist/components/Form/FileInput/FileInput.js +2 -0
  54. package/dist/components/Form/FileInput/FileInput.js.map +1 -0
  55. package/dist/components/Form/FileInput/FileInput.vue.d.ts +451 -0
  56. package/dist/components/Form/FileInput/index.d.ts +1 -0
  57. package/dist/components/Form/FileInput/index.js +2 -0
  58. package/dist/components/Form/FileInput/index.js.map +1 -0
  59. package/dist/components/Form/Form.d.ts +1 -0
  60. package/dist/components/Form/Form.js.map +1 -1
  61. package/dist/components/Form/Form.vue.d.ts +10 -10
  62. package/dist/components/Form/MultiSelect/MultiSelect.d.ts +15 -0
  63. package/dist/components/Form/MultiSelect/MultiSelect.js +2 -0
  64. package/dist/components/Form/MultiSelect/MultiSelect.js.map +1 -0
  65. package/dist/components/Form/MultiSelect/MultiSelect.vue.d.ts +3 -0
  66. package/dist/components/Form/MultiSelect/index.d.ts +1 -0
  67. package/dist/components/Form/MultiSelect/index.js +2 -0
  68. package/dist/components/Form/MultiSelect/index.js.map +1 -0
  69. package/dist/components/Form/PasswordInput/PasswordInput.d.ts +0 -2
  70. package/dist/components/Form/RadioGroup/RadioGroup.d.ts +14 -0
  71. package/dist/components/Form/RadioGroup/RadioGroup.js +2 -0
  72. package/dist/components/Form/RadioGroup/RadioGroup.js.map +1 -0
  73. package/dist/components/Form/RadioGroup/RadioGroup.vue.d.ts +3 -0
  74. package/dist/components/Form/RadioGroup/index.d.ts +1 -0
  75. package/dist/components/Form/RadioGroup/index.js +2 -0
  76. package/dist/components/Form/RadioGroup/index.js.map +1 -0
  77. package/dist/components/Form/SingleSelect/SingleSelect.d.ts +17 -0
  78. package/dist/components/Form/SingleSelect/SingleSelect.js +2 -0
  79. package/dist/components/Form/SingleSelect/SingleSelect.js.map +1 -0
  80. package/dist/components/Form/SingleSelect/SingleSelect.vue.d.ts +3 -0
  81. package/dist/components/Form/SingleSelect/index.d.ts +1 -0
  82. package/dist/components/Form/SingleSelect/index.js +2 -0
  83. package/dist/components/Form/SingleSelect/index.js.map +1 -0
  84. package/dist/components/Form/StringInput/StringInput.d.ts +0 -2
  85. package/dist/components/Form/Switch/Switch.d.ts +9 -0
  86. package/dist/components/Form/Switch/Switch.js +2 -0
  87. package/dist/components/Form/Switch/Switch.js.map +1 -0
  88. package/dist/components/Form/Switch/Switch.vue.d.ts +3 -0
  89. package/dist/components/Form/Switch/index.d.ts +1 -0
  90. package/dist/components/Form/Switch/index.js +2 -0
  91. package/dist/components/Form/Switch/index.js.map +1 -0
  92. package/dist/components/Form/Textarea/Textarea.d.ts +0 -2
  93. package/dist/components/Form/hooks/useForm.d.ts +5 -3
  94. package/dist/components/Form/hooks/useForm.js +40 -17
  95. package/dist/components/Form/hooks/useForm.js.map +1 -1
  96. package/dist/components/Form/index.d.ts +37 -6
  97. package/dist/components/Form/index.js +612 -100
  98. package/dist/components/Form/index.js.map +1 -1
  99. package/dist/components/Form/utils/index.d.ts +8 -0
  100. package/dist/components/Form/utils/index.js +26 -0
  101. package/dist/components/Form/utils/index.js.map +1 -0
  102. package/dist/components/Modal/index.d.ts +1 -1
  103. package/dist/components/Pagetable/Pagetable.d.ts +29 -17
  104. package/dist/components/Pagetable/columns/PagetableCellButton.d.ts +24 -0
  105. package/dist/components/Pagetable/columns/PagetableColumnButtongroup.d.ts +78 -0
  106. package/dist/components/Pagetable/columns/{PagetableDatecolumn.d.ts → PagetableColumnDate.d.ts} +17 -4
  107. package/dist/components/Pagetable/columns/PagetableColumnDiy.d.ts +78 -0
  108. package/dist/components/Pagetable/columns/PagetableColumnIndex.d.ts +5 -0
  109. package/dist/components/Pagetable/columns/PagetableColumnMultiselect.d.ts +109 -0
  110. package/dist/components/Pagetable/columns/PagetableColumnNumber.d.ts +114 -0
  111. package/dist/components/Pagetable/columns/PagetableColumnSingleselect.d.ts +109 -0
  112. package/dist/components/Pagetable/columns/{PagetableStringcolumn.d.ts → PagetableColumnString.d.ts} +17 -4
  113. package/dist/components/Pagetable/columns/PagetableColumngroup.d.ts +35 -0
  114. package/dist/components/Pagetable/hooks/useColumns.d.ts +1 -0
  115. package/dist/components/Pagetable/hooks/useColumns.js +96 -0
  116. package/dist/components/Pagetable/hooks/useColumns.js.map +1 -0
  117. package/dist/components/Pagetable/index.d.ts +42 -17
  118. package/dist/components/Pagetable/index.js +496 -119
  119. package/dist/components/Pagetable/index.js.map +1 -1
  120. package/dist/components/Pagetable/utils/index.d.ts +15 -0
  121. package/dist/components/Pagetable/utils/index.js +169 -0
  122. package/dist/components/Pagetable/utils/index.js.map +1 -0
  123. package/dist/components/Space/index.d.ts +3 -3
  124. package/dist/components/_util/type.d.ts +4 -0
  125. package/dist/components/_util/type.js +8 -4
  126. package/dist/components/_util/type.js.map +1 -1
  127. package/dist/components/_util/vue/size.d.ts +1 -1
  128. package/dist/components/components.js +15 -14
  129. package/dist/components/components.js.map +1 -1
  130. package/dist/components/index.js +20 -19
  131. package/dist/components/index.js.map +1 -1
  132. package/dist/components/types.d.ts +11 -0
  133. package/dist/components/types.js +2 -0
  134. package/dist/components/types.js.map +1 -0
  135. package/dist/components-CutWiB7Q.js +68 -0
  136. package/dist/components-CutWiB7Q.js.map +1 -0
  137. package/dist/index-BbsXWo7C.js +44 -0
  138. package/dist/index-BbsXWo7C.js.map +1 -0
  139. package/dist/index.css +1 -1
  140. package/dist/index.d.ts +1 -0
  141. package/dist/index.js +22 -19
  142. package/dist/index.js.map +1 -1
  143. package/dist/utils/md5.js +77 -79
  144. package/dist/utils/md5.js.map +1 -1
  145. package/dist/version/version.d.ts +1 -1
  146. package/dist/version/version.js +1 -1
  147. package/dist/version/version.js.map +1 -1
  148. package/package.json +7 -3
  149. package/dist/components-BZukhWDk.js +0 -106
  150. package/dist/components-BZukhWDk.js.map +0 -1
  151. package/dist/utils/vue/install.d.ts +0 -6
  152. package/dist/utils/vue/install.js +0 -21
  153. package/dist/utils/vue/install.js.map +0 -1
  154. package/dist/utils/vue/typescript.d.ts +0 -5
  155. package/dist/utils/vue/typescript.js +0 -2
  156. package/dist/utils/vue/typescript.js.map +0 -1
@@ -0,0 +1,114 @@
1
+ import { PropType, ExtractPropTypes } from 'vue';
2
+ import { FixedType } from '../interface';
3
+ export declare const pagetableColumnNumberProps: () => {
4
+ head: {
5
+ type: PropType<string>;
6
+ default: string;
7
+ };
8
+ headAlign: {
9
+ type: PropType<"center" | "left" | "right">;
10
+ default: "center" | "left" | "right";
11
+ };
12
+ name: {
13
+ type: PropType<string>;
14
+ default: string;
15
+ };
16
+ width: {
17
+ type: PropType<string | boolean>;
18
+ default: string | boolean;
19
+ };
20
+ fixed: {
21
+ type: PropType<FixedType>;
22
+ default: FixedType;
23
+ };
24
+ thousandsSeparator: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
28
+ precision: {
29
+ type: PropType<-1>;
30
+ default: -1;
31
+ };
32
+ percentage: {
33
+ type: BooleanConstructor;
34
+ default: boolean;
35
+ };
36
+ };
37
+ export type PagetableColumnNumberProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnNumberProps>>>;
38
+ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
39
+ head: {
40
+ type: PropType<string>;
41
+ default: string;
42
+ };
43
+ headAlign: {
44
+ type: PropType<"center" | "left" | "right">;
45
+ default: "center" | "left" | "right";
46
+ };
47
+ name: {
48
+ type: PropType<string>;
49
+ default: string;
50
+ };
51
+ width: {
52
+ type: PropType<string | boolean>;
53
+ default: string | boolean;
54
+ };
55
+ fixed: {
56
+ type: PropType<FixedType>;
57
+ default: FixedType;
58
+ };
59
+ thousandsSeparator: {
60
+ type: BooleanConstructor;
61
+ default: boolean;
62
+ };
63
+ precision: {
64
+ type: PropType<-1>;
65
+ default: -1;
66
+ };
67
+ percentage: {
68
+ type: BooleanConstructor;
69
+ default: boolean;
70
+ };
71
+ }>, () => null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ExtractPropTypes<{
72
+ head: {
73
+ type: PropType<string>;
74
+ default: string;
75
+ };
76
+ headAlign: {
77
+ type: PropType<"center" | "left" | "right">;
78
+ default: "center" | "left" | "right";
79
+ };
80
+ name: {
81
+ type: PropType<string>;
82
+ default: string;
83
+ };
84
+ width: {
85
+ type: PropType<string | boolean>;
86
+ default: string | boolean;
87
+ };
88
+ fixed: {
89
+ type: PropType<FixedType>;
90
+ default: FixedType;
91
+ };
92
+ thousandsSeparator: {
93
+ type: BooleanConstructor;
94
+ default: boolean;
95
+ };
96
+ precision: {
97
+ type: PropType<-1>;
98
+ default: -1;
99
+ };
100
+ percentage: {
101
+ type: BooleanConstructor;
102
+ default: boolean;
103
+ };
104
+ }>> & Readonly<{}>, {
105
+ fixed: FixedType;
106
+ head: string;
107
+ width: string | boolean;
108
+ name: string;
109
+ thousandsSeparator: boolean;
110
+ headAlign: "center" | "left" | "right";
111
+ precision: -1;
112
+ percentage: boolean;
113
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
114
+ export default _default;
@@ -0,0 +1,109 @@
1
+ import { PropType, ExtractPropTypes } from 'vue';
2
+ import { FixedType } from '../interface';
3
+ export declare const pagetableColumnSingleselectProps: () => {
4
+ head: {
5
+ type: PropType<string>;
6
+ default: string;
7
+ };
8
+ headAlign: {
9
+ type: PropType<"center" | "left" | "right">;
10
+ default: "center" | "left" | "right";
11
+ };
12
+ name: {
13
+ type: PropType<string>;
14
+ default: string;
15
+ };
16
+ width: {
17
+ type: PropType<string | boolean>;
18
+ default: string | boolean;
19
+ };
20
+ fixed: {
21
+ type: PropType<FixedType>;
22
+ default: FixedType;
23
+ };
24
+ code: {
25
+ type: PropType<string | {
26
+ value: string;
27
+ content: string;
28
+ }[]>;
29
+ default: string | {
30
+ value: string;
31
+ content: string;
32
+ }[];
33
+ };
34
+ };
35
+ export type PagetableColumnSingleselectProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnSingleselectProps>>>;
36
+ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
37
+ head: {
38
+ type: PropType<string>;
39
+ default: string;
40
+ };
41
+ headAlign: {
42
+ type: PropType<"center" | "left" | "right">;
43
+ default: "center" | "left" | "right";
44
+ };
45
+ name: {
46
+ type: PropType<string>;
47
+ default: string;
48
+ };
49
+ width: {
50
+ type: PropType<string | boolean>;
51
+ default: string | boolean;
52
+ };
53
+ fixed: {
54
+ type: PropType<FixedType>;
55
+ default: FixedType;
56
+ };
57
+ code: {
58
+ type: PropType<string | {
59
+ value: string;
60
+ content: string;
61
+ }[]>;
62
+ default: string | {
63
+ value: string;
64
+ content: string;
65
+ }[];
66
+ };
67
+ }>, () => null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ExtractPropTypes<{
68
+ head: {
69
+ type: PropType<string>;
70
+ default: string;
71
+ };
72
+ headAlign: {
73
+ type: PropType<"center" | "left" | "right">;
74
+ default: "center" | "left" | "right";
75
+ };
76
+ name: {
77
+ type: PropType<string>;
78
+ default: string;
79
+ };
80
+ width: {
81
+ type: PropType<string | boolean>;
82
+ default: string | boolean;
83
+ };
84
+ fixed: {
85
+ type: PropType<FixedType>;
86
+ default: FixedType;
87
+ };
88
+ code: {
89
+ type: PropType<string | {
90
+ value: string;
91
+ content: string;
92
+ }[]>;
93
+ default: string | {
94
+ value: string;
95
+ content: string;
96
+ }[];
97
+ };
98
+ }>> & Readonly<{}>, {
99
+ fixed: FixedType;
100
+ code: string | {
101
+ value: string;
102
+ content: string;
103
+ }[];
104
+ head: string;
105
+ width: string | boolean;
106
+ name: string;
107
+ headAlign: "center" | "left" | "right";
108
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
109
+ export default _default;
@@ -1,10 +1,14 @@
1
1
  import { PropType, ExtractPropTypes } from 'vue';
2
2
  import { FixedType } from '../interface';
3
- export declare const pagetableStringcolumnProps: () => {
3
+ export declare const pagetableColumnStringProps: () => {
4
4
  head: {
5
5
  type: PropType<string>;
6
6
  default: string;
7
7
  };
8
+ headAlign: {
9
+ type: PropType<"center" | "left" | "right">;
10
+ default: "center" | "left" | "right";
11
+ };
8
12
  name: {
9
13
  type: PropType<string>;
10
14
  default: string;
@@ -18,12 +22,16 @@ export declare const pagetableStringcolumnProps: () => {
18
22
  default: FixedType;
19
23
  };
20
24
  };
21
- export type PagetableStringcolumnProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableStringcolumnProps>>>;
25
+ export type PagetableColumnStringProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnStringProps>>>;
22
26
  declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
23
27
  head: {
24
28
  type: PropType<string>;
25
29
  default: string;
26
30
  };
31
+ headAlign: {
32
+ type: PropType<"center" | "left" | "right">;
33
+ default: "center" | "left" | "right";
34
+ };
27
35
  name: {
28
36
  type: PropType<string>;
29
37
  default: string;
@@ -41,6 +49,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
41
49
  type: PropType<string>;
42
50
  default: string;
43
51
  };
52
+ headAlign: {
53
+ type: PropType<"center" | "left" | "right">;
54
+ default: "center" | "left" | "right";
55
+ };
44
56
  name: {
45
57
  type: PropType<string>;
46
58
  default: string;
@@ -54,9 +66,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
54
66
  default: FixedType;
55
67
  };
56
68
  }>> & Readonly<{}>, {
57
- name: string;
58
- head: string;
59
69
  fixed: FixedType;
70
+ head: string;
60
71
  width: string | boolean;
72
+ name: string;
73
+ headAlign: "center" | "left" | "right";
61
74
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
62
75
  export default _default;
@@ -0,0 +1,35 @@
1
+ import { PropType, ExtractPropTypes } from 'vue';
2
+ export declare const pagetableColumngroupProps: () => {
3
+ head: {
4
+ type: PropType<string>;
5
+ default: string;
6
+ };
7
+ headAlign: {
8
+ type: PropType<"center" | "left" | "right">;
9
+ default: "center" | "left" | "right";
10
+ };
11
+ };
12
+ export type PagetableColumngroupProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumngroupProps>>>;
13
+ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
14
+ head: {
15
+ type: PropType<string>;
16
+ default: string;
17
+ };
18
+ headAlign: {
19
+ type: PropType<"center" | "left" | "right">;
20
+ default: "center" | "left" | "right";
21
+ };
22
+ }>, () => null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ExtractPropTypes<{
23
+ head: {
24
+ type: PropType<string>;
25
+ default: string;
26
+ };
27
+ headAlign: {
28
+ type: PropType<"center" | "left" | "right">;
29
+ default: "center" | "left" | "right";
30
+ };
31
+ }>> & Readonly<{}>, {
32
+ head: string;
33
+ headAlign: "center" | "left" | "right";
34
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
35
+ export default _default;
@@ -0,0 +1 @@
1
+ export default function useColumns(slots: any): import('vue').ComputedRef<any>;
@@ -0,0 +1,96 @@
1
+ import { computed as u } from "vue";
2
+ import f from "../../../error/OrionError.js";
3
+ import { camelize as g } from "../../_util/util.js";
4
+ function m(n) {
5
+ return n == null ? void 0 : n.map((a) => {
6
+ var t, d;
7
+ const e = { ...a.props || {} };
8
+ for (const [i, h] of Object.entries(e))
9
+ delete e[i], e[g(i)] = h;
10
+ if (a.type.name === "OPagetableColumnIndex")
11
+ return {
12
+ type: a.type.name
13
+ };
14
+ if (a.type.name === "OPagetableColumnString")
15
+ return {
16
+ type: a.type.name,
17
+ head: e == null ? void 0 : e.head,
18
+ headAlign: e == null ? void 0 : e.headAlign,
19
+ name: e == null ? void 0 : e.name,
20
+ width: e == null ? void 0 : e.width,
21
+ fixed: e == null ? void 0 : e.fixed
22
+ };
23
+ if (a.type.name === "OPagetableColumnNumber")
24
+ return {
25
+ type: a.type.name,
26
+ head: e == null ? void 0 : e.head,
27
+ headAlign: e == null ? void 0 : e.headAlign,
28
+ name: e == null ? void 0 : e.name,
29
+ width: e == null ? void 0 : e.width,
30
+ fixed: e == null ? void 0 : e.fixed,
31
+ thousandsSeparator: e == null ? void 0 : e.thousandsSeparator,
32
+ precision: Number(e == null ? void 0 : e.precision),
33
+ percentage: e == null ? void 0 : e.percentage
34
+ };
35
+ if (a.type.name === "OPagetableColumnDate")
36
+ return {
37
+ type: a.type.name,
38
+ head: e == null ? void 0 : e.head,
39
+ headAlign: e == null ? void 0 : e.headAlign,
40
+ name: e == null ? void 0 : e.name,
41
+ width: e == null ? void 0 : e.width,
42
+ fixed: e == null ? void 0 : e.fixed,
43
+ format: e == null ? void 0 : e.format,
44
+ sourceFormat: e == null ? void 0 : e.sourceFormat
45
+ };
46
+ if (a.type.name === "OPagetableColumnSingleselect" || a.type.name === "OPagetableColumnMultiselect")
47
+ return {
48
+ type: a.type.name,
49
+ head: e == null ? void 0 : e.head,
50
+ headAlign: e == null ? void 0 : e.headAlign,
51
+ name: e == null ? void 0 : e.name,
52
+ width: e == null ? void 0 : e.width,
53
+ fixed: e == null ? void 0 : e.fixed,
54
+ code: e == null ? void 0 : e.code
55
+ };
56
+ if (a.type.name === "OPagetableColumnButtongroup")
57
+ return {
58
+ type: a.type.name,
59
+ head: e == null ? void 0 : e.head,
60
+ headAlign: e == null ? void 0 : e.headAlign,
61
+ name: e == null ? void 0 : e.name,
62
+ width: e == null ? void 0 : e.width,
63
+ fixed: e == null ? void 0 : e.fixed,
64
+ children: a.children
65
+ };
66
+ if (a.type.name === "OPagetableColumngroup")
67
+ return {
68
+ type: a.type.name,
69
+ head: e == null ? void 0 : e.head,
70
+ headAlign: e == null ? void 0 : e.headAlign,
71
+ children: m((d = (t = a.children) == null ? void 0 : t.default) == null ? void 0 : d.call(t))
72
+ };
73
+ if (a.type.name === "OPagetableColumnDiy")
74
+ return {
75
+ type: a.type.name,
76
+ head: e == null ? void 0 : e.head,
77
+ headAlign: e == null ? void 0 : e.headAlign,
78
+ name: e == null ? void 0 : e.name,
79
+ width: e == null ? void 0 : e.width,
80
+ fixed: e == null ? void 0 : e.fixed,
81
+ children: a.children
82
+ };
83
+ throw new f(`OPagetable不能正确解析'${a.type.name}'子组件。`);
84
+ });
85
+ }
86
+ function w(n) {
87
+ return u(() => {
88
+ var t;
89
+ const a = (t = n.default) == null ? void 0 : t.call(n);
90
+ return m(a);
91
+ });
92
+ }
93
+ export {
94
+ w as default
95
+ };
96
+ //# sourceMappingURL=useColumns.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useColumns.js","sources":["../../../../src/components/Pagetable/hooks/useColumns.ts"],"sourcesContent":["import { computed } from 'vue'\r\nimport OrionError from '../../../error/OrionError'\r\n\r\nimport { camelize } from '../../../components/_util/util'\r\n\r\nfunction genColumns(children) {\r\n const tableColumns = children?.map((c) => {\r\n const props = { ...(c.props || {}) }\r\n for (const [k, v] of Object.entries(props)) {\r\n delete props[k]\r\n props[camelize(k)] = v\r\n }\r\n\r\n if (c.type.name === 'OPagetableColumnIndex') {\r\n return {\r\n type: c.type.name,\r\n }\r\n } else if (c.type.name === 'OPagetableColumnString') {\r\n return {\r\n type: c.type.name,\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n }\r\n } else if (c.type.name === 'OPagetableColumnNumber') {\r\n return {\r\n type: c.type.name,\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n thousandsSeparator: props?.thousandsSeparator,\r\n precision: Number(props?.precision),\r\n percentage: props?.percentage,\r\n }\r\n } else if (c.type.name === 'OPagetableColumnDate') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n format: props?.format,\r\n sourceFormat: props?.sourceFormat,\r\n }\r\n } else if (c.type.name === 'OPagetableColumnSingleselect' || c.type.name === 'OPagetableColumnMultiselect') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n code: props?.code,\r\n }\r\n } else if (c.type.name === 'OPagetableColumnButtongroup') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n children: c.children,\r\n }\r\n } else if (c.type.name === 'OPagetableColumngroup') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n\r\n children: genColumns(c.children?.default?.()),\r\n }\r\n } else if (c.type.name === 'OPagetableColumnDiy') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n children: c.children,\r\n }\r\n } else {\r\n throw new OrionError(`OPagetable不能正确解析'${c.type.name}'子组件。`)\r\n }\r\n })\r\n\r\n return tableColumns\r\n}\r\n\r\nexport default function useColumns(slots) {\r\n const columns = computed(() => {\r\n const children = slots.default?.()\r\n\r\n const tableColumns = genColumns(children)\r\n\r\n return tableColumns\r\n })\r\n\r\n return columns\r\n}\r\n"],"names":["genColumns","children","c","props","k","v","camelize","_b","_a","OrionError","useColumns","slots","computed"],"mappings":"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"}
@@ -1,12 +1,15 @@
1
- import { default as PagetableStringcolumn } from './columns/PagetableStringcolumn';
2
- import { default as PagetableDatecolumn } from './columns/PagetableDatecolumn';
1
+ import { default as PagetableColumnIndex } from './columns/PagetableColumnIndex';
2
+ import { default as PagetableColumnString } from './columns/PagetableColumnString';
3
+ import { default as PagetableColumnNumber } from './columns/PagetableColumnNumber';
4
+ import { default as PagetableColumnDate } from './columns/PagetableColumnDate';
5
+ import { default as PagetableColumnSingleselect } from './columns/PagetableColumnSingleselect';
6
+ import { default as PagetableColumnMultiselect } from './columns/PagetableColumnMultiselect';
7
+ import { default as PagetableColumnButtongroup } from './columns/PagetableColumnButtongroup';
8
+ import { default as PagetableCellButton } from './columns/PagetableCellButton';
9
+ import { default as PagetableColumngroup } from './columns/PagetableColumngroup';
10
+ import { default as PagetableColumnDiy } from './columns/PagetableColumnDiy';
3
11
  export type { PagetableProps } from './Pagetable';
4
- declare const _default: import('../../utils/vue/typescript').SFCWithInstall<import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
- gutter: {
6
- default: string | boolean;
7
- type: import('vue').PropType<string | boolean>;
8
- };
9
- height: StringConstructor;
12
+ declare const _default: import('../_util').SFCWithInstall<import('vue').DefineComponent<import('vue').ExtractPropTypes<{
10
13
  data: {
11
14
  type: import('vue').PropType<any[]>;
12
15
  default: any[];
@@ -23,12 +26,15 @@ declare const _default: import('../../utils/vue/typescript').SFCWithInstall<impo
23
26
  total?: number;
24
27
  };
25
28
  };
26
- }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
27
- gutter: {
28
- default: string | boolean;
29
- type: import('vue').PropType<string | boolean>;
29
+ showRowNumber: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
33
+ selectionMode: {
34
+ type: BooleanConstructor;
35
+ default: boolean;
30
36
  };
31
- height: StringConstructor;
37
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "selectionChange"[], "selectionChange", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
32
38
  data: {
33
39
  type: import('vue').PropType<any[]>;
34
40
  default: any[];
@@ -45,16 +51,35 @@ declare const _default: import('../../utils/vue/typescript').SFCWithInstall<impo
45
51
  total?: number;
46
52
  };
47
53
  };
48
- }>> & Readonly<{}>, {
54
+ showRowNumber: {
55
+ type: BooleanConstructor;
56
+ default: boolean;
57
+ };
58
+ selectionMode: {
59
+ type: BooleanConstructor;
60
+ default: boolean;
61
+ };
62
+ }>> & Readonly<{
63
+ onSelectionChange?: ((...args: any[]) => any) | undefined;
64
+ }>, {
49
65
  data: any[];
50
- gutter: string | boolean;
51
66
  pagination: {
52
67
  currentPage?: number;
53
68
  pageSize?: number;
54
69
  total?: number;
55
70
  };
71
+ showRowNumber: boolean;
72
+ selectionMode: boolean;
56
73
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>> & {
57
- PagetableStringcolumn: typeof PagetableStringcolumn;
58
- PagetableDatecolumn: typeof PagetableDatecolumn;
74
+ PagetableColumnIndex: typeof PagetableColumnIndex;
75
+ PagetableColumnString: typeof PagetableColumnString;
76
+ PagetableColumnNumber: typeof PagetableColumnNumber;
77
+ PagetableColumnDate: typeof PagetableColumnDate;
78
+ PagetableColumnSingleselect: typeof PagetableColumnSingleselect;
79
+ PagetableColumnMultiselect: typeof PagetableColumnMultiselect;
80
+ PagetableColumnButtongroup: typeof PagetableColumnButtongroup;
81
+ PagetableCellButton: typeof PagetableCellButton;
82
+ PagetableColumngroup: typeof PagetableColumngroup;
83
+ PagetableColumnDiy: typeof PagetableColumnDiy;
59
84
  };
60
85
  export default _default;