cnhis-design-vue 3.1.45-beta.8 → 3.1.45-beta.9

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 (118) hide show
  1. package/README.md +87 -87
  2. package/es/components/base-search/index.d.ts +2 -0
  3. package/es/components/base-search/src/index.vue.d.ts +2 -0
  4. package/es/components/base-search/style/index.css +1 -1
  5. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  6. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  7. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  8. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  9. package/es/components/classification/index.d.ts +165 -11
  10. package/es/components/classification/src/components/search-filter/index.vue.d.ts +165 -11
  11. package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
  12. package/es/components/classification/src/components/set-classification/index.vue.d.ts +165 -11
  13. package/es/components/classification/src/index.vue.d.ts +165 -11
  14. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  15. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
  16. package/es/components/fabric-chart/src/hooks/useDraw.d.ts +1 -1
  17. package/es/components/fabric-chart/src/hooks/useDraw.js +1 -1
  18. package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +77 -0
  19. package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +93 -0
  20. package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +3 -0
  21. package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +3 -0
  22. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +3 -0
  23. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +3 -0
  24. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +3 -0
  25. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/dist/index.d.ts +3 -0
  26. package/es/components/iho-table/src/utils/dist/index.d.ts +44 -0
  27. package/es/components/index.css +1 -1
  28. package/es/components/quick-search/index.d.ts +2 -0
  29. package/es/components/quick-search/src/index.vue.d.ts +2 -0
  30. package/es/components/quick-search/style/index.css +1 -1
  31. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  32. package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +36 -0
  33. package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +36 -0
  34. package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +82 -0
  35. package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +57 -0
  36. package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +57 -0
  37. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  38. package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
  39. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +165 -10
  40. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +1 -1
  41. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +16 -1
  42. package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -1
  43. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +18 -0
  44. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -1
  45. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.d.ts +128 -10
  46. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js +1 -1
  47. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic1.vue.d.ts +61 -0
  48. package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue.d.ts +1 -0
  49. package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue2.js +1 -1
  50. package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +163 -10
  51. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +165 -10
  52. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +218 -0
  53. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.js +1 -0
  54. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue2.js +1 -0
  55. package/es/components/table-filter/src/components/render-widget/components/{Date.vue.d.ts → DateOut.vue.d.ts} +21 -2
  56. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.js +1 -0
  57. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue2.js +1 -0
  58. package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue.d.ts +71 -0
  59. package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue.js +1 -0
  60. package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue2.js +1 -0
  61. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +99 -5
  62. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +1 -1
  63. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +13 -9
  64. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +1 -1
  65. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue.d.ts +7 -5
  66. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue2.js +1 -1
  67. package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue.d.ts +6 -5
  68. package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue2.js +1 -1
  69. package/es/components/table-filter/src/components/render-widget/components/Select.vue.d.ts +15 -25
  70. package/es/components/table-filter/src/components/render-widget/components/Select.vue2.js +1 -1
  71. package/es/components/table-filter/src/components/render-widget/components/Select1.vue.d.ts +45 -0
  72. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +175 -0
  73. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.js +1 -0
  74. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +1 -0
  75. package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue.d.ts +114 -0
  76. package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue.js +1 -0
  77. package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue2.js +1 -0
  78. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +520 -25
  79. package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
  80. package/es/components/table-filter/src/components/render-widget/enums.d.ts +10 -3
  81. package/es/components/table-filter/src/components/render-widget/enums.js +1 -1
  82. package/es/components/table-filter/src/components/render-widget/helpers/dateDisabled.d.ts +27 -0
  83. package/es/components/table-filter/src/components/render-widget/helpers/dateDisabled.js +1 -0
  84. package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.d.ts +55 -0
  85. package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +1 -0
  86. package/es/components/table-filter/src/components/render-widget/helpers/enums.d.ts +56 -0
  87. package/es/components/table-filter/src/components/render-widget/helpers/enums.js +1 -0
  88. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.d.ts +2 -6
  89. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +1 -1
  90. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  91. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +548 -24
  92. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  93. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +2 -0
  94. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  95. package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
  96. package/es/components/table-filter/src/tool/baseOptions.js +1 -1
  97. package/es/components/table-filter/src/types/enums.d.ts +2 -0
  98. package/es/components/table-filter/src/types/enums.js +1 -1
  99. package/es/env.d.ts +25 -25
  100. package/es/shared/assets/img/failure.png.js +1 -1
  101. package/es/shared/assets/img/no-permission.png.js +1 -1
  102. package/es/shared/assets/img/nodata.png.js +1 -1
  103. package/es/shared/assets/img/notfound.png.js +1 -1
  104. package/es/shared/assets/img/qr.png.js +1 -1
  105. package/es/shared/assets/img/success.png.js +1 -1
  106. package/es/shared/assets/img/video.png.js +1 -1
  107. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  108. package/es/shared/assets/img/xb_big.png.js +1 -1
  109. package/es/shared/assets/img/xb_small.png.js +1 -1
  110. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  111. package/es/shared/package.json.js +1 -1
  112. package/es/shared/utils/fabricjs/index.d.ts +6823 -0
  113. package/es/shared/utils/tapable/index.d.ts +139 -0
  114. package/package.json +2 -2
  115. package/es/components/table-filter/src/components/render-widget/basicData.d.ts +0 -4
  116. package/es/components/table-filter/src/components/render-widget/basicData.js +0 -1
  117. package/es/components/table-filter/src/components/render-widget/components/Date.vue.js +0 -1
  118. package/es/components/table-filter/src/components/render-widget/components/Date.vue2.js +0 -1
