@bagelink/vue 0.0.1054 → 0.0.1056
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/dist/components/BglComponent.vue.d.ts.map +1 -1
- package/dist/components/form/BglField.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SelectInput.vue.d.ts +0 -4
- package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/TelInput.vue.d.ts +1 -1
- package/dist/components/form/inputs/TelInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/TextInput.vue.d.ts +0 -2
- package/dist/components/form/inputs/TextInput.vue.d.ts.map +1 -1
- package/dist/index.cjs +31 -21
- package/dist/index.mjs +31 -21
- package/dist/style.css +13 -13
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/BglComponent.vue +4 -1
- package/src/components/form/BglField.vue +4 -1
- package/src/components/form/inputs/TextInput.vue +6 -8
- package/src/utils/index.ts +9 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BglComponent.vue.d.ts","sourceRoot":"","sources":["../../src/components/BglComponent.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BglComponent.vue.d.ts","sourceRoot":"","sources":["../../src/components/BglComponent.vue"],"names":[],"mappings":"AA4LA,OAAO,EAIN,KAAK,KAAK,EAYV,MAAM,eAAe,CAAA;yBAGL,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,eAChC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WAgOxD,mBAAmB,CAAC;;;eA5NtB,KAAK,CAAC,CAAC,CAAC;aACV,MAAM;qBACE,GAAG;qBACH,MAAM;KAyNmG,CAAC,4BAA2B;oBAChI,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;yBAjCgB,GAAG;;;OAsCpB,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA1OzE,wBA0O4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BglField.vue.d.ts","sourceRoot":"","sources":["../../../src/components/form/BglField.vue"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"BglField.vue.d.ts","sourceRoot":"","sources":["../../../src/components/form/BglField.vue"],"names":[],"mappings":"AAAA,OA2IO,EAIN,KAAK,KAAK,EAYV,MAAM,eAAe,CAAA;yBAML,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,eAChC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WA6KxD,mBAAmB,CAAC;;;eAzKtB,KAAK,CAAC,CAAC,CAAC;kBACL,MAAM;qBACH,GAAG;qBACH,MAAM;KAsKmG,CAAC,4BAA2B;oBAChI,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;;OAKD,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAvLzE,wBAuL4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -164,7 +164,6 @@ declare function __VLS_template(): {
|
|
|
164
164
|
lines?: number | string;
|
|
165
165
|
autocomplete?: AutoFillField;
|
|
166
166
|
autofocus?: boolean;
|
|
167
|
-
debounceDelay?: number;
|
|
168
167
|
onFocusout?: (e: FocusEvent) => void;
|
|
169
168
|
}> & Readonly<{
|
|
170
169
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
@@ -178,7 +177,6 @@ declare function __VLS_template(): {
|
|
|
178
177
|
}, import('vue').PublicProps, {
|
|
179
178
|
type: string;
|
|
180
179
|
modelValue: string | number;
|
|
181
|
-
debounceDelay: number;
|
|
182
180
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
183
181
|
P: {};
|
|
184
182
|
B: {};
|
|
@@ -211,7 +209,6 @@ declare function __VLS_template(): {
|
|
|
211
209
|
lines?: number | string;
|
|
212
210
|
autocomplete?: AutoFillField;
|
|
213
211
|
autofocus?: boolean;
|
|
214
|
-
debounceDelay?: number;
|
|
215
212
|
onFocusout?: (e: FocusEvent) => void;
|
|
216
213
|
}> & Readonly<{
|
|
217
214
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
@@ -222,7 +219,6 @@ declare function __VLS_template(): {
|
|
|
222
219
|
}, {}, {}, {}, {
|
|
223
220
|
type: string;
|
|
224
221
|
modelValue: string | number;
|
|
225
|
-
debounceDelay: number;
|
|
226
222
|
}> | null;
|
|
227
223
|
selectOptions: HTMLDivElement;
|
|
228
224
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/SelectInput.vue"],"names":[],"mappings":"AAsaA,OAAO,EAMN,KAAK,aAAa,EAClB,KAAK,MAAM,EAEX,MAAM,eAAe,CAAA;AAEtB,OAAO,wBAAwB,CAAA;AAI/B,UAAU,SAAS;IAClB,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;CAChD;AA+MD,iBAAS,cAAc;WAoRT,OAAO,IAA6B;;sBAXvB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA/DkD,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DACxI,GAAG
|
|
1
|
+
{"version":3,"file":"SelectInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/SelectInput.vue"],"names":[],"mappings":"AAsaA,OAAO,EAMN,KAAK,aAAa,EAClB,KAAK,MAAM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,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -79,8 +79,8 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
79
79
|
modelValue: string;
|
|
80
80
|
required: boolean;
|
|
81
81
|
autocomplete: "on" | "off" | "tel";
|
|
82
|
-
debounceDelay: number;
|
|
83
82
|
searchable: boolean;
|
|
83
|
+
debounceDelay: number;
|
|
84
84
|
allCountries: Country[];
|
|
85
85
|
autoFormat: boolean;
|
|
86
86
|
customValidate: boolean | RegExp;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TelInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/TelInput.vue"],"names":[],"mappings":"AA+cA,OAAO,EACN,KAAK,OAAO,EAOZ,MAAM,eAAe,CAAA;AAEtB,OAAO,EAEN,KAAK,YAAY,EAEjB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,UAAU,EAAoB,MAAM,KAAK,CAAA;AAEjE,MAAM,WAAW,KAAK;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,IAAI,GAAG,KAAK,GAAG,KAAK,CAAA;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,OAAO,EAAE,CAAA;IACxB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACjC,cAAc,CAAC,EAAE,MAAM,GAAG,M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AAC;CACrB,GAAG,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;UArTR,YAAY;cANR,OAAO;iBAPJ,MAAM;gBAiUN,MAAM;cAhUT,OAAO;kBAFH,IAAI,GAAG,KAAK,GAAG,KAAK;gBAStB,OAAO;mBASJ,MAAM;kBAdP,OAAO,EAAE;gBACX,OAAO;oBACH,OAAO,GAAG,MAAM;oBAChB,MAAM,GAAG,MAAM;wBAGX,OAAO;sBAGT,MAAM,EAAE;mBAEX,MAAM,EAAE;wBACH,MAAM,EAAE;;AAkf9B,wBAYG"}
|
|
@@ -24,7 +24,6 @@ type __VLS_Props = {
|
|
|
24
24
|
lines?: number | string;
|
|
25
25
|
autocomplete?: AutoFillField;
|
|
26
26
|
autofocus?: boolean;
|
|
27
|
-
debounceDelay?: number;
|
|
28
27
|
onFocusout?: (e: FocusEvent) => void;
|
|
29
28
|
};
|
|
30
29
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
@@ -39,7 +38,6 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
39
38
|
}>, {
|
|
40
39
|
type: string;
|
|
41
40
|
modelValue: string | number;
|
|
42
|
-
debounceDelay: number;
|
|
43
41
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
44
42
|
export default _default;
|
|
45
43
|
//# sourceMappingURL=TextInput.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/TextInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/TextInput.vue"],"names":[],"mappings":"AA6NA,OAAO,EAGN,KAAK,aAAa,EAClB,MAAM,eAAe,CAAA;AAKtB,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,gBAAgB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAA;IACzC,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,SAAS,CAAC,EAAE,aAAa,CAAA;IACzB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,YAAY,CAAC,EAAE,aAAa,CAAA;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAA;CACpC,CAAC;;;;;;;;;;;UAXM,MAAM;gBARA,MAAM,GAAG,MAAM;;AAuM9B,wBAUG"}
|
package/dist/index.cjs
CHANGED
|
@@ -525,7 +525,10 @@ const _sfc_main$10 = /* @__PURE__ */ vue.defineComponent({
|
|
|
525
525
|
);
|
|
526
526
|
const computedAttrs = vue.computed(() => {
|
|
527
527
|
const attrs = { ...customAttrs.value, ...props2.field.attrs };
|
|
528
|
-
|
|
528
|
+
const boundAttrs = bindAttrs(attrs, fieldData.value, props2.modelValue);
|
|
529
|
+
return Object.fromEntries(
|
|
530
|
+
Object.entries(boundAttrs).filter(([_2, value]) => value !== void 0)
|
|
531
|
+
);
|
|
529
532
|
});
|
|
530
533
|
const computedClass = vue.computed(
|
|
531
534
|
() => {
|
|
@@ -10032,7 +10035,10 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
|
|
|
10032
10035
|
const computedAttrs = vue.computed(() => {
|
|
10033
10036
|
const attrs = { ...customAttrs.value, ...props2.field.attrs };
|
|
10034
10037
|
delete attrs.schema;
|
|
10035
|
-
|
|
10038
|
+
const boundAttrs = bindAttrs(attrs, fieldData.value, formState == null ? void 0 : formState.data.value);
|
|
10039
|
+
return Object.fromEntries(
|
|
10040
|
+
Object.entries(boundAttrs).filter(([_2, value]) => value !== void 0)
|
|
10041
|
+
);
|
|
10036
10042
|
});
|
|
10037
10043
|
const computedClass = vue.computed(
|
|
10038
10044
|
() => {
|
|
@@ -30447,7 +30453,6 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
|
30447
30453
|
lines: {},
|
|
30448
30454
|
autocomplete: {},
|
|
30449
30455
|
autofocus: { type: Boolean },
|
|
30450
|
-
debounceDelay: { default: 300 },
|
|
30451
30456
|
onFocusout: {}
|
|
30452
30457
|
},
|
|
30453
30458
|
emits: ["update:modelValue", "debounce"],
|
|
@@ -30462,13 +30467,13 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
|
30462
30467
|
if (props2.multiline || props2.code) return 4;
|
|
30463
30468
|
return 1;
|
|
30464
30469
|
});
|
|
30465
|
-
|
|
30466
|
-
emit2("
|
|
30467
|
-
}
|
|
30470
|
+
function emitValue() {
|
|
30471
|
+
emit2("update:modelValue", inputVal.value);
|
|
30472
|
+
}
|
|
30468
30473
|
function updateInputVal() {
|
|
30469
30474
|
if (props2.disabled) return;
|
|
30470
|
-
|
|
30471
|
-
|
|
30475
|
+
emitValue();
|
|
30476
|
+
debounce(emitValue, 300);
|
|
30472
30477
|
}
|
|
30473
30478
|
vue.watch(
|
|
30474
30479
|
() => props2.modelValue,
|
|
@@ -30563,7 +30568,7 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
|
30563
30568
|
};
|
|
30564
30569
|
}
|
|
30565
30570
|
});
|
|
30566
|
-
const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-
|
|
30571
|
+
const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-3c20ae39"]]);
|
|
30567
30572
|
const _hoisted_1$j = ["title"];
|
|
30568
30573
|
const _hoisted_2$a = ["id", "required"];
|
|
30569
30574
|
const _hoisted_3$8 = ["for"];
|
|
@@ -33293,6 +33298,12 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
33293
33298
|
pointerPosX.value = newMousePosX;
|
|
33294
33299
|
pointerPosY.value = newMousePosY;
|
|
33295
33300
|
}
|
|
33301
|
+
function onInteractionEnd() {
|
|
33302
|
+
debounce(() => {
|
|
33303
|
+
limit();
|
|
33304
|
+
panLocked.value = scale.value === 1;
|
|
33305
|
+
}, 100);
|
|
33306
|
+
}
|
|
33296
33307
|
function limit() {
|
|
33297
33308
|
if (scale.value < __props.minScale) {
|
|
33298
33309
|
scale.value = __props.minScale;
|
|
@@ -33347,6 +33358,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
33347
33358
|
function onMouseWheelDo(wheelDelta) {
|
|
33348
33359
|
const scaleDelta = 1.25 ** (wheelDelta / 120);
|
|
33349
33360
|
tryToScale(scaleDelta);
|
|
33361
|
+
onInteractionEnd();
|
|
33350
33362
|
}
|
|
33351
33363
|
function onMouseDown(ev) {
|
|
33352
33364
|
refreshContainerPos();
|
|
@@ -33358,6 +33370,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
33358
33370
|
}
|
|
33359
33371
|
function onMouseUp() {
|
|
33360
33372
|
isPointerDown.value = false;
|
|
33373
|
+
onInteractionEnd();
|
|
33361
33374
|
document.removeEventListener("mouseup", onMouseUp);
|
|
33362
33375
|
document.removeEventListener("mousemove", onMouseMove);
|
|
33363
33376
|
}
|
|
@@ -33384,6 +33397,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
33384
33397
|
if (ev.touches.length === 0) {
|
|
33385
33398
|
isPointerDown.value = false;
|
|
33386
33399
|
if (Math.abs(scale.value - 1) < 0.1) scale.value = 1;
|
|
33400
|
+
onInteractionEnd();
|
|
33387
33401
|
} else if (ev.touches.length === 1) {
|
|
33388
33402
|
pointerPosX.value = ev.touches[0].clientX;
|
|
33389
33403
|
pointerPosY.value = ev.touches[0].clientY;
|
|
@@ -34475,18 +34489,14 @@ function formatString(str, format2) {
|
|
|
34475
34489
|
}
|
|
34476
34490
|
return str;
|
|
34477
34491
|
}
|
|
34478
|
-
|
|
34479
|
-
|
|
34480
|
-
|
|
34481
|
-
|
|
34482
|
-
|
|
34483
|
-
|
|
34484
|
-
|
|
34485
|
-
|
|
34486
|
-
clearTimeout(timeout);
|
|
34487
|
-
timeout = setTimeout(later, wait);
|
|
34488
|
-
if (callNow) callback.apply(this, args);
|
|
34489
|
-
};
|
|
34492
|
+
const debouncers = /* @__PURE__ */ new Map();
|
|
34493
|
+
function debounce(fn2, wait = 500) {
|
|
34494
|
+
clearTimeout(debouncers.get(fn2));
|
|
34495
|
+
const timeout = setTimeout(() => {
|
|
34496
|
+
fn2();
|
|
34497
|
+
debouncers.delete(fn2);
|
|
34498
|
+
}, wait);
|
|
34499
|
+
debouncers.set(fn2, timeout);
|
|
34490
34500
|
}
|
|
34491
34501
|
function keyToLabel(key) {
|
|
34492
34502
|
if (key === void 0) return key;
|
package/dist/index.mjs
CHANGED
|
@@ -523,7 +523,10 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
523
523
|
);
|
|
524
524
|
const computedAttrs = computed(() => {
|
|
525
525
|
const attrs = { ...customAttrs.value, ...props2.field.attrs };
|
|
526
|
-
|
|
526
|
+
const boundAttrs = bindAttrs(attrs, fieldData.value, props2.modelValue);
|
|
527
|
+
return Object.fromEntries(
|
|
528
|
+
Object.entries(boundAttrs).filter(([_2, value]) => value !== void 0)
|
|
529
|
+
);
|
|
527
530
|
});
|
|
528
531
|
const computedClass = computed(
|
|
529
532
|
() => {
|
|
@@ -10030,7 +10033,10 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
10030
10033
|
const computedAttrs = computed(() => {
|
|
10031
10034
|
const attrs = { ...customAttrs.value, ...props2.field.attrs };
|
|
10032
10035
|
delete attrs.schema;
|
|
10033
|
-
|
|
10036
|
+
const boundAttrs = bindAttrs(attrs, fieldData.value, formState == null ? void 0 : formState.data.value);
|
|
10037
|
+
return Object.fromEntries(
|
|
10038
|
+
Object.entries(boundAttrs).filter(([_2, value]) => value !== void 0)
|
|
10039
|
+
);
|
|
10034
10040
|
});
|
|
10035
10041
|
const computedClass = computed(
|
|
10036
10042
|
() => {
|
|
@@ -30445,7 +30451,6 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
30445
30451
|
lines: {},
|
|
30446
30452
|
autocomplete: {},
|
|
30447
30453
|
autofocus: { type: Boolean },
|
|
30448
|
-
debounceDelay: { default: 300 },
|
|
30449
30454
|
onFocusout: {}
|
|
30450
30455
|
},
|
|
30451
30456
|
emits: ["update:modelValue", "debounce"],
|
|
@@ -30460,13 +30465,13 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
30460
30465
|
if (props2.multiline || props2.code) return 4;
|
|
30461
30466
|
return 1;
|
|
30462
30467
|
});
|
|
30463
|
-
|
|
30464
|
-
emit2("
|
|
30465
|
-
}
|
|
30468
|
+
function emitValue() {
|
|
30469
|
+
emit2("update:modelValue", inputVal.value);
|
|
30470
|
+
}
|
|
30466
30471
|
function updateInputVal() {
|
|
30467
30472
|
if (props2.disabled) return;
|
|
30468
|
-
|
|
30469
|
-
|
|
30473
|
+
emitValue();
|
|
30474
|
+
debounce(emitValue, 300);
|
|
30470
30475
|
}
|
|
30471
30476
|
watch(
|
|
30472
30477
|
() => props2.modelValue,
|
|
@@ -30561,7 +30566,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
30561
30566
|
};
|
|
30562
30567
|
}
|
|
30563
30568
|
});
|
|
30564
|
-
const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-
|
|
30569
|
+
const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-3c20ae39"]]);
|
|
30565
30570
|
const _hoisted_1$j = ["title"];
|
|
30566
30571
|
const _hoisted_2$a = ["id", "required"];
|
|
30567
30572
|
const _hoisted_3$8 = ["for"];
|
|
@@ -33291,6 +33296,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
33291
33296
|
pointerPosX.value = newMousePosX;
|
|
33292
33297
|
pointerPosY.value = newMousePosY;
|
|
33293
33298
|
}
|
|
33299
|
+
function onInteractionEnd() {
|
|
33300
|
+
debounce(() => {
|
|
33301
|
+
limit();
|
|
33302
|
+
panLocked.value = scale.value === 1;
|
|
33303
|
+
}, 100);
|
|
33304
|
+
}
|
|
33294
33305
|
function limit() {
|
|
33295
33306
|
if (scale.value < __props.minScale) {
|
|
33296
33307
|
scale.value = __props.minScale;
|
|
@@ -33345,6 +33356,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
33345
33356
|
function onMouseWheelDo(wheelDelta) {
|
|
33346
33357
|
const scaleDelta = 1.25 ** (wheelDelta / 120);
|
|
33347
33358
|
tryToScale(scaleDelta);
|
|
33359
|
+
onInteractionEnd();
|
|
33348
33360
|
}
|
|
33349
33361
|
function onMouseDown(ev) {
|
|
33350
33362
|
refreshContainerPos();
|
|
@@ -33356,6 +33368,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
33356
33368
|
}
|
|
33357
33369
|
function onMouseUp() {
|
|
33358
33370
|
isPointerDown.value = false;
|
|
33371
|
+
onInteractionEnd();
|
|
33359
33372
|
document.removeEventListener("mouseup", onMouseUp);
|
|
33360
33373
|
document.removeEventListener("mousemove", onMouseMove);
|
|
33361
33374
|
}
|
|
@@ -33382,6 +33395,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
33382
33395
|
if (ev.touches.length === 0) {
|
|
33383
33396
|
isPointerDown.value = false;
|
|
33384
33397
|
if (Math.abs(scale.value - 1) < 0.1) scale.value = 1;
|
|
33398
|
+
onInteractionEnd();
|
|
33385
33399
|
} else if (ev.touches.length === 1) {
|
|
33386
33400
|
pointerPosX.value = ev.touches[0].clientX;
|
|
33387
33401
|
pointerPosY.value = ev.touches[0].clientY;
|
|
@@ -34473,18 +34487,14 @@ function formatString(str, format2) {
|
|
|
34473
34487
|
}
|
|
34474
34488
|
return str;
|
|
34475
34489
|
}
|
|
34476
|
-
|
|
34477
|
-
|
|
34478
|
-
|
|
34479
|
-
|
|
34480
|
-
|
|
34481
|
-
|
|
34482
|
-
|
|
34483
|
-
|
|
34484
|
-
clearTimeout(timeout);
|
|
34485
|
-
timeout = setTimeout(later, wait);
|
|
34486
|
-
if (callNow) callback.apply(this, args);
|
|
34487
|
-
};
|
|
34490
|
+
const debouncers = /* @__PURE__ */ new Map();
|
|
34491
|
+
function debounce(fn2, wait = 500) {
|
|
34492
|
+
clearTimeout(debouncers.get(fn2));
|
|
34493
|
+
const timeout = setTimeout(() => {
|
|
34494
|
+
fn2();
|
|
34495
|
+
debouncers.delete(fn2);
|
|
34496
|
+
}, wait);
|
|
34497
|
+
debouncers.set(fn2, timeout);
|
|
34488
34498
|
}
|
|
34489
34499
|
function keyToLabel(key) {
|
|
34490
34500
|
if (key === void 0) return key;
|
package/dist/style.css
CHANGED
|
@@ -1615,58 +1615,58 @@ line-height: 1.65;
|
|
|
1615
1615
|
font-size: var(--label-font-size);
|
|
1616
1616
|
}
|
|
1617
1617
|
|
|
1618
|
-
.bagel-input textarea[data-v-
|
|
1618
|
+
.bagel-input textarea[data-v-3c20ae39] {
|
|
1619
1619
|
min-height: unset;
|
|
1620
1620
|
font-size: var(--input-font-size);
|
|
1621
1621
|
}
|
|
1622
|
-
.bagel-input.text-input textarea[data-v-
|
|
1622
|
+
.bagel-input.text-input textarea[data-v-3c20ae39] {
|
|
1623
1623
|
resize: none;
|
|
1624
1624
|
}
|
|
1625
|
-
.code textarea[data-v-
|
|
1625
|
+
.code textarea[data-v-3c20ae39] {
|
|
1626
1626
|
font-family: 'Inconsolata', monospace;
|
|
1627
1627
|
background: var(--bgl-code-bg) !important;
|
|
1628
1628
|
color: var(--bgl-light-text) !important;
|
|
1629
1629
|
}
|
|
1630
|
-
.code textarea[data-v-
|
|
1630
|
+
.code textarea[data-v-3c20ae39]::placeholder {
|
|
1631
1631
|
color: var(--bgl-light-text) !important;
|
|
1632
1632
|
opacity: 0.3;
|
|
1633
1633
|
}
|
|
1634
|
-
.bagel-input.small[data-v-
|
|
1634
|
+
.bagel-input.small[data-v-3c20ae39] {
|
|
1635
1635
|
margin-bottom: 0;
|
|
1636
1636
|
height: 30px;
|
|
1637
1637
|
}
|
|
1638
|
-
.bagel-input.dense label[data-v-
|
|
1638
|
+
.bagel-input.dense label[data-v-3c20ae39] {
|
|
1639
1639
|
display: flex;
|
|
1640
1640
|
align-items: center;
|
|
1641
1641
|
gap: 0.5rem;
|
|
1642
1642
|
}
|
|
1643
|
-
.bagel-input input[data-v-
|
|
1643
|
+
.bagel-input input[data-v-3c20ae39]:disabled {
|
|
1644
1644
|
background: #f5f5f5;
|
|
1645
1645
|
}
|
|
1646
|
-
.bagel-input label[data-v-
|
|
1646
|
+
.bagel-input label[data-v-3c20ae39] {
|
|
1647
1647
|
font-size: var(--label-font-size);
|
|
1648
1648
|
}
|
|
1649
|
-
.textInputIconWrap .bgl_icon-font[data-v-
|
|
1649
|
+
.textInputIconWrap .bgl_icon-font[data-v-3c20ae39] {
|
|
1650
1650
|
color: var(--input-color);
|
|
1651
1651
|
position: absolute;
|
|
1652
1652
|
inset-inline-end:calc(var(--input-height) / 3 - 0.25rem);
|
|
1653
1653
|
margin-top: calc(var(--input-height) / 2 + 0.1rem);
|
|
1654
1654
|
line-height: 0;
|
|
1655
1655
|
}
|
|
1656
|
-
.textInputIconWrap input[data-v-
|
|
1656
|
+
.textInputIconWrap input[data-v-3c20ae39]{
|
|
1657
1657
|
padding-inline-end: calc(var(--input-height) / 3 + 1.5rem);
|
|
1658
1658
|
}
|
|
1659
|
-
.txtInputIconStart .iconStart[data-v-
|
|
1659
|
+
.txtInputIconStart .iconStart[data-v-3c20ae39] {
|
|
1660
1660
|
color: var(--input-color);
|
|
1661
1661
|
position: absolute;
|
|
1662
1662
|
inset-inline-start:calc(var(--input-height) / 3 - 0.25rem);
|
|
1663
1663
|
margin-top: calc(var(--input-height) / 2 );
|
|
1664
1664
|
line-height: 0;
|
|
1665
1665
|
}
|
|
1666
|
-
.txtInputIconStart input[data-v-
|
|
1666
|
+
.txtInputIconStart input[data-v-3c20ae39], .txtInputIconStart textarea[data-v-3c20ae39]{
|
|
1667
1667
|
padding-inline-start: calc(var(--input-height) / 3 + 1.5rem);
|
|
1668
1668
|
}
|
|
1669
|
-
.bagel-input.small textarea[data-v-
|
|
1669
|
+
.bagel-input.small textarea[data-v-3c20ae39] {
|
|
1670
1670
|
height: 30px;
|
|
1671
1671
|
}
|
|
1672
1672
|
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Attributes, BglFormSchemaT } from '..';
|
|
2
|
-
export declare function debounce
|
|
2
|
+
export declare function debounce(fn: () => void, wait?: number): void;
|
|
3
3
|
export declare function keyToLabel(key?: string): string | undefined;
|
|
4
4
|
export declare function copyText(text: string, cb?: (msg: string) => void): Promise<void>;
|
|
5
5
|
export declare function initials(...strArr: string[]): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAA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C,EAClC,IAAI,CAAC,EAAE,GAAG,EAAE,EACZ,UAAU,CAAC,EAAE,MAAM,EAAE,GACnB,cAAc,CAAC,CAAC,CAAC,CAWnB;AAED,wBAAgB,KAAK,CAAC,EAAE,GAAE,MAAY,oBAErC;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAoBlF;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAatD;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,UAIvC;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EAAE,aAAa,SAAO,GAAG,MAAM,GAAG,SAAS,CAG/G;AAED,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAA;AAElD,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA"}
|
package/package.json
CHANGED
|
@@ -136,7 +136,10 @@ const computedOptions = $computed(
|
|
|
136
136
|
|
|
137
137
|
const computedAttrs = $computed(() => {
|
|
138
138
|
const attrs = { ...customAttrs, ...props.field.attrs }
|
|
139
|
-
|
|
139
|
+
const boundAttrs = bindAttrs(attrs, fieldData, props.modelValue)
|
|
140
|
+
return Object.fromEntries(
|
|
141
|
+
Object.entries(boundAttrs).filter(([_, value]) => value !== undefined)
|
|
142
|
+
)
|
|
140
143
|
})
|
|
141
144
|
|
|
142
145
|
const computedClass = $computed(
|
|
@@ -95,7 +95,10 @@ const computedOptions = $computed(
|
|
|
95
95
|
const computedAttrs = $computed(() => {
|
|
96
96
|
const attrs = { ...customAttrs, ...props.field.attrs }
|
|
97
97
|
delete attrs.schema
|
|
98
|
-
|
|
98
|
+
const boundAttrs = bindAttrs(attrs, fieldData, formState?.data.value)
|
|
99
|
+
return Object.fromEntries(
|
|
100
|
+
Object.entries(boundAttrs).filter(([_, value]) => value !== undefined)
|
|
101
|
+
)
|
|
99
102
|
})
|
|
100
103
|
|
|
101
104
|
const computedClass = $computed(
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import {
|
|
3
|
+
debounce,
|
|
3
4
|
MaterialIcon,
|
|
4
5
|
type MaterialIcons,
|
|
5
|
-
useDebounceFn,
|
|
6
6
|
} from '@bagelink/vue'
|
|
7
7
|
import { onMounted, watch } from 'vue'
|
|
8
8
|
|
|
@@ -30,13 +30,11 @@ const props = withDefaults(
|
|
|
30
30
|
lines?: number | string
|
|
31
31
|
autocomplete?: AutoFillField
|
|
32
32
|
autofocus?: boolean
|
|
33
|
-
debounceDelay?: number
|
|
34
33
|
onFocusout?: (e: FocusEvent) => void
|
|
35
34
|
}>(),
|
|
36
35
|
{
|
|
37
36
|
type: 'text',
|
|
38
37
|
modelValue: '',
|
|
39
|
-
debounceDelay: 300,
|
|
40
38
|
},
|
|
41
39
|
)
|
|
42
40
|
const emit = defineEmits(['update:modelValue', 'debounce'])
|
|
@@ -51,14 +49,14 @@ const rows = $computed(() => {
|
|
|
51
49
|
return 1
|
|
52
50
|
})
|
|
53
51
|
|
|
54
|
-
|
|
52
|
+
function emitValue() {
|
|
53
|
+
emit('update:modelValue', inputVal as string)
|
|
54
|
+
}
|
|
55
55
|
|
|
56
56
|
function updateInputVal() {
|
|
57
57
|
if (props.disabled) return
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
void debounceUpdate()
|
|
58
|
+
emitValue()
|
|
59
|
+
debounce(emitValue, 300)
|
|
62
60
|
}
|
|
63
61
|
|
|
64
62
|
watch(
|
package/src/utils/index.ts
CHANGED
|
@@ -1,24 +1,14 @@
|
|
|
1
1
|
import type { Attributes, BglFormSchemaT } from '@bagelink/vue'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
timeout = undefined
|
|
13
|
-
if (!immediate) callback.apply(this, args)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const callNow = immediate && timeout === undefined
|
|
17
|
-
clearTimeout(timeout)
|
|
18
|
-
timeout = setTimeout(later, wait)
|
|
19
|
-
|
|
20
|
-
if (callNow) callback.apply(this, args)
|
|
21
|
-
}
|
|
3
|
+
const debouncers = new Map<() => void, ReturnType<typeof setTimeout>>()
|
|
4
|
+
|
|
5
|
+
export function debounce(fn: () => void, wait: number = 500) {
|
|
6
|
+
clearTimeout(debouncers.get(fn))
|
|
7
|
+
const timeout = setTimeout(() => {
|
|
8
|
+
fn()
|
|
9
|
+
debouncers.delete(fn)
|
|
10
|
+
}, wait)
|
|
11
|
+
debouncers.set(fn, timeout)
|
|
22
12
|
}
|
|
23
13
|
|
|
24
14
|
export function keyToLabel(key?: string): string | undefined {
|