cnhis-design-vue 3.1.50-beta.2 → 3.1.50-beta.21

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 (119) hide show
  1. package/es/components/card-reader-sdk/src/cardReaderSDK.d.ts +1 -0
  2. package/es/components/card-reader-sdk/src/cardReaderSDK.js +1 -1
  3. package/es/components/card-reader-sdk/src/insuranceSDK.js +1 -1
  4. package/es/components/card-reader-sdk/src/types/index.d.ts +1 -1
  5. package/es/components/card-reader-sdk/src/utils/index.d.ts +0 -3
  6. package/es/components/card-reader-sdk/src/utils/index.js +1 -1
  7. package/es/components/classification/index.d.ts +3 -1
  8. package/es/components/classification/src/components/search-filter/index.vue.d.ts +3 -1
  9. package/es/components/classification/src/components/set-classification/index.vue.d.ts +3 -1
  10. package/es/components/classification/src/index.vue.d.ts +3 -1
  11. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
  12. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  13. package/es/components/fabric-chart/src/hooks/index.js +1 -1
  14. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +3 -0
  15. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  16. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
  17. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.d.ts +1 -1
  18. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
  19. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  20. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
  21. package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +1 -1
  22. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  23. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  24. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
  25. package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
  26. package/es/components/fabric-chart/src/hooks/useEvent.d.ts +1 -0
  27. package/es/components/fabric-chart/src/hooks/useEvent.js +1 -1
  28. package/es/components/field-set/index.d.ts +14 -1
  29. package/es/components/field-set/src/FieldSet.vue.d.ts +14 -1
  30. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  31. package/es/components/form-config/index.d.ts +422 -73
  32. package/es/components/form-config/src/FormConfig.vue.d.ts +423 -74
  33. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  34. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +120 -23
  35. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +138 -35
  36. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +121 -0
  37. package/es/components/form-config/src/components/FormConfigEventSetting.vue.js +1 -0
  38. package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -0
  39. package/es/components/form-config/src/constants/index.d.ts +19 -1
  40. package/es/components/form-config/src/constants/index.js +1 -1
  41. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
  42. package/es/components/form-config/src/types/index.d.ts +7 -3
  43. package/es/components/form-config/style/index.css +1 -1
  44. package/es/components/form-render/index.d.ts +120 -23
  45. package/es/components/form-render/src/FormRender.vue.d.ts +119 -22
  46. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  47. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +120 -23
  48. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
  49. package/es/components/form-render/src/components/renderer/searchCascade.d.ts +1 -1
  50. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  51. package/es/components/form-render/src/components/renderer/select.d.ts +3 -0
  52. package/es/components/form-render/src/components/renderer/select.js +1 -1
  53. package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
  54. package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +2 -5
  55. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  56. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +173 -4
  57. package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
  58. package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +2 -2
  59. package/es/components/form-render/src/hooks/useFormAsyncQueue.js +1 -1
  60. package/es/components/form-render/src/hooks/useFormContext.d.ts +15 -2
  61. package/es/components/form-render/src/hooks/useFormContext.js +1 -1
  62. package/es/components/form-render/src/hooks/useFormRenderLifeCycle.d.ts +6 -6
  63. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  64. package/es/components/form-render/src/hooks/useLowCodeReactions.d.ts +2 -2
  65. package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -1
  66. package/es/components/form-render/src/types/fieldItem.d.ts +1 -0
  67. package/es/components/form-render/src/types/index.d.ts +6 -21
  68. package/es/components/form-render/style/index.css +1 -1
  69. package/es/components/iho-table/index.d.ts +26 -0
  70. package/es/components/iho-table/index.js +1 -1
  71. package/es/components/iho-table/src/IhoTable.vue.d.ts +26 -0
  72. package/es/components/iho-table/src/constants/index.d.ts +1 -2
  73. package/es/components/iho-table/src/constants/index.js +1 -1
  74. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +3 -1
  75. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -1
  76. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
  77. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +1 -1
  78. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
  79. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +18 -0
  80. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  81. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
  82. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
  83. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
  84. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
  85. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
  86. package/es/components/iho-table/src/types/index.d.ts +14 -1
  87. package/es/components/iho-table/src/utils/index.d.ts +1 -1
  88. package/es/components/iho-table/src/utils/index.js +1 -1
  89. package/es/components/iho-table/src/utils/separateMap.d.ts +5 -0
  90. package/es/components/iho-table/src/utils/separateMap.js +1 -0
  91. package/es/components/iho-table/style/index.css +1 -1
  92. package/es/components/index.css +1 -1
  93. package/es/components/info-header/index.d.ts +346 -65
  94. package/es/components/info-header/src/InfoHeader.vue.d.ts +346 -65
  95. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +86 -3
  96. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +86 -3
  97. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +206 -26
  98. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +120 -23
  99. package/es/components/search-cascader/index.d.ts +4 -0
  100. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +4 -0
  101. package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
  102. package/es/components/shortcut-setter/index.d.ts +121 -23
  103. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +121 -23
  104. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +2 -0
  105. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +1 -0
  106. package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -1
  107. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +1 -0
  108. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -1
  109. package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +2 -0
  110. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +3 -1
  111. package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -1
  112. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +28 -0
  113. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  114. package/es/shared/package.json.js +1 -1
  115. package/es/shared/types/business.d.ts +20 -0
  116. package/es/shared/utils/business.d.ts +2 -1
  117. package/es/shared/utils/business.js +1 -1
  118. package/es/shared/utils/index.js +1 -1
  119. package/package.json +2 -2
