@farris/ui-vue 1.3.0 → 1.3.3
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 +103 -99
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +454 -398
- package/components/avatar/index.umd.cjs +1 -1
- package/components/binding-selector/index.esm.js +444 -0
- package/components/binding-selector/index.umd.cjs +1 -0
- package/components/binding-selector/package.json +8 -0
- package/components/border-editor/index.esm.js +5 -3
- package/components/border-editor/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +143 -139
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +479 -476
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +255 -252
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +652 -567
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +518 -521
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +659 -553
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +162 -155
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +866 -747
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +371 -998
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1174 -1280
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +340 -991
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +6066 -5847
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3400 -3486
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2328 -2446
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +9551 -1200
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +2 -1
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +34 -38
- package/components/drawer/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +234 -231
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1996 -2630
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +138 -123
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +218 -218
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +311 -0
- package/components/event-parameter/index.umd.cjs +1 -0
- package/components/event-parameter/package.json +8 -0
- package/components/events-editor/index.css +1 -1
- package/components/events-editor/index.esm.js +548 -586
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +95 -91
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2871 -3736
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +3380 -3645
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +10543 -3207
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +9775 -1312
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +442 -438
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +587 -807
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +415 -381
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +361 -1024
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +2265 -2371
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +6425 -6257
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +6164 -5946
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +252 -252
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +70 -70
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +524 -1474
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +547 -502
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +646 -574
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1181 -2028
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +134 -131
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1185 -2027
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +442 -1368
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +238 -235
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1635 -1713
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +791 -716
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +12203 -5274
- package/components/query-solution/index.umd.cjs +6 -1
- package/components/radio-button/index.esm.js +97 -97
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.css +1 -1
- package/components/radio-group/index.esm.js +1873 -520
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +299 -300
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +176 -173
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +715 -659
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +1032 -1883
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4767 -5693
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +169 -161
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +490 -1167
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +154 -151
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +575 -1204
- package/components/splitter/index.umd.cjs +1 -1
- package/components/splitter/style.js +2 -0
- package/components/step/index.esm.js +279 -276
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +478 -428
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2591 -3326
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +442 -439
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +309 -307
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +500 -430
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1391 -1341
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +574 -575
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3422 -3536
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2661 -2764
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +675 -674
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +300 -297
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +454 -1089
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +709 -706
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +54780 -52757
- package/farris.all.umd.cjs +14 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/binding-selector/index.d.ts +55 -0
- package/types/binding-selector/src/binding-selector.component.d.ts +11 -0
- package/types/binding-selector/src/binding-selector.props.d.ts +52 -0
- package/types/binding-selector/src/components/binding-selector-container.component.d.ts +13 -0
- package/types/binding-selector/src/composition/use-field-selection.d.ts +9 -0
- package/types/combo-list/src/components/list-container.component.d.ts +6 -6
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/combo-tree/src/components/tree-container.component.d.ts +5 -5
- package/types/common/directive/area-response.d.ts +10 -0
- package/types/common/entity/entity-schema.d.ts +26 -11
- 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 +2 -2
- package/types/common/utils/resolve-field.d.ts +2 -0
- package/types/common/utils/use-class.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/condition/src/condition-fields.design.component.d.ts +18 -0
- package/types/condition/src/types.d.ts +5 -4
- package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/data-grid/index.d.ts +8 -5
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +20 -0
- package/types/data-grid/src/{designer/data-grid-column.props.d.ts → data-grid-column.props.d.ts} +1 -1
- package/types/data-grid/src/data-grid.component.d.ts +3 -2
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
- package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
- 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 +9 -11
- package/types/date-picker/src/components/calendar/calendar.component.d.ts +3 -3
- package/types/date-picker/src/components/month/month.component.d.ts +3 -3
- package/types/date-picker/src/components/year/year.component.d.ts +3 -3
- package/types/designer-canvas/index.d.ts +3 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/drag-resolve.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 +49 -41
- package/types/designer-canvas/src/types.d.ts +10 -21
- package/types/dynamic-form/index.d.ts +1 -1
- package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +3 -0
- package/types/dynamic-form/src/designer/response-form-use-designer-rules.d.ts +3 -0
- package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
- package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +1 -1
- package/types/dynamic-form/src/schema/{schema-resolver.d.ts → response-form-schema-resolver.d.ts} +1 -1
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +6 -1
- package/types/dynamic-resolver/src/converter/row-number.converter.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +7 -0
- package/types/entity-binding-selector/entity-binding-selector.component.d.ts +11 -0
- package/types/entity-binding-selector/entity-binding-selector.props.d.ts +3 -0
- package/types/enum-editor/src/components/enum-editor-container.component.d.ts +3 -3
- package/types/enum-editor/src/enum-editor.component.d.ts +3 -3
- package/types/event-parameter/index.d.ts +31 -0
- package/types/event-parameter/src/composition/type.d.ts +77 -0
- package/types/event-parameter/src/composition/use-editor-combotree.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-input.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-select.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-switch.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor.d.ts +3 -0
- package/types/event-parameter/src/event-parameter.component.d.ts +8 -0
- package/types/event-parameter/src/event-parameter.props.d.ts +34 -0
- package/types/external-container/src/designer/import-external-schema.component.d.ts +1 -1
- package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/field-selector/src/field-selector.component.d.ts +1 -2
- package/types/field-selector/src/field-selector.props.d.ts +0 -9
- package/types/input-group/src/designer/use-input-group-rules.d.ts +1 -2
- 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/list-view/src/designer/list-view-table.design.component.d.ts +15 -0
- package/types/list-view/src/list-view-table.component.d.ts +15 -0
- package/types/lookup/src/composition/use-user-data.d.ts +2 -2
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -6
- package/types/modal/src/composition/modal.service.d.ts +2 -1
- package/types/page-header/src/designer/page-header.design.component.d.ts +1 -1
- package/types/page-header/src/page-header.component.d.ts +1 -1
- 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 +3 -1
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -1
- package/types/property-panel/src/composition/entity/property-entity.d.ts +1 -1
- package/types/property-panel/src/composition/type.d.ts +0 -13
- package/types/query-solution/src/composition/types.d.ts +35 -4
- package/types/query-solution/src/composition/use-header.d.ts +21 -0
- package/types/query-solution/src/composition/{use-filter.d.ts → use-http.d.ts} +2 -2
- package/types/query-solution/src/composition/use-solution.d.ts +20 -0
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +43 -35
- package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
- package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
- 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/designer/query-solution-config/query-solution-config.props.d.ts +14 -14
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +12 -0
- package/types/query-solution/src/query-solution.d.ts +10 -2
- package/types/query-solution/src/solutions.d.ts +108 -509
- package/types/radio-group/src/designer/item-collection-editor-inner.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.props.d.ts +21 -0
- package/types/radio-group/src/schema/schema-mapper.d.ts +1 -0
- package/types/radio-group/src/schema/schema-resolver.d.ts +1 -0
- package/types/response-layout-editor/index.d.ts +3 -1
- 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/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
- package/types/section/src/designer/use-designer-rules.d.ts +3 -3
- package/types/section/src/property-config/section.property-config.d.ts +17 -17
- package/types/section/src/schema/schema-resolver.d.ts +1 -2
- package/types/section/src/schema/toolbar-resolver.d.ts +1 -1
- 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/composition/types.d.ts +4 -1
- 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/property-config/tab-page.property-config.d.ts +9 -59
- package/types/tabs/src/property-config/tabs.property-config.d.ts +8 -71
- package/types/tabs/src/schema/schema-resolver.d.ts +1 -2
- package/types/text/src/composition/types.d.ts +4 -4
- package/types/textarea/src/property-config/textarea.property-config.d.ts +23 -0
- package/types/tree-grid/index.d.ts +3 -3
- package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
- package/types/weather/src/composition/use-weather-charts.d.ts +15 -0
- package/types/weather/src/composition/use-weather-color.d.ts +15 -0
- package/types/weather/src/composition/use-weather-data.d.ts +15 -0
- package/types/weather/src/composition/use-weather-format-number.d.ts +15 -0
- 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/dynamic-form/src/designer/use-designer-rules.d.ts +0 -3
- package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
- package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
- package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
- package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
- package/types/weather/src/composition/types.d.ts +0 -2
|
@@ -1,114 +1,119 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isPlainObject as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { defineComponent as Z, ref as r, onMounted as G, computed as W, watch as ae, createVNode as N, withModifiers as E, createTextVNode as B, inject as te } from "vue";
|
|
2
|
+
import { isPlainObject as U, cloneDeep as le } from "lodash-es";
|
|
3
|
+
import { withInstall as re } from "../common/index.esm.js";
|
|
4
|
+
const K = {}, x = {};
|
|
5
|
+
function J(a) {
|
|
6
|
+
const { properties: e, title: t, ignore: n } = a, o = n && Array.isArray(n), h = Object.keys(e).reduce((y, b) => ((!o || !n.find((w) => w === b)) && (y[b] = e[b].type === "object" && e[b].properties ? J(e[b]) : le(e[b].default)), y), {});
|
|
7
|
+
if (t && (!o || !n.find((y) => y === "id"))) {
|
|
8
|
+
const y = t.toLowerCase().replace(/-/g, "_");
|
|
9
|
+
h.id = `${y}_${Math.random().toString().slice(2, 6)}`;
|
|
10
|
+
}
|
|
11
|
+
return h;
|
|
7
12
|
}
|
|
8
|
-
function
|
|
9
|
-
const n =
|
|
13
|
+
function I(a, e = {}, t) {
|
|
14
|
+
const n = K[a];
|
|
10
15
|
if (n) {
|
|
11
|
-
let o =
|
|
12
|
-
const
|
|
13
|
-
return o =
|
|
16
|
+
let o = J(n);
|
|
17
|
+
const h = x[a];
|
|
18
|
+
return o = h ? h({ getSchemaByType: I }, o, e, t) : o, o;
|
|
14
19
|
}
|
|
15
20
|
return null;
|
|
16
21
|
}
|
|
17
|
-
function
|
|
18
|
-
const
|
|
19
|
-
return Object.keys(t).reduce((n, o) => (n[o] &&
|
|
22
|
+
function ne(a, e) {
|
|
23
|
+
const t = J(e);
|
|
24
|
+
return Object.keys(t).reduce((n, o) => (n[o] && U(n[o]) && U(a[o] || !a[o]) ? Object.assign(n[o], a[o] || {}) : n[o] = a[o], n), t), t;
|
|
20
25
|
}
|
|
21
|
-
function
|
|
22
|
-
return Object.keys(
|
|
26
|
+
function oe(a, e) {
|
|
27
|
+
return Object.keys(a).filter((n) => a[n] != null).reduce((n, o) => {
|
|
23
28
|
if (e.has(o)) {
|
|
24
|
-
const
|
|
25
|
-
if (typeof
|
|
26
|
-
n[
|
|
29
|
+
const h = e.get(o);
|
|
30
|
+
if (typeof h == "string")
|
|
31
|
+
n[h] = a[o];
|
|
27
32
|
else {
|
|
28
|
-
const
|
|
29
|
-
Object.assign(n,
|
|
33
|
+
const y = h(o, a[o], a);
|
|
34
|
+
Object.assign(n, y);
|
|
30
35
|
}
|
|
31
36
|
} else
|
|
32
|
-
n[o] =
|
|
37
|
+
n[o] = a[o];
|
|
33
38
|
return n;
|
|
34
39
|
}, {});
|
|
35
40
|
}
|
|
36
|
-
function
|
|
37
|
-
const n =
|
|
38
|
-
return
|
|
41
|
+
function se(a, e, t = /* @__PURE__ */ new Map()) {
|
|
42
|
+
const n = ne(a, e);
|
|
43
|
+
return oe(n, t);
|
|
39
44
|
}
|
|
40
|
-
function
|
|
41
|
-
function e(l,
|
|
42
|
-
if (typeof
|
|
43
|
-
return
|
|
44
|
-
if (typeof
|
|
45
|
-
const S = Object.keys(
|
|
45
|
+
function ue(a = {}) {
|
|
46
|
+
function e(l, s, f, p) {
|
|
47
|
+
if (typeof f == "number")
|
|
48
|
+
return p[l].length === f;
|
|
49
|
+
if (typeof f == "object") {
|
|
50
|
+
const S = Object.keys(f)[0], M = f[S];
|
|
46
51
|
if (S === "not")
|
|
47
|
-
return Number(
|
|
52
|
+
return Number(p[l].length) !== Number(M);
|
|
48
53
|
if (S === "moreThan")
|
|
49
|
-
return Number(
|
|
54
|
+
return Number(p[l].length) >= Number(M);
|
|
50
55
|
if (S === "lessThan")
|
|
51
|
-
return Number(
|
|
56
|
+
return Number(p[l].length) <= Number(M);
|
|
52
57
|
}
|
|
53
58
|
return !1;
|
|
54
59
|
}
|
|
55
|
-
function
|
|
56
|
-
return
|
|
60
|
+
function t(l, s, f, p) {
|
|
61
|
+
return p[l] && p[l].propertyValue && String(p[l].propertyValue.value) === String(f);
|
|
57
62
|
}
|
|
58
63
|
const n = /* @__PURE__ */ new Map([
|
|
59
64
|
["length", e],
|
|
60
|
-
["getProperty",
|
|
65
|
+
["getProperty", t]
|
|
61
66
|
]);
|
|
62
|
-
Object.keys(
|
|
63
|
-
function o(l,
|
|
64
|
-
const
|
|
65
|
-
return typeof
|
|
66
|
-
if (
|
|
67
|
-
return { target:
|
|
68
|
-
const S =
|
|
69
|
-
return { target:
|
|
67
|
+
Object.keys(a).reduce((l, s) => (l.set(s, a[s]), l), n);
|
|
68
|
+
function o(l, s) {
|
|
69
|
+
const f = l;
|
|
70
|
+
return typeof s == "number" ? [{ target: f, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: f, operator: "getProperty", param: l, value: !!s }] : typeof s == "object" ? Object.keys(s).map((p) => {
|
|
71
|
+
if (p === "length")
|
|
72
|
+
return { target: f, operator: "length", param: null, value: s[p] };
|
|
73
|
+
const S = p, M = s[p];
|
|
74
|
+
return { target: f, operator: "getProperty", param: S, value: M };
|
|
70
75
|
}) : [];
|
|
71
76
|
}
|
|
72
|
-
function
|
|
73
|
-
return Object.keys(l).reduce((
|
|
74
|
-
const S = o(
|
|
75
|
-
return
|
|
77
|
+
function h(l) {
|
|
78
|
+
return Object.keys(l).reduce((f, p) => {
|
|
79
|
+
const S = o(p, l[p]);
|
|
80
|
+
return f.push(...S), f;
|
|
76
81
|
}, []);
|
|
77
82
|
}
|
|
78
|
-
function
|
|
83
|
+
function y(l, s) {
|
|
79
84
|
if (n.has(l.operator)) {
|
|
80
|
-
const
|
|
81
|
-
return
|
|
85
|
+
const f = n.get(l.operator);
|
|
86
|
+
return f && f(l.target, l.param, l.value, s) || !1;
|
|
82
87
|
}
|
|
83
88
|
return !1;
|
|
84
89
|
}
|
|
85
|
-
function
|
|
86
|
-
return
|
|
90
|
+
function b(l, s) {
|
|
91
|
+
return h(l).reduce((S, M) => S && y(M, s), !0);
|
|
87
92
|
}
|
|
88
|
-
function
|
|
89
|
-
const
|
|
90
|
-
return
|
|
93
|
+
function w(l, s) {
|
|
94
|
+
const f = Object.keys(l), p = f.includes("allOf"), S = f.includes("anyOf"), M = p || S, O = (M ? l[M ? p ? "allOf" : "anyOf" : "allOf"] : [l]).map((d) => b(d, s));
|
|
95
|
+
return p ? !O.includes(!1) : O.includes(!0);
|
|
91
96
|
}
|
|
92
|
-
return { parseValueSchema:
|
|
97
|
+
return { parseValueSchema: w };
|
|
93
98
|
}
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
function
|
|
97
|
-
return
|
|
98
|
-
const
|
|
99
|
-
return Object.assign(
|
|
99
|
+
const ie = {}, ce = {};
|
|
100
|
+
ue();
|
|
101
|
+
function fe(a, e, t = /* @__PURE__ */ new Map(), n = (y, b, w, l) => b, o = {}, h = (y) => y) {
|
|
102
|
+
return K[e.title] = e, x[e.title] = n, ie[e.title] = o, ce[e.title] = h, (y = {}) => {
|
|
103
|
+
const b = se(y, e, t), w = Object.keys(a).reduce((l, s) => (l[s] = a[s].default, l), {});
|
|
104
|
+
return Object.assign(w, b);
|
|
100
105
|
};
|
|
101
106
|
}
|
|
102
|
-
function
|
|
107
|
+
function pe(a, e) {
|
|
103
108
|
return { customClass: e.class, customStyle: e.style };
|
|
104
109
|
}
|
|
105
110
|
const de = /* @__PURE__ */ new Map([
|
|
106
|
-
["appearance",
|
|
111
|
+
["appearance", pe]
|
|
107
112
|
]);
|
|
108
|
-
function
|
|
113
|
+
function ve(a, e, t) {
|
|
109
114
|
return e;
|
|
110
115
|
}
|
|
111
|
-
const
|
|
116
|
+
const me = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-design.gitee.io/rate.schema.json", ye = "rate", he = "A Farris Component", be = "object", Se = {
|
|
112
117
|
id: {
|
|
113
118
|
description: "The unique identifier for rate",
|
|
114
119
|
type: "string"
|
|
@@ -170,23 +175,23 @@ const ve = "https://json-schema.org/draft/2020-12/schema", me = "https://farris-
|
|
|
170
175
|
type: "boolean",
|
|
171
176
|
default: !0
|
|
172
177
|
}
|
|
173
|
-
},
|
|
178
|
+
}, Me = [
|
|
174
179
|
"id",
|
|
175
180
|
"type"
|
|
176
|
-
],
|
|
181
|
+
], Oe = [
|
|
177
182
|
"id",
|
|
178
183
|
"appearance",
|
|
179
184
|
"binding"
|
|
180
|
-
],
|
|
181
|
-
$schema:
|
|
182
|
-
$id:
|
|
183
|
-
title:
|
|
184
|
-
description:
|
|
185
|
+
], Te = {
|
|
186
|
+
$schema: me,
|
|
187
|
+
$id: ge,
|
|
188
|
+
title: ye,
|
|
189
|
+
description: he,
|
|
185
190
|
type: be,
|
|
186
|
-
properties:
|
|
187
|
-
required:
|
|
188
|
-
ignore:
|
|
189
|
-
},
|
|
191
|
+
properties: Se,
|
|
192
|
+
required: Me,
|
|
193
|
+
ignore: Oe
|
|
194
|
+
}, ke = "rate", De = "A Farris Component", je = "object", Ne = {
|
|
190
195
|
basic: {
|
|
191
196
|
description: "Basic Infomation",
|
|
192
197
|
title: "基本信息",
|
|
@@ -208,12 +213,12 @@ const ve = "https://json-schema.org/draft/2020-12/schema", me = "https://farris-
|
|
|
208
213
|
}
|
|
209
214
|
}
|
|
210
215
|
}
|
|
211
|
-
},
|
|
212
|
-
title:
|
|
213
|
-
description:
|
|
214
|
-
type:
|
|
216
|
+
}, Ve = {
|
|
217
|
+
title: ke,
|
|
218
|
+
description: De,
|
|
219
|
+
type: je,
|
|
215
220
|
categories: Ne
|
|
216
|
-
},
|
|
221
|
+
}, Re = ["很不满意", "不满意", "一般", "满意", "非常满意"], Q = {
|
|
217
222
|
/** 星星大小 */
|
|
218
223
|
size: { type: String, default: "large" },
|
|
219
224
|
/** 启用半颗星模式 */
|
|
@@ -235,7 +240,7 @@ const ve = "https://json-schema.org/draft/2020-12/schema", me = "https://farris-
|
|
|
235
240
|
/** 禁用单个星星的文字提示 */
|
|
236
241
|
toolTipDisabled: { type: Boolean, default: !0 },
|
|
237
242
|
/** 默认的满意度文案 */
|
|
238
|
-
toolTipContents: { type: Array, default:
|
|
243
|
+
toolTipContents: { type: Array, default: Re },
|
|
239
244
|
/** 启用评分 */
|
|
240
245
|
enableScore: { type: Boolean, default: !0 },
|
|
241
246
|
/** 启用满意度 */
|
|
@@ -245,32 +250,32 @@ const ve = "https://json-schema.org/draft/2020-12/schema", me = "https://farris-
|
|
|
245
250
|
*/
|
|
246
251
|
value: { type: Number, default: 0 },
|
|
247
252
|
modelValue: { type: Number, default: 0 }
|
|
248
|
-
}, ee =
|
|
253
|
+
}, ee = fe(Q, Te, de, ve, Ve), H = /* @__PURE__ */ Z({
|
|
249
254
|
name: "FRate",
|
|
250
|
-
props:
|
|
255
|
+
props: Q,
|
|
251
256
|
emits: ["selectedValue", "update:modelValue"],
|
|
252
|
-
setup(
|
|
253
|
-
const
|
|
257
|
+
setup(a, e) {
|
|
258
|
+
const t = r(a.size), n = r(a.enableHalf), o = r(a.enableClear), h = r(a.disabled), y = r(a.pointSystem), b = r(a.lightColor), w = r(a.darkColor), l = r(a.iconClass), s = r(a.numOfStar), f = r(a.toolTipDisabled), p = r(a.toolTipContents), S = r(a.enableScore), M = r(a.enableSatisfaction);
|
|
254
259
|
let v;
|
|
255
|
-
const T = r(0), O = r(0), k = r(0),
|
|
256
|
-
let
|
|
257
|
-
const
|
|
258
|
-
|
|
260
|
+
const T = r(0), O = r(0), k = r(0), d = r(a.modelValue);
|
|
261
|
+
let D = 1, u, g, m;
|
|
262
|
+
const j = 4;
|
|
263
|
+
G(() => {
|
|
259
264
|
});
|
|
260
|
-
function
|
|
261
|
-
const
|
|
262
|
-
|
|
263
|
-
for (let
|
|
264
|
-
|
|
265
|
-
id:
|
|
265
|
+
function P() {
|
|
266
|
+
const c = s.value;
|
|
267
|
+
m = [];
|
|
268
|
+
for (let V = 1; V <= c; V++)
|
|
269
|
+
m.push({
|
|
270
|
+
id: V
|
|
266
271
|
});
|
|
267
272
|
}
|
|
268
|
-
function
|
|
269
|
-
let
|
|
270
|
-
n.value ?
|
|
273
|
+
function $() {
|
|
274
|
+
let c;
|
|
275
|
+
n.value ? c = Math.ceil(d.value / D) : c = d.value, O.value = (v * d.value + Math.floor(d.value) * j) / D, u = p.value[c - 1];
|
|
271
276
|
}
|
|
272
|
-
function
|
|
273
|
-
switch (
|
|
277
|
+
function F() {
|
|
278
|
+
switch (t.value) {
|
|
274
279
|
case "small":
|
|
275
280
|
v = 14;
|
|
276
281
|
break;
|
|
@@ -284,214 +289,213 @@ const ve = "https://json-schema.org/draft/2020-12/schema", me = "https://farris-
|
|
|
284
289
|
v = 24;
|
|
285
290
|
break;
|
|
286
291
|
}
|
|
287
|
-
|
|
292
|
+
P(), s.value && (D = y.value / s.value), d.value && $();
|
|
288
293
|
}
|
|
289
|
-
|
|
290
|
-
function
|
|
291
|
-
return
|
|
294
|
+
F();
|
|
295
|
+
function q(c) {
|
|
296
|
+
return c.className.indexOf("f-icon") !== -1;
|
|
292
297
|
}
|
|
293
|
-
function
|
|
294
|
-
return T.value === O.value && o.value && O.value !== 0 ? (O.value = 0,
|
|
298
|
+
function z() {
|
|
299
|
+
return T.value === O.value && o.value && O.value !== 0 ? (O.value = 0, d.value = 0, g = null, T.value = 0, k.value = 0, e.emit("selectedValue", d.value), e.emit("update:modelValue", d.value), !0) : !1;
|
|
295
300
|
}
|
|
296
|
-
function
|
|
297
|
-
if (
|
|
298
|
-
if (
|
|
301
|
+
function X(c, V, i) {
|
|
302
|
+
if (c.movementX || c.movementY) {
|
|
303
|
+
if (h.value)
|
|
299
304
|
return;
|
|
300
|
-
M.value && (
|
|
305
|
+
M.value && (u = p.value[V - 1]), c.offsetX < v / 2 && n.value === !0 ? (T.value = v * V - v / 2 + j * (V - 1), k.value = D * V - D / 2) : (T.value = v * V + j * (V - 1), k.value = D * V);
|
|
301
306
|
}
|
|
302
|
-
if (
|
|
303
|
-
if (
|
|
307
|
+
if (i === !0) {
|
|
308
|
+
if (z())
|
|
304
309
|
return;
|
|
305
|
-
|
|
310
|
+
d.value = k.value, O.value = T.value, g = u, e.emit("update:modelValue", d.value), e.emit("selectedValue", d.value);
|
|
306
311
|
}
|
|
307
312
|
}
|
|
308
|
-
function
|
|
309
|
-
var
|
|
310
|
-
if (
|
|
311
|
-
const
|
|
312
|
-
|
|
313
|
+
function L(c, V) {
|
|
314
|
+
var i;
|
|
315
|
+
if (q(c.target) && c.target) {
|
|
316
|
+
const R = parseInt((i = c.target) == null ? void 0 : i.id);
|
|
317
|
+
X(c, R, V);
|
|
313
318
|
}
|
|
314
319
|
}
|
|
315
|
-
const
|
|
320
|
+
const _ = W(() => k.value ? k.value + "分" : d.value + "分"), C = W(() => ({
|
|
316
321
|
width: (T.value || O.value) + "px"
|
|
317
322
|
}));
|
|
318
|
-
function
|
|
323
|
+
function A() {
|
|
319
324
|
T.value = 0;
|
|
320
325
|
}
|
|
321
|
-
return
|
|
322
|
-
|
|
323
|
-
}), () =>
|
|
326
|
+
return ae(() => a.modelValue, (c) => {
|
|
327
|
+
d.value = c, $();
|
|
328
|
+
}), () => N("div", {
|
|
324
329
|
class: "farris-star-rating",
|
|
325
|
-
onMouseover:
|
|
326
|
-
onMousemove:
|
|
327
|
-
onMouseleave:
|
|
328
|
-
onClick:
|
|
329
|
-
}, [
|
|
330
|
+
onMouseover: E((c) => L(c, !1), ["prevent"]),
|
|
331
|
+
onMousemove: E((c) => L(c, !1), ["prevent"]),
|
|
332
|
+
onMouseleave: E((c) => A(), ["prevent"]),
|
|
333
|
+
onClick: E((c) => L(c, !0), ["prevent"])
|
|
334
|
+
}, [N("div", {
|
|
330
335
|
class: "star-light-area",
|
|
331
|
-
style:
|
|
332
|
-
}, [
|
|
336
|
+
style: C.value
|
|
337
|
+
}, [m.map((c) => N("span", {
|
|
333
338
|
class: ["f-icon default-light-color ", l.value, {
|
|
334
|
-
"f-star-sm":
|
|
339
|
+
"f-star-sm": t.value === "small"
|
|
335
340
|
}, {
|
|
336
|
-
"f-star-md":
|
|
341
|
+
"f-star-md": t.value === "middle"
|
|
337
342
|
}, {
|
|
338
|
-
"f-star-lg":
|
|
343
|
+
"f-star-lg": t.value === "large"
|
|
339
344
|
}, {
|
|
340
|
-
"f-star-exlarge":
|
|
345
|
+
"f-star-exlarge": t.value === "extraLarge"
|
|
341
346
|
}, {
|
|
342
|
-
disabled:
|
|
347
|
+
disabled: f.value
|
|
343
348
|
}],
|
|
344
|
-
id:
|
|
349
|
+
id: c.id,
|
|
345
350
|
style: {
|
|
346
|
-
color:
|
|
351
|
+
color: b.value
|
|
347
352
|
}
|
|
348
|
-
}, null))]),
|
|
353
|
+
}, null))]), N("div", {
|
|
349
354
|
class: ["star-dark-area", {
|
|
350
|
-
small:
|
|
355
|
+
small: t.value === "small"
|
|
351
356
|
}, {
|
|
352
|
-
middle:
|
|
357
|
+
middle: t.value === "middle"
|
|
353
358
|
}, {
|
|
354
|
-
large:
|
|
359
|
+
large: t.value === "large"
|
|
355
360
|
}]
|
|
356
|
-
}, [
|
|
361
|
+
}, [m.map((c) => N("span", {
|
|
357
362
|
class: ["f-icon default-dark-color", l.value, {
|
|
358
|
-
"f-star-sm":
|
|
363
|
+
"f-star-sm": t.value === "small"
|
|
359
364
|
}, {
|
|
360
|
-
"f-star-md":
|
|
365
|
+
"f-star-md": t.value === "middle"
|
|
361
366
|
}, {
|
|
362
|
-
"f-star-lg":
|
|
367
|
+
"f-star-lg": t.value === "large"
|
|
363
368
|
}, {
|
|
364
|
-
"f-star-exlarge":
|
|
369
|
+
"f-star-exlarge": t.value === "extraLarge"
|
|
365
370
|
}],
|
|
366
|
-
id:
|
|
371
|
+
id: c.id,
|
|
367
372
|
style: {
|
|
368
|
-
color:
|
|
373
|
+
color: w.value
|
|
369
374
|
}
|
|
370
|
-
}, null))]),
|
|
375
|
+
}, null))]), N("div", {
|
|
371
376
|
class: ["f-utils-fill", {
|
|
372
|
-
"font-small":
|
|
377
|
+
"font-small": t.value === "small"
|
|
373
378
|
}, {
|
|
374
|
-
"font-middle":
|
|
379
|
+
"font-middle": t.value === "middle"
|
|
375
380
|
}, {
|
|
376
|
-
"font-large":
|
|
381
|
+
"font-large": t.value === "large"
|
|
377
382
|
}, {
|
|
378
|
-
"font-exlarge":
|
|
383
|
+
"font-exlarge": t.value === "extraLarge"
|
|
379
384
|
}]
|
|
380
|
-
}, [S.value &&
|
|
385
|
+
}, [S.value && N("span", null, [B(" "), _.value, B(" ")]), M.value && (g || u) && N("span", null, [B(" "), u || g])])]);
|
|
381
386
|
}
|
|
382
387
|
});
|
|
383
|
-
function we(
|
|
384
|
-
var
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
const o = "", b = "", m = r();
|
|
388
|
-
function h() {
|
|
388
|
+
function we(a, e, t) {
|
|
389
|
+
var D;
|
|
390
|
+
const n = "", o = "", h = r();
|
|
391
|
+
function y() {
|
|
389
392
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
390
393
|
}
|
|
391
|
-
function
|
|
394
|
+
function b() {
|
|
392
395
|
return !1;
|
|
393
396
|
}
|
|
394
|
-
function
|
|
397
|
+
function w() {
|
|
395
398
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
396
399
|
}
|
|
397
|
-
function
|
|
400
|
+
function l() {
|
|
398
401
|
return (e == null ? void 0 : e.schema.componentType) === "frame";
|
|
399
402
|
}
|
|
400
|
-
function
|
|
401
|
-
if (!
|
|
403
|
+
function s(u) {
|
|
404
|
+
if (!u || !u.value)
|
|
402
405
|
return null;
|
|
403
|
-
if (
|
|
404
|
-
return
|
|
405
|
-
const g = r(
|
|
406
|
-
return
|
|
406
|
+
if (u.value.schema && u.value.schema.type === "component")
|
|
407
|
+
return u.value;
|
|
408
|
+
const g = r(u == null ? void 0 : u.value.parent), m = s(g);
|
|
409
|
+
return m || null;
|
|
407
410
|
}
|
|
408
|
-
function f(
|
|
409
|
-
const { componentInstance: g, designerItemElementRef:
|
|
410
|
-
return !g || !g.value ? null : g.value.canMove ?
|
|
411
|
+
function f(u = e) {
|
|
412
|
+
const { componentInstance: g, designerItemElementRef: m } = u;
|
|
413
|
+
return !g || !g.value ? null : g.value.canMove ? m : f(u.parent);
|
|
411
414
|
}
|
|
412
|
-
function
|
|
413
|
-
return !!
|
|
415
|
+
function p(u) {
|
|
416
|
+
return !!t;
|
|
414
417
|
}
|
|
415
|
-
function
|
|
418
|
+
function S() {
|
|
416
419
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
417
420
|
}
|
|
418
|
-
function
|
|
421
|
+
function M() {
|
|
419
422
|
}
|
|
420
|
-
function
|
|
423
|
+
function v(u, g) {
|
|
421
424
|
}
|
|
422
|
-
function
|
|
423
|
-
const { componentType:
|
|
424
|
-
let
|
|
425
|
-
const P =
|
|
426
|
-
return
|
|
425
|
+
function T(u, g) {
|
|
426
|
+
const { componentType: m } = u;
|
|
427
|
+
let j = I(m, u, g);
|
|
428
|
+
const P = m.toLowerCase().replace(/-/g, "_");
|
|
429
|
+
return j && !j.id && j.type === m && (j.id = `${P}_${Math.random().toString().slice(2, 6)}`), j;
|
|
427
430
|
}
|
|
428
|
-
function
|
|
429
|
-
const y = String(c.getAttribute("data-controltype")), C = c.getAttribute("data-feature"), P = C ? JSON.parse(C) : {};
|
|
430
|
-
P.parentComponentInstance = m.value;
|
|
431
|
-
let A = G(y, P);
|
|
432
|
-
const $ = y.toLowerCase().replace("-", "_");
|
|
433
|
-
return A && !A.id && A.type === y && (A.id = `${$}_${Math.random().toString().slice(2, 6)}`), A;
|
|
431
|
+
function O(u) {
|
|
434
432
|
}
|
|
435
|
-
function
|
|
433
|
+
function k(...u) {
|
|
436
434
|
}
|
|
437
|
-
function
|
|
435
|
+
function d() {
|
|
436
|
+
e != null && e.schema.contents && e.schema.contents.map((u) => {
|
|
437
|
+
var j;
|
|
438
|
+
let g = u.id;
|
|
439
|
+
u.type === "component-ref" && (g = u.component);
|
|
440
|
+
const m = a.value.querySelector(`#${g}-design-item`);
|
|
441
|
+
(j = m == null ? void 0 : m.componentInstance) != null && j.value.onRemoveComponent && m.componentInstance.value.onRemoveComponent();
|
|
442
|
+
});
|
|
438
443
|
}
|
|
439
|
-
return
|
|
440
|
-
canMove:
|
|
441
|
-
canSelectParent:
|
|
442
|
-
canDelete:
|
|
443
|
-
canNested: !
|
|
444
|
+
return h.value = {
|
|
445
|
+
canMove: y(),
|
|
446
|
+
canSelectParent: b(),
|
|
447
|
+
canDelete: w(),
|
|
448
|
+
canNested: !l(),
|
|
444
449
|
contents: e == null ? void 0 : e.schema.contents,
|
|
445
|
-
elementRef:
|
|
446
|
-
parent: (
|
|
450
|
+
elementRef: a,
|
|
451
|
+
parent: (D = e == null ? void 0 : e.parent) == null ? void 0 : D.componentInstance,
|
|
447
452
|
schema: e == null ? void 0 : e.schema,
|
|
448
|
-
styles:
|
|
449
|
-
designerClass:
|
|
450
|
-
canAccepts:
|
|
451
|
-
getBelongedComponentInstance:
|
|
453
|
+
styles: n,
|
|
454
|
+
designerClass: o,
|
|
455
|
+
canAccepts: p,
|
|
456
|
+
getBelongedComponentInstance: s,
|
|
452
457
|
getDraggableDesignItemElement: f,
|
|
453
|
-
getDraggingDisplayText:
|
|
454
|
-
getPropConfig:
|
|
455
|
-
getDragScopeElement:
|
|
456
|
-
onAcceptMovedChildElement:
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
addNewChildComponentSchema: O,
|
|
460
|
-
updateDragAndDropRules: n,
|
|
458
|
+
getDraggingDisplayText: S,
|
|
459
|
+
getPropConfig: k,
|
|
460
|
+
getDragScopeElement: M,
|
|
461
|
+
onAcceptMovedChildElement: v,
|
|
462
|
+
onChildElementMovedOut: O,
|
|
463
|
+
addNewChildComponentSchema: T,
|
|
461
464
|
triggerBelongedComponentToMoveWhenMoved: r(!1),
|
|
462
|
-
triggerBelongedComponentToDeleteWhenDeleted: r(!1)
|
|
463
|
-
|
|
465
|
+
triggerBelongedComponentToDeleteWhenDeleted: r(!1),
|
|
466
|
+
onRemoveComponent: d
|
|
467
|
+
}, h;
|
|
464
468
|
}
|
|
465
|
-
const
|
|
469
|
+
const Ee = /* @__PURE__ */ Z({
|
|
466
470
|
name: "FRateDesign",
|
|
467
|
-
props:
|
|
471
|
+
props: Q,
|
|
468
472
|
emits: ["selectedValue"],
|
|
469
|
-
setup(
|
|
470
|
-
const
|
|
473
|
+
setup(a, e) {
|
|
474
|
+
const t = r(a.size), n = r(a.enableHalf), o = r(a.enableClear), h = r(a.disabled), y = r(a.pointSystem), b = r(a.lightColor), w = r(a.darkColor), l = r(a.iconClass), s = r(a.numOfStar), f = r(a.toolTipDisabled), p = r(a.toolTipContents), S = r(a.enableScore), M = r(a.enableSatisfaction);
|
|
471
475
|
let v;
|
|
472
476
|
const T = r(1);
|
|
473
477
|
let O = 0;
|
|
474
|
-
const k = r(0),
|
|
475
|
-
let
|
|
476
|
-
const
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
}), e.expose(
|
|
478
|
+
const k = r(0), d = r(0);
|
|
479
|
+
let D = 1, u, g, m;
|
|
480
|
+
const j = 4, P = r(), $ = te("design-item-context"), F = we(P, $);
|
|
481
|
+
G(() => {
|
|
482
|
+
P.value.componentInstance = F;
|
|
483
|
+
}), e.expose(F.value), G(() => {
|
|
480
484
|
});
|
|
481
|
-
function
|
|
482
|
-
const
|
|
483
|
-
|
|
484
|
-
for (let
|
|
485
|
-
|
|
486
|
-
id:
|
|
485
|
+
function q() {
|
|
486
|
+
const i = s.value;
|
|
487
|
+
m = [];
|
|
488
|
+
for (let R = 1; R <= i; R++)
|
|
489
|
+
m.push({
|
|
490
|
+
id: R
|
|
487
491
|
});
|
|
488
492
|
}
|
|
489
|
-
function
|
|
490
|
-
let
|
|
491
|
-
n.value ?
|
|
493
|
+
function z() {
|
|
494
|
+
let i;
|
|
495
|
+
n.value ? i = Math.ceil(d.value / D) : i = d.value, O = (v * d.value + Math.floor(d.value) * j) / D, u = p.value[i - 1];
|
|
492
496
|
}
|
|
493
|
-
function
|
|
494
|
-
switch (
|
|
497
|
+
function X() {
|
|
498
|
+
switch (t.value) {
|
|
495
499
|
case "small":
|
|
496
500
|
v = 14;
|
|
497
501
|
break;
|
|
@@ -505,112 +509,107 @@ const Ce = /* @__PURE__ */ K({
|
|
|
505
509
|
v = 24;
|
|
506
510
|
break;
|
|
507
511
|
}
|
|
508
|
-
|
|
512
|
+
q(), s.value && (D = y.value / s.value), d.value && z();
|
|
509
513
|
}
|
|
510
|
-
|
|
511
|
-
function
|
|
512
|
-
return
|
|
514
|
+
X();
|
|
515
|
+
function L(i) {
|
|
516
|
+
return i.className.indexOf("f-icon") !== -1;
|
|
513
517
|
}
|
|
514
|
-
function
|
|
515
|
-
return T.value === O && o && O !== 0 ? (O = 0,
|
|
518
|
+
function _() {
|
|
519
|
+
return T.value === O && o && O !== 0 ? (O = 0, d.value = 0, g = null, T.value = 0, k.value = 0, e.emit("selectedValue", d.value), !0) : !1;
|
|
516
520
|
}
|
|
517
|
-
function
|
|
518
|
-
if (
|
|
519
|
-
if (
|
|
521
|
+
function C(i, R, Y) {
|
|
522
|
+
if (i.movementX || i.movementY) {
|
|
523
|
+
if (h.value)
|
|
520
524
|
return;
|
|
521
|
-
M.value && (
|
|
525
|
+
M.value && (u = p.value[R - 1]), i.offsetX < v / 2 && n.value === !0 ? (T.value = v * R - v / 2 + j * (R - 1), k.value = D * R - D / 2) : (T.value = v * R + j * (R - 1), k.value = D * R);
|
|
522
526
|
}
|
|
523
527
|
if (Y === !0) {
|
|
524
|
-
if (
|
|
528
|
+
if (_())
|
|
525
529
|
return;
|
|
526
|
-
|
|
530
|
+
d.value = k.value, O = T.value, g = u, e.emit("selectedValue", d.value);
|
|
527
531
|
}
|
|
528
532
|
}
|
|
529
|
-
function
|
|
530
|
-
if (
|
|
531
|
-
const Y = parseInt(
|
|
532
|
-
|
|
533
|
+
function A(i, R) {
|
|
534
|
+
if (L(i.target) && i.target) {
|
|
535
|
+
const Y = parseInt(i.target.id);
|
|
536
|
+
C(i, Y, R);
|
|
533
537
|
}
|
|
534
538
|
}
|
|
535
|
-
const
|
|
539
|
+
const c = W(() => k.value ? k.value + "分" : d.value + "分"), V = W(() => ({
|
|
536
540
|
width: (T.value || O) + "px"
|
|
537
541
|
}));
|
|
538
|
-
return () =>
|
|
542
|
+
return () => N("div", {
|
|
539
543
|
class: "farris-star-rating",
|
|
540
|
-
ref:
|
|
541
|
-
onMouseover:
|
|
542
|
-
onMousemove:
|
|
543
|
-
onMouseout:
|
|
544
|
-
onClick:
|
|
545
|
-
}, [
|
|
544
|
+
ref: P,
|
|
545
|
+
onMouseover: E((i) => A(i, !1), ["prevent"]),
|
|
546
|
+
onMousemove: E((i) => A(i, !1), ["prevent"]),
|
|
547
|
+
onMouseout: E((i) => A(i, !1), ["prevent"]),
|
|
548
|
+
onClick: E((i) => A(i, !0), ["prevent"])
|
|
549
|
+
}, [N("div", {
|
|
546
550
|
class: "star-light-area",
|
|
547
|
-
style:
|
|
548
|
-
}, [
|
|
551
|
+
style: V.value
|
|
552
|
+
}, [m.map((i) => N("span", {
|
|
549
553
|
class: ["f-icon default-light-color ", l.value, {
|
|
550
|
-
"f-star-sm":
|
|
554
|
+
"f-star-sm": t.value === "small"
|
|
551
555
|
}, {
|
|
552
|
-
"f-star-md":
|
|
556
|
+
"f-star-md": t.value === "middle"
|
|
553
557
|
}, {
|
|
554
|
-
"f-star-lg":
|
|
558
|
+
"f-star-lg": t.value === "large"
|
|
555
559
|
}, {
|
|
556
|
-
"f-star-exlarge":
|
|
560
|
+
"f-star-exlarge": t.value === "extraLarge"
|
|
557
561
|
}, {
|
|
558
|
-
disabled:
|
|
562
|
+
disabled: f.value
|
|
559
563
|
}],
|
|
560
|
-
id:
|
|
564
|
+
id: i.id,
|
|
561
565
|
style: {
|
|
562
|
-
color:
|
|
566
|
+
color: b.value
|
|
563
567
|
}
|
|
564
|
-
}, null))]),
|
|
568
|
+
}, null))]), N("div", {
|
|
565
569
|
class: ["star-dark-area", {
|
|
566
|
-
small:
|
|
570
|
+
small: t.value === "small"
|
|
567
571
|
}, {
|
|
568
|
-
middle:
|
|
572
|
+
middle: t.value === "middle"
|
|
569
573
|
}, {
|
|
570
|
-
large:
|
|
574
|
+
large: t.value === "large"
|
|
571
575
|
}]
|
|
572
|
-
}, [
|
|
576
|
+
}, [m.map((i) => N("span", {
|
|
573
577
|
class: ["f-icon default-dark-color", l.value, {
|
|
574
|
-
"f-star-sm":
|
|
578
|
+
"f-star-sm": t.value === "small"
|
|
575
579
|
}, {
|
|
576
|
-
"f-star-md":
|
|
580
|
+
"f-star-md": t.value === "middle"
|
|
577
581
|
}, {
|
|
578
|
-
"f-star-lg":
|
|
582
|
+
"f-star-lg": t.value === "large"
|
|
579
583
|
}, {
|
|
580
|
-
"f-star-exlarge":
|
|
584
|
+
"f-star-exlarge": t.value === "extraLarge"
|
|
581
585
|
}],
|
|
582
|
-
id:
|
|
586
|
+
id: i.id,
|
|
583
587
|
style: {
|
|
584
|
-
color:
|
|
588
|
+
color: w.value
|
|
585
589
|
}
|
|
586
|
-
}, null))]),
|
|
590
|
+
}, null))]), N("div", {
|
|
587
591
|
class: ["f-utils-fill", {
|
|
588
|
-
"font-small":
|
|
592
|
+
"font-small": t.value === "small"
|
|
589
593
|
}, {
|
|
590
|
-
"font-middle":
|
|
594
|
+
"font-middle": t.value === "middle"
|
|
591
595
|
}, {
|
|
592
|
-
"font-large":
|
|
596
|
+
"font-large": t.value === "large"
|
|
593
597
|
}, {
|
|
594
|
-
"font-exlarge":
|
|
598
|
+
"font-exlarge": t.value === "extraLarge"
|
|
595
599
|
}]
|
|
596
|
-
}, [S.value &&
|
|
600
|
+
}, [S.value && N("span", null, [B(" "), c.value, B(" ")]), M.value && (g || u) && N("span", null, [B(" "), u || g])])]);
|
|
597
601
|
}
|
|
598
|
-
})
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
a.component(e.name, t);
|
|
602
|
-
}, t;
|
|
603
|
-
};
|
|
604
|
-
z.register = (t, e, a, n) => {
|
|
605
|
-
t.rate = z, e.rate = ee;
|
|
602
|
+
});
|
|
603
|
+
H.register = (a, e, t, n) => {
|
|
604
|
+
a.rate = H, e.rate = ee;
|
|
606
605
|
};
|
|
607
|
-
|
|
608
|
-
|
|
606
|
+
H.registerDesigner = (a, e, t) => {
|
|
607
|
+
a.rate = Ee, e.rate = ee;
|
|
609
608
|
};
|
|
610
|
-
const
|
|
609
|
+
const Le = re(H);
|
|
611
610
|
export {
|
|
612
|
-
|
|
613
|
-
|
|
611
|
+
H as FRate,
|
|
612
|
+
Le as default,
|
|
614
613
|
ee as propsResolver,
|
|
615
|
-
|
|
614
|
+
Q as rateProps
|
|
616
615
|
};
|