@@ -0,0 +1,218 @@
1
+ import { PropType } from 'vue';
2
+ import { AnyObject } from '../../../../../../../es/shared/types';
3
+ declare type ITypeDate = 'date' | 'datetime';
4
+ declare const _default: import("vue").DefineComponent<{
5
+ componentCfg: {
6
+ type: PropType<AnyObject>;
7
+ };
8
+ type: {
9
+ type: PropType<ITypeDate>;
10
+ default: string;
11
+ };
12
+ clearable: {
13
+ type: BooleanConstructor;
14
+ default: boolean;
15
+ };
16
+ valueFormat: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ placeholder: {
21
+ type: StringConstructor;
22
+ default: string;
23
+ };
24
+ value: {
25
+ type: StringConstructor;
26
+ default: string;
27
+ };
28
+ }, {
29
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
30
+ componentCfg: {
31
+ type: PropType<AnyObject>;
32
+ };
33
+ type: {
34
+ type: PropType<ITypeDate>;
35
+ default: string;
36
+ };
37
+ clearable: {
38
+ type: BooleanConstructor;
39
+ default: boolean;
40
+ };
41
+ valueFormat: {
42
+ type: StringConstructor;
43
+ default: string;
44
+ };
45
+ placeholder: {
46
+ type: StringConstructor;
47
+ default: string;
48
+ };
49
+ value: {
50
+ type: StringConstructor;
51
+ default: string;
52
+ };
53
+ }>> & {
54
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
55
+ }>>;
56
+ emit: (event: "update:value", ...args: any[]) => void;
57
+ valueCp: import("vue").Ref<any>;
58
+ isShowDateRange: import("vue").Ref<boolean>;
59
+ radioValue: import("vue").Ref<string>;
60
+ dateFormat: import("vue").ComputedRef<string>;
61
+ showTabStr: import("vue").ComputedRef<string>;
62
+ optionSetting: import("vue").ComputedRef<any>;
63
+ isPastTime: import("vue").ComputedRef<boolean>;
64
+ isFutureTime: import("vue").ComputedRef<boolean>;
65
+ onlyRadio: import("vue").ComputedRef<boolean>;
66
+ defaultTime: import("vue").ComputedRef<string>;
67
+ changeDateShowType: () => void;
68
+ handleClickQuickBtn: (result: string) => void;
69
+ changeRadioValue: (value: string) => void;
70
+ handleChange: (val: any) => void;
71
+ isDateDisabled: (ts: number) => boolean;
72
+ timeDisabled: (ts: number) => {
73
+ isHourDisabled(hour: number): boolean | undefined;
74
+ isMinuteDisabled(minute: number, hour: number | null): boolean | undefined;
75
+ isSecondDisabled(second: number, minute: number | null, hour: number | null): boolean | undefined;
76
+ };
77
+ init: () => void;
78
+ NButton: any;
79
+ CDatePicker: import("../../../../../../../es/shared/types").SFCWithInstall<import("vue").DefineComponent<{
80
+ updateUnchangedValue: {
81
+ type: BooleanConstructor;
82
+ };
83
+ onConfirm: {
84
+ type: FunctionConstructor;
85
+ };
86
+ }, {
87
+ attrs: {
88
+ [x: string]: unknown;
89
+ };
90
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
91
+ updateUnchangedValue: {
92
+ type: BooleanConstructor;
93
+ };
94
+ onConfirm: {
95
+ type: FunctionConstructor;
96
+ };
97
+ }>> & {}>>;
98
+ datePickerRef: import("vue").Ref<AnyObject | null>;
99
+ panelInstRef: import("vue").Ref<null>;
100
+ isDateTime: import("vue").ComputedRef<boolean>;
101
+ formatRef: import("vue").ComputedRef<string>;
102
+ panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
103
+ focus: () => any;
104
+ blur: () => any;
105
+ onUpdateShow: (show: boolean) => void;
106
+ onConfirm: (...args: any[]) => void;
107
+ NDatePicker: any;
108
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
109
+ updateUnchangedValue: {
110
+ type: BooleanConstructor;
111
+ };
112
+ onConfirm: {
113
+ type: FunctionConstructor;
114
+ };
115
+ }>>, {
116
+ updateUnchangedValue: boolean;
117
+ }>>;
118
+ DateQuickBtn: import("vue").DefineComponent<{
119
+ componentCfg: {
120
+ type: PropType<AnyObject>;
121
+ };
122
+ type: {
123
+ type: PropType<"date" | "datetime">;
124
+ default: string;
125
+ };
126
+ dateFormat: {
127
+ type: StringConstructor;
128
+ default: string;
129
+ };
130
+ radioValue: {
131
+ type: StringConstructor;
132
+ default: string;
133
+ };
134
+ }, {
135
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
136
+ componentCfg: {
137
+ type: PropType<AnyObject>;
138
+ };
139
+ type: {
140
+ type: PropType<"date" | "datetime">;
141
+ default: string;
142
+ };
143
+ dateFormat: {
144
+ type: StringConstructor;
145
+ default: string;
146
+ };
147
+ radioValue: {
148
+ type: StringConstructor;
149
+ default: string;
150
+ };
151
+ }>> & {
152
+ onClickQuickBtn?: ((...args: any[]) => any) | undefined;
153
+ onChangeRadioValue?: ((...args: any[]) => any) | undefined;
154
+ }>>;
155
+ emit: (event: "clickQuickBtn" | "changeRadioValue", ...args: any[]) => void;
156
+ dateList: import("vue").Ref<any[]>;
157
+ optionSetting: import("vue").ComputedRef<any>;
158
+ isRange: import("vue").ComputedRef<any>;
159
+ initData: () => void;
160
+ handleRadioClick: (value: string) => void;
161
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clickQuickBtn" | "changeRadioValue")[], "clickQuickBtn" | "changeRadioValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
162
+ componentCfg: {
163
+ type: PropType<AnyObject>;
164
+ };
165
+ type: {
166
+ type: PropType<"date" | "datetime">;
167
+ default: string;
168
+ };
169
+ dateFormat: {
170
+ type: StringConstructor;
171
+ default: string;
172
+ };
173
+ radioValue: {
174
+ type: StringConstructor;
175
+ default: string;
176
+ };
177
+ }>> & {
178
+ onClickQuickBtn?: ((...args: any[]) => any) | undefined;
179
+ onChangeRadioValue?: ((...args: any[]) => any) | undefined;
180
+ }, {
181
+ type: "date" | "datetime";
182
+ dateFormat: string;
183
+ radioValue: string;
184
+ }>;
185
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
186
+ componentCfg: {
187
+ type: PropType<AnyObject>;
188
+ };
189
+ type: {
190
+ type: PropType<ITypeDate>;
191
+ default: string;
192
+ };
193
+ clearable: {
194
+ type: BooleanConstructor;
195
+ default: boolean;
196
+ };
197
+ valueFormat: {
198
+ type: StringConstructor;
199
+ default: string;
200
+ };
201
+ placeholder: {
202
+ type: StringConstructor;
203
+ default: string;
204
+ };
205
+ value: {
206
+ type: StringConstructor;
207
+ default: string;
208
+ };
209
+ }>> & {
210
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
211
+ }, {
212
+ type: ITypeDate;
213
+ value: string;
214
+ placeholder: string;
215
+ clearable: boolean;
216
+ valueFormat: string;
217
+ }>;
218
+ export default _default;
@@ -0,0 +1 @@
1
+ import e from"./DateInner.vue2.js";import r from"../../../../../../_virtual/_plugin-vue_export-helper.js";var t=r(e,[["__file","DateInner.vue"]]);export{t as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,ref as t,computed as a,watch as l,openBlock as u,createElementBlock as o,unref as r,createBlock as n,createCommentVNode as i,normalizeClass as d,withCtx as m,createTextVNode as p,toDisplayString as v}from"vue";import{NButton as c}from"naive-ui";import s from"../../../../../date-picker/index.js";import f from"moment";import{isString as y}from"lodash-es";import{WidgetOptionEnums as g}from"../../../types/enums.js";import{dateDisabledCollect as b,setDateDisabled as h,setTimeDisabled as k}from"../helpers/dateDisabled.js";import C from"./DateQuickBtn/index.vue.js";const M={class:"render-widget-date-range"};var T=e({__name:"DateInner",props:{componentCfg:{type:Object},type:{type:String,default:"date"},clearable:{type:Boolean,default:!1},valueFormat:{type:String,default:"yyyy-MM-dd"},placeholder:{type:String,default:"请输入"},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:T}){const Y=e,D=t(),F=t(!1),S=t(""),E=a((()=>{let e="";switch(Y.type){case"date":e="YYYY-MM-DD";break;case"datetime":e="YYYY-MM-DD HH:mm:ss"}return e})),_=a((()=>{let e="";switch(Y.type){case"date":e="选择日期";break;case"datetime":e="选择时间"}return e})),j=a((()=>{var e;return null==(e=Y.componentCfg)?void 0:e.widgetCfg.optionSetting}));a((()=>j.value===g.PAST_TIME)),a((()=>j.value===g.FUTURE_TIME));const w=a((()=>j.value!==g.SELECT_TIME)),I=a((()=>b.curTime));function x(){w.value&&(F.value=!F.value)}function B(e){T("update:value",e)}function U(e){S.value=e}function V(e){D.value=e;const t=e?f(e).format(E.value):e;T("update:value",t)}function H(e){return h(e,j.value)}function O(e){return k(e,j.value)}return l((()=>Y.value),(e=>{e&&y(e)?D.value=f(e).valueOf():D.value=null}),{immediate:!0}),w.value||(F.value=!0),(t,a)=>(u(),o("div",M,[r(w)&&!F.value?(u(),n(C,{key:0,componentCfg:e.componentCfg,type:e.type,dateFormat:r(E),radioValue:S.value,onClickQuickBtn:B,onChangeRadioValue:U},null,8,["componentCfg","type","dateFormat","radioValue"])):i("v-if",!0),r(w)?(u(),n(r(c),{key:1,secondary:"",class:d(F.value?"select-date-right":"select-date-left"),onClick:x},{default:m((()=>[p(v(r(_)),1)])),_:1},8,["class"])):i("v-if",!0),!r(w)||F.value?(u(),n(r(s),{key:2,to:"body",type:e.type,clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.placeholder,value:D.value,defaultTime:r(I),"is-date-disabled":H,"is-time-disabled":O,"onUpdate:value":V},null,8,["type","clearable","valueFormat","placeholder","value","defaultTime"])):i("v-if",!0)]))}});export{T as default};
@@ -1,6 +1,10 @@
1
1
  import { PropType } from 'vue';