@@ -132,6 +132,7 @@ declare const _default: import("vue").DefineComponent<{
132
132
  date_format?: string | undefined;
133
133
  step_length?: string | number | undefined;
134
134
  urlConfig?: {
135
+ [x: string]: any;
135
136
  url: string;
136
137
  method?: import("../../../../es/components/form-render").FormRequestType | undefined;
137
138
  nameKey?: string | undefined;
@@ -1873,9 +1874,9 @@ declare const _default: import("vue").DefineComponent<{
1873
1874
  lifeCycle: {
1874
1875
  type: import("vue").PropType<Partial<{
1875
1876
  onSetup(): void;
1876
- beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
1877
- afterRequest(fieldKey: string, payload?: any): import("../../../../es/shared/types").AnyObject[];
1878
- afterOptionInit(fieldKey: string, options: import("../../../../es/shared/types").AnyObject[]): void;
1877
+ beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
1878
+ afterRequest(fieldKey: string, res?: any, payload?: import("../../../../es/shared/types").AnyObject | undefined): import("../../../../es/shared/types").AnyObject[];
1879
+ afterOptionInit(fieldKey: string, options: import("../../../../es/shared/types").AnyObject[], payload?: import("../../../../es/shared/types").AnyObject | undefined): void;
1879
1880
  }>>;
1880
1881
  };
1881
1882
  requestInstance: {
@@ -1886,7 +1887,7 @@ declare const _default: import("vue").DefineComponent<{
1886
1887
  default: boolean;
1887
1888
  };
1888
1889
  lowCodeReactions: {
1889
- type: import("vue").PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
1890
+ type: import("vue").PropType<import("../../../../es/shared/types").FormLowCodeReactions.Config[]>;
1890
1891
  };
1891
1892
  operationalForm: {
1892
1893
  type: import("vue").PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
@@ -1906,6 +1907,7 @@ declare const _default: import("vue").DefineComponent<{
1906
1907
  type: BooleanConstructor;
1907
1908
  default: boolean;
1908
1909
  };
1910
+ forceClearable: BooleanConstructor;
1909
1911
  }, {
1910
1912
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
1911
1913
  fieldList: {
@@ -2017,9 +2019,9 @@ declare const _default: import("vue").DefineComponent<{
2017
2019
  lifeCycle: {
2018
2020
  type: import("vue").PropType<Partial<{
2019
2021
  onSetup(): void;
2020
- beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
2021
- afterRequest(fieldKey: string, payload?: any): import("../../../../es/shared/types").AnyObject[];
2022
- afterOptionInit(fieldKey: string, options: import("../../../../es/shared/types").AnyObject[]): void;
2022
+ beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
2023
+ afterRequest(fieldKey: string, res?: any, payload?: import("../../../../es/shared/types").AnyObject | undefined): import("../../../../es/shared/types").AnyObject[];
2024
+ afterOptionInit(fieldKey: string, options: import("../../../../es/shared/types").AnyObject[], payload?: import("../../../../es/shared/types").AnyObject | undefined): void;
2023
2025
  }>>;
2024
2026
  };
2025
2027
  requestInstance: {
@@ -2030,7 +2032,7 @@ declare const _default: import("vue").DefineComponent<{
2030
2032
  default: boolean;
2031
2033
  };
2032
2034
  lowCodeReactions: {
2033
- type: import("vue").PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
2035
+ type: import("vue").PropType<import("../../../../es/shared/types").FormLowCodeReactions.Config[]>;
2034
2036
  };
2035
2037
  operationalForm: {
2036
2038
  type: import("vue").PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
@@ -2050,6 +2052,7 @@ declare const _default: import("vue").DefineComponent<{
2050
2052
  type: BooleanConstructor;
2051
2053
  default: boolean;
2052
2054
  };
2055
+ forceClearable: BooleanConstructor;
2053
2056
  }>> & {
2054
2057
  onFormChange?: ((...args: any[]) => any) | undefined;
2055
2058
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -2060,7 +2063,17 @@ declare const _default: import("vue").DefineComponent<{
2060
2063
  nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
2061
2064
  formRenderRef: import("vue").Ref<HTMLElement | undefined>;
2062
2065
  formHeight: import("vue").ComputedRef<string>;
2063
- SchemaField: Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
2066
+ SchemaField: import("vue").DefineComponent<Record<keyof import("@formily/vue").ISchemaFieldProps, any>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Record<keyof import("@formily/vue").ISchemaFieldProps, any>>>, {
2067
+ name: any;
2068
+ components: any;
2069
+ schema: any;
2070
+ scope: any;
2071
+ basePath: any;
2072
+ onlyRenderProperties: any;
2073
+ onlyRenderSelf: any;
2074
+ mapProperties: any;
2075
+ filterProperties: any;
2076
+ }>;
2064
2077
  businessCollector: import("../../../../es/components/form-render").BusinessCollector;
2065
2078
  formItemDepsCollector: import("../../../../es/components/form-render").FormItemDepsCollector;
2066
2079
  changeContextCollector: import("../../../../es/components/form-render").ContextCollector;
@@ -2077,14 +2090,14 @@ declare const _default: import("vue").DefineComponent<{
2077
2090
  onScroll: (scrollEvent: Event) => void;
2078
2091
  callLifeCycle: <T extends "onSetup" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
2079
2092
  onSetup(): void;
2080
- beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
2081
- afterRequest(fieldKey: string, payload?: any): import("../../../../es/shared/types").AnyObject[];
2082
- afterOptionInit(fieldKey: string, options: import("../../../../es/shared/types").AnyObject[]): void;
2093
+ beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
2094
+ afterRequest(fieldKey: string, res?: any, payload?: import("../../../../es/shared/types").AnyObject | undefined): import("../../../../es/shared/types").AnyObject[];
2095
+ afterOptionInit(fieldKey: string, options: import("../../../../es/shared/types").AnyObject[], payload?: import("../../../../es/shared/types").AnyObject | undefined): void;
2083
2096
  }>>[T]> | undefined) => import("../../../../es/shared/types").UndefinedAble<ReturnType<Required<Partial<{
2084
2097
  onSetup(): void;
2085
- beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
2086
- afterRequest(fieldKey: string, payload?: any): import("../../../../es/shared/types").AnyObject[];
2087
- afterOptionInit(fieldKey: string, options: import("../../../../es/shared/types").AnyObject[]): void;
2098
+ beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
2099
+ afterRequest(fieldKey: string, res?: any, payload?: import("../../../../es/shared/types").AnyObject | undefined): import("../../../../es/shared/types").AnyObject[];
2100
+ afterOptionInit(fieldKey: string, options: import("../../../../es/shared/types").AnyObject[], payload?: import("../../../../es/shared/types").AnyObject | undefined): void;
2088
2101
  }>>[T]>>;
2089
2102
  triggerAutoHidden: (field: import("../../../../es/components/form-render").GeneralField) => Promise<void>;
2090
2103
  observeFormGraph: Record<string, import("../../../../es/components/form-render").GeneralField>;
@@ -2094,15 +2107,98 @@ declare const _default: import("vue").DefineComponent<{
2094
2107
  formModel: import("../../../../es/components/form-render").Form<{
2095
2108
  [x: string]: any;
2096
2109
  }>;
2097
- lowCodeReactionsHandler: (field: string, value: unknown) => void;
2110
+ lowCodeReactionsHandler: (field: string) => void;
2098
2111
  triggerAllReactionsHandler: () => void;
2099
2112
  operationalFormHandler: (field: string) => void;
2100
2113
  triggerAllOperationalFormHandler: () => void;
2101
2114
  wordbookSettingHandler: (fieldKey: string, value: unknown) => void;
2102
- schemaAdaptor: (fieldList: FieldItem[], options?: {
2115
+ schemaAdaptor: (fieldList: FieldItem[], options?: Partial<{
2116
+ fieldList: FieldItem[];
2117
+ initialData: import("../../../../es/shared/types").AnyObject;
2118
+ fieldVisitor: import("../../../../es/components/form-render").FieldVisitor;
2103
2119
  column: number;
2104
- outBordered?: boolean | undefined;
2105
- }) => Record<string, import("@formily/json-schema").Stringify<{
2120
+ maxHeight: string | number;
2121
+ anchor: boolean;
2122
+ parallelism: number;
2123
+ schema: import("@formily/json-schema").Stringify<{
2124
+ [key: symbol]: any;
2125
+ [key: `x-${string}`]: any;
2126
+ [key: `x-${number}`]: any;
2127
+ version?: string | undefined;
2128
+ name?: import("@formily/json-schema").SchemaKey | undefined;
2129
+ title?: any;
2130
+ description?: any;
2131
+ default?: any;
2132
+ readOnly?: boolean | undefined;
2133
+ writeOnly?: boolean | undefined;
2134
+ type?: import("@formily/json-schema").SchemaTypes | undefined;
2135
+ enum?: import("@formily/json-schema").SchemaEnum<any> | undefined;
2136
+ const?: any;
2137
+ multipleOf?: number | undefined;
2138
+ maximum?: number | undefined;
2139
+ exclusiveMaximum?: number | undefined;
2140
+ minimum?: number | undefined;
2141
+ exclusiveMinimum?: number | undefined;
2142
+ maxLength?: number | undefined;
2143
+ minLength?: number | undefined;
2144
+ pattern?: string | RegExp | undefined;
2145
+ maxItems?: number | undefined;
2146
+ minItems?: number | undefined;
2147
+ uniqueItems?: boolean | undefined;
2148
+ maxProperties?: number | undefined;
2149
+ minProperties?: number | undefined;
2150
+ required?: string | boolean | string[] | undefined;
2151
+ format?: string | undefined;
2152
+ $ref?: string | undefined;
2153
+ $namespace?: string | undefined;
2154
+ definitions?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
2155
+ properties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
2156
+ items?: import("@formily/json-schema").SchemaItems<any, any, any, any, any, any, any, any> | undefined;
2157
+ additionalItems?: import("@formily/json-schema").Stringify<any> | undefined;
2158
+ patternProperties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
2159
+ additionalProperties?: import("@formily/json-schema").Stringify<any> | undefined;
2160
+ "x-value"?: any;
2161
+ "x-index"?: number | undefined;
2162
+ "x-pattern"?: any;
2163
+ "x-display"?: any;
2164
+ "x-validator"?: any;
2165
+ "x-decorator"?: any;
2166
+ "x-decorator-props"?: any;
2167
+ "x-component"?: any;
2168
+ "x-component-props"?: any;
2169
+ "x-reactions"?: import("@formily/json-schema").SchemaReactions<any> | undefined;
2170
+ "x-content"?: any;
2171
+ "x-data"?: any;
2172
+ "x-visible"?: boolean | undefined;
2173
+ "x-hidden"?: boolean | undefined;
2174
+ "x-disabled"?: boolean | undefined;
2175
+ "x-editable"?: boolean | undefined;
2176
+ "x-read-only"?: boolean | undefined;
2177
+ "x-read-pretty"?: boolean | undefined;
2178
+ "x-compile-omitted"?: string[] | undefined;
2179
+ }>;
2180
+ components: Record<string, Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>;
2181
+ scope: import("../../../../es/shared/types").AnyObject;
2182
+ annotation: import("../../../../es/shared/types").AnyObject;
2183
+ consumer: boolean;
2184
+ uuid: string;
2185
+ lifeCycle: Partial<{
2186
+ onSetup(): void;
2187
+ beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
2188
+ afterRequest(fieldKey: string, res?: any, payload?: import("../../../../es/shared/types").AnyObject | undefined): import("../../../../es/shared/types").AnyObject[];
2189
+ afterOptionInit(fieldKey: string, options: import("../../../../es/shared/types").AnyObject[], payload?: import("../../../../es/shared/types").AnyObject | undefined): void;
2190
+ }>;
2191
+ businessFormatter: import("../../../../es/components/form-render").FormBusinessFormatter;
2192
+ requestInstance: import("../../../../es/components/form-render").RequestInstance;
2193
+ enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
2194
+ lowCodeReactions: import("../../../../es/shared/types").FormLowCodeReactions.Config[];
2195
+ linebarAutoHidden: boolean;
2196
+ bordered: string | boolean;
2197
+ uniqueCacheData: boolean;
2198
+ operationalForm: import("../../../../es/shared/types").FormOperationalConfig[];
2199
+ outBordered: boolean;
2200
+ forceClearable: boolean;
2201
+ }>) => Record<string, import("@formily/json-schema").Stringify<{
2106
2202
  [key: symbol]: any;
2107
2203
  [key: `x-${string}`]: any;
2108
2204
  [key: `x-${number}`]: any;
@@ -2493,9 +2589,9 @@ declare const _default: import("vue").DefineComponent<{
2493
2589
  lifeCycle: {
2494
2590
  type: import("vue").PropType<Partial<{
2495
2591
  onSetup(): void;
2496
- beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
2497
- afterRequest(fieldKey: string, payload?: any): import("../../../../es/shared/types").AnyObject[];
2498
- afterOptionInit(fieldKey: string, options: import("../../../../es/shared/types").AnyObject[]): void;
2592
+ beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
2593
+ afterRequest(fieldKey: string, res?: any, payload?: import("../../../../es/shared/types").AnyObject | undefined): import("../../../../es/shared/types").AnyObject[];
2594
+ afterOptionInit(fieldKey: string, options: import("../../../../es/shared/types").AnyObject[], payload?: import("../../../../es/shared/types").AnyObject | undefined): void;
2499
2595
  }>>;
2500
2596
  };
2501
2597
  requestInstance: {
@@ -2506,7 +2602,7 @@ declare const _default: import("vue").DefineComponent<{
2506
2602
  default: boolean;
2507
2603
  };
2508
2604
  lowCodeReactions: {
2509
- type: import("vue").PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
2605
+ type: import("vue").PropType<import("../../../../es/shared/types").FormLowCodeReactions.Config[]>;
2510
2606
  };
2511
2607
  operationalForm: {
2512
2608
  type: import("vue").PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
@@ -2526,6 +2622,7 @@ declare const _default: import("vue").DefineComponent<{
2526
2622
  type: BooleanConstructor;
2527
2623
  default: boolean;
2528
2624
  };
2625
+ forceClearable: BooleanConstructor;
2529
2626
  }>> & {
2530
2627
  onFormChange?: ((...args: any[]) => any) | undefined;
2531
2628
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -2534,6 +2631,7 @@ declare const _default: import("vue").DefineComponent<{
2534
2631
  anchor: boolean;
2535
2632
  maxHeight: string | number;
2536
2633
  column: number;
2634
+ forceClearable: boolean;
2537
2635
  components: Record<string, Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>;
2538
2636
  initialData: import("../../../../es/shared/types").AnyObject;
2539
2637
  parallelism: number;
@@ -81,6 +81,7 @@ declare const _default: import("vue").DefineComponent<{
81
81
  label: string;
82
82
  value: string;
83
83
  }[]>;
84
+ initMounted: () => void;
84
85
  isDateDisabled: (ts: number) => boolean;
85
86
  timeDisabled: (ts: number) => {
86
87
  isHourDisabled(hour: number): boolean | undefined;
@@ -632,6 +633,7 @@ declare const _default: import("vue").DefineComponent<{
632
633
  value: string;
633
634
  }[]>;
634
635
  presetValCp: import("vue").WritableComputedRef<string>;
636
+ initMounted: () => void;
635
637
  handleChange: (val: any, type: "end" | "start") => void;
636
638
  isStartDateDisabled: (ts: number) => boolean;
637
639
  timeStartDisabled: (ts: number) => {
@@ -46,6 +46,7 @@ declare const _default: import("vue").DefineComponent<{
46
46
  label: string;
47
47
  value: string;
48
48
  }[]>;
49
+ initMounted: () => void;
49
50
  isDateDisabled: (ts: number) => boolean;
50
51
  timeDisabled: (ts: number) => {
51
52
  isHourDisabled(hour: number): boolean | undefined;
@@ -1 +1 @@
1
- import{defineComponent as e,computed as t,openBlock as a,createElementBlock as l,createVNode as r,unref as u,isRef as o,createBlock as s,createCommentVNode as p}from"vue";import d from"../../../../../date-picker/index.js";import{NSelect as n}from"naive-ui";import{WidgetTypeEnums as i,WidgetOptionEnums as m,WidgetValEnums as v}from"../../../types/enums.js";import{WidgetDateOptionEnums as f}from"../../render-widget/helpers/enums.js";import{widgetDateValOptions as y}from"../../render-widget/helpers/dateExtraMap.js";import{setDateDisabled as c,setTimeDisabled as b}from"../../render-widget/helpers/dateDisabled.js";const g={style:{display:"flex"}};var w=e({__name:"Date",props:{componentCfg:{type:Object},paramCfg:{type:Object,default:null},modelValue:{type:[String,Number,Array],default:null},presetVal:{type:String,default:null}},emits:["update:modelValue","update:presetVal"],setup(e,{emit:w}){const C=e,M=t({set(e){w("update:modelValue",e)},get:()=>C.modelValue}),V=t({set(e){w("update:presetVal",e)},get:()=>C.presetVal}),j=t((()=>T.value.toLowerCase()||i.DATE.toLowerCase())),D=t((()=>{let e="";switch(T.value){case i.DATE:e="yyyy-MM-dd";break;case i.DATE_TIME:e="yyyy-MM-dd HH:mm:ss"}return e})),T=t((()=>C.paramCfg._rawData.type)),h=t((()=>{var e,t;return null==(t=null==(e=C.paramCfg)?void 0:e._rawData)?void 0:t.optionType})),_=t((()=>{var e;const t=h.value||m.ALL;if(T.value&&t){const a=`${T.value}_${t}`,l=f[a];let r=(null!=(e=y[l])?e:[]).map((e=>({label:e.title,value:e.con})));return r.unshift({label:"自定义输入",value:v.CUSTOM}),r}return[]}));function x(e){return c(e,h.value)}function A(e){return b(e,h.value)}return(e,t)=>(a(),l("div",g,[r(u(n),{style:{width:"120px"},class:"form-item",to:"body",value:u(V),"onUpdate:value":t[0]||(t[0]=e=>o(V)?V.value=e:null),options:u(_)},null,8,["value","options"]),u(V)===u(v).CUSTOM?(a(),s(u(d),{key:0,class:"form-item",type:u(j),clearable:"",to:"body","is-date-disabled":x,"is-time-disabled":A,valueFormat:u(D),"formatted-value":u(M),"onUpdate:formatted-value":t[1]||(t[1]=e=>o(M)?M.value=e:null)},null,8,["type","valueFormat","formatted-value"])):p("v-if",!0)]))}});export{w as default};
1
+ import{defineComponent as e,computed as t,onMounted as a,openBlock as l,createElementBlock as r,createVNode as u,unref as o,isRef as s,createBlock as p,createCommentVNode as m}from"vue";import d from"../../../../../date-picker/index.js";import{NSelect as n}from"naive-ui";import{WidgetValEnums as i,WidgetTypeEnums as f,WidgetOptionEnums as v}from"../../../types/enums.js";import{WidgetDateOptionEnums as y}from"../../render-widget/helpers/enums.js";import{widgetDateValOptions as c}from"../../render-widget/helpers/dateExtraMap.js";import{setDateDisabled as M,setTimeDisabled as D}from"../../render-widget/helpers/dateDisabled.js";import{presetValToTimestamp as Y}from"../../render-widget/helpers/presetValToTimestamp.js";const V={style:{display:"flex"}};var T=e({__name:"Date",props:{componentCfg:{type:Object},paramCfg:{type:Object,default:null},modelValue:{type:[String,Number,Array],default:null},presetVal:{type:String,default:null}},emits:["update:modelValue","update:presetVal"],setup(e,{emit:T}){const b=e,g=t({set(e){T("update:modelValue",e)},get:()=>b.modelValue}),w=t({set(e){if(T("update:presetVal",e),e&&e!==i.CUSTOM){const t=C.value===f.DATE?"YYYY-MM-DD":"YYYY-MM-DD HH:mm:ss",a=Y(e,t);T("update:modelValue",a)}},get:()=>b.presetVal}),C=t((()=>h.value.toLowerCase()||f.DATE.toLowerCase())),j=t((()=>{let e="";switch(h.value){case f.DATE:e="yyyy-MM-dd";break;case f.DATE_TIME:e="yyyy-MM-dd HH:mm:ss"}return e})),h=t((()=>b.paramCfg._rawData.type)),A=t((()=>{var e,t;return null==(t=null==(e=b.paramCfg)?void 0:e._rawData)?void 0:t.optionType})),E=t((()=>{var e;const t=A.value||v.ALL;if(h.value&&t){const a=`${h.value}_${t}`,l=y[a];let r=(null!=(e=c[l])?e:[]).map((e=>({label:e.title,value:e.con})));return r.unshift({label:"自定义输入",value:i.CUSTOM}),r}return[]}));function H(e){return M(e,A.value)}function O(e){return D(e,A.value)}return a((()=>{!function(){if(b.presetVal&&b.presetVal!==i.CUSTOM&&!b.modelValue){const e=C.value===f.DATE?"YYYY-MM-DD":"YYYY-MM-DD HH:mm:ss",t=Y(b.presetVal,e);T("update:modelValue",t)}}()})),(e,t)=>(l(),r("div",V,[u(o(n),{style:{width:"120px"},class:"form-item",to:"body",value:o(w),"onUpdate:value":t[0]||(t[0]=e=>s(w)?w.value=e:null),options:o(E)},null,8,["value","options"]),o(w)===o(i).CUSTOM?(l(),p(o(d),{key:0,class:"form-item",type:o(C),clearable:"",to:"body","is-date-disabled":H,"is-time-disabled":O,valueFormat:o(j),"formatted-value":o(g),"onUpdate:formatted-value":t[1]||(t[1]=e=>s(g)?g.value=e:null)},null,8,["type","valueFormat","formatted-value"])):m("v-if",!0)]))}});export{T as default};
@@ -50,6 +50,7 @@ declare const _default: import("vue").DefineComponent<{
50
50
  value: string;
51
51
  }[]>;
52
52
  presetValCp: import("vue").WritableComputedRef<string>;
53
+ initMounted: () => void;
53
54
  handleChange: (val: any, type: 'start' | 'end') => void;
54
55
  isStartDateDisabled: (ts: number) => boolean;
55
56
  timeStartDisabled: (ts: number) => {
@@ -1 +1 @@
1
- import{defineComponent as e,ref as a,computed as l,watch as t,openBlock as u,createElementBlock as r,createVNode as i,unref as d,isRef as o,withCtx as s,toDisplayString as v,createCommentVNode as n}from"vue";import{NSelect as m,NPopover as p}from"naive-ui";import f from"../../../../../date-picker/index.js";import c from"moment";import{isString as y}from"lodash-es";import{WidgetOptionEnums as b,WidgetTypeEnums as g,WidgetValEnums as T}from"../../../types/enums.js";import{WidgetDateOptionEnums as h}from"../../render-widget/helpers/enums.js";import{widgetDateValOptions as D}from"../../render-widget/helpers/dateExtraMap.js";import{dateDisabledCollect as M,isStartDateRangeDisabled as E,isTimeStartRangeDisabled as _,isEndDateRangeDisabled as w,isTimeEndRangeDisabled as A}from"../../render-widget/helpers/dateDisabled.js";const V={style:{display:"flex"}},Y={key:0,style:{display:"flex"}},k={key:0},x={key:0};var C=e({__name:"DateRange",props:{paramCfg:{type:Object,default:null},modelValue:{type:[String,Number,Array],default:null},presetVal:{type:String,default:null}},emits:["update:modelValue","update:presetVal"],setup(e,{emit:C}){const U=e,j=a(),F=a(),O=l((()=>{let e="";switch(H.value){case g.DATE:e="yyyy-MM-dd";break;case g.DATE_TIME:e="yyyy-MM-dd HH:mm:ss"}return e})),S=l((()=>{let e="";switch(H.value){case g.DATE:e="YYYY-MM-DD";break;case g.DATE_TIME:e="YYYY-MM-DD HH:mm:ss"}return e})),H=l((()=>U.paramCfg._rawData.type)),I=l((()=>{var e,a;return null==(a=null==(e=U.paramCfg)?void 0:e._rawData)?void 0:a.optionType})),L=l((()=>I.value===b.PAST_TIME)),$=l((()=>I.value===b.FUTURE_TIME)),R=l((()=>H.value===g.DATE?"初始日期":"初始时间")),N=l((()=>H.value===g.DATE?"截止日期":"截止时间")),G=l((()=>$.value?M.curTime:"00:00:00")),P=l((()=>L.value?M.curTime:"23:59:59")),q=l((()=>j.value?c(j.value).format(S.value):null)),z=l((()=>F.value?c(F.value).format(S.value):null)),B=l((()=>H.value.toLowerCase()||g.DATE.toLowerCase())),J=l((()=>{var e;const a=I.value||b.ALL;if(H.value&&a){const l=`${H.value}_${a}_RANGE`,t=h[l];let u=(null!=(e=D[t])?e:[]).map((e=>({label:e.title,value:e.con})));return u.unshift({label:"自定义输入",value:T.CUSTOM}),u}return[]})),K=l({set(e){C("update:presetVal",e)},get:()=>U.presetVal});function Q(e,a){var l,t;switch(a){case"start":j.value=e;break;case"end":F.value=e}const u=q.value||z.value?`${null!=(l=q.value)?l:""} ~ ${null!=(t=z.value)?t:""}`:"";C("update:modelValue",u)}function W(e){return E(e,I.value,F.value)}function X(e){return _(e,I.value,F.value)}function Z(e){return w(e,I.value,j.value)}function ee(e){return A(e,I.value,j.value)}return t((()=>U.modelValue),(e=>{if(e&&y(e)&&e.includes("~")){const[a,l]=e.split("~");return a.trim()&&(j.value=c(a.trim()).valueOf()),void(l.trim()&&(F.value=c(l.trim()).valueOf()))}j.value=F.value=null}),{immediate:!0}),(e,a)=>(u(),r("div",V,[i(d(m),{style:{width:"120px"},class:"form-item",to:"body",value:d(K),"onUpdate:value":a[0]||(a[0]=e=>o(K)?K.value=e:null),options:d(J)},null,8,["value","options"]),d(K)===d(T).CUSTOM?(u(),r("div",Y,[i(d(p),{trigger:"hover",disabled:!d(q)},{trigger:s((()=>[i(d(f),{type:d(B),"default-time":d(G),clearable:"",to:"body",valueFormat:d(O),placeholder:d(R),value:j.value,"is-date-disabled":W,"is-time-disabled":X,"onUpdate:value":a[1]||(a[1]=e=>Q(e,"start"))},null,8,["type","default-time","valueFormat","placeholder","value"])])),default:s((()=>[d(q)?(u(),r("span",k,v(d(q)),1)):n("v-if",!0)])),_:1},8,["disabled"]),i(d(p),{trigger:"hover",disabled:!d(z)},{trigger:s((()=>[i(d(f),{style:{"margin-left":"5px"},type:d(B),"default-time":d(P),clearable:"",to:"body",valueFormat:d(O),placeholder:d(N),value:F.value,"is-date-disabled":Z,"is-time-disabled":ee,"onUpdate:value":a[2]||(a[2]=e=>Q(e,"end"))},null,8,["type","default-time","valueFormat","placeholder","value"])])),default:s((()=>[d(z)?(u(),r("span",x,v(d(z)),1)):n("v-if",!0)])),_:1},8,["disabled"])])):n("v-if",!0)]))}});export{C as default};
1
+ import{defineComponent as e,ref as a,computed as l,watch as t,onMounted as u,openBlock as r,createElementBlock as i,createVNode as o,unref as s,isRef as d,withCtx as v,toDisplayString as n,createCommentVNode as m}from"vue";import{NSelect as p,NPopover as f}from"naive-ui";import c from"../../../../../date-picker/index.js";import y from"moment";import{isString as T}from"lodash-es";import{WidgetOptionEnums as b,WidgetTypeEnums as g,WidgetValEnums as M}from"../../../types/enums.js";import{WidgetDateOptionEnums as h}from"../../render-widget/helpers/enums.js";import{widgetDateValOptions as D}from"../../render-widget/helpers/dateExtraMap.js";import{dateDisabledCollect as V,isStartDateRangeDisabled as E,isTimeStartRangeDisabled as A,isEndDateRangeDisabled as w,isTimeEndRangeDisabled as _}from"../../render-widget/helpers/dateDisabled.js";import{formatDateRangeInfo as C}from"../../render-widget/helpers/presetValToTimestamp.js";const U={style:{display:"flex"}},L={key:0,style:{display:"flex"}},Y={key:0},j={key:0};var k=e({__name:"DateRange",props:{paramCfg:{type:Object,default:null},modelValue:{type:[String,Number,Array],default:null},presetVal:{type:String,default:null}},emits:["update:modelValue","update:presetVal"],setup(e,{emit:k}){const x=e,O=a(),S=a(),F=l((()=>{let e="";switch(I.value){case g.DATE:e="yyyy-MM-dd";break;case g.DATE_TIME:e="yyyy-MM-dd HH:mm:ss"}return e})),H=l((()=>{let e="";switch(I.value){case g.DATE:e="YYYY-MM-DD";break;case g.DATE_TIME:e="YYYY-MM-DD HH:mm:ss"}return e})),I=l((()=>x.paramCfg._rawData.type)),$=l((()=>{var e,a;return null==(a=null==(e=x.paramCfg)?void 0:e._rawData)?void 0:a.optionType})),R=l((()=>$.value===b.PAST_TIME)),N=l((()=>$.value===b.FUTURE_TIME)),G=l((()=>I.value===g.DATE?"初始日期":"初始时间")),P=l((()=>I.value===g.DATE?"截止日期":"截止时间")),q=l((()=>N.value?V.curTime:"00:00:00")),z=l((()=>R.value?V.curTime:"23:59:59")),B=l((()=>O.value?y(O.value).format(H.value):null)),J=l((()=>S.value?y(S.value).format(H.value):null)),K=l((()=>I.value.toLowerCase()||g.DATE.toLowerCase())),Q=l((()=>{var e;const a=$.value||b.ALL;if(I.value&&a){const l=`${I.value}_${a}_RANGE`,t=h[l];let u=(null!=(e=D[t])?e:[]).map((e=>({label:e.title,value:e.con})));return u.unshift({label:"自定义输入",value:M.CUSTOM}),u}return[]})),W=l({set(e){if(k("update:presetVal",e),e&&e!==M.CUSTOM){const a=$.value||b.ALL,l=C(e,H.value,a);k("update:modelValue",l)}},get:()=>x.presetVal});function X(e,a){var l,t;switch(a){case"start":O.value=e;break;case"end":S.value=e}const u=B.value||J.value?`${null!=(l=B.value)?l:""} ~ ${null!=(t=J.value)?t:""}`:"";k("update:modelValue",u)}function Z(e){return E(e,$.value,S.value)}function ee(e){return A(e,$.value,S.value)}function ae(e){return w(e,$.value,O.value)}function le(e){return _(e,$.value,O.value)}return t((()=>x.modelValue),(e=>{if(e&&T(e)&&e.includes("~")){const[a,l]=e.split("~");return a.trim()&&(O.value=y(a.trim()).valueOf()),void(l.trim()&&(S.value=y(l.trim()).valueOf()))}O.value=S.value=null}),{immediate:!0}),u((()=>{!function(){if(x.presetVal&&x.presetVal!==M.CUSTOM&&!x.modelValue){const e=$.value||b.ALL,a=C(x.presetVal,H.value,e);k("update:modelValue",a)}}()})),(e,a)=>(r(),i("div",U,[o(s(p),{style:{width:"120px"},class:"form-item",to:"body",value:s(W),"onUpdate:value":a[0]||(a[0]=e=>d(W)?W.value=e:null),options:s(Q)},null,8,["value","options"]),s(W)===s(M).CUSTOM?(r(),i("div",L,[o(s(f),{trigger:"hover",disabled:!s(B)},{trigger:v((()=>[o(s(c),{type:s(K),"default-time":s(q),clearable:"",to:"body",valueFormat:s(F),placeholder:s(G),value:O.value,"is-date-disabled":Z,"is-time-disabled":ee,"onUpdate:value":a[1]||(a[1]=e=>X(e,"start"))},null,8,["type","default-time","valueFormat","placeholder","value"])])),default:v((()=>[s(B)?(r(),i("span",Y,n(s(B)),1)):m("v-if",!0)])),_:1},8,["disabled"]),o(s(f),{trigger:"hover",disabled:!s(J)},{trigger:v((()=>[o(s(c),{style:{"margin-left":"5px"},type:s(K),"default-time":s(z),clearable:"",to:"body",valueFormat:s(F),placeholder:s(P),value:S.value,"is-date-disabled":ae,"is-time-disabled":le,"onUpdate:value":a[2]||(a[2]=e=>X(e,"end"))},null,8,["type","default-time","valueFormat","placeholder","value"])])),default:v((()=>[s(J)?(r(),i("span",j,n(s(J)),1)):m("v-if",!0)])),_:1},8,["disabled"])])):m("v-if",!0)]))}});export{k as default};
@@ -46,6 +46,7 @@ declare const Date: import("vue").DefineComponent<{
46
46
  label: string;
47
47
  value: string;
48
48
  }[]>;
49
+ initMounted: () => void;
49
50
  isDateDisabled: (ts: number) => boolean;
50
51
  timeDisabled: (ts: number) => {
51
52
  isHourDisabled(hour: number): boolean | undefined;
@@ -597,6 +598,7 @@ declare const DateRange: import("vue").DefineComponent<{
597
598
  value: string;
598
599
  }[]>;
599
600
  presetValCp: import("vue").WritableComputedRef<string>;
601
+ initMounted: () => void;
600
602
  handleChange: (val: any, type: "end" | "start") => void;
601
603
  isStartDateDisabled: (ts: number) => boolean;
602
604
  timeStartDisabled: (ts: number) => {
@@ -104,7 +104,7 @@ declare const _default: import("vue").DefineComponent<{
104
104
  value: any;
105
105
  unit: any;
106
106
  }[];
107
- findConditionByDisplayCategory: (displayCategory: string) => unknown;
107
+ findConditionByDisplayCategory: (sid: string) => unknown;
108
108
  handleDisplayCategorySelectProxy: (item: ICategoryItemType) => void;
109
109
  clearFormData: () => void;
110
110
  handleInitConditions: () => Promise<void>;
@@ -204,6 +204,7 @@ declare const _default: import("vue").DefineComponent<{
204
204
  label: string;
205
205
  value: string;
206
206
  }[]>;
207
+ initMounted: () => void;
207
208
  isDateDisabled: (ts: number) => boolean;
208
209
  timeDisabled: (ts: number) => {
209
210
  isHourDisabled(hour: number): boolean | undefined;
@@ -755,6 +756,7 @@ declare const _default: import("vue").DefineComponent<{
755
756
  value: string;
756
757
  }[]>;
757
758
  presetValCp: import("vue").WritableComputedRef<string>;
759
+ initMounted: () => void;
758
760
  handleChange: (val: any, type: "end" | "start") => void;
759
761
  isStartDateDisabled: (ts: number) => boolean;
760
762
  timeStartDisabled: (ts: number) => {
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as a,reactive as t,ref as i,provide as l,toRef as o,openBlock as n,createElementBlock as s,createVNode as d,unref as r,withCtx as c,createElementVNode as p,createCommentVNode as u,Fragment as y,renderList as m,normalizeClass as v,toDisplayString as f,createBlock as C,withDirectives as g,createTextVNode as h,vShow as k}from"vue";import{useMessage as b,NSpin as A,NInput as L,NIcon as w,NButton as _,NSelect as U,NTooltip as N}from"naive-ui";import{CloseOutline as V,AddOutline as x,AddCircleSharp as D}from"@vicons/ionicons5";import B from"./ValueCfg.vue.js";import{DataTypeEnums as I,ConditionEnums as j}from"../../types/enums.js";import{useDisplayCategory as S}from"./hooks/useDisplayCategory.js";import{useFilterConditions as F}from"./hooks/useFilterConditions.js";import{conditionOptions as z}from"./helpers/options.js";import{InjectionClassifyFilterList as O}from"../../constants/index.js";const P={class:"searchConditionByApi_wrapper"},q={class:"class-filter-content"},E={key:0,class:"item-name"},R=p("span",{class:"label"},"筛选分类名称:",-1),J={key:1,class:"quickSearch-content"},K=p("span",{class:"label"},"父类名称:",-1),M=["onDblclick","onClick"],Q={key:0,class:"s-content"},G={key:2,class:"item-name"},H=p("span",{class:"label"}," 过滤条件: ",-1),T=p("span",null,"添加",-1),W={class:"select-item-list"},X={class:"index-span"},Y=["onClick"];var Z=e({__name:"index",props:{actionList_prop:{type:Object,default:()=>({})},conditionList:{type:Array,default:()=>[]},tableId:{type:String,default:""},searchFieldList:{type:Array,default:()=>[]},showItemName:{type:Boolean,default:!0},hideAddBtn:{type:Boolean,default:!1}},emits:["saveAdd","cancelSaveAdd"],setup(e,{expose:Z,emit:$}){const ee=e,ae=b(),te={class:"classify-fieldkey-popover"},ie=a(),le=t({className:"",displayCategory:"",filterConditions:[]}),oe=i(!1);l(O,o(le,"filterConditions"));const{State:ne,isEnableAddDisplayCategory:se,editDisplayCategory:de,handleDisplayCategorySelect:re,handleDisplayCategoryRemove:ce,handleDisplayCategoryAdd:pe,handlerBlur:ue,initDisplayCategories:ye}=S(o(le,"displayCategory"),{conditionList:ee.conditionList},ae),{State:me,paramOptions:ve,addFilterCondition:fe,delFilterCondition:Ce,updateKey:ge,updateCondition:he,getParamCfg:ke,initFilterConditions:be,getRawFilterConditions:Ae}=F(o(le,"filterConditions"),ee.searchFieldList,I.API);function Le(){le.className="",le.displayCategory="",le.filterConditions=[]}async function we(){var e;try{if(Le(),oe.value=!0,ye(ie.displayCategoryList,ee.actionList_prop.displayCategory||void 0),ee.actionList_prop){le.className=ee.actionList_prop.name,await be(ee.tableId,null!=(e=ee.actionList_prop.conObj)?e:[]);le.filterConditions.length<1&&ve.value&&ve.value.length>0&&fe()}}finally{oe.value=!1}}return we(),Z({handleInitConditions:we,saveAdd:function(){new Promise((e=>{le.className||!ee.showItemName?0!==le.filterConditions.length?le.filterConditions.some((({key:e,condition:a,value:t,presetVal:i})=>!e||!a||a===j.EQUAL&&!t&&!i))?ae.warning("请补充完整条件内容"):e(!0):ae.warning("请至少添加一个条件"):ae.warning("请输入分类名称")})).then((()=>{let e;var a;"edit"===ee.actionList_prop.from&&(a=ee.actionList_prop.displayCategory,e=null==ee?void 0:ee.conditionList.find((e=>e.displayCategory===a)));const t={displayCategory:le.displayCategory,name:le.className||"",conObj:Ae()},i={id:e?e.sid:"",tableId:ee.tableId,setting:JSON.stringify(t)};$("saveAdd",i,!1)}))},cancelSaveAdd:function(){Le(),$("cancelSaveAdd")},addAction:fe,checkActionList:function(){return le.filterConditions.every((e=>!e.field_key))}}),(a,t)=>(n(),s("div",P,[d(r(A),{show:oe.value},{default:c((()=>[p("div",q,[e.showItemName?(n(),s("div",E,[R,d(r(L),{value:le.className,"onUpdate:value":t[0]||(t[0]=e=>le.className=e),placeholder:"请输入分类名称",style:{width:"250px"},maxlength:"10"},null,8,["value"])])):u("v-if",!0),e.showItemName?(n(),s("div",J,[K,(n(!0),s(y,null,m(r(ne).displayCategories,((e,a)=>(n(),s("div",{class:v(["edit-tag",{"edit-tag-select":e.value===le.displayCategory&&e.disabled}]),key:a,onDblclick:a=>r(de)(a,e),onClick:a=>function(e){re(e)}(e)},[e.disabled?(n(),s("div",Q,[p("span",null,f(e.value),1)])):(n(),C(r(L),{key:1,style:{width:"100px"},disabled:e.disabled,onBlur:()=>e.disabled=!0,value:e.value,"onUpdate:value":a=>e.value=a,maxlength:10},null,8,["disabled","onBlur","value","onUpdate:value"])),d(r(w),{component:r(V),class:"anticon-close",size:"20",onClick:t=>r(ce)(a,e)},null,8,["component","onClick"])],42,M)))),128)),r(se)?(n(),s(y,{key:0},[g(d(r(_),{class:"ant-btn",icon:"plus",dashed:"",onClick:r(pe)},{default:c((()=>[d(r(w),{component:r(x),size:"20"},null,8,["component"]),h(" "+f("添加父类"))])),_:1},8,["onClick"]),[[k,!r(ne).showAdd]]),g(d(r(L),{class:"edit-tag",value:r(ne).addDisplayCategory,"onUpdate:value":t[1]||(t[1]=e=>r(ne).addDisplayCategory=e),valueModifiers:{trim:!0},style:{width:"100px"},onBlur:r(ue),maxLength:10},null,8,["value","onBlur"]),[[k,r(ne).showAdd]])],64)):u("v-if",!0)])):u("v-if",!0),e.hideAddBtn?u("v-if",!0):(n(),s("div",G,[H,p("span",{class:"addAction",onClick:t[2]||(t[2]=(...e)=>r(fe)&&r(fe)(...e)),style:{cursor:"pointer"}},[d(r(w),{component:r(D),class:"blue",size:"18"},null,8,["component"]),T])])),p("ul",W,[(n(!0),s(y,null,m(le.filterConditions,((e,a)=>(n(),s("li",{key:a},[p("span",X,f(a+1)+"   ",1),u(" 选择 field_key "),d(r(U),{class:"form-item",placeholder:"请选择",value:e.key,"menu-props":te,to:"body",filterable:"",options:r(ve),"onUpdate:value":e=>r(ge)(a,e)},null,8,["value","options","onUpdate:value"]),u(" 选择 关系 "),e.key?(n(),C(r(U),{key:0,class:"form-item",placeholder:"请选择",value:e.condition,to:"body",filterable:"",options:r(z),"onUpdate:value":e=>r(he)(a,e)},null,8,["value","options","onUpdate:value"])):u("v-if",!0),u(" 自定义 "),e.key&&e.condition&&e.condition!==r(j).NULL?(n(),C(B,{key:1,modelValue:e.value,"onUpdate:modelValue":a=>e.value=a,presetVal:e.presetVal,"onUpdate:presetVal":a=>e.presetVal=a,"param-cfg":r(ke)(e.key)},null,8,["modelValue","onUpdate:modelValue","presetVal","onUpdate:presetVal","param-cfg"])):u("v-if",!0),d(r(N),{title:"删除",trigger:"hover"},{trigger:c((()=>[p("i",{onClick:e=>r(Ce)(a),class:"iconfont-table-filter delete-item-icon icon-table-filter-menzhenyishengzhananniuqingchu"},null,8,Y)])),default:c((()=>[h(" 删除 ")])),_:2},1024)])))),128))])])])),_:1},8,["show"])]))}});export{Z as default};
1
+ import{defineComponent as e,useAttrs as a,reactive as i,ref as t,provide as l,toRef as n,openBlock as o,createElementBlock as s,createVNode as d,unref as r,withCtx as c,createElementVNode as p,createCommentVNode as u,Fragment as y,renderList as m,normalizeClass as v,toDisplayString as f,createBlock as C,withDirectives as g,createTextVNode as h,vShow as k}from"vue";import{useMessage as b,NSpin as A,NInput as L,NIcon as w,NButton as _,NSelect as U,NTooltip as N}from"naive-ui";import{CloseOutline as V,AddOutline as x,AddCircleSharp as D}from"@vicons/ionicons5";import B from"./ValueCfg.vue.js";import{DataTypeEnums as I,ConditionEnums as j}from"../../types/enums.js";import{useDisplayCategory as S}from"./hooks/useDisplayCategory.js";import{useFilterConditions as F}from"./hooks/useFilterConditions.js";import{conditionOptions as z}from"./helpers/options.js";import{InjectionClassifyFilterList as O}from"../../constants/index.js";const P={class:"searchConditionByApi_wrapper"},q={class:"class-filter-content"},E={key:0,class:"item-name"},R=p("span",{class:"label"},"筛选分类名称:",-1),J={key:1,class:"quickSearch-content"},K=p("span",{class:"label"},"父类名称:",-1),M=["onDblclick","onClick"],Q={key:0,class:"s-content"},G={key:2,class:"item-name"},H=p("span",{class:"label"}," 过滤条件: ",-1),T=p("span",null,"添加",-1),W={class:"select-item-list"},X={class:"index-span"},Y=["onClick"];var Z=e({__name:"index",props:{actionList_prop:{type:Object,default:()=>({})},conditionList:{type:Array,default:()=>[]},tableId:{type:String,default:""},searchFieldList:{type:Array,default:()=>[]},showItemName:{type:Boolean,default:!0},hideAddBtn:{type:Boolean,default:!1}},emits:["saveAdd","cancelSaveAdd"],setup(e,{expose:Z,emit:$}){const ee=e,ae=b(),ie={class:"classify-fieldkey-popover"},te=a(),le=i({className:"",displayCategory:"",filterConditions:[]}),ne=t(!1);l(O,n(le,"filterConditions"));const{State:oe,isEnableAddDisplayCategory:se,editDisplayCategory:de,handleDisplayCategorySelect:re,handleDisplayCategoryRemove:ce,handleDisplayCategoryAdd:pe,handlerBlur:ue,initDisplayCategories:ye}=S(n(le,"displayCategory"),{conditionList:ee.conditionList},ae),{State:me,paramOptions:ve,addFilterCondition:fe,delFilterCondition:Ce,updateKey:ge,updateCondition:he,getParamCfg:ke,initFilterConditions:be,getRawFilterConditions:Ae}=F(n(le,"filterConditions"),ee.searchFieldList,I.API);function Le(){le.className="",le.displayCategory="",le.filterConditions=[]}async function we(){var e;try{if(Le(),ne.value=!0,ye(te.displayCategoryList,ee.actionList_prop.displayCategory||void 0),ee.actionList_prop){le.className=ee.actionList_prop.name,await be(ee.tableId,null!=(e=ee.actionList_prop.conObj)?e:[]);le.filterConditions.length<1&&ve.value&&ve.value.length>0&&fe()}}finally{ne.value=!1}}return we(),Z({handleInitConditions:we,saveAdd:function(){new Promise((e=>{le.className||!ee.showItemName?0!==le.filterConditions.length?le.filterConditions.some((({key:e,condition:a,value:i,presetVal:t})=>!e||!a||a===j.EQUAL&&!i&&!t))?ae.warning("请补充完整条件内容"):e(!0):ae.warning("请至少添加一个条件"):ae.warning("请输入分类名称")})).then((()=>{let e;var a;"edit"===ee.actionList_prop.from&&(a=ee.actionList_prop.sid,e=null==ee?void 0:ee.conditionList.find((e=>e.sid===a)));const i={displayCategory:le.displayCategory,name:le.className||"",conObj:Ae()},t={id:e?e.sid:"",tableId:ee.tableId,setting:JSON.stringify(i)};$("saveAdd",t,!1)}))},cancelSaveAdd:function(){Le(),$("cancelSaveAdd")},addAction:fe,checkActionList:function(){return le.filterConditions.every((e=>!e.field_key))}}),(a,i)=>(o(),s("div",P,[d(r(A),{show:ne.value},{default:c((()=>[p("div",q,[e.showItemName?(o(),s("div",E,[R,d(r(L),{value:le.className,"onUpdate:value":i[0]||(i[0]=e=>le.className=e),placeholder:"请输入分类名称",style:{width:"250px"},maxlength:"10"},null,8,["value"])])):u("v-if",!0),e.showItemName?(o(),s("div",J,[K,(o(!0),s(y,null,m(r(oe).displayCategories,((e,a)=>(o(),s("div",{class:v(["edit-tag",{"edit-tag-select":e.value===le.displayCategory&&e.disabled}]),key:a,onDblclick:a=>r(de)(a,e),onClick:a=>function(e){re(e)}(e)},[e.disabled?(o(),s("div",Q,[p("span",null,f(e.value),1)])):(o(),C(r(L),{key:1,style:{width:"100px"},disabled:e.disabled,onBlur:()=>e.disabled=!0,value:e.value,"onUpdate:value":a=>e.value=a,maxlength:10},null,8,["disabled","onBlur","value","onUpdate:value"])),d(r(w),{component:r(V),class:"anticon-close",size:"20",onClick:i=>r(ce)(a,e)},null,8,["component","onClick"])],42,M)))),128)),r(se)?(o(),s(y,{key:0},[g(d(r(_),{class:"ant-btn",icon:"plus",dashed:"",onClick:r(pe)},{default:c((()=>[d(r(w),{component:r(x),size:"20"},null,8,["component"]),h(" "+f("添加父类"))])),_:1},8,["onClick"]),[[k,!r(oe).showAdd]]),g(d(r(L),{class:"edit-tag",value:r(oe).addDisplayCategory,"onUpdate:value":i[1]||(i[1]=e=>r(oe).addDisplayCategory=e),valueModifiers:{trim:!0},style:{width:"100px"},onBlur:r(ue),maxLength:10},null,8,["value","onBlur"]),[[k,r(oe).showAdd]])],64)):u("v-if",!0)])):u("v-if",!0),e.hideAddBtn?u("v-if",!0):(o(),s("div",G,[H,p("span",{class:"addAction",onClick:i[2]||(i[2]=(...e)=>r(fe)&&r(fe)(...e)),style:{cursor:"pointer"}},[d(r(w),{component:r(D),class:"blue",size:"18"},null,8,["component"]),T])])),p("ul",W,[(o(!0),s(y,null,m(le.filterConditions,((e,a)=>(o(),s("li",{key:a},[p("span",X,f(a+1)+"   ",1),u(" 选择 field_key "),d(r(U),{class:"form-item",placeholder:"请选择",value:e.key,"menu-props":ie,to:"body",filterable:"",options:r(ve),"onUpdate:value":e=>r(ge)(a,e)},null,8,["value","options","onUpdate:value"]),u(" 选择 关系 "),e.key?(o(),C(r(U),{key:0,class:"form-item",placeholder:"请选择",value:e.condition,to:"body",filterable:"",options:r(z),"onUpdate:value":e=>r(he)(a,e)},null,8,["value","options","onUpdate:value"])):u("v-if",!0),u(" 自定义 "),e.key&&e.condition&&e.condition!==r(j).NULL?(o(),C(B,{key:1,modelValue:e.value,"onUpdate:modelValue":a=>e.value=a,presetVal:e.presetVal,"onUpdate:presetVal":a=>e.presetVal=a,"param-cfg":r(ke)(e.key)},null,8,["modelValue","onUpdate:modelValue","presetVal","onUpdate:presetVal","param-cfg"])):u("v-if",!0),d(r(N),{title:"删除",trigger:"hover"},{trigger:c((()=>[p("i",{onClick:e=>r(Ce)(a),class:"iconfont-table-filter delete-item-icon icon-table-filter-menzhenyishengzhananniuqingchu"},null,8,Y)])),default:c((()=>[h(" 删除 ")])),_:2},1024)])))),128))])])])),_:1},8,["show"])]))}});export{Z as default};
@@ -3,6 +3,25 @@ export declare const WidgetCfgMaps: Map<string, {
3
3
  component: any;
4
4
  props: {
5
5
  clearable: boolean;
6
+ allowInput?: undefined;
7
+ filterable?: undefined;
8
+ multiple?: undefined;
9
+ maxTagCount?: undefined;
10
+ type?: undefined;
11
+ valueFormat?: undefined;
12
+ };
13
+ eventsBySearch: {
14
+ name: string;
15
+ handler(e: KeyboardEvent, search: funcVoid): void;
16
+ }[];
17
+ handlerProps(props: any, { title }?: any): any;
18
+ setDefaultValue: (defaultValue: any) => any;
19
+ style?: undefined;
20
+ } | {
21
+ component: any;
22
+ props: {
23
+ clearable: boolean;
24
+ allowInput: (value: string) => boolean;
6
25
  filterable?: undefined;
7
26
  multiple?: undefined;
8
27
  maxTagCount?: undefined;
@@ -60,6 +79,7 @@ export declare const WidgetCfgMaps: Map<string, {
60
79
  filterable: boolean;
61
80
  multiple: boolean;
62
81
  maxTagCount: string;
82
+ allowInput?: undefined;
63
83
  type?: undefined;
64
84
  valueFormat?: undefined;
65
85
  };
@@ -301,6 +321,7 @@ export declare const WidgetCfgMaps: Map<string, {
301
321
  filterable: boolean;
302
322
  multiple: boolean;
303
323
  maxTagCount: string;
324
+ allowInput?: undefined;
304
325
  type?: undefined;
305
326
  valueFormat?: undefined;
306
327
  };
@@ -544,6 +565,7 @@ export declare const WidgetCfgMaps: Map<string, {
544
565
  type: string;
545
566
  clearable: boolean;
546
567
  valueFormat: string;
568
+ allowInput?: undefined;
547
569
  filterable?: undefined;
548
570
  multiple?: undefined;
549
571
  maxTagCount?: undefined;
@@ -695,6 +717,7 @@ export declare const WidgetCfgMaps: Map<string, {
695
717
  type: string;
696
718
  clearable: boolean;
697
719
  valueFormat: string;
720
+ allowInput?: undefined;
698
721
  filterable?: undefined;
699
722
  multiple?: undefined;
700
723
  maxTagCount?: undefined;
@@ -959,6 +982,7 @@ export declare const WidgetCfgMaps: Map<string, {
959
982
  type: string;
960
983
  clearable: boolean;
961
984
  valueFormat: string;
985
+ allowInput?: undefined;
962
986
  filterable?: undefined;
963
987
  multiple?: undefined;
964
988
  maxTagCount?: undefined;
@@ -1114,6 +1138,7 @@ export declare const WidgetCfgMaps: Map<string, {
1114
1138
  type: string;
1115
1139
  clearable: boolean;
1116
1140
  valueFormat: string;
1141
+ allowInput?: undefined;
1117
1142
  filterable?: undefined;
1118
1143
  multiple?: undefined;
1119
1144
  maxTagCount?: undefined;
@@ -1226,6 +1251,7 @@ export declare const WidgetCfgMaps: Map<string, {
1226
1251
  }>;
1227
1252
  props: {
1228
1253
  clearable?: undefined;
1254
+ allowInput?: undefined;
1229
1255
  filterable?: undefined;
1230
1256
  multiple?: undefined;
1231
1257
  maxTagCount?: undefined;
@@ -1301,6 +1327,7 @@ export declare const WidgetCfgMaps: Map<string, {
1301
1327
  }>;
1302
1328
  props: {
1303
1329
  clearable?: undefined;
1330
+ allowInput?: undefined;
1304
1331
  filterable?: undefined;
1305
1332
  multiple?: undefined;
1306
1333
  maxTagCount?: undefined;
@@ -1362,6 +1389,7 @@ export declare const WidgetCfgMaps: Map<string, {
1362
1389
  filterable: boolean;
1363
1390
  multiple: boolean;
1364
1391
  maxTagCount: string;
1392
+ allowInput?: undefined;
1365
1393
  type?: undefined;
1366
1394
  valueFormat?: undefined;
1367
1395
  };
@@ -1 +1 @@
1
- import{WidgetTypeEnums as e,WidgetValEnums as l}from"../../types/enums.js";import{DatePresetValEnums as t,DateRangeOutDefEnums as r}from"./enums.js";import{NInputNumber as a,NInput as o}from"naive-ui";import{InputNumberGroup as n,Select as p,SelectDynamic as s,DateInner as i,DateOut as u,DateRangeInner as c,DateRangeOut as m,CheckboxGroup as d,LabelInner as y,LabelOut as h}from"./components/index.js";import{presetValToTimestamp as E,formatDateRangeInfo as f}from"./helpers/presetValToTimestamp.js";import{setSelectDynamicValue as M}from"./helpers/setDefaultValue.js";const D=e=>null==e?null:e,T=new Map([[e.INPUT_NUMBER,{component:a,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`输入${l}`}),setDefaultValue:D}],[e.INPUTNUMBER_RANGE,{component:n,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l,filterExplicit:t}={})=>({...e,startPlaceholder:1===t?`起始${l}`:"最小值",endPlaceholder:1===t?`截止${l}`:"最大值"}),setDefaultValue:D}],[e.INPUT,{component:o,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`搜索${l}`}),setDefaultValue:D}],[e.SELECT,{component:p,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:r}=t;r&&l()}}],handlerProps(e,{multiple:l,title:t}={}){const r={...e,placeholder:`请选择${t}`};return l&&(r.multiple=!0),r},setDefaultValue:(e,t,r)=>t&&"boolean"==typeof(null==r?void 0:r.multiple)?r.multiple?[l.WHOLE]:l.WHOLE:e}],[e.SELECTDYNAMIC,{component:s,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:r}=t;r&&l()}}],handlerProps(e,l={}){const{multiple:t,title:r}=l,a={...e,placeholder:`请选择${r}`};return t&&(a.multiple=!0),a},setDefaultValue:async(e,l,t)=>l&&(null==t?void 0:t._cfg)?await M(null==t?void 0:t._cfg):e}],[e.DATE,{component:i,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:D}],[e.DATE_OUT,{component:u,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?E(l,"YYYY-MM-DD"):e}],[e.DATE_RANGE_INNER,{component:c,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:D}],[e.DATE_RANGE_OUT,{component:m,props:{type:"daterange",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:(e,l,t)=>l&&l!==r.CUSTOM&&(null==t?void 0:t.optSetting)?f(l,"YYYY-MM-DD",t.optSetting):e}],[e.DATE_TIME,{component:i,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:D}],[e.DATETIME_OUT,{component:u,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?E(l,"YYYY-MM-DD HH:mm:ss"):e}],[e.DATETIME_RANGE_INNER,{component:c,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:D}],[e.DATETIME_RANGE_OUT,{component:m,props:{type:"datetimerange",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:(e,l,r)=>l&&l!==t.CUSTOM&&(null==r?void 0:r.optSetting)?f(l,"YYYY-MM-DD HH:mm:ss",r.optSetting):e}],[e.CHECKBOX_GROUP,{component:d,props:{},style:{"line-height":"32px"},handlerProps(e,{valueList:l,multiple:t}={}){const r={...e,multiple:t};return Array.isArray(l)&&(r.options=l.map((({value:e,label:l})=>({value:e,label:l})))),r},setDefaultValue:D}],[e.LABEL,{component:y,props:{},handlerProps:e=>({...e}),setDefaultValue:e=>e&&Array.isArray(e)?e.join("|#|"):e}],[e.SELECTLABEL,{component:h,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},handlerProps(e,l={}){const{multiple:t,title:r}=l,a={...e,placeholder:`请选择${r}`};return t&&(a.multiple=!0),a},setDefaultValue:e=>e&&Array.isArray(e)?e.join("|#|"):e}]]);export{T as WidgetCfgMaps};
1
+ import{WidgetTypeEnums as e,WidgetValEnums as l}from"../../types/enums.js";import{DatePresetValEnums as t,DateRangeOutDefEnums as r}from"./enums.js";import{NInputNumber as a,NInput as o}from"naive-ui";import{InputNumberGroup as n,Select as p,SelectDynamic as s,DateInner as i,DateOut as u,DateRangeInner as c,DateRangeOut as m,CheckboxGroup as d,LabelInner as y,LabelOut as h}from"./components/index.js";import{presetValToTimestamp as E,formatDateRangeInfo as f}from"./helpers/presetValToTimestamp.js";import{setSelectDynamicValue as M}from"./helpers/setDefaultValue.js";const D=e=>null==e?null:e,T=new Map([[e.INPUT_NUMBER,{component:a,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`输入${l}`}),setDefaultValue:D}],[e.INPUTNUMBER_RANGE,{component:n,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l,filterExplicit:t}={})=>({...e,startPlaceholder:1===t?`起始${l}`:"最小值",endPlaceholder:1===t?`截止${l}`:"最大值"}),setDefaultValue:D}],[e.INPUT,{component:o,props:{clearable:!0,allowInput:e=>!e.startsWith(" ")&&!e.endsWith(" ")},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`搜索${l}`}),setDefaultValue:D}],[e.SELECT,{component:p,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:r}=t;r&&l()}}],handlerProps(e,{multiple:l,title:t}={}){const r={...e,placeholder:`请选择${t}`};return l&&(r.multiple=!0),r},setDefaultValue:(e,t,r)=>t&&"boolean"==typeof(null==r?void 0:r.multiple)?r.multiple?[l.WHOLE]:l.WHOLE:e}],[e.SELECTDYNAMIC,{component:s,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:r}=t;r&&l()}}],handlerProps(e,l={}){const{multiple:t,title:r}=l,a={...e,placeholder:`请选择${r}`};return t&&(a.multiple=!0),a},setDefaultValue:async(e,l,t)=>l&&(null==t?void 0:t._cfg)?await M(null==t?void 0:t._cfg):e}],[e.DATE,{component:i,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:D}],[e.DATE_OUT,{component:u,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?E(l,"YYYY-MM-DD"):e}],[e.DATE_RANGE_INNER,{component:c,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:D}],[e.DATE_RANGE_OUT,{component:m,props:{type:"daterange",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:(e,l,t)=>l&&l!==r.CUSTOM&&(null==t?void 0:t.optSetting)?f(l,"YYYY-MM-DD",t.optSetting):e}],[e.DATE_TIME,{component:i,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:D}],[e.DATETIME_OUT,{component:u,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?E(l,"YYYY-MM-DD HH:mm:ss"):e}],[e.DATETIME_RANGE_INNER,{component:c,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:D}],[e.DATETIME_RANGE_OUT,{component:m,props:{type:"datetimerange",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:(e,l,r)=>l&&l!==t.CUSTOM&&(null==r?void 0:r.optSetting)?f(l,"YYYY-MM-DD HH:mm:ss",r.optSetting):e}],[e.CHECKBOX_GROUP,{component:d,props:{},style:{"line-height":"32px"},handlerProps(e,{valueList:l,multiple:t}={}){const r={...e,multiple:t};return Array.isArray(l)&&(r.options=l.map((({value:e,label:l})=>({value:e,label:l})))),r},setDefaultValue:D}],[e.LABEL,{component:y,props:{},handlerProps:e=>({...e}),setDefaultValue:e=>e&&Array.isArray(e)?e.join("|#|"):e}],[e.SELECTLABEL,{component:h,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},handlerProps(e,l={}){const{multiple:t,title:r}=l,a={...e,placeholder:`请选择${r}`};return t&&(a.multiple=!0),a},setDefaultValue:e=>e&&Array.isArray(e)?e.join("|#|"):e}]]);export{T as WidgetCfgMaps};
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",i="3.1.50-beta.2",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.1.50-beta.2",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
1
+ var e="@cnhis-design-vue/shared",i="3.1.50-beta.21",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.1.50-beta.21",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
@@ -20,3 +20,23 @@ export declare type FormOperationalConfig = {
20
20
  operationalPrecision: string;
21
21
  operationalResult: string;
22
22
  };
23
+ export declare namespace FormLowCodeReactions {
24
+ type ConObj = {
25
+ con: LOW_CODE_VALUE_RELATION;
26
+ field_key: string;
27
+ value: unknown;
28
+ };
29
+ type Config = {
30
+ conObj: ConObj[];
31
+ } & Partial<{
32
+ sqlExpression: string;
33
+ showField: string[];
34
+ hideField: string[];
35
+ requiredField: string[];
36
+ notRequiredField: string[];
37
+ enabledField: string[];
38
+ disabledField: string[];
39
+ __oppositeBindField: Config;
40
+ __oppositeTargetField: Config;
41
+ }>;
42
+ }
@@ -1,9 +1,10 @@
1
- import { BindEventSettingItem, FormOperationalConfig, LOW_CODE_EVENT_TYPE, LOW_CODE_VALUE_RELATION } from '../../../es/shared/types';
1
+ import { AnyObject, BindEventSettingItem, FormLowCodeReactions, FormOperationalConfig, LOW_CODE_EVENT_TYPE, LOW_CODE_VALUE_RELATION } from '../../../es/shared/types';
2
2
  import { MaybeRef } from '@vueuse/core';
3
3
  export declare function isMatchLowCodeCondition(value: unknown, condition: {
4
4
  con: LOW_CODE_VALUE_RELATION;
5
5
  value: unknown;
6
6
  }): boolean;
7
+ export declare function isMatchLowCodeConditionsWithSqlExpression(formData: AnyObject, config: FormLowCodeReactions.Config): any;
7
8
  declare function handleFieldTriggerSetValue(bindEventSetting: BindEventSettingItem, { getter, setter }: {
8
9
  setter: (key: string, value: unknown) => void;
9
10
  getter: (key: string) => unknown;
@@ -1 +1 @@
1
- import{isArray as e,isString as n,includes as r,negate as t,gt as o,gte as a,isNumber as l,lt as u,lte as i,noop as c,isObject as p}from"lodash-es";import{unref as f}from"vue";function s(e){return null==e||""==e}const E={EQ:(e,n)=>`${e}`===n,NEQ:(e,n)=>`${e}`!==n,CL:(t,o)=>!(!e(t)&&!n(t))&&r(t,o),NC:(t,o)=>!e(t)&&!n(t)||!r(t,o),NULL:s,NOT_NULL:t(s),BIG:o,BIGEQ:a,LESS:(e,r)=>!!(l(e)||n(e)&&e)&&u(e,r),LESSEQ:(e,r)=>!!(l(e)||n(e)&&e)&&i(e,r)};function m(e,n){return(E[n.con]||(()=>!1))(e,`${n.value}`)}const L=Object.freeze({SET_VALUE:function(e,{getter:n,setter:r}){if(!p(e))return;const{results:t=[],params:o=[]}=e;if(!t.length)return;o.every((e=>e&&e.p_name&&m(n(e.p_name),{con:e.p_select,value:e.p_value})))&&t.forEach((e=>r(e.p_name,e.p_value)))},REPEAT_VALIDATE:c,IS_SHOW_FIELD:c,SQLSAVE:c,API:c});function _(e){return L[e]||c}function S(r,t,o){function a(n){return e(n)&&!!n.length}function u(e,r=!0){e.forEach((e=>{const a=e.operationFormParam.reduce(((e,n)=>(e[n=n.replace(/^table\./,"")]=+t(n),e)),{}),u=e.operationalRule.replace(/\${(.+?)}/g,"$1");let i=new Function("table",`return ${u}`)(a);n(i)&&(i=+i),i=l(i)?isNaN(i)?"":i.toFixed(+e.operationalPrecision):"",(r||null==t(e.operationalResult))&&o(e.operationalResult,i)}))}return{operationalFormHandler:function(e){if(!a(f(r)))return;const n=f(r).filter((n=>n.operationFormParam.includes(`table.${e}`)));n.length&&u(n)},triggerAllOperationalFormHandler:function(){a(f(r))&&u(f(r),!1)}}}export{_ as getBindEventSettingTrigger,S as getOperationalFormHandler,m as isMatchLowCodeCondition};
1
+ import{Path as e}from"@formily/path";import{isArray as r,isString as n,includes as t,negate as o,gt as l,gte as a,isNumber as i,lt as u,lte as c,noop as s,isObject as p}from"lodash-es";import{unref as f}from"vue";function E(e){return null==e||""==e}const m={EQ:(e,r)=>`${e}`===r,NEQ:(e,r)=>`${e}`!==r,CL:(e,o)=>!(!r(e)&&!n(e))&&t(e,o),NC:(e,o)=>!r(e)&&!n(e)||!t(e,o),NULL:E,NOT_NULL:o(E),BIG:l,BIGEQ:a,LESS:(e,r)=>!!(i(e)||n(e)&&e)&&u(e,r),LESSEQ:(e,r)=>!!(i(e)||n(e)&&e)&&c(e,r)};function g(e,r){return(m[r.con]||(()=>!1))(e,`${r.value}`)}function _(t,o){if(!r(o.conObj))return!1;if(!o.sqlExpression||!n(o.sqlExpression))return o.conObj.every((r=>g(e.getIn(t,r.field_key),r)));const l=o.conObj.map((r=>g(e.getIn(t,r.field_key),r)));try{return new Function("return "+o.sqlExpression.replace(/OR/g,"||").replace(/AND/g,"&&").replace(/[a-zA-Z]/g,"").replace(/\d+/g,(e=>l[+e-1]?"true":"false")))()}catch(e){return console.error("表达式错误=>",o.sqlExpression),!1}}const L=Object.freeze({SET_VALUE:function(e,{getter:r,setter:n}){if(!p(e))return;const{results:t=[],params:o=[]}=e;if(!t.length)return;o.every((e=>e&&e.p_name&&g(r(e.p_name),{con:e.p_select,value:e.p_value})))&&t.forEach((e=>n(e.p_name,e.p_value)))},REPEAT_VALIDATE:s,IS_SHOW_FIELD:s,SQLSAVE:s,API:s});function d(e){return L[e]||s}function A(e,t,o){function l(e){return r(e)&&!!e.length}function a(e,r=!0){e.forEach((e=>{const l=e.operationFormParam.reduce(((e,r)=>(e[r=r.replace(/^table\./,"")]=+t(r),e)),{}),a=e.operationalRule.replace(/\${(.+?)}/g,"$1");let u=new Function("table",`return ${a}`)(l);n(u)&&(u=+u),u=i(u)?isNaN(u)?"":u.toFixed(+e.operationalPrecision):"",(r||null==t(e.operationalResult))&&o(e.operationalResult,u)}))}return{operationalFormHandler:function(r){if(!l(f(e)))return;const n=f(e).filter((e=>e.operationFormParam.includes(`table.${r}`)));n.length&&a(n)},triggerAllOperationalFormHandler:function(){l(f(e))&&a(f(e),!1)}}}export{d as getBindEventSettingTrigger,A as getOperationalFormHandler,g as isMatchLowCodeCondition,_ as isMatchLowCodeConditionsWithSqlExpression};