@gct-paas/core-web 0.1.6-dev.4 → 0.1.6-dev.6

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 (144) hide show
  1. package/dist/ColorPicker-DGQQb8I7.js +1 -0
  2. package/dist/{_plugin-vue_export-helper-59SbqtUR.js → _plugin-vue_export-helper-C9hXqKoS.js} +1 -1
  3. package/dist/{de_DE-BnwOalCV.js → de_DE-B3f8kAv-.js} +1 -1
  4. package/dist/diagram-config-item-C5Ha2XJq.js +1 -0
  5. package/dist/diagram-config-item-reverse-ChoxnW-Z.js +1 -0
  6. package/dist/diagram-config-item-virtual-Cbmggfwt.js +1 -0
  7. package/dist/{en_US-6Hw6WWah.js → en_US-BSG3Kz6v.js} +1 -1
  8. package/dist/{es_ES-tAqXFGrR.js → es_ES-BGP8IOmQ.js} +1 -1
  9. package/dist/{fr_FR-BkDgVS_P.js → fr_FR-Y-6CzjUq.js} +1 -1
  10. package/dist/hooks-yX21uJ6d.js +1 -0
  11. package/dist/index.min.css +1 -1
  12. package/dist/{ja_JP-AsmV92nC.js → ja_JP-CDlH1v8M.js} +1 -1
  13. package/dist/loader.esm.min.js +1 -1
  14. package/dist/{monaco-editor-CgESUPw_.js → monaco-editor-BTqXEIZI.js} +1 -1
  15. package/dist/{pt_PT-CCVWOJzE.js → pt_PT-N-iIoE2_.js} +1 -1
  16. package/dist/relationship-diagram-config-DstwwXCO.js +1 -0
  17. package/dist/{ru_RU-w4sUgbzL.js → ru_RU--ESLRHrj.js} +1 -1
  18. package/dist/template-1ZQd8Z1w.js +1 -0
  19. package/dist/{tr_TR-CGZch3eB.js → tr_TR-BOIykdZO.js} +1 -1
  20. package/dist/{vi_VN-DONxIDR7.js → vi_VN-CmVoM2Rw.js} +1 -1
  21. package/dist/{zh_CN-BxdD8hqG.js → zh_CN-DhsO5Qwx.js} +1 -1
  22. package/dist/{zh_TW-D5Y8j-oG.js → zh_TW-DWdp2kVo.js} +1 -1
  23. package/es/components/UserPick/src/user-pick.vue_vue_type_script_setup_true_lang.mjs +2 -2
  24. package/es/components/base-button/base-button.vue.mjs +1 -1
  25. package/es/components/field-cascader/src/hooks.d.ts +1 -0
  26. package/es/components/label-design/modal/template.vue_vue_type_script_setup_true_lang.mjs +2 -2
  27. package/es/components/label-design/panels/modals/diff-modal.vue_vue_type_script_setup_true_lang.mjs +2 -2
  28. package/es/components/label-design/panels/panel.vue_vue_type_script_setup_true_lang.mjs +1 -1
  29. package/es/components/label-design/panels/widget/controls/labelTemplate.vue.mjs +2 -2
  30. package/es/components/label-design/panels/widget/controls/labelTemplate.vue_vue_type_script_setup_true_lang.mjs +1 -16
  31. package/es/components/label-design/panels/widget/controls/labelTemplate.vue_vue_type_style_index_0_scoped_c628d318_lang.css +10 -0
  32. package/es/components/label-design/stage/stage.vue.d.ts +9 -0
  33. package/es/components/label-design/stage/stage.vue.mjs +2 -2
  34. package/es/components/label-design/stage/stage.vue_vue_type_script_setup_true_lang.mjs +2 -1
  35. package/es/components/label-design/stage/{stage.vue_vue_type_style_index_0_scoped_53b1f897_lang.css → stage.vue_vue_type_style_index_0_scoped_9275e9fb_lang.css} +8 -8
  36. package/es/components/layout/view-container/view-container.d.ts +1 -11
  37. package/es/components/layout/view-container/view-container.mjs +10 -14
  38. package/es/create-app-vue.mjs +4 -2
  39. package/es/index.d.ts +4 -1
  40. package/es/index.mjs +31 -25
  41. package/es/modules/category/category-modal.vue.d.ts +11 -0
  42. package/es/modules/category/category-modal.vue.mjs +7 -0
  43. package/es/modules/category/category-modal.vue_vue_type_script_setup_true_name_category-modal_lang.mjs +53 -0
  44. package/es/modules/category/category-modal.vue_vue_type_style_index_0_scoped_b560615c_lang.css +67 -0
  45. package/es/modules/category/category-sider.vue.d.ts +337 -0
  46. package/es/modules/category/category-sider.vue.mjs +7 -0
  47. package/es/modules/category/category-sider.vue_vue_type_script_setup_true_name_category-sider_lang.mjs +239 -0
  48. package/es/modules/category/category-sider.vue_vue_type_style_index_0_scoped_5af8c1ba_lang.css +211 -0
  49. package/es/modules/category/hooks/useCategory.d.ts +20 -0
  50. package/es/modules/category/hooks/useCategory.mjs +139 -0
  51. package/es/modules/category/index.d.ts +2 -0
  52. package/es/modules/category/index.mjs +2 -0
  53. package/es/modules/category/type.d.ts +8 -0
  54. package/es/modules/color-picker/src/color-editor.vue.mjs +1 -1
  55. package/es/modules/gct-form/controller/form-item-basic/form-item-basic.controller.mjs +2 -0
  56. package/es/modules/gct-form/controller/gct-form/gct-form.controller.mjs +1 -0
  57. package/es/modules/gct-table/controller/gct-table/gct-table.controller.mjs +1 -0
  58. package/es/modules/gct-table/controller/table-item/table-item.controller.mjs +2 -0
  59. package/es/modules/gct-table/controller/table-row/table-row.controller.mjs +3 -0
  60. package/es/modules/global-modal/src/components/ModalWrapper.vue_vue_type_script_lang.mjs +1 -4
  61. package/es/modules/print-tmpl/icon-print-folder.svg.mjs +4 -0
  62. package/es/modules/print-tmpl/icon-print-printer.svg.mjs +4 -0
  63. package/es/modules/print-tmpl/index.d.ts +2 -0
  64. package/es/modules/print-tmpl/index.mjs +1 -0
  65. package/es/modules/print-tmpl/print-tmpl-modal.vue.d.ts +31 -0
  66. package/es/modules/print-tmpl/print-tmpl-modal.vue.mjs +7 -0
  67. package/es/modules/print-tmpl/print-tmpl-modal.vue_vue_type_script_setup_true_name_print-tmpl-modal_lang.mjs +593 -0
  68. package/es/modules/print-tmpl/print-tmpl-modal.vue_vue_type_style_index_0_scoped_c60841b8_lang.css +143 -0
  69. package/es/modules/relationship-diagram-config/cache.controller.d.ts +70 -0
  70. package/es/modules/relationship-diagram-config/cache.controller.mjs +128 -0
  71. package/es/modules/relationship-diagram-config/components/diagram-config-item/diagram-config-item.css +123 -0
  72. package/es/modules/relationship-diagram-config/components/diagram-config-item/diagram-config-item.d.ts +381 -0
  73. package/es/modules/relationship-diagram-config/components/diagram-config-item/diagram-config-item.mjs +98 -0
  74. package/es/modules/relationship-diagram-config/components/diagram-config-item-container/diagram-config-item-container.css +71 -0
  75. package/es/modules/relationship-diagram-config/components/diagram-config-item-container/diagram-config-item-container.d.ts +28 -0
  76. package/es/modules/relationship-diagram-config/components/diagram-config-item-container/diagram-config-item-container.mjs +53 -0
  77. package/es/modules/relationship-diagram-config/components/diagram-config-item-info/diagram-config-item-info.d.ts +27 -0
  78. package/es/modules/relationship-diagram-config/components/diagram-config-item-info/diagram-config-item-info.mjs +2 -0
  79. package/es/modules/relationship-diagram-config/components/diagram-config-item-reverse/diagram-config-item-reverse.css +107 -0
  80. package/es/modules/relationship-diagram-config/components/diagram-config-item-reverse/diagram-config-item-reverse.d.ts +34 -0
  81. package/es/modules/relationship-diagram-config/components/diagram-config-item-reverse/diagram-config-item-reverse.mjs +198 -0
  82. package/es/modules/relationship-diagram-config/components/diagram-config-item-virtual/diagram-config-item-virtual.css +68 -0
  83. package/es/modules/relationship-diagram-config/components/diagram-config-item-virtual/diagram-config-item-virtual.d.ts +31 -0
  84. package/es/modules/relationship-diagram-config/components/diagram-config-item-virtual/diagram-config-item-virtual.mjs +53 -0
  85. package/es/modules/relationship-diagram-config/components/index.d.ts +5 -0
  86. package/es/modules/relationship-diagram-config/components/index.mjs +5 -0
  87. package/es/modules/relationship-diagram-config/constant/index.d.ts +72 -0
  88. package/es/modules/relationship-diagram-config/constant/index.mjs +70 -0
  89. package/es/modules/relationship-diagram-config/hooks/index.d.ts +10 -0
  90. package/es/modules/relationship-diagram-config/hooks/index.mjs +19 -0
  91. package/es/modules/relationship-diagram-config/index.d.ts +6 -0
  92. package/es/modules/relationship-diagram-config/index.mjs +28 -0
  93. package/es/modules/relationship-diagram-config/interface/i-link-provider/i-link-provider.d.ts +57 -0
  94. package/es/modules/relationship-diagram-config/interface/i-node-provider/i-node-provider.d.ts +18 -0
  95. package/es/modules/relationship-diagram-config/interface/i-relationship-diagram-link/i-relationship-diagram-link.d.ts +80 -0
  96. package/es/modules/relationship-diagram-config/interface/i-relationship-diagram-node/i-relationship-diagram-node.d.ts +82 -0
  97. package/es/modules/relationship-diagram-config/interface/i-relationship-diagram-options/i-relationship-diagram-options.d.ts +51 -0
  98. package/es/modules/relationship-diagram-config/interface/i-rule-config/i-rule-config.d.ts +135 -0
  99. package/es/modules/relationship-diagram-config/interface/index.d.ts +6 -0
  100. package/es/modules/relationship-diagram-config/link.controller.d.ts +75 -0
  101. package/es/modules/relationship-diagram-config/link.controller.mjs +121 -0
  102. package/es/modules/relationship-diagram-config/node.controller.d.ts +102 -0
  103. package/es/modules/relationship-diagram-config/node.controller.mjs +189 -0
  104. package/es/modules/relationship-diagram-config/plumb-plugin/arrow-endpoint.d.ts +23 -0
  105. package/es/modules/relationship-diagram-config/plumb-plugin/arrow-endpoint.mjs +33 -0
  106. package/es/modules/relationship-diagram-config/plumb-plugin/blank-endpoint-renderer.d.ts +1 -0
  107. package/es/modules/relationship-diagram-config/plumb-plugin/blank-endpoint-renderer.mjs +27 -0
  108. package/es/modules/relationship-diagram-config/plumb-plugin/index.d.ts +3 -0
  109. package/es/modules/relationship-diagram-config/plumb-plugin/index.mjs +2 -0
  110. package/es/modules/relationship-diagram-config/providers/default-link-provider/default-link-provider.css +132 -0
  111. package/es/modules/relationship-diagram-config/providers/default-link-provider/default-link-provider.d.ts +21 -0
  112. package/es/modules/relationship-diagram-config/providers/default-link-provider/default-link-provider.mjs +184 -0
  113. package/es/modules/relationship-diagram-config/providers/default-node-provider/default-node-provider.d.ts +14 -0
  114. package/es/modules/relationship-diagram-config/providers/default-node-provider/default-node-provider.mjs +17 -0
  115. package/es/modules/relationship-diagram-config/providers/index.d.ts +5 -0
  116. package/es/modules/relationship-diagram-config/providers/index.mjs +5 -0
  117. package/es/modules/relationship-diagram-config/providers/reverse-node-provider/reverse-node-provider.d.ts +14 -0
  118. package/es/modules/relationship-diagram-config/providers/reverse-node-provider/reverse-node-provider.mjs +17 -0
  119. package/es/modules/relationship-diagram-config/providers/virtual-link-provider/virtual-link-provider.d.ts +16 -0
  120. package/es/modules/relationship-diagram-config/providers/virtual-link-provider/virtual-link-provider.mjs +26 -0
  121. package/es/modules/relationship-diagram-config/providers/virtual-node-provider/virtual-node-provider.d.ts +14 -0
  122. package/es/modules/relationship-diagram-config/providers/virtual-node-provider/virtual-node-provider.mjs +17 -0
  123. package/es/modules/relationship-diagram-config/relationship-diagram-config.controller.d.ts +119 -0
  124. package/es/modules/relationship-diagram-config/relationship-diagram-config.controller.mjs +199 -0
  125. package/es/modules/relationship-diagram-config/relationship-diagram-config.css +113 -0
  126. package/es/modules/relationship-diagram-config/relationship-diagram-config.d.ts +102 -0
  127. package/es/modules/relationship-diagram-config/relationship-diagram-config.mjs +104 -0
  128. package/es/modules/relationship-diagram-config/relationship-diagram-config.state.d.ts +44 -0
  129. package/es/modules/relationship-diagram-config/relationship-diagram-config.state.mjs +46 -0
  130. package/es/modules/relationship-diagram-config/utils/index.d.ts +1 -0
  131. package/es/modules/relationship-diagram-config/utils/register/register.d.ts +71 -0
  132. package/es/modules/relationship-diagram-config/utils/register/register.mjs +81 -0
  133. package/es/utils/recursive.mjs +1 -0
  134. package/package.json +10 -9
  135. package/dist/components-4-8OfvJi.js +0 -1
  136. package/dist/template-Cf-wq8-9.js +0 -1
  137. package/es/components/label-design/panels/widget/controls/labelTemplate.vue_vue_type_style_index_0_scoped_992e00bb_lang.css +0 -10
  138. /package/dist/{JsBarcode-DlXSdlvD.js → JsBarcode-DY53cVJ6.js} +0 -0
  139. /package/dist/{cropper-tw7tUDDe.js → cropper-DK_hFgpO.js} +0 -0
  140. /package/dist/{icon-next-picker-B_S_yInJ.js → icon-next-picker-DYiHqnNR.js} +0 -0
  141. /package/dist/{objectSpread2-DxfE1S3_.js → objectSpread2-DARadIQB.js} +0 -0
  142. /package/dist/{overlayscrollbars-vue-DtKFrHnA.js → overlayscrollbars-vue-Df-3wShc.js} +0 -0
  143. /package/dist/{rich-editor-K2Pv0Uja.js → rich-editor-DVOriJH0.js} +0 -0
  144. /package/dist/{useMonacoEditor-BO2ALW-7.js → useMonacoEditor-DqSQTg7b.js} +0 -0
