@iankibetsh/shframework 0.7.9 → 0.8.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.
- package/dist/dist/library.mjs.css +15 -15
- package/dist/library.js +240 -235
- package/dist/library.mjs +240 -235
- package/package.json +1 -1
|
@@ -63,21 +63,6 @@
|
|
|
63
63
|
color: white;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
.sh-selected-item{
|
|
67
|
-
line-height: unset!important;
|
|
68
|
-
}
|
|
69
|
-
.sh-suggestion-input{
|
|
70
|
-
padding: 0.375rem 0.75rem;
|
|
71
|
-
}
|
|
72
|
-
.sh-suggest{
|
|
73
|
-
margin-bottom: 1rem;
|
|
74
|
-
}
|
|
75
|
-
.sh-suggest-control::after{
|
|
76
|
-
margin-top: auto;
|
|
77
|
-
margin-bottom: auto;
|
|
78
|
-
margin-right: 0.255em;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
66
|
:root {
|
|
82
67
|
--ck-z-default: 10555 !important;
|
|
83
68
|
--ck-z-modal: calc(var(--ck-z-default) + 999) !important;
|
|
@@ -99,6 +84,21 @@
|
|
|
99
84
|
}
|
|
100
85
|
}
|
|
101
86
|
|
|
87
|
+
.sh-selected-item{
|
|
88
|
+
line-height: unset!important;
|
|
89
|
+
}
|
|
90
|
+
.sh-suggestion-input{
|
|
91
|
+
padding: 0.375rem 0.75rem;
|
|
92
|
+
}
|
|
93
|
+
.sh-suggest{
|
|
94
|
+
margin-bottom: 1rem;
|
|
95
|
+
}
|
|
96
|
+
.sh-suggest-control::after{
|
|
97
|
+
margin-top: auto;
|
|
98
|
+
margin-bottom: auto;
|
|
99
|
+
margin-right: 0.255em;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
102
|
.sh-forgot-link, .sh-register-link{
|
|
103
103
|
cursor: pointer;
|
|
104
104
|
}
|
package/dist/library.js
CHANGED
|
@@ -2170,6 +2170,7 @@ var script$9 = {
|
|
|
2170
2170
|
console.log(reason,message);
|
|
2171
2171
|
if (reason.status === 422) { // change this to 422 validation error response as received from laravel
|
|
2172
2172
|
this.form_errors = reason.data.errors;
|
|
2173
|
+
this.errorText = 'Fill all the details correctly';
|
|
2173
2174
|
} else {
|
|
2174
2175
|
this.errorText = message;
|
|
2175
2176
|
}
|
|
@@ -2240,40 +2241,41 @@ var script$9 = {
|
|
|
2240
2241
|
}
|
|
2241
2242
|
};
|
|
2242
2243
|
|
|
2243
|
-
const _hoisted_1$9 = {
|
|
2244
|
+
const _hoisted_1$9 = /*#__PURE__*/vue.createElementVNode("h5", { class: "d-none" }, null, -1 /* HOISTED */);
|
|
2245
|
+
const _hoisted_2$9 = {
|
|
2244
2246
|
ref: "ShAutoForm",
|
|
2245
2247
|
class: "sh-form"
|
|
2246
2248
|
};
|
|
2247
|
-
const
|
|
2249
|
+
const _hoisted_3$9 = {
|
|
2248
2250
|
key: 0,
|
|
2249
2251
|
class: "alert alert-danger alert-dismissible fade show sh-form-submission-error",
|
|
2250
2252
|
role: "alert"
|
|
2251
2253
|
};
|
|
2252
|
-
const
|
|
2253
|
-
const
|
|
2254
|
-
const
|
|
2255
|
-
const
|
|
2256
|
-
const
|
|
2257
|
-
const
|
|
2258
|
-
const
|
|
2259
|
-
const _hoisted_10$2 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
2254
|
+
const _hoisted_4$9 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
|
|
2255
|
+
const _hoisted_5$5 = { key: 0 };
|
|
2256
|
+
const _hoisted_6$4 = { key: 1 };
|
|
2257
|
+
const _hoisted_7$3 = { class: "row" };
|
|
2258
|
+
const _hoisted_8$2 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
|
|
2259
|
+
const _hoisted_9$3 = { class: "col-md-12" };
|
|
2260
|
+
const _hoisted_10$2 = ["data-cy", "placeholder", "name", "onFocus", "onChange"];
|
|
2260
2261
|
const _hoisted_11$2 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
2261
2262
|
const _hoisted_12$2 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
2262
|
-
const _hoisted_13$2 = ["data-cy", "name", "onFocus", "onUpdate:modelValue"];
|
|
2263
|
-
const _hoisted_14$2 = ["
|
|
2264
|
-
const _hoisted_15$2 = ["name", "onFocus", "onUpdate:modelValue"];
|
|
2263
|
+
const _hoisted_13$2 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
2264
|
+
const _hoisted_14$2 = ["data-cy", "name", "onFocus", "onUpdate:modelValue"];
|
|
2265
|
+
const _hoisted_15$2 = ["disabled", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
2265
2266
|
const _hoisted_16$2 = ["name", "onFocus", "onUpdate:modelValue"];
|
|
2266
|
-
const _hoisted_17$2 = ["
|
|
2267
|
-
const _hoisted_18$2 =
|
|
2267
|
+
const _hoisted_17$2 = ["name", "onFocus", "onUpdate:modelValue"];
|
|
2268
|
+
const _hoisted_18$2 = ["value"];
|
|
2269
|
+
const _hoisted_19$2 = {
|
|
2268
2270
|
key: 12,
|
|
2269
2271
|
class: "invalid-feedback"
|
|
2270
2272
|
};
|
|
2271
|
-
const
|
|
2273
|
+
const _hoisted_20$2 = {
|
|
2272
2274
|
key: 1,
|
|
2273
2275
|
class: "row"
|
|
2274
2276
|
};
|
|
2275
|
-
const
|
|
2276
|
-
const
|
|
2277
|
+
const _hoisted_21$2 = /*#__PURE__*/vue.createElementVNode("h5", null, "Confirm and Submit", -1 /* HOISTED */);
|
|
2278
|
+
const _hoisted_22$2 = /*#__PURE__*/vue.createElementVNode("p", null, [
|
|
2277
2279
|
/*#__PURE__*/vue.createTextVNode("By clicking submit, you agree to our "),
|
|
2278
2280
|
/*#__PURE__*/vue.createElementVNode("a", {
|
|
2279
2281
|
target: "_blank",
|
|
@@ -2285,11 +2287,11 @@ const _hoisted_21$2 = /*#__PURE__*/vue.createElementVNode("p", null, [
|
|
|
2285
2287
|
href: "https://hauzisha.co.ke/privacy-policy"
|
|
2286
2288
|
}, "privacy policy")
|
|
2287
2289
|
], -1 /* HOISTED */);
|
|
2288
|
-
const
|
|
2289
|
-
|
|
2290
|
-
|
|
2290
|
+
const _hoisted_23$1 = [
|
|
2291
|
+
_hoisted_21$2,
|
|
2292
|
+
_hoisted_22$2
|
|
2291
2293
|
];
|
|
2292
|
-
const
|
|
2294
|
+
const _hoisted_24$1 = /*#__PURE__*/vue.createElementVNode("span", {
|
|
2293
2295
|
class: "spinner-border spinner-border-sm",
|
|
2294
2296
|
role: "status",
|
|
2295
2297
|
"aria-hidden": "true"
|
|
@@ -2300,219 +2302,222 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2300
2302
|
const _component_ShSuggest = vue.resolveComponent("ShSuggest");
|
|
2301
2303
|
const _component_ShEditor = vue.resolveComponent("ShEditor");
|
|
2302
2304
|
|
|
2303
|
-
return (vue.openBlock(), vue.createElementBlock(
|
|
2304
|
-
|
|
2305
|
-
vue.
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
"
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
($options.
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2305
|
+
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
2306
|
+
_hoisted_1$9,
|
|
2307
|
+
vue.createElementVNode("form", _hoisted_2$9, [
|
|
2308
|
+
vue.createCommentVNode(" <div v-if=\"form_status == 1\" class=\"alert alert-info\">Processing...</div>"),
|
|
2309
|
+
vue.createCommentVNode(" <div v-if=\"form_status == 2\" class=\"alert alert-success\">Success</div>"),
|
|
2310
|
+
(_ctx.form_status == 3)
|
|
2311
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$9, [
|
|
2312
|
+
_hoisted_4$9,
|
|
2313
|
+
(_ctx.errorText)
|
|
2314
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$5, vue.toDisplayString(_ctx.errorText), 1 /* TEXT */))
|
|
2315
|
+
: (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$4, "Unexpected Error Occurred")),
|
|
2316
|
+
vue.createCommentVNode(" <button @click=\"hideError\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>")
|
|
2317
|
+
]))
|
|
2318
|
+
: vue.createCommentVNode("v-if", true),
|
|
2319
|
+
vue.withDirectives(vue.createElementVNode("input", {
|
|
2320
|
+
type: "hidden",
|
|
2321
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((_ctx.form_elements['id']) = $event))
|
|
2322
|
+
}, null, 512 /* NEED_PATCH */), [
|
|
2323
|
+
[vue.vModelText, _ctx.form_elements['id']]
|
|
2324
|
+
]),
|
|
2325
|
+
vue.createElementVNode("div", _hoisted_7$3, [
|
|
2326
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.fields, (field) => {
|
|
2327
|
+
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
2328
|
+
class: vue.normalizeClass(["form-group", 'col-md-' + $options.getColumns()]),
|
|
2329
|
+
key: field
|
|
2330
|
+
}, [
|
|
2331
|
+
vue.createElementVNode("label", _hoisted_8$2, vue.toDisplayString($options.getLabel(field)), 1 /* TEXT */),
|
|
2332
|
+
vue.createElementVNode("div", _hoisted_9$3, [
|
|
2333
|
+
($options.getFieldType(field) === 'component')
|
|
2334
|
+
? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.customComponent[field]), {
|
|
2335
|
+
key: 0,
|
|
2336
|
+
"data-cy": field,
|
|
2337
|
+
placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
|
|
2338
|
+
name: field,
|
|
2339
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2340
|
+
class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2341
|
+
modelValue: _ctx.form_elements[field],
|
|
2342
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
|
|
2343
|
+
}, null, 40 /* PROPS, HYDRATE_EVENTS */, ["data-cy", "placeholder", "name", "onFocus", "class", "modelValue", "onUpdate:modelValue"]))
|
|
2344
|
+
: vue.createCommentVNode("v-if", true),
|
|
2345
|
+
($options.getFieldType(field) === 'file')
|
|
2346
|
+
? (vue.openBlock(), vue.createElementBlock("input", {
|
|
2347
|
+
key: 1,
|
|
2348
|
+
"data-cy": field,
|
|
2349
|
+
placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
|
|
2350
|
+
name: field,
|
|
2351
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2352
|
+
class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2353
|
+
ref_for: true,
|
|
2354
|
+
ref: 'file_'+field,
|
|
2355
|
+
onChange: $event => ($options.handleFileUpload(field)),
|
|
2356
|
+
type: "file"
|
|
2357
|
+
}, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_10$2))
|
|
2358
|
+
: vue.createCommentVNode("v-if", true),
|
|
2359
|
+
($options.getFieldType(field) === 'numeric')
|
|
2360
|
+
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
|
2361
|
+
key: 2,
|
|
2362
|
+
"data-cy": field,
|
|
2363
|
+
placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
|
|
2364
|
+
name: field,
|
|
2365
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2366
|
+
class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2367
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
|
|
2368
|
+
type: "number"
|
|
2369
|
+
}, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_11$2)), [
|
|
2370
|
+
[vue.vModelText, _ctx.form_elements[field]]
|
|
2371
|
+
])
|
|
2372
|
+
: vue.createCommentVNode("v-if", true),
|
|
2373
|
+
($options.getFieldType(field) === 'password')
|
|
2374
|
+
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
|
2375
|
+
key: 3,
|
|
2376
|
+
"data-cy": field,
|
|
2377
|
+
placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
|
|
2378
|
+
name: field,
|
|
2379
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2380
|
+
class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2381
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
|
|
2382
|
+
type: "password"
|
|
2383
|
+
}, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_12$2)), [
|
|
2384
|
+
[vue.vModelText, _ctx.form_elements[field]]
|
|
2385
|
+
])
|
|
2386
|
+
: vue.createCommentVNode("v-if", true),
|
|
2387
|
+
($options.getFieldType(field) === 'email')
|
|
2388
|
+
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
|
2389
|
+
key: 4,
|
|
2390
|
+
"data-cy": field,
|
|
2391
|
+
placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
|
|
2392
|
+
name: field,
|
|
2393
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2394
|
+
class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2395
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
|
|
2396
|
+
type: "email",
|
|
2397
|
+
required: ""
|
|
2398
|
+
}, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_13$2)), [
|
|
2399
|
+
[vue.vModelText, _ctx.form_elements[field]]
|
|
2400
|
+
])
|
|
2401
|
+
: vue.createCommentVNode("v-if", true),
|
|
2402
|
+
($options.getFieldType(field) === 'datepicker' && $options.isDisabled(field) === false)
|
|
2403
|
+
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
|
2404
|
+
key: 5,
|
|
2405
|
+
"data-cy": field,
|
|
2406
|
+
type: "datetime-local",
|
|
2407
|
+
name: field,
|
|
2408
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2409
|
+
class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control active"]),
|
|
2410
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
|
|
2411
|
+
}, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_14$2)), [
|
|
2412
|
+
[vue.vModelText, _ctx.form_elements[field]]
|
|
2413
|
+
])
|
|
2414
|
+
: vue.createCommentVNode("v-if", true),
|
|
2415
|
+
($options.getFieldType(field) === 'phone')
|
|
2416
|
+
? (vue.openBlock(), vue.createBlock(_component_ShPhone, {
|
|
2417
|
+
key: 6,
|
|
2418
|
+
country_code: $props.country_code,
|
|
2419
|
+
placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
|
|
2420
|
+
name: field,
|
|
2421
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2422
|
+
class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2423
|
+
modelValue: _ctx.form_elements[field],
|
|
2424
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
|
|
2425
|
+
required: ""
|
|
2426
|
+
}, null, 8 /* PROPS */, ["country_code", "placeholder", "name", "onFocus", "class", "modelValue", "onUpdate:modelValue"]))
|
|
2427
|
+
: vue.createCommentVNode("v-if", true),
|
|
2428
|
+
($options.getFieldType(field) === 'suggest')
|
|
2429
|
+
? (vue.openBlock(), vue.createBlock(_component_ShSuggest, {
|
|
2430
|
+
key: 7,
|
|
2431
|
+
"select-data": _ctx.selectData[field],
|
|
2432
|
+
"fill-selects": $props.fillSelects[field],
|
|
2433
|
+
class: vue.normalizeClass(_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field),
|
|
2434
|
+
modelValue: _ctx.form_elements[field],
|
|
2435
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
|
|
2436
|
+
}, null, 8 /* PROPS */, ["select-data", "fill-selects", "class", "modelValue", "onUpdate:modelValue"]))
|
|
2437
|
+
: vue.createCommentVNode("v-if", true),
|
|
2438
|
+
($options.getFieldType(field) === 'editor')
|
|
2439
|
+
? (vue.openBlock(), vue.createBlock(_component_ShEditor, {
|
|
2440
|
+
key: 8,
|
|
2441
|
+
placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
|
|
2442
|
+
name: field,
|
|
2443
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2444
|
+
class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2445
|
+
modelValue: _ctx.form_elements[field],
|
|
2446
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
|
|
2447
|
+
}, null, 8 /* PROPS */, ["placeholder", "name", "onFocus", "class", "modelValue", "onUpdate:modelValue"]))
|
|
2448
|
+
: vue.createCommentVNode("v-if", true),
|
|
2449
|
+
($options.getFieldType(field) === 'text')
|
|
2450
|
+
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
|
2451
|
+
key: 9,
|
|
2452
|
+
disabled: $options.isDisabled(field),
|
|
2453
|
+
placeholder: field === 'phone_number' ? 'e.g 0712 345 678':'',
|
|
2454
|
+
name: field,
|
|
2455
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2456
|
+
class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2457
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
|
|
2458
|
+
type: "text"
|
|
2459
|
+
}, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_15$2)), [
|
|
2460
|
+
[vue.vModelText, _ctx.form_elements[field]]
|
|
2461
|
+
])
|
|
2462
|
+
: vue.createCommentVNode("v-if", true),
|
|
2463
|
+
($options.getFieldType(field) === 'textarea')
|
|
2464
|
+
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("textarea", {
|
|
2465
|
+
key: 10,
|
|
2466
|
+
name: field,
|
|
2467
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2468
|
+
class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2469
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
|
|
2470
|
+
}, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_16$2)), [
|
|
2471
|
+
[vue.vModelText, _ctx.form_elements[field]]
|
|
2472
|
+
])
|
|
2473
|
+
: vue.createCommentVNode("v-if", true),
|
|
2474
|
+
($options.getFieldType(field) === 'select' && _ctx.selectData[field] != null)
|
|
2475
|
+
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("select", {
|
|
2476
|
+
key: 11,
|
|
2477
|
+
name: field,
|
|
2478
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2479
|
+
class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2480
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
|
|
2481
|
+
}, [
|
|
2482
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.selectData[field], (item) => {
|
|
2483
|
+
return (vue.openBlock(), vue.createElementBlock("option", {
|
|
2484
|
+
key: item.id,
|
|
2485
|
+
value: item.id
|
|
2486
|
+
}, vue.toDisplayString(item.name), 9 /* TEXT, PROPS */, _hoisted_18$2))
|
|
2487
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
2488
|
+
], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_17$2)), [
|
|
2489
|
+
[vue.vModelSelect, _ctx.form_elements[field]]
|
|
2490
|
+
])
|
|
2491
|
+
: vue.createCommentVNode("v-if", true),
|
|
2492
|
+
(_ctx.form_errors[field] != null )
|
|
2493
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19$2, vue.toDisplayString(_ctx.form_errors[field][0]), 1 /* TEXT */))
|
|
2494
|
+
: vue.createCommentVNode("v-if", true)
|
|
2495
|
+
])
|
|
2496
|
+
], 2 /* CLASS */))
|
|
2497
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
2498
|
+
]),
|
|
2499
|
+
($props.hasTerms)
|
|
2500
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_20$2, _hoisted_23$1))
|
|
2501
|
+
: vue.createCommentVNode("v-if", true),
|
|
2502
|
+
(_ctx.form_status == 1)
|
|
2503
|
+
? (vue.openBlock(), vue.createElementBlock("button", {
|
|
2504
|
+
key: 2,
|
|
2505
|
+
class: vue.normalizeClass(["btn btn-primary", $options.getSubmitBtnClass()]),
|
|
2506
|
+
type: "button",
|
|
2507
|
+
disabled: ""
|
|
2508
|
+
}, [
|
|
2509
|
+
_hoisted_24$1,
|
|
2510
|
+
vue.createTextVNode(" Processing... ")
|
|
2511
|
+
], 2 /* CLASS */))
|
|
2512
|
+
: (vue.openBlock(), vue.createElementBlock("button", {
|
|
2513
|
+
key: 3,
|
|
2514
|
+
"data-cy": "sh_form_submit",
|
|
2515
|
+
class: vue.normalizeClass(["mb-2 form-submit-btn", $options.getSubmitBtnClass()]),
|
|
2516
|
+
type: "button",
|
|
2517
|
+
onClick: _cache[1] || (_cache[1] = (...args) => ($options.submitForm && $options.submitForm(...args)))
|
|
2518
|
+
}, vue.toDisplayString($props.actionLabel ? $props.actionLabel:'Submit'), 3 /* TEXT, CLASS */))
|
|
2519
|
+
], 512 /* NEED_PATCH */)
|
|
2520
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
2516
2521
|
}
|
|
2517
2522
|
|
|
2518
2523
|
script$9.render = render$5;
|
package/dist/library.mjs
CHANGED
|
@@ -2158,6 +2158,7 @@ var script$9 = {
|
|
|
2158
2158
|
console.log(reason,message);
|
|
2159
2159
|
if (reason.status === 422) { // change this to 422 validation error response as received from laravel
|
|
2160
2160
|
this.form_errors = reason.data.errors;
|
|
2161
|
+
this.errorText = 'Fill all the details correctly';
|
|
2161
2162
|
} else {
|
|
2162
2163
|
this.errorText = message;
|
|
2163
2164
|
}
|
|
@@ -2228,40 +2229,41 @@ var script$9 = {
|
|
|
2228
2229
|
}
|
|
2229
2230
|
};
|
|
2230
2231
|
|
|
2231
|
-
const _hoisted_1$9 = {
|
|
2232
|
+
const _hoisted_1$9 = /*#__PURE__*/createElementVNode("h5", { class: "d-none" }, null, -1 /* HOISTED */);
|
|
2233
|
+
const _hoisted_2$9 = {
|
|
2232
2234
|
ref: "ShAutoForm",
|
|
2233
2235
|
class: "sh-form"
|
|
2234
2236
|
};
|
|
2235
|
-
const
|
|
2237
|
+
const _hoisted_3$9 = {
|
|
2236
2238
|
key: 0,
|
|
2237
2239
|
class: "alert alert-danger alert-dismissible fade show sh-form-submission-error",
|
|
2238
2240
|
role: "alert"
|
|
2239
2241
|
};
|
|
2240
|
-
const
|
|
2241
|
-
const
|
|
2242
|
-
const
|
|
2243
|
-
const
|
|
2244
|
-
const
|
|
2245
|
-
const
|
|
2246
|
-
const
|
|
2247
|
-
const _hoisted_10$2 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
2242
|
+
const _hoisted_4$9 = /*#__PURE__*/createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
|
|
2243
|
+
const _hoisted_5$5 = { key: 0 };
|
|
2244
|
+
const _hoisted_6$4 = { key: 1 };
|
|
2245
|
+
const _hoisted_7$3 = { class: "row" };
|
|
2246
|
+
const _hoisted_8$2 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
|
|
2247
|
+
const _hoisted_9$3 = { class: "col-md-12" };
|
|
2248
|
+
const _hoisted_10$2 = ["data-cy", "placeholder", "name", "onFocus", "onChange"];
|
|
2248
2249
|
const _hoisted_11$2 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
2249
2250
|
const _hoisted_12$2 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
2250
|
-
const _hoisted_13$2 = ["data-cy", "name", "onFocus", "onUpdate:modelValue"];
|
|
2251
|
-
const _hoisted_14$2 = ["
|
|
2252
|
-
const _hoisted_15$2 = ["name", "onFocus", "onUpdate:modelValue"];
|
|
2251
|
+
const _hoisted_13$2 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
2252
|
+
const _hoisted_14$2 = ["data-cy", "name", "onFocus", "onUpdate:modelValue"];
|
|
2253
|
+
const _hoisted_15$2 = ["disabled", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
2253
2254
|
const _hoisted_16$2 = ["name", "onFocus", "onUpdate:modelValue"];
|
|
2254
|
-
const _hoisted_17$2 = ["
|
|
2255
|
-
const _hoisted_18$2 =
|
|
2255
|
+
const _hoisted_17$2 = ["name", "onFocus", "onUpdate:modelValue"];
|
|
2256
|
+
const _hoisted_18$2 = ["value"];
|
|
2257
|
+
const _hoisted_19$2 = {
|
|
2256
2258
|
key: 12,
|
|
2257
2259
|
class: "invalid-feedback"
|
|
2258
2260
|
};
|
|
2259
|
-
const
|
|
2261
|
+
const _hoisted_20$2 = {
|
|
2260
2262
|
key: 1,
|
|
2261
2263
|
class: "row"
|
|
2262
2264
|
};
|
|
2263
|
-
const
|
|
2264
|
-
const
|
|
2265
|
+
const _hoisted_21$2 = /*#__PURE__*/createElementVNode("h5", null, "Confirm and Submit", -1 /* HOISTED */);
|
|
2266
|
+
const _hoisted_22$2 = /*#__PURE__*/createElementVNode("p", null, [
|
|
2265
2267
|
/*#__PURE__*/createTextVNode("By clicking submit, you agree to our "),
|
|
2266
2268
|
/*#__PURE__*/createElementVNode("a", {
|
|
2267
2269
|
target: "_blank",
|
|
@@ -2273,11 +2275,11 @@ const _hoisted_21$2 = /*#__PURE__*/createElementVNode("p", null, [
|
|
|
2273
2275
|
href: "https://hauzisha.co.ke/privacy-policy"
|
|
2274
2276
|
}, "privacy policy")
|
|
2275
2277
|
], -1 /* HOISTED */);
|
|
2276
|
-
const
|
|
2277
|
-
|
|
2278
|
-
|
|
2278
|
+
const _hoisted_23$1 = [
|
|
2279
|
+
_hoisted_21$2,
|
|
2280
|
+
_hoisted_22$2
|
|
2279
2281
|
];
|
|
2280
|
-
const
|
|
2282
|
+
const _hoisted_24$1 = /*#__PURE__*/createElementVNode("span", {
|
|
2281
2283
|
class: "spinner-border spinner-border-sm",
|
|
2282
2284
|
role: "status",
|
|
2283
2285
|
"aria-hidden": "true"
|
|
@@ -2288,219 +2290,222 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2288
2290
|
const _component_ShSuggest = resolveComponent("ShSuggest");
|
|
2289
2291
|
const _component_ShEditor = resolveComponent("ShEditor");
|
|
2290
2292
|
|
|
2291
|
-
return (openBlock(), createElementBlock(
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
"
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
($options.
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2293
|
+
return (openBlock(), createElementBlock(Fragment, null, [
|
|
2294
|
+
_hoisted_1$9,
|
|
2295
|
+
createElementVNode("form", _hoisted_2$9, [
|
|
2296
|
+
createCommentVNode(" <div v-if=\"form_status == 1\" class=\"alert alert-info\">Processing...</div>"),
|
|
2297
|
+
createCommentVNode(" <div v-if=\"form_status == 2\" class=\"alert alert-success\">Success</div>"),
|
|
2298
|
+
(_ctx.form_status == 3)
|
|
2299
|
+
? (openBlock(), createElementBlock("div", _hoisted_3$9, [
|
|
2300
|
+
_hoisted_4$9,
|
|
2301
|
+
(_ctx.errorText)
|
|
2302
|
+
? (openBlock(), createElementBlock("span", _hoisted_5$5, toDisplayString(_ctx.errorText), 1 /* TEXT */))
|
|
2303
|
+
: (openBlock(), createElementBlock("span", _hoisted_6$4, "Unexpected Error Occurred")),
|
|
2304
|
+
createCommentVNode(" <button @click=\"hideError\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>")
|
|
2305
|
+
]))
|
|
2306
|
+
: createCommentVNode("v-if", true),
|
|
2307
|
+
withDirectives(createElementVNode("input", {
|
|
2308
|
+
type: "hidden",
|
|
2309
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((_ctx.form_elements['id']) = $event))
|
|
2310
|
+
}, null, 512 /* NEED_PATCH */), [
|
|
2311
|
+
[vModelText, _ctx.form_elements['id']]
|
|
2312
|
+
]),
|
|
2313
|
+
createElementVNode("div", _hoisted_7$3, [
|
|
2314
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($props.fields, (field) => {
|
|
2315
|
+
return (openBlock(), createElementBlock("div", {
|
|
2316
|
+
class: normalizeClass(["form-group", 'col-md-' + $options.getColumns()]),
|
|
2317
|
+
key: field
|
|
2318
|
+
}, [
|
|
2319
|
+
createElementVNode("label", _hoisted_8$2, toDisplayString($options.getLabel(field)), 1 /* TEXT */),
|
|
2320
|
+
createElementVNode("div", _hoisted_9$3, [
|
|
2321
|
+
($options.getFieldType(field) === 'component')
|
|
2322
|
+
? (openBlock(), createBlock(resolveDynamicComponent($props.customComponent[field]), {
|
|
2323
|
+
key: 0,
|
|
2324
|
+
"data-cy": field,
|
|
2325
|
+
placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
|
|
2326
|
+
name: field,
|
|
2327
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2328
|
+
class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2329
|
+
modelValue: _ctx.form_elements[field],
|
|
2330
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
|
|
2331
|
+
}, null, 40 /* PROPS, HYDRATE_EVENTS */, ["data-cy", "placeholder", "name", "onFocus", "class", "modelValue", "onUpdate:modelValue"]))
|
|
2332
|
+
: createCommentVNode("v-if", true),
|
|
2333
|
+
($options.getFieldType(field) === 'file')
|
|
2334
|
+
? (openBlock(), createElementBlock("input", {
|
|
2335
|
+
key: 1,
|
|
2336
|
+
"data-cy": field,
|
|
2337
|
+
placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
|
|
2338
|
+
name: field,
|
|
2339
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2340
|
+
class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2341
|
+
ref_for: true,
|
|
2342
|
+
ref: 'file_'+field,
|
|
2343
|
+
onChange: $event => ($options.handleFileUpload(field)),
|
|
2344
|
+
type: "file"
|
|
2345
|
+
}, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_10$2))
|
|
2346
|
+
: createCommentVNode("v-if", true),
|
|
2347
|
+
($options.getFieldType(field) === 'numeric')
|
|
2348
|
+
? withDirectives((openBlock(), createElementBlock("input", {
|
|
2349
|
+
key: 2,
|
|
2350
|
+
"data-cy": field,
|
|
2351
|
+
placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
|
|
2352
|
+
name: field,
|
|
2353
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2354
|
+
class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2355
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
|
|
2356
|
+
type: "number"
|
|
2357
|
+
}, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_11$2)), [
|
|
2358
|
+
[vModelText, _ctx.form_elements[field]]
|
|
2359
|
+
])
|
|
2360
|
+
: createCommentVNode("v-if", true),
|
|
2361
|
+
($options.getFieldType(field) === 'password')
|
|
2362
|
+
? withDirectives((openBlock(), createElementBlock("input", {
|
|
2363
|
+
key: 3,
|
|
2364
|
+
"data-cy": field,
|
|
2365
|
+
placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
|
|
2366
|
+
name: field,
|
|
2367
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2368
|
+
class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2369
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
|
|
2370
|
+
type: "password"
|
|
2371
|
+
}, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_12$2)), [
|
|
2372
|
+
[vModelText, _ctx.form_elements[field]]
|
|
2373
|
+
])
|
|
2374
|
+
: createCommentVNode("v-if", true),
|
|
2375
|
+
($options.getFieldType(field) === 'email')
|
|
2376
|
+
? withDirectives((openBlock(), createElementBlock("input", {
|
|
2377
|
+
key: 4,
|
|
2378
|
+
"data-cy": field,
|
|
2379
|
+
placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
|
|
2380
|
+
name: field,
|
|
2381
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2382
|
+
class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2383
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
|
|
2384
|
+
type: "email",
|
|
2385
|
+
required: ""
|
|
2386
|
+
}, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_13$2)), [
|
|
2387
|
+
[vModelText, _ctx.form_elements[field]]
|
|
2388
|
+
])
|
|
2389
|
+
: createCommentVNode("v-if", true),
|
|
2390
|
+
($options.getFieldType(field) === 'datepicker' && $options.isDisabled(field) === false)
|
|
2391
|
+
? withDirectives((openBlock(), createElementBlock("input", {
|
|
2392
|
+
key: 5,
|
|
2393
|
+
"data-cy": field,
|
|
2394
|
+
type: "datetime-local",
|
|
2395
|
+
name: field,
|
|
2396
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2397
|
+
class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control active"]),
|
|
2398
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
|
|
2399
|
+
}, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_14$2)), [
|
|
2400
|
+
[vModelText, _ctx.form_elements[field]]
|
|
2401
|
+
])
|
|
2402
|
+
: createCommentVNode("v-if", true),
|
|
2403
|
+
($options.getFieldType(field) === 'phone')
|
|
2404
|
+
? (openBlock(), createBlock(_component_ShPhone, {
|
|
2405
|
+
key: 6,
|
|
2406
|
+
country_code: $props.country_code,
|
|
2407
|
+
placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
|
|
2408
|
+
name: field,
|
|
2409
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2410
|
+
class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2411
|
+
modelValue: _ctx.form_elements[field],
|
|
2412
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
|
|
2413
|
+
required: ""
|
|
2414
|
+
}, null, 8 /* PROPS */, ["country_code", "placeholder", "name", "onFocus", "class", "modelValue", "onUpdate:modelValue"]))
|
|
2415
|
+
: createCommentVNode("v-if", true),
|
|
2416
|
+
($options.getFieldType(field) === 'suggest')
|
|
2417
|
+
? (openBlock(), createBlock(_component_ShSuggest, {
|
|
2418
|
+
key: 7,
|
|
2419
|
+
"select-data": _ctx.selectData[field],
|
|
2420
|
+
"fill-selects": $props.fillSelects[field],
|
|
2421
|
+
class: normalizeClass(_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field),
|
|
2422
|
+
modelValue: _ctx.form_elements[field],
|
|
2423
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
|
|
2424
|
+
}, null, 8 /* PROPS */, ["select-data", "fill-selects", "class", "modelValue", "onUpdate:modelValue"]))
|
|
2425
|
+
: createCommentVNode("v-if", true),
|
|
2426
|
+
($options.getFieldType(field) === 'editor')
|
|
2427
|
+
? (openBlock(), createBlock(_component_ShEditor, {
|
|
2428
|
+
key: 8,
|
|
2429
|
+
placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
|
|
2430
|
+
name: field,
|
|
2431
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2432
|
+
class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2433
|
+
modelValue: _ctx.form_elements[field],
|
|
2434
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
|
|
2435
|
+
}, null, 8 /* PROPS */, ["placeholder", "name", "onFocus", "class", "modelValue", "onUpdate:modelValue"]))
|
|
2436
|
+
: createCommentVNode("v-if", true),
|
|
2437
|
+
($options.getFieldType(field) === 'text')
|
|
2438
|
+
? withDirectives((openBlock(), createElementBlock("input", {
|
|
2439
|
+
key: 9,
|
|
2440
|
+
disabled: $options.isDisabled(field),
|
|
2441
|
+
placeholder: field === 'phone_number' ? 'e.g 0712 345 678':'',
|
|
2442
|
+
name: field,
|
|
2443
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2444
|
+
class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2445
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
|
|
2446
|
+
type: "text"
|
|
2447
|
+
}, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_15$2)), [
|
|
2448
|
+
[vModelText, _ctx.form_elements[field]]
|
|
2449
|
+
])
|
|
2450
|
+
: createCommentVNode("v-if", true),
|
|
2451
|
+
($options.getFieldType(field) === 'textarea')
|
|
2452
|
+
? withDirectives((openBlock(), createElementBlock("textarea", {
|
|
2453
|
+
key: 10,
|
|
2454
|
+
name: field,
|
|
2455
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2456
|
+
class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2457
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
|
|
2458
|
+
}, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_16$2)), [
|
|
2459
|
+
[vModelText, _ctx.form_elements[field]]
|
|
2460
|
+
])
|
|
2461
|
+
: createCommentVNode("v-if", true),
|
|
2462
|
+
($options.getFieldType(field) === 'select' && _ctx.selectData[field] != null)
|
|
2463
|
+
? withDirectives((openBlock(), createElementBlock("select", {
|
|
2464
|
+
key: 11,
|
|
2465
|
+
name: field,
|
|
2466
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2467
|
+
class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2468
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
|
|
2469
|
+
}, [
|
|
2470
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selectData[field], (item) => {
|
|
2471
|
+
return (openBlock(), createElementBlock("option", {
|
|
2472
|
+
key: item.id,
|
|
2473
|
+
value: item.id
|
|
2474
|
+
}, toDisplayString(item.name), 9 /* TEXT, PROPS */, _hoisted_18$2))
|
|
2475
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
2476
|
+
], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_17$2)), [
|
|
2477
|
+
[vModelSelect, _ctx.form_elements[field]]
|
|
2478
|
+
])
|
|
2479
|
+
: createCommentVNode("v-if", true),
|
|
2480
|
+
(_ctx.form_errors[field] != null )
|
|
2481
|
+
? (openBlock(), createElementBlock("div", _hoisted_19$2, toDisplayString(_ctx.form_errors[field][0]), 1 /* TEXT */))
|
|
2482
|
+
: createCommentVNode("v-if", true)
|
|
2483
|
+
])
|
|
2484
|
+
], 2 /* CLASS */))
|
|
2485
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
2486
|
+
]),
|
|
2487
|
+
($props.hasTerms)
|
|
2488
|
+
? (openBlock(), createElementBlock("div", _hoisted_20$2, _hoisted_23$1))
|
|
2489
|
+
: createCommentVNode("v-if", true),
|
|
2490
|
+
(_ctx.form_status == 1)
|
|
2491
|
+
? (openBlock(), createElementBlock("button", {
|
|
2492
|
+
key: 2,
|
|
2493
|
+
class: normalizeClass(["btn btn-primary", $options.getSubmitBtnClass()]),
|
|
2494
|
+
type: "button",
|
|
2495
|
+
disabled: ""
|
|
2496
|
+
}, [
|
|
2497
|
+
_hoisted_24$1,
|
|
2498
|
+
createTextVNode(" Processing... ")
|
|
2499
|
+
], 2 /* CLASS */))
|
|
2500
|
+
: (openBlock(), createElementBlock("button", {
|
|
2501
|
+
key: 3,
|
|
2502
|
+
"data-cy": "sh_form_submit",
|
|
2503
|
+
class: normalizeClass(["mb-2 form-submit-btn", $options.getSubmitBtnClass()]),
|
|
2504
|
+
type: "button",
|
|
2505
|
+
onClick: _cache[1] || (_cache[1] = (...args) => ($options.submitForm && $options.submitForm(...args)))
|
|
2506
|
+
}, toDisplayString($props.actionLabel ? $props.actionLabel:'Submit'), 3 /* TEXT, CLASS */))
|
|
2507
|
+
], 512 /* NEED_PATCH */)
|
|
2508
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
2504
2509
|
}
|
|
2505
2510
|
|
|
2506
2511
|
script$9.render = render$5;
|