@josercl/form-maker 1.0.0-alpha19 → 1.1.0-beta01

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.
@@ -1,1087 +0,0 @@
1
- module.exports =
2
- /******/ (function(modules) { // webpackBootstrap
3
- /******/ // The module cache
4
- /******/ var installedModules = {};
5
- /******/
6
- /******/ // The require function
7
- /******/ function __webpack_require__(moduleId) {
8
- /******/
9
- /******/ // Check if module is in cache
10
- /******/ if(installedModules[moduleId]) {
11
- /******/ return installedModules[moduleId].exports;
12
- /******/ }
13
- /******/ // Create a new module (and put it into the cache)
14
- /******/ var module = installedModules[moduleId] = {
15
- /******/ i: moduleId,
16
- /******/ l: false,
17
- /******/ exports: {}
18
- /******/ };
19
- /******/
20
- /******/ // Execute the module function
21
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
- /******/
23
- /******/ // Flag the module as loaded
24
- /******/ module.l = true;
25
- /******/
26
- /******/ // Return the exports of the module
27
- /******/ return module.exports;
28
- /******/ }
29
- /******/
30
- /******/
31
- /******/ // expose the modules object (__webpack_modules__)
32
- /******/ __webpack_require__.m = modules;
33
- /******/
34
- /******/ // expose the module cache
35
- /******/ __webpack_require__.c = installedModules;
36
- /******/
37
- /******/ // define getter function for harmony exports
38
- /******/ __webpack_require__.d = function(exports, name, getter) {
39
- /******/ if(!__webpack_require__.o(exports, name)) {
40
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
- /******/ }
42
- /******/ };
43
- /******/
44
- /******/ // define __esModule on exports
45
- /******/ __webpack_require__.r = function(exports) {
46
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
- /******/ }
49
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
- /******/ };
51
- /******/
52
- /******/ // create a fake namespace object
53
- /******/ // mode & 1: value is a module id, require it
54
- /******/ // mode & 2: merge all properties of value into the ns
55
- /******/ // mode & 4: return value when already ns object
56
- /******/ // mode & 8|1: behave like require
57
- /******/ __webpack_require__.t = function(value, mode) {
58
- /******/ if(mode & 1) value = __webpack_require__(value);
59
- /******/ if(mode & 8) return value;
60
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
- /******/ var ns = Object.create(null);
62
- /******/ __webpack_require__.r(ns);
63
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
- /******/ return ns;
66
- /******/ };
67
- /******/
68
- /******/ // getDefaultExport function for compatibility with non-harmony modules
69
- /******/ __webpack_require__.n = function(module) {
70
- /******/ var getter = module && module.__esModule ?
71
- /******/ function getDefault() { return module['default']; } :
72
- /******/ function getModuleExports() { return module; };
73
- /******/ __webpack_require__.d(getter, 'a', getter);
74
- /******/ return getter;
75
- /******/ };
76
- /******/
77
- /******/ // Object.prototype.hasOwnProperty.call
78
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
- /******/
80
- /******/ // __webpack_public_path__
81
- /******/ __webpack_require__.p = "";
82
- /******/
83
- /******/
84
- /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = "fb15");
86
- /******/ })
87
- /************************************************************************/
88
- /******/ ({
89
-
90
- /***/ "8875":
91
- /***/ (function(module, exports, __webpack_require__) {
92
-
93
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
94
- // MIT license
95
- // source: https://github.com/amiller-gh/currentScript-polyfill
96
-
97
- // added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505
98
-
99
- (function (root, factory) {
100
- if (true) {
101
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
102
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
103
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
104
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
105
- } else {}
106
- }(typeof self !== 'undefined' ? self : this, function () {
107
- function getCurrentScript () {
108
- var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript')
109
- // for chrome
110
- if (!descriptor && 'currentScript' in document && document.currentScript) {
111
- return document.currentScript
112
- }
113
-
114
- // for other browsers with native support for currentScript
115
- if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) {
116
- return document.currentScript
117
- }
118
-
119
- // IE 8-10 support script readyState
120
- // IE 11+ & Firefox support stack trace
121
- try {
122
- throw new Error();
123
- }
124
- catch (err) {
125
- // Find the second match for the "at" string to get file src url from stack.
126
- var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
127
- ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
128
- stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
129
- scriptLocation = (stackDetails && stackDetails[1]) || false,
130
- line = (stackDetails && stackDetails[2]) || false,
131
- currentLocation = document.location.href.replace(document.location.hash, ''),
132
- pageSource,
133
- inlineScriptSourceRegExp,
134
- inlineScriptSource,
135
- scripts = document.getElementsByTagName('script'); // Live NodeList collection
136
-
137
- if (scriptLocation === currentLocation) {
138
- pageSource = document.documentElement.outerHTML;
139
- inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*', 'i');
140
- inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, '$1').trim();
141
- }
142
-
143
- for (var i = 0; i < scripts.length; i++) {
144
- // If ready state is interactive, return the script tag
145
- if (scripts[i].readyState === 'interactive') {
146
- return scripts[i];
147
- }
148
-
149
- // If src matches, return the script tag
150
- if (scripts[i].src === scriptLocation) {
151
- return scripts[i];
152
- }
153
-
154
- // If inline source matches, return the script tag
155
- if (
156
- scriptLocation === currentLocation &&
157
- scripts[i].innerHTML &&
158
- scripts[i].innerHTML.trim() === inlineScriptSource
159
- ) {
160
- return scripts[i];
161
- }
162
- }
163
-
164
- // If no match, return null
165
- return null;
166
- }
167
- };
168
-
169
- return getCurrentScript
170
- }));
171
-
172
-
173
- /***/ }),
174
-
175
- /***/ "8bbf":
176
- /***/ (function(module, exports) {
177
-
178
- module.exports = require("vue");
179
-
180
- /***/ }),
181
-
182
- /***/ "fb15":
183
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
184
-
185
- "use strict";
186
- // ESM COMPAT FLAG
187
- __webpack_require__.r(__webpack_exports__);
188
-
189
- // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
190
- // This file is imported into lib/wc client bundles.
191
-
192
- if (typeof window !== 'undefined') {
193
- var currentScript = window.document.currentScript
194
- if (true) {
195
- var getCurrentScript = __webpack_require__("8875")
196
- currentScript = getCurrentScript()
197
-
198
- // for backward compatibility, because previously we directly included the polyfill
199
- if (!('currentScript' in document)) {
200
- Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
201
- }
202
- }
203
-
204
- var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
205
- if (src) {
206
- __webpack_require__.p = src[1] // eslint-disable-line
207
- }
208
- }
209
-
210
- // Indicate to webpack that this file can be concatenated
211
- /* harmony default export */ var setPublicPath = (null);
212
-
213
- // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
214
- var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
215
-
216
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./lib/components/FormMaker.vue?vue&type=template&id=6dccc3ca&bindings={"loading":"props","hasActions":"props","modelValue":"props","fields":"props","hideDivider":"props","rowClass":"props","columnClass":"props","labelClass":"props","inputGroupClass":"props","inputWrapperClass":"props","inputErrorClass":"props","inputClass":"props","errorClass":"props","helpTextClass":"props","submitButtonClass":"props","submitButtonText":"props","value":"setup","formFields":"setup","realColumnClass":"setup","realRowClass":"setup","realSubmitButtonClass":"setup","handleSubmit":"setup"}
217
-
218
-
219
- const _hoisted_1 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" Loading... ");
220
-
221
- const _hoisted_2 = {
222
- key: 0
223
- };
224
- function render(_ctx, _cache, $props, $setup, $data, $options) {
225
- const _component_form_maker_input = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("form-maker-input");
226
-
227
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("form", {
228
- class: "form-maker",
229
- onSubmit: _cache[1] || (_cache[1] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])((...args) => $setup.handleSubmit(...args), ["prevent"]))
230
- }, [$props.loading ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "loading", {
231
- key: 0
232
- }, () => [_hoisted_1]) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default", {}, () => [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])($setup.formFields, (fieldRow, i) => {
233
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("div", {
234
- class: $setup.realRowClass,
235
- key: `fieldRow_${i}`
236
- }, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(fieldRow, (field, j) => {
237
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("div", {
238
- class: [$setup.realColumnClass, field.columnClass],
239
- key: `field_${i}_${j}`
240
- }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, `${field.name}`, {
241
- field: field
242
- }, () => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_form_maker_input, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["mergeProps"])({
243
- modelValue: $setup.value[field.name],
244
- "onUpdate:modelValue": $event => $setup.value[field.name] = $event
245
- }, field), null, 16, ["modelValue", "onUpdate:modelValue"])])], 2);
246
- }), 128
247
- /* KEYED_FRAGMENT */
248
- ))], 2);
249
- }), 128
250
- /* KEYED_FRAGMENT */
251
- ))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "extra"), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "divider", {}, () => [$props.hasActions && !$props.hideDivider ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("hr", _hoisted_2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), $props.hasActions ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "actions", {
252
- key: 1
253
- }, () => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "submit-button", {}, () => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("button", {
254
- class: $setup.realSubmitButtonClass,
255
- disabled: $props.loading,
256
- type: "submit"
257
- }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])($props.submitButtonText), 11, ["disabled"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "extra-buttons")]) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 32);
258
- }
259
- // CONCATENATED MODULE: ./lib/components/FormMaker.vue?vue&type=template&id=6dccc3ca&bindings={"loading":"props","hasActions":"props","modelValue":"props","fields":"props","hideDivider":"props","rowClass":"props","columnClass":"props","labelClass":"props","inputGroupClass":"props","inputWrapperClass":"props","inputErrorClass":"props","inputClass":"props","errorClass":"props","helpTextClass":"props","submitButtonClass":"props","submitButtonText":"props","value":"setup","formFields":"setup","realColumnClass":"setup","realRowClass":"setup","realSubmitButtonClass":"setup","handleSubmit":"setup"}
260
-
261
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./lib/components/FormMaker.vue?vue&type=script&lang=js
262
- // import setupVModel from '../utils';
263
-
264
- /* harmony default export */ var FormMakervue_type_script_lang_js = ({
265
- name: 'FormMaker',
266
- emits: ['submit', 'update:modelValue'],
267
- props: {
268
- loading: {
269
- type: Boolean,
270
- default: false
271
- },
272
- hasActions: {
273
- type: Boolean,
274
- default: true
275
- },
276
- modelValue: {
277
- type: Object,
278
- default: () => ({})
279
- },
280
- fields: {
281
- type: Array,
282
- default: () => []
283
- },
284
- hideDivider: {
285
- type: Boolean,
286
- default: false
287
- },
288
- rowClass: {
289
- type: String,
290
- default: null
291
- },
292
- columnClass: {
293
- type: String,
294
- default: null
295
- },
296
- labelClass: {
297
- type: String,
298
- default: null
299
- },
300
- inputGroupClass: {
301
- type: String,
302
- default: null
303
- },
304
- inputWrapperClass: {
305
- type: String,
306
- default: null
307
- },
308
- inputErrorClass: {
309
- type: String,
310
- default: null
311
- },
312
- inputClass: {
313
- type: String,
314
- default: null
315
- },
316
- errorClass: {
317
- type: String,
318
- default: null
319
- },
320
- helpTextClass: {
321
- type: String,
322
- default: null
323
- },
324
- submitButtonClass: {
325
- type: String,
326
- default: null
327
- },
328
- submitButtonText: {
329
- type: String,
330
- default: 'Submit'
331
- }
332
- },
333
-
334
- setup(props, {
335
- emit
336
- }) {
337
- const handleSubmit = () => emit('submit');
338
-
339
- const formFields = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
340
- if (props.fields.length > 0) {
341
- return props.fields.map(row => {
342
- let newRow = row;
343
-
344
- if (!Array.isArray(row)) {
345
- newRow = [row];
346
- }
347
-
348
- return newRow.map(fieldSpec => {
349
- if (!fieldSpec.id) {
350
- return { ...fieldSpec,
351
- id: `formMaker_${new Date().getTime()}_${fieldSpec.name}`
352
- };
353
- }
354
-
355
- return fieldSpec;
356
- });
357
- });
358
- }
359
-
360
- return Object.keys(props.modelValue).map(key => [{
361
- name: key,
362
- label: key,
363
- id: `formMaker_${key}`
364
- }]);
365
- });
366
- const {
367
- rowClass,
368
- columnClass,
369
- labelClass,
370
- inputGroupClass,
371
- inputWrapperClass,
372
- inputErrorClass,
373
- inputClass,
374
- errorClass,
375
- helpTextClass,
376
- submitButtonClass,
377
- modelValue
378
- } = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toRefs"])(props);
379
- Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('labelClass', labelClass.value || Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('form-label'));
380
- Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('inputGroupClass', inputGroupClass.value || Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('input-group'));
381
- Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('inputWrapperClass', inputWrapperClass.value || Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('input-wrapper'));
382
- Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('inputErrorClass', inputErrorClass.value || Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('input-error'));
383
- Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('inputClass', inputClass.value || Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('input'));
384
- Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('errorClass', errorClass.value || Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('error'));
385
- Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('helpTextClass', helpTextClass.value || Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('help-text'));
386
- const realRowClass = rowClass.value || Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('form-row');
387
- const realColumnClass = columnClass.value || Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('form-column');
388
- const realSubmitButtonClass = submitButtonClass.value || Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('submit-button');
389
- return {
390
- value: modelValue,
391
- formFields,
392
- realColumnClass,
393
- realRowClass,
394
- realSubmitButtonClass,
395
- handleSubmit
396
- };
397
- }
398
-
399
- });
400
- // CONCATENATED MODULE: ./lib/components/FormMaker.vue?vue&type=script&lang=js
401
-
402
- // CONCATENATED MODULE: ./lib/components/FormMaker.vue
403
-
404
-
405
-
406
- FormMakervue_type_script_lang_js.render = render
407
-
408
- /* harmony default export */ var FormMaker = (FormMakervue_type_script_lang_js);
409
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./lib/components/FormMakerInput.vue?vue&type=template&id=c9668268&bindings={"value":"setup","labelClass":"setup","inputClass":"setup","inputErrorClass":"setup","inputGroupClass":"setup","inputWrapperClass":"setup","errorClass":"setup","helpTextClass":"setup","hasErrors":"setup","hasLabel":"setup","hasHelpText":"setup"}
410
-
411
- function FormMakerInputvue_type_template_id_c9668268_bindings_value_setup_labelClass_setup_inputClass_setup_inputErrorClass_setup_inputGroupClass_setup_inputWrapperClass_setup_errorClass_setup_helpTextClass_setup_hasErrors_setup_hasLabel_setup_hasHelpText_setup_render(_ctx, _cache, $props, $setup, $data, $options) {
412
- const _component_form_maker_label = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("form-maker-label");
413
-
414
- const _component_form_maker_help = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("form-maker-help");
415
-
416
- const _component_form_maker_error = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("form-maker-error");
417
-
418
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("div", {
419
- class: [$setup.hasErrors && $setup.inputErrorClass]
420
- }, [_ctx.type !== 'checkbox' ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "label", {
421
- key: 0
422
- }, () => [$setup.hasLabel ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_form_maker_label, {
423
- key: 0,
424
- id: _ctx.id,
425
- class: $setup.labelClass,
426
- text: _ctx.label
427
- }, null, 8, ["id", "class", "text"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default", {}, () => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("div", {
428
- class: [$setup.inputGroupClass, $setup.hasErrors && $setup.inputErrorClass]
429
- }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "before"), (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDynamicComponent"])(`form-maker-input-${_ctx.type}`), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["mergeProps"])({
430
- modelValue: $setup.value,
431
- "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => $setup.value = $event)
432
- }, { ..._ctx.$props,
433
- ..._ctx.$attrs
434
- }, {
435
- class: [_ctx.type !== 'checkbox' && $setup.inputClass, $setup.hasErrors && $setup.inputErrorClass],
436
- label: _ctx.label
437
- }), null, 16, ["modelValue", "class", "label"])), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "after")], 2)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "help", {}, () => [$setup.hasHelpText ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_form_maker_help, {
438
- key: 0,
439
- class: $setup.helpTextClass,
440
- text: _ctx.helpText
441
- }, null, 8, ["class", "text"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "errors", {}, () => [$setup.hasErrors ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_form_maker_error, {
442
- key: 0,
443
- class: $setup.errorClass,
444
- text: _ctx.error
445
- }, null, 8, ["class", "text"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])], 2);
446
- }
447
- // CONCATENATED MODULE: ./lib/components/FormMakerInput.vue?vue&type=template&id=c9668268&bindings={"value":"setup","labelClass":"setup","inputClass":"setup","inputErrorClass":"setup","inputGroupClass":"setup","inputWrapperClass":"setup","errorClass":"setup","helpTextClass":"setup","hasErrors":"setup","hasLabel":"setup","hasHelpText":"setup"}
448
-
449
- // CONCATENATED MODULE: ./lib/utils.js
450
-
451
-
452
- const setupVModel = (props, emit, propName = 'modelValue') => Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])({
453
- get: () => props[propName],
454
- set: value => emit(`update:${propName}`, value)
455
- });
456
-
457
- /* harmony default export */ var utils = (setupVModel);
458
- // CONCATENATED MODULE: ./lib/components/inputs/FormInputMixin.js
459
-
460
- const injectFormClasses = () => {
461
- const labelClass = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('labelClass', null);
462
- const inputClass = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('inputClass', null);
463
- const inputWrapperClass = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('inputWrapperClass', null);
464
- const inputGroupClass = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('inputGroupClass', null);
465
- const inputErrorClass = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('inputErrorClass', null);
466
- const errorClass = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('errorClass', null);
467
- const helpTextClass = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('helpTextClass', null);
468
- return {
469
- labelClass,
470
- inputClass,
471
- inputWrapperClass,
472
- inputGroupClass,
473
- inputErrorClass,
474
- errorClass,
475
- helpTextClass
476
- };
477
- };
478
- const getFormInputComputeds = props => {
479
- const {
480
- label,
481
- error,
482
- helpText
483
- } = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toRefs"])(props);
484
- const hasErrors = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => !!error.value);
485
- const hasLabel = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => !!label.value);
486
- const hasHelpText = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => !!helpText.value);
487
- return {
488
- hasErrors,
489
- hasLabel,
490
- hasHelpText
491
- };
492
- };
493
- const FormInputMixin = {
494
- emits: ['update:modelValue'],
495
- props: {
496
- loading: {
497
- type: Boolean,
498
- default: false
499
- },
500
- disabled: {
501
- type: Boolean,
502
- default: false
503
- },
504
- modelValue: {
505
- default: null
506
- },
507
- error: {
508
- type: String,
509
- default: null
510
- },
511
- helpText: {
512
- type: String,
513
- default: null
514
- },
515
- id: {
516
- type: String,
517
- default: null
518
- },
519
- label: {
520
- type: String,
521
- default: null
522
- },
523
- name: {
524
- type: String,
525
- default: null
526
- },
527
- placeholder: {
528
- type: String,
529
- default: null
530
- },
531
- type: {
532
- type: String,
533
- default: 'text'
534
- },
535
- options: {
536
- type: Array,
537
- default: () => []
538
- },
539
- optionGroups: {
540
- type: Object,
541
- default: () => ({})
542
- }
543
- }
544
- };
545
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./lib/components/FormMakerInput.vue?vue&type=script&lang=js
546
-
547
-
548
- /* harmony default export */ var FormMakerInputvue_type_script_lang_js = ({
549
- name: 'FormMakerInput',
550
- mixins: [FormInputMixin],
551
- inheritAttrs: false,
552
-
553
- setup(props, {
554
- emit
555
- }) {
556
- const value = utils(props, emit);
557
- const {
558
- labelClass,
559
- inputClass,
560
- inputWrapperClass,
561
- inputGroupClass,
562
- inputErrorClass,
563
- errorClass,
564
- helpTextClass
565
- } = injectFormClasses();
566
- const {
567
- hasErrors,
568
- hasLabel,
569
- hasHelpText
570
- } = getFormInputComputeds(props);
571
- return {
572
- value,
573
- labelClass,
574
- inputClass,
575
- inputErrorClass,
576
- inputGroupClass,
577
- inputWrapperClass,
578
- errorClass,
579
- helpTextClass,
580
- hasErrors,
581
- hasLabel,
582
- hasHelpText
583
- };
584
- }
585
-
586
- });
587
- // CONCATENATED MODULE: ./lib/components/FormMakerInput.vue?vue&type=script&lang=js
588
-
589
- // CONCATENATED MODULE: ./lib/components/FormMakerInput.vue
590
-
591
-
592
-
593
- FormMakerInputvue_type_script_lang_js.render = FormMakerInputvue_type_template_id_c9668268_bindings_value_setup_labelClass_setup_inputClass_setup_inputErrorClass_setup_inputGroupClass_setup_inputWrapperClass_setup_errorClass_setup_helpTextClass_setup_hasErrors_setup_hasLabel_setup_hasHelpText_setup_render
594
-
595
- /* harmony default export */ var FormMakerInput = (FormMakerInputvue_type_script_lang_js);
596
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./lib/components/inputs/CheckboxInput.vue?vue&type=template&id=0f1f8bfc&bindings={"label":"props","fieldOptions":"setup","isBinary":"setup","selectedOptions":"setup","handleClick":"setup"}
597
-
598
- function CheckboxInputvue_type_template_id_0f1f8bfc_bindings_label_props_fieldOptions_setup_isBinary_setup_selectedOptions_setup_handleClick_setup_render(_ctx, _cache, $props, $setup, $data, $options) {
599
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])($setup.fieldOptions, (option, i) => {
600
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("div", {
601
- key: `option_${i}`
602
- }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("label", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("input", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["mergeProps"])(_ctx.$props, {
603
- checked: $setup.selectedOptions.indexOf(option.value) !== -1,
604
- value: option.value,
605
- type: "checkbox",
606
- onClick: () => $setup.handleClick(option.value)
607
- }), null, 16, ["checked", "value", "onClick"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(option.label), 1
608
- /* TEXT */
609
- )])]);
610
- }), 128
611
- /* KEYED_FRAGMENT */
612
- );
613
- }
614
- // CONCATENATED MODULE: ./lib/components/inputs/CheckboxInput.vue?vue&type=template&id=0f1f8bfc&bindings={"label":"props","fieldOptions":"setup","isBinary":"setup","selectedOptions":"setup","handleClick":"setup"}
615
-
616
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./lib/components/inputs/CheckboxInput.vue?vue&type=script&lang=js
617
-
618
-
619
- /* harmony default export */ var CheckboxInputvue_type_script_lang_js = ({
620
- name: 'CheckInput',
621
- mixins: [FormInputMixin],
622
- emits: ['update:modelValue'],
623
- props: {
624
- label: {
625
- type: String,
626
- default: null
627
- }
628
- },
629
-
630
- setup(props, {
631
- emit
632
- }) {
633
- const {
634
- options,
635
- label
636
- } = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toRefs"])(props);
637
- const isBinary = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => options.value.length === 0);
638
- const val = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => props.modelValue);
639
- const selectedOptions = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
640
- const arr = Array.isArray(val.value) ? val.value : [val.value];
641
- return arr.filter(x => !!x);
642
- });
643
- const fieldOptions = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
644
- if (!isBinary.value) {
645
- return options.value;
646
- }
647
-
648
- return [{
649
- label: label.value,
650
- value: true
651
- }];
652
- });
653
-
654
- const handleClick = clickVal => {
655
- let selOptions = [...selectedOptions.value];
656
-
657
- if (selOptions.indexOf(clickVal) === -1) {
658
- selOptions.push(clickVal);
659
- } else {
660
- selOptions = selOptions.filter(x => x !== clickVal);
661
- }
662
-
663
- if (isBinary.value) {
664
- emit('update:modelValue', selOptions.length > 0);
665
- } else {
666
- emit('update:modelValue', selOptions);
667
- }
668
- };
669
-
670
- return {
671
- fieldOptions,
672
- isBinary,
673
- selectedOptions,
674
- handleClick
675
- };
676
- }
677
-
678
- });
679
- // CONCATENATED MODULE: ./lib/components/inputs/CheckboxInput.vue?vue&type=script&lang=js
680
-
681
- // CONCATENATED MODULE: ./lib/components/inputs/CheckboxInput.vue
682
-
683
-
684
-
685
- CheckboxInputvue_type_script_lang_js.render = CheckboxInputvue_type_template_id_0f1f8bfc_bindings_label_props_fieldOptions_setup_isBinary_setup_selectedOptions_setup_handleClick_setup_render
686
-
687
- /* harmony default export */ var CheckboxInput = (CheckboxInputvue_type_script_lang_js);
688
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./lib/components/inputs/FileInput.vue?vue&type=template&id=36054fae&bindings={"handleFileSelect":"setup"}
689
-
690
- function FileInputvue_type_template_id_36054fae_bindings_handleFileSelect_setup_render(_ctx, _cache, $props, $setup, $data, $options) {
691
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("input", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["mergeProps"])(_ctx.$props, {
692
- type: "file",
693
- onChange: _cache[1] || (_cache[1] = (...args) => $setup.handleFileSelect(...args))
694
- }), null, 16);
695
- }
696
- // CONCATENATED MODULE: ./lib/components/inputs/FileInput.vue?vue&type=template&id=36054fae&bindings={"handleFileSelect":"setup"}
697
-
698
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./lib/components/inputs/FileInput.vue?vue&type=script&lang=js
699
-
700
- /* harmony default export */ var FileInputvue_type_script_lang_js = ({
701
- name: 'FileInput',
702
- mixins: [FormInputMixin],
703
- emits: ['update:modelValue'],
704
-
705
- setup(props, {
706
- emit
707
- }) {
708
- const handleFileSelect = event => {
709
- if (event.target.files.length) {
710
- const file = event.target.files[0];
711
- emit('update:modelValue', file);
712
- }
713
- };
714
-
715
- return {
716
- handleFileSelect
717
- };
718
- }
719
-
720
- });
721
- // CONCATENATED MODULE: ./lib/components/inputs/FileInput.vue?vue&type=script&lang=js
722
-
723
- // CONCATENATED MODULE: ./lib/components/inputs/FileInput.vue
724
-
725
-
726
-
727
- FileInputvue_type_script_lang_js.render = FileInputvue_type_template_id_36054fae_bindings_handleFileSelect_setup_render
728
-
729
- /* harmony default export */ var FileInput = (FileInputvue_type_script_lang_js);
730
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./lib/components/inputs/FormMakerInputError.vue?vue&type=template&id=3b7039ac&bindings={"text":"props"}
731
-
732
- function FormMakerInputErrorvue_type_template_id_3b7039ac_bindings_text_props_render(_ctx, _cache, $props, $setup, $data, $options) {
733
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("div", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])($props.text), 1);
734
- }
735
- // CONCATENATED MODULE: ./lib/components/inputs/FormMakerInputError.vue?vue&type=template&id=3b7039ac&bindings={"text":"props"}
736
-
737
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./lib/components/inputs/FormMakerInputError.vue?vue&type=script&lang=js
738
- /* harmony default export */ var FormMakerInputErrorvue_type_script_lang_js = ({
739
- name: 'FormMakerInputError',
740
- props: {
741
- text: {
742
- type: String,
743
- default: null
744
- }
745
- }
746
- });
747
- // CONCATENATED MODULE: ./lib/components/inputs/FormMakerInputError.vue?vue&type=script&lang=js
748
-
749
- // CONCATENATED MODULE: ./lib/components/inputs/FormMakerInputError.vue
750
-
751
-
752
-
753
- FormMakerInputErrorvue_type_script_lang_js.render = FormMakerInputErrorvue_type_template_id_3b7039ac_bindings_text_props_render
754
-
755
- /* harmony default export */ var FormMakerInputError = (FormMakerInputErrorvue_type_script_lang_js);
756
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./lib/components/inputs/FormMakerInputHelp.vue?vue&type=template&id=7439ecba&bindings={"text":"props"}
757
-
758
- function FormMakerInputHelpvue_type_template_id_7439ecba_bindings_text_props_render(_ctx, _cache, $props, $setup, $data, $options) {
759
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("div", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])($props.text), 1);
760
- }
761
- // CONCATENATED MODULE: ./lib/components/inputs/FormMakerInputHelp.vue?vue&type=template&id=7439ecba&bindings={"text":"props"}
762
-
763
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./lib/components/inputs/FormMakerInputHelp.vue?vue&type=script&lang=js
764
- /* harmony default export */ var FormMakerInputHelpvue_type_script_lang_js = ({
765
- name: 'FormMakerInputHelp',
766
- props: {
767
- text: {
768
- type: String,
769
- default: null
770
- }
771
- }
772
- });
773
- // CONCATENATED MODULE: ./lib/components/inputs/FormMakerInputHelp.vue?vue&type=script&lang=js
774
-
775
- // CONCATENATED MODULE: ./lib/components/inputs/FormMakerInputHelp.vue
776
-
777
-
778
-
779
- FormMakerInputHelpvue_type_script_lang_js.render = FormMakerInputHelpvue_type_template_id_7439ecba_bindings_text_props_render
780
-
781
- /* harmony default export */ var FormMakerInputHelp = (FormMakerInputHelpvue_type_script_lang_js);
782
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./lib/components/inputs/FormMakerInputLabel.vue?vue&type=template&id=10c7c87e&bindings={"text":"props","id":"props"}
783
-
784
- function FormMakerInputLabelvue_type_template_id_10c7c87e_bindings_text_props_id_props_render(_ctx, _cache, $props, $setup, $data, $options) {
785
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("label", {
786
- for: $props.id
787
- }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])($props.text), 9, ["for"]);
788
- }
789
- // CONCATENATED MODULE: ./lib/components/inputs/FormMakerInputLabel.vue?vue&type=template&id=10c7c87e&bindings={"text":"props","id":"props"}
790
-
791
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./lib/components/inputs/FormMakerInputLabel.vue?vue&type=script&lang=js
792
- /* harmony default export */ var FormMakerInputLabelvue_type_script_lang_js = ({
793
- name: 'FormMakerInputLabel',
794
- props: {
795
- text: {
796
- type: String,
797
- default: null
798
- },
799
- id: {
800
- type: String,
801
- default: null
802
- }
803
- }
804
- });
805
- // CONCATENATED MODULE: ./lib/components/inputs/FormMakerInputLabel.vue?vue&type=script&lang=js
806
-
807
- // CONCATENATED MODULE: ./lib/components/inputs/FormMakerInputLabel.vue
808
-
809
-
810
-
811
- FormMakerInputLabelvue_type_script_lang_js.render = FormMakerInputLabelvue_type_template_id_10c7c87e_bindings_text_props_id_props_render
812
-
813
- /* harmony default export */ var FormMakerInputLabel = (FormMakerInputLabelvue_type_script_lang_js);
814
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./lib/components/inputs/RadioInput.vue?vue&type=template&id=2d04d097&bindings={"label":"props","handleClick":"setup"}
815
-
816
- function RadioInputvue_type_template_id_2d04d097_bindings_label_props_handleClick_setup_render(_ctx, _cache, $props, $setup, $data, $options) {
817
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.options, (option, i) => {
818
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("div", {
819
- key: `option_${i}`
820
- }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("label", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("input", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["mergeProps"])(_ctx.$props, {
821
- checked: option.value === _ctx.modelValue,
822
- value: option.value,
823
- type: "radio",
824
- onChange: _cache[1] || (_cache[1] = (...args) => $setup.handleClick(...args))
825
- }), null, 16, ["checked", "value"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(option.label), 1
826
- /* TEXT */
827
- )])]);
828
- }), 128
829
- /* KEYED_FRAGMENT */
830
- );
831
- }
832
- // CONCATENATED MODULE: ./lib/components/inputs/RadioInput.vue?vue&type=template&id=2d04d097&bindings={"label":"props","handleClick":"setup"}
833
-
834
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./lib/components/inputs/RadioInput.vue?vue&type=script&lang=js
835
-
836
- /* harmony default export */ var RadioInputvue_type_script_lang_js = ({
837
- name: 'RadioInput',
838
- emits: ['update:modelValue'],
839
- mixins: [FormInputMixin],
840
- props: {
841
- label: {
842
- type: String,
843
- default: null
844
- }
845
- },
846
-
847
- setup(props, {
848
- emit
849
- }) {
850
- const handleClick = e => emit('update:modelValue', e.target.value);
851
-
852
- return {
853
- handleClick
854
- };
855
- }
856
-
857
- });
858
- // CONCATENATED MODULE: ./lib/components/inputs/RadioInput.vue?vue&type=script&lang=js
859
-
860
- // CONCATENATED MODULE: ./lib/components/inputs/RadioInput.vue
861
-
862
-
863
-
864
- RadioInputvue_type_script_lang_js.render = RadioInputvue_type_template_id_2d04d097_bindings_label_props_handleClick_setup_render
865
-
866
- /* harmony default export */ var RadioInput = (RadioInputvue_type_script_lang_js);
867
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./lib/components/inputs/SelectInput.vue?vue&type=template&id=797a9e6e&bindings={"value":"setup","hasGroups":"setup"}
868
-
869
- function SelectInputvue_type_template_id_797a9e6e_bindings_value_setup_hasGroups_setup_render(_ctx, _cache, $props, $setup, $data, $options) {
870
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("select", {
871
- id: _ctx.id,
872
- "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => $setup.value = $event),
873
- disabled: _ctx.disabled,
874
- name: _ctx.name,
875
- placeholder: _ctx.placeholder
876
- }, [$setup.hasGroups ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], {
877
- key: 0
878
- }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.optionGroups, (opts, key) => {
879
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("optgroup", {
880
- key: `optGroup_${key}`,
881
- label: key
882
- }, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(opts, (optLabel, value) => {
883
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("option", {
884
- key: `option_${value}`,
885
- value: value
886
- }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(optLabel), 9, ["value"]);
887
- }), 128
888
- /* KEYED_FRAGMENT */
889
- ))], 8, ["label"]);
890
- }), 128
891
- /* KEYED_FRAGMENT */
892
- )) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], {
893
- key: 1
894
- }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.options, (option, i) => {
895
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("option", {
896
- key: `option_${i}`,
897
- value: option.value
898
- }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(option.label), 9, ["value"]);
899
- }), 128
900
- /* KEYED_FRAGMENT */
901
- ))], 8, ["id", "disabled", "name", "placeholder"])), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelSelect"], $setup.value]]);
902
- }
903
- // CONCATENATED MODULE: ./lib/components/inputs/SelectInput.vue?vue&type=template&id=797a9e6e&bindings={"value":"setup","hasGroups":"setup"}
904
-
905
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./lib/components/inputs/SelectInput.vue?vue&type=script&lang=js
906
-
907
-
908
- /* harmony default export */ var SelectInputvue_type_script_lang_js = ({
909
- name: 'SelectInput',
910
- mixins: [FormInputMixin],
911
-
912
- setup(props, {
913
- emit
914
- }) {
915
- const value = utils(props, emit);
916
- const hasGroups = Object.keys(props.optionGroups).length > 0;
917
- return {
918
- value,
919
- hasGroups
920
- };
921
- }
922
-
923
- });
924
- // CONCATENATED MODULE: ./lib/components/inputs/SelectInput.vue?vue&type=script&lang=js
925
-
926
- // CONCATENATED MODULE: ./lib/components/inputs/SelectInput.vue
927
-
928
-
929
-
930
- SelectInputvue_type_script_lang_js.render = SelectInputvue_type_template_id_797a9e6e_bindings_value_setup_hasGroups_setup_render
931
-
932
- /* harmony default export */ var SelectInput = (SelectInputvue_type_script_lang_js);
933
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./lib/components/inputs/TextAreaInput.vue?vue&type=template&id=cc1fd11e&bindings={"value":"setup"}
934
-
935
- function TextAreaInputvue_type_template_id_cc1fd11e_bindings_value_setup_render(_ctx, _cache, $props, $setup, $data, $options) {
936
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("textarea", {
937
- id: _ctx.id,
938
- "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => $setup.value = $event),
939
- disabled: _ctx.disabled,
940
- name: _ctx.name,
941
- placeholder: _ctx.placeholder
942
- }, null, 8, ["id", "disabled", "name", "placeholder"])), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], $setup.value]]);
943
- }
944
- // CONCATENATED MODULE: ./lib/components/inputs/TextAreaInput.vue?vue&type=template&id=cc1fd11e&bindings={"value":"setup"}
945
-
946
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./lib/components/inputs/TextAreaInput.vue?vue&type=script&lang=js
947
-
948
-
949
- /* harmony default export */ var TextAreaInputvue_type_script_lang_js = ({
950
- name: 'TextAreaInput',
951
- mixins: [FormInputMixin],
952
-
953
- setup(props, {
954
- emit
955
- }) {
956
- const value = utils(props, emit);
957
- return {
958
- value
959
- };
960
- }
961
-
962
- });
963
- // CONCATENATED MODULE: ./lib/components/inputs/TextAreaInput.vue?vue&type=script&lang=js
964
-
965
- // CONCATENATED MODULE: ./lib/components/inputs/TextAreaInput.vue
966
-
967
-
968
-
969
- TextAreaInputvue_type_script_lang_js.render = TextAreaInputvue_type_template_id_cc1fd11e_bindings_value_setup_render
970
-
971
- /* harmony default export */ var TextAreaInput = (TextAreaInputvue_type_script_lang_js);
972
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./lib/components/inputs/TextInput.vue?vue&type=template&id=604ff240&bindings={"value":"setup"}
973
-
974
- function TextInputvue_type_template_id_604ff240_bindings_value_setup_render(_ctx, _cache, $props, $setup, $data, $options) {
975
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("input", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["mergeProps"])({
976
- "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => $setup.value = $event),
977
- type: _ctx.type
978
- }, _ctx.$props), null, 16, ["type"])), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelDynamic"], $setup.value]]);
979
- }
980
- // CONCATENATED MODULE: ./lib/components/inputs/TextInput.vue?vue&type=template&id=604ff240&bindings={"value":"setup"}
981
-
982
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./lib/components/inputs/TextInput.vue?vue&type=script&lang=js
983
-
984
-
985
- /* harmony default export */ var TextInputvue_type_script_lang_js = ({
986
- name: 'TextInput',
987
- mixins: [FormInputMixin],
988
-
989
- setup(props, {
990
- emit
991
- }) {
992
- const value = utils(props, emit);
993
- return {
994
- value
995
- };
996
- }
997
-
998
- });
999
- // CONCATENATED MODULE: ./lib/components/inputs/TextInput.vue?vue&type=script&lang=js
1000
-
1001
- // CONCATENATED MODULE: ./lib/components/inputs/TextInput.vue
1002
-
1003
-
1004
-
1005
- TextInputvue_type_script_lang_js.render = TextInputvue_type_template_id_604ff240_bindings_value_setup_render
1006
-
1007
- /* harmony default export */ var TextInput = (TextInputvue_type_script_lang_js);
1008
- // CONCATENATED MODULE: ./index.js
1009
-
1010
-
1011
-
1012
-
1013
-
1014
-
1015
-
1016
-
1017
-
1018
-
1019
-
1020
- const defaultOptions = {
1021
- classes: {
1022
- 'form-row': 'form-maker-row',
1023
- 'form-column': 'form-maker-column',
1024
- 'form-label': 'form-maker-label',
1025
- 'input-group': 'form-maker-input-group',
1026
- 'input-wrapper': 'form-maker-input-wrapper',
1027
- 'input-error': 'form-maker-input-error',
1028
- 'input': 'form-maker-input',
1029
- 'error': 'form-maker-error',
1030
- 'help-text': 'form-maker-help-text',
1031
- 'submit-button': 'form-maker-submit'
1032
- },
1033
- components: {
1034
- 'form-maker-input-color': TextInput,
1035
- 'form-maker-input-date': TextInput,
1036
- 'form-maker-input-email': TextInput,
1037
- 'form-maker-input-month': TextInput,
1038
- 'form-maker-input-number': TextInput,
1039
- 'form-maker-input-password': TextInput,
1040
- 'form-maker-input-search': TextInput,
1041
- 'form-maker-input-tel': TextInput,
1042
- 'form-maker-input-time': TextInput,
1043
- 'form-maker-input-text': TextInput,
1044
- 'form-maker-input-url': TextInput,
1045
- 'form-maker-input-week': TextInput,
1046
- 'form-maker-input-range': TextInput,
1047
- 'form-maker-input-file': FileInput,
1048
- 'form-maker-input-textarea': TextAreaInput,
1049
- 'form-maker-input-select': SelectInput,
1050
- 'form-maker-input-checkbox': CheckboxInput,
1051
- 'form-maker-input-radio': RadioInput,
1052
- 'form-maker-label': FormMakerInputLabel,
1053
- 'form-maker-help': FormMakerInputHelp,
1054
- 'form-maker-error': FormMakerInputError
1055
- }
1056
- };
1057
- const index_FormMaker = {
1058
- install: (app, extraOptions = {}) => {
1059
- const options = {
1060
- classes: { ...defaultOptions.classes,
1061
- ...extraOptions.classes
1062
- },
1063
- components: { ...defaultOptions.components,
1064
- ...extraOptions.components
1065
- }
1066
- };
1067
- app.component('FormMaker', FormMaker);
1068
- app.component('FormMakerInput', FormMakerInput);
1069
- Object.keys(options.classes).forEach(key => {
1070
- app.provide(key, options.classes[key]);
1071
- });
1072
- Object.keys(options.components).forEach(key => {
1073
- app.component(key, options.components[key]);
1074
- });
1075
- }
1076
- };
1077
- /* harmony default export */ var index = (index_FormMaker);
1078
- // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
1079
-
1080
-
1081
- /* harmony default export */ var entry_lib = __webpack_exports__["default"] = (index);
1082
-
1083
-
1084
-
1085
- /***/ })
1086
-
1087
- /******/ });