@farris/ui-vue 1.2.9 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +64 -64
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +521 -336
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +99 -97
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +496 -504
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +251 -259
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +696 -519
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +368 -376
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1141 -340
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +116 -116
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +986 -798
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +463 -998
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2233 -1057
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +335 -1002
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6193 -4702
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4562 -3294
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3420 -2623
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +914 -883
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +14 -13
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +204 -212
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2795 -1835
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +180 -130
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +328 -336
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +65 -65
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3349 -3626
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5344 -8588
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +2179 -2227
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +684 -675
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +482 -490
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +746 -569
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +409 -385
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +348 -1019
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3606 -2388
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +10871 -8970
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6019 -5631
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +511 -471
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +912 -1281
- package/components/nav/index.umd.cjs +3 -3
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +660 -484
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +682 -506
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1848 -1658
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +100 -100
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1120 -1923
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +875 -1214
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +229 -237
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +2314 -1521
- package/components/property-editor/index.umd.cjs +3 -3
- package/components/property-panel/index.esm.js +867 -868
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +4332 -3623
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/radio-button/index.esm.js +72 -72
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +613 -437
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +255 -263
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +144 -152
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1101 -1038
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +935 -1750
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5264 -5677
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +151 -154
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +438 -1125
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +93 -101
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +563 -1202
- package/components/splitter/index.umd.cjs +1 -1
- package/components/splitter/style.js +2 -0
- package/components/step/index.esm.js +248 -256
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +549 -373
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +2436 -3110
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +328 -336
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +339 -347
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +554 -378
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1322 -1144
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +537 -543
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5113 -9426
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +3900 -2677
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +568 -570
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +266 -274
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +553 -1052
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +558 -566
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +22009 -22688
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.component.d.ts +0 -3
- package/types/combo-list/src/components/list-container.props.d.ts +0 -4
- package/types/common/directive/area-response.d.ts +10 -0
- package/types/common/index.d.ts +9 -0
- package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/common/utils/resolve-field.d.ts +2 -0
- package/types/common/utils/use-class.d.ts +7 -0
- package/types/component/src/component.props.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/component/src/property-config/component.property-config.d.ts +9 -0
- package/types/components.d.ts +1 -0
- package/types/condition/src/types.d.ts +2 -1
- package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/data-grid/index.d.ts +11 -5
- package/types/data-grid/src/data-grid.component.d.ts +4 -2
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +19 -4
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
- package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
- package/types/designer-canvas/src/composition/types.d.ts +2 -3
- package/types/designer-canvas/src/types.d.ts +2 -1
- package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
- package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +1 -1
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
- package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/types.d.ts +9 -0
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/index.d.ts +2 -0
- package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
- package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
- package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
- package/types/lookup/src/components/modal-container.component.d.ts +25 -0
- package/types/lookup/src/components/modal-container.props.d.ts +29 -0
- package/types/lookup/src/composition/types.d.ts +8 -0
- package/types/lookup/src/composition/use-check-props.d.ts +9 -2
- package/types/lookup/src/composition/use-dialog.d.ts +5 -1
- package/types/lookup/src/composition/use-favorite.d.ts +12 -0
- package/types/lookup/src/composition/use-http.d.ts +9 -5
- package/types/lookup/src/composition/use-input-change.d.ts +3 -0
- package/types/lookup/src/composition/use-user-data.d.ts +24 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
- package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
- package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
- package/types/modal/src/composition/use-draggable.d.ts +2 -1
- package/types/modal/src/composition/use-shortcut.d.ts +6 -0
- package/types/modal/src/modal.component.d.ts +3 -0
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/page-header/src/page-header.props.d.ts +1 -0
- package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
- package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
- package/types/{data-grid/src/designer/use-group-column.d.ts → query-solution/src/designer/query-solution-config/composition/use-property.d.ts} +4 -5
- package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
- package/types/query-solution/src/solutions.d.ts +108 -509
- package/types/response-layout-editor/index.d.ts +3 -1
- package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
- package/types/response-layout-editor/src/type.d.ts +21 -0
- package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
- package/types/section/src/designer/use-designer-rules.d.ts +3 -3
- package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
- package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
- package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/tabs.props.d.ts +1 -0
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
- package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
- package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
- package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
- package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as r, onMounted as
|
|
2
|
-
import { cloneDeep as
|
|
1
|
+
import { defineComponent as Z, ref as r, onMounted as G, computed as F, watch as ae, createVNode as j, withModifiers as R, createTextVNode as P, inject as te } from "vue";
|
|
2
|
+
import { isPlainObject as U, cloneDeep as le } from "lodash-es";
|
|
3
3
|
const K = {}, x = {};
|
|
4
|
-
function
|
|
5
|
-
const { properties: e, title:
|
|
6
|
-
return (!s || !n.find((m) => m == "id")) && (
|
|
4
|
+
function J(a) {
|
|
5
|
+
const { properties: e, title: t, ignore: n } = a, s = n && Array.isArray(n), g = Object.keys(e).reduce((m, b) => ((!s || !n.find((w) => w == b)) && (m[b] = e[b].type === "object" && e[b].properties ? J(e[b]) : le(e[b].default)), m), {});
|
|
6
|
+
return t && (!s || !n.find((m) => m == "id")) && (g.id = `${t}-${Date.now()}`), g;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
const n = K[
|
|
8
|
+
function I(a, e = {}, t) {
|
|
9
|
+
const n = K[a];
|
|
10
10
|
if (n) {
|
|
11
|
-
let s =
|
|
12
|
-
const
|
|
13
|
-
return s =
|
|
11
|
+
let s = J(n);
|
|
12
|
+
const g = x[a];
|
|
13
|
+
return s = g ? g({ getSchemaByType: I }, s, e, t) : s, s;
|
|
14
14
|
}
|
|
15
15
|
return null;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
const
|
|
19
|
-
return Object.keys(
|
|
17
|
+
function re(a, e) {
|
|
18
|
+
const t = J(e);
|
|
19
|
+
return Object.keys(a).reduce((n, s) => (n[s] && U(n[s]) && U(a[s]) ? Object.assign(n[s], a[s]) : n[s] = a[s], n), t), t;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
return Object.keys(
|
|
21
|
+
function ne(a, e) {
|
|
22
|
+
return Object.keys(a).filter((n) => a[n] != null).reduce((n, s) => {
|
|
23
23
|
if (e.has(s)) {
|
|
24
|
-
const
|
|
25
|
-
if (typeof
|
|
26
|
-
n[
|
|
24
|
+
const g = e.get(s);
|
|
25
|
+
if (typeof g == "string")
|
|
26
|
+
n[g] = a[s];
|
|
27
27
|
else {
|
|
28
|
-
const m =
|
|
28
|
+
const m = g(s, a[s], a);
|
|
29
29
|
Object.assign(n, m);
|
|
30
30
|
}
|
|
31
31
|
} else
|
|
32
|
-
n[s] =
|
|
32
|
+
n[s] = a[s];
|
|
33
33
|
return n;
|
|
34
34
|
}, {});
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
const n =
|
|
38
|
-
return
|
|
36
|
+
function se(a, e, t = /* @__PURE__ */ new Map()) {
|
|
37
|
+
const n = re(a, e);
|
|
38
|
+
return ne(n, t);
|
|
39
39
|
}
|
|
40
|
-
function oe(
|
|
41
|
-
function e(l, u,
|
|
42
|
-
if (typeof
|
|
43
|
-
return
|
|
44
|
-
if (typeof
|
|
45
|
-
const
|
|
46
|
-
if (
|
|
47
|
-
return Number(
|
|
48
|
-
if (
|
|
49
|
-
return Number(
|
|
50
|
-
if (
|
|
51
|
-
return Number(
|
|
40
|
+
function oe(a = {}) {
|
|
41
|
+
function e(l, u, d, c) {
|
|
42
|
+
if (typeof d == "number")
|
|
43
|
+
return c[l].length === d;
|
|
44
|
+
if (typeof d == "object") {
|
|
45
|
+
const h = Object.keys(d)[0], S = d[h];
|
|
46
|
+
if (h === "not")
|
|
47
|
+
return Number(c[l].length) !== Number(S);
|
|
48
|
+
if (h === "moreThan")
|
|
49
|
+
return Number(c[l].length) >= Number(S);
|
|
50
|
+
if (h === "lessThan")
|
|
51
|
+
return Number(c[l].length) <= Number(S);
|
|
52
52
|
}
|
|
53
53
|
return !1;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
return
|
|
55
|
+
function t(l, u, d, c) {
|
|
56
|
+
return c[l] && c[l].propertyValue && String(c[l].propertyValue.value) === String(d);
|
|
57
57
|
}
|
|
58
58
|
const n = /* @__PURE__ */ new Map([
|
|
59
59
|
["length", e],
|
|
60
|
-
["getProperty",
|
|
60
|
+
["getProperty", t]
|
|
61
61
|
]);
|
|
62
|
-
Object.keys(
|
|
62
|
+
Object.keys(a).reduce((l, u) => (l.set(u, a[u]), l), n);
|
|
63
63
|
function s(l, u) {
|
|
64
|
-
const
|
|
65
|
-
return typeof u == "number" ? [{ target:
|
|
66
|
-
if (
|
|
67
|
-
return { target:
|
|
68
|
-
const
|
|
69
|
-
return { target:
|
|
64
|
+
const d = l;
|
|
65
|
+
return typeof u == "number" ? [{ target: d, operator: "length", param: null, value: Number(u) }] : typeof u == "boolean" ? [{ target: d, operator: "getProperty", param: l, value: !!u }] : typeof u == "object" ? Object.keys(u).map((c) => {
|
|
66
|
+
if (c === "length")
|
|
67
|
+
return { target: d, operator: "length", param: null, value: u[c] };
|
|
68
|
+
const h = c, S = u[c];
|
|
69
|
+
return { target: d, operator: "getProperty", param: h, value: S };
|
|
70
70
|
}) : [];
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
return Object.keys(l).reduce((
|
|
74
|
-
const
|
|
75
|
-
return
|
|
72
|
+
function g(l) {
|
|
73
|
+
return Object.keys(l).reduce((d, c) => {
|
|
74
|
+
const h = s(c, l[c]);
|
|
75
|
+
return d.push(...h), d;
|
|
76
76
|
}, []);
|
|
77
77
|
}
|
|
78
78
|
function m(l, u) {
|
|
79
79
|
if (n.has(l.operator)) {
|
|
80
|
-
const
|
|
81
|
-
return
|
|
80
|
+
const d = n.get(l.operator);
|
|
81
|
+
return d && d(l.target, l.param, l.value, u) || !1;
|
|
82
82
|
}
|
|
83
83
|
return !1;
|
|
84
84
|
}
|
|
85
85
|
function b(l, u) {
|
|
86
|
-
return
|
|
86
|
+
return g(l).reduce((h, S) => h && m(S, u), !0);
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
const
|
|
90
|
-
return
|
|
88
|
+
function w(l, u) {
|
|
89
|
+
const d = Object.keys(l), c = d.includes("allOf"), h = d.includes("anyOf"), S = c || h, M = (S ? l[S ? c ? "allOf" : "anyOf" : "allOf"] : [l]).map((p) => b(p, u));
|
|
90
|
+
return c ? !M.includes(!1) : M.includes(!0);
|
|
91
91
|
}
|
|
92
|
-
return { parseValueSchema:
|
|
92
|
+
return { parseValueSchema: w };
|
|
93
93
|
}
|
|
94
|
-
const
|
|
94
|
+
const ue = {}, ie = {};
|
|
95
95
|
oe();
|
|
96
|
-
function
|
|
97
|
-
return K[e.title] = e, x[e.title] = n,
|
|
98
|
-
const b =
|
|
99
|
-
return Object.assign(
|
|
96
|
+
function ce(a, e, t = /* @__PURE__ */ new Map(), n = (m, b, w) => b, s = {}, g = (m) => m) {
|
|
97
|
+
return K[e.title] = e, x[e.title] = n, ue[e.title] = s, ie[e.title] = g, (m = {}) => {
|
|
98
|
+
const b = se(m, e, t), w = Object.keys(a).reduce((l, u) => (l[u] = a[u].default, l), {});
|
|
99
|
+
return Object.assign(w, b);
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function fe(a, e) {
|
|
103
103
|
return { customClass: e.class, customStyle: e.style };
|
|
104
104
|
}
|
|
105
|
-
const
|
|
106
|
-
["appearance",
|
|
105
|
+
const de = /* @__PURE__ */ new Map([
|
|
106
|
+
["appearance", fe]
|
|
107
107
|
]);
|
|
108
|
-
function pe(
|
|
108
|
+
function pe(a, e, t) {
|
|
109
109
|
return e;
|
|
110
110
|
}
|
|
111
|
-
const
|
|
111
|
+
const ve = "https://json-schema.org/draft/2020-12/schema", me = "https://farris-design.gitee.io/rate.schema.json", ge = "rate", ye = "A Farris Component", be = "object", he = {
|
|
112
112
|
id: {
|
|
113
113
|
description: "The unique identifier for rate",
|
|
114
114
|
type: "string"
|
|
@@ -170,23 +170,23 @@ const de = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-
|
|
|
170
170
|
type: "boolean",
|
|
171
171
|
default: !0
|
|
172
172
|
}
|
|
173
|
-
},
|
|
173
|
+
}, Se = [
|
|
174
174
|
"id",
|
|
175
175
|
"type"
|
|
176
|
-
],
|
|
176
|
+
], Me = [
|
|
177
177
|
"id",
|
|
178
178
|
"appearance",
|
|
179
179
|
"binding"
|
|
180
|
-
],
|
|
181
|
-
$schema:
|
|
182
|
-
$id:
|
|
183
|
-
title:
|
|
184
|
-
description:
|
|
185
|
-
type:
|
|
180
|
+
], Oe = {
|
|
181
|
+
$schema: ve,
|
|
182
|
+
$id: me,
|
|
183
|
+
title: ge,
|
|
184
|
+
description: ye,
|
|
185
|
+
type: be,
|
|
186
186
|
properties: he,
|
|
187
|
-
required:
|
|
188
|
-
ignore:
|
|
189
|
-
},
|
|
187
|
+
required: Se,
|
|
188
|
+
ignore: Me
|
|
189
|
+
}, Te = "rate", ke = "A Farris Component", De = "object", je = {
|
|
190
190
|
basic: {
|
|
191
191
|
description: "Basic Infomation",
|
|
192
192
|
title: "基本信息",
|
|
@@ -209,11 +209,11 @@ const de = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-
|
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
}, Ne = {
|
|
212
|
-
title:
|
|
213
|
-
description:
|
|
214
|
-
type:
|
|
215
|
-
categories:
|
|
216
|
-
}, Ve = ["很不满意", "不满意", "一般", "满意", "非常满意"],
|
|
212
|
+
title: Te,
|
|
213
|
+
description: ke,
|
|
214
|
+
type: De,
|
|
215
|
+
categories: je
|
|
216
|
+
}, Ve = ["很不满意", "不满意", "一般", "满意", "非常满意"], Q = {
|
|
217
217
|
/** 星星大小 */
|
|
218
218
|
size: { type: String, default: "large" },
|
|
219
219
|
/** 启用半颗星模式 */
|
|
@@ -245,32 +245,32 @@ const de = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-
|
|
|
245
245
|
*/
|
|
246
246
|
value: { type: Number, default: 0 },
|
|
247
247
|
modelValue: { type: Number, default: 0 }
|
|
248
|
-
},
|
|
248
|
+
}, ee = ce(Q, Oe, de, pe, Ne), W = /* @__PURE__ */ Z({
|
|
249
249
|
name: "FRate",
|
|
250
|
-
props:
|
|
250
|
+
props: Q,
|
|
251
251
|
emits: ["selectedValue", "update:modelValue"],
|
|
252
|
-
setup(
|
|
253
|
-
const
|
|
252
|
+
setup(a, e) {
|
|
253
|
+
const t = r(a.size), n = r(a.enableHalf), s = r(a.enableClear), g = r(a.disabled), m = r(a.pointSystem), b = r(a.lightColor), w = r(a.darkColor), l = r(a.iconClass), u = r(a.numOfStar), d = r(a.toolTipDisabled), c = r(a.toolTipContents), h = r(a.enableScore), S = r(a.enableSatisfaction);
|
|
254
254
|
let v;
|
|
255
|
-
const T = r(0),
|
|
256
|
-
let
|
|
257
|
-
const
|
|
258
|
-
|
|
255
|
+
const T = r(0), M = r(0), k = r(0), p = r(a.modelValue);
|
|
256
|
+
let D = 1, f, y, O;
|
|
257
|
+
const E = 4;
|
|
258
|
+
G(() => {
|
|
259
259
|
});
|
|
260
|
-
function
|
|
260
|
+
function A() {
|
|
261
261
|
const i = u.value;
|
|
262
|
-
|
|
263
|
-
for (let
|
|
264
|
-
|
|
265
|
-
id:
|
|
262
|
+
O = [];
|
|
263
|
+
for (let N = 1; N <= i; N++)
|
|
264
|
+
O.push({
|
|
265
|
+
id: N
|
|
266
266
|
});
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function L() {
|
|
269
269
|
let i;
|
|
270
|
-
n.value ? i = Math.ceil(
|
|
270
|
+
n.value ? i = Math.ceil(p.value / D) : i = p.value, M.value = (v * p.value + Math.floor(p.value) * E) / D, f = c.value[i - 1];
|
|
271
271
|
}
|
|
272
|
-
function
|
|
273
|
-
switch (
|
|
272
|
+
function $() {
|
|
273
|
+
switch (t.value) {
|
|
274
274
|
case "small":
|
|
275
275
|
v = 14;
|
|
276
276
|
break;
|
|
@@ -284,111 +284,111 @@ const de = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-
|
|
|
284
284
|
v = 24;
|
|
285
285
|
break;
|
|
286
286
|
}
|
|
287
|
-
|
|
287
|
+
A(), u.value && (D = m.value / u.value), p.value && L();
|
|
288
288
|
}
|
|
289
|
-
|
|
290
|
-
function
|
|
289
|
+
$();
|
|
290
|
+
function z(i) {
|
|
291
291
|
return i.className.indexOf("f-icon") !== -1;
|
|
292
292
|
}
|
|
293
293
|
function H() {
|
|
294
|
-
return T.value ===
|
|
294
|
+
return T.value === M.value && s.value && M.value !== 0 ? (M.value = 0, p.value = 0, y = null, T.value = 0, k.value = 0, e.emit("selectedValue", p.value), e.emit("update:modelValue", p.value), !0) : !1;
|
|
295
295
|
}
|
|
296
|
-
function q(i,
|
|
296
|
+
function q(i, N, o) {
|
|
297
297
|
if (i.movementX || i.movementY) {
|
|
298
|
-
if (
|
|
298
|
+
if (g.value)
|
|
299
299
|
return;
|
|
300
|
-
|
|
300
|
+
S.value && (f = c.value[N - 1]), i.offsetX < v / 2 && n.value === !0 ? (T.value = v * N - v / 2 + E * (N - 1), k.value = D * N - D / 2) : (T.value = v * N + E * (N - 1), k.value = D * N);
|
|
301
301
|
}
|
|
302
302
|
if (o === !0) {
|
|
303
303
|
if (H())
|
|
304
304
|
return;
|
|
305
|
-
|
|
305
|
+
p.value = k.value, M.value = T.value, y = f, e.emit("update:modelValue", p.value), e.emit("selectedValue", p.value);
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function B(i, N) {
|
|
309
309
|
var o;
|
|
310
|
-
if (
|
|
311
|
-
const
|
|
312
|
-
q(i,
|
|
310
|
+
if (z(i.target) && i.target) {
|
|
311
|
+
const V = parseInt((o = i.target) == null ? void 0 : o.id);
|
|
312
|
+
q(i, V, N);
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
|
-
const X =
|
|
316
|
-
width: (T.value ||
|
|
315
|
+
const X = F(() => k.value ? k.value + "分" : p.value + "分"), Y = F(() => ({
|
|
316
|
+
width: (T.value || M.value) + "px"
|
|
317
317
|
}));
|
|
318
|
-
function
|
|
318
|
+
function C() {
|
|
319
319
|
T.value = 0;
|
|
320
320
|
}
|
|
321
|
-
return
|
|
322
|
-
|
|
323
|
-
}), () =>
|
|
321
|
+
return ae(() => a.modelValue, (i) => {
|
|
322
|
+
p.value = i, L();
|
|
323
|
+
}), () => j("div", {
|
|
324
324
|
class: "farris-star-rating",
|
|
325
|
-
onMouseover:
|
|
326
|
-
onMousemove:
|
|
327
|
-
onMouseleave:
|
|
328
|
-
onClick:
|
|
329
|
-
}, [
|
|
325
|
+
onMouseover: R((i) => B(i, !1), ["prevent"]),
|
|
326
|
+
onMousemove: R((i) => B(i, !1), ["prevent"]),
|
|
327
|
+
onMouseleave: R((i) => C(), ["prevent"]),
|
|
328
|
+
onClick: R((i) => B(i, !0), ["prevent"])
|
|
329
|
+
}, [j("div", {
|
|
330
330
|
class: "star-light-area",
|
|
331
|
-
style:
|
|
332
|
-
}, [
|
|
331
|
+
style: Y.value
|
|
332
|
+
}, [O.map((i) => j("span", {
|
|
333
333
|
class: ["f-icon default-light-color ", l.value, {
|
|
334
|
-
"f-star-sm":
|
|
334
|
+
"f-star-sm": t.value === "small"
|
|
335
335
|
}, {
|
|
336
|
-
"f-star-md":
|
|
336
|
+
"f-star-md": t.value === "middle"
|
|
337
337
|
}, {
|
|
338
|
-
"f-star-lg":
|
|
338
|
+
"f-star-lg": t.value === "large"
|
|
339
339
|
}, {
|
|
340
|
-
"f-star-exlarge":
|
|
340
|
+
"f-star-exlarge": t.value === "extraLarge"
|
|
341
341
|
}, {
|
|
342
|
-
disabled:
|
|
342
|
+
disabled: d.value
|
|
343
343
|
}],
|
|
344
344
|
id: i.id,
|
|
345
345
|
style: {
|
|
346
346
|
color: b.value
|
|
347
347
|
}
|
|
348
|
-
}, null))]),
|
|
348
|
+
}, null))]), j("div", {
|
|
349
349
|
class: ["star-dark-area", {
|
|
350
|
-
small:
|
|
350
|
+
small: t.value === "small"
|
|
351
351
|
}, {
|
|
352
|
-
middle:
|
|
352
|
+
middle: t.value === "middle"
|
|
353
353
|
}, {
|
|
354
|
-
large:
|
|
354
|
+
large: t.value === "large"
|
|
355
355
|
}]
|
|
356
|
-
}, [
|
|
356
|
+
}, [O.map((i) => j("span", {
|
|
357
357
|
class: ["f-icon default-dark-color", l.value, {
|
|
358
|
-
"f-star-sm":
|
|
358
|
+
"f-star-sm": t.value === "small"
|
|
359
359
|
}, {
|
|
360
|
-
"f-star-md":
|
|
360
|
+
"f-star-md": t.value === "middle"
|
|
361
361
|
}, {
|
|
362
|
-
"f-star-lg":
|
|
362
|
+
"f-star-lg": t.value === "large"
|
|
363
363
|
}, {
|
|
364
|
-
"f-star-exlarge":
|
|
364
|
+
"f-star-exlarge": t.value === "extraLarge"
|
|
365
365
|
}],
|
|
366
366
|
id: i.id,
|
|
367
367
|
style: {
|
|
368
|
-
color:
|
|
368
|
+
color: w.value
|
|
369
369
|
}
|
|
370
|
-
}, null))]),
|
|
370
|
+
}, null))]), j("div", {
|
|
371
371
|
class: ["f-utils-fill", {
|
|
372
|
-
"font-small":
|
|
372
|
+
"font-small": t.value === "small"
|
|
373
373
|
}, {
|
|
374
|
-
"font-middle":
|
|
374
|
+
"font-middle": t.value === "middle"
|
|
375
375
|
}, {
|
|
376
|
-
"font-large":
|
|
376
|
+
"font-large": t.value === "large"
|
|
377
377
|
}, {
|
|
378
|
-
"font-exlarge":
|
|
378
|
+
"font-exlarge": t.value === "extraLarge"
|
|
379
379
|
}]
|
|
380
|
-
}, [
|
|
380
|
+
}, [h.value && j("span", null, [P(" "), X.value, P(" ")]), S.value && (y || f) && j("span", null, [P(" "), f || y])])]);
|
|
381
381
|
}
|
|
382
382
|
});
|
|
383
|
-
function
|
|
384
|
-
var
|
|
383
|
+
function Ee(a, e, t) {
|
|
384
|
+
var D;
|
|
385
385
|
function n() {
|
|
386
386
|
}
|
|
387
|
-
const s = "",
|
|
387
|
+
const s = "", g = "", m = r();
|
|
388
388
|
function b() {
|
|
389
389
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function w() {
|
|
392
392
|
return !1;
|
|
393
393
|
}
|
|
394
394
|
function l() {
|
|
@@ -397,66 +397,58 @@ function je(t, e, a) {
|
|
|
397
397
|
function u() {
|
|
398
398
|
return (e == null ? void 0 : e.schema.componentType) === "frame";
|
|
399
399
|
}
|
|
400
|
-
function
|
|
401
|
-
if (!
|
|
400
|
+
function d(f) {
|
|
401
|
+
if (!f || !f.value)
|
|
402
402
|
return null;
|
|
403
|
-
if (
|
|
404
|
-
return
|
|
405
|
-
const
|
|
406
|
-
return
|
|
403
|
+
if (f.value.schema && f.value.schema.type === "component")
|
|
404
|
+
return f.value;
|
|
405
|
+
const y = r(f == null ? void 0 : f.value.parent), O = d(y);
|
|
406
|
+
return O || null;
|
|
407
407
|
}
|
|
408
|
-
function f
|
|
409
|
-
const { componentInstance:
|
|
410
|
-
return !
|
|
408
|
+
function c(f = e) {
|
|
409
|
+
const { componentInstance: y, designerItemElementRef: O } = f;
|
|
410
|
+
return !y || !y.value ? null : y.value.canMove ? O : c(f.parent);
|
|
411
411
|
}
|
|
412
|
-
function
|
|
413
|
-
return !!
|
|
412
|
+
function h(f) {
|
|
413
|
+
return !!t;
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function S() {
|
|
416
416
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
417
417
|
}
|
|
418
418
|
function v() {
|
|
419
419
|
}
|
|
420
|
-
function T(
|
|
421
|
-
}
|
|
422
|
-
function O(c, g) {
|
|
423
|
-
const { componentType: y } = c;
|
|
424
|
-
let C = G(y, c, g);
|
|
425
|
-
const R = y.toLowerCase().replace("-", "_");
|
|
426
|
-
return C && !C.id && C.type === y && (C.id = `${R}_${Math.random().toString().slice(2, 6)}`), C;
|
|
420
|
+
function T(f, y) {
|
|
427
421
|
}
|
|
428
|
-
function
|
|
429
|
-
const
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
return A && !A.id && A.type === y && (A.id = `${$}_${Math.random().toString().slice(2, 6)}`), A;
|
|
422
|
+
function M(f, y) {
|
|
423
|
+
const { componentType: O } = f;
|
|
424
|
+
let E = I(O, f, y);
|
|
425
|
+
const A = O.toLowerCase().replace("-", "_");
|
|
426
|
+
return E && !E.id && E.type === O && (E.id = `${A}_${Math.random().toString().slice(2, 6)}`), E;
|
|
434
427
|
}
|
|
435
|
-
function
|
|
428
|
+
function k(f) {
|
|
436
429
|
}
|
|
437
|
-
function
|
|
430
|
+
function p(...f) {
|
|
438
431
|
}
|
|
439
432
|
return m.value = {
|
|
440
433
|
canMove: b(),
|
|
441
|
-
canSelectParent:
|
|
434
|
+
canSelectParent: w(),
|
|
442
435
|
canDelete: l(),
|
|
443
436
|
canNested: !u(),
|
|
444
437
|
contents: e == null ? void 0 : e.schema.contents,
|
|
445
|
-
elementRef:
|
|
446
|
-
parent: (
|
|
438
|
+
elementRef: a,
|
|
439
|
+
parent: (D = e == null ? void 0 : e.parent) == null ? void 0 : D.componentInstance,
|
|
447
440
|
schema: e == null ? void 0 : e.schema,
|
|
448
441
|
styles: s,
|
|
449
|
-
designerClass:
|
|
450
|
-
canAccepts:
|
|
451
|
-
getBelongedComponentInstance:
|
|
452
|
-
getDraggableDesignItemElement:
|
|
453
|
-
getDraggingDisplayText:
|
|
454
|
-
getPropConfig:
|
|
442
|
+
designerClass: g,
|
|
443
|
+
canAccepts: h,
|
|
444
|
+
getBelongedComponentInstance: d,
|
|
445
|
+
getDraggableDesignItemElement: c,
|
|
446
|
+
getDraggingDisplayText: S,
|
|
447
|
+
getPropConfig: p,
|
|
455
448
|
getDragScopeElement: v,
|
|
456
449
|
onAcceptMovedChildElement: T,
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
addNewChildComponentSchema: O,
|
|
450
|
+
onChildElementMovedOut: k,
|
|
451
|
+
addNewChildComponentSchema: M,
|
|
460
452
|
updateDragAndDropRules: n,
|
|
461
453
|
triggerBelongedComponentToMoveWhenMoved: r(!1),
|
|
462
454
|
triggerBelongedComponentToDeleteWhenDeleted: r(!1)
|
|
@@ -464,34 +456,34 @@ function je(t, e, a) {
|
|
|
464
456
|
}
|
|
465
457
|
const we = /* @__PURE__ */ Z({
|
|
466
458
|
name: "FRateDesign",
|
|
467
|
-
props:
|
|
459
|
+
props: Q,
|
|
468
460
|
emits: ["selectedValue"],
|
|
469
|
-
setup(
|
|
470
|
-
const
|
|
461
|
+
setup(a, e) {
|
|
462
|
+
const t = r(a.size), n = r(a.enableHalf), s = r(a.enableClear), g = r(a.disabled), m = r(a.pointSystem), b = r(a.lightColor), w = r(a.darkColor), l = r(a.iconClass), u = r(a.numOfStar), d = r(a.toolTipDisabled), c = r(a.toolTipContents), h = r(a.enableScore), S = r(a.enableSatisfaction);
|
|
471
463
|
let v;
|
|
472
464
|
const T = r(1);
|
|
473
|
-
let
|
|
474
|
-
const k = r(0),
|
|
475
|
-
let
|
|
476
|
-
const
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
}), e.expose(
|
|
465
|
+
let M = 0;
|
|
466
|
+
const k = r(0), p = r(0);
|
|
467
|
+
let D = 1, f, y, O;
|
|
468
|
+
const E = 4, A = r(), L = te("design-item-context"), $ = Ee(A, L);
|
|
469
|
+
G(() => {
|
|
470
|
+
A.value.componentInstance = $;
|
|
471
|
+
}), e.expose($.value), G(() => {
|
|
480
472
|
});
|
|
481
|
-
function
|
|
473
|
+
function z() {
|
|
482
474
|
const o = u.value;
|
|
483
|
-
|
|
484
|
-
for (let
|
|
485
|
-
|
|
486
|
-
id:
|
|
475
|
+
O = [];
|
|
476
|
+
for (let V = 1; V <= o; V++)
|
|
477
|
+
O.push({
|
|
478
|
+
id: V
|
|
487
479
|
});
|
|
488
480
|
}
|
|
489
481
|
function H() {
|
|
490
482
|
let o;
|
|
491
|
-
n.value ? o = Math.ceil(
|
|
483
|
+
n.value ? o = Math.ceil(p.value / D) : o = p.value, M = (v * p.value + Math.floor(p.value) * E) / D, f = c.value[o - 1];
|
|
492
484
|
}
|
|
493
485
|
function q() {
|
|
494
|
-
switch (
|
|
486
|
+
switch (t.value) {
|
|
495
487
|
case "small":
|
|
496
488
|
v = 14;
|
|
497
489
|
break;
|
|
@@ -505,112 +497,112 @@ const we = /* @__PURE__ */ Z({
|
|
|
505
497
|
v = 24;
|
|
506
498
|
break;
|
|
507
499
|
}
|
|
508
|
-
|
|
500
|
+
z(), u.value && (D = m.value / u.value), p.value && H();
|
|
509
501
|
}
|
|
510
502
|
q();
|
|
511
|
-
function
|
|
503
|
+
function B(o) {
|
|
512
504
|
return o.className.indexOf("f-icon") !== -1;
|
|
513
505
|
}
|
|
514
506
|
function X() {
|
|
515
|
-
return T.value ===
|
|
507
|
+
return T.value === M && s && M !== 0 ? (M = 0, p.value = 0, y = null, T.value = 0, k.value = 0, e.emit("selectedValue", p.value), !0) : !1;
|
|
516
508
|
}
|
|
517
|
-
function
|
|
509
|
+
function Y(o, V, _) {
|
|
518
510
|
if (o.movementX || o.movementY) {
|
|
519
|
-
if (
|
|
511
|
+
if (g.value)
|
|
520
512
|
return;
|
|
521
|
-
|
|
513
|
+
S.value && (f = c.value[V - 1]), o.offsetX < v / 2 && n.value === !0 ? (T.value = v * V - v / 2 + E * (V - 1), k.value = D * V - D / 2) : (T.value = v * V + E * (V - 1), k.value = D * V);
|
|
522
514
|
}
|
|
523
|
-
if (
|
|
515
|
+
if (_ === !0) {
|
|
524
516
|
if (X())
|
|
525
517
|
return;
|
|
526
|
-
|
|
518
|
+
p.value = k.value, M = T.value, y = f, e.emit("selectedValue", p.value);
|
|
527
519
|
}
|
|
528
520
|
}
|
|
529
|
-
function
|
|
530
|
-
if (
|
|
531
|
-
const
|
|
532
|
-
|
|
521
|
+
function C(o, V) {
|
|
522
|
+
if (B(o.target) && o.target) {
|
|
523
|
+
const _ = parseInt(o.target.id);
|
|
524
|
+
Y(o, _, V);
|
|
533
525
|
}
|
|
534
526
|
}
|
|
535
|
-
const i =
|
|
536
|
-
width: (T.value ||
|
|
527
|
+
const i = F(() => k.value ? k.value + "分" : p.value + "分"), N = F(() => ({
|
|
528
|
+
width: (T.value || M) + "px"
|
|
537
529
|
}));
|
|
538
|
-
return () =>
|
|
530
|
+
return () => j("div", {
|
|
539
531
|
class: "farris-star-rating",
|
|
540
|
-
ref:
|
|
541
|
-
onMouseover:
|
|
542
|
-
onMousemove:
|
|
543
|
-
onMouseout:
|
|
544
|
-
onClick:
|
|
545
|
-
}, [
|
|
532
|
+
ref: A,
|
|
533
|
+
onMouseover: R((o) => C(o, !1), ["prevent"]),
|
|
534
|
+
onMousemove: R((o) => C(o, !1), ["prevent"]),
|
|
535
|
+
onMouseout: R((o) => C(o, !1), ["prevent"]),
|
|
536
|
+
onClick: R((o) => C(o, !0), ["prevent"])
|
|
537
|
+
}, [j("div", {
|
|
546
538
|
class: "star-light-area",
|
|
547
|
-
style:
|
|
548
|
-
}, [
|
|
539
|
+
style: N.value
|
|
540
|
+
}, [O.map((o) => j("span", {
|
|
549
541
|
class: ["f-icon default-light-color ", l.value, {
|
|
550
|
-
"f-star-sm":
|
|
542
|
+
"f-star-sm": t.value === "small"
|
|
551
543
|
}, {
|
|
552
|
-
"f-star-md":
|
|
544
|
+
"f-star-md": t.value === "middle"
|
|
553
545
|
}, {
|
|
554
|
-
"f-star-lg":
|
|
546
|
+
"f-star-lg": t.value === "large"
|
|
555
547
|
}, {
|
|
556
|
-
"f-star-exlarge":
|
|
548
|
+
"f-star-exlarge": t.value === "extraLarge"
|
|
557
549
|
}, {
|
|
558
|
-
disabled:
|
|
550
|
+
disabled: d.value
|
|
559
551
|
}],
|
|
560
552
|
id: o.id,
|
|
561
553
|
style: {
|
|
562
554
|
color: b.value
|
|
563
555
|
}
|
|
564
|
-
}, null))]),
|
|
556
|
+
}, null))]), j("div", {
|
|
565
557
|
class: ["star-dark-area", {
|
|
566
|
-
small:
|
|
558
|
+
small: t.value === "small"
|
|
567
559
|
}, {
|
|
568
|
-
middle:
|
|
560
|
+
middle: t.value === "middle"
|
|
569
561
|
}, {
|
|
570
|
-
large:
|
|
562
|
+
large: t.value === "large"
|
|
571
563
|
}]
|
|
572
|
-
}, [
|
|
564
|
+
}, [O.map((o) => j("span", {
|
|
573
565
|
class: ["f-icon default-dark-color", l.value, {
|
|
574
|
-
"f-star-sm":
|
|
566
|
+
"f-star-sm": t.value === "small"
|
|
575
567
|
}, {
|
|
576
|
-
"f-star-md":
|
|
568
|
+
"f-star-md": t.value === "middle"
|
|
577
569
|
}, {
|
|
578
|
-
"f-star-lg":
|
|
570
|
+
"f-star-lg": t.value === "large"
|
|
579
571
|
}, {
|
|
580
|
-
"f-star-exlarge":
|
|
572
|
+
"f-star-exlarge": t.value === "extraLarge"
|
|
581
573
|
}],
|
|
582
574
|
id: o.id,
|
|
583
575
|
style: {
|
|
584
|
-
color:
|
|
576
|
+
color: w.value
|
|
585
577
|
}
|
|
586
|
-
}, null))]),
|
|
578
|
+
}, null))]), j("div", {
|
|
587
579
|
class: ["f-utils-fill", {
|
|
588
|
-
"font-small":
|
|
580
|
+
"font-small": t.value === "small"
|
|
589
581
|
}, {
|
|
590
|
-
"font-middle":
|
|
582
|
+
"font-middle": t.value === "middle"
|
|
591
583
|
}, {
|
|
592
|
-
"font-large":
|
|
584
|
+
"font-large": t.value === "large"
|
|
593
585
|
}, {
|
|
594
|
-
"font-exlarge":
|
|
586
|
+
"font-exlarge": t.value === "extraLarge"
|
|
595
587
|
}]
|
|
596
|
-
}, [
|
|
588
|
+
}, [h.value && j("span", null, [P(" "), i.value, P(" ")]), S.value && (y || f) && j("span", null, [P(" "), f || y])])]);
|
|
597
589
|
}
|
|
598
|
-
}),
|
|
599
|
-
const e =
|
|
600
|
-
return e.install = function(
|
|
601
|
-
|
|
602
|
-
},
|
|
590
|
+
}), Re = (a) => {
|
|
591
|
+
const e = a;
|
|
592
|
+
return e.install = function(t) {
|
|
593
|
+
t.component(e.name, a);
|
|
594
|
+
}, a;
|
|
603
595
|
};
|
|
604
|
-
|
|
605
|
-
|
|
596
|
+
W.register = (a, e, t, n) => {
|
|
597
|
+
a.rate = W, e.rate = ee;
|
|
606
598
|
};
|
|
607
|
-
|
|
608
|
-
|
|
599
|
+
W.registerDesigner = (a, e, t) => {
|
|
600
|
+
a.rate = we, e.rate = ee;
|
|
609
601
|
};
|
|
610
|
-
const
|
|
602
|
+
const Pe = Re(W);
|
|
611
603
|
export {
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
604
|
+
W as FRate,
|
|
605
|
+
Pe as default,
|
|
606
|
+
ee as propsResolver,
|
|
607
|
+
Q as rateProps
|
|
616
608
|
};
|