@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,27 +1,31 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { isPlainObject as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as w, ref as m, computed as j, watch as S, createVNode as v, Fragment as _, inject as X, onMounted as U, resolveComponent as W } from "vue";
|
|
2
|
+
import C from "../button-edit/index.esm.js";
|
|
3
|
+
import { isPlainObject as N, cloneDeep as z } from "lodash-es";
|
|
4
|
+
import G from "../list-view/index.esm.js";
|
|
5
|
+
import J from "../loading/index.esm.js";
|
|
6
|
+
const $ = {}, H = {};
|
|
7
7
|
function M(t) {
|
|
8
|
-
const { properties: e, title:
|
|
9
|
-
|
|
8
|
+
const { properties: e, title: i, ignore: o } = t, l = o && Array.isArray(o), d = Object.keys(e).reduce((p, s) => ((!l || !o.find((g) => g === s)) && (p[s] = e[s].type === "object" && e[s].properties ? M(e[s]) : z(e[s].default)), p), {});
|
|
9
|
+
if (i && (!l || !o.find((p) => p === "id"))) {
|
|
10
|
+
const p = i.toLowerCase().replace(/-/g, "_");
|
|
11
|
+
d.id = `${p}_${Math.random().toString().slice(2, 6)}`;
|
|
12
|
+
}
|
|
13
|
+
return d;
|
|
10
14
|
}
|
|
11
|
-
function
|
|
12
|
-
const o =
|
|
15
|
+
function T(t, e = {}, i) {
|
|
16
|
+
const o = $[t];
|
|
13
17
|
if (o) {
|
|
14
18
|
let l = M(o);
|
|
15
19
|
const d = H[t];
|
|
16
|
-
return l = d ? d({ getSchemaByType:
|
|
20
|
+
return l = d ? d({ getSchemaByType: T }, l, e, i) : l, l;
|
|
17
21
|
}
|
|
18
22
|
return null;
|
|
19
23
|
}
|
|
20
|
-
function
|
|
21
|
-
const
|
|
22
|
-
return Object.keys(
|
|
24
|
+
function Q(t, e) {
|
|
25
|
+
const i = M(e);
|
|
26
|
+
return Object.keys(i).reduce((o, l) => (o[l] && N(o[l]) && N(t[l] || !t[l]) ? Object.assign(o[l], t[l] || {}) : o[l] = t[l], o), i), i;
|
|
23
27
|
}
|
|
24
|
-
function
|
|
28
|
+
function Y(t, e) {
|
|
25
29
|
return Object.keys(t).filter((o) => t[o] != null).reduce((o, l) => {
|
|
26
30
|
if (e.has(l)) {
|
|
27
31
|
const d = e.get(l);
|
|
@@ -36,52 +40,52 @@ function K(t, e) {
|
|
|
36
40
|
return o;
|
|
37
41
|
}, {});
|
|
38
42
|
}
|
|
39
|
-
function
|
|
40
|
-
const o =
|
|
41
|
-
return
|
|
43
|
+
function Z(t, e, i = /* @__PURE__ */ new Map()) {
|
|
44
|
+
const o = Q(t, e);
|
|
45
|
+
return Y(o, i);
|
|
42
46
|
}
|
|
43
|
-
function
|
|
44
|
-
function e(a, n,
|
|
45
|
-
if (typeof
|
|
46
|
-
return
|
|
47
|
-
if (typeof
|
|
48
|
-
const r = Object.keys(
|
|
47
|
+
function x(t = {}) {
|
|
48
|
+
function e(a, n, c, u) {
|
|
49
|
+
if (typeof c == "number")
|
|
50
|
+
return u[a].length === c;
|
|
51
|
+
if (typeof c == "object") {
|
|
52
|
+
const r = Object.keys(c)[0], f = c[r];
|
|
49
53
|
if (r === "not")
|
|
50
|
-
return Number(
|
|
54
|
+
return Number(u[a].length) !== Number(f);
|
|
51
55
|
if (r === "moreThan")
|
|
52
|
-
return Number(
|
|
56
|
+
return Number(u[a].length) >= Number(f);
|
|
53
57
|
if (r === "lessThan")
|
|
54
|
-
return Number(
|
|
58
|
+
return Number(u[a].length) <= Number(f);
|
|
55
59
|
}
|
|
56
60
|
return !1;
|
|
57
61
|
}
|
|
58
|
-
function
|
|
59
|
-
return
|
|
62
|
+
function i(a, n, c, u) {
|
|
63
|
+
return u[a] && u[a].propertyValue && String(u[a].propertyValue.value) === String(c);
|
|
60
64
|
}
|
|
61
65
|
const o = /* @__PURE__ */ new Map([
|
|
62
66
|
["length", e],
|
|
63
|
-
["getProperty",
|
|
67
|
+
["getProperty", i]
|
|
64
68
|
]);
|
|
65
69
|
Object.keys(t).reduce((a, n) => (a.set(n, t[n]), a), o);
|
|
66
70
|
function l(a, n) {
|
|
67
|
-
const
|
|
68
|
-
return typeof n == "number" ? [{ target:
|
|
69
|
-
if (
|
|
70
|
-
return { target:
|
|
71
|
-
const r =
|
|
72
|
-
return { target:
|
|
71
|
+
const c = a;
|
|
72
|
+
return typeof n == "number" ? [{ target: c, operator: "length", param: null, value: Number(n) }] : typeof n == "boolean" ? [{ target: c, operator: "getProperty", param: a, value: !!n }] : typeof n == "object" ? Object.keys(n).map((u) => {
|
|
73
|
+
if (u === "length")
|
|
74
|
+
return { target: c, operator: "length", param: null, value: n[u] };
|
|
75
|
+
const r = u, f = n[u];
|
|
76
|
+
return { target: c, operator: "getProperty", param: r, value: f };
|
|
73
77
|
}) : [];
|
|
74
78
|
}
|
|
75
79
|
function d(a) {
|
|
76
|
-
return Object.keys(a).reduce((
|
|
77
|
-
const r = l(
|
|
78
|
-
return
|
|
80
|
+
return Object.keys(a).reduce((c, u) => {
|
|
81
|
+
const r = l(u, a[u]);
|
|
82
|
+
return c.push(...r), c;
|
|
79
83
|
}, []);
|
|
80
84
|
}
|
|
81
85
|
function p(a, n) {
|
|
82
86
|
if (o.has(a.operator)) {
|
|
83
|
-
const
|
|
84
|
-
return
|
|
87
|
+
const c = o.get(a.operator);
|
|
88
|
+
return c && c(a.target, a.param, a.value, n) || !1;
|
|
85
89
|
}
|
|
86
90
|
return !1;
|
|
87
91
|
}
|
|
@@ -89,25 +93,25 @@ function ee(t = {}) {
|
|
|
89
93
|
return d(a).reduce((r, f) => r && p(f, n), !0);
|
|
90
94
|
}
|
|
91
95
|
function g(a, n) {
|
|
92
|
-
const
|
|
93
|
-
return
|
|
96
|
+
const c = Object.keys(a), u = c.includes("allOf"), r = c.includes("anyOf"), f = u || r, F = (f ? a[f ? u ? "allOf" : "anyOf" : "allOf"] : [a]).map((R) => s(R, n));
|
|
97
|
+
return u ? !F.includes(!1) : F.includes(!0);
|
|
94
98
|
}
|
|
95
99
|
return { parseValueSchema: g };
|
|
96
100
|
}
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
function
|
|
100
|
-
return
|
|
101
|
-
const s =
|
|
101
|
+
const K = {}, I = {};
|
|
102
|
+
x();
|
|
103
|
+
function ee(t, e, i = /* @__PURE__ */ new Map(), o = (p, s, g, a) => s, l = {}, d = (p) => p) {
|
|
104
|
+
return $[e.title] = e, H[e.title] = o, K[e.title] = l, I[e.title] = d, (p = {}) => {
|
|
105
|
+
const s = Z(p, e, i), g = Object.keys(t).reduce((a, n) => (a[n] = t[n].default, a), {});
|
|
102
106
|
return Object.assign(g, s);
|
|
103
107
|
};
|
|
104
108
|
}
|
|
105
|
-
function
|
|
109
|
+
function te(t, e) {
|
|
106
110
|
return { customClass: e.class, customStyle: e.style };
|
|
107
111
|
}
|
|
108
|
-
const
|
|
109
|
-
["appearance",
|
|
110
|
-
]),
|
|
112
|
+
const ne = /* @__PURE__ */ new Map([
|
|
113
|
+
["appearance", te]
|
|
114
|
+
]), oe = "https://json-schema.org/draft/2020-12/schema", ae = "https://farris-design.gitee.io/search-box.schema.json", re = "search-box", le = "A Farris Component", ce = "object", ie = {
|
|
111
115
|
id: {
|
|
112
116
|
description: "The unique identifier for a search-box",
|
|
113
117
|
type: "string"
|
|
@@ -169,22 +173,22 @@ const re = /* @__PURE__ */ new Map([
|
|
|
169
173
|
type: "boolean",
|
|
170
174
|
default: !0
|
|
171
175
|
}
|
|
172
|
-
},
|
|
176
|
+
}, ue = [
|
|
173
177
|
"id",
|
|
174
178
|
"type"
|
|
175
|
-
],
|
|
176
|
-
$schema:
|
|
177
|
-
$id:
|
|
178
|
-
title:
|
|
179
|
-
description:
|
|
180
|
-
type:
|
|
181
|
-
properties:
|
|
182
|
-
required:
|
|
179
|
+
], se = {
|
|
180
|
+
$schema: oe,
|
|
181
|
+
$id: ae,
|
|
182
|
+
title: re,
|
|
183
|
+
description: le,
|
|
184
|
+
type: ce,
|
|
185
|
+
properties: ie,
|
|
186
|
+
required: ue
|
|
183
187
|
};
|
|
184
|
-
function
|
|
188
|
+
function fe(t, e, i) {
|
|
185
189
|
return e;
|
|
186
190
|
}
|
|
187
|
-
const
|
|
191
|
+
const pe = "search-box", de = "A Farris Component", he = "object", me = {
|
|
188
192
|
basic: {
|
|
189
193
|
description: "Basic Infomation",
|
|
190
194
|
title: "基本信息",
|
|
@@ -206,12 +210,12 @@ const me = "search-box", ge = "A Farris Component", ye = "object", be = {
|
|
|
206
210
|
}
|
|
207
211
|
}
|
|
208
212
|
}
|
|
209
|
-
},
|
|
210
|
-
title:
|
|
211
|
-
description:
|
|
212
|
-
type:
|
|
213
|
-
categories:
|
|
214
|
-
},
|
|
213
|
+
}, ge = {
|
|
214
|
+
title: pe,
|
|
215
|
+
description: de,
|
|
216
|
+
type: he,
|
|
217
|
+
categories: me
|
|
218
|
+
}, P = {
|
|
215
219
|
/**
|
|
216
220
|
* 自定义图标
|
|
217
221
|
*/
|
|
@@ -253,11 +257,15 @@ const me = "search-box", ge = "A Farris Component", ye = "object", be = {
|
|
|
253
257
|
/**
|
|
254
258
|
* 是否展示搜索结果面板
|
|
255
259
|
*/
|
|
256
|
-
showDropdown: { default: !0, type: Boolean }
|
|
260
|
+
showDropdown: { default: !0, type: Boolean },
|
|
257
261
|
/**
|
|
258
262
|
* popupOnFoucs TODO
|
|
259
263
|
*/
|
|
260
|
-
|
|
264
|
+
/**
|
|
265
|
+
* 值变化事件触发时机
|
|
266
|
+
*/
|
|
267
|
+
updateOn: { default: "blur", type: String }
|
|
268
|
+
}, A = ee(P, se, ne, fe, ge), ye = {
|
|
261
269
|
data: { type: Array, default: [] },
|
|
262
270
|
/** 确认结果事件 */
|
|
263
271
|
onConfirmResult: { type: Function, default: () => {
|
|
@@ -281,36 +289,36 @@ const me = "search-box", ge = "A Farris Component", ye = "object", be = {
|
|
|
281
289
|
*/
|
|
282
290
|
maxHeight: { default: 350, type: Number },
|
|
283
291
|
loading: { default: !1, type: Boolean }
|
|
284
|
-
},
|
|
292
|
+
}, L = /* @__PURE__ */ w({
|
|
285
293
|
name: "FSearchBoxContainer",
|
|
286
|
-
props:
|
|
294
|
+
props: ye,
|
|
287
295
|
emits: ["confirmResult", "searchedValue"],
|
|
288
296
|
setup(t, e) {
|
|
289
|
-
const
|
|
297
|
+
const i = m(t.data), o = m(), {
|
|
290
298
|
slots: l
|
|
291
|
-
} = e, d =
|
|
299
|
+
} = e, d = j(() => ({
|
|
292
300
|
"search-box-container": !0,
|
|
293
301
|
"f-utils-overflow-xhya": !0,
|
|
294
302
|
"position-relative": !0
|
|
295
303
|
}));
|
|
296
304
|
function p(n) {
|
|
297
|
-
var
|
|
298
|
-
(
|
|
305
|
+
var c;
|
|
306
|
+
(c = o.value) == null || c.search(n);
|
|
299
307
|
}
|
|
300
308
|
function s(n) {
|
|
301
309
|
n.length && (e.emit("confirmResult", n[0].name), e.emit("searchedValue", n));
|
|
302
310
|
}
|
|
303
311
|
function g(n) {
|
|
304
|
-
return l.default ? v(
|
|
312
|
+
return l.default ? v(_, null, [l.default(n)]) : v("span", null, [n.item[t.textField]]);
|
|
305
313
|
}
|
|
306
|
-
const a =
|
|
314
|
+
const a = j(() => {
|
|
307
315
|
const n = {};
|
|
308
316
|
return n.padding = "8px", t.maxHeight !== void 0 && t.maxHeight > 0 && (n.maxHeight = `${t.maxHeight}px`), n;
|
|
309
317
|
});
|
|
310
318
|
return S(() => t.loading, (n) => {
|
|
311
319
|
console.log("loading状态改变" + n);
|
|
312
320
|
}), S(() => t.data, (n) => {
|
|
313
|
-
n !==
|
|
321
|
+
n !== i.value && (i.value = n), o.value.updateDataSource(n);
|
|
314
322
|
}), e.expose({
|
|
315
323
|
search: p
|
|
316
324
|
}), () => {
|
|
@@ -320,15 +328,15 @@ const me = "search-box", ge = "A Farris Component", ye = "object", be = {
|
|
|
320
328
|
return v("div", {
|
|
321
329
|
class: d.value,
|
|
322
330
|
style: a.value
|
|
323
|
-
}, [v(
|
|
331
|
+
}, [v(J, {
|
|
324
332
|
ref: "loadingInstance",
|
|
325
333
|
isActive: t.loading
|
|
326
|
-
}, null), v(
|
|
334
|
+
}, null), v(G, {
|
|
327
335
|
ref: o,
|
|
328
336
|
itemClass: "dropdown-item",
|
|
329
|
-
data:
|
|
337
|
+
data: i.value,
|
|
330
338
|
view: "ContentView",
|
|
331
|
-
onClickItem: (
|
|
339
|
+
onClickItem: (c) => s(c.data),
|
|
332
340
|
idField: t.idField,
|
|
333
341
|
textField: t.textField,
|
|
334
342
|
titleField: t.textField,
|
|
@@ -336,13 +344,13 @@ const me = "search-box", ge = "A Farris Component", ye = "object", be = {
|
|
|
336
344
|
}, n)]);
|
|
337
345
|
};
|
|
338
346
|
}
|
|
339
|
-
}), B = /* @__PURE__ */
|
|
347
|
+
}), B = /* @__PURE__ */ w({
|
|
340
348
|
name: "FSearchBox",
|
|
341
|
-
props:
|
|
349
|
+
props: P,
|
|
342
350
|
emits: ["update:modelValue", "change", "selectedValue", "clickButton"],
|
|
343
351
|
setup(t, e) {
|
|
344
352
|
m(t.data);
|
|
345
|
-
const
|
|
353
|
+
const i = m(), o = m(), l = m(t.placeholder), d = '<i class="f-icon f-icon-clockwise f-icon-spin"></i>', p = j(() => t.loading ? d : t.buttonContent);
|
|
346
354
|
m(t.editable);
|
|
347
355
|
const s = m(t.modelValue);
|
|
348
356
|
S(s, (r) => {
|
|
@@ -352,7 +360,7 @@ const me = "search-box", ge = "A Farris Component", ye = "object", be = {
|
|
|
352
360
|
s.value = r;
|
|
353
361
|
});
|
|
354
362
|
function g(r) {
|
|
355
|
-
|
|
363
|
+
i.value.commitValue(r);
|
|
356
364
|
}
|
|
357
365
|
function a(r) {
|
|
358
366
|
e.emit("change", r);
|
|
@@ -360,25 +368,26 @@ const me = "search-box", ge = "A Farris Component", ye = "object", be = {
|
|
|
360
368
|
function n(r) {
|
|
361
369
|
e.emit("selectedValue", r);
|
|
362
370
|
}
|
|
363
|
-
function
|
|
371
|
+
function c(r) {
|
|
364
372
|
e.emit("clickButton", r);
|
|
365
373
|
}
|
|
366
|
-
function
|
|
367
|
-
|
|
374
|
+
function u() {
|
|
375
|
+
i.value.togglePopup();
|
|
368
376
|
}
|
|
369
377
|
return e.expose({
|
|
370
|
-
togglePopup:
|
|
378
|
+
togglePopup: u
|
|
371
379
|
}), () => {
|
|
372
380
|
const r = {
|
|
373
381
|
default: e.slots.default
|
|
374
382
|
};
|
|
375
|
-
return v(
|
|
376
|
-
ref:
|
|
383
|
+
return v(C, {
|
|
384
|
+
ref: i,
|
|
377
385
|
"button-content": p.value,
|
|
378
386
|
"custom-class": t.customClass,
|
|
387
|
+
updateOn: t.updateOn,
|
|
379
388
|
placeholder: l.value,
|
|
380
389
|
onChange: (f) => a(f),
|
|
381
|
-
onClickButton: (f) =>
|
|
390
|
+
onClickButton: (f) => c(f),
|
|
382
391
|
disable: t.disable,
|
|
383
392
|
"enable-clear": !0,
|
|
384
393
|
"button-behavior": "Execute",
|
|
@@ -390,7 +399,7 @@ const me = "search-box", ge = "A Farris Component", ye = "object", be = {
|
|
|
390
399
|
"popup-on-input": t.showDropdown,
|
|
391
400
|
"popup-on-focus": t.showDropdown
|
|
392
401
|
}, {
|
|
393
|
-
default: () => [t.showDropdown && v(
|
|
402
|
+
default: () => [t.showDropdown && v(L, {
|
|
394
403
|
ref: o,
|
|
395
404
|
data: t.data,
|
|
396
405
|
onConfirmResult: g,
|
|
@@ -403,95 +412,94 @@ const me = "search-box", ge = "A Farris Component", ye = "object", be = {
|
|
|
403
412
|
};
|
|
404
413
|
}
|
|
405
414
|
});
|
|
406
|
-
function
|
|
407
|
-
var
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
const l = "", d = "", p = m();
|
|
411
|
-
function s() {
|
|
415
|
+
function be(t, e, i) {
|
|
416
|
+
var k;
|
|
417
|
+
const o = "", l = "", d = m();
|
|
418
|
+
function p() {
|
|
412
419
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
413
420
|
}
|
|
414
|
-
function
|
|
421
|
+
function s() {
|
|
415
422
|
return !1;
|
|
416
423
|
}
|
|
417
|
-
function
|
|
424
|
+
function g() {
|
|
418
425
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
419
426
|
}
|
|
420
|
-
function
|
|
427
|
+
function a() {
|
|
421
428
|
return (e == null ? void 0 : e.schema.componentType) === "frame";
|
|
422
429
|
}
|
|
423
|
-
function
|
|
430
|
+
function n(h) {
|
|
424
431
|
if (!h || !h.value)
|
|
425
432
|
return null;
|
|
426
433
|
if (h.value.schema && h.value.schema.type === "component")
|
|
427
434
|
return h.value;
|
|
428
|
-
const b = m(h == null ? void 0 : h.value.parent), y =
|
|
435
|
+
const b = m(h == null ? void 0 : h.value.parent), y = n(b);
|
|
429
436
|
return y || null;
|
|
430
437
|
}
|
|
431
438
|
function c(h = e) {
|
|
432
439
|
const { componentInstance: b, designerItemElementRef: y } = h;
|
|
433
440
|
return !b || !b.value ? null : b.value.canMove ? y : c(h.parent);
|
|
434
441
|
}
|
|
435
|
-
function
|
|
436
|
-
return !!
|
|
442
|
+
function u(h) {
|
|
443
|
+
return !!i;
|
|
437
444
|
}
|
|
438
|
-
function
|
|
445
|
+
function r() {
|
|
439
446
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
440
447
|
}
|
|
441
|
-
function
|
|
448
|
+
function f() {
|
|
442
449
|
}
|
|
443
|
-
function
|
|
450
|
+
function O(h, b) {
|
|
444
451
|
}
|
|
445
|
-
function
|
|
452
|
+
function D(h, b) {
|
|
446
453
|
const { componentType: y } = h;
|
|
447
|
-
let V =
|
|
448
|
-
const
|
|
449
|
-
return V && !V.id && V.type === y && (V.id = `${
|
|
454
|
+
let V = T(y, h, b);
|
|
455
|
+
const q = y.toLowerCase().replace(/-/g, "_");
|
|
456
|
+
return V && !V.id && V.type === y && (V.id = `${q}_${Math.random().toString().slice(2, 6)}`), V;
|
|
450
457
|
}
|
|
451
|
-
function
|
|
452
|
-
const y = String(h.getAttribute("data-controltype")), V = h.getAttribute("data-feature"), O = V ? JSON.parse(V) : {};
|
|
453
|
-
O.parentComponentInstance = p.value;
|
|
454
|
-
let F = E(y, O);
|
|
455
|
-
const X = y.toLowerCase().replace("-", "_");
|
|
456
|
-
return F && !F.id && F.type === y && (F.id = `${X}_${Math.random().toString().slice(2, 6)}`), F;
|
|
458
|
+
function F(h) {
|
|
457
459
|
}
|
|
458
|
-
function
|
|
460
|
+
function E(...h) {
|
|
459
461
|
}
|
|
460
|
-
function
|
|
462
|
+
function R() {
|
|
463
|
+
e != null && e.schema.contents && e.schema.contents.map((h) => {
|
|
464
|
+
var V;
|
|
465
|
+
let b = h.id;
|
|
466
|
+
h.type === "component-ref" && (b = h.component);
|
|
467
|
+
const y = t.value.querySelector(`#${b}-design-item`);
|
|
468
|
+
(V = y == null ? void 0 : y.componentInstance) != null && V.value.onRemoveComponent && y.componentInstance.value.onRemoveComponent();
|
|
469
|
+
});
|
|
461
470
|
}
|
|
462
|
-
return
|
|
463
|
-
canMove:
|
|
464
|
-
canSelectParent:
|
|
465
|
-
canDelete:
|
|
466
|
-
canNested: !
|
|
471
|
+
return d.value = {
|
|
472
|
+
canMove: p(),
|
|
473
|
+
canSelectParent: s(),
|
|
474
|
+
canDelete: g(),
|
|
475
|
+
canNested: !a(),
|
|
467
476
|
contents: e == null ? void 0 : e.schema.contents,
|
|
468
477
|
elementRef: t,
|
|
469
|
-
parent: (
|
|
478
|
+
parent: (k = e == null ? void 0 : e.parent) == null ? void 0 : k.componentInstance,
|
|
470
479
|
schema: e == null ? void 0 : e.schema,
|
|
471
|
-
styles:
|
|
472
|
-
designerClass:
|
|
473
|
-
canAccepts:
|
|
474
|
-
getBelongedComponentInstance:
|
|
480
|
+
styles: o,
|
|
481
|
+
designerClass: l,
|
|
482
|
+
canAccepts: u,
|
|
483
|
+
getBelongedComponentInstance: n,
|
|
475
484
|
getDraggableDesignItemElement: c,
|
|
476
|
-
getDraggingDisplayText:
|
|
477
|
-
getPropConfig:
|
|
478
|
-
getDragScopeElement:
|
|
479
|
-
onAcceptMovedChildElement:
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
addNewChildComponentSchema: R,
|
|
483
|
-
updateDragAndDropRules: o,
|
|
485
|
+
getDraggingDisplayText: r,
|
|
486
|
+
getPropConfig: E,
|
|
487
|
+
getDragScopeElement: f,
|
|
488
|
+
onAcceptMovedChildElement: O,
|
|
489
|
+
onChildElementMovedOut: F,
|
|
490
|
+
addNewChildComponentSchema: D,
|
|
484
491
|
triggerBelongedComponentToMoveWhenMoved: m(!1),
|
|
485
|
-
triggerBelongedComponentToDeleteWhenDeleted: m(!1)
|
|
486
|
-
|
|
492
|
+
triggerBelongedComponentToDeleteWhenDeleted: m(!1),
|
|
493
|
+
onRemoveComponent: R
|
|
494
|
+
}, d;
|
|
487
495
|
}
|
|
488
|
-
const
|
|
496
|
+
const ve = /* @__PURE__ */ w({
|
|
489
497
|
name: "FSearchBoxDesign",
|
|
490
|
-
props:
|
|
498
|
+
props: P,
|
|
491
499
|
emits: ["update:modelValue", "change"],
|
|
492
500
|
setup(t, e) {
|
|
493
|
-
const
|
|
494
|
-
|
|
501
|
+
const i = m(t.data), o = m(), l = m(), d = m("请输入关键词"), p = m('<i class="f-icon f-icon-search"></i>'), s = m(t.modelValue), g = m(), a = X("design-item-context"), n = be(g, a);
|
|
502
|
+
U(() => {
|
|
495
503
|
g.value.componentInstance = n;
|
|
496
504
|
}), e.expose(n.value), S(s, (r) => {
|
|
497
505
|
var f;
|
|
@@ -499,19 +507,19 @@ const Se = /* @__PURE__ */ P({
|
|
|
499
507
|
}), S(() => t.modelValue, (r) => {
|
|
500
508
|
s.value = r;
|
|
501
509
|
});
|
|
502
|
-
function
|
|
510
|
+
function c(r) {
|
|
503
511
|
o.value.commitValue(r);
|
|
504
512
|
}
|
|
505
|
-
function
|
|
513
|
+
function u(r) {
|
|
506
514
|
e.emit("change", r);
|
|
507
515
|
}
|
|
508
516
|
return () => v("div", {
|
|
509
517
|
ref: g
|
|
510
|
-
}, [v(
|
|
518
|
+
}, [v(W("f-button-edit"), {
|
|
511
519
|
ref: o,
|
|
512
520
|
"button-content": p.value,
|
|
513
521
|
placeholder: d.value,
|
|
514
|
-
onChange:
|
|
522
|
+
onChange: u,
|
|
515
523
|
"enable-clear": !0,
|
|
516
524
|
"button-behavior": "Execute",
|
|
517
525
|
modelValue: s.value,
|
|
@@ -522,10 +530,10 @@ const Se = /* @__PURE__ */ P({
|
|
|
522
530
|
"popup-on-input": !0,
|
|
523
531
|
"popup-on-focus": !0
|
|
524
532
|
}, {
|
|
525
|
-
default: () => [v(
|
|
533
|
+
default: () => [v(L, {
|
|
526
534
|
ref: l,
|
|
527
|
-
data:
|
|
528
|
-
onConfirmResult:
|
|
535
|
+
data: i.value,
|
|
536
|
+
onConfirmResult: c
|
|
529
537
|
}, null)]
|
|
530
538
|
})]);
|
|
531
539
|
}
|
|
@@ -533,15 +541,15 @@ const Se = /* @__PURE__ */ P({
|
|
|
533
541
|
B.install = (t) => {
|
|
534
542
|
t.component(B.name, B);
|
|
535
543
|
};
|
|
536
|
-
B.register = (t, e,
|
|
537
|
-
t["search-box"] = B, e["search-box"] =
|
|
544
|
+
B.register = (t, e, i, o) => {
|
|
545
|
+
t["search-box"] = B, e["search-box"] = A;
|
|
538
546
|
};
|
|
539
|
-
B.registerDesigner = (t, e,
|
|
540
|
-
t["search-box"] =
|
|
547
|
+
B.registerDesigner = (t, e, i) => {
|
|
548
|
+
t["search-box"] = ve, e["search-box"] = A;
|
|
541
549
|
};
|
|
542
550
|
export {
|
|
543
551
|
B as FSearchBox,
|
|
544
552
|
B as default,
|
|
545
|
-
|
|
546
|
-
|
|
553
|
+
A as propsResolver,
|
|
554
|
+
P as searchBoxProps
|
|
547
555
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(y,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue"),require("../button-edit/index.umd.js"),require("lodash-es"),require("../list-view/index.umd.js"),require("../loading/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","../button-edit/index.umd.js","lodash-es","../list-view/index.umd.js","../loading/index.umd.js"],r):(y=typeof globalThis<"u"?globalThis:y||self,r(y["search-box"]={},y.Vue,y.FButtonEdit,y.LodashES,y.FListView,y.FLoading))})(this,function(y,r,H,R,q,x){"use strict";const $={},C={};function N(t){const{properties:e,title:s,ignore:o}=t,c=o&&Array.isArray(o),h=Object.keys(e).reduce((p,f)=>((!c||!o.find(g=>g==f))&&(p[f]=e[f].type==="object"&&e[f].properties?N(e[f]):R.cloneDeep(e[f].default)),p),{});return(!c||!o.find(p=>p=="id"))&&(h.id=`${s}-${Date.now()}`),h}function P(t,e={},s){const o=$[t];if(o){let c=N(o);const h=C[t];return c=h?h({getSchemaByType:P},c,e,s):c,c}return null}function L(t,e){const s=N(e);return Object.keys(t).reduce((o,c)=>(o[c]&&R.isPlainObject(o[c])&&R.isPlainObject(t[c])?Object.assign(o[c],t[c]):o[c]=t[c],o),s),s}function _(t,e){return Object.keys(t).filter(o=>t[o]!=null).reduce((o,c)=>{if(e.has(c)){const h=e.get(c);if(typeof h=="string")o[h]=t[c];else{const p=h(c,t[c],t);Object.assign(o,p)}}else o[c]=t[c];return o},{})}function X(t,e,s=new Map){const o=L(t,e);return _(o,s)}function U(t={}){function e(a,n,l,u){if(typeof l=="number")return u[a].length===l;if(typeof l=="object"){const i=Object.keys(l)[0],d=l[i];if(i==="not")return Number(u[a].length)!==Number(d);if(i==="moreThan")return Number(u[a].length)>=Number(d);if(i==="lessThan")return Number(u[a].length)<=Number(d)}return!1}function s(a,n,l,u){return u[a]&&u[a].propertyValue&&String(u[a].propertyValue.value)===String(l)}const o=new Map([["length",e],["getProperty",s]]);Object.keys(t).reduce((a,n)=>(a.set(n,t[n]),a),o);function c(a,n){const l=a;return typeof n=="number"?[{target:l,operator:"length",param:null,value:Number(n)}]:typeof n=="boolean"?[{target:l,operator:"getProperty",param:a,value:!!n}]:typeof n=="object"?Object.keys(n).map(u=>{if(u==="length")return{target:l,operator:"length",param:null,value:n[u]};const i=u,d=n[u];return{target:l,operator:"getProperty",param:i,value:d}}):[]}function h(a){return Object.keys(a).reduce((l,u)=>{const i=c(u,a[u]);return l.push(...i),l},[])}function p(a,n){if(o.has(a.operator)){const l=o.get(a.operator);return l&&l(a.target,a.param,a.value,n)||!1}return!1}function f(a,n){return h(a).reduce((i,d)=>i&&p(d,n),!0)}function g(a,n){const l=Object.keys(a),u=l.includes("allOf"),i=l.includes("anyOf"),d=u||i,F=(d?a[d?u?"allOf":"anyOf":"allOf"]:[a]).map(E=>f(E,n));return u?!F.includes(!1):F.includes(!0)}return{parseValueSchema:g}}const W={},J={};U();function z(t,e,s=new Map,o=(p,f,g)=>f,c={},h=p=>p){return $[e.title]=e,C[e.title]=o,W[e.title]=c,J[e.title]=h,(p={})=>{const f=X(p,e,s),g=Object.keys(t).reduce((a,n)=>(a[n]=t[n].default,a),{});return Object.assign(g,f)}}function G(t,e){return{customClass:e.class,customStyle:e.style}}const Q=new Map([["appearance",G]]),Y={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/search-box.schema.json",title:"search-box",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for a search-box",type:"string"},type:{description:"The type string of search-box component",type:"string",default:"search-box"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeholder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]};function Z(t,e,s){return e}const K={title:"search-box",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},w={buttonContent:{type:String,default:'<i class="f-icon f-icon-search"></i>'},customClass:{type:String,default:""},modelValue:{type:String,default:""},popupHost:{type:Object},popupRightBoundary:{type:Object},popupOffsetX:{type:Object},data:{type:Array,default:[]},placeholder:{type:String,default:"请输入关键词"},idField:{default:"id",type:String},textField:{default:"name",type:String},maxHeight:{default:350,type:Number},loading:{default:!1,type:Boolean},disable:{default:!1,type:Boolean},showDropdown:{default:!0,type:Boolean}},D=z(w,Y,Q,Z,K),I={data:{type:Array,default:[]},onConfirmResult:{type:Function,default:()=>{}},onSearchedValue:{type:Function,default:()=>{}},idField:{default:"id",type:String},textField:{default:"name",type:String},maxHeight:{default:350,type:Number},loading:{default:!1,type:Boolean}},v=r.defineComponent({name:"FSearchBoxContainer",props:I,emits:["confirmResult","searchedValue"],setup(t,e){const s=r.ref(t.data),o=r.ref(),{slots:c}=e,h=r.computed(()=>({"search-box-container":!0,"f-utils-overflow-xhya":!0,"position-relative":!0}));function p(n){var l;(l=o.value)==null||l.search(n)}function f(n){n.length&&(e.emit("confirmResult",n[0].name),e.emit("searchedValue",n))}function g(n){return c.default?r.createVNode(r.Fragment,null,[c.default(n)]):r.createVNode("span",null,[n.item[t.textField]])}const a=r.computed(()=>{const n={};return n.padding="8px",t.maxHeight!==void 0&&t.maxHeight>0&&(n.maxHeight=`${t.maxHeight}px`),n});return r.watch(()=>t.loading,n=>{console.log("loading状态改变"+n)}),r.watch(()=>t.data,n=>{n!==s.value&&(s.value=n),o.value.updateDataSource(n)}),e.expose({search:p}),()=>{const n={content:g};return r.createVNode("div",{class:h.value,style:a.value},[r.createVNode(x,{ref:"loadingInstance",isActive:t.loading},null),r.createVNode(q,{ref:o,itemClass:"dropdown-item",data:s.value,view:"ContentView",onClickItem:l=>f(l.data),idField:t.idField,textField:t.textField,titleField:t.textField,valueField:t.idField},n)])}}}),S=r.defineComponent({name:"FSearchBox",props:w,emits:["update:modelValue","change","selectedValue","clickButton"],setup(t,e){r.ref(t.data);const s=r.ref(),o=r.ref(),c=r.ref(t.placeholder),h='<i class="f-icon f-icon-clockwise f-icon-spin"></i>',p=r.computed(()=>t.loading?h:t.buttonContent);r.ref(t.editable);const f=r.ref(t.modelValue);r.watch(f,i=>{var d;(d=o.value)==null||d.search(i),e.emit("update:modelValue",i)}),r.watch(()=>t.modelValue,i=>{f.value=i});function g(i){s.value.commitValue(i)}function a(i){e.emit("change",i)}function n(i){e.emit("selectedValue",i)}function l(i){e.emit("clickButton",i)}function u(){s.value.togglePopup()}return e.expose({togglePopup:u}),()=>{const i={default:e.slots.default};return r.createVNode(H,{ref:s,"button-content":p.value,"custom-class":t.customClass,placeholder:c.value,onChange:d=>a(d),onClickButton:d=>l(d),disable:t.disable,"enable-clear":!0,"button-behavior":"Execute",modelValue:f.value,"onUpdate:modelValue":d=>f.value=d,"popup-host":t.popupHost,"popup-right-boundary":t.popupRightBoundary,"popup-offset-x":t.popupOffsetX,"popup-on-input":t.showDropdown,"popup-on-focus":t.showDropdown},{default:()=>[t.showDropdown&&r.createVNode(v,{ref:o,data:t.data,onConfirmResult:g,onSearchedValue:d=>n(d),loading:t.loading,maxHeight:t.maxHeight},i)],...e.slots})}}});function ee(t,e,s){var A;function o(){}const c="",h="",p=r.ref();function f(){return(e==null?void 0:e.schema.componentType)!=="frame"}function g(){return!1}function a(){return(e==null?void 0:e.schema.componentType)!=="frame"}function n(){return(e==null?void 0:e.schema.componentType)==="frame"}function l(m){if(!m||!m.value)return null;if(m.value.schema&&m.value.schema.type==="component")return m.value;const V=r.ref(m==null?void 0:m.value.parent),b=l(V);return b||null}function u(m=e){const{componentInstance:V,designerItemElementRef:b}=m;return!V||!V.value?null:V.value.canMove?b:u(m.parent)}function i(m){return!!s}function d(){return(e==null?void 0:e.schema.label)||(e==null?void 0:e.schema.title)||(e==null?void 0:e.schema.name)}function M(){}function T(m,V){}function F(m,V){const{componentType:b}=m;let B=P(b,m,V);const O=b.toLowerCase().replace("-","_");return B&&!B.id&&B.type===b&&(B.id=`${O}_${Math.random().toString().slice(2,6)}`),B}function k(m,V){const b=String(m.getAttribute("data-controltype")),B=m.getAttribute("data-feature"),O=B?JSON.parse(B):{};O.parentComponentInstance=p.value;let j=P(b,O);const re=b.toLowerCase().replace("-","_");return j&&!j.id&&j.type===b&&(j.id=`${re}_${Math.random().toString().slice(2,6)}`),j}function E(m){}function ne(...m){}return p.value={canMove:f(),canSelectParent:g(),canDelete:a(),canNested:!n(),contents:e==null?void 0:e.schema.contents,elementRef:t,parent:(A=e==null?void 0:e.parent)==null?void 0:A.componentInstance,schema:e==null?void 0:e.schema,styles:c,designerClass:h,canAccepts:i,getBelongedComponentInstance:l,getDraggableDesignItemElement:u,getDraggingDisplayText:d,getPropConfig:ne,getDragScopeElement:M,onAcceptMovedChildElement:T,onAcceptNewChildElement:k,onChildElementMovedOut:E,addNewChildComponentSchema:F,updateDragAndDropRules:o,triggerBelongedComponentToMoveWhenMoved:r.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:r.ref(!1)},p}const te=r.defineComponent({name:"FSearchBoxDesign",props:w,emits:["update:modelValue","change"],setup(t,e){const s=r.ref(t.data),o=r.ref(),c=r.ref(),h=r.ref("请输入关键词"),p=r.ref('<i class="f-icon f-icon-search"></i>'),f=r.ref(t.modelValue),g=r.ref(),a=r.inject("design-item-context"),n=ee(g,a);r.onMounted(()=>{g.value.componentInstance=n}),e.expose(n.value),r.watch(f,i=>{var d;(d=c.value)==null||d.search(i),e.emit("update:modelValue",i)}),r.watch(()=>t.modelValue,i=>{f.value=i});function l(i){o.value.commitValue(i)}function u(i){e.emit("change",i)}return()=>r.createVNode("div",{ref:g},[r.createVNode(r.resolveComponent("f-button-edit"),{ref:o,"button-content":p.value,placeholder:h.value,onChange:u,"enable-clear":!0,"button-behavior":"Execute",modelValue:f.value,"onUpdate:modelValue":i=>f.value=i,"popup-host":t.popupHost,"popup-right-boundary":t.popupRightBoundary,"popup-offset-x":t.popupOffsetX,"popup-on-input":!0,"popup-on-focus":!0},{default:()=>[r.createVNode(v,{ref:c,data:s.value,onConfirmResult:l},null)]})])}});S.install=t=>{t.component(S.name,S)},S.register=(t,e,s,o)=>{t["search-box"]=S,e["search-box"]=D},S.registerDesigner=(t,e,s)=>{t["search-box"]=te,e["search-box"]=D},y.FSearchBox=S,y.default=S,y.propsResolver=D,y.searchBoxProps=w,Object.defineProperties(y,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(g,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue"),require("../button-edit/index.umd.js"),require("lodash-es"),require("../list-view/index.umd.js"),require("../loading/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","../button-edit/index.umd.js","lodash-es","../list-view/index.umd.js","../loading/index.umd.js"],o):(g=typeof globalThis<"u"?globalThis:g||self,o(g["search-box"]={},g.Vue,g.FButtonEdit,g.LodashES,g.FListView,g.FLoading))})(this,function(g,o,H,O,q,A){"use strict";const N={},v={};function w(t){const{properties:e,title:s,ignore:a}=t,c=a&&Array.isArray(a),h=Object.keys(e).reduce((d,f)=>((!c||!a.find(y=>y===f))&&(d[f]=e[f].type==="object"&&e[f].properties?w(e[f]):O.cloneDeep(e[f].default)),d),{});if(s&&(!c||!a.find(d=>d==="id"))){const d=s.toLowerCase().replace(/-/g,"_");h.id=`${d}_${Math.random().toString().slice(2,6)}`}return h}function D(t,e={},s){const a=N[t];if(a){let c=w(a);const h=v[t];return c=h?h({getSchemaByType:D},c,e,s):c,c}return null}function L(t,e){const s=w(e);return Object.keys(s).reduce((a,c)=>(a[c]&&O.isPlainObject(a[c])&&O.isPlainObject(t[c]||!t[c])?Object.assign(a[c],t[c]||{}):a[c]=t[c],a),s),s}function _(t,e){return Object.keys(t).filter(a=>t[a]!=null).reduce((a,c)=>{if(e.has(c)){const h=e.get(c);if(typeof h=="string")a[h]=t[c];else{const d=h(c,t[c],t);Object.assign(a,d)}}else a[c]=t[c];return a},{})}function C(t,e,s=new Map){const a=L(t,e);return _(a,s)}function X(t={}){function e(r,n,l,u){if(typeof l=="number")return u[r].length===l;if(typeof l=="object"){const i=Object.keys(l)[0],p=l[i];if(i==="not")return Number(u[r].length)!==Number(p);if(i==="moreThan")return Number(u[r].length)>=Number(p);if(i==="lessThan")return Number(u[r].length)<=Number(p)}return!1}function s(r,n,l,u){return u[r]&&u[r].propertyValue&&String(u[r].propertyValue.value)===String(l)}const a=new Map([["length",e],["getProperty",s]]);Object.keys(t).reduce((r,n)=>(r.set(n,t[n]),r),a);function c(r,n){const l=r;return typeof n=="number"?[{target:l,operator:"length",param:null,value:Number(n)}]:typeof n=="boolean"?[{target:l,operator:"getProperty",param:r,value:!!n}]:typeof n=="object"?Object.keys(n).map(u=>{if(u==="length")return{target:l,operator:"length",param:null,value:n[u]};const i=u,p=n[u];return{target:l,operator:"getProperty",param:i,value:p}}):[]}function h(r){return Object.keys(r).reduce((l,u)=>{const i=c(u,r[u]);return l.push(...i),l},[])}function d(r,n){if(a.has(r.operator)){const l=a.get(r.operator);return l&&l(r.target,r.param,r.value,n)||!1}return!1}function f(r,n){return h(r).reduce((i,p)=>i&&d(p,n),!0)}function y(r,n){const l=Object.keys(r),u=l.includes("allOf"),i=l.includes("anyOf"),p=u||i,F=(p?r[p?u?"allOf":"anyOf":"allOf"]:[r]).map(M=>f(M,n));return u?!F.includes(!1):F.includes(!0)}return{parseValueSchema:y}}const U={},W={};X();function x(t,e,s=new Map,a=(d,f,y,r)=>f,c={},h=d=>d){return N[e.title]=e,v[e.title]=a,U[e.title]=c,W[e.title]=h,(d={})=>{const f=C(d,e,s),y=Object.keys(t).reduce((r,n)=>(r[n]=t[n].default,r),{});return Object.assign(y,f)}}function z(t,e){return{customClass:e.class,customStyle:e.style}}const G=new Map([["appearance",z]]),J={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/search-box.schema.json",title:"search-box",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for a search-box",type:"string"},type:{description:"The type string of search-box component",type:"string",default:"search-box"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeholder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]};function Q(t,e,s){return e}const Y={title:"search-box",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},j={buttonContent:{type:String,default:'<i class="f-icon f-icon-search"></i>'},customClass:{type:String,default:""},modelValue:{type:String,default:""},popupHost:{type:Object},popupRightBoundary:{type:Object},popupOffsetX:{type:Object},data:{type:Array,default:[]},placeholder:{type:String,default:"请输入关键词"},idField:{default:"id",type:String},textField:{default:"name",type:String},maxHeight:{default:350,type:Number},loading:{default:!1,type:Boolean},disable:{default:!1,type:Boolean},showDropdown:{default:!0,type:Boolean},updateOn:{default:"blur",type:String}},R=x(j,J,G,Q,Y),Z={data:{type:Array,default:[]},onConfirmResult:{type:Function,default:()=>{}},onSearchedValue:{type:Function,default:()=>{}},idField:{default:"id",type:String},textField:{default:"name",type:String},maxHeight:{default:350,type:Number},loading:{default:!1,type:Boolean}},E=o.defineComponent({name:"FSearchBoxContainer",props:Z,emits:["confirmResult","searchedValue"],setup(t,e){const s=o.ref(t.data),a=o.ref(),{slots:c}=e,h=o.computed(()=>({"search-box-container":!0,"f-utils-overflow-xhya":!0,"position-relative":!0}));function d(n){var l;(l=a.value)==null||l.search(n)}function f(n){n.length&&(e.emit("confirmResult",n[0].name),e.emit("searchedValue",n))}function y(n){return c.default?o.createVNode(o.Fragment,null,[c.default(n)]):o.createVNode("span",null,[n.item[t.textField]])}const r=o.computed(()=>{const n={};return n.padding="8px",t.maxHeight!==void 0&&t.maxHeight>0&&(n.maxHeight=`${t.maxHeight}px`),n});return o.watch(()=>t.loading,n=>{console.log("loading状态改变"+n)}),o.watch(()=>t.data,n=>{n!==s.value&&(s.value=n),a.value.updateDataSource(n)}),e.expose({search:d}),()=>{const n={content:y};return o.createVNode("div",{class:h.value,style:r.value},[o.createVNode(A,{ref:"loadingInstance",isActive:t.loading},null),o.createVNode(q,{ref:a,itemClass:"dropdown-item",data:s.value,view:"ContentView",onClickItem:l=>f(l.data),idField:t.idField,textField:t.textField,titleField:t.textField,valueField:t.idField},n)])}}}),S=o.defineComponent({name:"FSearchBox",props:j,emits:["update:modelValue","change","selectedValue","clickButton"],setup(t,e){o.ref(t.data);const s=o.ref(),a=o.ref(),c=o.ref(t.placeholder),h='<i class="f-icon f-icon-clockwise f-icon-spin"></i>',d=o.computed(()=>t.loading?h:t.buttonContent);o.ref(t.editable);const f=o.ref(t.modelValue);o.watch(f,i=>{var p;(p=a.value)==null||p.search(i),e.emit("update:modelValue",i)}),o.watch(()=>t.modelValue,i=>{f.value=i});function y(i){s.value.commitValue(i)}function r(i){e.emit("change",i)}function n(i){e.emit("selectedValue",i)}function l(i){e.emit("clickButton",i)}function u(){s.value.togglePopup()}return e.expose({togglePopup:u}),()=>{const i={default:e.slots.default};return o.createVNode(H,{ref:s,"button-content":d.value,"custom-class":t.customClass,updateOn:t.updateOn,placeholder:c.value,onChange:p=>r(p),onClickButton:p=>l(p),disable:t.disable,"enable-clear":!0,"button-behavior":"Execute",modelValue:f.value,"onUpdate:modelValue":p=>f.value=p,"popup-host":t.popupHost,"popup-right-boundary":t.popupRightBoundary,"popup-offset-x":t.popupOffsetX,"popup-on-input":t.showDropdown,"popup-on-focus":t.showDropdown},{default:()=>[t.showDropdown&&o.createVNode(E,{ref:a,data:t.data,onConfirmResult:y,onSearchedValue:p=>n(p),loading:t.loading,maxHeight:t.maxHeight},i)],...e.slots})}}});function K(t,e,s){var k;const a="",c="",h=o.ref();function d(){return(e==null?void 0:e.schema.componentType)!=="frame"}function f(){return!1}function y(){return(e==null?void 0:e.schema.componentType)!=="frame"}function r(){return(e==null?void 0:e.schema.componentType)==="frame"}function n(m){if(!m||!m.value)return null;if(m.value.schema&&m.value.schema.type==="component")return m.value;const V=o.ref(m==null?void 0:m.value.parent),b=n(V);return b||null}function l(m=e){const{componentInstance:V,designerItemElementRef:b}=m;return!V||!V.value?null:V.value.canMove?b:l(m.parent)}function u(m){return!!s}function i(){return(e==null?void 0:e.schema.label)||(e==null?void 0:e.schema.title)||(e==null?void 0:e.schema.name)}function p(){}function P(m,V){}function $(m,V){const{componentType:b}=m;let B=D(b,m,V);const ee=b.toLowerCase().replace(/-/g,"_");return B&&!B.id&&B.type===b&&(B.id=`${ee}_${Math.random().toString().slice(2,6)}`),B}function F(m){}function T(...m){}function M(){e!=null&&e.schema.contents&&e.schema.contents.map(m=>{var B;let V=m.id;m.type==="component-ref"&&(V=m.component);const b=t.value.querySelector(`#${V}-design-item`);(B=b==null?void 0:b.componentInstance)!=null&&B.value.onRemoveComponent&&b.componentInstance.value.onRemoveComponent()})}return h.value={canMove:d(),canSelectParent:f(),canDelete:y(),canNested:!r(),contents:e==null?void 0:e.schema.contents,elementRef:t,parent:(k=e==null?void 0:e.parent)==null?void 0:k.componentInstance,schema:e==null?void 0:e.schema,styles:a,designerClass:c,canAccepts:u,getBelongedComponentInstance:n,getDraggableDesignItemElement:l,getDraggingDisplayText:i,getPropConfig:T,getDragScopeElement:p,onAcceptMovedChildElement:P,onChildElementMovedOut:F,addNewChildComponentSchema:$,triggerBelongedComponentToMoveWhenMoved:o.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:o.ref(!1),onRemoveComponent:M},h}const I=o.defineComponent({name:"FSearchBoxDesign",props:j,emits:["update:modelValue","change"],setup(t,e){const s=o.ref(t.data),a=o.ref(),c=o.ref(),h=o.ref("请输入关键词"),d=o.ref('<i class="f-icon f-icon-search"></i>'),f=o.ref(t.modelValue),y=o.ref(),r=o.inject("design-item-context"),n=K(y,r);o.onMounted(()=>{y.value.componentInstance=n}),e.expose(n.value),o.watch(f,i=>{var p;(p=c.value)==null||p.search(i),e.emit("update:modelValue",i)}),o.watch(()=>t.modelValue,i=>{f.value=i});function l(i){a.value.commitValue(i)}function u(i){e.emit("change",i)}return()=>o.createVNode("div",{ref:y},[o.createVNode(o.resolveComponent("f-button-edit"),{ref:a,"button-content":d.value,placeholder:h.value,onChange:u,"enable-clear":!0,"button-behavior":"Execute",modelValue:f.value,"onUpdate:modelValue":i=>f.value=i,"popup-host":t.popupHost,"popup-right-boundary":t.popupRightBoundary,"popup-offset-x":t.popupOffsetX,"popup-on-input":!0,"popup-on-focus":!0},{default:()=>[o.createVNode(E,{ref:c,data:s.value,onConfirmResult:l},null)]})])}});S.install=t=>{t.component(S.name,S)},S.register=(t,e,s,a)=>{t["search-box"]=S,e["search-box"]=R},S.registerDesigner=(t,e,s)=>{t["search-box"]=I,e["search-box"]=R},g.FSearchBox=S,g.default=S,g.propsResolver=R,g.searchBoxProps=j,Object.defineProperties(g,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|