@farris/ui-vue 1.2.4 → 1.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +58 -58
- package/components/accordion/index.umd.cjs +1 -1
- package/components/accordion/package.json +1 -1
- package/components/avatar/index.esm.js +124 -116
- package/components/avatar/index.umd.cjs +1 -1
- package/components/avatar/package.json +1 -1
- package/components/border-editor/package.json +1 -1
- package/components/button/package.json +1 -1
- package/components/button-edit/index.css +1 -0
- package/components/button-edit/package.json +1 -1
- package/components/button-group/package.json +1 -1
- package/components/calculator/package.json +1 -1
- package/components/calendar/package.json +1 -1
- package/components/capsule/index.esm.js +1 -1
- package/components/capsule/index.umd.cjs +1 -1
- package/components/capsule/package.json +1 -1
- package/components/checkbox/index.esm.js +219 -209
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/checkbox/package.json +1 -1
- package/components/color-picker/package.json +1 -1
- package/components/combo-list/index.esm.js +36 -28
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-list/package.json +1 -1
- package/components/combo-tree/index.esm.js +340 -107
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/combo-tree/package.json +1 -1
- package/components/common/index.esm.js +2 -2
- package/components/common/index.umd.cjs +1 -1
- package/components/common/package.json +1 -1
- package/components/component/index.esm.js +36 -29
- package/components/component/index.umd.cjs +1 -1
- package/components/component/package.json +1 -1
- package/components/condition/index.esm.js +406 -402
- package/components/condition/index.umd.cjs +1 -1
- package/components/condition/package.json +1 -1
- package/components/content-container/index.esm.js +9 -13
- package/components/content-container/index.umd.cjs +1 -1
- package/components/content-container/package.json +1 -1
- package/components/{tree-grid/style.css → data-grid/index.css} +1 -1
- package/components/data-grid/index.esm.js +4439 -4273
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-grid/package.json +1 -1
- package/components/data-view/index.esm.js +2904 -2892
- package/components/data-view/index.umd.cjs +1 -1
- package/components/data-view/package.json +1 -1
- package/components/date-picker/index.esm.js +250 -242
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/date-picker/package.json +1 -1
- package/components/designer-canvas/index.css +1 -0
- package/components/designer-canvas/index.esm.js +24 -21
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-canvas/package.json +1 -1
- package/components/designer-outline/index.esm.js +44 -42
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/designer-outline/package.json +1 -1
- package/components/designer-toolbox/index.esm.js +28 -467
- package/components/designer-toolbox/index.umd.cjs +1 -1
- package/components/designer-toolbox/package.json +1 -1
- package/components/discussion-editor/package.json +1 -1
- package/components/discussion-list/package.json +1 -1
- package/components/drawer/package.json +1 -1
- package/components/dropdown/index.esm.js +86 -86
- package/components/dropdown/index.umd.cjs +1 -1
- package/components/dropdown/package.json +1 -1
- package/components/dynamic-form/index.esm.js +984 -928
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-form/package.json +1 -1
- package/components/dynamic-resolver/index.esm.js +56 -47
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-resolver/package.json +1 -1
- package/components/dynamic-view/index.esm.js +281 -277
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/dynamic-view/package.json +1 -1
- package/components/enum-editor/package.json +1 -1
- package/components/events-editor/package.json +1 -1
- package/components/expression-editor/package.json +1 -1
- package/components/external-container/index.css +1 -0
- package/components/external-container/index.esm.js +1917 -1901
- package/components/external-container/index.umd.cjs +1 -1
- package/components/external-container/package.json +1 -1
- package/components/field-selector/index.css +1 -0
- package/components/field-selector/index.esm.js +4185 -4023
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/field-selector/package.json +1 -1
- package/components/filter-bar/{style.css → index.css} +1 -1
- package/components/filter-bar/index.esm.js +595 -581
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-bar/package.json +1 -1
- package/components/flow-canvas/index.css +1 -0
- package/components/flow-canvas/index.esm.js +38 -35
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/flow-canvas/package.json +1 -1
- package/components/image-cropper/package.json +1 -1
- package/components/input-group/index.esm.js +256 -248
- package/components/input-group/index.umd.cjs +1 -1
- package/components/input-group/package.json +1 -1
- package/components/layout/package.json +1 -1
- package/components/list-nav/package.json +1 -1
- package/components/list-view/index.esm.js +1522 -1519
- package/components/list-view/index.umd.cjs +1 -1
- package/components/list-view/package.json +1 -1
- package/components/loading/package.json +1 -1
- package/components/locale/package.json +1 -1
- package/components/lookup/index.css +1 -0
- package/components/lookup/index.esm.js +4629 -4410
- package/components/lookup/index.umd.cjs +1 -1
- package/components/lookup/package.json +1 -1
- package/components/mapping-editor/index.css +1 -0
- package/components/mapping-editor/index.esm.js +4454 -4255
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/mapping-editor/package.json +1 -1
- package/components/message-box/index.css +1 -0
- package/components/message-box/index.esm.js +397 -386
- package/components/message-box/index.umd.cjs +1 -1
- package/components/message-box/package.json +1 -1
- package/components/modal/index.css +1 -0
- package/components/modal/index.esm.js +308 -297
- package/components/modal/index.umd.cjs +1 -1
- package/components/modal/package.json +1 -1
- package/components/nav/index.esm.js +511 -469
- package/components/nav/index.umd.cjs +2 -2
- package/components/nav/package.json +1 -1
- package/components/notify/package.json +1 -1
- package/components/order/index.esm.js +972 -920
- package/components/order/index.umd.cjs +1 -1
- package/components/order/package.json +1 -1
- package/components/page-footer/package.json +1 -1
- package/components/page-header/index.esm.js +917 -893
- package/components/page-header/index.umd.cjs +1 -1
- package/components/page-header/package.json +1 -1
- package/components/pagination/index.esm.js +491 -449
- package/components/pagination/index.umd.cjs +1 -1
- package/components/pagination/package.json +1 -1
- package/components/popover/package.json +1 -1
- package/components/progress/package.json +1 -1
- package/components/property-editor/index.esm.js +108 -101
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-editor/package.json +1 -1
- package/components/property-panel/index.esm.js +361 -349
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/property-panel/package.json +1 -1
- package/components/radio-button/package.json +1 -1
- package/components/radio-group/index.esm.js +72 -64
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/radio-group/package.json +1 -1
- package/components/rate/package.json +1 -1
- package/components/response-layout/package.json +1 -1
- package/components/response-layout-editor/{style.css → index.css} +1 -1
- package/components/response-layout-editor/index.esm.js +452 -439
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-layout-editor/package.json +1 -1
- package/components/response-toolbar/index.esm.js +610 -592
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/response-toolbar/package.json +1 -1
- package/components/schema-selector/index.css +1 -0
- package/components/schema-selector/index.esm.js +4041 -3749
- package/components/schema-selector/index.umd.cjs +8 -1
- package/components/schema-selector/package.json +1 -1
- package/components/search-box/package.json +1 -1
- package/components/section/index.esm.js +21 -14
- package/components/section/index.umd.cjs +1 -1
- package/components/section/package.json +1 -1
- package/components/smoke-detector/package.json +1 -1
- package/components/spacing-editor/package.json +1 -1
- package/components/splitter/package.json +1 -1
- package/components/step/package.json +1 -1
- package/components/switch/index.esm.js +159 -178
- package/components/switch/index.umd.cjs +1 -1
- package/components/switch/package.json +1 -1
- package/components/tabs/index.css +1 -0
- package/components/tabs/index.esm.js +1450 -1408
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tabs/package.json +1 -1
- package/components/tags/package.json +1 -1
- package/components/text/package.json +1 -1
- package/components/textarea/index.esm.js +86 -78
- package/components/textarea/index.umd.cjs +1 -1
- package/components/textarea/package.json +1 -1
- package/components/time-picker/index.css +1 -0
- package/components/time-picker/index.esm.js +387 -379
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/time-picker/package.json +1 -1
- package/components/tooltip/package.json +1 -1
- package/components/transfer/index.esm.js +95 -93
- package/components/transfer/index.umd.cjs +1 -1
- package/components/transfer/package.json +1 -1
- package/components/{data-grid/style.css → tree-grid/index.css} +1 -1
- package/components/tree-grid/index.esm.js +4437 -4271
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-grid/package.json +1 -1
- package/components/tree-view/index.esm.js +1989 -1985
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/tree-view/package.json +1 -1
- package/components/uploader/package.json +1 -1
- package/components/verify-detail/package.json +1 -1
- package/components/video/package.json +1 -1
- package/components/weather/package.json +1 -1
- package/farris.all.esm.js +12989 -12513
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -0
- package/package.json +2 -2
- package/types/combo-tree/src/combo-tree.props.d.ts +4 -0
- package/types/combo-tree/src/components/tree-container.component.d.ts +13 -3
- package/types/combo-tree/src/components/tree-container.props.d.ts +15 -1
- package/types/combo-tree/src/schema/schema-mapper.d.ts +2 -0
- package/types/combo-tree/src/schema/schema-resolver.d.ts +2 -0
- package/types/components.d.ts +1 -0
- package/types/condition/index.d.ts +60 -1
- package/types/data-grid/index.d.ts +5 -5
- package/types/data-grid/src/data-grid.component.d.ts +2 -2
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +1 -1
- package/types/data-view/components/column-setting/column-setting.component.d.ts +2 -1
- package/types/data-view/composition/types.d.ts +2 -0
- package/types/designer-canvas/src/composition/dg-control.d.ts +8 -8
- package/types/designer-canvas/src/composition/types.d.ts +1 -0
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +3 -3
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/converter/pagination.converter.d.ts +6 -0
- package/types/dynamic-resolver/src/visible-prop-resolver.d.ts +3 -0
- package/types/list-view/src/composition/types.d.ts +1 -1
- package/types/lookup/src/designer/use-lookup-rules.d.ts +3 -0
- package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +8 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +29 -25
- package/types/mapping-editor/src/mapping-editor.props.d.ts +8 -0
- package/types/message-box/index.d.ts +84 -1
- package/types/modal/src/modal.component.d.ts +3 -3
- package/types/modal/src/modal.props.d.ts +3 -5
- package/types/notify/index.d.ts +84 -1
- package/types/page-header/src/page-header.props.d.ts +7 -0
- package/types/page-header/src/property-config/page-header.property-config.d.ts +1 -1
- package/types/property-panel/src/composition/entity/base-property.d.ts +2 -0
- package/types/response-toolbar/index.d.ts +9 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -1
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -1
- package/types/response-toolbar/src/response-toolbar.component.d.ts +4 -2
- package/types/response-toolbar/src/response-toolbar.props.d.ts +9 -2
- package/types/schema-selector/src/composition/types.d.ts +3 -1
- package/types/schema-selector/src/schema-selector-editor.component.d.ts +5 -1
- package/types/tabs/src/designer/tab-toolbar.design.component.d.ts +1 -1
- package/types/tabs/src/tabs.props.d.ts +8 -0
- package/types/tree-grid/src/schema/column-resolver.d.ts +3 -0
- package/components/button-edit/style.css +0 -1
- package/components/designer-canvas/style.css +0 -1
- package/components/external-container/style.css +0 -1
- package/components/field-selector/style.css +0 -1
- package/components/flow-canvas/style.css +0 -1
- package/components/lookup/style.css +0 -1
- package/components/mapping-editor/style.css +0 -1
- package/components/message-box/style.css +0 -1
- package/components/modal/style.css +0 -1
- package/components/schema-selector/style.css +0 -1
- package/components/tabs/style.css +0 -1
- package/components/time-picker/style.css +0 -1
- package/style.css +0 -1
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +0 -19
- /package/components/border-editor/{style.css → index.css} +0 -0
- /package/components/checkbox/{style.css → index.css} +0 -0
- /package/components/date-picker/{style.css → index.css} +0 -0
- /package/components/designer-outline/{style.css → index.css} +0 -0
- /package/components/designer-toolbox/{style.css → index.css} +0 -0
- /package/components/discussion-editor/{style.css → index.css} +0 -0
- /package/components/discussion-list/{style.css → index.css} +0 -0
- /package/components/drawer/{style.css → index.css} +0 -0
- /package/components/events-editor/{style.css → index.css} +0 -0
- /package/components/list-view/{style.css → index.css} +0 -0
- /package/components/order/{style.css → index.css} +0 -0
- /package/components/property-editor/{style.css → index.css} +0 -0
- /package/components/property-panel/{style.css → index.css} +0 -0
- /package/components/radio-button/{style.css → index.css} +0 -0
- /package/components/radio-group/{style.css → index.css} +0 -0
- /package/components/smoke-detector/{style.css → index.css} +0 -0
- /package/components/spacing-editor/{style.css → index.css} +0 -0
- /package/components/splitter/{style.css → index.css} +0 -0
- /package/components/switch/{style.css → index.css} +0 -0
- /package/components/transfer/{style.css → index.css} +0 -0
- /package/components/uploader/{style.css → index.css} +0 -0
- /package/components/weather/{style.css → index.css} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var ve = Object.defineProperty;
|
|
2
2
|
var ye = (e, t, n) => t in e ? ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var w = (e, t, n) => ye(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { ref as I, computed as P, watch as W, defineComponent as Z, onBeforeUnmount as be, createVNode as
|
|
4
|
+
import { ref as I, computed as P, watch as W, defineComponent as Z, onBeforeUnmount as be, createVNode as F, createTextVNode as _, onMounted as J, nextTick as te, reactive as Ce, withDirectives as Fe, resolveDirective as we, Fragment as ne, mergeProps as Te } from "vue";
|
|
5
5
|
import xe, { FDynamicFormGroup as ke } from "@farris/ui-vue/components/dynamic-form";
|
|
6
6
|
import { cloneDeep as Q } from "lodash-es";
|
|
7
7
|
import K from "@farris/ui-vue/components/combo-list";
|
|
@@ -14,55 +14,56 @@ import je from "@farris/ui-vue/components/button-group";
|
|
|
14
14
|
import Le from "@farris/ui-vue/components/calendar";
|
|
15
15
|
import Ae from "@farris/ui-vue/components/capsule";
|
|
16
16
|
import Ne from "@farris/ui-vue/components/checkbox";
|
|
17
|
-
import $e from "@farris/ui-vue/components/
|
|
18
|
-
import Re from "@farris/ui-vue/components/
|
|
19
|
-
import Ge from "@farris/ui-vue/components/
|
|
20
|
-
import qe from "@farris/ui-vue/components/
|
|
21
|
-
import De from "@farris/ui-vue/components/
|
|
22
|
-
import We from "@farris/ui-vue/components/
|
|
23
|
-
import ze from "@farris/ui-vue/components/
|
|
24
|
-
import Ue from "@farris/ui-vue/components/
|
|
25
|
-
import He from "@farris/ui-vue/components/
|
|
26
|
-
import Qe from "@farris/ui-vue/components/
|
|
27
|
-
import Ze from "@farris/ui-vue/components/
|
|
28
|
-
import _e from "@farris/ui-vue/components/
|
|
29
|
-
import Je from "@farris/ui-vue/components/
|
|
30
|
-
import Xe from "@farris/ui-vue/components/list-
|
|
31
|
-
import Ye from "@farris/ui-vue/components/
|
|
32
|
-
import Ke from "@farris/ui-vue/components/
|
|
33
|
-
import et from "@farris/ui-vue/components/
|
|
34
|
-
import tt from "@farris/ui-vue/components/
|
|
35
|
-
import nt from "@farris/ui-vue/components/
|
|
36
|
-
import ot from "@farris/ui-vue/components/
|
|
37
|
-
import rt from "@farris/ui-vue/components/page-
|
|
38
|
-
import it from "@farris/ui-vue/components/
|
|
17
|
+
import $e from "@farris/ui-vue/components/combo-tree";
|
|
18
|
+
import Re from "@farris/ui-vue/components/component";
|
|
19
|
+
import Ge from "@farris/ui-vue/components/color-picker";
|
|
20
|
+
import qe from "@farris/ui-vue/components/content-container";
|
|
21
|
+
import De from "@farris/ui-vue/components/date-picker";
|
|
22
|
+
import We from "@farris/ui-vue/components/data-grid";
|
|
23
|
+
import ze from "@farris/ui-vue/components/dropdown";
|
|
24
|
+
import Ue from "@farris/ui-vue/components/events-editor";
|
|
25
|
+
import He from "@farris/ui-vue/components/filter-bar";
|
|
26
|
+
import Qe from "@farris/ui-vue/components/field-selector";
|
|
27
|
+
import Ze from "@farris/ui-vue/components/image-cropper";
|
|
28
|
+
import _e from "@farris/ui-vue/components/input-group";
|
|
29
|
+
import Je from "@farris/ui-vue/components/layout";
|
|
30
|
+
import Xe from "@farris/ui-vue/components/list-nav";
|
|
31
|
+
import Ye from "@farris/ui-vue/components/list-view";
|
|
32
|
+
import Ke from "@farris/ui-vue/components/lookup";
|
|
33
|
+
import et from "@farris/ui-vue/components/mapping-editor";
|
|
34
|
+
import tt from "@farris/ui-vue/components/nav";
|
|
35
|
+
import nt from "@farris/ui-vue/components/number-range";
|
|
36
|
+
import ot from "@farris/ui-vue/components/order";
|
|
37
|
+
import rt from "@farris/ui-vue/components/page-header";
|
|
38
|
+
import it from "@farris/ui-vue/components/page-footer";
|
|
39
|
+
import at from "@farris/ui-vue/components/pagination";
|
|
39
40
|
import lt from "@farris/ui-vue/components/progress";
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import
|
|
60
|
-
import
|
|
61
|
-
import
|
|
62
|
-
import
|
|
63
|
-
import
|
|
41
|
+
import st from "@farris/ui-vue/components/query-solution";
|
|
42
|
+
import ut from "@farris/ui-vue/components/radio-group";
|
|
43
|
+
import ct from "@farris/ui-vue/components/rate";
|
|
44
|
+
import dt from "@farris/ui-vue/components/response-toolbar";
|
|
45
|
+
import pt from "@farris/ui-vue/components/response-layout";
|
|
46
|
+
import ft from "@farris/ui-vue/components/response-layout-editor";
|
|
47
|
+
import mt from "@farris/ui-vue/components/search-box";
|
|
48
|
+
import gt from "@farris/ui-vue/components/section";
|
|
49
|
+
import ht from "@farris/ui-vue/components/smoke-detector";
|
|
50
|
+
import vt from "@farris/ui-vue/components/splitter";
|
|
51
|
+
import yt from "@farris/ui-vue/components/step";
|
|
52
|
+
import bt from "@farris/ui-vue/components/switch";
|
|
53
|
+
import Ct from "@farris/ui-vue/components/tabs";
|
|
54
|
+
import Ft from "@farris/ui-vue/components/tags";
|
|
55
|
+
import wt from "@farris/ui-vue/components/text";
|
|
56
|
+
import Tt from "@farris/ui-vue/components/time-picker";
|
|
57
|
+
import xt from "@farris/ui-vue/components/transfer";
|
|
58
|
+
import kt from "@farris/ui-vue/components/tree-view";
|
|
59
|
+
import Bt from "@farris/ui-vue/components/uploader";
|
|
60
|
+
import It from "@farris/ui-vue/components/verify-detail";
|
|
61
|
+
import St from "@farris/ui-vue/components/weather";
|
|
62
|
+
import Vt from "@farris/ui-vue/components/video";
|
|
63
|
+
import Et from "@farris/ui-vue/components/textarea";
|
|
64
|
+
import Mt from "@farris/ui-vue/components/schema-selector";
|
|
64
65
|
import "@farris/ui-vue/components/external-container";
|
|
65
|
-
const
|
|
66
|
+
const ae = {
|
|
66
67
|
conditions: { type: Array, default: [] },
|
|
67
68
|
fields: { type: Array, default: [] },
|
|
68
69
|
key: { type: String, default: "" },
|
|
@@ -71,7 +72,7 @@ const le = {
|
|
|
71
72
|
*/
|
|
72
73
|
isControlInline: { type: Boolean, default: !0 }
|
|
73
74
|
};
|
|
74
|
-
class
|
|
75
|
+
class Pt {
|
|
75
76
|
constructor(t = { value: [] }) {
|
|
76
77
|
w(this, "editorType", "check-box");
|
|
77
78
|
w(this, "value");
|
|
@@ -91,7 +92,7 @@ class Mt {
|
|
|
91
92
|
return this.value.length === 0;
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
|
-
class
|
|
95
|
+
class Ot {
|
|
95
96
|
constructor(t = { textValue: "", value: "", valueField: "" }) {
|
|
96
97
|
w(this, "editorType", "combo-lookup");
|
|
97
98
|
w(this, "textValue");
|
|
@@ -125,7 +126,7 @@ class Pt {
|
|
|
125
126
|
return !this.valueField;
|
|
126
127
|
}
|
|
127
128
|
}
|
|
128
|
-
class
|
|
129
|
+
class jt {
|
|
129
130
|
constructor(t = { value: "" }) {
|
|
130
131
|
w(this, "editorType", "date-picker");
|
|
131
132
|
w(this, "value");
|
|
@@ -166,7 +167,7 @@ class oe {
|
|
|
166
167
|
return !this.begin || !this.end;
|
|
167
168
|
}
|
|
168
169
|
}
|
|
169
|
-
class
|
|
170
|
+
class Lt {
|
|
170
171
|
constructor(t = { value: "" }) {
|
|
171
172
|
w(this, "editorType", "datetime-picker");
|
|
172
173
|
w(this, "value");
|
|
@@ -186,7 +187,7 @@ class jt {
|
|
|
186
187
|
return !this.value;
|
|
187
188
|
}
|
|
188
189
|
}
|
|
189
|
-
class
|
|
190
|
+
class At {
|
|
190
191
|
// 旧结构无,新结构为选中的value值,多选是以,分割的字符串
|
|
191
192
|
constructor(t = { value: "", dispalyText: "" }) {
|
|
192
193
|
w(this, "editorType", "combo-list");
|
|
@@ -209,7 +210,7 @@ class Lt {
|
|
|
209
210
|
return !this.displayText;
|
|
210
211
|
}
|
|
211
212
|
}
|
|
212
|
-
class
|
|
213
|
+
class Nt {
|
|
213
214
|
constructor(t = { value: [], displayText: "", displayField: "", isInputText: !1 }) {
|
|
214
215
|
w(this, "editorType", "input-group");
|
|
215
216
|
// 通过弹窗返回的若干个值对象构成的数组
|
|
@@ -248,7 +249,7 @@ class At {
|
|
|
248
249
|
return !this.displayText;
|
|
249
250
|
}
|
|
250
251
|
}
|
|
251
|
-
class
|
|
252
|
+
class $t {
|
|
252
253
|
constructor(t = { textValue: "", value: [], valueField: "", isInputText: !1 }) {
|
|
253
254
|
w(this, "editorType", "lookup");
|
|
254
255
|
w(this, "textValue");
|
|
@@ -284,7 +285,7 @@ class Nt {
|
|
|
284
285
|
return !this.value.length;
|
|
285
286
|
}
|
|
286
287
|
}
|
|
287
|
-
class
|
|
288
|
+
class Rt {
|
|
288
289
|
constructor(t = { value: "" }) {
|
|
289
290
|
w(this, "editorType", "month-picker");
|
|
290
291
|
w(this, "value");
|
|
@@ -304,7 +305,7 @@ class $t {
|
|
|
304
305
|
return !this.value;
|
|
305
306
|
}
|
|
306
307
|
}
|
|
307
|
-
class
|
|
308
|
+
class Gt {
|
|
308
309
|
constructor(t = { begin: "", end: "" }) {
|
|
309
310
|
w(this, "editorType", "month-range");
|
|
310
311
|
w(this, "begin");
|
|
@@ -325,7 +326,7 @@ class Rt {
|
|
|
325
326
|
return !this.begin || !this.end;
|
|
326
327
|
}
|
|
327
328
|
}
|
|
328
|
-
class
|
|
329
|
+
class qt {
|
|
329
330
|
constructor(t = { begin: null, end: null }) {
|
|
330
331
|
w(this, "editorType", "number-range");
|
|
331
332
|
w(this, "begin");
|
|
@@ -349,7 +350,7 @@ class Gt {
|
|
|
349
350
|
return this.begin == null && this.end == null;
|
|
350
351
|
}
|
|
351
352
|
}
|
|
352
|
-
class
|
|
353
|
+
class Dt {
|
|
353
354
|
constructor(t = { value: "" }) {
|
|
354
355
|
w(this, "editorType", "number-spinner");
|
|
355
356
|
w(this, "value");
|
|
@@ -369,7 +370,7 @@ class qt {
|
|
|
369
370
|
return this.value == null;
|
|
370
371
|
}
|
|
371
372
|
}
|
|
372
|
-
class
|
|
373
|
+
class Wt {
|
|
373
374
|
constructor(t = { value: null }) {
|
|
374
375
|
w(this, "editorType", "radio-group");
|
|
375
376
|
w(this, "value");
|
|
@@ -389,7 +390,7 @@ class Dt {
|
|
|
389
390
|
return !this.value;
|
|
390
391
|
}
|
|
391
392
|
}
|
|
392
|
-
class
|
|
393
|
+
class le {
|
|
393
394
|
constructor(t = { value: "" }) {
|
|
394
395
|
w(this, "editorType", "text");
|
|
395
396
|
w(this, "value");
|
|
@@ -413,94 +414,94 @@ function se() {
|
|
|
413
414
|
function e(t, n) {
|
|
414
415
|
switch (t) {
|
|
415
416
|
case "check-box":
|
|
416
|
-
return new
|
|
417
|
+
return new Pt(n);
|
|
417
418
|
case "combo-list":
|
|
418
|
-
return new
|
|
419
|
+
return new At(n);
|
|
419
420
|
case "combo-lookup":
|
|
420
|
-
return new
|
|
421
|
+
return new Ot(n);
|
|
421
422
|
case "input-group":
|
|
422
|
-
return new
|
|
423
|
+
return new Nt(n);
|
|
423
424
|
case "date-picker":
|
|
424
|
-
return new
|
|
425
|
+
return new jt(n);
|
|
425
426
|
case "date-range":
|
|
426
427
|
return new oe(n);
|
|
427
428
|
case "datetime-picker":
|
|
428
|
-
return new
|
|
429
|
+
return new Lt(n);
|
|
429
430
|
case "datetime-range":
|
|
430
431
|
return new oe(n);
|
|
431
432
|
case "lookup":
|
|
432
|
-
return new Nt(n);
|
|
433
|
-
case "month-picker":
|
|
434
433
|
return new $t(n);
|
|
435
|
-
case "month-
|
|
434
|
+
case "month-picker":
|
|
436
435
|
return new Rt(n);
|
|
437
|
-
case "
|
|
436
|
+
case "month-range":
|
|
438
437
|
return new Gt(n);
|
|
439
|
-
case "number-
|
|
438
|
+
case "number-range":
|
|
440
439
|
return new qt(n);
|
|
441
|
-
case "
|
|
440
|
+
case "number-spinner":
|
|
442
441
|
return new Dt(n);
|
|
442
|
+
case "radio-group":
|
|
443
|
+
return new Wt(n);
|
|
443
444
|
default:
|
|
444
|
-
return new
|
|
445
|
+
return new le(n);
|
|
445
446
|
}
|
|
446
447
|
}
|
|
447
448
|
return { createConditionValue: e };
|
|
448
449
|
}
|
|
449
450
|
function ue(e, t) {
|
|
450
451
|
const n = I(e.fields), o = I([]), r = /* @__PURE__ */ new Map(), { createConditionValue: p } = se();
|
|
451
|
-
function d(
|
|
452
|
-
switch (
|
|
452
|
+
function d(l) {
|
|
453
|
+
switch (l.editor ? l.editor.type : "input-group") {
|
|
453
454
|
case "date-range":
|
|
454
|
-
|
|
455
|
+
l.editor.type = "date-picker";
|
|
455
456
|
break;
|
|
456
457
|
case "datetime-range":
|
|
457
|
-
|
|
458
|
+
l.editor.type = "datetime-picker";
|
|
458
459
|
break;
|
|
459
460
|
case "number-range":
|
|
460
|
-
|
|
461
|
+
l.editor.type = "number-spinner";
|
|
461
462
|
break;
|
|
462
463
|
}
|
|
463
|
-
return
|
|
464
|
+
return l.editor;
|
|
464
465
|
}
|
|
465
|
-
function
|
|
466
|
-
return
|
|
466
|
+
function y(l) {
|
|
467
|
+
return l.map((c) => Object.assign({}, c)).map((c) => (c.editor = d(c), c));
|
|
467
468
|
}
|
|
468
|
-
function k(
|
|
469
|
-
n.value.reduce((u, c) => (
|
|
469
|
+
function k(l = !0) {
|
|
470
|
+
n.value.reduce((u, c) => (l || (c.editor = d(c)), u.set(c.labelCode, c), u), r);
|
|
470
471
|
}
|
|
471
|
-
function s(
|
|
472
|
-
return
|
|
472
|
+
function s(l) {
|
|
473
|
+
return l.forEach((u) => {
|
|
473
474
|
if (u && typeof u.valueConfig == "object") {
|
|
474
475
|
const c = r.get(u.fieldCode);
|
|
475
476
|
u.value = p(c.editor.type, u.valueConfig.content);
|
|
476
477
|
}
|
|
477
|
-
}),
|
|
478
|
+
}), l;
|
|
478
479
|
}
|
|
479
|
-
return { convertToSingleControl:
|
|
480
|
+
return { convertToSingleControl: y, fields: n, fieldMap: r, fieldConditions: o, loadFieldConfigs: k, initialConditionValue: s };
|
|
480
481
|
}
|
|
481
|
-
function
|
|
482
|
+
function zt(e, t, n) {
|
|
482
483
|
const o = I(null), r = I(n), p = I(0), d = P(() => s(p.value));
|
|
483
|
-
function
|
|
484
|
-
r.value && (o.value = new ResizeObserver(k((
|
|
485
|
-
const u =
|
|
484
|
+
function y() {
|
|
485
|
+
r.value && (o.value = new ResizeObserver(k((l) => {
|
|
486
|
+
const u = l[0];
|
|
486
487
|
p.value = u.contentRect.width;
|
|
487
488
|
})), o.value.observe(r.value));
|
|
488
489
|
}
|
|
489
|
-
function k(
|
|
490
|
+
function k(l, u) {
|
|
490
491
|
let c = null;
|
|
491
492
|
return function() {
|
|
492
493
|
const V = arguments;
|
|
493
494
|
c || (c = setTimeout(() => {
|
|
494
495
|
c = null;
|
|
495
|
-
}, 500),
|
|
496
|
+
}, 500), l(...V));
|
|
496
497
|
};
|
|
497
498
|
}
|
|
498
|
-
function s(
|
|
499
|
+
function s(l) {
|
|
499
500
|
let c = "col-12";
|
|
500
|
-
return
|
|
501
|
+
return l > 250 * 6 ? c = "col-2" : l > 250 * 4 ? c = "col-3" : l > 250 * 3 ? c = "col-4" : l > 250 * 2 && (c = "col-6"), c;
|
|
501
502
|
}
|
|
502
|
-
return W([n], ([
|
|
503
|
-
r.value =
|
|
503
|
+
return W([n], ([l]) => {
|
|
504
|
+
r.value = l, y();
|
|
504
505
|
}), {
|
|
505
506
|
conditionClass: d,
|
|
506
507
|
resizeObserver: o
|
|
@@ -508,18 +509,18 @@ function Wt(e, t, n) {
|
|
|
508
509
|
}
|
|
509
510
|
const re = /* @__PURE__ */ Z({
|
|
510
511
|
name: "FConditionFields",
|
|
511
|
-
props:
|
|
512
|
+
props: ae,
|
|
512
513
|
emits: ["valueChange", "blur", "focus", "click", "input"],
|
|
513
514
|
setup(e, t) {
|
|
514
515
|
const n = I(), o = I(e.key), r = I(e.isControlInline), p = I(e.conditions), d = ue(e), {
|
|
515
|
-
initialConditionValue:
|
|
516
|
+
initialConditionValue: y,
|
|
516
517
|
fieldMap: k,
|
|
517
518
|
loadFieldConfigs: s
|
|
518
|
-
} = d,
|
|
519
|
+
} = d, l = zt(e, t, n), {
|
|
519
520
|
conditionClass: u,
|
|
520
521
|
resizeObserver: c
|
|
521
|
-
} =
|
|
522
|
-
s(!0),
|
|
522
|
+
} = l;
|
|
523
|
+
s(!0), y(p.value), be(() => {
|
|
523
524
|
var T;
|
|
524
525
|
(T = c.value) == null || T.unobserve(n.value);
|
|
525
526
|
}), W(() => e.conditions, () => {
|
|
@@ -537,7 +538,7 @@ const re = /* @__PURE__ */ Z({
|
|
|
537
538
|
function q() {
|
|
538
539
|
return p.value.map((T) => {
|
|
539
540
|
var x;
|
|
540
|
-
return
|
|
541
|
+
return F(ke, {
|
|
541
542
|
customClass: E.value,
|
|
542
543
|
label: T.fieldName,
|
|
543
544
|
editor: (x = k.get(T.fieldCode)) == null ? void 0 : x.editor,
|
|
@@ -549,22 +550,22 @@ const re = /* @__PURE__ */ Z({
|
|
|
549
550
|
}, null);
|
|
550
551
|
});
|
|
551
552
|
}
|
|
552
|
-
return () =>
|
|
553
|
+
return () => F("div", {
|
|
553
554
|
class: V.value,
|
|
554
555
|
key: o.value,
|
|
555
556
|
ref: n
|
|
556
557
|
}, [q()]);
|
|
557
558
|
}
|
|
558
|
-
}),
|
|
559
|
+
}), Ut = {}, Ht = {};
|
|
559
560
|
function ce(e) {
|
|
560
561
|
const { properties: t, title: n } = e, o = Object.keys(t).reduce((r, p) => (r[p] = t[p].type === "object" && t[p].properties ? ce(t[p]) : Q(t[p].default), r), {});
|
|
561
562
|
return o.id = `${n}-${Date.now()}`, o;
|
|
562
563
|
}
|
|
563
|
-
function
|
|
564
|
+
function Qt(e, t) {
|
|
564
565
|
const n = ce(t);
|
|
565
566
|
return Object.keys(e).reduce((o, r) => (o[r] = e[r], o), n), n;
|
|
566
567
|
}
|
|
567
|
-
function
|
|
568
|
+
function Zt(e, t) {
|
|
568
569
|
return Object.keys(e).filter((o) => e[o] != null).reduce((o, r) => {
|
|
569
570
|
if (t.has(r)) {
|
|
570
571
|
const p = t.get(r);
|
|
@@ -579,12 +580,12 @@ function Qt(e, t) {
|
|
|
579
580
|
return o;
|
|
580
581
|
}, {});
|
|
581
582
|
}
|
|
582
|
-
function
|
|
583
|
-
const o =
|
|
584
|
-
return
|
|
583
|
+
function _t(e, t, n = /* @__PURE__ */ new Map()) {
|
|
584
|
+
const o = Qt(e, t);
|
|
585
|
+
return Zt(o, n);
|
|
585
586
|
}
|
|
586
|
-
function
|
|
587
|
-
function t(s,
|
|
587
|
+
function Jt(e = {}) {
|
|
588
|
+
function t(s, l, u, c) {
|
|
588
589
|
if (typeof u == "number")
|
|
589
590
|
return c[s].length === u;
|
|
590
591
|
if (typeof u == "object") {
|
|
@@ -598,20 +599,20 @@ function _t(e = {}) {
|
|
|
598
599
|
}
|
|
599
600
|
return !1;
|
|
600
601
|
}
|
|
601
|
-
function n(s,
|
|
602
|
+
function n(s, l, u, c) {
|
|
602
603
|
return c[s] && c[s].propertyValue && String(c[s].propertyValue.value) === String(u);
|
|
603
604
|
}
|
|
604
605
|
const o = /* @__PURE__ */ new Map([
|
|
605
606
|
["length", t],
|
|
606
607
|
["getProperty", n]
|
|
607
608
|
]);
|
|
608
|
-
Object.keys(e).reduce((s,
|
|
609
|
-
function r(s,
|
|
609
|
+
Object.keys(e).reduce((s, l) => (s.set(l, e[l]), s), o);
|
|
610
|
+
function r(s, l) {
|
|
610
611
|
const u = s;
|
|
611
|
-
return typeof
|
|
612
|
+
return typeof l == "number" ? [{ target: u, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: u, operator: "getProperty", param: s, value: !!l }] : typeof l == "object" ? Object.keys(l).map((c) => {
|
|
612
613
|
if (c === "length")
|
|
613
|
-
return { target: u, operator: "length", param: null, value:
|
|
614
|
-
const V = c, E =
|
|
614
|
+
return { target: u, operator: "length", param: null, value: l[c] };
|
|
615
|
+
const V = c, E = l[c];
|
|
615
616
|
return { target: u, operator: "getProperty", param: V, value: E };
|
|
616
617
|
}) : [];
|
|
617
618
|
}
|
|
@@ -621,28 +622,28 @@ function _t(e = {}) {
|
|
|
621
622
|
return u.push(...V), u;
|
|
622
623
|
}, []);
|
|
623
624
|
}
|
|
624
|
-
function d(s,
|
|
625
|
+
function d(s, l) {
|
|
625
626
|
if (o.has(s.operator)) {
|
|
626
627
|
const u = o.get(s.operator);
|
|
627
|
-
return u && u(s.target, s.param, s.value,
|
|
628
|
+
return u && u(s.target, s.param, s.value, l) || !1;
|
|
628
629
|
}
|
|
629
630
|
return !1;
|
|
630
631
|
}
|
|
631
|
-
function
|
|
632
|
-
return p(s).reduce((V, E) => V && d(E,
|
|
632
|
+
function y(s, l) {
|
|
633
|
+
return p(s).reduce((V, E) => V && d(E, l), !0);
|
|
633
634
|
}
|
|
634
|
-
function k(s,
|
|
635
|
-
const u = Object.keys(s), c = u.includes("allOf"), V = u.includes("anyOf"), E = c || V, T = (E ? s[E ? c ? "allOf" : "anyOf" : "allOf"] : [s]).map((M) =>
|
|
635
|
+
function k(s, l) {
|
|
636
|
+
const u = Object.keys(s), c = u.includes("allOf"), V = u.includes("anyOf"), E = c || V, T = (E ? s[E ? c ? "allOf" : "anyOf" : "allOf"] : [s]).map((M) => y(M, l));
|
|
636
637
|
return c ? !T.includes(!1) : T.includes(!0);
|
|
637
638
|
}
|
|
638
639
|
return { parseValueSchema: k };
|
|
639
640
|
}
|
|
640
|
-
const
|
|
641
|
-
|
|
642
|
-
function X(e, t, n = /* @__PURE__ */ new Map(), o = (d,
|
|
643
|
-
return
|
|
644
|
-
const
|
|
645
|
-
return Object.assign(k,
|
|
641
|
+
const Xt = {}, Yt = {};
|
|
642
|
+
Jt();
|
|
643
|
+
function X(e, t, n = /* @__PURE__ */ new Map(), o = (d, y, k) => y, r = {}, p = (d) => d) {
|
|
644
|
+
return Ut[t.title] = t, Ht[t.title] = o, Xt[t.title] = r, Yt[t.title] = p, (d = {}) => {
|
|
645
|
+
const y = _t(d, t, n), k = Object.keys(e).reduce((s, l) => (s[l] = e[l].default, s), {});
|
|
646
|
+
return Object.assign(k, y);
|
|
646
647
|
};
|
|
647
648
|
}
|
|
648
649
|
function de(e, t) {
|
|
@@ -651,22 +652,22 @@ function de(e, t) {
|
|
|
651
652
|
const ee = /* @__PURE__ */ new Map([
|
|
652
653
|
["appearance", de]
|
|
653
654
|
]);
|
|
654
|
-
function
|
|
655
|
+
function Kt(e, t, n, o) {
|
|
655
656
|
const r = e.getSchemaByType("section");
|
|
656
657
|
return r.id = `${o}-section`, r.appearance = { class: "f-section-form f-section-in-main" }, r.mainTitle = "标题", r.contents = [t], r;
|
|
657
658
|
}
|
|
658
|
-
function
|
|
659
|
+
function en(e, t, n, o) {
|
|
659
660
|
const r = e.getSchemaByType("component");
|
|
660
661
|
return r.id = `${o}-component`, r.componentType = "form-col-1", r.appearance = {
|
|
661
662
|
class: "f-struct-form f-struct-wrapper"
|
|
662
663
|
}, r.contents = [t], r;
|
|
663
664
|
}
|
|
664
|
-
function
|
|
665
|
+
function tn(e, t, n) {
|
|
665
666
|
t.appearance = { class: "f-form-layout farris-form farris-form-controls-inline" };
|
|
666
|
-
const o =
|
|
667
|
-
return
|
|
667
|
+
const o = Kt(e, t, n, t.id);
|
|
668
|
+
return en(e, o, n, t.id);
|
|
668
669
|
}
|
|
669
|
-
const
|
|
670
|
+
const nn = "https://json-schema.org/draft/2020-12/schema", on = "https://farris-design.gitee.io/response-form.schema.json", rn = "response-form", an = "A Farris Data Collection Component", ln = "object", sn = {
|
|
670
671
|
id: {
|
|
671
672
|
description: "The unique identifier for a form group",
|
|
672
673
|
type: "string"
|
|
@@ -694,18 +695,18 @@ const tn = "https://json-schema.org/draft/2020-12/schema", nn = "https://farris-
|
|
|
694
695
|
type: "array",
|
|
695
696
|
default: []
|
|
696
697
|
}
|
|
697
|
-
},
|
|
698
|
+
}, un = [
|
|
698
699
|
"id",
|
|
699
700
|
"type"
|
|
700
|
-
],
|
|
701
|
-
$schema:
|
|
702
|
-
$id:
|
|
703
|
-
title:
|
|
704
|
-
description:
|
|
701
|
+
], cn = {
|
|
702
|
+
$schema: nn,
|
|
703
|
+
$id: on,
|
|
704
|
+
title: rn,
|
|
705
|
+
description: an,
|
|
705
706
|
type: ln,
|
|
706
|
-
properties:
|
|
707
|
-
required:
|
|
708
|
-
},
|
|
707
|
+
properties: sn,
|
|
708
|
+
required: un
|
|
709
|
+
}, dn = "response-form", pn = "A Farris Component", fn = "object", mn = {
|
|
709
710
|
basic: {
|
|
710
711
|
description: "Basic Infomation",
|
|
711
712
|
title: "基本信息",
|
|
@@ -727,16 +728,16 @@ const tn = "https://json-schema.org/draft/2020-12/schema", nn = "https://farris-
|
|
|
727
728
|
}
|
|
728
729
|
}
|
|
729
730
|
}
|
|
730
|
-
}, mn = {
|
|
731
|
-
title: cn,
|
|
732
|
-
description: dn,
|
|
733
|
-
type: pn,
|
|
734
|
-
categories: fn
|
|
735
731
|
}, gn = {
|
|
732
|
+
title: dn,
|
|
733
|
+
description: pn,
|
|
734
|
+
type: fn,
|
|
735
|
+
categories: mn
|
|
736
|
+
}, hn = {
|
|
736
737
|
customClass: { type: String, default: "" }
|
|
737
738
|
};
|
|
738
|
-
X(
|
|
739
|
-
const
|
|
739
|
+
X(hn, cn, ee, tn, gn);
|
|
740
|
+
const vn = "https://json-schema.org/draft/2020-12/schema", yn = "https://farris-design.gitee.io/form-group.schema.json", bn = "form-group", Cn = "A Farris Input Component", Fn = "object", wn = {
|
|
740
741
|
id: {
|
|
741
742
|
description: "The unique identifier for a form group",
|
|
742
743
|
type: "string"
|
|
@@ -777,17 +778,17 @@ const hn = "https://json-schema.org/draft/2020-12/schema", vn = "https://farris-
|
|
|
777
778
|
description: "",
|
|
778
779
|
type: "number"
|
|
779
780
|
}
|
|
780
|
-
},
|
|
781
|
+
}, Tn = [
|
|
781
782
|
"id",
|
|
782
783
|
"type"
|
|
783
784
|
], pe = {
|
|
784
|
-
$schema:
|
|
785
|
-
$id:
|
|
786
|
-
title:
|
|
787
|
-
description:
|
|
788
|
-
type:
|
|
789
|
-
properties:
|
|
790
|
-
required:
|
|
785
|
+
$schema: vn,
|
|
786
|
+
$id: yn,
|
|
787
|
+
title: bn,
|
|
788
|
+
description: Cn,
|
|
789
|
+
type: Fn,
|
|
790
|
+
properties: wn,
|
|
791
|
+
required: Tn
|
|
791
792
|
}, fe = {
|
|
792
793
|
id: { type: String, default: "" },
|
|
793
794
|
customClass: { type: String, default: "" },
|
|
@@ -808,14 +809,14 @@ X(
|
|
|
808
809
|
ee,
|
|
809
810
|
void 0
|
|
810
811
|
);
|
|
811
|
-
const
|
|
812
|
+
const xn = {
|
|
812
813
|
id: { type: String },
|
|
813
814
|
required: { type: Boolean, default: !1 },
|
|
814
815
|
text: { type: String, default: "" },
|
|
815
816
|
title: { type: String }
|
|
816
|
-
},
|
|
817
|
+
}, kn = /* @__PURE__ */ Z({
|
|
817
818
|
name: "FDynamicFormLabel",
|
|
818
|
-
props:
|
|
819
|
+
props: xn,
|
|
819
820
|
emits: [],
|
|
820
821
|
setup(e, t) {
|
|
821
822
|
const n = I(e.title || e.text), o = I(e.required), r = I(e.text);
|
|
@@ -823,22 +824,22 @@ const Tn = {
|
|
|
823
824
|
r.value = e.text;
|
|
824
825
|
}), W(() => e.required, (p, d) => {
|
|
825
826
|
p !== d && (o.value = p);
|
|
826
|
-
}), () =>
|
|
827
|
+
}), () => F("label", {
|
|
827
828
|
class: "col-form-label",
|
|
828
829
|
title: n.value
|
|
829
|
-
}, [o.value &&
|
|
830
|
+
}, [o.value && F("span", {
|
|
830
831
|
class: "farris-label-info text-danger"
|
|
831
|
-
}, [_("*")]),
|
|
832
|
+
}, [_("*")]), F("span", {
|
|
832
833
|
class: "farris-label-text"
|
|
833
834
|
}, [r.value])]);
|
|
834
835
|
}
|
|
835
|
-
}),
|
|
836
|
+
}), Bn = /* @__PURE__ */ new Map([
|
|
836
837
|
["appearance", de]
|
|
837
838
|
]);
|
|
838
|
-
function
|
|
839
|
+
function In(e, t, n) {
|
|
839
840
|
return t;
|
|
840
841
|
}
|
|
841
|
-
const
|
|
842
|
+
const Sn = "https://json-schema.org/draft/2020-12/schema", Vn = "https://farris-design.gitee.io/input-group.schema.json", En = "input-group", Mn = "A Farris Input Component", Pn = "object", On = {
|
|
842
843
|
id: {
|
|
843
844
|
description: "The unique identifier for a Input Group",
|
|
844
845
|
type: "string"
|
|
@@ -1040,17 +1041,17 @@ const In = "https://json-schema.org/draft/2020-12/schema", Sn = "https://farris-
|
|
|
1040
1041
|
type: "string",
|
|
1041
1042
|
default: ""
|
|
1042
1043
|
}
|
|
1043
|
-
},
|
|
1044
|
+
}, jn = [
|
|
1044
1045
|
"id",
|
|
1045
1046
|
"type"
|
|
1046
|
-
],
|
|
1047
|
-
$schema:
|
|
1048
|
-
$id:
|
|
1049
|
-
title:
|
|
1050
|
-
description:
|
|
1051
|
-
type:
|
|
1052
|
-
properties:
|
|
1053
|
-
required:
|
|
1047
|
+
], Ln = {
|
|
1048
|
+
$schema: Sn,
|
|
1049
|
+
$id: Vn,
|
|
1050
|
+
title: En,
|
|
1051
|
+
description: Mn,
|
|
1052
|
+
type: Pn,
|
|
1053
|
+
properties: On,
|
|
1054
|
+
required: jn
|
|
1054
1055
|
}, me = {
|
|
1055
1056
|
/** 是否自动完成 */
|
|
1056
1057
|
autocomplete: { Type: String, default: "off" },
|
|
@@ -1118,16 +1119,16 @@ const In = "https://json-schema.org/draft/2020-12/schema", Sn = "https://farris-
|
|
|
1118
1119
|
*/
|
|
1119
1120
|
updateOn: { type: String, default: "blur" }
|
|
1120
1121
|
};
|
|
1121
|
-
X(me,
|
|
1122
|
-
function
|
|
1123
|
-
const r = I(e.disabled), p = I(!1), d = I("text"),
|
|
1122
|
+
X(me, Ln, Bn, In);
|
|
1123
|
+
function An(e, t, n, o) {
|
|
1124
|
+
const r = I(e.disabled), p = I(!1), d = I("text"), y = I(e.showBorder), k = I(e.textAlign), s = I(e.updateOn), l = P(() => e.editable || !e.readonly), u = P(() => e.editable && !e.disabled && !e.readonly), c = P(() => !e.disabled && p.value), V = P(() => n.value === "" || n.value === null || n.value === void 0), E = P(() => (e.disabled || e.readonly) && !e.forcePlaceholder ? "" : e.placeholder), O = P(() => e.readonly || !e.editable), q = P(() => e.enableTitle ? n.value : ""), T = P(() => ({
|
|
1124
1125
|
"form-control": !0,
|
|
1125
1126
|
"f-utils-fill": !0,
|
|
1126
1127
|
"text-left": k.value === "left",
|
|
1127
1128
|
"text-center": k.value === "center",
|
|
1128
1129
|
"text-right": k.value === "right"
|
|
1129
1130
|
})), x = P(() => {
|
|
1130
|
-
const
|
|
1131
|
+
const a = {
|
|
1131
1132
|
"f-cmp-inputgroup": !0,
|
|
1132
1133
|
"input-group": !0,
|
|
1133
1134
|
"f-state-disable": r.value,
|
|
@@ -1135,46 +1136,46 @@ function Ln(e, t, n, o) {
|
|
|
1135
1136
|
"f-state-readonly": O.value,
|
|
1136
1137
|
"f-state-focus": c.value
|
|
1137
1138
|
};
|
|
1138
|
-
return (e.customClass || "").split(" ").reduce((S, D) => (S[D] = !0, S),
|
|
1139
|
-
}), M = P(() =>
|
|
1140
|
-
function j(
|
|
1141
|
-
n.value =
|
|
1139
|
+
return (e.customClass || "").split(" ").reduce((S, D) => (S[D] = !0, S), a), a;
|
|
1140
|
+
}), M = P(() => y.value ? "" : "border-width : 0 ");
|
|
1141
|
+
function j(a, b = !0) {
|
|
1142
|
+
n.value = a, o.value !== a && (o.value = a), b && t.emit("change", a), t.emit("update:modelValue", a), t.emit("update:value", a);
|
|
1142
1143
|
}
|
|
1143
1144
|
W(
|
|
1144
1145
|
() => e.modelValue,
|
|
1145
|
-
(
|
|
1146
|
-
|
|
1146
|
+
(a, b) => {
|
|
1147
|
+
a !== b && (n.value = a, o.value = a);
|
|
1147
1148
|
}
|
|
1148
|
-
), W(() => e.disabled, (
|
|
1149
|
-
|
|
1149
|
+
), W(() => e.disabled, (a, b) => {
|
|
1150
|
+
a !== b && (r.value = a);
|
|
1150
1151
|
});
|
|
1151
|
-
function $(
|
|
1152
|
-
return p.value = !1, t.emit("blur",
|
|
1152
|
+
function $(a) {
|
|
1153
|
+
return p.value = !1, t.emit("blur", a), a.stopPropagation(), !1;
|
|
1153
1154
|
}
|
|
1154
|
-
function R(
|
|
1155
|
-
t.emit("click",
|
|
1155
|
+
function R(a) {
|
|
1156
|
+
t.emit("click", a);
|
|
1156
1157
|
}
|
|
1157
|
-
function A(
|
|
1158
|
-
e.disabled || (
|
|
1158
|
+
function A(a) {
|
|
1159
|
+
e.disabled || (y.value && (p.value = !0), l.value && t.emit("focus", a));
|
|
1159
1160
|
}
|
|
1160
|
-
function z(
|
|
1161
|
-
t.emit("input",
|
|
1162
|
-
const
|
|
1163
|
-
o.value =
|
|
1161
|
+
function z(a) {
|
|
1162
|
+
t.emit("input", a.target.value);
|
|
1163
|
+
const b = a.target.value;
|
|
1164
|
+
o.value = b, s.value === "input" && (t.emit("update:modelValue", b), t.emit("update:value", b));
|
|
1164
1165
|
}
|
|
1165
|
-
function i(
|
|
1166
|
-
t.emit("keydown",
|
|
1166
|
+
function i(a) {
|
|
1167
|
+
t.emit("keydown", a);
|
|
1167
1168
|
}
|
|
1168
|
-
function m(
|
|
1169
|
-
t.emit("keyup",
|
|
1169
|
+
function m(a) {
|
|
1170
|
+
t.emit("keyup", a);
|
|
1170
1171
|
}
|
|
1171
|
-
function f(
|
|
1172
|
-
|
|
1172
|
+
function f(a) {
|
|
1173
|
+
a.target.tagName !== "INPUT" && a.preventDefault(), a.stopPropagation();
|
|
1173
1174
|
}
|
|
1174
|
-
function B(
|
|
1175
|
+
function B(a) {
|
|
1175
1176
|
if (s.value === "blur") {
|
|
1176
|
-
const
|
|
1177
|
-
|
|
1177
|
+
const b = a.target.value;
|
|
1178
|
+
a.stopPropagation(), j(b);
|
|
1178
1179
|
}
|
|
1179
1180
|
}
|
|
1180
1181
|
return {
|
|
@@ -1202,15 +1203,15 @@ function Ln(e, t, n, o) {
|
|
|
1202
1203
|
inputGroupStyle: M
|
|
1203
1204
|
};
|
|
1204
1205
|
}
|
|
1205
|
-
function
|
|
1206
|
-
const o = I(!1), r = P(() => e.enableClear && !e.readonly && !e.disabled), { changeTextBoxValue: p, displayText: d, hasFocused:
|
|
1206
|
+
function Nn(e, t, n) {
|
|
1207
|
+
const o = I(!1), r = P(() => e.enableClear && !e.readonly && !e.disabled), { changeTextBoxValue: p, displayText: d, hasFocused: y, isEmpty: k } = n;
|
|
1207
1208
|
function s(O) {
|
|
1208
1209
|
o.value = O;
|
|
1209
1210
|
}
|
|
1210
1211
|
W(d, () => {
|
|
1211
|
-
|
|
1212
|
+
y != null && y.value ? s(!!(d != null && d.value)) : s(!1);
|
|
1212
1213
|
});
|
|
1213
|
-
const
|
|
1214
|
+
const l = P(() => ({
|
|
1214
1215
|
"input-group-text": !0,
|
|
1215
1216
|
"input-group-clear": !0
|
|
1216
1217
|
})), u = P(() => ({
|
|
@@ -1226,10 +1227,10 @@ function An(e, t, n) {
|
|
|
1226
1227
|
function E(O) {
|
|
1227
1228
|
r.value && s(!1);
|
|
1228
1229
|
}
|
|
1229
|
-
return { clearButtonClass:
|
|
1230
|
+
return { clearButtonClass: l, clearButtonStyle: u, hasShownClearButton: o, onClearValue: c, onMouseEnter: V, onMouseLeave: E, shouldShowClearButton: r };
|
|
1230
1231
|
}
|
|
1231
|
-
const
|
|
1232
|
-
function
|
|
1232
|
+
const $n = ["moz", "ms", "webkit"];
|
|
1233
|
+
function Rn() {
|
|
1233
1234
|
let e = 0;
|
|
1234
1235
|
return (t) => {
|
|
1235
1236
|
const n = (/* @__PURE__ */ new Date()).getTime(), o = Math.max(0, 16 - (n - e)), r = setTimeout(() => {
|
|
@@ -1238,43 +1239,43 @@ function $n() {
|
|
|
1238
1239
|
return e = n + o, r;
|
|
1239
1240
|
};
|
|
1240
1241
|
}
|
|
1241
|
-
function
|
|
1242
|
+
function Gn() {
|
|
1242
1243
|
if (typeof window > "u")
|
|
1243
1244
|
return () => 0;
|
|
1244
1245
|
if (window.requestAnimationFrame)
|
|
1245
1246
|
return window.requestAnimationFrame.bind(window);
|
|
1246
|
-
const e =
|
|
1247
|
-
return e ? window[`${e}RequestAnimationFrame`] :
|
|
1247
|
+
const e = $n.filter((t) => `${t}RequestAnimationFrame` in window)[0];
|
|
1248
|
+
return e ? window[`${e}RequestAnimationFrame`] : Rn();
|
|
1248
1249
|
}
|
|
1249
|
-
|
|
1250
|
-
function
|
|
1250
|
+
Gn();
|
|
1251
|
+
function qn(e, t) {
|
|
1251
1252
|
const n = I(e.groupText), o = P(() => e.showButtonWhenDisabled && (e.readonly || e.disabled)), r = P(() => e.enableClear || !!e.groupText);
|
|
1252
1253
|
return { appendedButtonClass: P(() => ({
|
|
1253
1254
|
"input-group-append": !0,
|
|
1254
1255
|
"append-force-show": o.value
|
|
1255
1256
|
})), appendedContent: n, shouldShowAppendedButton: r };
|
|
1256
1257
|
}
|
|
1257
|
-
function
|
|
1258
|
-
const { appendedContent: r } = o, p = I(e.enableViewPassword), d = P(() => e.type === "password"),
|
|
1258
|
+
function Dn(e, t, n, o) {
|
|
1259
|
+
const { appendedContent: r } = o, p = I(e.enableViewPassword), d = P(() => e.type === "password"), y = '<span class="f-icon f-icon-eye" style="color: rgb(56, 143, 255);"></span>', k = '<span class="f-icon f-icon-eye"></span>', s = I(!1);
|
|
1259
1260
|
W(() => [e.readonly, e.disabled], ([c, V]) => {
|
|
1260
1261
|
d.value && (n.value = c || V ? "password" : n.value, r.value = c || V ? k : r.value);
|
|
1261
1262
|
});
|
|
1262
|
-
function
|
|
1263
|
-
return s.value = !s.value, n.value = s.value ? "text" : "password", r.value = s.value ?
|
|
1263
|
+
function l() {
|
|
1264
|
+
return s.value = !s.value, n.value = s.value ? "text" : "password", r.value = s.value ? y : k, !1;
|
|
1264
1265
|
}
|
|
1265
1266
|
function u() {
|
|
1266
1267
|
n.value = d.value ? "password" : "text", r.value = d.value ? p.value ? k : "" : r.value;
|
|
1267
1268
|
}
|
|
1268
|
-
return u(), { isPassword: d, onClickAppendedButton:
|
|
1269
|
+
return u(), { isPassword: d, onClickAppendedButton: l };
|
|
1269
1270
|
}
|
|
1270
|
-
function
|
|
1271
|
+
function Wn(e, t, n) {
|
|
1271
1272
|
const o = I(), {
|
|
1272
1273
|
onBlurTextBox: r,
|
|
1273
1274
|
onFocusTextBox: p,
|
|
1274
1275
|
onInput: d,
|
|
1275
|
-
onKeyDown:
|
|
1276
|
+
onKeyDown: y,
|
|
1276
1277
|
textBoxValue: k
|
|
1277
|
-
} = n, s = P(() => e.disabled || e.readonly || !e.editable ? "" : e.placeholder),
|
|
1278
|
+
} = n, s = P(() => e.disabled || e.readonly || !e.editable ? "" : e.placeholder), l = P(() => ({
|
|
1278
1279
|
"form-control": !0,
|
|
1279
1280
|
"f-utils-fill": !0
|
|
1280
1281
|
})), u = P(() => ({
|
|
@@ -1291,9 +1292,9 @@ function Dn(e, t, n) {
|
|
|
1291
1292
|
}
|
|
1292
1293
|
return J(async () => {
|
|
1293
1294
|
await te, V();
|
|
1294
|
-
}), () =>
|
|
1295
|
+
}), () => F("input", {
|
|
1295
1296
|
ref: o,
|
|
1296
|
-
class:
|
|
1297
|
+
class: l.value,
|
|
1297
1298
|
style: u.value,
|
|
1298
1299
|
type: "text",
|
|
1299
1300
|
value: k.value,
|
|
@@ -1304,16 +1305,16 @@ function Dn(e, t, n) {
|
|
|
1304
1305
|
onChange: c,
|
|
1305
1306
|
onFocus: E,
|
|
1306
1307
|
onInput: d,
|
|
1307
|
-
onKeydown:
|
|
1308
|
+
onKeydown: y
|
|
1308
1309
|
}, null);
|
|
1309
1310
|
}
|
|
1310
|
-
function
|
|
1311
|
+
function zn(e, t, n) {
|
|
1311
1312
|
const {
|
|
1312
1313
|
canDownward: o,
|
|
1313
1314
|
canUpward: r,
|
|
1314
1315
|
onClickDownButton: p,
|
|
1315
1316
|
onClickUpButton: d
|
|
1316
|
-
} = n,
|
|
1317
|
+
} = n, y = P(() => ({
|
|
1317
1318
|
"input-group-append": !0,
|
|
1318
1319
|
"btn-group": !0,
|
|
1319
1320
|
"btn-group-number": !0
|
|
@@ -1324,58 +1325,58 @@ function Wn(e, t, n) {
|
|
|
1324
1325
|
})), s = P(() => ({
|
|
1325
1326
|
cursor: r() ? "pointer" : "not-allowed",
|
|
1326
1327
|
"margin-left": 0
|
|
1327
|
-
})),
|
|
1328
|
+
})), l = P(() => ({
|
|
1328
1329
|
cursor: o() ? "pointer" : "not-allowed",
|
|
1329
1330
|
"margin-left": 0
|
|
1330
1331
|
}));
|
|
1331
|
-
return () =>
|
|
1332
|
-
class:
|
|
1333
|
-
}, [
|
|
1332
|
+
return () => F("div", {
|
|
1333
|
+
class: y.value
|
|
1334
|
+
}, [F("button", {
|
|
1334
1335
|
title: "upButton",
|
|
1335
1336
|
class: k.value,
|
|
1336
1337
|
style: s.value,
|
|
1337
1338
|
onClick: d,
|
|
1338
1339
|
disabled: !r()
|
|
1339
|
-
}, [
|
|
1340
|
+
}, [F("span", {
|
|
1340
1341
|
class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron"
|
|
1341
|
-
}, null)]),
|
|
1342
|
+
}, null)]), F("button", {
|
|
1342
1343
|
title: "downButton",
|
|
1343
1344
|
class: k.value,
|
|
1344
|
-
style:
|
|
1345
|
+
style: l.value,
|
|
1345
1346
|
onClick: p,
|
|
1346
1347
|
disabled: !o()
|
|
1347
|
-
}, [
|
|
1348
|
+
}, [F("span", {
|
|
1348
1349
|
class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
|
|
1349
1350
|
}, null)])]);
|
|
1350
1351
|
}
|
|
1351
|
-
function
|
|
1352
|
-
const n = Ie(e, t), o = Se(e, t, n), r = Ve(e, t, o, n), p = Ee(e, t, o, n, r), d =
|
|
1353
|
-
displayValue:
|
|
1352
|
+
function Un(e, t) {
|
|
1353
|
+
const n = Ie(e, t), o = Se(e, t, n), r = Ve(e, t, o, n), p = Ee(e, t, o, n, r), d = zn(e, t, r), {
|
|
1354
|
+
displayValue: y,
|
|
1354
1355
|
modelValue: k,
|
|
1355
1356
|
getRealValue: s
|
|
1356
|
-
} = n,
|
|
1357
|
+
} = n, l = Wn(e, t, p), {
|
|
1357
1358
|
format: u
|
|
1358
1359
|
} = o, {
|
|
1359
1360
|
isFocus: c
|
|
1360
1361
|
} = p, V = P(() => !e.disabled && !e.readonly);
|
|
1361
1362
|
return J(() => {
|
|
1362
1363
|
const E = s(e.modelValue);
|
|
1363
|
-
|
|
1364
|
+
y.value = u(E);
|
|
1364
1365
|
}), W(() => [e.value], ([E]) => {
|
|
1365
1366
|
const O = s(E);
|
|
1366
|
-
k.value = O,
|
|
1367
|
+
k.value = O, y.value = u(O);
|
|
1367
1368
|
}), W(() => [e.modelValue], ([E]) => {
|
|
1368
|
-
E !== k.value && (k.value = E, !c.value && (
|
|
1369
|
+
E !== k.value && (k.value = E, !c.value && (y.value = u(s(E))));
|
|
1369
1370
|
}), W(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
|
|
1370
|
-
|
|
1371
|
-
}), () =>
|
|
1371
|
+
y.value = u(k.value);
|
|
1372
|
+
}), () => F("div", {
|
|
1372
1373
|
class: "input-group f-state-hover flex-row f-cmp-number-spinner"
|
|
1373
|
-
}, [
|
|
1374
|
+
}, [l(), V.value && d()]);
|
|
1374
1375
|
}
|
|
1375
|
-
function
|
|
1376
|
+
function Hn(e, t, n, o) {
|
|
1376
1377
|
const r = I(), p = I(e.autocomplete), d = I(e.enableTitle), {
|
|
1377
|
-
isPassword:
|
|
1378
|
-
} = n, k = I(e.minLength), s = I(e.maxLength),
|
|
1378
|
+
isPassword: y
|
|
1379
|
+
} = n, k = I(e.minLength), s = I(e.maxLength), l = I(e.tabIndex), {
|
|
1379
1380
|
disabled: u,
|
|
1380
1381
|
displayText: c,
|
|
1381
1382
|
inputType: V,
|
|
@@ -1394,7 +1395,7 @@ function Un(e, t, n, o) {
|
|
|
1394
1395
|
} = o;
|
|
1395
1396
|
return J(() => {
|
|
1396
1397
|
e.selectOnCreated, e.focusOnCreated;
|
|
1397
|
-
}), () =>
|
|
1398
|
+
}), () => F("input", {
|
|
1398
1399
|
ref: r,
|
|
1399
1400
|
name: "input-group-value",
|
|
1400
1401
|
autocomplete: p.value,
|
|
@@ -1404,8 +1405,8 @@ function Un(e, t, n, o) {
|
|
|
1404
1405
|
minlength: k.value,
|
|
1405
1406
|
placeholder: A.value,
|
|
1406
1407
|
readonly: R == null ? void 0 : R.value,
|
|
1407
|
-
tabindex:
|
|
1408
|
-
title: d.value && !
|
|
1408
|
+
tabindex: l.value,
|
|
1409
|
+
title: d.value && !y.value ? i.value : "",
|
|
1409
1410
|
type: V.value,
|
|
1410
1411
|
value: c == null ? void 0 : c.value,
|
|
1411
1412
|
onBlur: E,
|
|
@@ -1418,39 +1419,39 @@ function Un(e, t, n, o) {
|
|
|
1418
1419
|
onMousedown: j
|
|
1419
1420
|
}, null);
|
|
1420
1421
|
}
|
|
1421
|
-
function
|
|
1422
|
+
function Qn(e, t) {
|
|
1422
1423
|
const n = P(() => e.useExtendInfo && !!e.extendInfo), o = Ce({
|
|
1423
1424
|
content: e.extendInfo
|
|
1424
1425
|
});
|
|
1425
1426
|
function r() {
|
|
1426
1427
|
t.emit("updateExtendInfo");
|
|
1427
1428
|
}
|
|
1428
|
-
return () => n.value && Fe(
|
|
1429
|
+
return () => n.value && Fe(F("span", {
|
|
1429
1430
|
class: "input-group-before-tips",
|
|
1430
1431
|
onMouseenter: r
|
|
1431
|
-
}, [
|
|
1432
|
+
}, [F("i", {
|
|
1432
1433
|
class: "f-icon f-icon-info-circle"
|
|
1433
|
-
}, null),
|
|
1434
|
+
}, null), F("b", {
|
|
1434
1435
|
class: "tips-arrow"
|
|
1435
1436
|
}, null)]), [[we("tooltip"), o]]);
|
|
1436
1437
|
}
|
|
1437
|
-
function
|
|
1438
|
+
function Zn(e, t, n, o, r) {
|
|
1438
1439
|
const {
|
|
1439
1440
|
appendedButtonClass: p,
|
|
1440
1441
|
appendedContent: d
|
|
1441
|
-
} = n,
|
|
1442
|
-
clearButtonClass:
|
|
1442
|
+
} = n, y = P(() => e.showButtonWhenDisabled && (!e.editable || !e.readonly) && !e.disabled), k = P(() => d.value && !t.slots.groupTextTemplate), s = P(() => !!t.slots.groupTextTemplate), {
|
|
1443
|
+
clearButtonClass: l,
|
|
1443
1444
|
clearButtonStyle: u,
|
|
1444
1445
|
onClearValue: c,
|
|
1445
1446
|
shouldShowClearButton: V
|
|
1446
1447
|
} = o;
|
|
1447
1448
|
function E() {
|
|
1448
|
-
return
|
|
1449
|
+
return F("span", {
|
|
1449
1450
|
id: "clearIcon",
|
|
1450
|
-
class:
|
|
1451
|
+
class: l.value,
|
|
1451
1452
|
style: u.value,
|
|
1452
1453
|
onClick: (A) => c(A)
|
|
1453
|
-
}, [
|
|
1454
|
+
}, [F("i", {
|
|
1454
1455
|
class: "f-icon modal_close"
|
|
1455
1456
|
}, null)]);
|
|
1456
1457
|
}
|
|
@@ -1461,13 +1462,13 @@ function Qn(e, t, n, o, r) {
|
|
|
1461
1462
|
t.emit("iconMouseLeave", A);
|
|
1462
1463
|
}
|
|
1463
1464
|
function T(A) {
|
|
1464
|
-
|
|
1465
|
+
y.value && t.emit("clickHandle", {
|
|
1465
1466
|
originalEvent: A
|
|
1466
1467
|
}), A.stopPropagation();
|
|
1467
1468
|
}
|
|
1468
1469
|
const x = e.type === "password" ? r.onClickAppendedButton : T;
|
|
1469
1470
|
function M() {
|
|
1470
|
-
return
|
|
1471
|
+
return F("span", {
|
|
1471
1472
|
class: "input-group-text",
|
|
1472
1473
|
onMouseenter: (A) => O(A),
|
|
1473
1474
|
onMouseleave: (A) => q(A),
|
|
@@ -1482,25 +1483,25 @@ function Qn(e, t, n, o, r) {
|
|
|
1482
1483
|
return k.value ? M : s.value ? j : "";
|
|
1483
1484
|
}
|
|
1484
1485
|
const R = $();
|
|
1485
|
-
return () =>
|
|
1486
|
+
return () => F("div", {
|
|
1486
1487
|
class: p.value
|
|
1487
1488
|
}, [V.value && E(), R && R()]);
|
|
1488
1489
|
}
|
|
1489
|
-
const
|
|
1490
|
+
const _n = /* @__PURE__ */ Z({
|
|
1490
1491
|
name: "FInputGroup",
|
|
1491
1492
|
props: me,
|
|
1492
1493
|
emits: ["clear", "change", "blur", "click", "clickHandle", "focus", "input", "keydown", "keyup", "iconMouseEnter", "iconMouseLeave", "update:modelValue", "update:value", "updateExtendInfo", "valueChange"],
|
|
1493
1494
|
setup(e, t) {
|
|
1494
|
-
const n = I(e.modelValue), o = I(e.modelValue), r =
|
|
1495
|
+
const n = I(e.modelValue), o = I(e.modelValue), r = An(e, t, n, o), {
|
|
1495
1496
|
inputGroupClass: p,
|
|
1496
1497
|
inputType: d,
|
|
1497
|
-
inputGroupStyle:
|
|
1498
|
-
} = r, k =
|
|
1498
|
+
inputGroupStyle: y
|
|
1499
|
+
} = r, k = qn(e), {
|
|
1499
1500
|
shouldShowAppendedButton: s
|
|
1500
|
-
} = k,
|
|
1501
|
+
} = k, l = Nn(e, t, r), {
|
|
1501
1502
|
onMouseEnter: u,
|
|
1502
1503
|
onMouseLeave: c
|
|
1503
|
-
} =
|
|
1504
|
+
} = l, V = Dn(e, t, d, k), E = Un(e, t), O = Hn(e, t, V, r), q = Zn(e, t, k, l, V), T = Qn(e, t), x = P(() => e.type === "number");
|
|
1504
1505
|
W(() => [e.value], ([j]) => {
|
|
1505
1506
|
n.value = j, o.value = j;
|
|
1506
1507
|
}), W(() => [e.modelValue], ([j]) => {
|
|
@@ -1508,36 +1509,39 @@ const Zn = /* @__PURE__ */ Z({
|
|
|
1508
1509
|
}), J(() => {
|
|
1509
1510
|
e.value && (n.value = e.value, o.value = e.value);
|
|
1510
1511
|
});
|
|
1511
|
-
const M = () =>
|
|
1512
|
+
const M = () => F(ne, null, [F("div", {
|
|
1512
1513
|
id: "inputGroup",
|
|
1513
1514
|
class: p.value,
|
|
1514
|
-
style:
|
|
1515
|
+
style: y.value,
|
|
1515
1516
|
onMouseenter: u,
|
|
1516
1517
|
onMouseleave: c
|
|
1517
|
-
}, [x.value ? E() :
|
|
1518
|
+
}, [x.value ? E() : F(ne, null, [T(), O(), s.value && q()])])]);
|
|
1518
1519
|
return () => M();
|
|
1519
1520
|
}
|
|
1520
|
-
}), g = {}, h = {},
|
|
1521
|
+
}), g = {}, h = {}, v = {}, C = {};
|
|
1521
1522
|
let ie = !1;
|
|
1522
|
-
function _n() {
|
|
1523
|
-
ie || (ie = !0, Pe.register(g, h, b, F), Me.register(g, h, b, F), Oe.register(g, h, b, F), je.register(g, h, b, F), Le.register(g, h, b, F), Ae.register(g, h, b, F), Ne.register(g, h, b, F), K.register(g, h, b, F), $e.register(g, h, b, F), Ge.register(g, h, b, F), Re.register(g, h, b, F), qe.register(g, h, b, F), De.register(g, h, b, F), We.register(g, h, b, F), xe.register(g, h, b, F), ze.register(g, h, b, F), Ue.register(g, h, b, F), He.register(g, h, b, F), Qe.register(g, h, b, F), Ze.register(g, h, b, F), _e.register(g, h, b, F), Xe.register(g, h, b, F), Je.register(g, h, b, F), Ye.register(g, h, b, F), Ke.register(g, h, b, F), et.register(g, h, b, F), tt.register(g, h, b, F), Be.register(g, h, b, F), nt.register(g, h, b, F), ot.register(g, h, b, F), rt.register(g, h, b, F), it.register(g, h, b, F), lt.register(g, h, b, F), at.register(g, h, b, F), st.register(g, h, b, F), ut.register(g, h, b, F), dt.register(g, h, b, F), pt.register(g, h, b, F), ct.register(g, h, b, F), Et.register(g, h, b), ft.register(g, h, b, F), mt.register(g, h, b, F), gt.register(g, h, b, F), ht.register(g, h, b, F), vt.register(g, h, b, F), yt.register(g, h, b, F), bt.register(g, h, b, F), Ct.register(g, h, b, F), Ft.register(g, h, b, F), wt.register(g, h, b, F), Tt.register(g, h, b, F), xt.register(g, h, b, F), Bt.register(g, h, b, F), kt.register(g, h, b, F), It.register(g, h, b, F), St.register(g, h, b, F), Vt.register(g, h, b, F));
|
|
1524
|
-
}
|
|
1525
1523
|
function Jn() {
|
|
1526
|
-
|
|
1524
|
+
ie || (ie = !0, Pe.register(g, h, v, C), Me.register(g, h, v, C), Oe.register(g, h, v, C), je.register(g, h, v, C), Le.register(g, h, v, C), Ae.register(g, h, v, C), Ne.register(g, h, v, C), K.register(g, h, v, C), $e.register(g, h, v, C), Re.register(g, h, v, C), qe.register(g, h, v, C), Ge.register(g, h, v, C), De.register(g, h, v, C), We.register(g, h, v, C), ze.register(g, h, v, C), xe.register(g, h, v, C), Ue.register(g, h, v, C), He.register(g, h, v, C), Qe.register(g, h, v, C), Ze.register(g, h, v, C), _e.register(g, h, v, C), Je.register(g, h, v, C), Ye.register(g, h, v, C), Xe.register(g, h, v, C), Ke.register(g, h, v, C), et.register(g, h, v, C), tt.register(g, h, v, C), nt.register(g, h, v, C), Be.register(g, h, v, C), ot.register(g, h, v, C), rt.register(g, h, v, C), it.register(g, h, v, C), at.register(g, h, v, C), lt.register(g, h, v, C), st.register(g, h, v, C), ut.register(g, h, v, C), ct.register(g, h, v, C), pt.register(g, h, v, C), ft.register(g, h, v, C), dt.register(g, h, v, C), Mt.register(g, h, v), mt.register(g, h, v, C), gt.register(g, h, v, C), ht.register(g, h, v, C), vt.register(g, h, v, C), yt.register(g, h, v, C), bt.register(g, h, v, C), Ct.register(g, h, v, C), Ft.register(g, h, v, C), wt.register(g, h, v, C), Tt.register(g, h, v, C), xt.register(g, h, v, C), kt.register(g, h, v, C), It.register(g, h, v, C), Bt.register(g, h, v, C), St.register(g, h, v, C), Vt.register(g, h, v, C), Et.register(g, h, v, C));
|
|
1525
|
+
}
|
|
1526
|
+
function Xn() {
|
|
1527
|
+
Jn();
|
|
1527
1528
|
function e(r, p) {
|
|
1528
1529
|
const d = h[r];
|
|
1529
1530
|
return d ? d(p) : {};
|
|
1530
1531
|
}
|
|
1531
1532
|
function t(r) {
|
|
1532
|
-
return g[r] ||
|
|
1533
|
+
return g[r] || _n;
|
|
1533
1534
|
}
|
|
1534
1535
|
function n(r) {
|
|
1535
1536
|
switch (r) {
|
|
1536
1537
|
case "check-box":
|
|
1537
1538
|
return "onChangeValue";
|
|
1539
|
+
case "switch":
|
|
1540
|
+
return "onModelValueChanged";
|
|
1538
1541
|
case "check-group":
|
|
1539
1542
|
return "onChangeValue";
|
|
1540
1543
|
case "combo-list":
|
|
1544
|
+
case "combo-tree":
|
|
1541
1545
|
return "onChange";
|
|
1542
1546
|
case "combo-lookup":
|
|
1543
1547
|
return "";
|
|
@@ -1592,23 +1596,23 @@ function Jn() {
|
|
|
1592
1596
|
}
|
|
1593
1597
|
return { resolveEditorProps: e, resolveEditorType: t, getChangeFunctionName: n, getClearFunctionName: o };
|
|
1594
1598
|
}
|
|
1595
|
-
const
|
|
1599
|
+
const Yn = /* @__PURE__ */ Z({
|
|
1596
1600
|
name: "FDynamicFormGroup",
|
|
1597
1601
|
props: fe,
|
|
1598
1602
|
emits: ["change", "update:modelValue"],
|
|
1599
1603
|
setup(e, t) {
|
|
1600
|
-
const n = I(e.id), o = I(e.customClass), r = I(e.editor), p = I(e.label), d = I(e.modelValue),
|
|
1604
|
+
const n = I(e.id), o = I(e.customClass), r = I(e.editor), p = I(e.label), d = I(e.modelValue), y = I(e.readonly), k = I(e.required), s = I(e.showLabel), l = I(e.visible);
|
|
1601
1605
|
I(e.type);
|
|
1602
1606
|
const u = I(), {
|
|
1603
1607
|
resolveEditorProps: c,
|
|
1604
1608
|
resolveEditorType: V,
|
|
1605
1609
|
getChangeFunctionName: E,
|
|
1606
1610
|
getClearFunctionName: O
|
|
1607
|
-
} =
|
|
1611
|
+
} = Xn(), q = P(() => ({
|
|
1608
1612
|
"form-group": !0,
|
|
1609
1613
|
"farris-form-group": !0,
|
|
1610
1614
|
"common-group": !0,
|
|
1611
|
-
"q-state-readonly":
|
|
1615
|
+
"q-state-readonly": y.value
|
|
1612
1616
|
}));
|
|
1613
1617
|
function T(j, $) {
|
|
1614
1618
|
d.value = $ !== void 0 ? $ : j, t.emit("update:modelValue", d.value), t.emit("change", d.value);
|
|
@@ -1618,7 +1622,7 @@ const Xn = /* @__PURE__ */ Z({
|
|
|
1618
1622
|
}
|
|
1619
1623
|
const M = P(() => {
|
|
1620
1624
|
const j = r.value.type || "input-group", $ = V(j), R = c(j, r.value), A = E(j), z = O(r.value.type);
|
|
1621
|
-
return R[A] = T, R[z] = x, () =>
|
|
1625
|
+
return R[A] = T, R[z] = x, () => F($, Te({
|
|
1622
1626
|
ref: u
|
|
1623
1627
|
}, R, {
|
|
1624
1628
|
modelValue: d.value,
|
|
@@ -1626,26 +1630,26 @@ const Xn = /* @__PURE__ */ Z({
|
|
|
1626
1630
|
}), null);
|
|
1627
1631
|
});
|
|
1628
1632
|
return W([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible], ([j, $, R, A, z, i, m, f, B]) => {
|
|
1629
|
-
n.value = j, o.value = $, r.value = R, p.value = A, d.value = z,
|
|
1633
|
+
n.value = j, o.value = $, r.value = R, p.value = A, d.value = z, y.value = i, k.value = m, s.value = f, l.value = B;
|
|
1630
1634
|
}), t.expose({
|
|
1631
1635
|
editorRef: u
|
|
1632
|
-
}), () =>
|
|
1636
|
+
}), () => l.value && F("div", {
|
|
1633
1637
|
id: `${n.value}-input-group`,
|
|
1634
1638
|
class: o.value
|
|
1635
|
-
}, [
|
|
1639
|
+
}, [F("div", {
|
|
1636
1640
|
class: "farris-group-wrap"
|
|
1637
|
-
}, [
|
|
1641
|
+
}, [F("div", {
|
|
1638
1642
|
class: q.value
|
|
1639
|
-
}, [s.value &&
|
|
1643
|
+
}, [s.value && F(kn, {
|
|
1640
1644
|
id: `${n.value}-lable`,
|
|
1641
1645
|
required: k.value,
|
|
1642
1646
|
text: p.value,
|
|
1643
1647
|
title: p.value
|
|
1644
|
-
}, null),
|
|
1648
|
+
}, null), F("div", {
|
|
1645
1649
|
class: "farris-input-wrap"
|
|
1646
1650
|
}, [M.value()])])])]);
|
|
1647
1651
|
}
|
|
1648
|
-
}),
|
|
1652
|
+
}), Kn = {
|
|
1649
1653
|
id: { type: String, default: "" },
|
|
1650
1654
|
/** 筛选组件配置器,具体配置项可查看各组件文档 */
|
|
1651
1655
|
editor: { type: Object, default: {} },
|
|
@@ -1661,13 +1665,13 @@ const Xn = /* @__PURE__ */ Z({
|
|
|
1661
1665
|
selectOnCreated: { type: Boolean, default: !1 }
|
|
1662
1666
|
};
|
|
1663
1667
|
X(
|
|
1664
|
-
|
|
1668
|
+
Kn,
|
|
1665
1669
|
pe,
|
|
1666
1670
|
ee,
|
|
1667
1671
|
void 0
|
|
1668
1672
|
);
|
|
1669
|
-
var
|
|
1670
|
-
const
|
|
1673
|
+
var eo = /* @__PURE__ */ ((e) => (e[e.IntType = 0] = "IntType", e[e.StringType = 1] = "StringType", e[e.BoolType = 2] = "BoolType", e))(eo || {}), ge = /* @__PURE__ */ ((e) => (e[e.Value = 0] = "Value", e[e.SmartHelp = 1] = "SmartHelp", e[e.Enum = 2] = "Enum", e[e.Express = 3] = "Express", e))(ge || {}), he = /* @__PURE__ */ ((e) => (e.Equal = "0", e.NotEqual = "1", e.Greater = "2", e.GreaterOrEqual = "3", e.Less = "4", e.LessOrEqual = "5", e.Like = "6", e.LikeStartWith = "7", e.LikeEndWith = "8", e))(he || {});
|
|
1674
|
+
const to = [
|
|
1671
1675
|
{
|
|
1672
1676
|
value: "0",
|
|
1673
1677
|
name: "等于"
|
|
@@ -1704,7 +1708,7 @@ const eo = [
|
|
|
1704
1708
|
value: "8",
|
|
1705
1709
|
name: "结束是"
|
|
1706
1710
|
}
|
|
1707
|
-
],
|
|
1711
|
+
], no = {
|
|
1708
1712
|
"button-edit": ["0", "1", " 6", "7", "8"],
|
|
1709
1713
|
"check-box": ["0"],
|
|
1710
1714
|
"combo-list": ["0", "1"],
|
|
@@ -1724,18 +1728,18 @@ const eo = [
|
|
|
1724
1728
|
"radio-group": ["0"],
|
|
1725
1729
|
text: ["0", "1", " 6", "7", "8"]
|
|
1726
1730
|
};
|
|
1727
|
-
function
|
|
1731
|
+
function oo(e, t, n) {
|
|
1728
1732
|
const { fieldMap: o } = n;
|
|
1729
1733
|
function r(p) {
|
|
1730
1734
|
const d = o.get(p.fieldCode);
|
|
1731
1735
|
if (!d)
|
|
1732
1736
|
return [];
|
|
1733
|
-
const
|
|
1734
|
-
return
|
|
1737
|
+
const y = d.editor.type, k = new Set(no[y]);
|
|
1738
|
+
return to.filter((l) => k.has(l.value));
|
|
1735
1739
|
}
|
|
1736
1740
|
return { getCompareOperators: r };
|
|
1737
1741
|
}
|
|
1738
|
-
function
|
|
1742
|
+
function ro() {
|
|
1739
1743
|
const e = I({ relation: 0, items: [], children: [], path: [], groupId: 0, level: 0 }), t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
1740
1744
|
let o = 0;
|
|
1741
1745
|
function r() {
|
|
@@ -1745,7 +1749,7 @@ function oo() {
|
|
|
1745
1749
|
fieldName: "",
|
|
1746
1750
|
compareType: he.Equal,
|
|
1747
1751
|
valueType: ge.Value,
|
|
1748
|
-
value: new
|
|
1752
|
+
value: new le(),
|
|
1749
1753
|
relation: 0,
|
|
1750
1754
|
conditionId: Date.now()
|
|
1751
1755
|
};
|
|
@@ -1761,51 +1765,51 @@ function oo() {
|
|
|
1761
1765
|
m.groupId === i.groupId && t.set(f, i);
|
|
1762
1766
|
}), e.value = i;
|
|
1763
1767
|
}
|
|
1764
|
-
function
|
|
1768
|
+
function y(i) {
|
|
1765
1769
|
const m = /* @__PURE__ */ new Map();
|
|
1766
1770
|
let f = 0;
|
|
1767
|
-
return i.forEach((B,
|
|
1768
|
-
var
|
|
1769
|
-
if (f += ((
|
|
1771
|
+
return i.forEach((B, a) => {
|
|
1772
|
+
var b, S;
|
|
1773
|
+
if (f += ((b = B.lBracket) == null ? void 0 : b.length) || 0, m.set(a, f), f -= ((S = B.rBracket) == null ? void 0 : S.length) || 0, f < 0)
|
|
1770
1774
|
throw new Error("The right bracket is out of range.");
|
|
1771
1775
|
}), m;
|
|
1772
1776
|
}
|
|
1773
|
-
function k(i, m, f, B,
|
|
1774
|
-
for (let
|
|
1775
|
-
const S = i + (
|
|
1777
|
+
function k(i, m, f, B, a) {
|
|
1778
|
+
for (let b = 0; b < m; b++) {
|
|
1779
|
+
const S = i + (b + 1), D = p(a, S);
|
|
1776
1780
|
f.children.push(D), n.set(D.groupId, f), f = f.children[f.children.length - 1], B.push(f);
|
|
1777
1781
|
}
|
|
1778
1782
|
return f;
|
|
1779
1783
|
}
|
|
1780
|
-
function s(i, m, f, B,
|
|
1784
|
+
function s(i, m, f, B, a) {
|
|
1781
1785
|
for (let G = m; G <= 0; G++)
|
|
1782
1786
|
B.pop();
|
|
1783
|
-
const
|
|
1784
|
-
if (!
|
|
1787
|
+
const b = B[B.length - 1];
|
|
1788
|
+
if (!b)
|
|
1785
1789
|
throw new Error("The group path is out of range");
|
|
1786
|
-
const S = i + m, D = p(
|
|
1787
|
-
return
|
|
1790
|
+
const S = i + m, D = p(a, S);
|
|
1791
|
+
return b.children.push(D), n.set(D.groupId, b), f = b.children[b.children.length - 1], B.push(f), f;
|
|
1788
1792
|
}
|
|
1789
|
-
function
|
|
1793
|
+
function l(i, m, f, B) {
|
|
1790
1794
|
f.pop();
|
|
1791
|
-
const
|
|
1792
|
-
return
|
|
1795
|
+
const a = f[f.length - 1], b = p(B, i);
|
|
1796
|
+
return a.children.push(b), n.set(b.groupId, a), m = a.children[a.children.length - 1], f.push(m), m;
|
|
1793
1797
|
}
|
|
1794
|
-
function u(i, m, f, B,
|
|
1798
|
+
function u(i, m, f, B, a, b) {
|
|
1795
1799
|
let S = i[i.length - 1];
|
|
1796
1800
|
if (!S)
|
|
1797
1801
|
throw new Error("The group path is out of range");
|
|
1798
1802
|
const D = m.get(B) || 0, G = m.get(f) || 0;
|
|
1799
1803
|
if (f < 0 || f === B)
|
|
1800
1804
|
return i[i.length - 1];
|
|
1801
|
-
const N = D - G, L =
|
|
1802
|
-
return S = N > 0 ? k(G, N, S, i, L) : S, S = N < 0 ? s(G, N, S, i, L) : S, S = N === 0 && G > 0 && D > 0 &&
|
|
1805
|
+
const N = D - G, L = a && a.relation !== void 0 ? a.relation : 1;
|
|
1806
|
+
return S = N > 0 ? k(G, N, S, i, L) : S, S = N < 0 ? s(G, N, S, i, L) : S, S = N === 0 && G > 0 && D > 0 && a && b && !!a.rBracket && !!b.lBracket ? l(G, S, i, L) : S, S;
|
|
1803
1807
|
}
|
|
1804
1808
|
function c(i) {
|
|
1805
|
-
const f = { relation: i.length && i[0].relation !== void 0 ? i[0].relation : 1, items: [], children: [], path: [], groupId: 0, level: 0 }, B = [f],
|
|
1806
|
-
return i.forEach((
|
|
1807
|
-
const D = S - 1, G = i[D], N = u(B,
|
|
1808
|
-
N.items.push(
|
|
1809
|
+
const f = { relation: i.length && i[0].relation !== void 0 ? i[0].relation : 1, items: [], children: [], path: [], groupId: 0, level: 0 }, B = [f], a = y(i);
|
|
1810
|
+
return i.forEach((b, S) => {
|
|
1811
|
+
const D = S - 1, G = i[D], N = u(B, a, D, S, G, b);
|
|
1812
|
+
N.items.push(b), t.set(b.conditionId, N);
|
|
1809
1813
|
}), e.value = f, f;
|
|
1810
1814
|
}
|
|
1811
1815
|
function V() {
|
|
@@ -1817,7 +1821,7 @@ function oo() {
|
|
|
1817
1821
|
return;
|
|
1818
1822
|
const m = t.get(i.conditionId);
|
|
1819
1823
|
if (m) {
|
|
1820
|
-
const f = m.items.findIndex((
|
|
1824
|
+
const f = m.items.findIndex((a) => a.conditionId === i.conditionId) + 1, B = r();
|
|
1821
1825
|
t.set(B.conditionId, m), m.items.splice(f, 0, B), d();
|
|
1822
1826
|
}
|
|
1823
1827
|
}
|
|
@@ -1826,21 +1830,21 @@ function oo() {
|
|
|
1826
1830
|
m && (m.items = m.items.filter((f) => f.conditionId !== i.conditionId), t.delete(i.conditionId), z(), d());
|
|
1827
1831
|
}
|
|
1828
1832
|
function q(i, m, f, B) {
|
|
1829
|
-
i.reduce((
|
|
1830
|
-
const S =
|
|
1833
|
+
i.reduce((a, b) => {
|
|
1834
|
+
const S = b.conditionId !== void 0, D = b.groupId !== void 0;
|
|
1831
1835
|
if (S) {
|
|
1832
|
-
const G =
|
|
1833
|
-
f.push(G),
|
|
1836
|
+
const G = b;
|
|
1837
|
+
f.push(G), a.items.set(G.conditionId, G);
|
|
1834
1838
|
}
|
|
1835
1839
|
if (D) {
|
|
1836
|
-
const G =
|
|
1837
|
-
B.push(G),
|
|
1840
|
+
const G = b;
|
|
1841
|
+
B.push(G), a.groups.set(G.groupId, G);
|
|
1838
1842
|
}
|
|
1839
|
-
return
|
|
1843
|
+
return a;
|
|
1840
1844
|
}, m);
|
|
1841
1845
|
}
|
|
1842
|
-
function T(i, m, f, B,
|
|
1843
|
-
i && (i.items = m.length ? i.items.filter((
|
|
1846
|
+
function T(i, m, f, B, a) {
|
|
1847
|
+
i && (i.items = m.length ? i.items.filter((b) => !f.has(b.conditionId)) : i.items, i.children = B.length ? i.children.filter((b) => !a.has(b.groupId)) : i.children);
|
|
1844
1848
|
}
|
|
1845
1849
|
function x(i, m, f) {
|
|
1846
1850
|
m.forEach((B) => {
|
|
@@ -1850,19 +1854,19 @@ function oo() {
|
|
|
1850
1854
|
});
|
|
1851
1855
|
}
|
|
1852
1856
|
function M(i) {
|
|
1853
|
-
const m = i[0], f = m.conditionId !== void 0 ? t.get(m.conditionId) : n.get(m.groupId), B = { items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Map() },
|
|
1857
|
+
const m = i[0], f = m.conditionId !== void 0 ? t.get(m.conditionId) : n.get(m.groupId), B = { items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Map() }, a = [], b = [];
|
|
1854
1858
|
if (f) {
|
|
1855
|
-
q(i, B,
|
|
1859
|
+
q(i, B, a, b), T(f, a, B.items, b, B.groups);
|
|
1856
1860
|
const S = p(f.relation, f.level + 1);
|
|
1857
|
-
x(S,
|
|
1861
|
+
x(S, a, b), f.children.push(S), n.set(S.groupId, f), d();
|
|
1858
1862
|
}
|
|
1859
1863
|
}
|
|
1860
1864
|
function j(i) {
|
|
1861
1865
|
const m = [...i.items], f = [...i.children], B = n.get(i.groupId);
|
|
1862
|
-
B && (B.children = B.children.filter((
|
|
1863
|
-
B.items.push(
|
|
1864
|
-
}), f.forEach((
|
|
1865
|
-
B.children.push(
|
|
1866
|
+
B && (B.children = B.children.filter((a) => a.groupId !== i.groupId), n.delete(i.groupId), m.forEach((a) => {
|
|
1867
|
+
B.items.push(a), t.set(a.conditionId, B);
|
|
1868
|
+
}), f.forEach((a) => {
|
|
1869
|
+
B.children.push(a), n.set(a.groupId, B);
|
|
1866
1870
|
}), d());
|
|
1867
1871
|
}
|
|
1868
1872
|
function $(i) {
|
|
@@ -1871,13 +1875,13 @@ function oo() {
|
|
|
1871
1875
|
let R;
|
|
1872
1876
|
function A(i) {
|
|
1873
1877
|
const { relation: m } = i;
|
|
1874
|
-
return (i.children && i.children.length ? i.children.map((B,
|
|
1878
|
+
return (i.children && i.children.length ? i.children.map((B, a, b) => {
|
|
1875
1879
|
const S = R(B);
|
|
1876
|
-
return S[0].lBracket = (S[0].lBracket || "") + "(", S[S.length - 1].rBracket = (S[S.length - 1].rBracket || "") + ")", S[S.length - 1].relation =
|
|
1880
|
+
return S[0].lBracket = (S[0].lBracket || "") + "(", S[S.length - 1].rBracket = (S[S.length - 1].rBracket || "") + ")", S[S.length - 1].relation = a < b.length - 1 ? m : 0, S;
|
|
1877
1881
|
}) : []).flat();
|
|
1878
1882
|
}
|
|
1879
1883
|
R = (i = e.value) => {
|
|
1880
|
-
const { relation: m } = i, f = i.items.map((
|
|
1884
|
+
const { relation: m } = i, f = i.items.map((a, b, S) => (a.lBracket = b === 0 ? "(" : "", a.rBracket = b === S.length - 1 ? ")" : "", a.relation = b < S.length - 1 ? m || 1 : 0, a)), B = A(i);
|
|
1881
1885
|
return [...f, ...B];
|
|
1882
1886
|
};
|
|
1883
1887
|
function z(i) {
|
|
@@ -1904,24 +1908,24 @@ function oo() {
|
|
|
1904
1908
|
unGroup: j
|
|
1905
1909
|
};
|
|
1906
1910
|
}
|
|
1907
|
-
function
|
|
1911
|
+
function io(e, t, n) {
|
|
1908
1912
|
const o = I(/* @__PURE__ */ new Set()), r = I(/* @__PURE__ */ new Set()), { conditionGroupMap: p, groupParentMap: d } = n;
|
|
1909
|
-
let
|
|
1913
|
+
let y, k;
|
|
1910
1914
|
function s(T) {
|
|
1911
|
-
let x =
|
|
1915
|
+
let x = y.level <= T.level ? y : T, M = y.level > T.level ? y : T;
|
|
1912
1916
|
const j = [];
|
|
1913
1917
|
for (; M && x && M !== x; )
|
|
1914
1918
|
M.level > x.level ? (j.push(M), M = d.get(M.groupId)) : M.level === x.level && (x = d.get(x.groupId), x && j.unshift(x));
|
|
1915
1919
|
return j;
|
|
1916
1920
|
}
|
|
1917
|
-
function
|
|
1918
|
-
r.value.add(T.groupId), T.items.forEach((x) => o.value.add(x.conditionId)), T.children.forEach((x) =>
|
|
1921
|
+
function l(T) {
|
|
1922
|
+
r.value.add(T.groupId), T.items.forEach((x) => o.value.add(x.conditionId)), T.children.forEach((x) => l(x));
|
|
1919
1923
|
}
|
|
1920
1924
|
function u(T) {
|
|
1921
1925
|
const { conditionId: x } = T;
|
|
1922
|
-
o.value.add(x),
|
|
1926
|
+
o.value.add(x), y = o.value.size === 0 ? p.get(x) : y;
|
|
1923
1927
|
const M = p.get(T.conditionId);
|
|
1924
|
-
s(M).forEach(($) =>
|
|
1928
|
+
s(M).forEach(($) => l($));
|
|
1925
1929
|
}
|
|
1926
1930
|
const c = P(() => o.value.size === 0 && r.value.size === 1), V = function(T) {
|
|
1927
1931
|
r.value.delete(T.groupId), T.items.forEach((M) => k(M)), T.children.forEach((M) => !c.value && V(M));
|
|
@@ -1937,11 +1941,11 @@ function ro(e, t, n) {
|
|
|
1937
1941
|
};
|
|
1938
1942
|
function E(T) {
|
|
1939
1943
|
const { conditionId: x } = T;
|
|
1940
|
-
o.value.size === 0 && (
|
|
1944
|
+
o.value.size === 0 && (y = p.get(x)), o.value.has(x) ? k(T) : u(T);
|
|
1941
1945
|
}
|
|
1942
1946
|
function O() {
|
|
1943
1947
|
const T = [];
|
|
1944
|
-
return
|
|
1948
|
+
return y && (y.items.filter((x) => o.value.has(x.conditionId)).forEach((x) => T.push(x)), y.children.filter((x) => r.value.has(x.groupId)).forEach((x) => T.push(x))), T;
|
|
1945
1949
|
}
|
|
1946
1950
|
function q() {
|
|
1947
1951
|
o.value.clear(), r.value.clear();
|
|
@@ -1950,16 +1954,16 @@ function ro(e, t, n) {
|
|
|
1950
1954
|
}
|
|
1951
1955
|
const Y = /* @__PURE__ */ Z({
|
|
1952
1956
|
name: "FConditionList",
|
|
1953
|
-
props:
|
|
1957
|
+
props: ae,
|
|
1954
1958
|
emits: ["valueChange", "labelCodeChange", "compareTypeChange"],
|
|
1955
1959
|
setup(e, t) {
|
|
1956
1960
|
const n = I(e.key), o = I(e.conditions), r = ue(e), {
|
|
1957
1961
|
convertToSingleControl: p,
|
|
1958
1962
|
fields: d,
|
|
1959
|
-
fieldMap:
|
|
1963
|
+
fieldMap: y,
|
|
1960
1964
|
loadFieldConfigs: k
|
|
1961
|
-
} = r, s =
|
|
1962
|
-
addCondition:
|
|
1965
|
+
} = r, s = ro(), {
|
|
1966
|
+
addCondition: l,
|
|
1963
1967
|
changeGroupRelation: u,
|
|
1964
1968
|
getConditions: c,
|
|
1965
1969
|
group: V,
|
|
@@ -1971,16 +1975,16 @@ const Y = /* @__PURE__ */ Z({
|
|
|
1971
1975
|
unGroup: M
|
|
1972
1976
|
} = s, {
|
|
1973
1977
|
createConditionValue: j
|
|
1974
|
-
} = se(), $ =
|
|
1978
|
+
} = se(), $ = io(e, t, s), {
|
|
1975
1979
|
selectedItems: R,
|
|
1976
1980
|
toggleSelect: A
|
|
1977
1981
|
} = $, {
|
|
1978
1982
|
getCompareOperators: z
|
|
1979
|
-
} =
|
|
1983
|
+
} = oo(e, t, r);
|
|
1980
1984
|
k(!1), d.value = p(d.value), O(o.value);
|
|
1981
1985
|
function i(N) {
|
|
1982
1986
|
var H;
|
|
1983
|
-
const L = ((H =
|
|
1987
|
+
const L = ((H = y.get(N.fieldCode)) == null ? void 0 : H.editor) || {
|
|
1984
1988
|
type: "text"
|
|
1985
1989
|
};
|
|
1986
1990
|
N.value = j(L.type, void 0), t.emit("labelCodeChange", N);
|
|
@@ -1996,15 +2000,15 @@ const Y = /* @__PURE__ */ Z({
|
|
|
1996
2000
|
function B(N, L) {
|
|
1997
2001
|
t.emit("valueChange", N, L);
|
|
1998
2002
|
}
|
|
1999
|
-
function
|
|
2003
|
+
function a(N) {
|
|
2000
2004
|
return N.items.map((L) => {
|
|
2001
2005
|
var H;
|
|
2002
|
-
return
|
|
2006
|
+
return F("div", {
|
|
2003
2007
|
class: "condition-list-item",
|
|
2004
2008
|
key: L.conditionId
|
|
2005
|
-
}, [
|
|
2009
|
+
}, [F("div", {
|
|
2006
2010
|
class: "condition-list-item-type mr-3"
|
|
2007
|
-
}, [
|
|
2011
|
+
}, [F(K, {
|
|
2008
2012
|
"value-field": "labelCode",
|
|
2009
2013
|
"text-field": "name",
|
|
2010
2014
|
"id-field": "id",
|
|
@@ -2012,9 +2016,9 @@ const Y = /* @__PURE__ */ Z({
|
|
|
2012
2016
|
modelValue: L.fieldCode,
|
|
2013
2017
|
"onUpdate:modelValue": (U) => L.fieldCode = U,
|
|
2014
2018
|
onChange: (U) => i(L)
|
|
2015
|
-
}, null)]),
|
|
2019
|
+
}, null)]), F("div", {
|
|
2016
2020
|
class: "condition-list-item-compare mr-3"
|
|
2017
|
-
}, [
|
|
2021
|
+
}, [F(K, {
|
|
2018
2022
|
"value-field": "value",
|
|
2019
2023
|
"text-field": "name",
|
|
2020
2024
|
"id-field": "id",
|
|
@@ -2022,84 +2026,84 @@ const Y = /* @__PURE__ */ Z({
|
|
|
2022
2026
|
modelValue: L.compareType,
|
|
2023
2027
|
"onUpdate:modelValue": (U) => L.compareType = U,
|
|
2024
2028
|
onChange: (U) => m(U, L)
|
|
2025
|
-
}, null)]),
|
|
2029
|
+
}, null)]), F("div", {
|
|
2026
2030
|
class: "condition-list-item-control mr-3"
|
|
2027
|
-
}, [
|
|
2028
|
-
editor: (H =
|
|
2031
|
+
}, [F(Yn, {
|
|
2032
|
+
editor: (H = y.get(L.fieldCode)) == null ? void 0 : H.editor,
|
|
2029
2033
|
showLabel: !1,
|
|
2030
2034
|
modelValue: L.value.value,
|
|
2031
2035
|
"onUpdate:modelValue": (U) => L.value.value = U,
|
|
2032
2036
|
onChange: (U) => {
|
|
2033
2037
|
B(U, L);
|
|
2034
2038
|
}
|
|
2035
|
-
}, null)]),
|
|
2039
|
+
}, null)]), F("div", {
|
|
2036
2040
|
class: "condition-list-item-extend"
|
|
2037
|
-
}, [
|
|
2041
|
+
}, [F("span", {
|
|
2038
2042
|
class: "f-icon f-icon-plus-sm mr-2",
|
|
2039
2043
|
onClick: () => E(L)
|
|
2040
|
-
}, null),
|
|
2044
|
+
}, null), F("span", {
|
|
2041
2045
|
class: "f-icon f-icon-minus-sm",
|
|
2042
2046
|
onClick: () => T(L)
|
|
2043
|
-
}, null)]),
|
|
2047
|
+
}, null)]), F("div", {
|
|
2044
2048
|
class: "custom-control custom-checkbox"
|
|
2045
|
-
}, [
|
|
2049
|
+
}, [F("input", {
|
|
2046
2050
|
title: "selection",
|
|
2047
2051
|
class: "custom-control-input",
|
|
2048
2052
|
type: "checkbox",
|
|
2049
2053
|
checked: R.value.has(L.conditionId)
|
|
2050
|
-
}, null),
|
|
2054
|
+
}, null), F("label", {
|
|
2051
2055
|
class: "custom-control-label",
|
|
2052
2056
|
onClick: () => A(L)
|
|
2053
2057
|
}, null)])]);
|
|
2054
2058
|
});
|
|
2055
2059
|
}
|
|
2056
|
-
function
|
|
2057
|
-
return
|
|
2060
|
+
function b(N) {
|
|
2061
|
+
return F("div", {
|
|
2058
2062
|
class: "condition-list-relation"
|
|
2059
|
-
}, [
|
|
2063
|
+
}, [F("span", {
|
|
2060
2064
|
class: "condition-list-relation-close f-icon-filter-cancel btn-link",
|
|
2061
2065
|
onClick: () => M(N)
|
|
2062
|
-
}, null),
|
|
2066
|
+
}, null), F("span", {
|
|
2063
2067
|
class: "condition-list-relation-text btn-link",
|
|
2064
2068
|
onClick: () => u(N)
|
|
2065
2069
|
}, [N.relation === 1 ? "与" : "或"])]);
|
|
2066
2070
|
}
|
|
2067
2071
|
function S(N) {
|
|
2068
|
-
return
|
|
2072
|
+
return F("div", {
|
|
2069
2073
|
class: "condition-list-content"
|
|
2070
|
-
}, [
|
|
2074
|
+
}, [F("div", {
|
|
2071
2075
|
class: "condition-list-content-group"
|
|
2072
|
-
}, [
|
|
2076
|
+
}, [a(N), N.children && N.children.map((L) => S(L))]), b(N)]);
|
|
2073
2077
|
}
|
|
2074
2078
|
function D() {
|
|
2075
2079
|
V($.getSelectedGroupItem()), $.clear();
|
|
2076
2080
|
}
|
|
2077
2081
|
function G() {
|
|
2078
|
-
return
|
|
2082
|
+
return F("div", {
|
|
2079
2083
|
class: "condition-list-bottom"
|
|
2080
|
-
}, [
|
|
2084
|
+
}, [F("div", {
|
|
2081
2085
|
class: "add-condition-btn mb-1 mr-3",
|
|
2082
|
-
onClick:
|
|
2083
|
-
}, [
|
|
2086
|
+
onClick: l
|
|
2087
|
+
}, [F("span", {
|
|
2084
2088
|
class: "f-icon f-icon-filter-add"
|
|
2085
|
-
}, null),
|
|
2089
|
+
}, null), F("span", {
|
|
2086
2090
|
class: "ml-1"
|
|
2087
|
-
}, [_("添加条件")])]),
|
|
2091
|
+
}, [_("添加条件")])]), F("div", {
|
|
2088
2092
|
class: "add-condition-btn mb-1",
|
|
2089
2093
|
onClick: D
|
|
2090
|
-
}, [
|
|
2094
|
+
}, [F("span", {
|
|
2091
2095
|
class: "f-icon f-icon-filter-grouping"
|
|
2092
|
-
}, null),
|
|
2096
|
+
}, null), F("span", {
|
|
2093
2097
|
class: "ml-1"
|
|
2094
|
-
}, [_("生成条件组")])]),
|
|
2098
|
+
}, [_("生成条件组")])]), F("div", {
|
|
2095
2099
|
class: "condition-list-reset add-condition-btn",
|
|
2096
2100
|
onClick: f
|
|
2097
2101
|
}, [_("重置")])]);
|
|
2098
2102
|
}
|
|
2099
|
-
return () =>
|
|
2103
|
+
return () => F("div", {
|
|
2100
2104
|
class: "condition-list",
|
|
2101
2105
|
key: n.value
|
|
2102
|
-
}, [
|
|
2106
|
+
}, [F("div", {
|
|
2103
2107
|
class: "condition-list-body"
|
|
2104
2108
|
}, [S(x.value)]), G()]);
|
|
2105
2109
|
}
|
|
@@ -2108,11 +2112,11 @@ Y.install = (e) => {
|
|
|
2108
2112
|
e.component(re.name, re).component(Y.name, Y);
|
|
2109
2113
|
};
|
|
2110
2114
|
export {
|
|
2111
|
-
|
|
2115
|
+
eo as EnumType,
|
|
2112
2116
|
re as FConditionFields,
|
|
2113
2117
|
Y as FConditionList,
|
|
2114
2118
|
ge as ValueType,
|
|
2115
|
-
|
|
2119
|
+
ae as conditionProps,
|
|
2116
2120
|
Y as default,
|
|
2117
|
-
|
|
2121
|
+
ro as useCondition
|
|
2118
2122
|
};
|