@vunk/form 1.0.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/components/geoinput/index.d.ts +4 -0
  2. package/components/geoinput/index.js +94 -0
  3. package/components/geoinput/src/ctx.d.ts +218 -0
  4. package/components/geoinput/src/ctx.js +39 -0
  5. package/components/geoinput/src/index.vue.d.ts +608 -0
  6. package/components/geoinput/src/types.d.ts +12 -0
  7. package/components/geoinput/src/types.js +1 -0
  8. package/components/geoinput-read/index.css +9 -0
  9. package/components/geoinput-read/index.d.ts +5 -0
  10. package/components/geoinput-read/index.js +355 -0
  11. package/components/geoinput-read/src/append.vue.d.ts +6 -0
  12. package/components/geoinput-read/src/core.vue.d.ts +457 -0
  13. package/components/geoinput-read/src/ctx.d.ts +205 -0
  14. package/components/geoinput-read/src/ctx.js +62 -0
  15. package/components/geoinput-read/src/index.vue.d.ts +486 -0
  16. package/components/geoinput-read/src/types.d.ts +3 -0
  17. package/components/geoinput-read/src/types.js +1 -0
  18. package/components/geoinput-update/index.css +44 -0
  19. package/components/geoinput-update/index.d.ts +5 -0
  20. package/components/geoinput-update/index.js +982 -0
  21. package/components/geoinput-update/src/append.vue.d.ts +20 -0
  22. package/components/geoinput-update/src/ctx.d.ts +211 -0
  23. package/components/geoinput-update/src/ctx.js +85 -0
  24. package/components/geoinput-update/src/index.vue.d.ts +483 -0
  25. package/components/geoinput-update/src/types.d.ts +6 -0
  26. package/components/geoinput-update/src/types.js +1 -0
  27. package/components/input-link/index.js +1 -1
  28. package/components/templates-mapbox/index.d.ts +4 -0
  29. package/components/templates-mapbox/index.js +64 -0
  30. package/components/templates-mapbox/src/ctx.d.ts +11 -0
  31. package/components/templates-mapbox/src/ctx.js +11 -0
  32. package/components/templates-mapbox/src/index.vue.d.ts +20 -0
  33. package/components/templates-mapbox/src/types.d.ts +3 -0
  34. package/components/templates-mapbox/src/types.js +1 -0
  35. package/index.css +55 -0
  36. package/package.json +1 -1
  37. package/shared/types/form/radio.d.ts +1 -1
  38. package/shared/types/source/index.d.ts +2 -1