@@ -0,0 +1,337 @@
1
+ import { BasicAction } from '@gct-paas/core';
2
+ import { CategoryModuleEnum } from './type';
3
+ import { ITreeNode, TreeExDropEvent } from '../../components';
4
+ type __VLS_Props = {
5
+ module: CategoryModuleEnum;
6
+ value?: string;
7
+ siderTitle: string;
8
+ readonly: boolean;
9
+ isTree: boolean;
10
+ needFolderIcon: boolean;
11
+ customDelFunc?: Fn;
12
+ customDelTips?: string;
13
+ hasTitle?: boolean;
14
+ draggable?: boolean;
15
+ ignoreCase?: number;
16
+ hasPerBtns?: BasicAction[];
17
+ };
18
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {
19
+ getCategoryData: () => ITreeNode[];
20
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
21
+ changeCategory: (value?: string | undefined) => void;
22
+ changeValue: (value?: object | undefined) => void;
23
+ "update:value": (value?: string | undefined) => void;
24
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
25
+ onChangeCategory?: ((value?: string | undefined) => any) | undefined;
26
+ onChangeValue?: ((value?: object | undefined) => any) | undefined;
27
+ "onUpdate:value"?: ((value?: string | undefined) => any) | undefined;
28
+ }>, {
29
+ hasTitle: boolean;
30
+ draggable: boolean;
31
+ hasPerBtns: BasicAction[];
32
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
33
+ treeExRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
34
+ draggable: {
35
+ type: BooleanConstructor;
36
+ default: boolean;
37
+ };
38
+ data: {
39
+ type: import('vue').PropType<ITreeNode[]>;
40
+ required: true;
41
+ };
42
+ filter: {
43
+ type: StringConstructor;
44
+ default: undefined;
45
+ };
46
+ selectedKeys: {
47
+ type: {
48
+ (arrayLength: number): string[];
49
+ (...items: string[]): string[];
50
+ new (arrayLength: number): string[];
51
+ new (...items: string[]): string[];
52
+ isArray(arg: any): arg is any[];
53
+ readonly prototype: any[];
54
+ from<T>(arrayLike: ArrayLike<T>): T[];
55
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
56
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
57
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
58
+ of<T>(...items: T[]): T[];
59
+ readonly [Symbol.species]: ArrayConstructor;
60
+ fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
61
+ fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
62
+ };
63
+ default: undefined;
64
+ };
65
+ checkedKeys: {
66
+ type: {
67
+ (arrayLength: number): string[];
68
+ (...items: string[]): string[];
69
+ new (arrayLength: number): string[];
70
+ new (...items: string[]): string[];
71
+ isArray(arg: any): arg is any[];
72
+ readonly prototype: any[];
73
+ from<T>(arrayLike: ArrayLike<T>): T[];
74
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
75
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
76
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
77
+ of<T>(...items: T[]): T[];
78
+ readonly [Symbol.species]: ArrayConstructor;
79
+ fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
80
+ fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
81
+ };
82
+ default: undefined;
83
+ };
84
+ expandedKeys: {
85
+ type: {
86
+ (arrayLength: number): string[];
87
+ (...items: string[]): string[];
88
+ new (arrayLength: number): string[];
89
+ new (...items: string[]): string[];
90
+ isArray(arg: any): arg is any[];
91
+ readonly prototype: any[];
92
+ from<T>(arrayLike: ArrayLike<T>): T[];
93
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
94
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
95
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
96
+ of<T>(...items: T[]): T[];
97
+ readonly [Symbol.species]: ArrayConstructor;
98
+ fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
99
+ fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
100
+ };
101
+ default: undefined;
102
+ };
103
+ multiple: {
104
+ type: BooleanConstructor;
105
+ default: boolean;
106
+ };
107
+ lastSelectionLocked: {
108
+ type: BooleanConstructor;
109
+ default: boolean;
110
+ };
111
+ checkable: {
112
+ type: BooleanConstructor;
113
+ default: boolean;
114
+ };
115
+ checkStrictly: {
116
+ type: BooleanConstructor;
117
+ default: boolean;
118
+ };
119
+ autoExpandParent: {
120
+ type: BooleanConstructor;
121
+ default: boolean;
122
+ };
123
+ defaultExpandAll: {
124
+ type: BooleanConstructor;
125
+ default: boolean;
126
+ };
127
+ showLine: {
128
+ type: BooleanConstructor;
129
+ default: boolean;
130
+ };
131
+ ignoreCase: {
132
+ type: NumberConstructor;
133
+ default: number;
134
+ };
135
+ }>> & Readonly<{
136
+ onDrop?: ((event: TreeExDropEvent) => any) | undefined;
137
+ "onUpdate:checkedKeys"?: ((_val: string[]) => any) | undefined;
138
+ "onUpdate:expandedKeys"?: ((_val: string[]) => any) | undefined;
139
+ "onUpdate:selectedKeys"?: ((_val: string[]) => any) | undefined;
140
+ }>, {
141
+ ns: import('@gct-paas/core').Namespace;
142
+ selectedKeysValue: import('vue').WritableComputedRef<string[], string[]>;
143
+ checkedKeysValue: import('vue').WritableComputedRef<string[], string[]>;
144
+ expandedKeysValue: import('vue').WritableComputedRef<string[] | undefined, string[] | undefined>;
145
+ actualDraggable: import('vue').ComputedRef<boolean>;
146
+ filteredTreeData: import('vue').ComputedRef<ITreeNode[]>;
147
+ handleSelect: (sKeys: (string | number)[], { node }: {
148
+ node: import('ant-design-vue/es/tree').EventDataNode;
149
+ }) => void;
150
+ handleCheck: (checked: string[] | {
151
+ checked: string[];
152
+ halfChecked: string[];
153
+ }, info: import('ant-design-vue/es/vc-tree/props').CheckInfo) => void;
154
+ handleDrop: (info: import('ant-design-vue/es/tree').AntTreeNodeDropEvent) => Promise<void>;
155
+ collapseAll: () => void;
156
+ expandAll: () => void;
157
+ onExpand: (eKeys: (string | number)[], { expanded: _expanded, node: _node, }: {
158
+ expanded: boolean;
159
+ node: import('ant-design-vue/es/tree').EventDataNode;
160
+ }) => void;
161
+ expandNode: (key: string, isExpand?: boolean) => void;
162
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
163
+ "update:selectedKeys": (_val: string[]) => boolean;
164
+ "update:checkedKeys": (_val: string[]) => boolean;
165
+ "update:expandedKeys": (_val: string[]) => boolean;
166
+ drop: (event: TreeExDropEvent) => boolean;
167
+ }, import('vue').PublicProps, {
168
+ draggable: boolean;
169
+ filter: string;
170
+ selectedKeys: string[];
171
+ checkedKeys: string[];
172
+ expandedKeys: string[];
173
+ multiple: boolean;
174
+ lastSelectionLocked: boolean;
175
+ checkable: boolean;
176
+ checkStrictly: boolean;
177
+ autoExpandParent: boolean;
178
+ defaultExpandAll: boolean;
179
+ showLine: boolean;
180
+ ignoreCase: number;
181
+ }, true, {}, import('vue').SlotsType<{
182
+ title: {
183
+ node: ITreeNode;
184
+ };
185
+ }>, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
186
+ P: {};
187
+ B: {};
188
+ D: {};
189
+ C: {};
190
+ M: {};
191
+ Defaults: {};
192
+ }, Readonly<import('vue').ExtractPropTypes<{
193
+ draggable: {
194
+ type: BooleanConstructor;
195
+ default: boolean;
196
+ };
197
+ data: {
198
+ type: import('vue').PropType<ITreeNode[]>;
199
+ required: true;
200
+ };
201
+ filter: {
202
+ type: StringConstructor;
203
+ default: undefined;
204
+ };
205
+ selectedKeys: {
206
+ type: {
207
+ (arrayLength: number): string[];
208
+ (...items: string[]): string[];
209
+ new (arrayLength: number): string[];
210
+ new (...items: string[]): string[];
211
+ isArray(arg: any): arg is any[];
212
+ readonly prototype: any[];
213
+ from<T>(arrayLike: ArrayLike<T>): T[];
214
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
215
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
216
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
217
+ of<T>(...items: T[]): T[];
218
+ readonly [Symbol.species]: ArrayConstructor;
219
+ fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
220
+ fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
221
+ };
222
+ default: undefined;
223
+ };
224
+ checkedKeys: {
225
+ type: {
226
+ (arrayLength: number): string[];
227
+ (...items: string[]): string[];
228
+ new (arrayLength: number): string[];
229
+ new (...items: string[]): string[];
230
+ isArray(arg: any): arg is any[];
231
+ readonly prototype: any[];
232
+ from<T>(arrayLike: ArrayLike<T>): T[];
233
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
234
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
235
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
236
+ of<T>(...items: T[]): T[];
237
+ readonly [Symbol.species]: ArrayConstructor;
238
+ fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
239
+ fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
240
+ };
241
+ default: undefined;
242
+ };
243
+ expandedKeys: {
244
+ type: {
245
+ (arrayLength: number): string[];
246
+ (...items: string[]): string[];
247
+ new (arrayLength: number): string[];
248
+ new (...items: string[]): string[];
249
+ isArray(arg: any): arg is any[];
250
+ readonly prototype: any[];
251
+ from<T>(arrayLike: ArrayLike<T>): T[];
252
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
253
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
254
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
255
+ of<T>(...items: T[]): T[];
256
+ readonly [Symbol.species]: ArrayConstructor;
257
+ fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
258
+ fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
259
+ };
260
+ default: undefined;
261
+ };
262
+ multiple: {
263
+ type: BooleanConstructor;
264
+ default: boolean;
265
+ };
266
+ lastSelectionLocked: {
267
+ type: BooleanConstructor;
268
+ default: boolean;
269
+ };
270
+ checkable: {
271
+ type: BooleanConstructor;
272
+ default: boolean;
273
+ };
274
+ checkStrictly: {
275
+ type: BooleanConstructor;
276
+ default: boolean;
277
+ };
278
+ autoExpandParent: {
279
+ type: BooleanConstructor;
280
+ default: boolean;
281
+ };
282
+ defaultExpandAll: {
283
+ type: BooleanConstructor;
284
+ default: boolean;
285
+ };
286
+ showLine: {
287
+ type: BooleanConstructor;
288
+ default: boolean;
289
+ };
290
+ ignoreCase: {
291
+ type: NumberConstructor;
292
+ default: number;
293
+ };
294
+ }>> & Readonly<{
295
+ onDrop?: ((event: TreeExDropEvent) => any) | undefined;
296
+ "onUpdate:checkedKeys"?: ((_val: string[]) => any) | undefined;
297
+ "onUpdate:expandedKeys"?: ((_val: string[]) => any) | undefined;
298
+ "onUpdate:selectedKeys"?: ((_val: string[]) => any) | undefined;
299
+ }>, {
300
+ ns: import('@gct-paas/core').Namespace;
301
+ selectedKeysValue: import('vue').WritableComputedRef<string[], string[]>;
302
+ checkedKeysValue: import('vue').WritableComputedRef<string[], string[]>;
303
+ expandedKeysValue: import('vue').WritableComputedRef<string[] | undefined, string[] | undefined>;
304
+ actualDraggable: import('vue').ComputedRef<boolean>;
305
+ filteredTreeData: import('vue').ComputedRef<ITreeNode[]>;
306
+ handleSelect: (sKeys: (string | number)[], { node }: {
307
+ node: import('ant-design-vue/es/tree').EventDataNode;
308
+ }) => void;
309
+ handleCheck: (checked: string[] | {
310
+ checked: string[];
311
+ halfChecked: string[];
312
+ }, info: import('ant-design-vue/es/vc-tree/props').CheckInfo) => void;
313
+ handleDrop: (info: import('ant-design-vue/es/tree').AntTreeNodeDropEvent) => Promise<void>;
314
+ collapseAll: () => void;
315
+ expandAll: () => void;
316
+ onExpand: (eKeys: (string | number)[], { expanded: _expanded, node: _node, }: {
317
+ expanded: boolean;
318
+ node: import('ant-design-vue/es/tree').EventDataNode;
319
+ }) => void;
320
+ expandNode: (key: string, isExpand?: boolean) => void;
321
+ }, {}, {}, {}, {
322
+ draggable: boolean;
323
+ filter: string;
324
+ selectedKeys: string[];
325
+ checkedKeys: string[];
326
+ expandedKeys: string[];
327
+ multiple: boolean;
328
+ lastSelectionLocked: boolean;
329
+ checkable: boolean;
330
+ checkStrictly: boolean;
331
+ autoExpandParent: boolean;
332
+ defaultExpandAll: boolean;
333
+ showLine: boolean;
334
+ ignoreCase: number;
335
+ }> | null;
336
+ }, HTMLDivElement>;
337
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export-helper.mjs";
2
+ import category_sider_vue_vue_type_script_setup_true_name_category_sider_lang_default from "./category-sider.vue_vue_type_script_setup_true_name_category-sider_lang.mjs";
3
+ import './category-sider.vue_vue_type_style_index_0_scoped_5af8c1ba_lang.css';/* empty css */
4
+ //#region src/modules/category/category-sider.vue
5
+ var category_sider_default = /* @__PURE__ */ _plugin_vue_export_helper_default(category_sider_vue_vue_type_script_setup_true_name_category_sider_lang_default, [["__scopeId", "data-v-5af8c1ba"]]);
6
+ //#endregion
7
+ export { category_sider_default as default };
@@ -0,0 +1,239 @@
1
+ import { recursiveTransfer } from "../../utils/recursive.mjs";
2
+ import "../../utils/index.mjs";
3
+ import { TreeEx } from "../../components/TreeEx/tree-ex.mjs";
4
+ import "../../components/index.mjs";
5
+ import { useCategory } from "./hooks/useCategory.mjs";
6
+ import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, onMounted, openBlock, ref, resolveComponent, toDisplayString, unref, watch, withCtx } from "vue";
7
+ import { BasicAction, t, useNamespace } from "@gct-paas/core";
8
+ //#region src/modules/category/category-sider.vue?vue&type=script&setup=true&name=category-sider&lang.ts
9
+ var _hoisted_1 = ["title"];
10
+ var category_sider_vue_vue_type_script_setup_true_name_category_sider_lang_default = /* @__PURE__ */ defineComponent({
11
+ __name: "category-sider",
12
+ props: {
13
+ module: {},
14
+ value: {},
15
+ siderTitle: {},
16
+ readonly: { type: Boolean },
17
+ isTree: { type: Boolean },
18
+ needFolderIcon: { type: Boolean },
19
+ customDelFunc: {},
20
+ customDelTips: {},
21
+ hasTitle: {
22
+ type: Boolean,
23
+ default: true
24
+ },
25
+ draggable: {
26
+ type: Boolean,
27
+ default: true
28
+ },
29
+ ignoreCase: {},
30
+ hasPerBtns: { default: () => [
31
+ BasicAction.Insert,
32
+ BasicAction.Update,
33
+ BasicAction.Delete
34
+ ] }
35
+ },
36
+ emits: [
37
+ "update:value",
38
+ "changeCategory",
39
+ "changeValue"
40
+ ],
41
+ setup(__props, { expose: __expose, emit: __emit }) {
42
+ const MenuClickEvent = {
43
+ EDIT: "edit",
44
+ DELETE: "delete"
45
+ };
46
+ const $t = t;
47
+ const ns = useNamespace("category-sider");
48
+ const props = __props;
49
+ const emit = __emit;
50
+ const selectedKeys = computed({
51
+ get() {
52
+ return props.value ? [props.value] : void 0;
53
+ },
54
+ set(v) {
55
+ emit("update:value", v?.[0]);
56
+ }
57
+ });
58
+ const selfExpandedKeys = ref([]);
59
+ const searchKey = ref();
60
+ const treeExRef = ref();
61
+ const { load, createCategory, editCategory, deleteCategoryAPI, dragCategory, categoryTreeData, isFormDesign } = useCategory({ module: props.module });
62
+ const highlightId = ref("");
63
+ const onVisibleChange = (visible, treeId) => {
64
+ highlightId.value = visible ? treeId : "";
65
+ };
66
+ /**
67
+ * 节点选中事件
68
+ */
69
+ const onMenuVisibleChange = (visible, treeId) => {
70
+ onVisibleChange(visible, treeId);
71
+ };
72
+ const onTreeMenuClick = (node, event) => {
73
+ handleMenuClick(node, String(event.key));
74
+ };
75
+ const handleSelect = (sKeys, { node }) => {
76
+ if (sKeys.length === 0) return;
77
+ if (node.dataRef?.children?.length && !isFormDesign) return;
78
+ if (node.categoryId && !selfExpandedKeys.value.includes(node.categoryId)) selfExpandedKeys.value.push(node.categoryId);
79
+ emit("changeValue", node.dataRef);
80
+ };
81
+ const treeData = computed(() => {
82
+ return recursiveTransfer(categoryTreeData.value || [], (item, resolveChild) => {
83
+ const treeItem = item;
84
+ const node = {
85
+ key: treeItem.id,
86
+ title: treeItem.name,
87
+ sortNum: treeItem.sortNum,
88
+ showFolder: treeItem.children && props.isTree || props.needFolderIcon,
89
+ sysBuiltin: treeItem.sysBuiltin
90
+ };
91
+ if ((treeItem.children || treeItem.child) && props.isTree) node.children = resolveChild(treeItem.children || treeItem.child);
92
+ return node;
93
+ });
94
+ });
95
+ onMounted(async () => {
96
+ await load();
97
+ if (!props.value) {
98
+ emit("update:value", treeData.value[0]?.key);
99
+ if (treeData.value[0]) emit("changeValue", treeData.value[0]);
100
+ }
101
+ });
102
+ watch(treeExRef, () => {
103
+ treeExRef.value?.expandAll();
104
+ }, { immediate: true });
105
+ /**
106
+ * 拖拽事件处理
107
+ * @param dragNode
108
+ * @param after
109
+ */
110
+ const onDrop = async ({ dragNode, after }) => {
111
+ let targetSortNum = 1;
112
+ if (after.nextNode) targetSortNum = Number(after.nextNode.sortNum ?? 0) + 1;
113
+ else if (after.prevNode) targetSortNum = Number(after.prevNode.sortNum ?? 1);
114
+ await dragCategory({
115
+ id: dragNode.key,
116
+ targetParentId: after.parent?.key,
117
+ targetSortNum
118
+ });
119
+ };
120
+ const handleMenuClick = async (node, key) => {
121
+ switch (key) {
122
+ case MenuClickEvent.EDIT:
123
+ await editCategory(node);
124
+ onVisibleChange(false, node.key);
125
+ break;
126
+ case MenuClickEvent.DELETE: {
127
+ const currentSelectedKey = selectedKeys.value[0];
128
+ const res = await deleteCategoryAPI(node, props.customDelFunc, props.customDelTips);
129
+ onVisibleChange(false, node.key);
130
+ if (res && currentSelectedKey === node.key) {
131
+ selectedKeys.value = treeData.value.length ? [treeData.value[0].key] : [];
132
+ emit("changeValue", treeData.value[0]);
133
+ }
134
+ break;
135
+ }
136
+ }
137
+ };
138
+ const newCategory = async () => {
139
+ const data = await createCategory();
140
+ onVisibleChange(false, "");
141
+ if (data.parentId) selfExpandedKeys.value.push(data.parentId);
142
+ selectedKeys.value = treeData.value.length ? [treeData.value[0].key] : [];
143
+ emit("changeValue", treeData.value[0]);
144
+ };
145
+ const getCategoryData = () => {
146
+ return treeData.value;
147
+ };
148
+ __expose({ getCategoryData });
149
+ return (_ctx, _cache) => {
150
+ const _component_a_button = resolveComponent("a-button");
151
+ const _component_a_input = resolveComponent("a-input");
152
+ const _component_ellipsis_outlined = resolveComponent("ellipsis-outlined");
153
+ const _component_a_menu_item = resolveComponent("a-menu-item");
154
+ const _component_a_menu = resolveComponent("a-menu");
155
+ const _component_a_dropdown = resolveComponent("a-dropdown");
156
+ return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns).b()]) }, [
157
+ __props.hasTitle || !__props.readonly ? (openBlock(), createElementBlock("div", {
158
+ key: 0,
159
+ class: normalizeClass([unref(ns).e("title-container")])
160
+ }, [createElementVNode("span", { class: normalizeClass([unref(ns).e("title")]) }, toDisplayString(__props.siderTitle), 3), !__props.readonly && __props.hasPerBtns.includes(unref(BasicAction).Insert) ? (openBlock(), createBlock(_component_a_button, {
161
+ key: 0,
162
+ type: "link",
163
+ class: normalizeClass([unref(ns).e("add")]),
164
+ onClick: newCategory
165
+ }, {
166
+ default: withCtx(() => [_cache[3] || (_cache[3] = createElementVNode("i", { class: "iconfont icon-chuangjian" }, null, -1)), createTextVNode(" " + toDisplayString(unref($t)("sys.newCategory")), 1)]),
167
+ _: 1
168
+ }, 8, ["class"])) : createCommentVNode("", true)], 2)) : createCommentVNode("", true),
169
+ createElementVNode("div", { class: normalizeClass([unref(ns).e("search-container")]) }, [createVNode(_component_a_input, {
170
+ value: searchKey.value,
171
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => searchKey.value = $event),
172
+ class: normalizeClass([unref(ns).e("search-input")]),
173
+ placeholder: unref(t)("sys.onlineForm.searchCategory"),
174
+ "allow-clear": ""
175
+ }, {
176
+ prefix: withCtx(() => [..._cache[4] || (_cache[4] = [createElementVNode("i", { class: "iconfont icon-sousuo1" }, null, -1)])]),
177
+ _: 1
178
+ }, 8, [
179
+ "value",
180
+ "class",
181
+ "placeholder"
182
+ ])], 2),
183
+ createElementVNode("div", { class: normalizeClass([unref(ns).e("tree-container")]) }, [treeData.value.length ? (openBlock(), createBlock(unref(TreeEx), {
184
+ key: 0,
185
+ ref_key: "treeExRef",
186
+ ref: treeExRef,
187
+ "selected-keys": selectedKeys.value,
188
+ "onUpdate:selectedKeys": _cache[1] || (_cache[1] = ($event) => selectedKeys.value = $event),
189
+ "expanded-keys": selfExpandedKeys.value,
190
+ "onUpdate:expandedKeys": _cache[2] || (_cache[2] = ($event) => selfExpandedKeys.value = $event),
191
+ class: normalizeClass([unref(ns).e("tree"), __props.draggable && "draggable-tree"]),
192
+ draggable: __props.draggable,
193
+ data: treeData.value,
194
+ "last-selection-locked": "",
195
+ filter: searchKey.value ? searchKey.value.trim() : "",
196
+ "ignore-case": __props.ignoreCase,
197
+ onDrop,
198
+ onSelect: handleSelect
199
+ }, {
200
+ title: withCtx(({ node }) => [createElementVNode("div", { class: normalizeClass([unref(ns).b("tree-node"), unref(ns).is("highlight", highlightId.value === node.key)]) }, [createElementVNode("span", {
201
+ class: normalizeClass([unref(ns).be("tree-node", "title")]),
202
+ title: node.title
203
+ }, toDisplayString(node.title), 11, _hoisted_1), !__props.readonly && (__props.hasPerBtns.includes(unref(BasicAction).Update) || __props.hasPerBtns.includes(unref(BasicAction).Delete)) ? (openBlock(), createBlock(_component_a_dropdown, {
204
+ key: 0,
205
+ class: normalizeClass([unref(ns).be("tree-node", "more")]),
206
+ onVisibleChange: ($event) => onMenuVisibleChange($event, node.key)
207
+ }, {
208
+ overlay: withCtx(() => [createVNode(_component_a_menu, {
209
+ style: { "width": "102px" },
210
+ onClick: ($event) => onTreeMenuClick(node, $event)
211
+ }, {
212
+ default: withCtx(() => [__props.hasPerBtns.includes(unref(BasicAction).Update) ? (openBlock(), createBlock(_component_a_menu_item, { key: MenuClickEvent.EDIT }, {
213
+ default: withCtx(() => [createTextVNode(toDisplayString(unref($t)("sys.component.dataConnection.rename")), 1)]),
214
+ _: 1
215
+ })) : createCommentVNode("", true), __props.hasPerBtns.includes(unref(BasicAction).Delete) ? (openBlock(), createBlock(_component_a_menu_item, { key: MenuClickEvent.DELETE }, {
216
+ default: withCtx(() => [createTextVNode(toDisplayString(unref($t)("sys.delText")), 1)]),
217
+ _: 1
218
+ })) : createCommentVNode("", true)]),
219
+ _: 1
220
+ }, 8, ["onClick"])]),
221
+ default: withCtx(() => [createVNode(_component_ellipsis_outlined)]),
222
+ _: 2
223
+ }, 1032, ["class", "onVisibleChange"])) : createCommentVNode("", true)], 2)]),
224
+ _: 1
225
+ }, 8, [
226
+ "selected-keys",
227
+ "expanded-keys",
228
+ "class",
229
+ "draggable",
230
+ "data",
231
+ "filter",
232
+ "ignore-case"
233
+ ])) : createCommentVNode("", true)], 2)
234
+ ], 2);
235
+ };
236
+ }
237
+ });
238
+ //#endregion
239
+ export { category_sider_vue_vue_type_script_setup_true_name_category_sider_lang_default as default };