2
+ import { AnyObject } from '../../../../../../../es/shared/types';
2
3
  declare type ITypeDate = 'date' | 'datetime';
3
4
  declare const _default: import("vue").DefineComponent<{
5
+ componentCfg: {
6
+ type: PropType<AnyObject>;
7
+ };
4
8
  type: {
5
9
  type: PropType<ITypeDate>;
6
10
  default: string;
@@ -23,6 +27,9 @@ declare const _default: import("vue").DefineComponent<{
23
27
  };
24
28
  }, {
25
29
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
30
+ componentCfg: {
31
+ type: PropType<AnyObject>;
32
+ };
26
33
  type: {
27
34
  type: PropType<ITypeDate>;
28
35
  default: string;
@@ -48,9 +55,18 @@ declare const _default: import("vue").DefineComponent<{
48
55
  }>>;
49
56
  emit: (event: "update:value", ...args: any[]) => void;
50
57
  valueCp: import("vue").Ref<any>;
58
+ rangeShortcuts: import("vue").Ref<any>;
51
59
  dateFormat: import("vue").ComputedRef<string>;
60
+ optionSetting: import("vue").ComputedRef<any>;
52
61
  handleChange: (val: any) => void;
53
- CDatePicker: import("../../../../..").SFCWithInstall<import("vue").DefineComponent<{
62
+ isDateDisabled: (ts: number) => boolean;
63
+ timeDisabled: (ts: number) => {
64
+ isHourDisabled(hour: number): boolean | undefined;
65
+ isMinuteDisabled(minute: number, hour: number | null): boolean | undefined;
66
+ isSecondDisabled(second: number, minute: number | null, hour: number | null): boolean | undefined;
67
+ };
68
+ init: () => void;
69
+ CDatePicker: import("../../../../../../../es/shared/types").SFCWithInstall<import("vue").DefineComponent<{
54
70
  updateUnchangedValue: {
55
71
  type: BooleanConstructor;
56
72
  };
@@ -69,7 +85,7 @@ declare const _default: import("vue").DefineComponent<{
69
85
  type: FunctionConstructor;
70
86
  };
71
87
  }>> & {}>>;
72
- datePickerRef: import("vue").Ref<import("../../../../..").AnyObject | null>;
88
+ datePickerRef: import("vue").Ref<AnyObject | null>;
73
89
  panelInstRef: import("vue").Ref<null>;
74
90
  isDateTime: import("vue").ComputedRef<boolean>;
75
91
  formatRef: import("vue").ComputedRef<string>;
@@ -90,6 +106,9 @@ declare const _default: import("vue").DefineComponent<{
90
106
  updateUnchangedValue: boolean;
91
107
  }>>;
92
108
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
109
+ componentCfg: {
110
+ type: PropType<AnyObject>;
111
+ };
93
112
  type: {
94
113
  type: PropType<ITypeDate>;
95
114
  default: string;
@@ -0,0 +1 @@
1
+ import e from"./DateOut.vue2.js";import t from"../../../../../../_virtual/_plugin-vue_export-helper.js";var r=t(e,[["__file","DateOut.vue"]]);export{r as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,ref as t,computed as a,watch as l,openBlock as r,createBlock as o,unref as u}from"vue";import p from"../../../../../date-picker/index.js";import n from"moment";import{isString as i}from"lodash-es";import{WidgetOptionEnums as m}from"../../../types/enums.js";import{DateExtraOptions as d,DateExtraMap as s}from"../helpers/dateExtraMap.js";import{setDateDisabled as v,setTimeDisabled as f}from"../helpers/dateDisabled.js";import{presetValToTimestamp as c}from"../helpers/presetValToTimestamp.js";var y=e({__name:"DateOut",props:{componentCfg:{type:Object},type:{type:String,default:"date"},clearable:{type:Boolean,default:!1},valueFormat:{type:String,default:"yyyy-MM-dd"},placeholder:{type:String,default:"请输入"},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:y}){const g=e,h=t(),b=t(),Y=a((()=>{let e="";switch(g.type){case"date":e="YYYY-MM-DD";break;case"datetime":e="YYYY-MM-DD HH:mm:ss"}return e})),M=a((()=>{var e;return null==(e=g.componentCfg)?void 0:e.widgetCfg.optionSetting}));function j(e){h.value=e;const t=e?n(e).format(Y.value):e;y("update:value",t)}function D(e){return v(e,M.value)}function C(e){return f(e,M.value)}return l((()=>g.value),(e=>{e&&i(e)?h.value=n(e).valueOf():h.value=null}),{immediate:!0}),function(){var e,t;const{originType:a}=null==(e=g.componentCfg)?void 0:e.widgetCfg,l=`${a}_${M.value||m.ALL}`,r=null!=(t=d[s[l]])?t:[];let o={};r.forEach((({label:e,value:t})=>{const a=c(t,Y.value,!0);a&&(o[e]=a.valueOf())})),b.value=o}(),(t,a)=>(r(),o(u(p),{to:"body",type:e.type,clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.placeholder,value:h.value,"default-time":"00:00:00","is-date-disabled":D,"is-time-disabled":C,shortcuts:b.value,"onUpdate:value":j},null,8,["type","clearable","valueFormat","placeholder","value","shortcuts"]))}});export{y as default};
@@ -0,0 +1,71 @@
1
+ import { PropType } from 'vue';
2
+ import { AnyObject } from '../../../../../../../../es/shared/types';
3
+ declare type ITypeDate = 'date' | 'datetime';
4
+ declare const _default: import("vue").DefineComponent<{
5
+ componentCfg: {
6
+ type: PropType<AnyObject>;
7
+ };
8
+ type: {
9
+ type: PropType<ITypeDate>;
10
+ default: string;
11
+ };
12
+ dateFormat: {
13
+ type: StringConstructor;
14
+ default: string;
15
+ };
16
+ radioValue: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ }, {
21
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
22
+ componentCfg: {
23
+ type: PropType<AnyObject>;
24
+ };
25
+ type: {
26
+ type: PropType<ITypeDate>;
27
+ default: string;
28
+ };
29
+ dateFormat: {
30
+ type: StringConstructor;
31
+ default: string;
32
+ };
33
+ radioValue: {
34
+ type: StringConstructor;
35
+ default: string;
36
+ };
37
+ }>> & {
38
+ onClickQuickBtn?: ((...args: any[]) => any) | undefined;
39
+ onChangeRadioValue?: ((...args: any[]) => any) | undefined;
40
+ }>>;
41
+ emit: (event: "clickQuickBtn" | "changeRadioValue", ...args: any[]) => void;
42
+ dateList: import("vue").Ref<any[]>;
43
+ optionSetting: import("vue").ComputedRef<any>;
44
+ isRange: import("vue").ComputedRef<any>;
45
+ initData: () => void;
46
+ handleRadioClick: (value: string) => void;
47
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clickQuickBtn" | "changeRadioValue")[], "clickQuickBtn" | "changeRadioValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
48
+ componentCfg: {
49
+ type: PropType<AnyObject>;
50
+ };
51
+ type: {
52
+ type: PropType<ITypeDate>;
53
+ default: string;
54
+ };
55
+ dateFormat: {
56
+ type: StringConstructor;
57
+ default: string;
58
+ };
59
+ radioValue: {
60
+ type: StringConstructor;
61
+ default: string;
62
+ };
63
+ }>> & {
64
+ onClickQuickBtn?: ((...args: any[]) => any) | undefined;
65
+ onChangeRadioValue?: ((...args: any[]) => any) | undefined;
66
+ }, {
67
+ type: ITypeDate;
68
+ dateFormat: string;
69
+ radioValue: string;
70
+ }>;
71
+ export default _default;
@@ -0,0 +1 @@
1
+ import e from"./index.vue2.js";import r from"../../../../../../../_virtual/_plugin-vue_export-helper.js";var i=r(e,[["__file","index.vue"]]);export{i as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,ref as t,computed as a,openBlock as o,createElementBlock as n,Fragment as i,renderList as r,normalizeClass as l,toDisplayString as u}from"vue";import{WidgetDateOptionEnums as p}from"../../helpers/enums.js";import{widgetDateValOptions as c}from"../../helpers/dateExtraMap.js";import{formatDateRangeInfo as d,presetValToTimestamp as m}from"../../helpers/presetValToTimestamp.js";import{WidgetOptionEnums as s}from"../../../../types/enums.js";const f={class:"radio-date-group"},g=["onClick"];var v=e({__name:"index",props:{componentCfg:{type:Object},type:{type:String,default:"date"},dateFormat:{type:String,default:"YYYY-MM-DD"},radioValue:{type:String,default:""}},emits:["clickQuickBtn","changeRadioValue"],setup(e,{emit:v}){const y=e,C=t([]),k=a((()=>{var e;return null==(e=y.componentCfg)?void 0:e.widgetCfg.optionSetting})),V=a((()=>{var e;return null==(e=y.componentCfg)?void 0:e.rangeFilter}));return function(){var e,t;const{originType:a}=null==(e=y.componentCfg)?void 0:e.widgetCfg,o=`${a}_${k.value||s.ALL}${V.value?"_RANGE":""}`,n=p[o];C.value=null!=(t=c[n])?t:[]}(),(t,a)=>(o(),n("div",f,[(o(!0),n(i,null,r(C.value,(t=>(o(),n("span",{key:t.con,class:l(["radio-date-item",e.radioValue===t.con?"radio-date-item-active":""]),onClick:e=>function(e){const t=y.radioValue===e?"":e;if(t){const e=V.value?d(t,y.dateFormat,k.value):m(t,y.dateFormat);v("clickQuickBtn",e)}v("changeRadioValue",t)}(t.con)},u(t.title),11,g)))),128))]))}});export{v as default};
@@ -1,6 +1,10 @@
1
1
  import { PropType } from 'vue';
2
+ import { AnyObject } from '../../../../../../../es/shared/types';
2
3
  declare type ITypeDate = 'date' | 'datetime';
3
4
  declare const _default: import("vue").DefineComponent<{
5
+ componentCfg: {
6
+ type: PropType<AnyObject>;
7
+ };
4
8
  type: {
5
9
  type: PropType<ITypeDate>;
6
10
  default: string;
@@ -27,6 +31,9 @@ declare const _default: import("vue").DefineComponent<{
27
31
  };
28
32
  }, {
29
33
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
34
+ componentCfg: {
35
+ type: PropType<AnyObject>;
36
+ };
30
37
  type: {
31
38
  type: PropType<ITypeDate>;
32
39
  default: string;
@@ -55,20 +62,37 @@ declare const _default: import("vue").DefineComponent<{
55
62
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
56
63
  }>>;
57
64
  emit: (event: "update:value", ...args: any[]) => void;
58
- dateList: import("vue").Ref<any[]>;
59
65
  isShowDateRange: import("vue").Ref<boolean>;
60
66
  radioValue: import("vue").Ref<string>;
61
67
  startDate: import("vue").Ref<any>;
62
68
  endDate: import("vue").Ref<any>;
69
+ optionSetting: import("vue").ComputedRef<any>;
70
+ onlyRadio: import("vue").ComputedRef<boolean>;
71
+ isPastTime: import("vue").ComputedRef<boolean>;
72
+ isFutureTime: import("vue").ComputedRef<boolean>;
63
73
  dateFormat: import("vue").ComputedRef<string>;
64
74
  showTabStr: import("vue").ComputedRef<string>;
65
- initData: () => void;
66
- handleRadioClick: (value: string) => void;
75
+ startDefault: import("vue").ComputedRef<string>;
76
+ endDefault: import("vue").ComputedRef<string>;
77
+ handleClickQuickBtn: (result: string) => void;
78
+ changeRadioValue: (value: string) => void;
79
+ changeDateShowType: () => void;
67
80
  handleChange: (val: any, type: 'start' | 'end') => void;
68
81
  isStartDateDisabled: (ts: number) => boolean;
82
+ timeStartDisabled: (ts: number) => {
83
+ isHourDisabled(hour: number): boolean | 0;
84
+ isMinuteDisabled(minute: number, hour: number | null): boolean | 0;
85
+ isSecondDisabled(second: number, minute: number | null, hour: number | null): boolean | 0;
86
+ };
69
87
  isEndDateDisabled: (ts: number) => boolean;
88
+ timeEndDisabled: (ts: number) => {
89
+ isHourDisabled(hour: number): boolean | 0;
90
+ isMinuteDisabled(minute: number, hour: number | null): boolean | 0;
91
+ isSecondDisabled(second: number, minute: number | null, hour: number | null): boolean | 0;
92
+ };
93
+ init: () => void;
70
94
  NButton: any;
71
- CDatePicker: import("../../../../..").SFCWithInstall<import("vue").DefineComponent<{
95
+ CDatePicker: import("../../../../../../../es/shared/types").SFCWithInstall<import("vue").DefineComponent<{
72
96
  updateUnchangedValue: {
73
97
  type: BooleanConstructor;
74
98
  };
@@ -87,7 +111,7 @@ declare const _default: import("vue").DefineComponent<{
87
111
  type: FunctionConstructor;
88
112
  };
89
113
  }>> & {}>>;
90
- datePickerRef: import("vue").Ref<import("../../../../..").AnyObject | null>;
114
+ datePickerRef: import("vue").Ref<AnyObject | null>;
91
115
  panelInstRef: import("vue").Ref<null>;
92
116
  isDateTime: import("vue").ComputedRef<boolean>;
93
117
  formatRef: import("vue").ComputedRef<string>;
@@ -107,7 +131,77 @@ declare const _default: import("vue").DefineComponent<{
107
131
  }>>, {
108
132
  updateUnchangedValue: boolean;
109
133
  }>>;
134
+ DateQuickBtn: import("vue").DefineComponent<{
135
+ componentCfg: {
136
+ type: PropType<AnyObject>;
137
+ };
138
+ type: {
139
+ type: PropType<"date" | "datetime">;
140
+ default: string;
141
+ };
142
+ dateFormat: {
143
+ type: StringConstructor;
144
+ default: string;
145
+ };
146
+ radioValue: {
147
+ type: StringConstructor;
148
+ default: string;
149
+ };
150
+ }, {
151
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
152
+ componentCfg: {
153
+ type: PropType<AnyObject>;
154
+ };
155
+ type: {
156
+ type: PropType<"date" | "datetime">;
157
+ default: string;
158
+ };
159
+ dateFormat: {
160
+ type: StringConstructor;
161
+ default: string;
162
+ };
163
+ radioValue: {
164
+ type: StringConstructor;
165
+ default: string;
166
+ };
167
+ }>> & {
168
+ onClickQuickBtn?: ((...args: any[]) => any) | undefined;
169
+ onChangeRadioValue?: ((...args: any[]) => any) | undefined;
170
+ }>>;
171
+ emit: (event: "clickQuickBtn" | "changeRadioValue", ...args: any[]) => void;
172
+ dateList: import("vue").Ref<any[]>;
173
+ optionSetting: import("vue").ComputedRef<any>;
174
+ isRange: import("vue").ComputedRef<any>;
175
+ initData: () => void;
176
+ handleRadioClick: (value: string) => void;
177
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clickQuickBtn" | "changeRadioValue")[], "clickQuickBtn" | "changeRadioValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
178
+ componentCfg: {
179
+ type: PropType<AnyObject>;
180
+ };
181
+ type: {
182
+ type: PropType<"date" | "datetime">;
183
+ default: string;
184
+ };
185
+ dateFormat: {
186
+ type: StringConstructor;
187
+ default: string;
188
+ };
189
+ radioValue: {
190
+ type: StringConstructor;
191
+ default: string;
192
+ };
193
+ }>> & {
194
+ onClickQuickBtn?: ((...args: any[]) => any) | undefined;
195
+ onChangeRadioValue?: ((...args: any[]) => any) | undefined;
196
+ }, {
197
+ type: "date" | "datetime";
198
+ dateFormat: string;
199
+ radioValue: string;
200
+ }>;
110
201
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
202
+ componentCfg: {
203
+ type: PropType<AnyObject>;
204
+ };
111
205
  type: {
112
206
  type: PropType<ITypeDate>;
113
207
  default: string;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as a,computed as l,watch as t,openBlock as u,createElementBlock as r,Fragment as v,renderList as d,normalizeClass as i,toDisplayString as o,createCommentVNode as n,createVNode as s,unref as c,withCtx as m,createTextVNode as p,createElementVNode as f}from"vue";import{NButton as y}from"naive-ui";import b from"../../../../../date-picker/index.js";import h from"moment";import{isString as g}from"lodash-es";import{getAllDateRangeInfo as k}from"../helpers/presetValToTimestamp.js";const Y={class:"render-widget-date-range"},F={key:0,class:"radio-date-group"},M=["onClick"],D={key:1,class:"date-detail-range"},S=f("span",{class:"divider"},null,-1);var w=e({__name:"DateRangeInner",props:{type:{type:String,default:"date"},clearable:{type:Boolean,default:!1},valueFormat:{type:String,default:"yyyy-MM-dd"},startPlaceholder:{type:String,default:"起始"},endPlaceholder:{type:String,default:"截止"},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:f}){const w=e,P=a([]),C=a(!1),_=a(""),j=a(),x=a(),H=l((()=>{let e="";switch(w.type){case"date":e="YYYY-MM-DD";break;case"datetime":e="YYYY-MM-DD HH:mm:ss"}return e})),O=l((()=>{let e="";switch(w.type){case"date":e="选择日期";break;case"datetime":e="选择时间"}return e}));function T(e,a){switch(a){case"start":j.value=e;break;case"end":x.value=e}const l=j.value?h(j.value).format(H.value):null,t=x.value?h(x.value).format(H.value):null;f("update:value",l||t?`${null!=l?l:""} ~ ${null!=t?t:""}`:"")}function U(e){return!!x.value&&e>x.value}function $(e){return!!j.value&&e<j.value}return t((()=>w.value),(e=>{if(e&&g(e)&&e.includes("~")){const[a,l]=e.split("~");return a.trim()&&(j.value=h(a.trim()).valueOf()),void(l.trim()&&(x.value=h(l.trim()).valueOf()))}j.value=x.value=null,_.value=""}),{immediate:!0}),function(){const e=k(H.value);P.value=e}(),(a,l)=>(u(),r("div",Y,[C.value?n("v-if",!0):(u(),r("div",F,[(u(!0),r(v,null,d(P.value,(e=>(u(),r("span",{key:e.value,class:i(["radio-date-item",_.value===e.value?"radio-date-item-active":""]),onClick:a=>{return l=e.value,_.value===l?_.value="":_.value=l,void(_.value&&f("update:value",_.value));var l}},o(e.label),11,M)))),128))])),s(c(y),{secondary:"",class:i(C.value?"select-date-right":"select-date-left"),onClick:l[0]||(l[0]=e=>C.value=!C.value)},{default:m((()=>[p(o(c(O)),1)])),_:1},8,["class"]),C.value?(u(),r("div",D,[s(c(b),{type:e.type,to:"body","default-time":"00:00:00",clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.startPlaceholder,value:j.value,"is-date-disabled":U,"onUpdate:value":l[1]||(l[1]=e=>T(e,"start"))},null,8,["type","clearable","valueFormat","placeholder","value"]),S,s(c(b),{type:e.type,to:"body","default-time":"23:59:59",clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.endPlaceholder,value:x.value,"is-date-disabled":$,"onUpdate:value":l[2]||(l[2]=e=>T(e,"end"))},null,8,["type","clearable","valueFormat","placeholder","value"])])):n("v-if",!0)]))}});export{w as default};
1
+ import{defineComponent as e,ref as a,computed as t,watch as l,openBlock as u,createElementBlock as r,unref as n,createBlock as i,createCommentVNode as o,normalizeClass as d,withCtx as v,createTextVNode as c,toDisplayString as m,createVNode as s,createElementVNode as p}from"vue";import{NButton as f}from"naive-ui";import y from"../../../../../date-picker/index.js";import g from"moment";import{isString as b}from"lodash-es";import{WidgetOptionEnums as h}from"../../../types/enums.js";import{dateDisabledCollect as k,isStartDateRangeDisabled as C,isTimeStartRangeDisabled as F,isEndDateRangeDisabled as M,isTimeEndRangeDisabled as S}from"../helpers/dateDisabled.js";import T from"./DateQuickBtn/index.vue.js";const Y={class:"render-widget-date-range"},D={key:2,class:"date-detail-range"},E=p("span",{class:"divider"},null,-1);var _=e({__name:"DateRangeInner",props:{componentCfg:{type:Object},type:{type:String,default:"date"},clearable:{type:Boolean,default:!1},valueFormat:{type:String,default:"yyyy-MM-dd"},startPlaceholder:{type:String,default:"起始"},endPlaceholder:{type:String,default:"截止"},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:p}){const _=e,j=a(!1),w=a(""),P=a(),I=a(),U=t((()=>{var e;return null==(e=_.componentCfg)?void 0:e.widgetCfg.optionSetting})),x=t((()=>U.value!==h.SELECT_TIME)),B=t((()=>U.value===h.PAST_TIME)),O=t((()=>U.value===h.FUTURE_TIME)),R=t((()=>{let e="";switch(_.type){case"date":e="YYYY-MM-DD";break;case"datetime":e="YYYY-MM-DD HH:mm:ss"}return e})),V=t((()=>{let e="";switch(_.type){case"date":e="选择日期";break;case"datetime":e="选择时间"}return e})),H=t((()=>O.value?k.curTime:"00:00:00")),Q=t((()=>B.value?k.curTime:"23:59:59"));function $(e){p("update:value",e)}function A(e){w.value=e}function L(){x.value&&(j.value=!j.value)}function q(e,a){switch(a){case"start":P.value=e;break;case"end":I.value=e}const t=P.value?g(P.value).format(R.value):null,l=I.value?g(I.value).format(R.value):null;p("update:value",t||l?`${null!=t?t:""} ~ ${null!=l?l:""}`:"")}function z(e){return C(e,U.value,I.value)}function G(e){return F(e,U.value,I.value)}function J(e){return M(e,U.value,P.value)}function K(e){return S(e,U.value,P.value)}return l((()=>_.value),(e=>{if(e&&b(e)&&e.includes("~")){const[a,t]=e.split("~");return a.trim()&&(P.value=g(a.trim()).valueOf()),void(t.trim()&&(I.value=g(t.trim()).valueOf()))}P.value=I.value=null,w.value=""}),{immediate:!0}),x.value||(j.value=!0),(a,t)=>(u(),r("div",Y,[n(x)&&!j.value?(u(),i(T,{key:0,componentCfg:e.componentCfg,type:e.type,dateFormat:n(R),radioValue:w.value,onClickQuickBtn:$,onChangeRadioValue:A},null,8,["componentCfg","type","dateFormat","radioValue"])):o("v-if",!0),n(x)?(u(),i(n(f),{key:1,secondary:"",class:d(j.value?"select-date-right":"select-date-left"),onClick:L},{default:v((()=>[c(m(n(V)),1)])),_:1},8,["class"])):o("v-if",!0),o(' default-time="23:59:59" '),!n(x)||j.value?(u(),r("div",D,[s(n(y),{type:e.type,to:"body","default-time":n(H),clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.startPlaceholder,value:P.value,"is-date-disabled":z,"is-time-disabled":G,"onUpdate:value":t[0]||(t[0]=e=>q(e,"start"))},null,8,["type","default-time","clearable","valueFormat","placeholder","value"]),E,s(n(y),{type:e.type,to:"body","default-time":n(Q),clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.endPlaceholder,value:I.value,"is-date-disabled":J,"is-time-disabled":K,"onUpdate:value":t[1]||(t[1]=e=>q(e,"end"))},null,8,["type","default-time","clearable","valueFormat","placeholder","value"])])):o("v-if",!0)]))}});export{_ as default};
@@ -1,4 +1,5 @@
1
1
  import { PropType } from 'vue';
2
+ import { AnyObject } from '../../../../../../../es/shared/types';
2
3
  declare type ITypeDate = 'daterange' | 'datetimerange';
3
4
  declare const _default: import("vue").DefineComponent<{
4
5
  type: {
@@ -56,15 +57,18 @@ declare const _default: import("vue").DefineComponent<{
56
57
  }>>;
57
58
  emit: (event: "update:value", ...args: any[]) => void;
58
59
  valueCp: import("vue").Ref<any>;
60
+ rangeShortcuts: import("vue").Ref<any>;
59
61
  dateFormat: import("vue").ComputedRef<string>;
60
- rangeShortcuts: {
61
- 今天: number[];
62
- 昨天: number[];
63
- 近一周: number[];
64
- 近一月: number[];
65
- };
62
+ optionSetting: import("vue").ComputedRef<any>;
66
63
  handleChange: (val: any) => void;
67
- CDatePicker: import("../../../../..").SFCWithInstall<import("vue").DefineComponent<{
64
+ isDateDisabled: (ts: number) => boolean;
65
+ timeDisabled: (ts: number) => {
66
+ isHourDisabled(hour: number): boolean | undefined;
67
+ isMinuteDisabled(minute: number, hour: number | null): boolean | undefined;
68
+ isSecondDisabled(second: number, minute: number | null, hour: number | null): boolean | undefined;
69
+ };
70
+ init: () => void;
71
+ CDatePicker: import("../../../../../../../es/shared/types").SFCWithInstall<import("vue").DefineComponent<{
68
72
  updateUnchangedValue: {
69
73
  type: BooleanConstructor;
70
74
  };
@@ -83,7 +87,7 @@ declare const _default: import("vue").DefineComponent<{
83
87
  type: FunctionConstructor;
84
88
  };
85
89
  }>> & {}>>;
86
- datePickerRef: import("vue").Ref<import("../../../../..").AnyObject | null>;
90
+ datePickerRef: import("vue").Ref<AnyObject | null>;
87
91
  panelInstRef: import("vue").Ref<null>;
88
92
  isDateTime: import("vue").ComputedRef<boolean>;
89
93
  formatRef: import("vue").ComputedRef<string>;
@@ -133,9 +137,9 @@ declare const _default: import("vue").DefineComponent<{
133
137
  }, {
134
138
  type: ITypeDate;
135
139
  value: string;
140
+ componentCfg: Record<string, any>;
136
141
  clearable: boolean;
137
142
  startPlaceholder: string;
138
143
  endPlaceholder: string;
139
- componentCfg: Record<string, any>;
140
144
  }>;
141
145
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as a,computed as t,watch as l,openBlock as r,createBlock as u,unref as d}from"vue";import s from"../../../../../date-picker/index.js";import f from"moment";import{isString as o}from"lodash-es";var n=e({__name:"DateRangeOut",props:{type:{type:String,default:"daterange"},clearable:{type:Boolean,default:!1},startPlaceholder:{type:String,default:"起始"},endPlaceholder:{type:String,default:"截止"},componentCfg:{type:Object,default:()=>({})},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:n}){const c=e,p=a(),v=t((()=>{let e="";switch(c.type){case"daterange":e="YYYY-MM-DD";break;case"datetimerange":e="YYYY-MM-DD HH:mm:ss"}return e})),m={"今天":[f().startOf("day").valueOf(),f().endOf("day").valueOf()],"昨天":[f().subtract(1,"days").startOf("day").valueOf(),f().subtract(1,"days").endOf("day").valueOf()],"近一周":[f().subtract(1,"w").startOf("day").valueOf(),f().endOf("day").valueOf()],"近一月":[f().subtract(1,"months").startOf("day").valueOf(),f().endOf("day").valueOf()]};function i(e){if(e){const[a,t]=e,l=`${f(a).format(v.value)} ~ ${f(t).format(v.value)}`;n("update:value",l)}else n("update:value",e)}return l((()=>c.value),(e=>{if(e&&o(e)&&e.includes("~")){const[a,t]=e.split("~");p.value=[f(a.trim()).valueOf(),f(t.trim()).valueOf()]}else p.value=null}),{immediate:!0}),(a,t)=>(r(),u(d(s),{to:"body",type:e.type,clearable:e.clearable,startPlaceholder:e.startPlaceholder,endPlaceholder:e.endPlaceholder,value:p.value,shortcuts:m,"onUpdate:value":i},null,8,["type","clearable","startPlaceholder","endPlaceholder","value"]))}});export{n as default};
1
+ import{defineComponent as e,ref as t,computed as a,watch as l,openBlock as r,createBlock as o,unref as u}from"vue";import n from"../../../../../date-picker/index.js";import i from"moment";import{isString as s}from"lodash-es";import{WidgetOptionEnums as d}from"../../../types/enums.js";import{DateExtraOptions as p,DateExtraMap as m}from"../helpers/dateExtraMap.js";import{formatDateRangeInfo as c}from"../helpers/presetValToTimestamp.js";import{setDateDisabled as f,setTimeDisabled as v}from"../helpers/dateDisabled.js";var g=e({__name:"DateRangeOut",props:{type:{type:String,default:"daterange"},clearable:{type:Boolean,default:!1},startPlaceholder:{type:String,default:"起始"},endPlaceholder:{type:String,default:"截止"},componentCfg:{type:Object,default:()=>({})},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:g}){const h=e,y=t(),b=t(),P=a((()=>{let e="";switch(h.type){case"daterange":e="YYYY-MM-DD";break;case"datetimerange":e="YYYY-MM-DD HH:mm:ss"}return e})),Y=a((()=>{var e;return null==(e=h.componentCfg)?void 0:e.widgetCfg.optionSetting}));function j(e){if(e){const[t,a]=e,l=`${i(t).format(P.value)} ~ ${i(a).format(P.value)}`;g("update:value",l)}else g("update:value",e)}function D(e){return f(e,Y.value)}function O(e){return v(e,Y.value)}return l((()=>h.value),(e=>{if(e&&s(e)&&e.includes("~")){const[t,a]=e.split("~");y.value=[i(t.trim()).valueOf(),i(a.trim()).valueOf()]}else y.value=null}),{immediate:!0}),function(){var e,t;const{originType:a}=null==(e=h.componentCfg)?void 0:e.widgetCfg,l=`${a}_${Y.value||d.ALL}_RANGE`,r=null!=(t=p[m[l]])?t:[];let o={};r.forEach((({label:e,value:t})=>{const a=c(t,P.value,Y.value,!0);if(a){const[t,l]=a;o[e]=[t.valueOf(),l.valueOf()]}})),b.value=o}(),(t,a)=>(r(),o(u(n),{to:"body",type:e.type,clearable:e.clearable,startPlaceholder:e.startPlaceholder,endPlaceholder:e.endPlaceholder,value:y.value,"is-date-disabled":D,"is-time-disabled":O,shortcuts:b.value,"onUpdate:value":j},null,8,["type","clearable","startPlaceholder","endPlaceholder","value","shortcuts"]))}});export{g as default};