@@ -0,0 +1,4 @@
1
+ import VkfGeoinput from './src/index.vue';
2
+ export * as __VkfGeoinput from './src/types';
3
+ export { VkfGeoinput, };
4
+ export default VkfGeoinput;
@@ -0,0 +1,94 @@
1
+ import { defineComponent, resolveComponent, openBlock, createBlock, mergeProps, toHandlers } from 'vue';
2
+ import { _VkfGeoinputReadCtx, VkfGeoinputRead } from '@vunk/form/components/geoinput-read';
3
+ import { _VkfGeoinputUpdateCtx, VkfGeoinputUpdate } from '@vunk/form/components/geoinput-update';
4
+ import { useComputedReadonly } from '@vunk/form/composables';
5
+
6
+ var __defProp = Object.defineProperty;
7
+ var __defProps = Object.defineProperties;
8
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
9
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
10
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __spreadValues = (a, b) => {
14
+ for (var prop in b || (b = {}))
15
+ if (__hasOwnProp.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols)
18
+ for (var prop of __getOwnPropSymbols(b)) {
19
+ if (__propIsEnum.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
21
+ }
22
+ return a;
23
+ };
24
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
+ const props = __spreadProps(__spreadValues(__spreadValues({}, _VkfGeoinputReadCtx.props), _VkfGeoinputUpdateCtx.props), {
26
+ readonly: {
27
+ type: Boolean,
28
+ default: void 0
29
+ },
30
+ showMap: {
31
+ type: Boolean,
32
+ default: true
33
+ },
34
+ type: {
35
+ type: String,
36
+ default: ""
37
+ }
38
+ });
39
+ const emits = __spreadValues(__spreadValues({}, _VkfGeoinputReadCtx.emits), _VkfGeoinputUpdateCtx.emits);
40
+
41
+ var _export_sfc = (sfc, props) => {
42
+ const target = sfc.__vccOpts || sfc;
43
+ for (const [key, val] of props) {
44
+ target[key] = val;
45
+ }
46
+ return target;
47
+ };
48
+
49
+ const _sfc_main = defineComponent({
50
+ name: "VkfGeoinput",
51
+ inheritAttrs: false,
52
+ components: {
53
+ VkfGeoinputRead,
54
+ VkfGeoinputUpdate
55
+ },
56
+ emits,
57
+ props,
58
+ setup(props2, { emit }) {
59
+ const readonly = useComputedReadonly(props2);
60
+ const readProps = _VkfGeoinputReadCtx.createBindProps(props2);
61
+ const updateProps = _VkfGeoinputUpdateCtx.createBindProps(props2);
62
+ const readEmits = _VkfGeoinputReadCtx.createOnEmits(emit);
63
+ const updateEmits = _VkfGeoinputUpdateCtx.createOnEmits(emit);
64
+ return {
65
+ readonly,
66
+ readProps,
67
+ updateProps,
68
+ readEmits,
69
+ updateEmits
70
+ };
71
+ }
72
+ });
73
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
74
+ const _component_VkfGeoinputRead = resolveComponent("VkfGeoinputRead");
75
+ const _component_VkfGeoinputUpdate = resolveComponent("VkfGeoinputUpdate");
76
+ return _ctx.readonly ? (openBlock(), createBlock(_component_VkfGeoinputRead, mergeProps({ key: 0 }, {
77
+ ..._ctx.readProps,
78
+ ..._ctx.$attrs
79
+ }, toHandlers(_ctx.readEmits)), null, 16)) : (openBlock(), createBlock(_component_VkfGeoinputUpdate, mergeProps({ key: 1 }, {
80
+ ..._ctx.updateProps,
81
+ ..._ctx.$attrs
82
+ }, toHandlers(_ctx.updateEmits)), null, 16));
83
+ }
84
+ var VkfGeoinput = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "index.vue"]]);
85
+
86
+ var types = /*#__PURE__*/Object.freeze({
87
+ __proto__: null
88
+ });
89
+
90
+ VkfGeoinput.install = (app) => {
91
+ app.component(VkfGeoinput.name, VkfGeoinput);
92
+ };
93
+
94
+ export { VkfGeoinput, types as __VkfGeoinput, VkfGeoinput as default };
@@ -0,0 +1,218 @@
1
+ export declare const props: {
2
+ readonly: {
3
+ type: BooleanConstructor;
4
+ default: undefined;
5
+ };
6
+ showMap: {
7
+ type: BooleanConstructor;
8
+ default: boolean;
9
+ };
10
+ /**
11
+ * @description geoinput-read GeojsonLayer 的 type
12
+ */
13
+ type: {
14
+ type: StringConstructor;
15
+ default: string;
16
+ };
17
+ dialogEdit: {
18
+ type: BooleanConstructor;
19
+ default: boolean;
20
+ };
21
+ dialogEditFullscreen: {
22
+ type: BooleanConstructor;
23
+ default: boolean;
24
+ };
25
+ dialogEditTitle: {
26
+ type: StringConstructor;
27
+ default: string;
28
+ };
29
+ modelValue: {
30
+ type: import("vue").PropType<import("geojson").FeatureCollection<import("geojson").Geometry, any>>;
31
+ default: () => import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
32
+ };
33
+ editControls: {
34
+ type: import("vue").PropType<import("../../geoinput-update/src/types").EditType[]>;
35
+ default: () => string[];
36
+ };
37
+ editTypes: {
38
+ type: import("vue").PropType<import("../../geoinput-update/src/types").EditType | import("../../geoinput-update/src/types").EditType[]>;
39
+ default: () => string;
40
+ };
41
+ multiple: {
42
+ type: BooleanConstructor;
43
+ default: boolean;
44
+ };
45
+ mapTo: {
46
+ type: import("vue").PropType<string | import("vue").RendererElement>;
47
+ default: undefined;
48
+ };
49
+ mapCenter: {
50
+ type: import("vue").PropType<import("mapbox-gl").LngLatLike>;
51
+ default: number[];
52
+ };
53
+ editStyles: {
54
+ type: import("vue").PropType<import("@vumap/core/components/control-draw/src/types").StyleLayer[]>;
55
+ default: () => never[];
56
+ };
57
+ slots: {
58
+ type: import("vue").PropType<import("../../geoinput-update/src/types").Slots>;
59
+ default: () => {};
60
+ };
61
+ spikSave: {
62
+ type: BooleanConstructor;
63
+ default: boolean;
64
+ };
65
+ maxlength: {
66
+ type: NumberConstructor;
67
+ required: boolean;
68
+ };
69
+ minlength: {
70
+ type: NumberConstructor;
71
+ required: boolean;
72
+ };
73
+ inputSlots: {
74
+ type: import("vue").PropType<import("../../input/src/types").InputSlots>;
75
+ default: undefined;
76
+ };
77
+ rows: {
78
+ type: NumberConstructor;
79
+ default: undefined;
80
+ };
81
+ required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
82
+ label: StringConstructor;
83
+ labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
84
+ prop: {
85
+ readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
86
+ readonly required: false;
87
+ readonly validator: ((val: unknown) => boolean) | undefined;
88
+ __epPropKey: true;
89
+ };
90
+ rules: {
91
+ readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>) | ((new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>))[], unknown, unknown>>;
92
+ readonly required: false;
93
+ readonly validator: ((val: unknown) => boolean) | undefined;
94
+ __epPropKey: true;
95
+ };
96
+ error: StringConstructor;
97
+ validateStatus: {
98
+ readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "error" | "success" | "validating", unknown>>;
99
+ readonly required: false;
100
+ readonly validator: ((val: unknown) => boolean) | undefined;
101
+ __epPropKey: true;
102
+ };
103
+ for: StringConstructor;
104
+ inlineMessage: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, BooleanConstructor], unknown, unknown, "", boolean>;
105
+ showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
106
+ formItemSize: {
107
+ type: import("vue").PropType<"default" | "small" | "large">;
108
+ default: string;
109
+ };
110
+ formItemSlots: {
111
+ type: import("vue").PropType<import("../../form-item/src/types").FormItemSlots>;
112
+ default: undefined;
113
+ };
114
+ elRef: {
115
+ type: import("vue").PropType<any>;
116
+ required: boolean;
117
+ };
118
+ inline: {
119
+ type: BooleanConstructor;
120
+ default: boolean;
121
+ };
122
+ id: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
123
+ size: {
124
+ readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
125
+ readonly required: false;
126
+ readonly validator: ((val: unknown) => boolean) | undefined;
127
+ __epPropKey: true;
128
+ };
129
+ disabled: BooleanConstructor;
130
+ resize: {
131
+ readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "none" | "both" | "horizontal" | "vertical", unknown>>;
132
+ readonly required: false;
133
+ readonly validator: ((val: unknown) => boolean) | undefined;
134
+ __epPropKey: true;
135
+ };
136
+ autosize: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("element-plus").InputAutoSize & {}) | (() => import("element-plus").InputAutoSize) | ((new (...args: any[]) => import("element-plus").InputAutoSize & {}) | (() => import("element-plus").InputAutoSize))[], unknown, unknown, false, boolean>;
137
+ autocomplete: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "off", boolean>;
138
+ formatter: {
139
+ readonly type: import("vue").PropType<Function>;
140
+ readonly required: false;
141
+ readonly validator: ((val: unknown) => boolean) | undefined;
142
+ __epPropKey: true;
143
+ };
144
+ parser: {
145
+ readonly type: import("vue").PropType<Function>;
146
+ readonly required: false;
147
+ readonly validator: ((val: unknown) => boolean) | undefined;
148
+ __epPropKey: true;
149
+ };
150
+ placeholder: {
151
+ readonly type: import("vue").PropType<string>;
152
+ readonly required: false;
153
+ readonly validator: ((val: unknown) => boolean) | undefined;
154
+ __epPropKey: true;
155
+ };
156
+ form: {
157
+ readonly type: import("vue").PropType<string>;
158
+ readonly required: false;
159
+ readonly validator: ((val: unknown) => boolean) | undefined;
160
+ __epPropKey: true;
161
+ };
162
+ clearable: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
163
+ showPassword: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
164
+ showWordLimit: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
165
+ suffixIcon: {
166
+ readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>>;
167
+ readonly required: false;
168
+ readonly validator: ((val: unknown) => boolean) | undefined;
169
+ __epPropKey: true;
170
+ };
171
+ prefixIcon: {
172
+ readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>>;
173
+ readonly required: false;
174
+ readonly validator: ((val: unknown) => boolean) | undefined;
175
+ __epPropKey: true;
176
+ };
177
+ containerRole: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
178
+ tabindex: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, 0, boolean>;
179
+ validateEvent: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
180
+ inputStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue) | ((new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue))[], unknown, unknown, () => import("element-plus/es/utils").Mutable<{}>, boolean>;
181
+ paint: {
182
+ type: import("vue").PropType<import("mapbox-gl").FillPaint | import("mapbox-gl").LinePaint>;
183
+ default: undefined;
184
+ };
185
+ custom: {
186
+ type: BooleanConstructor;
187
+ default: boolean;
188
+ };
189
+ maxzoom: NumberConstructor;
190
+ minzoom: NumberConstructor;
191
+ cursor: {
192
+ type: StringConstructor;
193
+ default: string;
194
+ };
195
+ before: StringConstructor;
196
+ data: {
197
+ type: import("vue").PropType<any>;
198
+ default: () => import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
199
+ };
200
+ };
201
+ export declare const emits: {
202
+ 'update:modelValue': (e: import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>) => import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
203
+ editUpdate: (e: any) => any;
204
+ input: (value: string) => boolean;
205
+ change: (value: string) => boolean;
206
+ focus: (evt: FocusEvent) => boolean;
207
+ blur: (evt: FocusEvent) => boolean;
208
+ clear: () => boolean;
209
+ mouseleave: (evt: MouseEvent) => boolean;
210
+ mouseenter: (evt: MouseEvent) => boolean;
211
+ keydown: (evt: Event | KeyboardEvent) => boolean;
212
+ compositionstart: (evt: CompositionEvent) => boolean;
213
+ compositionupdate: (evt: CompositionEvent) => boolean;
214
+ compositionend: (evt: CompositionEvent) => boolean;
215
+ layerChange: (layer: import("@vumap/core/components/geojson-add-layer/src/types").LoadEvent) => import("@vumap/core/components/geojson-add-layer/src/types").LoadEvent;
216
+ click: (e: import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent) => import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent;
217
+ load: (e: import("@vumap/core/components/geojson-add-layer/src/types").LoadEvent) => import("@vumap/core/components/geojson-add-layer/src/types").LoadEvent;
218
+ };
@@ -0,0 +1,39 @@
1
+ import { _VkfGeoinputReadCtx } from '@vunk/form/components/geoinput-read';
2
+ import { _VkfGeoinputUpdateCtx } from '@vunk/form/components/geoinput-update';
3
+
4
+ var __defProp = Object.defineProperty;
5
+ var __defProps = Object.defineProperties;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
22
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
+ const props = __spreadProps(__spreadValues(__spreadValues({}, _VkfGeoinputReadCtx.props), _VkfGeoinputUpdateCtx.props), {
24
+ readonly: {
25
+ type: Boolean,
26
+ default: void 0
27
+ },
28
+ showMap: {
29
+ type: Boolean,
30
+ default: true
31
+ },
32
+ type: {
33
+ type: String,
34
+ default: ""
35
+ }
36
+ });
37
+ const emits = __spreadValues(__spreadValues({}, _VkfGeoinputReadCtx.emits), _VkfGeoinputUpdateCtx.emits);
38
+
39
+ export { emits, props };