@bagelink/vue 1.9.41 → 1.9.43
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/form-flow/FormFlow.vue.d.ts +0 -4
- package/dist/form-flow/FormFlow.vue.d.ts.map +1 -1
- package/dist/index.cjs +10 -46
- package/dist/index.mjs +10 -46
- package/dist/style.css +5 -5
- package/package.json +1 -1
- package/src/form-flow/FormFlow.vue +2 -23
- package/vite.config.ts +1 -1
|
@@ -40,10 +40,6 @@ declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable
|
|
|
40
40
|
errors: {
|
|
41
41
|
[x: string]: string;
|
|
42
42
|
};
|
|
43
|
-
debugInfo: {
|
|
44
|
-
handleSubmitType: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
|
|
45
|
-
validateAllType: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
|
|
46
|
-
};
|
|
47
43
|
}): any;
|
|
48
44
|
};
|
|
49
45
|
emit: ((evt: "submit", value: T) => void) & ((evt: "update:modelValue", value: T) => void);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormFlow.vue.d.ts","sourceRoot":"","sources":["../../src/form-flow/FormFlow.vue"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"FormFlow.vue.d.ts","sourceRoot":"","sources":["../../src/form-flow/FormFlow.vue"],"names":[],"mappings":"AAAA,OAoiBO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAqBjE,MAAM,WAAW,KAAK,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IACzE,MAAM,EAAE,gBAAgB,CAAA;IACxB,UAAU,CAAC,EAAE,CAAC,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAChC,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC/B;yBAEgB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7C,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WA6lBO,mBAAmB,CAAC;;;iLAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB;wBAtSvB,OAAO;+BAmCD,KAAK,KAAG,OAAO;MAmQwB,GAAG,IAAI;WACpE,GAAG;;;;;;wBA5KO,GAAG;UA6HgE,GAAG;;;;;;;qBA/Y5D,MAAM;uBAAS,YAAY;;YAiZ1B,GAAG;;6BAvNF,KAAK,KAAG,OAAO;4BAnCrB,OAAO;;;;;YA2PF,GAAG;;;EAgD5B,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAxmBzE,wBAwmB4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -53372,59 +53372,36 @@ var FormFlow_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, v
|
|
|
53372
53372
|
return field._component != null;
|
|
53373
53373
|
}
|
|
53374
53374
|
function validateAll() {
|
|
53375
|
-
console.log("[FormFlow] validateAll started");
|
|
53376
53375
|
let isValid = true;
|
|
53377
53376
|
const newErrors = {};
|
|
53378
53377
|
for (const { key, field } of visibleFields.value) {
|
|
53379
53378
|
const value = getFieldValue(key);
|
|
53380
|
-
console.log(`[FormFlow] Validating field "${key}":`, {
|
|
53381
|
-
value,
|
|
53382
|
-
required: field._config.required,
|
|
53383
|
-
type: field._type
|
|
53384
|
-
});
|
|
53385
53379
|
if (field._config.required === true) {
|
|
53386
53380
|
if (value == null || value === "" || Array.isArray(value) && value.length === 0) {
|
|
53387
|
-
|
|
53388
|
-
console.log(`[FormFlow] Field "${key}" is required but empty, error:`, errorMsg);
|
|
53389
|
-
newErrors[key] = errorMsg;
|
|
53381
|
+
newErrors[key] = field._config.requiredMessage || "This field is required";
|
|
53390
53382
|
isValid = false;
|
|
53391
53383
|
continue;
|
|
53392
53384
|
}
|
|
53393
53385
|
}
|
|
53394
|
-
if (field._validations != null) {
|
|
53395
|
-
|
|
53396
|
-
|
|
53397
|
-
|
|
53398
|
-
|
|
53399
|
-
|
|
53400
|
-
newErrors[key] = result$1;
|
|
53401
|
-
isValid = false;
|
|
53402
|
-
break;
|
|
53403
|
-
}
|
|
53386
|
+
if (field._validations != null) for (const validate of field._validations) {
|
|
53387
|
+
const result$1 = validate(value);
|
|
53388
|
+
if (result$1 !== true) {
|
|
53389
|
+
newErrors[key] = result$1;
|
|
53390
|
+
isValid = false;
|
|
53391
|
+
break;
|
|
53404
53392
|
}
|
|
53405
53393
|
}
|
|
53406
53394
|
}
|
|
53407
|
-
console.log("[FormFlow] validateAll complete:", {
|
|
53408
|
-
isValid,
|
|
53409
|
-
newErrors
|
|
53410
|
-
});
|
|
53411
53395
|
validationErrors.value = newErrors;
|
|
53412
53396
|
return isValid;
|
|
53413
53397
|
}
|
|
53414
53398
|
function handleSubmit(event) {
|
|
53415
|
-
console.log("[FormFlow] handleSubmit called", {
|
|
53416
|
-
event,
|
|
53417
|
-
hasEvent: !!event
|
|
53418
|
-
});
|
|
53419
53399
|
if (event) event.preventDefault();
|
|
53420
53400
|
hasSubmitted.value = true;
|
|
53421
|
-
console.log("[FormFlow] Before validateAll, visibleFields count:", visibleFields.value.length);
|
|
53422
53401
|
const isValid = validateAll();
|
|
53423
|
-
console.log("[FormFlow] After validateAll, isValid:", isValid, "validationErrors:", validationErrors.value);
|
|
53424
53402
|
if (!isValid) {
|
|
53425
53403
|
event?.stopPropagation();
|
|
53426
53404
|
const firstErrorKey = visibleFields.value.find(({ key }) => validationErrors.value[key])?.key;
|
|
53427
|
-
console.log("[FormFlow] Validation failed, firstErrorKey:", firstErrorKey);
|
|
53428
53405
|
if (firstErrorKey && formElement.value) {
|
|
53429
53406
|
const fieldElement = formElement.value.querySelector(`[name="${firstErrorKey}"]`) || formElement.value.querySelector(`[id="${firstErrorKey}"]`) || formElement.value.querySelector(`input, select, textarea`);
|
|
53430
53407
|
if (fieldElement) {
|
|
@@ -53437,22 +53414,13 @@ var FormFlow_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, v
|
|
|
53437
53414
|
}, 300);
|
|
53438
53415
|
}
|
|
53439
53416
|
}
|
|
53440
|
-
} else
|
|
53441
|
-
console.log("[FormFlow] Validation passed, emitting submit with formData:", formData.value);
|
|
53442
|
-
emit$1("submit", formData.value);
|
|
53443
|
-
}
|
|
53417
|
+
} else emit$1("submit", formData.value);
|
|
53444
53418
|
return isValid;
|
|
53445
53419
|
}
|
|
53446
53420
|
__expose({
|
|
53447
53421
|
validate: validateAll,
|
|
53448
53422
|
handleSubmit
|
|
53449
53423
|
});
|
|
53450
|
-
console.log("[FormFlow] Component mounted", {
|
|
53451
|
-
version: "1.9.39-debug",
|
|
53452
|
-
schemaFields: Object.keys(props$1.schema._fields).length,
|
|
53453
|
-
handleSubmitDefined: !!handleSubmit,
|
|
53454
|
-
validateAllDefined: !!validateAll
|
|
53455
|
-
});
|
|
53456
53424
|
return (_ctx, _cache) => {
|
|
53457
53425
|
const _component_FormFlow = (0, vue.resolveComponent)("FormFlow", true);
|
|
53458
53426
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("form", {
|
|
@@ -53517,17 +53485,13 @@ var FormFlow_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, v
|
|
|
53517
53485
|
submit: handleSubmit,
|
|
53518
53486
|
validate: validateAll,
|
|
53519
53487
|
formData: formData.value,
|
|
53520
|
-
errors: mergedErrors.value
|
|
53521
|
-
debugInfo: {
|
|
53522
|
-
handleSubmitType: typeof handleSubmit,
|
|
53523
|
-
validateAllType: typeof validateAll
|
|
53524
|
-
}
|
|
53488
|
+
errors: mergedErrors.value
|
|
53525
53489
|
}, void 0, true)
|
|
53526
53490
|
], 34);
|
|
53527
53491
|
};
|
|
53528
53492
|
}
|
|
53529
53493
|
});
|
|
53530
|
-
var FormFlow_default = /* @__PURE__ */ __plugin_vue_export_helper_default(FormFlow_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
53494
|
+
var FormFlow_default = /* @__PURE__ */ __plugin_vue_export_helper_default(FormFlow_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-076caa3b"]]);
|
|
53531
53495
|
var _hoisted_1$4 = {
|
|
53532
53496
|
key: 0,
|
|
53533
53497
|
class: "dialog-form-error bg-red-30 color-red radius-1 mb-1 txt14 px-1 py-075"
|
package/dist/index.mjs
CHANGED
|
@@ -53182,59 +53182,36 @@ var FormFlow_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__
|
|
|
53182
53182
|
return field._component != null;
|
|
53183
53183
|
}
|
|
53184
53184
|
function validateAll() {
|
|
53185
|
-
console.log("[FormFlow] validateAll started");
|
|
53186
53185
|
let isValid = true;
|
|
53187
53186
|
const newErrors = {};
|
|
53188
53187
|
for (const { key, field } of visibleFields.value) {
|
|
53189
53188
|
const value = getFieldValue(key);
|
|
53190
|
-
console.log(`[FormFlow] Validating field "${key}":`, {
|
|
53191
|
-
value,
|
|
53192
|
-
required: field._config.required,
|
|
53193
|
-
type: field._type
|
|
53194
|
-
});
|
|
53195
53189
|
if (field._config.required === true) {
|
|
53196
53190
|
if (value == null || value === "" || Array.isArray(value) && value.length === 0) {
|
|
53197
|
-
|
|
53198
|
-
console.log(`[FormFlow] Field "${key}" is required but empty, error:`, errorMsg);
|
|
53199
|
-
newErrors[key] = errorMsg;
|
|
53191
|
+
newErrors[key] = field._config.requiredMessage || "This field is required";
|
|
53200
53192
|
isValid = false;
|
|
53201
53193
|
continue;
|
|
53202
53194
|
}
|
|
53203
53195
|
}
|
|
53204
|
-
if (field._validations != null) {
|
|
53205
|
-
|
|
53206
|
-
|
|
53207
|
-
|
|
53208
|
-
|
|
53209
|
-
|
|
53210
|
-
newErrors[key] = result$1;
|
|
53211
|
-
isValid = false;
|
|
53212
|
-
break;
|
|
53213
|
-
}
|
|
53196
|
+
if (field._validations != null) for (const validate of field._validations) {
|
|
53197
|
+
const result$1 = validate(value);
|
|
53198
|
+
if (result$1 !== true) {
|
|
53199
|
+
newErrors[key] = result$1;
|
|
53200
|
+
isValid = false;
|
|
53201
|
+
break;
|
|
53214
53202
|
}
|
|
53215
53203
|
}
|
|
53216
53204
|
}
|
|
53217
|
-
console.log("[FormFlow] validateAll complete:", {
|
|
53218
|
-
isValid,
|
|
53219
|
-
newErrors
|
|
53220
|
-
});
|
|
53221
53205
|
validationErrors.value = newErrors;
|
|
53222
53206
|
return isValid;
|
|
53223
53207
|
}
|
|
53224
53208
|
function handleSubmit(event) {
|
|
53225
|
-
console.log("[FormFlow] handleSubmit called", {
|
|
53226
|
-
event,
|
|
53227
|
-
hasEvent: !!event
|
|
53228
|
-
});
|
|
53229
53209
|
if (event) event.preventDefault();
|
|
53230
53210
|
hasSubmitted.value = true;
|
|
53231
|
-
console.log("[FormFlow] Before validateAll, visibleFields count:", visibleFields.value.length);
|
|
53232
53211
|
const isValid = validateAll();
|
|
53233
|
-
console.log("[FormFlow] After validateAll, isValid:", isValid, "validationErrors:", validationErrors.value);
|
|
53234
53212
|
if (!isValid) {
|
|
53235
53213
|
event?.stopPropagation();
|
|
53236
53214
|
const firstErrorKey = visibleFields.value.find(({ key }) => validationErrors.value[key])?.key;
|
|
53237
|
-
console.log("[FormFlow] Validation failed, firstErrorKey:", firstErrorKey);
|
|
53238
53215
|
if (firstErrorKey && formElement.value) {
|
|
53239
53216
|
const fieldElement = formElement.value.querySelector(`[name="${firstErrorKey}"]`) || formElement.value.querySelector(`[id="${firstErrorKey}"]`) || formElement.value.querySelector(`input, select, textarea`);
|
|
53240
53217
|
if (fieldElement) {
|
|
@@ -53247,22 +53224,13 @@ var FormFlow_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__
|
|
|
53247
53224
|
}, 300);
|
|
53248
53225
|
}
|
|
53249
53226
|
}
|
|
53250
|
-
} else
|
|
53251
|
-
console.log("[FormFlow] Validation passed, emitting submit with formData:", formData.value);
|
|
53252
|
-
emit$1("submit", formData.value);
|
|
53253
|
-
}
|
|
53227
|
+
} else emit$1("submit", formData.value);
|
|
53254
53228
|
return isValid;
|
|
53255
53229
|
}
|
|
53256
53230
|
__expose({
|
|
53257
53231
|
validate: validateAll,
|
|
53258
53232
|
handleSubmit
|
|
53259
53233
|
});
|
|
53260
|
-
console.log("[FormFlow] Component mounted", {
|
|
53261
|
-
version: "1.9.39-debug",
|
|
53262
|
-
schemaFields: Object.keys(props$1.schema._fields).length,
|
|
53263
|
-
handleSubmitDefined: !!handleSubmit,
|
|
53264
|
-
validateAllDefined: !!validateAll
|
|
53265
|
-
});
|
|
53266
53234
|
return (_ctx, _cache) => {
|
|
53267
53235
|
const _component_FormFlow = resolveComponent("FormFlow", true);
|
|
53268
53236
|
return openBlock(), createElementBlock("form", {
|
|
@@ -53327,16 +53295,12 @@ var FormFlow_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__
|
|
|
53327
53295
|
submit: handleSubmit,
|
|
53328
53296
|
validate: validateAll,
|
|
53329
53297
|
formData: formData.value,
|
|
53330
|
-
errors: mergedErrors.value
|
|
53331
|
-
debugInfo: {
|
|
53332
|
-
handleSubmitType: typeof handleSubmit,
|
|
53333
|
-
validateAllType: typeof validateAll
|
|
53334
|
-
}
|
|
53298
|
+
errors: mergedErrors.value
|
|
53335
53299
|
}, void 0, true)
|
|
53336
53300
|
], 34);
|
|
53337
53301
|
};
|
|
53338
53302
|
}
|
|
53339
|
-
}), [["__scopeId", "data-v-
|
|
53303
|
+
}), [["__scopeId", "data-v-076caa3b"]]);
|
|
53340
53304
|
var _hoisted_1$4 = {
|
|
53341
53305
|
key: 0,
|
|
53342
53306
|
class: "dialog-form-error bg-red-30 color-red radius-1 mb-1 txt14 px-1 py-075"
|
package/dist/style.css
CHANGED
|
@@ -34480,29 +34480,29 @@ dialog.dialog-left[data-v-00e3e6dc],
|
|
|
34480
34480
|
}
|
|
34481
34481
|
}
|
|
34482
34482
|
|
|
34483
|
-
.form-errors-summary[data-v-
|
|
34483
|
+
.form-errors-summary[data-v-076caa3b] {
|
|
34484
34484
|
background-color: rgba(220, 53, 69, 0.1);
|
|
34485
34485
|
border: 1px solid var(--bgl-red, #dc3545);
|
|
34486
34486
|
border-radius: 0.375rem;
|
|
34487
34487
|
padding: 1rem;
|
|
34488
34488
|
margin-bottom: 1rem;
|
|
34489
34489
|
}
|
|
34490
|
-
.form-errors-title[data-v-
|
|
34490
|
+
.form-errors-title[data-v-076caa3b] {
|
|
34491
34491
|
color: var(--bgl-red, #dc3545);
|
|
34492
34492
|
font-weight: 600;
|
|
34493
34493
|
margin-bottom: 0.5rem;
|
|
34494
34494
|
font-size: 0.95rem;
|
|
34495
34495
|
}
|
|
34496
|
-
.form-errors-list[data-v-
|
|
34496
|
+
.form-errors-list[data-v-076caa3b] {
|
|
34497
34497
|
margin: 0;
|
|
34498
34498
|
padding-left: 1.25rem;
|
|
34499
34499
|
color: var(--bgl-red, #dc3545);
|
|
34500
34500
|
font-size: 0.875rem;
|
|
34501
34501
|
}
|
|
34502
|
-
.form-errors-list li[data-v-
|
|
34502
|
+
.form-errors-list li[data-v-076caa3b] {
|
|
34503
34503
|
margin-bottom: 0.25rem;
|
|
34504
34504
|
}
|
|
34505
|
-
.form-errors-list strong[data-v-
|
|
34505
|
+
.form-errors-list strong[data-v-076caa3b] {
|
|
34506
34506
|
font-weight: 600;
|
|
34507
34507
|
}
|
|
34508
34508
|
|
package/package.json
CHANGED
|
@@ -350,21 +350,17 @@ function usesCustomComponent(field: FieldBuilder): boolean {
|
|
|
350
350
|
|
|
351
351
|
// Validate all visible fields
|
|
352
352
|
function validateAll(): boolean {
|
|
353
|
-
console.log('[FormFlow] validateAll started')
|
|
354
353
|
let isValid = true
|
|
355
354
|
const newErrors: Record<string, string> = {}
|
|
356
355
|
|
|
357
356
|
for (const { key, field } of visibleFields.value) {
|
|
358
357
|
const value = getFieldValue(key)
|
|
359
|
-
console.log(`[FormFlow] Validating field "${key}":`, { value, required: field._config.required, type: field._type })
|
|
360
358
|
|
|
361
359
|
// Check required fields first
|
|
362
360
|
if (field._config.required === true) {
|
|
363
361
|
const isEmpty = value == null || value === '' || (Array.isArray(value) && value.length === 0)
|
|
364
362
|
if (isEmpty) {
|
|
365
|
-
|
|
366
|
-
console.log(`[FormFlow] Field "${key}" is required but empty, error:`, errorMsg)
|
|
367
|
-
newErrors[key] = errorMsg
|
|
363
|
+
newErrors[key] = field._config.requiredMessage || 'This field is required'
|
|
368
364
|
isValid = false
|
|
369
365
|
continue
|
|
370
366
|
}
|
|
@@ -372,11 +368,9 @@ function validateAll(): boolean {
|
|
|
372
368
|
|
|
373
369
|
// Run custom validations
|
|
374
370
|
if (field._validations != null) {
|
|
375
|
-
console.log(`[FormFlow] Running ${field._validations.length} custom validations for "${key}"`)
|
|
376
371
|
for (const validate of field._validations) {
|
|
377
372
|
const result = validate(value)
|
|
378
373
|
if (result !== true) {
|
|
379
|
-
console.log(`[FormFlow] Field "${key}" failed validation:`, result)
|
|
380
374
|
newErrors[key] = result
|
|
381
375
|
isValid = false
|
|
382
376
|
break
|
|
@@ -385,24 +379,19 @@ function validateAll(): boolean {
|
|
|
385
379
|
}
|
|
386
380
|
}
|
|
387
381
|
|
|
388
|
-
console.log('[FormFlow] validateAll complete:', { isValid, newErrors })
|
|
389
382
|
validationErrors.value = newErrors
|
|
390
383
|
return isValid
|
|
391
384
|
}
|
|
392
385
|
|
|
393
386
|
// Submit handler for the slot
|
|
394
387
|
function handleSubmit(event?: Event): boolean {
|
|
395
|
-
console.log('[FormFlow] handleSubmit called', { event, hasEvent: !!event })
|
|
396
|
-
|
|
397
388
|
// Prevent default form submission if event is provided
|
|
398
389
|
if (event) {
|
|
399
390
|
event.preventDefault()
|
|
400
391
|
}
|
|
401
392
|
|
|
402
393
|
hasSubmitted.value = true
|
|
403
|
-
console.log('[FormFlow] Before validateAll, visibleFields count:', visibleFields.value.length)
|
|
404
394
|
const isValid = validateAll()
|
|
405
|
-
console.log('[FormFlow] After validateAll, isValid:', isValid, 'validationErrors:', validationErrors.value)
|
|
406
395
|
|
|
407
396
|
// If validation fails, scroll to first error
|
|
408
397
|
if (!isValid) {
|
|
@@ -410,7 +399,6 @@ function handleSubmit(event?: Event): boolean {
|
|
|
410
399
|
|
|
411
400
|
// Find the first field with an error
|
|
412
401
|
const firstErrorKey = visibleFields.value.find(({ key }) => validationErrors.value[key])?.key
|
|
413
|
-
console.log('[FormFlow] Validation failed, firstErrorKey:', firstErrorKey)
|
|
414
402
|
|
|
415
403
|
if (firstErrorKey && formElement.value) {
|
|
416
404
|
// Find the input element - try multiple strategies
|
|
@@ -430,7 +418,6 @@ function handleSubmit(event?: Event): boolean {
|
|
|
430
418
|
}
|
|
431
419
|
}
|
|
432
420
|
} else {
|
|
433
|
-
console.log('[FormFlow] Validation passed, emitting submit with formData:', formData.value)
|
|
434
421
|
// Emit submit event with form data when validation passes
|
|
435
422
|
emit('submit', formData.value)
|
|
436
423
|
}
|
|
@@ -443,14 +430,6 @@ defineExpose({
|
|
|
443
430
|
validate: validateAll,
|
|
444
431
|
handleSubmit
|
|
445
432
|
})
|
|
446
|
-
|
|
447
|
-
// Debug logging on mount
|
|
448
|
-
console.log('[FormFlow] Component mounted', {
|
|
449
|
-
version: '1.9.39-debug',
|
|
450
|
-
schemaFields: Object.keys(props.schema._fields).length,
|
|
451
|
-
handleSubmitDefined: !!handleSubmit,
|
|
452
|
-
validateAllDefined: !!validateAll
|
|
453
|
-
})
|
|
454
433
|
</script>
|
|
455
434
|
|
|
456
435
|
<template>
|
|
@@ -517,7 +496,7 @@ console.log('[FormFlow] Component mounted', {
|
|
|
517
496
|
<!-- Submit slot -->
|
|
518
497
|
<slot
|
|
519
498
|
name="submit" :submit="handleSubmit" :validate="validateAll" :form-data="formData"
|
|
520
|
-
:errors="mergedErrors"
|
|
499
|
+
:errors="mergedErrors"
|
|
521
500
|
/>
|
|
522
501
|
</form>
|
|
523
502
|
</template>
|
package/vite.config.ts
CHANGED
|
@@ -22,7 +22,7 @@ export default defineConfig(() => ({
|
|
|
22
22
|
},
|
|
23
23
|
// experimental: { enableNativePlugin: true },
|
|
24
24
|
build: {
|
|
25
|
-
minify:
|
|
25
|
+
minify: 'esbuild', // Arrow functions should preserve scope even with minification
|
|
26
26
|
lib: {
|
|
27
27
|
entry: resolve(indexDir, 'index.ts'),
|
|
28
28
|
formats: ['es', 'cjs'],
|