cnhis-design-vue 3.1.50-release.0 → 3.1.50-release.1
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.
- package/README.md +87 -87
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/card-reader-sdk/src/cardReaderSDK.d.ts +1 -0
- package/es/components/card-reader-sdk/src/cardReaderSDK.js +1 -1
- package/es/components/card-reader-sdk/src/insuranceSDK.js +1 -1
- package/es/components/card-reader-sdk/src/types/index.d.ts +1 -1
- package/es/components/card-reader-sdk/src/utils/index.d.ts +0 -3
- package/es/components/card-reader-sdk/src/utils/index.js +1 -1
- package/es/components/classification/index.d.ts +3 -1
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +3 -1
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +3 -1
- package/es/components/classification/src/index.vue.d.ts +3 -1
- package/es/components/expand-field/src/components/form.vue2.js +1 -1
- package/es/components/expand-field/src/index.vue2.js +1 -1
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/index.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +3 -0
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/useEvent.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/useEvent.js +1 -1
- package/es/components/field-set/src/FieldSet.vue2.js +1 -1
- package/es/components/form-config/index.d.ts +243 -56
- package/es/components/form-config/src/FormConfig.vue.d.ts +243 -56
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +106 -19
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +121 -28
- package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
- package/es/components/form-render/index.d.ts +106 -19
- package/es/components/form-render/src/FormRender.vue.d.ts +106 -19
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +106 -19
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
- package/es/components/form-render/src/components/renderer/searchCascade.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +12 -0
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +2 -5
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +173 -4
- package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
- package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +2 -2
- package/es/components/form-render/src/hooks/useFormAsyncQueue.js +1 -1
- package/es/components/form-render/src/hooks/useFormContext.js +1 -1
- package/es/components/form-render/src/hooks/useFormRenderLifeCycle.d.ts +6 -6
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/hooks/useLowCodeReactions.d.ts +1 -1
- package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +1 -0
- package/es/components/form-render/src/types/index.d.ts +6 -3
- package/es/components/form-render/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +26 -0
- package/es/components/iho-table/index.js +1 -1
- package/es/components/iho-table/src/IhoTable.vue.d.ts +26 -0
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +3 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +297 -3
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +17 -4
- package/es/components/iho-table/src/utils/index.d.ts +1 -1
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/iho-table/src/utils/separateMap.d.ts +5 -0
- package/es/components/iho-table/src/utils/separateMap.js +1 -0
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +314 -53
- package/es/components/info-header/src/InfoHeader.vue.d.ts +314 -53
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +86 -3
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +86 -3
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +192 -22
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +106 -19
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/search-cascader/index.d.ts +4 -0
- package/es/components/search-cascader/src/SearchCascader.vue.d.ts +4 -0
- package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
- package/es/components/shortcut-setter/index.d.ts +107 -19
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +107 -19
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +3 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +2 -0
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +2 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +3 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +28 -0
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/CancelRadio/CancelRadio.d.ts +10 -0
- package/es/shared/components/CancelRadio/CancelRadio.js +1 -0
- package/es/shared/components/CancelRadio/index.d.ts +2 -0
- package/es/shared/components/CancelRadio/index.js +1 -0
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/business.d.ts +3 -1
- package/es/shared/utils/business.js +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/index.js +1 -1
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSProperties, PropType
|
|
1
|
+
import { CSSProperties, PropType } from 'vue';
|
|
2
2
|
import { VxeColumnPropTypes, VxeTableConstructor, VxeTableMethods, VxeTablePrivateMethods } from 'vxe-table';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
payload: {
|
|
@@ -13,6 +13,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13
13
|
};
|
|
14
14
|
}>> & {}>>;
|
|
15
15
|
$table: (VxeTableConstructor & VxeTablePrivateMethods & VxeTableMethods) | undefined;
|
|
16
|
+
multipleRef: import("vue").ComputedRef<boolean>;
|
|
16
17
|
optionsRef: import("vue").ComputedRef<import("vxe-table").VxeTableDefines.FilterOption[] & VxeColumnPropTypes.Filter[]>;
|
|
17
18
|
checkedRef: import("vue").WritableComputedRef<string[]>;
|
|
18
19
|
checkedCacheRef: import("vue").Ref<string[]>;
|
|
@@ -39,8 +40,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
39
40
|
checkAll: import("vue").WritableComputedRef<boolean>;
|
|
40
41
|
indeterminate: import("vue").ComputedRef<boolean>;
|
|
41
42
|
containerStyleWithHeight: import("vue").ComputedRef<CSSProperties>;
|
|
42
|
-
|
|
43
|
+
conform: () => void;
|
|
43
44
|
reset: () => void;
|
|
45
|
+
CancelRadio: import("vue").DefineComponent<{
|
|
46
|
+
currentValue: {};
|
|
47
|
+
cancelable: BooleanConstructor;
|
|
48
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
49
|
+
currentValue: {};
|
|
50
|
+
cancelable: BooleanConstructor;
|
|
51
|
+
}>>, {
|
|
52
|
+
cancelable: boolean;
|
|
53
|
+
}>;
|
|
44
54
|
NButton: any;
|
|
45
55
|
NButtonGroup: any;
|
|
46
56
|
NCheckbox: any;
|
|
@@ -95,7 +105,291 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
95
105
|
readonly defaultValue: (string | number)[] | null;
|
|
96
106
|
}>;
|
|
97
107
|
NInput: any;
|
|
98
|
-
|
|
108
|
+
NRadioGroup: import("vue").DefineComponent<{
|
|
109
|
+
readonly name: StringConstructor;
|
|
110
|
+
readonly value: PropType<string | number | boolean | null>;
|
|
111
|
+
readonly defaultValue: {
|
|
112
|
+
readonly type: PropType<string | number | boolean | null>;
|
|
113
|
+
readonly default: null;
|
|
114
|
+
};
|
|
115
|
+
readonly size: PropType<"small" | "medium" | "large">;
|
|
116
|
+
readonly disabled: {
|
|
117
|
+
readonly type: PropType<boolean | undefined>;
|
|
118
|
+
readonly default: undefined;
|
|
119
|
+
};
|
|
120
|
+
readonly 'onUpdate:value': PropType<import("naive-ui/es/_utils").MaybeArray<import("naive-ui/es/radio/src/interface").OnUpdateValue>>;
|
|
121
|
+
readonly onUpdateValue: PropType<import("naive-ui/es/_utils").MaybeArray<import("naive-ui/es/radio/src/interface").OnUpdateValue>>;
|
|
122
|
+
readonly theme: PropType<import("naive-ui/es/_mixins").Theme<"Radio", {
|
|
123
|
+
labelLineHeight: string;
|
|
124
|
+
buttonHeightSmall: string;
|
|
125
|
+
buttonHeightMedium: string;
|
|
126
|
+
buttonHeightLarge: string;
|
|
127
|
+
fontSizeSmall: string;
|
|
128
|
+
fontSizeMedium: string;
|
|
129
|
+
fontSizeLarge: string;
|
|
130
|
+
boxShadow: string;
|
|
131
|
+
boxShadowActive: string;
|
|
132
|
+
boxShadowFocus: string;
|
|
133
|
+
boxShadowHover: string;
|
|
134
|
+
boxShadowDisabled: string;
|
|
135
|
+
color: string;
|
|
136
|
+
colorDisabled: string;
|
|
137
|
+
colorActive: string;
|
|
138
|
+
textColor: string;
|
|
139
|
+
textColorDisabled: string;
|
|
140
|
+
dotColorActive: string;
|
|
141
|
+
dotColorDisabled: string;
|
|
142
|
+
buttonBorderColor: string;
|
|
143
|
+
buttonBorderColorActive: string;
|
|
144
|
+
buttonBorderColorHover: string;
|
|
145
|
+
buttonColor: string;
|
|
146
|
+
buttonColorActive: string;
|
|
147
|
+
buttonTextColor: string;
|
|
148
|
+
buttonTextColorActive: string;
|
|
149
|
+
buttonTextColorHover: string;
|
|
150
|
+
opacityDisabled: string;
|
|
151
|
+
buttonBoxShadowFocus: string;
|
|
152
|
+
buttonBoxShadowHover: string;
|
|
153
|
+
buttonBoxShadow: string;
|
|
154
|
+
buttonBorderRadius: string;
|
|
155
|
+
radioSizeSmall: string;
|
|
156
|
+
radioSizeMedium: string;
|
|
157
|
+
radioSizeLarge: string;
|
|
158
|
+
labelPadding: string;
|
|
159
|
+
}, any>>;
|
|
160
|
+
readonly themeOverrides: PropType<import("naive-ui/es/_mixins/use-theme").ExtractThemeOverrides<import("naive-ui/es/_mixins").Theme<"Radio", {
|
|
161
|
+
labelLineHeight: string;
|
|
162
|
+
buttonHeightSmall: string;
|
|
163
|
+
buttonHeightMedium: string;
|
|
164
|
+
buttonHeightLarge: string;
|
|
165
|
+
fontSizeSmall: string;
|
|
166
|
+
fontSizeMedium: string;
|
|
167
|
+
fontSizeLarge: string;
|
|
168
|
+
boxShadow: string;
|
|
169
|
+
boxShadowActive: string;
|
|
170
|
+
boxShadowFocus: string;
|
|
171
|
+
boxShadowHover: string;
|
|
172
|
+
boxShadowDisabled: string;
|
|
173
|
+
color: string;
|
|
174
|
+
colorDisabled: string;
|
|
175
|
+
colorActive: string;
|
|
176
|
+
textColor: string;
|
|
177
|
+
textColorDisabled: string;
|
|
178
|
+
dotColorActive: string;
|
|
179
|
+
dotColorDisabled: string;
|
|
180
|
+
buttonBorderColor: string;
|
|
181
|
+
buttonBorderColorActive: string;
|
|
182
|
+
buttonBorderColorHover: string;
|
|
183
|
+
buttonColor: string;
|
|
184
|
+
buttonColorActive: string;
|
|
185
|
+
buttonTextColor: string;
|
|
186
|
+
buttonTextColorActive: string;
|
|
187
|
+
buttonTextColorHover: string;
|
|
188
|
+
opacityDisabled: string;
|
|
189
|
+
buttonBoxShadowFocus: string;
|
|
190
|
+
buttonBoxShadowHover: string;
|
|
191
|
+
buttonBoxShadow: string;
|
|
192
|
+
buttonBorderRadius: string;
|
|
193
|
+
radioSizeSmall: string;
|
|
194
|
+
radioSizeMedium: string;
|
|
195
|
+
radioSizeLarge: string;
|
|
196
|
+
labelPadding: string;
|
|
197
|
+
}, any>>>;
|
|
198
|
+
readonly builtinThemeOverrides: PropType<import("naive-ui/es/_mixins/use-theme").ExtractThemeOverrides<import("naive-ui/es/_mixins").Theme<"Radio", {
|
|
199
|
+
labelLineHeight: string;
|
|
200
|
+
buttonHeightSmall: string;
|
|
201
|
+
buttonHeightMedium: string;
|
|
202
|
+
buttonHeightLarge: string;
|
|
203
|
+
fontSizeSmall: string;
|
|
204
|
+
fontSizeMedium: string;
|
|
205
|
+
fontSizeLarge: string;
|
|
206
|
+
boxShadow: string;
|
|
207
|
+
boxShadowActive: string;
|
|
208
|
+
boxShadowFocus: string;
|
|
209
|
+
boxShadowHover: string;
|
|
210
|
+
boxShadowDisabled: string;
|
|
211
|
+
color: string;
|
|
212
|
+
colorDisabled: string;
|
|
213
|
+
colorActive: string;
|
|
214
|
+
textColor: string;
|
|
215
|
+
textColorDisabled: string;
|
|
216
|
+
dotColorActive: string;
|
|
217
|
+
dotColorDisabled: string;
|
|
218
|
+
buttonBorderColor: string;
|
|
219
|
+
buttonBorderColorActive: string;
|
|
220
|
+
buttonBorderColorHover: string;
|
|
221
|
+
buttonColor: string;
|
|
222
|
+
buttonColorActive: string;
|
|
223
|
+
buttonTextColor: string;
|
|
224
|
+
buttonTextColorActive: string;
|
|
225
|
+
buttonTextColorHover: string;
|
|
226
|
+
opacityDisabled: string;
|
|
227
|
+
buttonBoxShadowFocus: string;
|
|
228
|
+
buttonBoxShadowHover: string;
|
|
229
|
+
buttonBoxShadow: string;
|
|
230
|
+
buttonBorderRadius: string;
|
|
231
|
+
radioSizeSmall: string;
|
|
232
|
+
radioSizeMedium: string;
|
|
233
|
+
radioSizeLarge: string;
|
|
234
|
+
labelPadding: string;
|
|
235
|
+
}, any>>>;
|
|
236
|
+
}, {
|
|
237
|
+
selfElRef: import("vue").Ref<HTMLDivElement | null>;
|
|
238
|
+
rtlEnabled: import("vue").Ref<import("naive-ui/es/config-provider/src/internal-interface").RtlItem | undefined> | undefined;
|
|
239
|
+
mergedClsPrefix: import("vue").ComputedRef<string>;
|
|
240
|
+
mergedValue: import("vue").ComputedRef<string | number | boolean | null>;
|
|
241
|
+
handleFocusout: (e: FocusEvent) => void;
|
|
242
|
+
handleFocusin: (e: FocusEvent) => void;
|
|
243
|
+
cssVars: import("vue").ComputedRef<{
|
|
244
|
+
'--n-font-size': string;
|
|
245
|
+
'--n-bezier': string;
|
|
246
|
+
'--n-button-border-color': string;
|
|
247
|
+
'--n-button-border-color-active': string;
|
|
248
|
+
'--n-button-border-radius': string;
|
|
249
|
+
'--n-button-box-shadow': string;
|
|
250
|
+
'--n-button-box-shadow-focus': string;
|
|
251
|
+
'--n-button-box-shadow-hover': string;
|
|
252
|
+
'--n-button-color-active': string;
|
|
253
|
+
'--n-button-text-color': string;
|
|
254
|
+
'--n-button-text-color-hover': string;
|
|
255
|
+
'--n-button-text-color-active': string;
|
|
256
|
+
'--n-height': string;
|
|
257
|
+
'--n-opacity-disabled': string;
|
|
258
|
+
}> | undefined;
|
|
259
|
+
themeClass: import("vue").Ref<string> | undefined;
|
|
260
|
+
onRender: (() => void) | undefined;
|
|
261
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
262
|
+
readonly name: StringConstructor;
|
|
263
|
+
readonly value: PropType<string | number | boolean | null>;
|
|
264
|
+
readonly defaultValue: {
|
|
265
|
+
readonly type: PropType<string | number | boolean | null>;
|
|
266
|
+
readonly default: null;
|
|
267
|
+
};
|
|
268
|
+
readonly size: PropType<"small" | "medium" | "large">;
|
|
269
|
+
readonly disabled: {
|
|
270
|
+
readonly type: PropType<boolean | undefined>;
|
|
271
|
+
readonly default: undefined;
|
|
272
|
+
};
|
|
273
|
+
readonly 'onUpdate:value': PropType<import("naive-ui/es/_utils").MaybeArray<import("naive-ui/es/radio/src/interface").OnUpdateValue>>;
|
|
274
|
+
readonly onUpdateValue: PropType<import("naive-ui/es/_utils").MaybeArray<import("naive-ui/es/radio/src/interface").OnUpdateValue>>;
|
|
275
|
+
readonly theme: PropType<import("naive-ui/es/_mixins").Theme<"Radio", {
|
|
276
|
+
labelLineHeight: string;
|
|
277
|
+
buttonHeightSmall: string;
|
|
278
|
+
buttonHeightMedium: string;
|
|
279
|
+
buttonHeightLarge: string;
|
|
280
|
+
fontSizeSmall: string;
|
|
281
|
+
fontSizeMedium: string;
|
|
282
|
+
fontSizeLarge: string;
|
|
283
|
+
boxShadow: string;
|
|
284
|
+
boxShadowActive: string;
|
|
285
|
+
boxShadowFocus: string;
|
|
286
|
+
boxShadowHover: string;
|
|
287
|
+
boxShadowDisabled: string;
|
|
288
|
+
color: string;
|
|
289
|
+
colorDisabled: string;
|
|
290
|
+
colorActive: string;
|
|
291
|
+
textColor: string;
|
|
292
|
+
textColorDisabled: string;
|
|
293
|
+
dotColorActive: string;
|
|
294
|
+
dotColorDisabled: string;
|
|
295
|
+
buttonBorderColor: string;
|
|
296
|
+
buttonBorderColorActive: string;
|
|
297
|
+
buttonBorderColorHover: string;
|
|
298
|
+
buttonColor: string;
|
|
299
|
+
buttonColorActive: string;
|
|
300
|
+
buttonTextColor: string;
|
|
301
|
+
buttonTextColorActive: string;
|
|
302
|
+
buttonTextColorHover: string;
|
|
303
|
+
opacityDisabled: string;
|
|
304
|
+
buttonBoxShadowFocus: string;
|
|
305
|
+
buttonBoxShadowHover: string;
|
|
306
|
+
buttonBoxShadow: string;
|
|
307
|
+
buttonBorderRadius: string;
|
|
308
|
+
radioSizeSmall: string;
|
|
309
|
+
radioSizeMedium: string;
|
|
310
|
+
radioSizeLarge: string;
|
|
311
|
+
labelPadding: string;
|
|
312
|
+
}, any>>;
|
|
313
|
+
readonly themeOverrides: PropType<import("naive-ui/es/_mixins/use-theme").ExtractThemeOverrides<import("naive-ui/es/_mixins").Theme<"Radio", {
|
|
314
|
+
labelLineHeight: string;
|
|
315
|
+
buttonHeightSmall: string;
|
|
316
|
+
buttonHeightMedium: string;
|
|
317
|
+
buttonHeightLarge: string;
|
|
318
|
+
fontSizeSmall: string;
|
|
319
|
+
fontSizeMedium: string;
|
|
320
|
+
fontSizeLarge: string;
|
|
321
|
+
boxShadow: string;
|
|
322
|
+
boxShadowActive: string;
|
|
323
|
+
boxShadowFocus: string;
|
|
324
|
+
boxShadowHover: string;
|
|
325
|
+
boxShadowDisabled: string;
|
|
326
|
+
color: string;
|
|
327
|
+
colorDisabled: string;
|
|
328
|
+
colorActive: string;
|
|
329
|
+
textColor: string;
|
|
330
|
+
textColorDisabled: string;
|
|
331
|
+
dotColorActive: string;
|
|
332
|
+
dotColorDisabled: string;
|
|
333
|
+
buttonBorderColor: string;
|
|
334
|
+
buttonBorderColorActive: string;
|
|
335
|
+
buttonBorderColorHover: string;
|
|
336
|
+
buttonColor: string;
|
|
337
|
+
buttonColorActive: string;
|
|
338
|
+
buttonTextColor: string;
|
|
339
|
+
buttonTextColorActive: string;
|
|
340
|
+
buttonTextColorHover: string;
|
|
341
|
+
opacityDisabled: string;
|
|
342
|
+
buttonBoxShadowFocus: string;
|
|
343
|
+
buttonBoxShadowHover: string;
|
|
344
|
+
buttonBoxShadow: string;
|
|
345
|
+
buttonBorderRadius: string;
|
|
346
|
+
radioSizeSmall: string;
|
|
347
|
+
radioSizeMedium: string;
|
|
348
|
+
radioSizeLarge: string;
|
|
349
|
+
labelPadding: string;
|
|
350
|
+
}, any>>>;
|
|
351
|
+
readonly builtinThemeOverrides: PropType<import("naive-ui/es/_mixins/use-theme").ExtractThemeOverrides<import("naive-ui/es/_mixins").Theme<"Radio", {
|
|
352
|
+
labelLineHeight: string;
|
|
353
|
+
buttonHeightSmall: string;
|
|
354
|
+
buttonHeightMedium: string;
|
|
355
|
+
buttonHeightLarge: string;
|
|
356
|
+
fontSizeSmall: string;
|
|
357
|
+
fontSizeMedium: string;
|
|
358
|
+
fontSizeLarge: string;
|
|
359
|
+
boxShadow: string;
|
|
360
|
+
boxShadowActive: string;
|
|
361
|
+
boxShadowFocus: string;
|
|
362
|
+
boxShadowHover: string;
|
|
363
|
+
boxShadowDisabled: string;
|
|
364
|
+
color: string;
|
|
365
|
+
colorDisabled: string;
|
|
366
|
+
colorActive: string;
|
|
367
|
+
textColor: string;
|
|
368
|
+
textColorDisabled: string;
|
|
369
|
+
dotColorActive: string;
|
|
370
|
+
dotColorDisabled: string;
|
|
371
|
+
buttonBorderColor: string;
|
|
372
|
+
buttonBorderColorActive: string;
|
|
373
|
+
buttonBorderColorHover: string;
|
|
374
|
+
buttonColor: string;
|
|
375
|
+
buttonColorActive: string;
|
|
376
|
+
buttonTextColor: string;
|
|
377
|
+
buttonTextColorActive: string;
|
|
378
|
+
buttonTextColorHover: string;
|
|
379
|
+
opacityDisabled: string;
|
|
380
|
+
buttonBoxShadowFocus: string;
|
|
381
|
+
buttonBoxShadowHover: string;
|
|
382
|
+
buttonBoxShadow: string;
|
|
383
|
+
buttonBorderRadius: string;
|
|
384
|
+
radioSizeSmall: string;
|
|
385
|
+
radioSizeMedium: string;
|
|
386
|
+
radioSizeLarge: string;
|
|
387
|
+
labelPadding: string;
|
|
388
|
+
}, any>>>;
|
|
389
|
+
}>>, {
|
|
390
|
+
readonly disabled: boolean | undefined;
|
|
391
|
+
readonly defaultValue: string | number | boolean | null;
|
|
392
|
+
}>;
|
|
99
393
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
100
394
|
payload: {
|
|
101
395
|
type: PropType<VxeColumnPropTypes.FilterSlotParams>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,inject as l,computed as a,ref as t,onDeactivated as u,openBlock as
|
|
1
|
+
import{defineComponent as e,inject as l,computed as a,ref as t,onDeactivated as u,openBlock as i,createElementBlock as r,unref as n,createBlock as o,createCommentVNode as v,createElementVNode as c,createVNode as s,isRef as d,withCtx as p,mergeProps as f,normalizeProps as h,guardReactiveProps as m,Fragment as _,renderList as y,toDisplayString as b,createTextVNode as k,normalizeStyle as g}from"vue";import C from"../../../../../shared/components/CancelRadio/CancelRadio.js";import{keywordMatcher as L,widthAppend as I}from"../../../../../shared/utils/index.js";import{useVirtualList as D}from"@vueuse/core";import{isNumber as x,isString as U,isEqual as S}from"lodash-es";import{NInput as W,NCheckbox as Y,NCheckboxGroup as j,NRadioGroup as w,NButtonGroup as E,NButton as F}from"naive-ui";const R={class:"iho-table__filterWrapper"},$={key:1,class:"iho-table__filterCheckAllWrapper"},O={class:"iho-table__filterListItem"},P={class:"iho-table__filterListItem"},V=["title"],q=["title"],z={class:"iho-table__filterListItemContent"},A={class:"iho-table__filterFooter"};var H=e({__name:"filter",props:{payload:{type:Object,required:!0}},setup(e){const H=e,M=l("$xetable"),B=a((()=>{var e;return!!(null==(e=H.payload)?void 0:e.column.filterMultiple)})),G=a((()=>{var e,l,a;return null!=(a=null==(l=null==(e=H.payload)?void 0:e.column)?void 0:l.filters)?a:[]})),J=a({get:()=>G.value.reduce(((e,l)=>(l.checked&&e.push(l.value),e)),[]),set(e){if(!H.payload||!M)return;const l=M.reactData.filterStore.options||[];B.value?(l.forEach((l=>l._checked=e.includes(l.value))),M.checkFilterOptions()):l.forEach((l=>l._checked=l.value===e[0]));const{startIndex:a,endIndex:t}=M.internalData.scrollYStore;if(0===a&&1===t||M.reactData.scrollYLoad)return u();function u(){H.payload.$panel.confirmFilter(new CustomEvent("click"))}M.reactData.scrollYLoad=!0,u(),M.reactData.scrollYLoad=!1}}),K=t([...J.value]),N=t("");function Q(){M&&(M.reactData.filterStore.visible=!1)}u(Q);const T=a((()=>{var e,l;if(!H.payload||!H.payload.column)return 10;const{filterCapacity:a}=null!=(l=null==(e=H.payload.column.editRender)?void 0:e.props)?l:{};return x(a)&&a>0?a:10})),X=a((()=>N.value?G.value.filter((e=>!!`${e.label}`.includes(N.value)||(U(e.data)?L(N.value,e.data):void 0))):G.value)),{list:Z,containerProps:ee,wrapperProps:le}=D(X,{itemHeight:32,overscan:3}),ae=a({get:()=>X.value.every((e=>K.value.includes(e.value))),set(e){K.value=e?[...new Set([...K.value,...X.value.map((e=>e.value))])]:K.value.filter((e=>X.value.every((l=>l.value!==e))))}}),te=a((()=>X.value.some((e=>K.value.includes(e.value)))&&!ae.value)),ue=a({get:()=>K.value.length===G.value.length&&0!==G.value.length,set:e=>{K.value=e?G.value.map((e=>e.value)):[]}}),ie=a((()=>!!K.value.length&&!ue.value)),re=a((()=>({height:I(32*T.value)})));function ne(){J.value=B.value?K.value:S(K.value[0],null)?[]:[K.value[0]],Q()}function oe(){K.value=B.value?[]:[null]}return(e,l)=>(i(),r("section",R,[n(G).length>5?(i(),o(n(W),{key:0,value:N.value,"onUpdate:value":l[0]||(l[0]=e=>N.value=e)},null,8,["value"])):v("v-if",!0),n(B)?(i(),r("div",$,[c("div",O,[s(n(Y),{label:"全选当前",checked:n(ae),"onUpdate:checked":l[1]||(l[1]=e=>d(ae)?ae.value=e:null),indeterminate:n(te)},null,8,["checked","indeterminate"])]),c("div",P,[s(n(Y),{label:"全选所有",checked:n(ue),"onUpdate:checked":l[2]||(l[2]=e=>d(ue)?ue.value=e:null),indeterminate:n(ie)},null,8,["checked","indeterminate"])])])):v("v-if",!0),n(B)?(i(),o(n(j),{key:2,value:K.value,"onUpdate:value":l[3]||(l[3]=e=>K.value=e)},{default:p((()=>[c("section",f(n(ee),{style:n(re),class:"iho-table__filterListWrapper"}),[c("section",h(m(n(le))),[(i(!0),r(_,null,y(n(Z),(e=>(i(),r("div",{class:"iho-table__filterListItem",key:e.data.value},[s(n(Y),{value:e.data.value},{default:p((()=>[c("div",{class:"iho-table__filterListItemContent",title:e.data.label},b(e.data.label),9,V)])),_:2},1032,["value"])])))),128))],16)],16)])),_:1},8,["value"])):(i(),o(n(w),{key:3,value:K.value[0],"onUpdate:value":l[5]||(l[5]=e=>K.value[0]=e)},{default:p((()=>[c("section",f(n(ee),{style:n(re),class:"iho-table__filterListWrapper"}),[c("section",h(m(n(le))),[(i(!0),r(_,null,y(n(Z),(e=>(i(),r("div",{class:"iho-table__filterListItem",key:e.data.value,title:e.data.label},[s(n(C),{value:e.data.value,currentValue:K.value[0],cancelable:"",onCancel:l[4]||(l[4]=e=>K.value=[null])},{default:p((()=>[c("div",z,b(e.data.label),1)])),_:2},1032,["value","currentValue"])],8,q)))),128))],16)],16)])),_:1},8,["value"])),c("footer",A,[c("section",null,[n(B)?(i(),r(_,{key:0},[k(" 已选择 "),c("span",{style:g({color:"var(--c-primary-color)"})},b(K.value.length),5),k(" 项 ")],64)):v("v-if",!0)]),s(n(E),{size:"small"},{default:p((()=>[s(n(F),{onClick:oe},{default:p((()=>[k("清空")])),_:1}),s(n(F),{onClick:Q},{default:p((()=>[k("取消")])),_:1}),s(n(F),{type:"primary",onClick:ne},{default:p((()=>[k("确定")])),_:1})])),_:1})])]))}});export{H as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as e,nextTick as l}from"vue";import{jsonParse as
|
|
1
|
+
import{createVNode as e,nextTick as l}from"vue";import{jsonParse as t,traverse as i,arrayed as r}from"../../../../../shared/utils/index.js";import{isObject as n}from"@vue/shared";import{isArray as o,isString as u,first as s}from"lodash-es";import"../../../index.js";import{IhoTableRenderHelper as d,isCompatibleColumn as a,parseRichContent as f}from"../../utils/index.js";import c from"./filter.vue.js";import{defineTablePlugin as v}from"../../hooks/useTablePlugin.js";function p(){const p="filterRenderPlugin";return v({name:p,vxe(l){l.renderer.mixin({[p]:{showFilterFooter:!1,renderFilter:(l,t)=>e(c,{payload:t,key:t.column.field},null)}})},apply(e){let c=[];e.fieldHooks.field.tap(p,((e,l,i,{$table:r})=>{var c,v,m,h,g,b,k,y;const x=null==(c=e.editRender)?void 0:c.props;if(!n(x))return e;if(!d.hasFilter(x))return e;e.editRender={...e.editRender,props:{...null==(v=e.editRender)?void 0:v.props,sortable:e.sortable}},e.filterRender={name:p};const C=null==(m=r.value)?void 0:m.getColumnByField(e.field),F={};let R;if(C&&o(C.filters)&&C.filters.forEach((e=>{e&&(F[`${e.label}_${e.value}`]=e.checked)})),a(x))R=null!=(h=x.options)?h:[];else{R=null!=(k=null==(b=null==(g=(n(x.fieldSetting)?x.fieldSetting:u(x.fieldSetting)?t(x.fieldSetting||""):{}).mapping)?void 0:g.mappingFiled)?void 0:b.reduce(((e,l)=>{var t;const i=s(l.value);return n(i)&&e.push({label:i.key,value:i.value,data:null!=(t=i.keyword)?t:i.value}),e}),[]))?k:[]}if(e.filters=R.reduce(((e,l)=>(n(l)&&e.push({...l,checked:!!F[`${l.label}_${l.value}`]}),e)),[]),!e.filterMethod){const l=null==(y=i.treeConfig)?void 0:y.children;e.filterMethod=function({option:e,column:t,row:i}){if(l&&o(i[l])&&i[l].length)return!1;const r=i[t.field];if(!u(r))return!1;if(r===e.value||r===e.label)return!0;const{value:n,change_text:s}=f(r);return s===e.label||n===e.value}}return i.filterConfig={iconMatch:"iho-table--iconfont iho-table-icon-filter",iconNone:"iho-table--iconfont iho-table-icon-filter",...i.filterConfig},e})),e.fieldHooks.fieldList.tap(p,(e=>c=e)),e.fieldHooks.fieldEnd.tapPromise(p,(async(e,{$table:t})=>{var r;try{if(await l(),!t.value)return;const o=null!=(r=t.value.getColumns())?r:[],u=[];if(i(c,(e=>{o.find((l=>l.field===e.field))||u.push(e)})),!u.length)return;setTimeout((()=>{var l,i;if(null==(l=e.sortConfig)?void 0:l.multiple){const e=null!=(i=t.value.getColumns())?i:[],l=u.concat(e).reduce(((e,l)=>{var t;const i=null==(t=l.editRender)?void 0:t.props;return n(i)&&m(i.isOrder)&&e.push({field:l.field,order:i.isOrder}),e}),[]);t.value.sort(l)}else u.reverse().some((e=>{var l;const i=null==(l=e.editRender)?void 0:l.props;if(n(i)&&m(i.isOrder))return e&&t.value.sort(e.field,i.isOrder),!0}))}),100)}finally{c=[]}})),e.exposeHooks.expose.tap(p,((e,l,{$table:t})=>(Object.assign(e,{setSort(e,l){t.value&&t.value.sort(e,l)},setFilter(e,l){if(!t.value)return;const i=t.value.getColumnByField(e);if(!i||!o(i.filters))return;const n=r(l);i.filters.forEach((e=>{e.checked=n.includes(e.value)})),t.value.updateData()}}),e)))}})}function m(e){return["asc","desc",null].includes(e)}export{p as filterRenderPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{unref as e}from"vue";import{promiseTimeout as
|
|
1
|
+
import{unref as e}from"vue";import{promiseTimeout as t}from"@vueuse/shared";import"../../../index.js";import{useSessionStorage as n}from"@vueuse/core";import{isString as o,trim as l,isEmpty as i,isEqual as r,isFunction as u}from"lodash-es";import{selectOptionsMap as d}from"../rendererPlugins/editableWidgets/hooks/useSelectOption.js";import{IhoTableUtils as a}from"../../utils/index.js";import{EDITABLE_WIDGET_TYPE as s}from"../../constants/index.js";import{parse as c,isValid as p,compareDesc as f}from"date-fns";import{defineTablePlugin as m}from"../../hooks/useTablePlugin.js";function v(){const v="keyboardEventPlugin",g=n("ihoTableClipData","");return m({name:v,apply(n){function m(t,n,m,v,w){var b,C;if(!(null==(b=null==m?void 0:m.keyboardConfig)?void 0:b.isClip))return;if("paste"===t&&!n.getSelectedCell())return;const{row:y,column:R}=n.getSelectedCell()||n.getEditRecord()||{};if(!y||!R||!E(R,s.SELECT)&&e(g)===y[R.field])return;const x=m.uuid&&E(R,s.SELECT)&&d.get(m.uuid)[R.field],T=y[R.field];if("copy"===t){const e=(null==(C=(x||[]).filter((e=>T.includes(e.value))))?void 0:C.map((e=>e.label)).join(","))||T;g.value=e}else{if(o(e(g))&&(g.value=l(e(g)||"")),!e(g)||!function(e){var t;const n=null==(t=e.editRender)?void 0:t.props;return n&&Object.keys(s).includes(a.getCellType(n))}(R)||y.$__SEPARATE||!function(e,t,n,o){var l,i;const{beforeEditMethod:r}=t.editConfig||{},d={rowIndex:null!=(l=e.getRowIndex(n))?l:0,columnIndex:null!=(i=e.getColumnIndex(o))?i:0};return!r||u(r)&&r({row:n,column:o,...d,$table:e,$grid:void 0})}(n,m,y,R))return;if(E(R,s.DATE)&&function(t,n){var l;const i=null==(l=t.editRender)?void 0:l.props,r=e(g)||"";return!p(new Date(r))||o(i.connectField)&&n[i.connectField]&&(i.isStartDate&&f(new Date(r),new Date(n[i.connectField]))<0||i.isEndDate&&f(new Date(r),new Date(n[i.connectField]))>0)}(R,y))return;if(E(R,s.NUMBER)&&!/^-?\d*\.?\d+$/.test((e(g)||"").toString()))return;if(E(R,s.TIME)&&function(t){var n,o;const l=e(g)||"",i=null==(n=t.editRender)?void 0:n.props,r=c(l,(null==(o=null==i?void 0:i.componentProps)?void 0:o.valueFormat)||"HH:mm",new Date);return!p(r)}(R))return;let t=e(g)||"";if(x&&!i(x)){const e=x.filter((e=>t.split(",").includes(e.label))).map((e=>e.value));if(i(e))return;if(function(e){var t,n;const o=null==(t=e.editRender)?void 0:t.props;return E(e,s.SELECT)&&(null==(n=o.componentProps)?void 0:n.multiple)}(R)){if(r(T,e))return;t=e}else{if(e.includes(T))return;t=e[0]}}y[R.field]=t,v("formChange",{column:R,row:y,oldValue:T,value:t,index:n.getRowIndex(y)}),E(R,s.SEPARATE)&&(null==w||w())}}function E(e,t){var n;const o=null==(n=e.editRender)?void 0:n.props;return o&&a.getCellType(o)===t}n.eventHooks.onCopy.tap(v,(({$table:e},t,{emits:n})=>m("copy",e,t,n))),n.eventHooks.onPaste.tap(v,(({$table:e},t,{emits:n,updateTableDataRef:o})=>m("paste",e,t,n,o))),n.eventHooks.onKeydown.tap(v,(async({$event:e,$table:n},o,{emits:l})=>{await t(0);const{row:i,column:r}=n.getSelectedCell()||n.getEditRecord()||{};if(!i||!r)return;l("keyboard",{$table:n,key:e.key,index:n.getRowIndex(i),value:i[r.field],row:i,column:r})}))}})}export{v as keyboardEventPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{toRaw as e,h as t,inject as l,createVNode as i}from"vue";import{arrayed as o,widthAppend as s}from"../../../../../shared/utils/index.js";import{isObject as n,isFunction as a,cloneDeep as
|
|
1
|
+
import{toRaw as e,h as t,inject as l,createVNode as i}from"vue";import{arrayed as o,widthAppend as s}from"../../../../../shared/utils/index.js";import{isObject as n,isFunction as a,cloneDeep as r,isString as d}from"lodash-es";import u from"../../../../annotation-edit/index.js";import{HIGHEST_PRIORITY as c,IHO_TABLE_FIXED_STATUS as f,LOWEST_PRIORITY as m,WIDGET_TYPE as p,InjectionIhoTableAnnotation as h,InjectionIhoTableConfig as b}from"../../constants/index.js";import{defineTablePlugin as v}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as g,IhoTableUtils as x,IhoTableRenderHelper as R}from"../../utils/index.js";import{getDefaultValue as P}from"../rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js";function j(){const j="lowCodeFieldAdaptorPlugin";return v({name:j,apply(v){v.fieldHooks.field.tap({name:j,stage:c},((c,m,v)=>{const j=c,w={className:j.bold?"iho-table__boldCell":"",field:j.columnName,showOverflow:"ellipsis",visible:g.notNegative(j.isShow),minWidth:j.colWidth,sortable:g.isPositive(j.isSort),fixed:f[j.isFixed],...j,title:j.alias||j.title};return function(e,r){const c={default:r.slotFn,header:r.headerSlotFn,edit:r.editSlotFn,footer:r.footerSlotFn,...r.slots};if(a(r.checkEditStatus)){const{default:e}=c;a(e)&&(c.default=l=>r.checkEditStatus(l)?e(l):[t("span",null,P(l.row,l.column.editRender.props))])}const f=c.header;c.header=e=>function(e,t,r){var c;const f=l(h),m=l(b),p=l("$xetable"),v=e.column||{},g=n(null==f?void 0:f.value)&&!1!==t.annotation,x=R.isEditableColumn(m.value,v),P=R.hasFilter(t)||R.hasDateFiler(t),j=null==(c=t.titlePrefix)?void 0:c.content,w=d(r)?r:a(r)?r(e):null;let F=!1;if(m.value){const e=m.value.editRules&&m.value.editRules[v.field];e&&(F=o(e).some((e=>e.required)))}const S=m.value.border?Math.max(2,Math.ceil(p.reactData.scrollbarWidth/p.reactData.tableColumn.length)):1,W=s(Math.max(0,v.renderWidth-20-S-(F?14:0)-(g?18:0)-(P?23:0)-(x?22:0)-(j?20:0)-(v.sortable?23:0)));return i("section",{class:"iho-table__headerWrapper"},[i("section",{style:{width:W}},[null!=w?w:i("div",{style:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},[v.title])]),g?i(u,{modelValue:f.value[v.field],"onUpdate:modelValue":e=>f.value[v.field]=e},null):null])}(e,r,f),e.slots=c}(w,j),function(t,l,i){var o,s;const d=r(e(l));d.componentProps={size:"mini"===i.size?"small":i.size,...d.componentProps},i.forceClearable&&(d.componentProps.clearable=!0);t.editRender={name:x.getCellType(l),...t.editRender,props:d},t.editRender.enabled=!Reflect.get(p,t.editRender.name),a(null==(o=t.slots)?void 0:o.default)&&(t.editRender.enabled=t.editRender.enabled&&a(null==(s=t.slots)?void 0:s.edit));if(!n(l.settingObj))return;Reflect.has(l.settingObj,"isHide")&&(t.visible=t.visible&&g.notPositive(l.settingObj.isHide))}(w,j,v),w})),v.fieldHooks.field.tap({name:j+"After",stage:m},(e=>(n(e.slots)&&Object.entries(e.slots).forEach((([t,l])=>{null==l&&Reflect.deleteProperty(e.slots,t)})),e)))}})}export{j as lowCodeFieldAdaptorPlugin};
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{inject as e,createVNode as t,mergeProps as o}from"vue";import{NInput as n}from"naive-ui";import"../../../../index.js";import{EDITABLE_WIDGET_TYPE as r,InjectionIhoTableUUID as i}from"../../../constants/index.js";import{useAutoFocus as a}from"./hooks/useAutoFocus.js";import{IhoTableRenderHelper as l}from"../../../utils/index.js";import{defineTablePlugin as s}from"../../../hooks/useTablePlugin.js";import{getSeparateInfo as d}from"../../../utils/separateMap.js";function u(){const u="inputRendererPlugins";return s({name:u,vxe(a){let s="";a.renderer.add(r.INPUT,{renderCell:l.createDefaultRenderCell(),renderEdit:l.createRenderEdit((({fieldItem:r,row:a,rowIndex:l,column:u,emitFormChangeWithParams:m,emitFormClickWithParams:c,$table:f})=>{let p=l,g=a;if("bottom"===r.separatePlacement){const t=e(i),o=d(t,a);if(o&&o.isLastRow&&a!==o.originalData){const{originalData:e=a,index:t}=o;g=e,p=t}}return[t(n,o({value:g[u.field],"onUpdate:value":e=>g[u.field]=e},r.componentProps,{onChange:()=>{m({oldValue:s,index:p,row:g,value:g[u.field]})},onClick:()=>c({index:p,row:g,value:g[u.field]}),onFocus:()=>s=g[u.field],onKeydown:async e=>{if("Enter"!==e.key)return;const{fullData:t}=f.getTableData();if(t.length!==l+1)return;const{editStore:{actived:o}={}}=f.reactData;if(o&&o.row){const t=o.args;await f.clearEdit(),f.handleSelected(t,e)}}}),null)]}))})},apply(e){a(e).bindAutoFocusConfig(u,r.INPUT,".n-input__input-el",{focusType:"class"})}})}export{u as inputRendererPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,inject as l,ref as o,computed as t,createVNode as n,toRaw as a,Fragment as u}from"vue";import{keywordMatcher as r,arrayed as i}from"../../../../../../../shared/utils/index.js";import{NSelect as s,NTooltip as d,NIcon as p,NTag as c}from"naive-ui";import{HelpCircleSharp as v}from"@vicons/ionicons5";import{InjectionIhoTableUUID as m}from"../../../../constants/index.js";import{selectOptionsMap as f}from"../hooks/useSelectOption.js";import{useIhoTableFormEvent as h}from"../../../../utils/index.js";import{useDebounceFn as y}from"@vueuse/core";import{isEmpty as b,isFunction as w,isArray as S,isObject as g,omit as O}from"lodash-es";var
|
|
1
|
+
import{defineComponent as e,inject as l,ref as o,computed as t,createVNode as n,toRaw as a,Fragment as u}from"vue";import{keywordMatcher as r,arrayed as i}from"../../../../../../../shared/utils/index.js";import{NSelect as s,NTooltip as d,NIcon as p,NTag as c}from"naive-ui";import{HelpCircleSharp as v}from"@vicons/ionicons5";import{InjectionIhoTableUUID as m}from"../../../../constants/index.js";import{selectOptionsMap as f}from"../hooks/useSelectOption.js";import{useIhoTableFormEvent as h}from"../../../../utils/index.js";import{useDebounceFn as y}from"@vueuse/core";import{isEmpty as b,isFunction as w,isArray as S,isObject as g,omit as O,cloneDeep as x}from"lodash-es";var j=e({name:"EditSelect",props:{value:{type:[Array,String,Number]},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},options:{type:Array,default:()=>[]},queryOptions:{type:Function},placeholder:{type:String,default:"请选择"},allowCreate:{type:Boolean,default:!1},shouldSave:{type:Boolean,default:!1},consistentMenuWidth:{type:Boolean,default:!0},aliasField:{type:String},menuProps:{type:Object}},emits:["update:value"],setup(e,{emit:j}){const P=l("$xetable"),q=o(null);function _(e){q.value=e}const k=o(!1),{emitFormChangeWithParams:C}=h({...e,$table:P}),F=o("");function W(){return E()}const M=o([]),$=t((()=>{let l=b(M.value)?e.options:M.value;return F.value?(l=l.filter((e=>e.label&&e.label.includes(F.value)||r(F.value,e.keyword))),!e.allowCreate||l.some((e=>e.label===F.value))?l:[...l,{label:F.value,value:F.value,created:!0,shouldSave:e.shouldSave}]):l})),B=o(!1),E=y((async function(l=""){F.value=l;try{if(B.value=!0,!w(e.queryOptions)||!b(e.options))return;M.value=await e.queryOptions({keyword:l,row:e.row,column:e.column,rowIndex:e.rowIndex})}catch(l){console.log(`获取${e.column.field}options错误`)}finally{B.value=!1}}),400),I=l(m);function U(l,o){const t=e.value;j("update:value",l);const n=f.get(I);n&&S(n[e.column.field])&&i(o).forEach((l=>{if(!g(l))return;const o=l;o.created&&o.shouldSave&&n[e.column.field].push(O(a(o),["created","shouldSave"]))})),C({oldValue:t,option:x(o)})}function A(e){var l,o;"Tab"===e.key&&q.value&&(null==(o=(l=q.value).handleKeydown)||o.call(l,{...e,key:"Enter",preventDefault:e.preventDefault.bind(e)}))}function D({node:e,option:l}){return l.desc?n("div",{class:"iho-table__selectOptionWrapper"},[[e,n(d,null,{trigger:()=>n(p,{component:v},null),default:()=>l.desc})]]):e}function K({option:l,handleClose:o}){var t;const a=null!=(t=e.aliasField&&l[e.aliasField])?t:l.label;return S(e.value)?n(c,{closable:!0,onClose:e=>{e.stopPropagation(),o()}},{default:()=>a}):n(u,null,[a])}const N=()=>({class:"iho-table__selectOption"}),T=t((()=>{var l,o;return{...e.menuProps,class:`iho-table__selectMenu ${null!=(o=null==(l=e.menuProps)?void 0:l.class)?o:""}`}}));return()=>n(s,{ref:_,show:k.value,"onUpdate:show":e=>k.value=e,consistentMenuWidth:e.consistentMenuWidth,placeholder:e.placeholder,loading:B.value,options:$.value,value:e.value,remote:!0,onSearch:E,clearable:!0,filterable:!0,nodeProps:N,menuProps:T.value,renderTag:K,renderOption:D,onUpdateShow:W,onUpdateValue:U,onKeydown:A},null)}});export{j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{reactive as e,inject as t,createVNode as o,toRaw as i,h as n,onBeforeUnmount as
|
|
1
|
+
import{reactive as e,inject as t,createVNode as o,toRaw as i,h as n,onBeforeUnmount as r}from"vue";import{traverse as s}from"../../../../../../../shared/utils/index.js";import{isFunction as a,isObject as u,range as l}from"lodash-es";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as d,InjectionIhoTableUUID as c}from"../../../../constants/index.js";import{useAutoFocus as p}from"../hooks/useAutoFocus.js";import{createIhoTableClearActivedInterceptor as f,IhoTableRenderHelper as m,getRowHeight as h,getColumnRenderWidth as v,parseMergeField as A}from"../../../../utils/index.js";import g from"./editSeparate.vue.js";import{contentSeparate as E,getColumnInfoMaxLength as R,generateSeparateRowData as w,isSeparateColumn as b}from"./separateUtils.js";import{getSeparateInfo as _,setSeparateInfo as k,deleteSeparateInfo as x}from"../../../../utils/separateMap.js";import{defineTablePlugin as P}from"../../../../hooks/useTablePlugin.js";function T(){const T="separateRendererPlugins",S=e(new Map);return P({name:T,vxe(e){e.interceptor.add("event.clearActived",f(d.SEPARATE,(e=>e.classList.contains("v-binder-follower-content")))),e.renderer.add(d.SEPARATE,{renderCell(e,{column:i,row:n}){var r,s;const a=t(c),u=(null!=(s=null==(r=_(a,n))?void 0:r.separateData)?s:{})[i.field];return o("section",{class:"iho-table__ellipsis",title:u},[u])},renderEdit:m.createRenderEdit((({fieldItem:e,column:r,row:s,emitFormClick:l})=>{var d,p,f;const m=t(c),v=_(m,s),A=h(),E={};let R=null!=(p=null==(d=e.componentProps)?void 0:d.separateSlot)?p:e.separateSlot;return R&&(R=i(R),E.menu=a(R)?R:u(R)?e=>n(R,e):void 0),[o(g,{value:s[r.field],"onUpdate:value":e=>s[r.field]=e,"row-index":null==v?void 0:v.index,height:A,column:r,row:s,"display-content":null==(f=null==v?void 0:v.separateData)?void 0:f[r.field],onClick:l},E)]}))})},apply(e){function t(e){return(...t)=>{var o;return!(null==(o=t[0].row)?void 0:o.$__SEPARATE)&&(!a(e)||e(...t))}}p(e).bindAutoFocusConfig(T,d.SEPARATE,".iho-table__separateText"),e.fieldHooks.fieldList.tap(T,((e,{uuid:t})=>(t&&S.set(t,e.reduce(((e,t)=>(s(t,(t=>{b(t)&&(e.push(i(t)),t.showOverflow="ellipsis")})),e)),[])),e))),e.dataHooks.data.tapPromise(T,(async(e,t,{insertAfter:o,index:i,$table:n})=>{if(!t.uuid)return;const r=S.get(t.uuid);if(!r||!r.length)return;const s=[];for(const t of r){if(!t.field)continue;const o=await v(t,n);s.push({field:t.field,data:E(A(e,t),t,o)})}l(R(s)).forEach(((n,r,a)=>{const u=w(s,r),l={index:i,originalData:e,separateData:u,separateIndex:r,separateLength:a.length,isOriginRow:0===r,isLastRow:r===a.length-1};if(0===r)return e.$__SEPARATE_DATA=[u],void k(t.uuid,e,l);const d={$__SEPARATE:!0};k(t.uuid,d,l),e.$__SEPARATE_DATA.push(u),o(d)}))})),e.eventHooks.onResizableChange.tap(T,(async({column:e},t,o)=>{b(e)&&o.updateTableDataRef()})),e.configHooks.editConfig.tap(T,((e={},t)=>{const o=e.beforeEditMethod;return e.beforeEditMethod=(...e)=>{var i;if(!t.uuid)return p();const n=S.get(t.uuid);if(!n||!n.length)return p();const{row:r,column:s}=e[0],u=_(t.uuid,r);if(!u)return p();const l=null==(i=s.editRender)?void 0:i.props;if(!l)return p();const{isOriginRow:d,isLastRow:c}=u;return("bottom"===l.separatePlacement?c:d)&&p();function p(){return!a(o)||o(...e)}},e})),e.configHooks.checkboxConfig.tap(T,((e={},o)=>(e.checkMethod=t(e.checkMethod),e.visibleMethod=t(e.visibleMethod),e))),e.setupHooks.setup.tap(T,(e=>{r((()=>{e.value.uuid&&(S.delete(e.value.uuid),x(e.value.uuid))}))}))}})}export{T as separateRendererPlugins};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as e,defineComponent as n,inject as t}from"vue";import"../../../../index.js";import{NCheckbox as a}from"naive-ui";import{defineTablePlugin as
|
|
1
|
+
import{createVNode as e,defineComponent as n,inject as t}from"vue";import"../../../../index.js";import{NCheckbox as a}from"naive-ui";import{defineTablePlugin as o}from"../../../hooks/useTablePlugin.js";function s(){const n="checkRendererPlugin";return o({name:n,apply(t){t.fieldHooks.field.tap(n,((t,{index:a,insertBefore:o},s)=>{if(0===a&&s.selectType&&["checkbox","radio"].includes(s.selectType)){const{radioConfig:t,checkboxConfig:a={}}=s,r={width:45,align:"center",fixed:"left",..."radio"===s.selectType?t:a,field:n,type:s.selectType,annotation:!1};a.disableHeader&&(r.slots={header:()=>e("span",{class:"checkbox-cell--disable"},null),...r.slots}),a.useNCheckbox&&(r.slots={header:n=>[e(l,{style:"margin-left: -1px",params:n},null)],checkbox:n=>[e(l,{params:n},null)],...r.slots}),o(r)}return t}))}})}const l=n({name:"Checkbox",props:{params:{type:Object,default:()=>({})}},setup(n){const o=t("$xetable");function s(e){var t;"header"===(null==(t=n.params)?void 0:t.type)?null==o||o.triggerCheckAllEvent(new MouseEvent("mouse-down"),e):null==o||o.triggerCheckRowEvent(new MouseEvent("mouse-down"),n.params,e)}return()=>e(a,{checked:n.params.checked,"onUpdate:checked":e=>n.params.checked=e,indeterminate:n.params.indeterminate,disabled:n.params.disabled,onUpdateChecked:s},null)}});export{s as checkRendererPlugin};
|
package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as n}from"vue";import"../../../../../../shared/utils/index.js";import{isObject as o,isArray as e}from"lodash-es";import"../../../../index.js";import{WIDGET_TYPE as t}from"../../../constants/index.js";import{parseMergeField as r,isRichContent as i,parseRichContent as l,getTitle as s}from"../../../utils/index.js";import{
|
|
1
|
+
import{createVNode as n}from"vue";import"../../../../../../shared/utils/index.js";import{isObject as o,isArray as e}from"lodash-es";import"../../../../index.js";import{WIDGET_TYPE as t}from"../../../constants/index.js";import{parseMergeField as r,isRichContent as i,parseRichContent as l,getTitle as s}from"../../../utils/index.js";import{isMatchLowCodeCondition as c}from"../../../../../../shared/utils/business.js";import{defineTablePlugin as d}from"../../../hooks/useTablePlugin.js";function u(){return d({name:"defaultRendererPlugin",vxe(d){d.renderer.add(t.DEFAULT,{renderCell(t,{row:d,column:u}){const a=r(d,u),f=i(a)?function(o,e){const t=l(o);return[n("span",{title:s(e,t.change_text),style:{color:t.background||t.icon}},[r(t.icon),t.change_text])];function r(o){return o?o.match(/#[\da-f]{6}|[\da-f]{3}/i)?n("i",{class:"icon-dot",style:{"--table-icon-color":o,"--table-icon-shadow":o}},null):n("i",{class:t.icon},null):null}}(a,u):[a];return function(o,t,r,i){if(!e(o)||!o.length)return n("span",{title:s(r,i)},[i]);const l=o.find((n=>n.condition&&n.condition.find((n=>{const o=t[n.field_key||r.field];return c(o,n)}))));return n("span",l?{title:s(r,i),style:{color:l.color},class:l.icon}:{title:s(r,i)},[i])}(function(n){var e,t,r;const i=null==(e=n.editRender)?void 0:e.props;if(!o(i))return;return null!=(r=i.colorAndIcon)?r:null==(t=i.settingObj)?void 0:t.colorAndIcon}(u),d,u,f)}}),d.renderer.add(t.STATUS,d.renderer.get(t.DEFAULT))}})}export{u as defaultRendererPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{unref as e,createVNode as t,onBeforeUnmount as o,shallowReactive as l,defineComponent as n,inject as r,ref as a,computed as s,provide as i,watch as u,onMounted as d,h as c}from"vue";import{traverse as p,widthAppend as f}from"../../../../../shared/utils/index.js";import{doAnimation as m}from"../../../../../shared/utils/anime.js";import{useThrottleFn as h}from"@vueuse/core";import{promiseTimeout as g}from"@vueuse/shared";import{last as v,isFunction as x,omit as I,isNumber as b}from"lodash-es";import"../../../index.js";import{WIDGET_TYPE as y,InjectionIhoTableUUID as T}from"../../constants/index.js";import{useUUIDMap as w}from"../../utils/index.js";import{defineTablePlugin as H}from"../../hooks/useTablePlugin.js";class R{constructor(){this.records={},this.maxRecords=l(new Map)}set(e,t,o){if(this.records[e]||(this.records[e]={}),this.records[e][t]===o)return;this.records[e][t]=o;const l=Math.max(...Object.values(this.records[e]),0);this.maxRecords.get(e)!==l&&this.maxRecords.set(e,l)}getMax(e){return this.maxRecords.get(e)||0}}const{getItemFromUUID:D,removeItemFromUUID:M}=w((()=>new R),!0),{getItemFromUUID:S,removeItemFromUUID:U,setItemFromUUID:C}=w((()=>null)),{getItemFromUUID:$,removeItemFromUUID:E,setItemFromUUID:k}=w((()=>{})),F=n({props:{payload:{type:Object,required:!0}},setup(e){const o=r(T),l=r("$xetable"),n=a(),p=D(o),m=s((()=>e.payload.row[e.payload.column.field]));function h(){const{row:t,column:o}=e.payload,r=l.getRowSeq(t);if(!p||null==r||!n.value)return;const a=n.value.clientHeight;p.set(r,o.field,a)}i("updateCellHeight",h),u([()=>e.payload.rowIndex,()=>e.payload.column.field,m,()=>e.payload.column.renderWidth],(async()=>{await g(0),h()})),d((()=>{l&&!S(o)&&C(o,l),h()}));const v=s((()=>{var t,o,l,n;const r=null!=(o=null==(t=e.payload.column.editRender)?void 0:t.props)?o:{},a=null!=(n=null==(l=r.slots)?void 0:l.default)?n:r.slotFn;return x(a)?a:()=>m.value})),I=s((()=>{if(e.payload.column.treeNode)return"";const t=e.payload.column.renderWidth;return b(t)&&t>0?f(t-20-2):""}));return()=>t("div",{ref:n,style:{padding:"7px 0",width:I.value,overflow:"hidden"}},[c(v.value,e.payload)])}});function j(t,o,{scrollTop:l=0}){var n,r;const{uuid:a,rowConfig:s={}}=o;if(!a)return;const i=D(a),{oSize:u=0,gt:d=100}=null!=(n=$(a))?n:{},{internalData:c,reactData:p}=t,{scrollYStore:f,elemStore:m,afterFullData:h,fullDataRowIdData:g}=c;if(d>h.length)return;const I=null!=(r=s.height)?r:36,b=m["main-body-wrapper"],y=b?e(b):null;let T=y?Math.max(8,Math.ceil(y.clientHeight/I)+2+u):8;const w=[0];let H=0;if(l&&h.find(((e,o)=>{const n=t.getRowSeq(e),r=(v(w)||0)+Math.max(I,i.getMax(n));if(w.push(r),r>l)return H=Math.max(0,o-u),T+=Math.min(H,u),!0})),H>0&&x(o.spanMethod)){const{spanMethod:e}=o,l={rowspan:1,colspan:1};for(;H>0;){if(!t.getColumns().some(((t,o)=>{const{rowspan:n,colspan:r}=e({column:t,columnIndex:o,$columnIndex:o,row:h[H],rowIndex:H,$rowIndex:H,_rowIndex:H,isHidden:!t.visible,fixed:t.fixed,type:t.type,visibleData:h})||l;if(0===n&&0===r)return H--,!0})))break}}const R=`${w[H]}px`,M=`${h.reduce(((e,o)=>{const l=t.getRowSeq(o);return e+Math.max(I,i.getMax(l))}),0)}px`;["main","left","right"].forEach((t=>{const o=m[`${t}-body-table`],n=o?e(o):null;n&&(n.style.marginTop=R,n.scrollTop=l),["header","body","footer"].forEach((o=>{const l=m[`${t}-${o}-ySpace`],n=l?e(l):null;n&&(n.style.height=M)}))}));const S=Math.min(h.length,H+T);if(f.startIndex===H&&f.endIndex===S)return;f.startIndex=H,f.endIndex=S;const U=h.slice(f.startIndex,f.endIndex);U.forEach(((e,o)=>{const l=t.getRowid(e),n=g[l];n&&(n.$index=o)})),p.tableData.length=0,p.tableData.push(...U)}const L=h(j,300);function Y(){const l="variableHeightRendererPlugin";return H({name:l,vxe(e){e.renderer.add(y.VARIABLE_HEIGHT,{renderCell:(e,o)=>t(F,{payload:o},null)})},apply(t){function n(t){const o=S(t.uuid);if(!o)return;t.scrollY={enabled:!1},o.reactData.scrollYLoad=!1;const l=function(t){const o=t.internalData.elemStore["main-body-wrapper"];return o?e(o):null}(o);l&&j(o,t,{scrollTop:l.scrollTop})}function r(e){if(!e.uuid)return;const t=$(e.uuid);t&&(e.scrollY=t),setTimeout((()=>n(e)),300)}t.dataHooks.dataStart.tap(l,r),t.eventHooks.onFilterChange.tap(l,((e,t)=>r(t))),t.eventHooks.onSortChange.tap(l,((e,t)=>r(t))),t.eventHooks.onToggleTreeExpand.tap(l,((e,t)=>r(t))),t.eventHooks.onResizableChange.tap(l,(async({column:e},t)=>{
|
|
1
|
+
import{unref as e,createVNode as t,onBeforeUnmount as o,shallowReactive as l,defineComponent as n,inject as r,ref as a,computed as s,provide as i,watch as u,onMounted as d,h as c}from"vue";import{traverse as p,widthAppend as f}from"../../../../../shared/utils/index.js";import{doAnimation as m}from"../../../../../shared/utils/anime.js";import{useThrottleFn as h}from"@vueuse/core";import{promiseTimeout as g}from"@vueuse/shared";import{last as v,isFunction as x,omit as I,isNumber as b}from"lodash-es";import"../../../index.js";import{WIDGET_TYPE as y,InjectionIhoTableUUID as T}from"../../constants/index.js";import{useUUIDMap as w}from"../../utils/index.js";import{defineTablePlugin as H}from"../../hooks/useTablePlugin.js";class R{constructor(){this.records={},this.maxRecords=l(new Map)}set(e,t,o){if(this.records[e]||(this.records[e]={}),this.records[e][t]===o)return;this.records[e][t]=o;const l=Math.max(...Object.values(this.records[e]),0);this.maxRecords.get(e)!==l&&this.maxRecords.set(e,l)}getMax(e){return this.maxRecords.get(e)||0}}const{getItemFromUUID:D,removeItemFromUUID:M}=w((()=>new R),!0),{getItemFromUUID:S,removeItemFromUUID:U,setItemFromUUID:C}=w((()=>null)),{getItemFromUUID:$,removeItemFromUUID:E,setItemFromUUID:k}=w((()=>{})),F=n({props:{payload:{type:Object,required:!0}},setup(e){const o=r(T),l=r("$xetable"),n=a(),p=D(o),m=s((()=>e.payload.row[e.payload.column.field]));function h(){const{row:t,column:o}=e.payload,r=l.getRowSeq(t);if(!p||null==r||!n.value)return;const a=n.value.clientHeight;p.set(r,o.field,a)}i("updateCellHeight",h),u([()=>e.payload.rowIndex,()=>e.payload.column.field,m,()=>e.payload.column.renderWidth],(async()=>{await g(0),h()})),d((()=>{l&&!S(o)&&C(o,l),h()}));const v=s((()=>{var t,o,l,n;const r=null!=(o=null==(t=e.payload.column.editRender)?void 0:t.props)?o:{},a=null!=(n=null==(l=r.slots)?void 0:l.default)?n:r.slotFn;return x(a)?a:()=>m.value})),I=s((()=>{if(e.payload.column.treeNode)return"";const t=e.payload.column.renderWidth;return b(t)&&t>0?f(t-20-2):""}));return()=>t("div",{ref:n,style:{padding:"7px 0",width:I.value,overflow:"hidden"}},[c(v.value,e.payload)])}});function j(t,o,{scrollTop:l=0}){var n,r;const{uuid:a,rowConfig:s={}}=o;if(!a)return;const i=D(a),{oSize:u=0,gt:d=100}=null!=(n=$(a))?n:{},{internalData:c,reactData:p}=t,{scrollYStore:f,elemStore:m,afterFullData:h,fullDataRowIdData:g}=c;if(d>h.length)return;const I=null!=(r=s.height)?r:36,b=m["main-body-wrapper"],y=b?e(b):null;let T=y?Math.max(8,Math.ceil(y.clientHeight/I)+2+u):8;const w=[0];let H=0;if(l&&h.find(((e,o)=>{const n=t.getRowSeq(e),r=(v(w)||0)+Math.max(I,i.getMax(n));if(w.push(r),r>l)return H=Math.max(0,o-u),T+=Math.min(H,u),!0})),H>0&&x(o.spanMethod)){const{spanMethod:e}=o,l={rowspan:1,colspan:1};for(;H>0;){if(!t.getColumns().some(((t,o)=>{const{rowspan:n,colspan:r}=e({column:t,columnIndex:o,$columnIndex:o,row:h[H],rowIndex:H,$rowIndex:H,_rowIndex:H,isHidden:!t.visible,fixed:t.fixed,type:t.type,visibleData:h})||l;if(0===n&&0===r)return H--,!0})))break}}const R=`${w[H]}px`,M=`${h.reduce(((e,o)=>{const l=t.getRowSeq(o);return e+Math.max(I,i.getMax(l))}),0)}px`;["main","left","right"].forEach((t=>{const o=m[`${t}-body-table`],n=o?e(o):null;n&&(n.style.marginTop=R,n.scrollTop=l),["header","body","footer"].forEach((o=>{const l=m[`${t}-${o}-ySpace`],n=l?e(l):null;n&&(n.style.height=M)}))}));const S=Math.min(h.length,H+T);if(f.startIndex===H&&f.endIndex===S)return;f.startIndex=H,f.endIndex=S;const U=h.slice(f.startIndex,f.endIndex);U.forEach(((e,o)=>{const l=t.getRowid(e),n=g[l];n&&(n.$index=o)})),p.tableData.length=0,p.tableData.push(...U)}const L=h(j,300);function Y(e){return!0===e.variableHeight||"1"===e.variableHeight}function A(){const l="variableHeightRendererPlugin";return H({name:l,vxe(e){e.renderer.add(y.VARIABLE_HEIGHT,{renderCell:(e,o)=>t(F,{payload:o},null)})},apply(t){function n(t){const o=S(t.uuid);if(!o)return;t.scrollY={enabled:!1},o.reactData.scrollYLoad=!1;const l=function(t){const o=t.internalData.elemStore["main-body-wrapper"];return o?e(o):null}(o);l&&j(o,t,{scrollTop:l.scrollTop})}function r(e){if(!e.uuid)return;const t=$(e.uuid);t&&(e.scrollY=t),setTimeout((()=>n(e)),300)}t.dataHooks.dataStart.tap(l,r),t.eventHooks.onFilterChange.tap(l,((e,t)=>r(t))),t.eventHooks.onSortChange.tap(l,((e,t)=>r(t))),t.eventHooks.onToggleTreeExpand.tap(l,((e,t)=>r(t))),t.eventHooks.onResizableChange.tap(l,(async({column:e},t)=>{e.editRender&&e.editRender.props&&Y(e.editRender.props)&&r(t)})),t.eventHooks.onScroll.tap(l,h(((e,t)=>{if(e.isX)return;const{uuid:o}=t;if(!o)return;const l=S(o);l&&j(l,t,e)}),100,!0,!0)),t.fieldHooks.field.tap(l,(e=>{if(Y(e)){const t=e.slots;e.slots=I(t,["default"]),e.editRender={...e.editRender,name:y.VARIABLE_HEIGHT};const o=e.className,l="variable-height";e.className=o?function(e){return x(o)?[o(e),l]:[o,l]}:l}return e})),t.fieldHooks.fieldList.tap(l,((t,o,{$table:l})=>(o.uuid&&p(t,((t,r)=>{var a,s,i;if((null==(a=t.editRender)?void 0:a.name)===y.VARIABLE_HEIGHT){const t=null!=(i=null==(s=o.rowConfig)?void 0:s.height)?i:36,a=D(o.uuid),u=o.cellStyle;if(o.cellStyle=function(e){const o={};if(l.value){const n=Math.max(t,a.getMax(l.value.getRowSeq(e.row)));o.height=`${n}px`}return Object.assign(o,u?x(u)?u(e):u:null)},o.sortableConfig&&o.sortableConfig.enable){const t=o.sortableConfig.onEnd;o.sortableConfig.onEnd=function(l){const n=S(o.uuid);if(n){const{internalData:{elemStore:t}}=n,l=t["main-table-body"];l&&e(l)&&j(n,o,{scrollTop:e(l).scrollTop})}x(t)&&t(l)}}o.scrollY={...o.scrollY,mode:"default"},o.onWheel=function(t){let o=null,l=0,n=!0;return function(r){if(!t.uuid)return;const a=S(t.uuid);if(!a)return;const{internalData:s}=a,{isHover:i}=t.rowConfig||{},{deltaX:u,deltaY:d}=r,{refTableLeftBody:c,refTableRightBody:p,refTableBody:f}=a.getRefMaps(),h=d,g=u,v=h<0,x=e(f),I=x?x.$el:null;if(!I)return;if(v?I.scrollTop<=0:I.scrollTop>=I.scrollHeight-I.clientHeight)return;const b=I.scrollTop+h,y=I.scrollLeft+g;if(b===s.lastScrollTop)return;r.preventDefault(),s.lastScrollTop=b,s.lastScrollLeft=y,s.lastScrollTime=Date.now(),i&&a.clearHoverRow();const T=c.value,w=p.value,H=T?T.$el:null,R=w?w.$el:null,D=Math.min(100,Math.abs(Math.floor(h/2)));n&&(l=I.scrollTop,n=!1),l+=D*(v?-1:1),o&&o(),o=m(I.scrollTop,l,400,(e=>{I.scrollTop=e,H&&(H.scrollTop=e),R&&(R.scrollTop=e)}),"easeOutCubic",(()=>{l=I.scrollTop,n=!0})),L(a,t,I)}}(o),setTimeout((()=>{k(o.uuid,o.scrollY),n(o)}),300),r()}})),t))),t.setupHooks.setup.tap(l,(e=>{o((()=>{e.value.uuid&&(M(e.value.uuid),U(e.value.uuid),E(e.value.uuid))}))}))}})}export{A as variableHeightRendererPlugin};
|
|
@@ -19,6 +19,7 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
|
|
|
19
19
|
isSingleSelect: MaybeString<0 | 1>;
|
|
20
20
|
hideSettingBtn: MaybeString<0 | 1>;
|
|
21
21
|
showSeq: boolean;
|
|
22
|
+
forceClearable: boolean;
|
|
22
23
|
selectType: Exclude<VxeTableDefines.ColumnInfo['type'], 'seq' | 'expand' | 'html'>;
|
|
23
24
|
rowGroupSetting: Partial<Record<TupleToUnion<typeof IhoTableRowGroupSequence>, IhoTableRowGroupItem[]>>;
|
|
24
25
|
anchorList: Array<{
|
|
@@ -37,6 +38,9 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
|
|
|
37
38
|
disableHeader: boolean;
|
|
38
39
|
useNCheckbox: boolean;
|
|
39
40
|
}>;
|
|
41
|
+
radioConfig: Partial<VxeTableProps['radioConfig'] & {
|
|
42
|
+
slots: VxeColumnPropTypes.Slots;
|
|
43
|
+
}>;
|
|
40
44
|
sortableConfig: Partial<{
|
|
41
45
|
enable: boolean;
|
|
42
46
|
usePreset: boolean;
|
|
@@ -54,12 +58,12 @@ export declare namespace IhoTableLowCodeField {
|
|
|
54
58
|
type FieldSetting = Partial<{
|
|
55
59
|
mergedFeildExpression: string;
|
|
56
60
|
notParticipatingSearch: IHO_TABLE_STRING_STATUS;
|
|
57
|
-
mapping: {
|
|
61
|
+
mapping: Partial<{
|
|
58
62
|
type: string;
|
|
59
63
|
mappingFiled: Array<{
|
|
60
|
-
value: Array<Record<'key' | 'value' | 'keyword', string
|
|
64
|
+
value: Array<Partial<Record<'key' | 'value' | 'keyword', string>>>;
|
|
61
65
|
}>;
|
|
62
|
-
}
|
|
66
|
+
}>;
|
|
63
67
|
}>;
|
|
64
68
|
type FilterSetting = Partial<{
|
|
65
69
|
daterange: boolean;
|
|
@@ -101,7 +105,7 @@ export declare type LowCodeTableFieldItem = {
|
|
|
101
105
|
isSort: MaybeString<0 | 1>;
|
|
102
106
|
isOrder: MaybeString<0> | VxeTablePropTypes.SortOrder;
|
|
103
107
|
formType: string;
|
|
104
|
-
fieldSetting: string;
|
|
108
|
+
fieldSetting: string | IhoTableLowCodeField.FieldSetting;
|
|
105
109
|
filterCapacity: number;
|
|
106
110
|
notParticipatingSearch: 0 | 1;
|
|
107
111
|
componentProps: AnyObject;
|
|
@@ -161,3 +165,12 @@ export declare type IhoTableExpose = {
|
|
|
161
165
|
setFilter(field: string, value: ArrayAble<string>): void;
|
|
162
166
|
reload(): Promise<void>;
|
|
163
167
|
};
|
|
168
|
+
export declare type IhoTableSeparateInfo = {
|
|
169
|
+
index: number;
|
|
170
|
+
isOriginRow: boolean;
|
|
171
|
+
isLastRow: boolean;
|
|
172
|
+
separateData: AnyObject;
|
|
173
|
+
originalData: AnyObject;
|
|
174
|
+
separateIndex: number;
|
|
175
|
+
separateLength: number;
|
|
176
|
+
};
|
|
@@ -4,6 +4,7 @@ import { VxeTableDefines, VxeTableInstance } from 'vxe-table';
|
|
|
4
4
|
import { VxeGlobalRendererHandles } from 'vxe-table/types/v-x-e-table/renderer';
|
|
5
5
|
import { EventListenerToEventName, EventNameToEventListener, IhoTableConfig, IhoTableFieldItem, LowCodeTableFieldItem } from '../../../../../es/components/iho-table';
|
|
6
6
|
import { EDITABLE_WIDGET_TYPE } from '../../../../../es/components/iho-table/src/constants';
|
|
7
|
+
export * from './separateMap';
|
|
7
8
|
export declare function IhoTableLog(message: string): void;
|
|
8
9
|
export declare function IhoTableWarn(message: string): void;
|
|
9
10
|
export declare const IhoTableUtils: Readonly<{
|
|
@@ -54,4 +55,3 @@ export declare function parseRichContent(richContent: string): any;
|
|
|
54
55
|
export declare function parseMergeField(row: AnyObject, column: VxeTableDefines.ColumnInfo): any;
|
|
55
56
|
export declare function isCompatibleColumn(field: LowCodeTableFieldItem): number | false;
|
|
56
57
|
export declare function getTitle(column: VxeTableDefines.ColumnInfo, value?: string): string;
|
|
57
|
-
export {};
|