From 55378c6b637583703ad2d03d6e6705fc64841a1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20Fie=C3=9Finger?= <41627893+bfiessinger@users.noreply.github.com> Date: Tue, 19 Jan 2021 12:42:12 +0100 Subject: [PATCH] Release 1.0.5 - **Bugfixes:** - getValues() method was not returning only last index of radio list or checkbox list - page indexes generated by ddPage() were set wrong - **New:** - Added eplacePage() method - Introduced a .browserslistrc file - **Docs:** - Added Method Descriptions to README.md --- changelog.md | 28 +++++--- dist/amd/utils/DOMUtils.js | 1 + dist/amd/utils/DOMUtils.js.map | 2 +- dist/amd/utils/array.js | 4 +- dist/amd/utils/array.js.map | 2 +- dist/amd/utils/input.js | 11 +-- dist/amd/utils/input.js.map | 2 +- dist/amd/utils/object.d.ts | 4 +- dist/amd/utils/object.js | 7 +- dist/amd/utils/object.js.map | 2 +- dist/amd/utils/validation.js | 1 + dist/amd/utils/validation.js.map | 2 +- dist/amd/wizerdForm.d.ts | 23 ++++++- dist/amd/wizerdForm.js | 68 ++++++++++++++----- dist/amd/wizerdForm.js.map | 2 +- dist/amd/wizerdFormControl.js.map | 2 +- dist/amd/wizerdFormElement.js | 1 + dist/amd/wizerdFormElement.js.map | 2 +- dist/cjs/utils/DOMUtils.js | 1 + dist/cjs/utils/DOMUtils.js.map | 2 +- dist/cjs/utils/array.js | 4 +- dist/cjs/utils/array.js.map | 2 +- dist/cjs/utils/input.js | 11 +-- dist/cjs/utils/input.js.map | 2 +- dist/cjs/utils/object.d.ts | 4 +- dist/cjs/utils/object.js | 7 +- dist/cjs/utils/object.js.map | 2 +- dist/cjs/utils/validation.js | 1 + dist/cjs/utils/validation.js.map | 2 +- dist/cjs/wizerdForm.d.ts | 23 ++++++- dist/cjs/wizerdForm.js | 68 ++++++++++++++----- dist/cjs/wizerdForm.js.map | 2 +- dist/cjs/wizerdFormControl.js.map | 2 +- dist/cjs/wizerdFormElement.js | 1 + dist/cjs/wizerdFormElement.js.map | 2 +- .../esm/interfaces/wizerdFormCreateElement.js | 1 + dist/esm/interfaces/wizerdFormOptions.js | 1 + dist/esm/utils/DOMUtils.js.map | 2 +- dist/esm/utils/input.js | 7 +- dist/esm/utils/input.js.map | 2 +- dist/esm/utils/object.d.ts | 4 +- dist/esm/wizerdForm.d.ts | 23 ++++++- dist/esm/wizerdForm.js | 68 ++++++++++++++----- dist/esm/wizerdForm.js.map | 2 +- dist/esm/wizerdFormControl.js.map | 2 +- dist/umd/utils/DOMUtils.js | 1 + dist/umd/utils/DOMUtils.js.map | 2 +- dist/umd/utils/array.js | 4 +- dist/umd/utils/array.js.map | 2 +- dist/umd/utils/input.js | 11 +-- dist/umd/utils/input.js.map | 2 +- dist/umd/utils/object.d.ts | 4 +- dist/umd/utils/object.js | 7 +- dist/umd/utils/object.js.map | 2 +- dist/umd/utils/validation.js | 1 + dist/umd/utils/validation.js.map | 2 +- dist/umd/wizerdForm.d.ts | 23 ++++++- dist/umd/wizerdForm.js | 68 ++++++++++++++----- dist/umd/wizerdForm.js.map | 2 +- dist/umd/wizerdFormControl.js.map | 2 +- dist/umd/wizerdFormElement.js | 1 + dist/umd/wizerdFormElement.js.map | 2 +- dist/wizerdform.bundle.js | 2 +- example/example.html | 20 ++++-- package.json | 2 +- 65 files changed, 411 insertions(+), 161 deletions(-) diff --git a/changelog.md b/changelog.md index 74b38e9..9b8fb70 100644 --- a/changelog.md +++ b/changelog.md @@ -1,22 +1,32 @@ -**1.0.3** -- Bugfixes: +### 1.0.5 +- **Bugfixes:** + - `getValues()` method was not returning only last index of radio list or checkbox list + - page indexes generated by `addPage()` were set wrong +- **New:** + - Added `replacePage()` method + - Introduced a `.browserslistrc` file +- **Docs:** + - Added Method Descriptions to `README.md` + +### 1.0.4 +**- Bugfixes:** - package.json `main` field was set wrong -**1.0.2** -- Bugfixes: +### 1.0.2 +- **Bugfixes:** - createElement function would render attributes like `className` as it is under some circumstances - `getValues()` method was not working on the types `checkbox`, `radio`, and `select-multiple` -- Enhancements: +- **Enhancements:** - Added `libraryExport`: `default` in webpack config - `getElements()` is now available on single pages and the whole form - `getValues()` is now available on single pages and the whole form -**1.0.1** -- Bugfixes: +### 1.0.1 +- **Bugfixes:** - Fixed an error where importing the library from node_modules was not possible -- Enhancements: +- **Enhancements:** - Added amd, umd, esm and cjs versions -- Code Quality: +- **Code Quality:** - Fixed some TypeScript Errors **1.0.0** diff --git a/dist/amd/utils/DOMUtils.js b/dist/amd/utils/DOMUtils.js index 6d4e3b3..9c6b75f 100644 --- a/dist/amd/utils/DOMUtils.js +++ b/dist/amd/utils/DOMUtils.js @@ -1,6 +1,7 @@ define(["require", "exports", "./array", "./object", "@s-libs/micro-dash"], function (require, exports, array_1, object_1, micro_dash_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); + exports.isElement = exports.isNode = exports.mountChildElements = exports.mountElements = exports.renderNode = exports.renderElement = exports.createElement = void 0; /** * create Form Element */ diff --git a/dist/amd/utils/DOMUtils.js.map b/dist/amd/utils/DOMUtils.js.map index ef4ab5c..5e913b1 100644 --- a/dist/amd/utils/DOMUtils.js.map +++ b/dist/amd/utils/DOMUtils.js.map @@ -1 +1 @@ -{"version":3,"file":"DOMUtils.js","sourceRoot":"","sources":["../../../core/utils/DOMUtils.ts"],"names":[],"mappings":";;;IAgBA;;OAEG;IACH,SAAgB,aAAa,CAAC,OAAe,EAAE,KAAkB,EAAE,QAAuC;QAA3D,sBAAA,EAAA,UAAkB;QAAE,yBAAA,EAAA,aAAuC;QACzG,OAAO;YACN,OAAO,SAAA;YACP,KAAK,OAAA;YACL,QAAQ,UAAA;SACR,CAAC;IACH,CAAC;IAND,sCAMC;IAED,SAAgB,aAAa,CAAC,IAA6B;QAC1D,IAAI,EAAE,CAAC;QAEP,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACxB,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,I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SAAgB,MAAM,CAAC,CAAC;QACvB,OAAO,CACN,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC;YAC9C,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,CAAC,QAAQ,KAAK,QAAQ,IAAI,OAAO,CAAC,CAAC,QAAQ,KAAG,QAAQ,CAC5F,CAAC;IACH,CAAC;IALD,wBAKC;IAED,qCAAqC;IACrC,SAAgB,SAAS,CAAC,CAAC;QAC1B,OAAO,CACN,OAAO,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,WAAW,CAAC,CAAC,CAAC,MAAM;YACnE,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC,IAAI,OAAO,CAAC,CAAC,QAAQ,KAAG,QAAQ,CAC5F,CAAC;IACH,CAAC;IALD,8BAKC;IAED,kBAAe;QACd,aAAa,eAAA;QACb,UAAU,YAAA;QACV,aAAa,eAAA;QACb,kBAAkB,oBAAA;QAClB,MAAM,QAAA;QACN,SAAS,WAAA;KACT,CAAC"} \ No newline at end of file diff --git a/dist/amd/utils/array.js b/dist/amd/utils/array.js index 5b332d6..7151bfc 100644 --- a/dist/amd/utils/array.js +++ b/dist/amd/utils/array.js @@ -1,12 +1,14 @@ define(["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - exports.maybeCastArray = function (data) { + exports.maybeCastArray = void 0; + var maybeCastArray = function (data) { if (!Array.isArray(data)) { data = (data) ? [data] : []; } return data; }; + exports.maybeCastArray = maybeCastArray; exports.default = { maybeCastArray: exports.maybeCastArray, }; diff --git a/dist/amd/utils/array.js.map b/dist/amd/utils/array.js.map index f31c95c..ec30460 100644 --- a/dist/amd/utils/array.js.map +++ b/dist/amd/utils/array.js.map @@ -1 +1 @@ -{"version":3,"file":"array.js","sourceRoot":"","sources":["../../../core/utils/array.ts"],"names":[],"mappings":";;;IAAa,QAAA,cAAc,GAAG,UAAC,IAAI;QAClC,IAAK,CAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAG;YAC5B,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;SAC5B;QACD,OAAO,IAAI,CAAC;IACb,CAAC,CAAA;IAED,kBAAe;QACd,cAAc,wBAAA;KACd,CAAA"} \ No newline at end of file +{"version":3,"file":"array.js","sourceRoot":"","sources":["../../../core/utils/array.ts"],"names":[],"mappings":";;;;IAAO,IAAM,cAAc,GAAG,UAAC,IAAI;QAClC,IAAK,CAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAG;YAC5B,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;SAC5B;QACD,OAAO,IAAI,CAAC;IACb,CAAC,CAAA;IALY,QAAA,cAAc,kBAK1B;IAED,kBAAe;QACd,cAAc,wBAAA;KACd,CAAA"} \ No newline at end of file diff --git a/dist/amd/utils/input.js b/dist/amd/utils/input.js index ee3e5ce..309f090 100644 --- a/dist/amd/utils/input.js +++ b/dist/amd/utils/input.js @@ -1,7 +1,8 @@ define(["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - exports.getInputValues = function (elements) { + exports.getInputValues = void 0; + var getInputValues = function (elements) { var map = {}; Array.prototype.forEach.call(elements, function (el) { var value = null; @@ -11,10 +12,11 @@ define(["require", "exports"], function (require, exports) { case 'checkbox': case 'radio': if (el.checked) { - value = true; + map[el.name] = (el.value === undefined || el.value === '') ? true : el.value; } break; default: + map[el.name] = el.value; break; } break; @@ -27,19 +29,20 @@ define(["require", "exports"], function (require, exports) { multiple.push(el.options[i].value); } } - value = multiple; + map[el.name] = multiple; break; default: + map[el.name] = el.value; break; } break; default: break; } - map[el.name] = (value === null) ? el.value : value; }); return map; }; + exports.getInputValues = getInputValues; exports.default = { getInputValues: exports.getInputValues, }; diff --git a/dist/amd/utils/input.js.map b/dist/amd/utils/input.js.map index d4ea290..29841cf 100644 --- a/dist/amd/utils/input.js.map +++ b/dist/amd/utils/input.js.map @@ -1 +1 @@ -{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../core/utils/input.ts"],"names":[],"mappings":";;;IAAa,QAAA,cAAc,GAAG,UAAC,QAAoC;QAClE,IAAM,GAAG,GAAW,EAAE,CAAC;QACvB,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAC,EAAE;YACzC,IAAI,KAAK,GAAQ,IAAI,CAAC;YACtB,QAAQ,EAAE,CAAC,QAAQ,EAAE;gBACpB,KAAK,OAAO;oBACX,QAAO,EAAE,CAAC,IAAI,EAAE;wBACf,KAAK,UAAU,CAAC;wBAChB,KAAK,OAAO;4BACX,IAAI,EAAE,CAAC,OAAO,EAAE;gCACf,KAAK,GAAG,IAAI,CAAC;6BACb;4BACD,MAAM;wBACP;4BACC,MAAM;qBACP;oBACD,MAAM;gBACP,KAAK,QAAQ;oBACZ,QAAO,EAAE,CAAC,IAAI,EAAE;wBACf,KAAK,iBAAiB;4BACrB,IAAI,QAAQ,GAAG,EAAE,CAAC;4BAClB,KAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gCAC1C,IAAI,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;oCAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;iCACnC;6BACD;4BACD,KAAK,GAAG,QAAQ,CAAC;4BACjB,MAAM;wBACP;4BACC,MAAM;qBACP;oBACD,MAAM;gBACP;oBACC,MAAM;aACP;YAED,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;QACpD,CAAC,CAAC,CAAC;QACH,OAAO,GAAG,CAAC;IACZ,CAAC,CAAA;IAED,kBAAe;QACd,cAAc,wBAAA;KACd,CAAA"} \ No newline at end of file +{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../core/utils/input.ts"],"names":[],"mappings":";;;;IAAO,IAAM,cAAc,GAAG,UAAC,QAAoC;QAClE,IAAM,GAAG,GAAW,EAAE,CAAC;QACvB,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAC,EAAE;YACzC,IAAI,KAAK,GAAQ,IAAI,CAAC;YACtB,QAAQ,EAAE,CAAC,QAAQ,EAAE;gBACpB,KAAK,OAAO;oBACX,QAAO,EAAE,CAAC,IAAI,EAAE;wBACf,KAAK,UAAU,CAAC;wBAChB,KAAK,OAAO;4BACX,IAAI,EAAE,CAAC,OAAO,EAAE;gCACf,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,KAAK,SAAS,IAAI,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;6BAC7E;4BACD,MAAM;wBACP;4BACC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC;4BACxB,MAAM;qBACP;oBACD,MAAM;gBACP,KAAK,QAAQ;oBACZ,QAAO,EAAE,CAAC,IAAI,EAAE;wBACf,KAAK,iBAAiB;4BACrB,IAAI,QAAQ,GAAG,EAAE,CAAC;4BAClB,KAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gCAC1C,IAAI,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;oCAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;iCACnC;6BACD;4BACD,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;4BACxB,MAAM;wBACP;4BACC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC;4BACxB,MAAM;qBACP;oBACD,MAAM;gBACP;oBACC,MAAM;aACP;QACF,CAAC,CAAC,CAAC;QACH,OAAO,GAAG,CAAC;IACZ,CAAC,CAAA;IAvCY,QAAA,cAAc,kBAuC1B;IAED,kBAAe;QACd,cAAc,wBAAA;KACd,CAAA"} \ No newline at end of file diff --git a/dist/amd/utils/object.d.ts b/dist/amd/utils/object.d.ts index 0cbe2e2..cc6c7b2 100644 --- a/dist/amd/utils/object.d.ts +++ b/dist/amd/utils/object.d.ts @@ -1,2 +1,2 @@ -export declare const ObjValues: (obj: Object) => any[]; -export declare const ObjEntries: (obj: Object) => any[]; +export declare const ObjValues: (obj: Object) => Array; +export declare const ObjEntries: (obj: Object) => Array; diff --git a/dist/amd/utils/object.js b/dist/amd/utils/object.js index 697309a..76bb024 100644 --- a/dist/amd/utils/object.js +++ b/dist/amd/utils/object.js @@ -1,15 +1,18 @@ define(["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - exports.ObjValues = function (obj) { + exports.ObjEntries = exports.ObjValues = void 0; + var ObjValues = function (obj) { return (!Object.values) ? Object.keys(obj).map(function (e) { return obj[e]; }) : Object.values(obj); }; - exports.ObjEntries = function (obj) { + exports.ObjValues = ObjValues; + var ObjEntries = function (obj) { return (!Object.entries) ? Object.keys(obj).map(function (key) { return [key, obj[key]]; }) : Object.entries(obj); }; + exports.ObjEntries = ObjEntries; }); //# sourceMappingURL=object.js.map \ No newline at end of file diff --git a/dist/amd/utils/object.js.map b/dist/amd/utils/object.js.map index 0d361ce..cb84ff0 100644 --- a/dist/amd/utils/object.js.map +++ b/dist/amd/utils/object.js.map @@ -1 +1 @@ -{"version":3,"file":"object.js","sourceRoot":"","sources":["../../../core/utils/object.ts"],"names":[],"mappings":";;;IAAa,QAAA,SAAS,GAAG,UAAC,GAAW;QACpC,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;YACpB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,GAAG,CAAC,CAAC,CAAC,EAAN,CAAM,CAAC,CAAC,CAAC;YACnC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC,CAAA;IAEY,QAAA,UAAU,GAAG,UAAC,GAAW;QACrC,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAA,GAAG,IAAI,OAAA,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,EAAf,CAAe,CAAC,CAAC,CAAC;YAC9C,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"object.js","sourceRoot":"","sources":["../../../core/utils/object.ts"],"names":[],"mappings":";;;;IAAO,IAAM,SAAS,GAAG,UAAC,GAAW;QACpC,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;YACpB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,GAAG,CAAC,CAAC,CAAC,EAAN,CAAM,CAAC,CAAC,CAAC;YACnC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC,CAAA;IAJY,QAAA,SAAS,aAIrB;IAEM,IAAM,UAAU,GAAG,UAAC,GAAW;QACrC,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAA,GAAG,IAAI,OAAA,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,EAAf,CAAe,CAAC,CAAC,CAAC;YAC9C,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC,CAAA;IAJY,QAAA,UAAU,cAItB"} \ No newline at end of file diff --git a/dist/amd/utils/validation.js b/dist/amd/utils/validation.js index 3cbe5d0..af7f285 100644 --- a/dist/amd/utils/validation.js +++ b/dist/amd/utils/validation.js @@ -1,6 +1,7 @@ define(["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateInput = void 0; /** * Form input validation * diff --git a/dist/amd/utils/validation.js.map b/dist/amd/utils/validation.js.map index 599ba84..6a6d805 100644 --- a/dist/amd/utils/validation.js.map +++ b/dist/amd/utils/validation.js.map @@ -1 +1 @@ -{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../core/utils/validation.ts"],"names":[],"mappings":";;;IAAA;;;;;;;;;OASG;IACH,SAAgB,aAAa,CAAC,KAAK;QAClC,IAAK,eAAe,IAAI,gBAAgB,CAAC,SAAS,EAAG;YACpD,IAAK,CAAE,KAAK,CAAC,aAAa,EAAE,EAAG;gBAC9B,OAAO,KAAK,CAAC;aACb;SACD;aAAM;YACN,8BAA8B;YAC9B,IAAI,KAAK,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE;gBAClF,OAAO,KAAK,CAAC;aACb;YACD,+BAA+B;YAC/B,IAAI,KAAK,CAAC,YAAY,CAAC,WAAW,CAA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CAsEC"} \ No newline at end of file +{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../core/utils/validation.ts"],"names":[],"mappings":";;;;IAAA;;;;;;;;;OASG;IACH,SAAgB,aAAa,CAAC,KAAK;QAClC,IAAK,eAAe,IAAI,gBAAgB,CAAC,SAAS,EAAG;YACpD,IAAK,CAAE,KAAK,CAAC,aAAa,EAAE,EAAG;gBAC9B,OAAO,KAAK,CAAC;aACb;SACD;aAAM;YACN,8BAA8B;YAC9B,IAAI,KAAK,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE;gBAClF,OAAO,KAAK,CAAC;aACb;YACD,+BAA+B;YAC/B,IAAI,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE;gBACxG,OAAO,KAAK,CAAC;aACb;YACD,+BAA+B;YAC/B,IAAI,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE;gBACxG,OAAO,KAAK,CAAC;aACb;YACD,mBAAmB;YACnB,IAAI,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,IAAI,CAAE,IAAI,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE;gBAChH,OAAO,KAAK,CAAC;aACb;YACD,gCAAgC;YAChC,QAAQ,KAAK,CAAC,IAAI,EAAE;gBACnB,KAAK,QAAQ;oBACZ,2CAA2C;oBAC3C,IAAI,KAAK,CAAC,YAAY,CAAC,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AClB,IAAI,YAAY,GAAG,IAAI,MAAM,CAAC,uJAAuJ,EAAE,GAAG,CAAC,CAAC;oBAC5L,IAAI,CAAE,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE;wBAC7C,OAAO,KAAK,CAAC;qBACb;gBACF,KAAK,KAAK;oBACT,eAAe;oBACf,IAAI,UAAU,GAAG,IAAI,MAAM,CAAC,m0CAAm0C,EAAE,GAAG,CAAC,CAAC;oBACt2C,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,IAAI,CAAE,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE;wBACnE,OAAO,KAAK,CAAC;qBACb;gBACF;oBACC,MAAM;aACP;SACD;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAtED,sCAsEC"} \ No newline at end of file diff --git a/dist/amd/wizerdForm.d.ts b/dist/amd/wizerdForm.d.ts index 0085a9e..253ba2f 100644 --- a/dist/amd/wizerdForm.d.ts +++ b/dist/amd/wizerdForm.d.ts @@ -117,6 +117,19 @@ export default class WizerdForm { * @return {void|false} returns false on the last page */ navigate(value?: number, noValidate?: boolean | undefined): void | false; + /** + * Verify a given pageIndex + * If index is below zero or bigger than the amount of pages + * the new index will point to the amount of pages + * + * @param index + */ + private verifyNewPageIndex; + /** + * + * @param index + */ + private prepareAddPage; /** * Add a new `WizerdFromPage` by string. * This method can be used to create pages from AJAX Calls or other @@ -127,7 +140,8 @@ export default class WizerdForm { * * @return {void|WizerdFormPage} */ - addPage(newPage: Function | string, index?: number): void | WizerdFormPage; + addPage(newPage: Function | string, index?: number): void; + replacePage(index: number, newPage: Function | string): void; /** * Dynamically create accessible Form controls * @@ -139,9 +153,9 @@ export default class WizerdForm { */ addFormControl(key: string, tagName: string, props?: Object, inner?: null | string | Object, update?: boolean): WizerdFormControl; createElement(tagName: string, props?: Object, children?: Array): wizerdFormCreateElement; - setControlsWrapper(): HTMLElement; + private setControlsWrapper; updateControls(): void; - removeControls(): void; + private removeControls; removeControl(key: string): void; /** * Custom Event Handlers @@ -158,6 +172,9 @@ export default class WizerdForm { * navigate: * fires on navigation * + * submit: + * fires on form submit + * * @param {string} on * @param {CallableFunction} fn */ diff --git a/dist/amd/wizerdForm.js b/dist/amd/wizerdForm.js index 318233e..1c53e46 100644 --- a/dist/amd/wizerdForm.js +++ b/dist/amd/wizerdForm.js @@ -220,6 +220,34 @@ define(["require", "exports", "./utils/DOMUtils", "./utils/object", "./utils/inp this.goToPage(this.index); this.updateControls(); }; + /** + * Verify a given pageIndex + * If index is below zero or bigger than the amount of pages + * the new index will point to the amount of pages + * + * @param index + */ + WizerdForm.prototype.verifyNewPageIndex = function (index) { + if (index < 0 || index > this.pages.length) { + index = this.pages.length; + } + return index; + }; + /** + * + * @param index + */ + WizerdForm.prototype.prepareAddPage = function (index) { + if (index === void 0) { index = -1; } + var tempPage = document.createElement('fieldset'); + index = this.verifyNewPageIndex(index); + var page = new wizerdFormPage_1.default(tempPage, index, this.options); + this.pages.splice(index, 0, page); + for (var i = index + 1; i < this.pages.length; i++) { + this.pages[i].index = i; + } + return tempPage; + }; /** * Add a new `WizerdFromPage` by string. * This method can be used to create pages from AJAX Calls or other @@ -238,30 +266,31 @@ define(["require", "exports", "./utils/DOMUtils", "./utils/object", "./utils/inp if (!micro_dash_1.isString(newPage) || newPage === '') { return; } - var tempPage = document.createElement('fieldset'); - tempPage.innerHTML = newPage; - var pageNode; - if (tempPage.children.length > 1) { - pageNode = tempPage; - } - else { - pageNode = tempPage.children[0]; - } - if (index < 0 || index > this.pages.length) { - index = this.pages.length; - } - var reference = this.pages[index]; + var tempPage = this.prepareAddPage(index); + var reference = this.pages[index + 1]; if (typeof reference !== 'undefined') { - this.form.insertBefore(pageNode, reference.page); + this.form.insertBefore(tempPage, reference.page); } else { - this.form.insertBefore(pageNode, this.pages[index - 1].page.nextSibling); + this.form.insertBefore(tempPage, this.pages[index - 1].page.nextSibling); } - var page = new wizerdFormPage_1.default(pageNode, index, this.options); - this.pages.push(page); + this.replacePage(index, newPage); this.applyFormElementClasses(); this.goToPage(this.index); - return page; + }; + WizerdForm.prototype.replacePage = function (index, newPage) { + if (index === undefined || newPage === undefined) { + return; + } + if (typeof newPage === 'function') { + newPage = newPage(); + } + if (!micro_dash_1.isString(newPage) || newPage === '') { + return; + } + index = Math.min(this.verifyNewPageIndex(index), this.pages.length - 1); + var toReplace = this.pages[index].page; + toReplace.innerHTML = newPage; }; /** * Dynamically create accessible Form controls @@ -355,6 +384,9 @@ define(["require", "exports", "./utils/DOMUtils", "./utils/object", "./utils/inp * navigate: * fires on navigation * + * submit: + * fires on form submit + * * @param {string} on * @param {CallableFunction} fn */ diff --git a/dist/amd/wizerdForm.js.map b/dist/amd/wizerdForm.js.map index 2876d04..b3fe3c0 100644 --- a/dist/amd/wizerdForm.js.map +++ b/dist/amd/wizerdForm.js.map @@ -1 +1 @@ -{"version":3,"file":"wizerdForm.js","sourceRoot":"","sources":["../../core/wizerdForm.ts"],"names":[],"mappings":";;;;;;;;;;IAoBA;;;;OAIG;IACH;QAcC;;;;;WAKG;QACH,oBAAY,IAAqB,EAAE,OAA0B;YAV7D,SAAI,GAAG,EAAE,UAAU,CAAC,UAAU,CAAC;YAY9B,8BAA8B;YAC5B,IAAM,QAAQ,GAAsB;gBACrC,UAAU,EAAE,CAAC;gBACb,KAAK,EAAE,kBAAkB;gBACzB,WAAW;gBACX,gBAAgB,EAAE,QAAQ;gBAC1B,eAAe,EAAE,IAAI;gBACrB,UAAU;gBACV,eAAe,EAAE,wBAAwB;gBACzC,eAAe,EAAE,wBAAwB;aACzC,CAAC;YAEF,OAAO,GAAG,OAAO,IAAI,QAAQ,CAAC;YAC9B,KAAK,IAAI,GAAG,IAAI,QAAQ,EAAE;gBACzB,IAAI,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAE,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;oBACl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c,EAAE,CAAC,WAAW,EAAE,EAAE,UAAE,SAAS;gBAC5E,SAAS,CAAC,gBAAgB,CAAC,6BAA6B,EAAE,UAAC,GAAG;oBAC7D,EAAE,CAAC,IAAI,CACN,SAAS,EACT,GAAG,EACH;wBACC,UAAU,EAAE,KAAI;wBAChB,EAAE,EAAE,SAAS;qBACb,CACD,EAAE,CAAC;gBACL,CAAC,CAAC,CAAC;YACJ,CAAC,CAAE,CAAC;QACL,CAAC;QAEO,wCAAmB,GAA3B,UAA4B,EAAY;YAAxC,iBAYC;YAXA,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,qBAAqB,EAAE,UAAC,GAAG;gBACrD,IAAM,QAAQ,GAAG,KAAI,CAAC,KAAK,CAAC;gBAC5B,EAAE,CAAC,IAAI,CACN,KAAI,EACJ,GAAG,EACH;oBACC,UAAU,EAAE,KAAI;oBAChB,KAAK,EAAE,QAAQ;iBACf,CACD,EAAE,CAAC;YACL,CAAC,CAAC,CAAC;QACJ,CAAC;QAEO,oCAAe,GAAvB,UAAwB,EAAY;YAApC,iBAUC;YATA,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,UAAC,GAAG;gBACxC,EAAE,CAAC,IAAI,CACN,KAAI,EACJ,GAAG,EACH;oBACC,UAAU,EAAE,KAAI;iBAChB,CACD,EAAE,CAAC;YACL,CAAC,CAAC,CAAC;QACJ,CAAC;QAtdO,qBAAU,GAAG,CAAC,CAAC;QAwdxB,iBAAC;KAAA,AAjeD,IAieC;sBAjeoB,UAAU"} \ No newline at end of file +{"version":3,"file":"wizerdForm.js","sourceRoot":"","sources":["../../core/wizerdForm.ts"],"names":[],"mappings":";;;;;;;;;;IAoBA;;;;OAIG;IACH;QAcC;;;;;WAKG;QACH,oBAAY,IAAqB,EAAE,OAA0B;YAV7D,SAAI,GAAG,EAAE,UAAU,CAAC,UAAU,CAAC;YAY9B,8BAA8B;YAC5B,IAAM,QAAQ,GAAsB;gBACrC,UAAU,EAA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AY;YAA7C,iBAaC;YAZA,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,WAAW,EAAE,EAAE,UAAE,SAAS;gBAC5E,SAAS,CAAC,gBAAgB,CAAC,6BAA6B,EAAE,UAAC,GAAG;oBAC7D,EAAE,CAAC,IAAI,CACN,SAAS,EACT,GAAG,EACH;wBACC,UAAU,EAAE,KAAI;wBAChB,EAAE,EAAE,SAAS;qBACb,CACD,EAAE,CAAC;gBACL,CAAC,CAAC,CAAC;YACJ,CAAC,CAAE,CAAC;QACL,CAAC;QAEO,wCAAmB,GAA3B,UAA4B,EAAY;YAAxC,iBAYC;YAXA,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,qBAAqB,EAAE,UAAC,GAAG;gBACrD,IAAM,QAAQ,GAAG,KAAI,CAAC,KAAK,CAAC;gBAC5B,EAAE,CAAC,IAAI,CACN,KAAI,EACJ,GAAG,EACH;oBACC,UAAU,EAAE,KAAI;oBAChB,KAAK,EAAE,QAAQ;iBACf,CACD,EAAE,CAAC;YACL,CAAC,CAAC,CAAC;QACJ,CAAC;QAEO,oCAAe,GAAvB,UAAwB,EAAY;YAApC,iBAUC;YATA,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,UAAC,GAAG;gBACxC,EAAE,CAAC,IAAI,CACN,KAAI,EACJ,GAAG,EACH;oBACC,UAAU,EAAE,KAAI;iBAChB,CACD,EAAE,CAAC;YACL,CAAC,CAAC,CAAC;QACJ,CAAC;QA5fO,qBAAU,GAAG,CAAC,CAAC;QA8fxB,iBAAC;KAAA,AAvgBD,IAugBC;sBAvgBoB,UAAU"} \ No newline at end of file diff --git a/dist/amd/wizerdFormControl.js.map b/dist/amd/wizerdFormControl.js.map index 3a70975..cf8b180 100644 --- a/dist/amd/wizerdFormControl.js.map +++ b/dist/amd/wizerdFormControl.js.map @@ -1 +1 @@ -{"version":3,"file":"wizerdFormControl.js","sourceRoot":"","sources":["../../core/wizerdFormControl.ts"],"names":[],"mappings":";;;IAWA;QAMC,mBAAY,GAAW,EAAE,OAAe,EAAE,KAAa,EAAE,QAAQ;YAEhE,QAAQ,GAAG,sBAAc,CAAC,QAAQ,CAAC,CAAC;YAEpC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;YACf,IAAI,CAAC,IAAI,GAAG,wBAAa,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC;YAChE,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;QAE1B,CAAC;QAED;;;;;;WAMG;QACH,oCAAgB,GAAhB,UAAiB,IAAY,EAAE,QAAuB,EAAE,OAA6C;YAArG,iBAcC;YAduD,wBAAA,EAAA,eAA6C;YACpG,QAAQ,CAAC,gBAAgB,CACxB,IAAI,EACJ,UAAC,GAAG;gBACG,IAAA,mBAAM,CAAS;gBACb,IAAA,uBAAO,CAAU;gBAEzB,IAAK,OAAO,KAAK,SAAS,IAAI,MAAM,KAAK,IAAI,IAAI,CAAE,OAAO,CAAC,QAAQ,CAAC,MAAc,CAAC,EAAG;oBACrF,OAAO;iBACP;gBACD,QAAQ,CAAC,GAAG,CAAC,CAAC;YACf,CAAC,EACD,OAAO,CACP,CAAC;QACH,CAAC;QAEF,gBAAC;IAAD,CAAC,AAvCD,IAuCC"} \ No newline at end of file +{"version":3,"file":"wizerdFormControl.js","sourceRoot":"","sources":["../../core/wizerdFormControl.ts"],"names":[],"mappings":";;;IAWA;QAMC,mBAAY,GAAW,EAAE,OAAe,EAAE,KAAa,EAAE,QAAQ;YAEhE,QAAQ,GAAG,sBAAc,CAAC,QAAQ,CAAC,CAAC;YAEpC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;YACf,IAAI,CAAC,IAAI,GAAG,wBAAa,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC;YAChE,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;QAE1B,CAAC;QAED;;;;;;WAMG;QACH,oCAAgB,GAAhB,UAAiB,IAAY,EAAE,QAAuB,EAAE,OAA6C;YAArG,iBAcC;YAduD,wBAAA,EAAA,eAA6C;YACpG,QAAQ,CAAC,gBAAgB,CACxB,IAAI,EACJ,UAAC,GAAG;gBACG,IAAA,MAAM,GAAK,GAAG,OAAR,CAAS;gBACb,IAAA,OAAO,GAAK,KAAI,QAAT,CAAU;gBAEzB,IAAK,OAAO,KAAK,SAAS,IAAI,MAAM,KAAK,IAAI,IAAI,CAAE,OAAO,CAAC,QAAQ,CAAC,MAAc,CAAC,EAAG;oBACrF,OAAO;iBACP;gBACD,QAAQ,CAAC,GAAG,CAAC,CAAC;YACf,CAAC,EACD,OAAO,CACP,CAAC;QACH,CAAC;QAEF,gBAAC;IAAD,CAAC,AAvCD,IAuCC"} \ No newline at end of file diff --git a/dist/amd/wizerdFormElement.js b/dist/amd/wizerdFormElement.js index fb0044e..fb5b0f1 100644 --- a/dist/amd/wizerdFormElement.js +++ b/dist/amd/wizerdFormElement.js @@ -1,6 +1,7 @@ define(["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); + exports.WizerdFormElement = void 0; var WizerdFormElement = /** @class */ (function () { function WizerdFormElement() { } diff --git a/dist/amd/wizerdFormElement.js.map b/dist/amd/wizerdFormElement.js.map index d3b063e..6f53be2 100644 --- a/dist/amd/wizerdFormElement.js.map +++ b/dist/amd/wizerdFormElement.js.map @@ -1 +1 @@ -{"version":3,"file":"wizerdFormElement.js","sourceRoot":"","sources":["../../core/wizerdFormElement.ts"],"names":[],"mappings":";;;IAAA;QAEC;QAEA,CAAC;QAEF,wBAAC;IAAD,CAAC,AAND,IAMC;IANY,8CAAiB;IAQ9B,kBAAe,iBAAiB,CAAC"} \ No newline at end of file +{"version":3,"file":"wizerdFormElement.js","sourceRoot":"","sources":["../../core/wizerdFormElement.ts"],"names":[],"mappings":";;;;IAAA;QAEC;QAEA,CAAC;QAEF,wBAAC;IAAD,CAAC,AAND,IAMC;IANY,8CAAiB;IAQ9B,kBAAe,iBAAiB,CAAC"} \ No newline at end of file diff --git a/dist/cjs/utils/DOMUtils.js b/dist/cjs/utils/DOMUtils.js index 78a07e9..1fb1f0f 100644 --- a/dist/cjs/utils/DOMUtils.js +++ b/dist/cjs/utils/DOMUtils.js @@ -1,5 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.isElement = exports.isNode = exports.mountChildElements = exports.mountElements = exports.renderNode = exports.renderElement = exports.createElement = void 0; /** * Internal Dependencies */ diff --git a/dist/cjs/utils/DOMUtils.js.map b/dist/cjs/utils/DOMUtils.js.map index 5353024..467ec93 100644 --- a/dist/cjs/utils/DOMUtils.js.map +++ b/dist/cjs/utils/DOMUtils.js.map @@ -1 +1 @@ -{"version":3,"file":"DOMUtils.js","sourceRoot":"","sources":["../../../core/utils/DOMUtils.ts"],"names":[],"mappings":";;AAKA;;GAEG;AACH,iCAAyC;AACzC,mCAAsC;AAEtC;;GAEG;AACH,iDAA0D;AAE1D;;GAEG;AACH,SAAgB,aAAa,CAAC,OAAe,EAAE,KAAkB,EAAE,QAAuC;IAA3D,sBAAA,EAAA,UAAkB;IAAE,yBAAA,EAAA,aAAuC;IACzG,OAAO;QACN,OAAO,SAAA;QACP,KAAK,OAAA;QACL,QAAQ,UAAA;KACR,CAAC;AACH,CAAC;AAND,sCAMC;AAED,SAAgB,aAAa,CAAC,IAA6B;IAC1D,IAAI,EAAE,CAAC;IAEP,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACxB,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;KAClE;IAED,IAAK,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,UAAU,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Q,CAAC,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC;QAC9C,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,CAAC,QAAQ,KAAK,QAAQ,IAAI,OAAO,CAAC,CAAC,QAAQ,KAAG,QAAQ,CAC5F,CAAC;AACH,CAAC;AALD,wBAKC;AAED,qCAAqC;AACrC,SAAgB,SAAS,CAAC,CAAC;IAC1B,OAAO,CACN,OAAO,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,WAAW,CAAC,CAAC,CAAC,MAAM;QACnE,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC,IAAI,OAAO,CAAC,CAAC,QAAQ,KAAG,QAAQ,CAC5F,CAAC;AACH,CAAC;AALD,8BAKC;AAED,kBAAe;IACd,aAAa,eAAA;IACb,UAAU,YAAA;IACV,aAAa,eAAA;IACb,kBAAkB,oBAAA;IAClB,MAAM,QAAA;IACN,SAAS,WAAA;CACT,CAAC"} \ No newline at end of file diff --git a/dist/cjs/utils/array.js b/dist/cjs/utils/array.js index 51994cd..7b6c1da 100644 --- a/dist/cjs/utils/array.js +++ b/dist/cjs/utils/array.js @@ -1,11 +1,13 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.maybeCastArray = function (data) { +exports.maybeCastArray = void 0; +var maybeCastArray = function (data) { if (!Array.isArray(data)) { data = (data) ? [data] : []; } return data; }; +exports.maybeCastArray = maybeCastArray; exports.default = { maybeCastArray: exports.maybeCastArray, }; diff --git a/dist/cjs/utils/array.js.map b/dist/cjs/utils/array.js.map index 62d9ee9..2aa90e5 100644 --- a/dist/cjs/utils/array.js.map +++ b/dist/cjs/utils/array.js.map @@ -1 +1 @@ -{"version":3,"file":"array.js","sourceRoot":"","sources":["../../../core/utils/array.ts"],"names":[],"mappings":";;AAAa,QAAA,cAAc,GAAG,UAAC,IAAI;IAClC,IAAK,CAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAG;QAC5B,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5B;IACD,OAAO,IAAI,CAAC;AACb,CAAC,CAAA;AAED,kBAAe;IACd,cAAc,wBAAA;CACd,CAAA"} \ No newline at end of file +{"version":3,"file":"array.js","sourceRoot":"","sources":["../../../core/utils/array.ts"],"names":[],"mappings":";;;AAAO,IAAM,cAAc,GAAG,UAAC,IAAI;IAClC,IAAK,CAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAG;QAC5B,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5B;IACD,OAAO,IAAI,CAAC;AACb,CAAC,CAAA;AALY,QAAA,cAAc,kBAK1B;AAED,kBAAe;IACd,cAAc,wBAAA;CACd,CAAA"} \ No newline at end of file diff --git a/dist/cjs/utils/input.js b/dist/cjs/utils/input.js index 452d550..6426298 100644 --- a/dist/cjs/utils/input.js +++ b/dist/cjs/utils/input.js @@ -1,6 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.getInputValues = function (elements) { +exports.getInputValues = void 0; +var getInputValues = function (elements) { var map = {}; Array.prototype.forEach.call(elements, function (el) { var value = null; @@ -10,10 +11,11 @@ exports.getInputValues = function (elements) { case 'checkbox': case 'radio': if (el.checked) { - value = true; + map[el.name] = (el.value === undefined || el.value === '') ? true : el.value; } break; default: + map[el.name] = el.value; break; } break; @@ -26,19 +28,20 @@ exports.getInputValues = function (elements) { multiple.push(el.options[i].value); } } - value = multiple; + map[el.name] = multiple; break; default: + map[el.name] = el.value; break; } break; default: break; } - map[el.name] = (value === null) ? el.value : value; }); return map; }; +exports.getInputValues = getInputValues; exports.default = { getInputValues: exports.getInputValues, }; diff --git a/dist/cjs/utils/input.js.map b/dist/cjs/utils/input.js.map index 25a7c49..a36d2ae 100644 --- a/dist/cjs/utils/input.js.map +++ b/dist/cjs/utils/input.js.map @@ -1 +1 @@ -{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../core/utils/input.ts"],"names":[],"mappings":";;AAAa,QAAA,cAAc,GAAG,UAAC,QAAoC;IAClE,IAAM,GAAG,GAAW,EAAE,CAAC;IACvB,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAC,EAAE;QACzC,IAAI,KAAK,GAAQ,IAAI,CAAC;QACtB,QAAQ,EAAE,CAAC,QAAQ,EAAE;YACpB,KAAK,OAAO;gBACX,QAAO,EAAE,CAAC,IAAI,EAAE;oBACf,KAAK,UAAU,CAAC;oBAChB,KAAK,OAAO;wBACX,IAAI,EAAE,CAAC,OAAO,EAAE;4BACf,KAAK,GAAG,IAAI,CAAC;yBACb;wBACD,MAAM;oBACP;wBACC,MAAM;iBACP;gBACD,MAAM;YACP,KAAK,QAAQ;gBACZ,QAAO,EAAE,CAAC,IAAI,EAAE;oBACf,KAAK,iBAAiB;wBACrB,IAAI,QAAQ,GAAG,EAAE,CAAC;wBAClB,KAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;4BAC1C,IAAI,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;gCAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;6BACnC;yBACD;wBACD,KAAK,GAAG,QAAQ,CAAC;wBACjB,MAAM;oBACP;wBACC,MAAM;iBACP;gBACD,MAAM;YACP;gBACC,MAAM;SACP;QAED,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,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CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;6BACnC;yBACD;wBACD,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;wBACxB,MAAM;oBACP;wBACC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC;wBACxB,MAAM;iBACP;gBACD,MAAM;YACP;gBACC,MAAM;SACP;IACF,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,CAAC;AACZ,CAAC,CAAA;AAvCY,QAAA,cAAc,kBAuC1B;AAED,kBAAe;IACd,cAAc,wBAAA;CACd,CAAA"} \ No newline at end of file diff --git a/dist/cjs/utils/object.d.ts b/dist/cjs/utils/object.d.ts index 0cbe2e2..cc6c7b2 100644 --- a/dist/cjs/utils/object.d.ts +++ b/dist/cjs/utils/object.d.ts @@ -1,2 +1,2 @@ -export declare const ObjValues: (obj: Object) => any[]; -export declare const ObjEntries: (obj: Object) => any[]; +export declare const ObjValues: (obj: Object) => Array; +export declare const ObjEntries: (obj: Object) => Array; diff --git a/dist/cjs/utils/object.js b/dist/cjs/utils/object.js index 632f9d6..3daaad2 100644 --- a/dist/cjs/utils/object.js +++ b/dist/cjs/utils/object.js @@ -1,13 +1,16 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.ObjValues = function (obj) { +exports.ObjEntries = exports.ObjValues = void 0; +var ObjValues = function (obj) { return (!Object.values) ? Object.keys(obj).map(function (e) { return obj[e]; }) : Object.values(obj); }; -exports.ObjEntries = function (obj) { +exports.ObjValues = ObjValues; +var ObjEntries = function (obj) { return (!Object.entries) ? Object.keys(obj).map(function (key) { return [key, obj[key]]; }) : Object.entries(obj); }; +exports.ObjEntries = ObjEntries; //# sourceMappingURL=object.js.map \ No newline at end of file diff --git a/dist/cjs/utils/object.js.map b/dist/cjs/utils/object.js.map index 2fee697..2fc4bfe 100644 --- a/dist/cjs/utils/object.js.map +++ b/dist/cjs/utils/object.js.map @@ -1 +1 @@ -{"version":3,"file":"object.js","sourceRoot":"","sources":["../../../core/utils/object.ts"],"names":[],"mappings":";;AAAa,QAAA,SAAS,GAAG,UAAC,GAAW;IACpC,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,GAAG,CAAC,CAAC,CAAC,EAAN,CAAM,CAAC,CAAC,CAAC;QACnC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC,CAAA;AAEY,QAAA,UAAU,GAAG,UAAC,GAAW;IACrC,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;QACrB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAA,GAAG,IAAI,OAAA,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,EAAf,CAAe,CAAC,CAAC,CAAC;QAC9C,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AAC1B,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"object.js","sourceRoot":"","sources":["../../../core/utils/object.ts"],"names":[],"mappings":";;;AAAO,IAAM,SAAS,GAAG,UAAC,GAAW;IACpC,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,GAAG,CAAC,CAAC,CAAC,EAAN,CAAM,CAAC,CAAC,CAAC;QACnC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC,CAAA;AAJY,QAAA,SAAS,aAIrB;AAEM,IAAM,UAAU,GAAG,UAAC,GAAW;IACrC,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;QACrB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAA,GAAG,IAAI,OAAA,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,EAAf,CAAe,CAAC,CAAC,CAAC;QAC9C,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AAC1B,CAAC,CAAA;AAJY,QAAA,UAAU,cAItB"} \ No newline at end of file diff --git a/dist/cjs/utils/validation.js b/dist/cjs/utils/validation.js index 81e1510..c35d0aa 100644 --- a/dist/cjs/utils/validation.js +++ b/dist/cjs/utils/validation.js @@ -1,5 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.validateInput = void 0; /** * Form input validation * diff --git a/dist/cjs/utils/validation.js.map b/dist/cjs/utils/validation.js.map index 50f92ac..50ccd11 100644 --- a/dist/cjs/utils/validation.js.map +++ b/dist/cjs/utils/validation.js.map @@ -1 +1 @@ -{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../core/utils/validation.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;GASG;AACH,SAAgB,aAAa,CAAC,KAAK;IAClC,IAAK,eAAe,IAAI,gBAAgB,CAAC,SAAS,EAAG;QACpD,IAAK,CAAE,KAAK,CAAC,aAAa,EAAE,EAAG;YAC9B,OAAO,KAAK,CAAC;SACb;KACD;SAAM;QACN,8BAA8B;QAC9B,IAAI,KAAK,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE;YAClF,OAAO,KAAK,CAAC;SACb;QACD,+BAA+B;QAC/B,IAAI,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE;YACxG,OAAO,KAAK,CAA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AAI,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;oBAC7F,OAAO,KAAK,CAAC;iBACb;YACF,KAAK,MAAM,CAAC;YACZ,KAAK,MAAM;gBACV,wCAAwC;gBACxC,IAAI,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,EAAE;oBACzE,OAAO,KAAK,CAAC;iBACb;gBACD,wCAAwC;gBACxC,IAAI,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,EAAE;oBACzE,OAAO,KAAK,CAAC;iBACb;YACF,KAAK,OAAO;gBACX,kBAAkB;gBAClB,IAAI,YAAY,GAAG,IAAI,MAAM,CAAC,uJAAuJ,EAAE,GAAG,CAAC,CAAC;gBAC5L,IAAI,CAAE,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE;oBAC7C,OAAO,KAAK,CAAC;iBACb;YACF,KAAK,KAAK;gBACT,eAAe;gBACf,IAAI,UAAU,GAAG,IAAI,MAAM,CAAC,m0CAAm0C,EAAE,GAAG,CAAC,CAAC;gBACt2C,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,IAAI,CAAE,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE;oBACnE,OAAO,KAAK,CAAC;iBACb;YACF;gBACC,MAAM;SACP;KACD;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AAtED,sCAsEC"} \ No newline at end of file +{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../core/utils/validation.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;GASG;AACH,SAAgB,aAAa,CAAC,KAAK;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AC,CAAC,EAAE;oBAC7C,OAAO,KAAK,CAAC;iBACb;YACF,KAAK,KAAK;gBACT,eAAe;gBACf,IAAI,UAAU,GAAG,IAAI,MAAM,CAAC,m0CAAm0C,EAAE,GAAG,CAAC,CAAC;gBACt2C,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,IAAI,CAAE,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE;oBACnE,OAAO,KAAK,CAAC;iBACb;YACF;gBACC,MAAM;SACP;KACD;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AAtED,sCAsEC"} \ No newline at end of file diff --git a/dist/cjs/wizerdForm.d.ts b/dist/cjs/wizerdForm.d.ts index 0085a9e..253ba2f 100644 --- a/dist/cjs/wizerdForm.d.ts +++ b/dist/cjs/wizerdForm.d.ts @@ -117,6 +117,19 @@ export default class WizerdForm { * @return {void|false} returns false on the last page */ navigate(value?: number, noValidate?: boolean | undefined): void | false; + /** + * Verify a given pageIndex + * If index is below zero or bigger than the amount of pages + * the new index will point to the amount of pages + * + * @param index + */ + private verifyNewPageIndex; + /** + * + * @param index + */ + private prepareAddPage; /** * Add a new `WizerdFromPage` by string. * This method can be used to create pages from AJAX Calls or other @@ -127,7 +140,8 @@ export default class WizerdForm { * * @return {void|WizerdFormPage} */ - addPage(newPage: Function | string, index?: number): void | WizerdFormPage; + addPage(newPage: Function | string, index?: number): void; + replacePage(index: number, newPage: Function | string): void; /** * Dynamically create accessible Form controls * @@ -139,9 +153,9 @@ export default class WizerdForm { */ addFormControl(key: string, tagName: string, props?: Object, inner?: null | string | Object, update?: boolean): WizerdFormControl; createElement(tagName: string, props?: Object, children?: Array): wizerdFormCreateElement; - setControlsWrapper(): HTMLElement; + private setControlsWrapper; updateControls(): void; - removeControls(): void; + private removeControls; removeControl(key: string): void; /** * Custom Event Handlers @@ -158,6 +172,9 @@ export default class WizerdForm { * navigate: * fires on navigation * + * submit: + * fires on form submit + * * @param {string} on * @param {CallableFunction} fn */ diff --git a/dist/cjs/wizerdForm.js b/dist/cjs/wizerdForm.js index ba3d4f1..a662ec5 100644 --- a/dist/cjs/wizerdForm.js +++ b/dist/cjs/wizerdForm.js @@ -231,6 +231,34 @@ var WizerdForm = /** @class */ (function () { this.goToPage(this.index); this.updateControls(); }; + /** + * Verify a given pageIndex + * If index is below zero or bigger than the amount of pages + * the new index will point to the amount of pages + * + * @param index + */ + WizerdForm.prototype.verifyNewPageIndex = function (index) { + if (index < 0 || index > this.pages.length) { + index = this.pages.length; + } + return index; + }; + /** + * + * @param index + */ + WizerdForm.prototype.prepareAddPage = function (index) { + if (index === void 0) { index = -1; } + var tempPage = document.createElement('fieldset'); + index = this.verifyNewPageIndex(index); + var page = new wizerdFormPage_1.default(tempPage, index, this.options); + this.pages.splice(index, 0, page); + for (var i = index + 1; i < this.pages.length; i++) { + this.pages[i].index = i; + } + return tempPage; + }; /** * Add a new `WizerdFromPage` by string. * This method can be used to create pages from AJAX Calls or other @@ -249,30 +277,31 @@ var WizerdForm = /** @class */ (function () { if (!micro_dash_1.isString(newPage) || newPage === '') { return; } - var tempPage = document.createElement('fieldset'); - tempPage.innerHTML = newPage; - var pageNode; - if (tempPage.children.length > 1) { - pageNode = tempPage; - } - else { - pageNode = tempPage.children[0]; - } - if (index < 0 || index > this.pages.length) { - index = this.pages.length; - } - var reference = this.pages[index]; + var tempPage = this.prepareAddPage(index); + var reference = this.pages[index + 1]; if (typeof reference !== 'undefined') { - this.form.insertBefore(pageNode, reference.page); + this.form.insertBefore(tempPage, reference.page); } else { - this.form.insertBefore(pageNode, this.pages[index - 1].page.nextSibling); + this.form.insertBefore(tempPage, this.pages[index - 1].page.nextSibling); } - var page = new wizerdFormPage_1.default(pageNode, index, this.options); - this.pages.push(page); + this.replacePage(index, newPage); this.applyFormElementClasses(); this.goToPage(this.index); - return page; + }; + WizerdForm.prototype.replacePage = function (index, newPage) { + if (index === undefined || newPage === undefined) { + return; + } + if (typeof newPage === 'function') { + newPage = newPage(); + } + if (!micro_dash_1.isString(newPage) || newPage === '') { + return; + } + index = Math.min(this.verifyNewPageIndex(index), this.pages.length - 1); + var toReplace = this.pages[index].page; + toReplace.innerHTML = newPage; }; /** * Dynamically create accessible Form controls @@ -366,6 +395,9 @@ var WizerdForm = /** @class */ (function () { * navigate: * fires on navigation * + * submit: + * fires on form submit + * * @param {string} on * @param {CallableFunction} fn */ diff --git a/dist/cjs/wizerdForm.js.map b/dist/cjs/wizerdForm.js.map index 0479f03..cb777b5 100644 --- a/dist/cjs/wizerdForm.js.map +++ b/dist/cjs/wizerdForm.js.map @@ -1 +1 @@ -{"version":3,"file":"wizerdForm.js","sourceRoot":"","sources":["../../core/wizerdForm.ts"],"names":[],"mappings":";;;;;;;;;AAMA;;GAEG;AACH,6CAAiF;AACjF,yCAA2C;AAC3C,uCAA+C;AAC/C,yDAAoD;AACpD,mDAA8C;AAE9C;;GAEG;AACH,iDAA8C;AAE9C;;;;GAIG;AACH;IAcC;;;;;OAKG;IACH,oBAAY,IAAqB,EAAE,OAA0B;QAV7D,SAAI,GAAG,EAAE,UAAU,CAAC,UAAU,CAAC;QAY9B,8BAA8B;QAC5B,IAAM,QAAQ,GAAsB;YACrC,UAAU,EAAE,CAAC;YACb,KAAK,EAAE,kBAAkB;YACzB,WAAW;YACX,gBAAgB,EAAE,QAAQ;YAC1B,eAAe,EAAE,IAAI;YACrB,UAAU;YACV,eAAe,EAAE,wBAAwB;YACzC,eAAe,EAAE,wBAAwB;SACzC,CAAC;QAEF,OAAO,GAAG,OAAO,IAAI,QAAQ,CAAC;QAC9B,KAAK,IAAI,GAAG,IAAI,QAAQ,EAAE;YACzB,IAAI,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAE,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;gBAClE,OAAO,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;aAC7B;SACD;QAED,IAAI,CAAC,OAAO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,UAAU,EAAE,KAAI;oBAChB,EAAE,EAAE,SAAS;iBACb,CACD,EAAE,CAAC;YACL,CAAC,CAAC,CAAC;QACJ,CAAC,CAAE,CAAC;IACL,CAAC;IAEO,wCAAmB,GAA3B,UAA4B,EAAY;QAAxC,iBAYC;QAXA,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,qBAAqB,EAAE,UAAC,GAAG;YACrD,IAAM,QAAQ,GAAG,KAAI,CAAC,KAAK,CAAC;YAC5B,EAAE,CAAC,IAAI,CACN,KAAI,EACJ,GAAG,EACH;gBACC,UAAU,EAAE,KAAI;gBAChB,KAAK,EAAE,QAAQ;aACf,CACD,EAAE,CAAC;QACL,CAAC,CAAC,CAAC;IACJ,CAAC;IAEO,oCAAe,GAAvB,UAAwB,EAAY;QAApC,iBAUC;QATA,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,UAAC,GAAG;YACxC,EAAE,CAAC,IAAI,CACN,KAAI,EACJ,GAAG,EACH;gBACC,UAAU,EAAE,KAAI;aAChB,CACD,EAAE,CAAC;QACL,CAAC,CAAC,CAAC;IACJ,CAAC;IAtdO,qBAAU,GAAG,CAAC,CAAC;IAwdxB,iBAAC;CAAA,AAjeD,IAieC;kBAjeoB,UAAU"} \ No newline at end of file +{"version":3,"file":"wizerdForm.js","sourceRoot":"","sources":["../../core/wizerdForm.ts"],"names":[],"mappings":";;;;;;;;;AAMA;;GAEG;AACH,6CAAiF;AACjF,yCAA2C;AAC3C,uCAA+C;AAC/C,yDAAoD;AACpD,mDAA8C;AAE9C;;GAEG;AACH,iDAA8C;AAE9C;;;;GAIG;AACH;IAcC;;;;;OAKG;IACH,oBAAY,IAAqB,EAAE,OAA0B;QAV7D,SAAI,GAAG,EAAE,UAAU,CAAC,UAAU,CAAC;QAY9B,8BAA8B;QAC5B,IAAM,QAAQ,GAAsB;YACrC,UAAU,EAAE,CAAC;YACb,KAAK,EAAE,kBAAkB;YACzB,WAAW;YACX,gBAAgB,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C5E,SAAS,CAAC,gBAAgB,CAAC,6BAA6B,EAAE,UAAC,GAAG;gBAC7D,EAAE,CAAC,IAAI,CACN,SAAS,EACT,GAAG,EACH;oBACC,UAAU,EAAE,KAAI;oBAChB,EAAE,EAAE,SAAS;iBACb,CACD,EAAE,CAAC;YACL,CAAC,CAAC,CAAC;QACJ,CAAC,CAAE,CAAC;IACL,CAAC;IAEO,wCAAmB,GAA3B,UAA4B,EAAY;QAAxC,iBAYC;QAXA,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,qBAAqB,EAAE,UAAC,GAAG;YACrD,IAAM,QAAQ,GAAG,KAAI,CAAC,KAAK,CAAC;YAC5B,EAAE,CAAC,IAAI,CACN,KAAI,EACJ,GAAG,EACH;gBACC,UAAU,EAAE,KAAI;gBAChB,KAAK,EAAE,QAAQ;aACf,CACD,EAAE,CAAC;QACL,CAAC,CAAC,CAAC;IACJ,CAAC;IAEO,oCAAe,GAAvB,UAAwB,EAAY;QAApC,iBAUC;QATA,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,UAAC,GAAG;YACxC,EAAE,CAAC,IAAI,CACN,KAAI,EACJ,GAAG,EACH;gBACC,UAAU,EAAE,KAAI;aAChB,CACD,EAAE,CAAC;QACL,CAAC,CAAC,CAAC;IACJ,CAAC;IA5fO,qBAAU,GAAG,CAAC,CAAC;IA8fxB,iBAAC;CAAA,AAvgBD,IAugBC;kBAvgBoB,UAAU"} \ No newline at end of file diff --git a/dist/cjs/wizerdFormControl.js.map b/dist/cjs/wizerdFormControl.js.map index d800cb7..7851d2d 100644 --- a/dist/cjs/wizerdFormControl.js.map +++ b/dist/cjs/wizerdFormControl.js.map @@ -1 +1 @@ -{"version":3,"file":"wizerdFormControl.js","sourceRoot":"","sources":["../../core/wizerdFormControl.ts"],"names":[],"mappings":";;AAKA;;GAEG;AACH,6CAAiD;AACjD,uCAA+C;AAE/C;IAMC,mBAAY,GAAW,EAAE,OAAe,EAAE,KAAa,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AhB,UAAiB,IAAY,EAAE,QAAuB,EAAE,OAA6C;QAArG,iBAcC;QAduD,wBAAA,EAAA,eAA6C;QACpG,QAAQ,CAAC,gBAAgB,CACxB,IAAI,EACJ,UAAC,GAAG;YACG,IAAA,MAAM,GAAK,GAAG,OAAR,CAAS;YACb,IAAA,OAAO,GAAK,KAAI,QAAT,CAAU;YAEzB,IAAK,OAAO,KAAK,SAAS,IAAI,MAAM,KAAK,IAAI,IAAI,CAAE,OAAO,CAAC,QAAQ,CAAC,MAAc,CAAC,EAAG;gBACrF,OAAO;aACP;YACD,QAAQ,CAAC,GAAG,CAAC,CAAC;QACf,CAAC,EACD,OAAO,CACP,CAAC;IACH,CAAC;IAEF,gBAAC;AAAD,CAAC,AAvCD,IAuCC"} \ No newline at end of file diff --git a/dist/cjs/wizerdFormElement.js b/dist/cjs/wizerdFormElement.js index eabf3d1..ecd016a 100644 --- a/dist/cjs/wizerdFormElement.js +++ b/dist/cjs/wizerdFormElement.js @@ -1,5 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.WizerdFormElement = void 0; var WizerdFormElement = /** @class */ (function () { function WizerdFormElement() { } diff --git a/dist/cjs/wizerdFormElement.js.map b/dist/cjs/wizerdFormElement.js.map index da18ffc..0d94e13 100644 --- a/dist/cjs/wizerdFormElement.js.map +++ b/dist/cjs/wizerdFormElement.js.map @@ -1 +1 @@ -{"version":3,"file":"wizerdFormElement.js","sourceRoot":"","sources":["../../core/wizerdFormElement.ts"],"names":[],"mappings":";;AAAA;IAEC;IAEA,CAAC;IAEF,wBAAC;AAAD,CAAC,AAND,IAMC;AANY,8CAAiB;AAQ9B,kBAAe,iBAAiB,CAAC"} \ No newline at end of file +{"version":3,"file":"wizerdFormElement.js","sourceRoot":"","sources":["../../core/wizerdFormElement.ts"],"names":[],"mappings":";;;AAAA;IAEC;IAEA,CAAC;IAEF,wBAAC;AAAD,CAAC,AAND,IAMC;AANY,8CAAiB;AAQ9B,kBAAe,iBAAiB,CAAC"} \ No newline at end of file diff --git a/dist/esm/interfaces/wizerdFormCreateElement.js b/dist/esm/interfaces/wizerdFormCreateElement.js index dc5f056..4932f14 100644 --- a/dist/esm/interfaces/wizerdFormCreateElement.js +++ b/dist/esm/interfaces/wizerdFormCreateElement.js @@ -1 +1,2 @@ +export {}; //# sourceMappingURL=wizerdFormCreateElement.js.map \ No newline at end of file diff --git a/dist/esm/interfaces/wizerdFormOptions.js b/dist/esm/interfaces/wizerdFormOptions.js index 8fbe0de..b6cc8dc 100644 --- a/dist/esm/interfaces/wizerdFormOptions.js +++ b/dist/esm/interfaces/wizerdFormOptions.js @@ -1 +1,2 @@ +export {}; //# sourceMappingURL=wizerdFormOptions.js.map \ No newline at end of file diff --git a/dist/esm/utils/DOMUtils.js.map b/dist/esm/utils/DOMUtils.js.map index 7f42ee5..bf2ad70 100644 --- a/dist/esm/utils/DOMUtils.js.map +++ b/dist/esm/utils/DOMUtils.js.map @@ -1 +1 @@ -{"version":3,"file":"DOMUtils.js","sourceRoot":"","sources":["../../../core/utils/DOMUtils.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE1D;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe,EAAE,KAAkB,EAAE,QAAuC;IAA3D,sBAAA,EAAA,UAAkB;IAAE,yBAAA,EAAA,aAAuC;IACzG,OAAO;QACN,OAAO,SAAA;QACP,KAAK,OAAA;QACL,QAAQ,UAAA;KACR,CAAC;AACH,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAA6B;IAC1D,IAAI,EAAE,CAAC;IAEP,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACxB,IAAI,GAAG,aAAa,CAAC,IAAI,CA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AkB,CAAC,IAAU,EAAE,MAAM;IACpD,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAC7B,OAAO,IAAI,CAAC;AACb,CAAC;AAED,kCAAkC;AAClC,MAAM,UAAU,MAAM,CAAC,CAAC;IACvB,OAAO,CACN,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC;QAC9C,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,CAAC,QAAQ,KAAK,QAAQ,IAAI,OAAO,CAAC,CAAC,QAAQ,KAAG,QAAQ,CAC5F,CAAC;AACH,CAAC;AAED,qCAAqC;AACrC,MAAM,UAAU,SAAS,CAAC,CAAC;IAC1B,OAAO,CACN,OAAO,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,WAAW,CAAC,CAAC,CAAC,MAAM;QACnE,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC,IAAI,OAAO,CAAC,CAAC,QAAQ,KAAG,QAAQ,CAC5F,CAAC;AACH,CAAC;AAED,eAAe;IACd,aAAa,eAAA;IACb,UAAU,YAAA;IACV,aAAa,eAAA;IACb,kBAAkB,oBAAA;IAClB,MAAM,QAAA;IACN,SAAS,WAAA;CACT,CAAC"} \ No newline at end of file diff --git a/dist/esm/utils/input.js b/dist/esm/utils/input.js index aadeba2..9bc7958 100644 --- a/dist/esm/utils/input.js +++ b/dist/esm/utils/input.js @@ -8,10 +8,11 @@ export var getInputValues = function (elements) { case 'checkbox': case 'radio': if (el.checked) { - value = true; + map[el.name] = (el.value === undefined || el.value === '') ? true : el.value; } break; default: + map[el.name] = el.value; break; } break; @@ -24,16 +25,16 @@ export var getInputValues = function (elements) { multiple.push(el.options[i].value); } } - value = multiple; + map[el.name] = multiple; break; default: + map[el.name] = el.value; break; } break; default: break; } - map[el.name] = (value === null) ? el.value : value; }); return map; }; diff --git a/dist/esm/utils/input.js.map b/dist/esm/utils/input.js.map index 82ba9c8..24f5130 100644 --- a/dist/esm/utils/input.js.map +++ b/dist/esm/utils/input.js.map @@ -1 +1 @@ -{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../core/utils/input.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,cAAc,GAAG,UAAC,QAAoC;IAClE,IAAM,GAAG,GAAW,EAAE,CAAC;IACvB,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAC,EAAE;QACzC,IAAI,KAAK,GAAQ,IAAI,CAAC;QACtB,QAAQ,EAAE,CAAC,QAAQ,EAAE;YACpB,KAAK,OAAO;gBACX,QAAO,EAAE,CAAC,IAAI,EAAE;oBACf,KAAK,UAAU,CAAC;oBAChB,KAAK,OAAO;wBACX,IAAI,EAAE,CAAC,OAAO,EAAE;4BACf,KAAK,GAAG,IAAI,CAAC;yBACb;wBACD,MAAM;oBACP;wBACC,MAAM;iBACP;gBACD,MAAM;YACP,KAAK,QAAQ;gBACZ,QAAO,EAAE,CAAC,IAAI,EAAE;oBACf,KAAK,iBAAiB;wBACrB,IAAI,QAAQ,GAAG,EAAE,CAAC;wBAClB,KAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;4BAC1C,IAAI,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;gCAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;6BACnC;yBACD;wBACD,KAAK,GAAG,QAAQ,CAAC;wBACjB,MAAM;oBACP;wBACC,MAAM;iBACP;gBACD,MAAM;YACP;gBACC,MAAM;SACP;QAED,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,KAAK,IA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,QAAQ,EAAE;gCAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;6BACnC;yBACD;wBACD,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;wBACxB,MAAM;oBACP;wBACC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC;wBACxB,MAAM;iBACP;gBACD,MAAM;YACP;gBACC,MAAM;SACP;IACF,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,CAAC;AACZ,CAAC,CAAA;AAED,eAAe;IACd,cAAc,gBAAA;CACd,CAAA"} \ No newline at end of file diff --git a/dist/esm/utils/object.d.ts b/dist/esm/utils/object.d.ts index 0cbe2e2..cc6c7b2 100644 --- a/dist/esm/utils/object.d.ts +++ b/dist/esm/utils/object.d.ts @@ -1,2 +1,2 @@ -export declare const ObjValues: (obj: Object) => any[]; -export declare const ObjEntries: (obj: Object) => any[]; +export declare const ObjValues: (obj: Object) => Array; +export declare const ObjEntries: (obj: Object) => Array; diff --git a/dist/esm/wizerdForm.d.ts b/dist/esm/wizerdForm.d.ts index 0085a9e..253ba2f 100644 --- a/dist/esm/wizerdForm.d.ts +++ b/dist/esm/wizerdForm.d.ts @@ -117,6 +117,19 @@ export default class WizerdForm { * @return {void|false} returns false on the last page */ navigate(value?: number, noValidate?: boolean | undefined): void | false; + /** + * Verify a given pageIndex + * If index is below zero or bigger than the amount of pages + * the new index will point to the amount of pages + * + * @param index + */ + private verifyNewPageIndex; + /** + * + * @param index + */ + private prepareAddPage; /** * Add a new `WizerdFromPage` by string. * This method can be used to create pages from AJAX Calls or other @@ -127,7 +140,8 @@ export default class WizerdForm { * * @return {void|WizerdFormPage} */ - addPage(newPage: Function | string, index?: number): void | WizerdFormPage; + addPage(newPage: Function | string, index?: number): void; + replacePage(index: number, newPage: Function | string): void; /** * Dynamically create accessible Form controls * @@ -139,9 +153,9 @@ export default class WizerdForm { */ addFormControl(key: string, tagName: string, props?: Object, inner?: null | string | Object, update?: boolean): WizerdFormControl; createElement(tagName: string, props?: Object, children?: Array): wizerdFormCreateElement; - setControlsWrapper(): HTMLElement; + private setControlsWrapper; updateControls(): void; - removeControls(): void; + private removeControls; removeControl(key: string): void; /** * Custom Event Handlers @@ -158,6 +172,9 @@ export default class WizerdForm { * navigate: * fires on navigation * + * submit: + * fires on form submit + * * @param {string} on * @param {CallableFunction} fn */ diff --git a/dist/esm/wizerdForm.js b/dist/esm/wizerdForm.js index 3ae9b73..7ef6a20 100644 --- a/dist/esm/wizerdForm.js +++ b/dist/esm/wizerdForm.js @@ -229,6 +229,34 @@ var WizerdForm = /** @class */ (function () { this.goToPage(this.index); this.updateControls(); }; + /** + * Verify a given pageIndex + * If index is below zero or bigger than the amount of pages + * the new index will point to the amount of pages + * + * @param index + */ + WizerdForm.prototype.verifyNewPageIndex = function (index) { + if (index < 0 || index > this.pages.length) { + index = this.pages.length; + } + return index; + }; + /** + * + * @param index + */ + WizerdForm.prototype.prepareAddPage = function (index) { + if (index === void 0) { index = -1; } + var tempPage = document.createElement('fieldset'); + index = this.verifyNewPageIndex(index); + var page = new WizerdFormPage(tempPage, index, this.options); + this.pages.splice(index, 0, page); + for (var i = index + 1; i < this.pages.length; i++) { + this.pages[i].index = i; + } + return tempPage; + }; /** * Add a new `WizerdFromPage` by string. * This method can be used to create pages from AJAX Calls or other @@ -247,30 +275,31 @@ var WizerdForm = /** @class */ (function () { if (!isString(newPage) || newPage === '') { return; } - var tempPage = document.createElement('fieldset'); - tempPage.innerHTML = newPage; - var pageNode; - if (tempPage.children.length > 1) { - pageNode = tempPage; - } - else { - pageNode = tempPage.children[0]; - } - if (index < 0 || index > this.pages.length) { - index = this.pages.length; - } - var reference = this.pages[index]; + var tempPage = this.prepareAddPage(index); + var reference = this.pages[index + 1]; if (typeof reference !== 'undefined') { - this.form.insertBefore(pageNode, reference.page); + this.form.insertBefore(tempPage, reference.page); } else { - this.form.insertBefore(pageNode, this.pages[index - 1].page.nextSibling); + this.form.insertBefore(tempPage, this.pages[index - 1].page.nextSibling); } - var page = new WizerdFormPage(pageNode, index, this.options); - this.pages.push(page); + this.replacePage(index, newPage); this.applyFormElementClasses(); this.goToPage(this.index); - return page; + }; + WizerdForm.prototype.replacePage = function (index, newPage) { + if (index === undefined || newPage === undefined) { + return; + } + if (typeof newPage === 'function') { + newPage = newPage(); + } + if (!isString(newPage) || newPage === '') { + return; + } + index = Math.min(this.verifyNewPageIndex(index), this.pages.length - 1); + var toReplace = this.pages[index].page; + toReplace.innerHTML = newPage; }; /** * Dynamically create accessible Form controls @@ -364,6 +393,9 @@ var WizerdForm = /** @class */ (function () { * navigate: * fires on navigation * + * submit: + * fires on form submit + * * @param {string} on * @param {CallableFunction} fn */ diff --git a/dist/esm/wizerdForm.js.map b/dist/esm/wizerdForm.js.map index db7c203..e9955fe 100644 --- a/dist/esm/wizerdForm.js.map +++ b/dist/esm/wizerdForm.js.map @@ -1 +1 @@ -{"version":3,"file":"wizerdForm.js","sourceRoot":"","sources":["../../core/wizerdForm.ts"],"names":[],"mappings":";;;;;;;AAMA;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C;;;;GAIG;AACH;IAcC;;;;;OAKG;IACH,oBAAY,IAAqB,EAAE,OAA0B;QAV7D,SAAI,GAAG,EAAE,UAAU,CAAC,UAAU,CAAC;QAY9B,8BAA8B;QAC5B,IAAM,QAAQ,GAAsB;YACrC,UAAU,EAAE,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oCAAe,GAAvB,UAAwB,EAAY;QAApC,iBAUC;QATA,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,UAAC,GAAG;YACxC,EAAE,CAAC,IAAI,CACN,KAAI,EACJ,GAAG,EACH;gBACC,UAAU,EAAE,KAAI;aAChB,CACD,EAAE,CAAC;QACL,CAAC,CAAC,CAAC;IACJ,CAAC;IA5fO,qBAAU,GAAG,CAAC,CAAC;IA8fxB,iBAAC;CAAA,AAvgBD,IAugBC;eAvgBoB,UAAU"} \ No newline at end of file diff --git a/dist/esm/wizerdFormControl.js.map b/dist/esm/wizerdFormControl.js.map index 27aa696..ea1eb5a 100644 --- a/dist/esm/wizerdFormControl.js.map +++ b/dist/esm/wizerdFormControl.js.map @@ -1 +1 @@ -{"version":3,"file":"wizerdFormControl.js","sourceRoot":"","sources":["../../core/wizerdFormControl.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C;IAMC,mBAAY,GAAW,EAAE,OAAe,EAAE,KAAa,EAAE,QAAQ;QAEhE,QAAQ,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;QAEpC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC;QAChE,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;IAE1B,CAAC;IAED;;;;;;OAMG;IACH,oCAAgB,GAAhB,UAAiB,IAAY,EAAE,QAAuB,EAAE,OAA6C;QAArG,iBAcC;QAduD,wBAAA,EAAA,eAA6C;QACpG,QAAQ,CAAC,gBAAgB,CACxB,IAAI,EACJ,UAAC,GAAG;YACG,IAAA,mBAAM,CAAS;YACb,IAAA,uBAAO,CAAU;YAEzB,IAAK,OAAO,KAAK,SAAS,IAAI,MAAM,KAAK,IAAI,IAAI,CAAE,OAAO,CAAC,QAAQ,CAAC,MAAc,CAAC,EAAG;gBACrF,OAAO;aACP;YACD,QAAQ,CAAC,GAAG,CAAC,CAAC;QACf,CAAC,EACD,OAAO,CACP,CAAC;IACH,CAAC;IAEF,gBAAC;AAAD,CAAC,AAvCD,IAuCC"} \ No newline at end of file +{"version":3,"file":"wizerdFormControl.js","sourceRoot":"","sources":["../../core/wizerdFormControl.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C;IAMC,mBAAY,GAAW,EAAE,OAAe,EAAE,KAAa,EAAE,QAAQ;QAEhE,QAAQ,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;QAEpC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC;QAChE,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;IAE1B,CAAC;IAED;;;;;;OAMG;IACH,oCAAgB,GAAhB,UAAiB,IAAY,EAAE,QAAuB,EAAE,OAA6C;QAArG,iBAcC;QAduD,wBAAA,EAAA,eAA6C;QACpG,QAAQ,CAAC,gBAAgB,CACxB,IAAI,EACJ,UAAC,GAAG;YACG,IAAA,MAAM,GAAK,GAAG,OAAR,CAAS;YACb,IAAA,OAAO,GAAK,KAAI,QAAT,CAAU;YAEzB,IAAK,OAAO,KAAK,SAAS,IAAI,MAAM,KAAK,IAAI,IAAI,CAAE,OAAO,CAAC,QAAQ,CAAC,MAAc,CAAC,EAAG;gBACrF,OAAO;aACP;YACD,QAAQ,CAAC,GAAG,CAAC,CAAC;QACf,CAAC,EACD,OAAO,CACP,CAAC;IACH,CAAC;IAEF,gBAAC;AAAD,CAAC,AAvCD,IAuCC"} \ No newline at end of file diff --git a/dist/umd/utils/DOMUtils.js b/dist/umd/utils/DOMUtils.js index fd14cd2..5cf184e 100644 --- a/dist/umd/utils/DOMUtils.js +++ b/dist/umd/utils/DOMUtils.js @@ -9,6 +9,7 @@ })(function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); + exports.isElement = exports.isNode = exports.mountChildElements = exports.mountElements = exports.renderNode = exports.renderElement = exports.createElement = void 0; /** * Internal Dependencies */ diff --git a/dist/umd/utils/DOMUtils.js.map b/dist/umd/utils/DOMUtils.js.map index 190d9cc..8510946 100644 --- a/dist/umd/utils/DOMUtils.js.map +++ b/dist/umd/utils/DOMUtils.js.map @@ -1 +1 @@ -{"version":3,"file":"DOMUtils.js","sourceRoot":"","sources":["../../../core/utils/DOMUtils.ts"],"names":[],"mappings":";;;;;;;;;;;IAKA;;OAEG;IACH,iCAAyC;IACzC,mCAAsC;IAEtC;;OAEG;IACH,iDAA0D;IAE1D;;OAEG;IACH,SAAgB,aAAa,CAAC,OAAe,EAAE,KAAkB,EAAE,QAAuC;QAA3D,sBAAA,EAAA,UAAkB;QAAE,yBAAA,EAAA,aAAuC;QACzG,OAAO;YACN,OAAO,SAAA;YACP,KAAK,OAAA;YACL,QAAQ,UAAA;SACR,CAAC;IACH,CAAC;IAND,sCAMC;IAED,SAAgB,aAAa,CAAC,IAA6B;QAC1D,IAAI,EAAE,CAAC;QAEP,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACxB,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;SAClE;QAED,IAAK,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,UAAU,EAAG;YAChD,EAAE,GAAG,QAAQ,CAAC,sBAAsB,EAAE,CAAC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,YAAY,IAAI,CAAC,CAAC;YAC9C,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,CAAC,QAAQ,KAAK,QAAQ,IAAI,OAAO,CAAC,CAAC,QAAQ,KAAG,QAAQ,CAC5F,CAAC;IACH,CAAC;IALD,wBAKC;IAED,qCAAqC;IACrC,SAAgB,SAAS,CAAC,CAAC;QAC1B,OAAO,CACN,OAAO,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,WAAW,CAAC,CAAC,CAAC,MAAM;YACnE,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC,IAAI,OAAO,CAAC,CAAC,QAAQ,KAAG,QAAQ,CAC5F,CAAC;IACH,CAAC;IALD,8BAKC;IAED,kBAAe;QACd,aAAa,eAAA;QACb,UAAU,YAAA;QACV,aAAa,eAAA;QACb,kBAAkB,oBAAA;QAClB,MAAM,QAAA;QACN,SAAS,WAAA;KACT,CAAC"} \ No newline at end of file diff --git a/dist/umd/utils/array.js b/dist/umd/utils/array.js index 7e04d19..d84f5cf 100644 --- a/dist/umd/utils/array.js +++ b/dist/umd/utils/array.js @@ -9,12 +9,14 @@ })(function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - exports.maybeCastArray = function (data) { + exports.maybeCastArray = void 0; + var maybeCastArray = function (data) { if (!Array.isArray(data)) { data = (data) ? [data] : []; } return data; }; + exports.maybeCastArray = maybeCastArray; exports.default = { maybeCastArray: exports.maybeCastArray, }; diff --git a/dist/umd/utils/array.js.map b/dist/umd/utils/array.js.map index bea312a..9e38804 100644 --- a/dist/umd/utils/array.js.map +++ b/dist/umd/utils/array.js.map @@ -1 +1 @@ -{"version":3,"file":"array.js","sourceRoot":"","sources":["../../../core/utils/array.ts"],"names":[],"mappings":";;;;;;;;;;;IAAa,QAAA,cAAc,GAAG,UAAC,IAAI;QAClC,IAAK,CAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAG;YAC5B,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;SAC5B;QACD,OAAO,IAAI,CAAC;IACb,CAAC,CAAA;IAED,kBAAe;QACd,cAAc,wBAAA;KACd,CAAA"} \ No newline at end of file +{"version":3,"file":"array.js","sourceRoot":"","sources":["../../../core/utils/array.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAO,IAAM,cAAc,GAAG,UAAC,IAAI;QAClC,IAAK,CAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAG;YAC5B,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;SAC5B;QACD,OAAO,IAAI,CAAC;IACb,CAAC,CAAA;IALY,QAAA,cAAc,kBAK1B;IAED,kBAAe;QACd,cAAc,wBAAA;KACd,CAAA"} \ No newline at end of file diff --git a/dist/umd/utils/input.js b/dist/umd/utils/input.js index d8706db..efbfa8c 100644 --- a/dist/umd/utils/input.js +++ b/dist/umd/utils/input.js @@ -9,7 +9,8 @@ })(function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - exports.getInputValues = function (elements) { + exports.getInputValues = void 0; + var getInputValues = function (elements) { var map = {}; Array.prototype.forEach.call(elements, function (el) { var value = null; @@ -19,10 +20,11 @@ case 'checkbox': case 'radio': if (el.checked) { - value = true; + map[el.name] = (el.value === undefined || el.value === '') ? true : el.value; } break; default: + map[el.name] = el.value; break; } break; @@ -35,19 +37,20 @@ multiple.push(el.options[i].value); } } - value = multiple; + map[el.name] = multiple; break; default: + map[el.name] = el.value; break; } break; default: break; } - map[el.name] = (value === null) ? el.value : value; }); return map; }; + exports.getInputValues = getInputValues; exports.default = { getInputValues: exports.getInputValues, }; diff --git a/dist/umd/utils/input.js.map b/dist/umd/utils/input.js.map index 712f2f2..6cf6c9d 100644 --- a/dist/umd/utils/input.js.map +++ b/dist/umd/utils/input.js.map @@ -1 +1 @@ -{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../core/utils/input.ts"],"names":[],"mappings":";;;;;;;;;;;IAAa,QAAA,cAAc,GAAG,UAAC,QAAoC;QAClE,IAAM,GAAG,GAAW,EAAE,CAAC;QACvB,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAC,EAAE;YACzC,IAAI,KAAK,GAAQ,IAAI,CAAC;YACtB,QAAQ,EAAE,CAAC,QAAQ,EAAE;gBACpB,KAAK,OAAO;oBACX,QAAO,EAAE,CAAC,IAAI,EAAE;wBACf,KAAK,UAAU,CAAC;wBAChB,KAAK,OAAO;4BACX,IAAI,EAAE,CAAC,OAAO,EAAE;gCACf,KAAK,GAAG,IAAI,CAAC;6BACb;4BACD,MAAM;wBACP;4BACC,MAAM;qBACP;oBACD,MAAM;gBACP,KAAK,QAAQ;oBACZ,QAAO,EAAE,CAAC,IAAI,EAAE;wBACf,KAAK,iBAAiB;4BACrB,IAAI,QAAQ,GAAG,EAAE,CAAC;4BAClB,KAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gCAC1C,IAAI,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;oCAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;iCACnC;6BACD;4BACD,KAAK,GAAG,QAAQ,CAAC;4BACjB,MAAM;wBACP;4BACC,MAAM;qBACP;oBACD,MAAM;gBACP;oBACC,MAAM;aACP;YAED,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,KAA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AI,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;iCACnC;6BACD;4BACD,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;4BACxB,MAAM;wBACP;4BACC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC;4BACxB,MAAM;qBACP;oBACD,MAAM;gBACP;oBACC,MAAM;aACP;QACF,CAAC,CAAC,CAAC;QACH,OAAO,GAAG,CAAC;IACZ,CAAC,CAAA;IAvCY,QAAA,cAAc,kBAuC1B;IAED,kBAAe;QACd,cAAc,wBAAA;KACd,CAAA"} \ No newline at end of file diff --git a/dist/umd/utils/object.d.ts b/dist/umd/utils/object.d.ts index 0cbe2e2..cc6c7b2 100644 --- a/dist/umd/utils/object.d.ts +++ b/dist/umd/utils/object.d.ts @@ -1,2 +1,2 @@ -export declare const ObjValues: (obj: Object) => any[]; -export declare const ObjEntries: (obj: Object) => any[]; +export declare const ObjValues: (obj: Object) => Array; +export declare const ObjEntries: (obj: Object) => Array; diff --git a/dist/umd/utils/object.js b/dist/umd/utils/object.js index 949461b..93f01b2 100644 --- a/dist/umd/utils/object.js +++ b/dist/umd/utils/object.js @@ -9,15 +9,18 @@ })(function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - exports.ObjValues = function (obj) { + exports.ObjEntries = exports.ObjValues = void 0; + var ObjValues = function (obj) { return (!Object.values) ? Object.keys(obj).map(function (e) { return obj[e]; }) : Object.values(obj); }; - exports.ObjEntries = function (obj) { + exports.ObjValues = ObjValues; + var ObjEntries = function (obj) { return (!Object.entries) ? Object.keys(obj).map(function (key) { return [key, obj[key]]; }) : Object.entries(obj); }; + exports.ObjEntries = ObjEntries; }); //# sourceMappingURL=object.js.map \ No newline at end of file diff --git a/dist/umd/utils/object.js.map b/dist/umd/utils/object.js.map index 7d8e082..afb7f2a 100644 --- a/dist/umd/utils/object.js.map +++ b/dist/umd/utils/object.js.map @@ -1 +1 @@ -{"version":3,"file":"object.js","sourceRoot":"","sources":["../../../core/utils/object.ts"],"names":[],"mappings":";;;;;;;;;;;IAAa,QAAA,SAAS,GAAG,UAAC,GAAW;QACpC,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;YACpB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,GAAG,CAAC,CAAC,CAAC,EAAN,CAAM,CAAC,CAAC,CAAC;YACnC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC,CAAA;IAEY,QAAA,UAAU,GAAG,UAAC,GAAW;QACrC,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAA,GAAG,IAAI,OAAA,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,EAAf,CAAe,CAAC,CAAC,CAAC;YAC9C,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"object.js","sourceRoot":"","sources":["../../../core/utils/object.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAO,IAAM,SAAS,GAAG,UAAC,GAAW;QACpC,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;YACpB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,GAAG,CAAC,CAAC,CAAC,EAAN,CAAM,CAAC,CAAC,CAAC;YACnC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC,CAAA;IAJY,QAAA,SAAS,aAIrB;IAEM,IAAM,UAAU,GAAG,UAAC,GAAW;QACrC,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAA,GAAG,IAAI,OAAA,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,EAAf,CAAe,CAAC,CAAC,CAAC;YAC9C,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC,CAAA;IAJY,QAAA,UAAU,cAItB"} \ No newline at end of file diff --git a/dist/umd/utils/validation.js b/dist/umd/utils/validation.js index 6b0278c..64d5229 100644 --- a/dist/umd/utils/validation.js +++ b/dist/umd/utils/validation.js @@ -9,6 +9,7 @@ })(function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateInput = void 0; /** * Form input validation * diff --git a/dist/umd/utils/validation.js.map b/dist/umd/utils/validation.js.map index aefaba0..7cdb043 100644 --- a/dist/umd/utils/validation.js.map +++ b/dist/umd/utils/validation.js.map @@ -1 +1 @@ -{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../core/utils/validation.ts"],"names":[],"mappings":";;;;;;;;;;;IAAA;;;;;;;;;OASG;IACH,SAAgB,aAAa,CAAC,KAAK;QAClC,IAAK,eAAe,IAAI,gBAAgB,CAAC,SAAS,EAAG;YACpD,IAAK,CAAE,KAAK,CAAC,aAAa,EAAE,EAAG;gBAC9B,OAAO,KAAK,CAAC;aACb;SACD;aAAM;YACN,8BAA8B;YAC9B,IAAI,KAAK,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE;gBAClF,OAAO,KAAK,CAAC;aACb;YACD,+BAA+B;YAC/B,IAAI,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,EA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CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;wBAC7F,OAAO,KAAK,CAAC;qBACb;gBACF,KAAK,MAAM,CAAC;gBACZ,KAAK,MAAM;oBACV,wCAAwC;oBACxC,IAAI,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,EAAE;wBACzE,OAAO,KAAK,CAAC;qBACb;oBACD,wCAAwC;oBACxC,IAAI,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,EAAE;wBACzE,OAAO,KAAK,CAAC;qBACb;gBACF,KAAK,OAAO;oBACX,kBAAkB;oBAClB,IAAI,YAAY,GAAG,IAAI,MAAM,CAAC,uJAAuJ,EAAE,GAAG,CAAC,CAAC;oBAC5L,IAAI,CAAE,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE;wBAC7C,OAAO,KAAK,CAAC;qBACb;gBACF,KAAK,KAAK;oBACT,eAAe;oBACf,IAAI,UAAU,GAAG,IAAI,MAAM,CAAC,m0CAAm0C,EAAE,GAAG,CAAC,CAAC;oBACt2C,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,IAAI,CAAE,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE;wBACnE,OAAO,KAAK,CAAC;qBACb;gBACF;oBACC,MAAM;aACP;SACD;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAtED,sCAsEC"} \ No newline at end of file +{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../core/utils/validation.ts"],"names":[],"mappings":";;;;;;;;;;;;IA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AE,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE;wBAC7C,OAAO,KAAK,CAAC;qBACb;gBACF,KAAK,KAAK;oBACT,eAAe;oBACf,IAAI,UAAU,GAAG,IAAI,MAAM,CAAC,m0CAAm0C,EAAE,GAAG,CAAC,CAAC;oBACt2C,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,IAAI,CAAE,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE;wBACnE,OAAO,KAAK,CAAC;qBACb;gBACF;oBACC,MAAM;aACP;SACD;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAtED,sCAsEC"} \ No newline at end of file diff --git a/dist/umd/wizerdForm.d.ts b/dist/umd/wizerdForm.d.ts index 0085a9e..253ba2f 100644 --- a/dist/umd/wizerdForm.d.ts +++ b/dist/umd/wizerdForm.d.ts @@ -117,6 +117,19 @@ export default class WizerdForm { * @return {void|false} returns false on the last page */ navigate(value?: number, noValidate?: boolean | undefined): void | false; + /** + * Verify a given pageIndex + * If index is below zero or bigger than the amount of pages + * the new index will point to the amount of pages + * + * @param index + */ + private verifyNewPageIndex; + /** + * + * @param index + */ + private prepareAddPage; /** * Add a new `WizerdFromPage` by string. * This method can be used to create pages from AJAX Calls or other @@ -127,7 +140,8 @@ export default class WizerdForm { * * @return {void|WizerdFormPage} */ - addPage(newPage: Function | string, index?: number): void | WizerdFormPage; + addPage(newPage: Function | string, index?: number): void; + replacePage(index: number, newPage: Function | string): void; /** * Dynamically create accessible Form controls * @@ -139,9 +153,9 @@ export default class WizerdForm { */ addFormControl(key: string, tagName: string, props?: Object, inner?: null | string | Object, update?: boolean): WizerdFormControl; createElement(tagName: string, props?: Object, children?: Array): wizerdFormCreateElement; - setControlsWrapper(): HTMLElement; + private setControlsWrapper; updateControls(): void; - removeControls(): void; + private removeControls; removeControl(key: string): void; /** * Custom Event Handlers @@ -158,6 +172,9 @@ export default class WizerdForm { * navigate: * fires on navigation * + * submit: + * fires on form submit + * * @param {string} on * @param {CallableFunction} fn */ diff --git a/dist/umd/wizerdForm.js b/dist/umd/wizerdForm.js index 34a1bff..a9f3181 100644 --- a/dist/umd/wizerdForm.js +++ b/dist/umd/wizerdForm.js @@ -240,6 +240,34 @@ var __spreadArrays = (this && this.__spreadArrays) || function () { this.goToPage(this.index); this.updateControls(); }; + /** + * Verify a given pageIndex + * If index is below zero or bigger than the amount of pages + * the new index will point to the amount of pages + * + * @param index + */ + WizerdForm.prototype.verifyNewPageIndex = function (index) { + if (index < 0 || index > this.pages.length) { + index = this.pages.length; + } + return index; + }; + /** + * + * @param index + */ + WizerdForm.prototype.prepareAddPage = function (index) { + if (index === void 0) { index = -1; } + var tempPage = document.createElement('fieldset'); + index = this.verifyNewPageIndex(index); + var page = new wizerdFormPage_1.default(tempPage, index, this.options); + this.pages.splice(index, 0, page); + for (var i = index + 1; i < this.pages.length; i++) { + this.pages[i].index = i; + } + return tempPage; + }; /** * Add a new `WizerdFromPage` by string. * This method can be used to create pages from AJAX Calls or other @@ -258,30 +286,31 @@ var __spreadArrays = (this && this.__spreadArrays) || function () { if (!micro_dash_1.isString(newPage) || newPage === '') { return; } - var tempPage = document.createElement('fieldset'); - tempPage.innerHTML = newPage; - var pageNode; - if (tempPage.children.length > 1) { - pageNode = tempPage; - } - else { - pageNode = tempPage.children[0]; - } - if (index < 0 || index > this.pages.length) { - index = this.pages.length; - } - var reference = this.pages[index]; + var tempPage = this.prepareAddPage(index); + var reference = this.pages[index + 1]; if (typeof reference !== 'undefined') { - this.form.insertBefore(pageNode, reference.page); + this.form.insertBefore(tempPage, reference.page); } else { - this.form.insertBefore(pageNode, this.pages[index - 1].page.nextSibling); + this.form.insertBefore(tempPage, this.pages[index - 1].page.nextSibling); } - var page = new wizerdFormPage_1.default(pageNode, index, this.options); - this.pages.push(page); + this.replacePage(index, newPage); this.applyFormElementClasses(); this.goToPage(this.index); - return page; + }; + WizerdForm.prototype.replacePage = function (index, newPage) { + if (index === undefined || newPage === undefined) { + return; + } + if (typeof newPage === 'function') { + newPage = newPage(); + } + if (!micro_dash_1.isString(newPage) || newPage === '') { + return; + } + index = Math.min(this.verifyNewPageIndex(index), this.pages.length - 1); + var toReplace = this.pages[index].page; + toReplace.innerHTML = newPage; }; /** * Dynamically create accessible Form controls @@ -375,6 +404,9 @@ var __spreadArrays = (this && this.__spreadArrays) || function () { * navigate: * fires on navigation * + * submit: + * fires on form submit + * * @param {string} on * @param {CallableFunction} fn */ diff --git a/dist/umd/wizerdForm.js.map b/dist/umd/wizerdForm.js.map index cf4b149..dd6dc14 100644 --- a/dist/umd/wizerdForm.js.map +++ b/dist/umd/wizerdForm.js.map @@ -1 +1 @@ -{"version":3,"file":"wizerdForm.js","sourceRoot":"","sources":["../../core/wizerdForm.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;IAMA;;OAEG;IACH,6CAAiF;IACjF,yCAA2C;IAC3C,uCAA+C;IAC/C,yDAAoD;IACpD,mDAA8C;IAE9C;;OAEG;IACH,iDAA8C;IAE9C;;;;OAIG;IACH;QAcC;;;;;WAKG;QACH,oBAAY,IAAqB,EAAE,OAA0B;YAV7D,SAAI,GAAG,EAAE,UAAU,CAAC,UAAU,CAAC;YAY9B,8BAA8B;YAC5B,IAAM,QAAQ,GAAsB;gBACrC,UAAU,EAAE,CAAC;gBACb,KAAK,EAAE,kBAAkB;gBACzB,WAAW;gBACX,gBAAgB,EAAE,QAAQ;gBAC1B,eAAe,EAAE,IAAI;gBACrB,UAAU;gBACV,eAAe,EAAE,wBAAwB;gBACzC,eAAe,EAAE,wBAAwB;aACzC,CAAC;YAEF,OAAO,GAAG,OAAO,IAAI,QAAQ,CAAC;YAC9B,KAAK,IAAI,GAAG,IAAI,QAAQ,EAAE;gBACzB,IAAI,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAE,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;oBA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Ac,EAAE,CAAC,WAAW,EAAE,EAAE,UAAE,SAAS;gBAC5E,SAAS,CAAC,gBAAgB,CAAC,6BAA6B,EAAE,UAAC,GAAG;oBAC7D,EAAE,CAAC,IAAI,CACN,SAAS,EACT,GAAG,EACH;wBACC,UAAU,EAAE,KAAI;wBAChB,EAAE,EAAE,SAAS;qBACb,CACD,EAAE,CAAC;gBACL,CAAC,CAAC,CAAC;YACJ,CAAC,CAAE,CAAC;QACL,CAAC;QAEO,wCAAmB,GAA3B,UAA4B,EAAY;YAAxC,iBAYC;YAXA,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,qBAAqB,EAAE,UAAC,GAAG;gBACrD,IAAM,QAAQ,GAAG,KAAI,CAAC,KAAK,CAAC;gBAC5B,EAAE,CAAC,IAAI,CACN,KAAI,EACJ,GAAG,EACH;oBACC,UAAU,EAAE,KAAI;oBAChB,KAAK,EAAE,QAAQ;iBACf,CACD,EAAE,CAAC;YACL,CAAC,CAAC,CAAC;QACJ,CAAC;QAEO,oCAAe,GAAvB,UAAwB,EAAY;YAApC,iBAUC;YATA,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,UAAC,GAAG;gBACxC,EAAE,CAAC,IAAI,CACN,KAAI,EACJ,GAAG,EACH;oBACC,UAAU,EAAE,KAAI;iBAChB,CACD,EAAE,CAAC;YACL,CAAC,CAAC,CAAC;QACJ,CAAC;QAtdO,qBAAU,GAAG,CAAC,CAAC;QAwdxB,iBAAC;KAAA,AAjeD,IAieC;sBAjeoB,UAAU"} \ No newline at end of file +{"version":3,"file":"wizerdForm.js","sourceRoot":"","sources":["../../core/wizerdForm.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;IAMA;;OAEG;IACH,6CAAiF;IACjF,yCAA2C;IAC3C,uCAA+C;IAC/C,yDAAoD;IACpD,mDAA8C;IAE9C;;OAEG;IACH,iDAA8C;IAE9C;;;;OAIG;IACH;QAcC;;;;;WAKG;QACH,oBAAY,IAAq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Control.js.map index dd11094..d9da05e 100644 --- a/dist/umd/wizerdFormControl.js.map +++ b/dist/umd/wizerdFormControl.js.map @@ -1 +1 @@ -{"version":3,"file":"wizerdFormControl.js","sourceRoot":"","sources":["../../core/wizerdFormControl.ts"],"names":[],"mappings":";;;;;;;;;;;IAKA;;OAEG;IACH,6CAAiD;IACjD,uCAA+C;IAE/C;QAMC,mBAAY,GAAW,EAAE,OAAe,EAAE,KAAa,EAAE,QAAQ;YAEhE,QAAQ,GAAG,sBAAc,CAAC,QAAQ,CAAC,CAAC;YAEpC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;YACf,IAAI,CAAC,IAAI,GAAG,wBAAa,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC;YAChE,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;QAE1B,CAAC;QAED;;;;;;WAMG;QACH,oCAAgB,GAAhB,UAAiB,IAAY,EAAE,QAAuB,EAAE,OAA6C;YAArG,iBAcC;YAduD,wBAAA,EAAA,eAA6C;YACpG,QAAQ,CAAC,gBAAgB,CACxB,IAAI,EACJ,UAAC,GAAG;gBACG,IAAA,mBAAM,CAAS;gBACb,IAAA,uBAAO,CAAU;gBAEzB,IAAK,OAAO,KAAK,SAAS,IAAI,MAAM,KAAK,IAAI,IAAI,CAAE,OAAO,CAAC,QAAQ,CAAC,MAAc,CAAC,EAAG;oBACrF,OAAO;iBACP;gBACD,QAAQ,CAAC,GAAG,CAAC,CAAC;YACf,CAAC,EACD,OAAO,CACP,CAAC;QACH,CAAC;QAEF,gBAAC;IAAD,CAAC,AAvCD,IAuCC"} \ No newline at end of file +{"version":3,"file":"wizerdFormControl.js","sourceRoot":"","sources":["../../core/wizerdFormControl.ts"],"names":[],"mappings":";;;;;;;;;;;IAKA;;OAEG;IACH,6CAAiD;IACjD,uCAA+C;IAE/C;QAMC,mBAAY,GAAW,EAAE,OAAe,EAAE,KAAa,EAAE,QAAQ;YAEhE,QAAQ,GAAG,sBAAc,CAAC,QAAQ,CAAC,CAAC;YAEpC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;YACf,IAAI,CAAC,IAAI,GAAG,wBAAa,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC;YAChE,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;QAE1B,CAAC;QAED;;;;;;WAMG;QACH,oCAAgB,GAAhB,UAAiB,IAAY,EAAE,QAAuB,EAAE,OAA6C;YAArG,iBAcC;YAduD,wBAAA,EAAA,eAA6C;YACpG,QAAQ,CAAC,gBAAgB,CACxB,IAAI,EACJ,UAAC,GAAG;gBACG,IAAA,MAAM,GAAK,GAAG,OAAR,CAAS;gBACb,IAAA,OAAO,GAAK,KAAI,QAAT,CAAU;gBAEzB,IAAK,OAAO,KAAK,SAAS,IAAI,MAAM,KAAK,IAAI,IAAI,CAAE,OAAO,CAAC,QAAQ,CAAC,MAAc,CAAC,EAAG;oBACrF,OAAO;iBACP;gBACD,QAAQ,CAAC,GAAG,CAAC,CAAC;YACf,CAAC,EACD,OAAO,CACP,CAAC;QACH,CAAC;QAEF,gBAAC;IAAD,CAAC,AAvCD,IAuCC"} \ No newline at end of file diff --git a/dist/umd/wizerdFormElement.js b/dist/umd/wizerdFormElement.js index 66d7bf4..5d853e9 100644 --- a/dist/umd/wizerdFormElement.js +++ b/dist/umd/wizerdFormElement.js @@ -9,6 +9,7 @@ })(function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); + exports.WizerdFormElement = void 0; var WizerdFormElement = /** @class */ (function () { function WizerdFormElement() { } diff --git a/dist/umd/wizerdFormElement.js.map b/dist/umd/wizerdFormElement.js.map index 79ca5fb..7011d4d 100644 --- a/dist/umd/wizerdFormElement.js.map +++ b/dist/umd/wizerdFormElement.js.map @@ -1 +1 @@ -{"version":3,"file":"wizerdFormElement.js","sourceRoot":"","sources":["../../core/wizerdFormElement.ts"],"names":[],"mappings":";;;;;;;;;;;IAAA;QAEC;QAEA,CAAC;QAEF,wBAAC;IAAD,CAAC,AAND,IAMC;IANY,8CAAiB;IAQ9B,kBAAe,iBAAiB,CAAC"} \ No newline at end of file +{"version":3,"file":"wizerdFormElement.js","sourceRoot":"","sources":["../../core/wizerdFormElement.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA;QAEC;QAEA,CAAC;QAEF,wBAAC;IAAD,CAAC,AAND,IAMC;IANY,8CAAiB;IAQ9B,kBAAe,iBAAiB,CAAC"} \ No newline at end of file diff --git a/dist/wizerdform.bundle.js b/dist/wizerdform.bundle.js index dd8177f..3354fd1 100644 --- a/dist/wizerdform.bundle.js +++ b/dist/wizerdform.bundle.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("WizerdForm",[],t):"object"==typeof exports?exports.WizerdForm=t():e.WizerdForm=t()}(self,(function(){return(()=>{"use strict";var e={725:(e,t,r)=>{r.d(t,{default:()=>D});var n=function(e){return Array.isArray(e)||(e=e?[e]:[]),e};var i=function(e){return Object.values?Object.values(e):Object.keys(e).map((function(t){return e[t]}))};function o(e){return"function"==typeof e}function a(e){return"string"==typeof e}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function l(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return{tagName:e,props:t,children:r}}function d(e){var t;Array.isArray(e)&&(e=f(e[0]||"",e[1]||{},e[2]||[])),t="fragment"===e.tagName.toLowerCase()?document.createDocumentFragment():document.createElement(e.tagName);var r,i,o=u((i=e.props,Object.entries?Object.entries(i):Object.keys(i).map((function(e){return[e,i[e]]}))));try{for(o.s();!(r=o.n()).done;){var a=s(r.value,2),l=a[0],c=a[1];0===l.lastIndexOf("on",0)?t.addEventListener(l.slice(2).toLowerCase(),c):"undefined"!==t[l]?t[l]=c:t.setAttribute(l,c)}}catch(e){o.e(e)}finally{o.f()}if(e.children=n(e.children),e.children.length){var d,p=u(e.children);try{for(p.s();!(d=p.n()).done;){var v=h(d.value);t.appendChild(v)}}catch(e){p.e(e)}finally{p.f()}}return t}function h(e){return o(e)&&(e=e()),a(e)?document.createTextNode(e):d(e)}function p(e,t){return t.replaceChildren(e),e}var v=function(e){var t={};return Array.prototype.forEach.call(e,(function(e){var r=null;switch(e.nodeName){case"INPUT":switch(e.type){case"checkbox":case"radio":e.checked&&(r=!0)}break;case"SELECT":switch(e.type){case"select-multiple":for(var n=[],i=0;i2&&void 0!==arguments[2]&&arguments[2];document.addEventListener(e,(function(e){var n=e.target,i=r.element;void 0!==i&&null!==n&&i.contains(n)&&t(e)}),n)}}])&&m(t.prototype,r),i&&m(t,i),e}();function F(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};F(this,e),A(this,"page",void 0),A(this,"index",void 0),A(this,"options",void 0),this.page=t,this.index=r,this.options=n||{},this.applyPageAttributes()}var t,r,n;return t=e,(r=[{key:"applyPageAttributes",value:function(){this.page.setAttribute("data-wizerdform-page","")}},{key:"removePageAttributes",value:function(){this.page.removeAttribute("data-wizerdform-page")}},{key:"show",value:function(){this.page.classList.remove(this.options.hiddenPageClass),this.page.classList.add(this.options.activePageClass)}},{key:"hide",value:function(){this.page.classList.remove(this.options.activePageClass),this.page.classList.add(this.options.hiddenPageClass)}},{key:"getElements",value:function(){return this.page.getElementsByClassName("wizerdform-element")}},{key:"getValues",value:function(){var e=Array.prototype.filter.call(this.getElements(),(function(e){if(""!==e.name)return e}));return v(e)}},{key:"validate",value:function(){var e,t=!0,r=new Event("wizerdForm_validationFailed"),n=this.getElements();return Array.prototype.forEach.call(n,(function(r){e=r,t=function(e){if("checkValidity"in HTMLInputElement.prototype){if(!e.checkValidity())return!1}else{if(e.hasAttribute("required")&&(!e.value||""===e.value.trim()))return!1;if(e.hasAttribute("minlength")&&parseFloat(e.getAttribute("minlength"))e.value.length)return!1;if(e.hasAttribute("pattern")&&!new RegExp(e.getAttribute("pattern"),"i").test(String(e.value)))return!1;switch(e.type){case"number":if(e.hasAttribute("min")&&parseFloat(e.getAttribute("min"))parseFloat(e.value))return!1;break;case"date":if(e.hasAttribute("min")&&new Date(e.getAttribute("min"))new Date(e.value))return!1;case"week":case"time":if(e.hasAttribute("min")&&e.getAttribute("min")e.value)return!1;case"email":if(!new RegExp(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,"i").test(String(e.value)))return!1;case"url":var t=new RegExp(/^([a-z]([a-z]|\d|\+|-|\.)*):(\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?((\[(|(v[\da-f]{1,}\.(([a-z]|\d|-|\.|_|~)|[!\$&'\(\)\*\+,;=]|:)+))\])|((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=])*)(:\d*)?)(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*|(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)){0})(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/,"i");if("url"===e.type&&!t.test(String(e.value)))return!1}}return!0}(r)})),!0!==t&&e&&(e.classList.add("has-error"),e.dispatchEvent(r)),{valid:t,field:e}}}])&&b(t.prototype,r),n&&b(t,n),e}();function E(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return C(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return C(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:0;if(e<0)return!1;Array.prototype.forEach.call(this.pages,(function(e){e.hide()})),this.pages[e].show()}},{key:"navigate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(1===e&&!t&&!this.getCurrentPage().validate().valid||-1===e&&0===this.index)return!1;this.pages[this.index].hide();var r=new Event("wizerdForm_navigate",{cancelable:!0});if(this.form.dispatchEvent(r),this.index===this.pages.length-1&&e>0){var n=new Event("submit");this.form.dispatchEvent(n)}else this.index+=e;this.goToPage(this.index),this.updateControls()}},{key:"addPage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if("function"==typeof e&&(e=e()),a(e)&&""!==e){var r,n=document.createElement("fieldset");n.innerHTML=e,r=n.children.length>1?n:n.children[0],(t<0||t>this.pages.length)&&(t=this.pages.length);var i=this.pages[t];void 0!==i?this.form.insertBefore(r,i.page):this.form.insertBefore(r,this.pages[t-1].page.nextSibling);var o=new w(r,t,this.options);return this.pages.push(o),this.applyFormElementClasses(),this.goToPage(this.index),o}}},{key:"addFormControl",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=new g(e,t,r,n);return this.controls[e]=o,i&&this.updateControls(),o}},{key:"createElement",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return f(e,t,r)}},{key:"setControlsWrapper",value:function(){var e;if(!this.controlsWrapper)if(!1!==this.options.controlsWrapper&&"object"===k(this.options.controlsWrapper))e=this.options.controlsWrapper;else if(!1!==this.options.controlsWrapper){var t=document.createElement("div");t.className="wizerdform-controls",e=t,"bottom"===this.options.controlsPosition?this.form.appendChild(t):this.form.insertBefore(t,this.form.firstChild)}else e=this.form;return this.controlsWrapper=e,e}},{key:"updateControls",value:function(){if(void 0!==this.controlsWrapper&&"object"===k(this.controlsWrapper)){var e=h(f("fragment",{},E(Array.from(i(this.controls),(function(e){return e.data})))));i(this.controls).forEach((function(t,r){var n=e.childNodes[r];t.element=n})),p(e,this.controlsWrapper)}}},{key:"removeControls",value:function(){var e,t=this;i(this.controls).forEach((function(e){t.removeControl(e.key)})),void 0!==this.controlsWrapper&&"wizerdform-controls"===this.controlsWrapper.className&&(null===(e=this.controlsWrapper.parentNode)||void 0===e||e.removeChild(this.controlsWrapper))}},{key:"removeControl",value:function(e){this.controls.hasOwnProperty(e)&&(delete this.controls[e],this.updateControls())}},{key:"on",value:function(e,t){switch(e){case"input":case"change":this.evtHandleInput(t);break;case"error":this.evtHandleValidationError(t);break;case"navigate":this.evtHandleNavigation(t);break;case"submit":this.evtHandleSubmit(t)}}},{key:"evtHandleInput",value:function(e){var t=this;Array.prototype.forEach.call(this.getCurrentPage().getElements(),(function(r){r.addEventListener("keyup",(function(n){if(n.target===r){var i=r.value;e.bind(r,n,{wizerdForm:t,el:r,value:i})()}}))}))}},{key:"evtHandleValidationError",value:function(e){var t=this;Array.prototype.forEach.call(this.getCurrentPage().getElements(),(function(r){r.addEventListener("wizerdForm_validationFailed",(function(n){e.bind(r,n,{wizerdForm:t,el:r})()}))}))}},{key:"evtHandleNavigation",value:function(e){var t=this;this.form.addEventListener("wizerdForm_navigate",(function(r){var n=t.index;e.bind(t,r,{wizerdForm:t,index:n})()}))}},{key:"evtHandleSubmit",value:function(e){var t=this;this.form.addEventListener("submit",(function(r){e.bind(t,r,{wizerdForm:t})()}))}}])&&x(t.prototype,r),n&&x(t,n),e}();P(z,"currentKey",0);const D=z}},t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}return r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r(725)})().default})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("WizerdForm",[],t):"object"==typeof exports?exports.WizerdForm=t():e.WizerdForm=t()}(self,(function(){return function(){"use strict";var e={725:function(e,t,r){r.d(t,{default:function(){return D}});var n=function(e){return Array.isArray(e)||(e=e?[e]:[]),e},i=function(e){return Object.values?Object.values(e):Object.keys(e).map((function(t){return e[t]}))};function a(e){return"function"==typeof e}function o(e){return"string"==typeof e}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function l(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return{tagName:e,props:t,children:r}}function d(e){var t;Array.isArray(e)&&(e=f(e[0]||"",e[1]||{},e[2]||[])),t="fragment"===e.tagName.toLowerCase()?document.createDocumentFragment():document.createElement(e.tagName);var r,i,a=u((i=e.props,Object.entries?Object.entries(i):Object.keys(i).map((function(e){return[e,i[e]]}))));try{for(a.s();!(r=a.n()).done;){var o=s(r.value,2),l=o[0],c=o[1];0===l.lastIndexOf("on",0)?t.addEventListener(l.slice(2).toLowerCase(),c):"undefined"!==t[l]?t[l]=c:t.setAttribute(l,c)}}catch(e){a.e(e)}finally{a.f()}if(e.children=n(e.children),e.children.length){var d,p=u(e.children);try{for(p.s();!(d=p.n()).done;){var v=h(d.value);t.appendChild(v)}}catch(e){p.e(e)}finally{p.f()}}return t}function h(e){return a(e)&&(e=e()),o(e)?document.createTextNode(e):d(e)}function p(e,t){return t.replaceChildren(e),e}var v=function(e){var t={};return Array.prototype.forEach.call(e,(function(e){switch(e.nodeName){case"INPUT":switch(e.type){case"checkbox":case"radio":e.checked&&(t[e.name]=void 0===e.value||""===e.value||e.value);break;default:t[e.name]=e.value}break;case"SELECT":switch(e.type){case"select-multiple":for(var r=[],n=0;n2&&void 0!==arguments[2]&&arguments[2];document.addEventListener(e,(function(e){var n=e.target,i=r.element;void 0!==i&&null!==n&&i.contains(n)&&t(e)}),n)}}])&&m(t.prototype,r),i&&m(t,i),e}();function F(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};F(this,e),w(this,"page",void 0),w(this,"index",void 0),w(this,"options",void 0),this.page=t,this.index=r,this.options=n||{},this.applyPageAttributes()}var t,r,n;return t=e,(r=[{key:"applyPageAttributes",value:function(){this.page.setAttribute("data-wizerdform-page","")}},{key:"removePageAttributes",value:function(){this.page.removeAttribute("data-wizerdform-page")}},{key:"show",value:function(){this.page.classList.remove(this.options.hiddenPageClass),this.page.classList.add(this.options.activePageClass)}},{key:"hide",value:function(){this.page.classList.remove(this.options.activePageClass),this.page.classList.add(this.options.hiddenPageClass)}},{key:"getElements",value:function(){return this.page.getElementsByClassName("wizerdform-element")}},{key:"getValues",value:function(){var e=Array.prototype.filter.call(this.getElements(),(function(e){if(""!==e.name)return e}));return v(e)}},{key:"validate",value:function(){var e,t=!0,r=new Event("wizerdForm_validationFailed"),n=this.getElements();return Array.prototype.forEach.call(n,(function(r){e=r,t=function(e){if("checkValidity"in HTMLInputElement.prototype){if(!e.checkValidity())return!1}else{if(e.hasAttribute("required")&&(!e.value||""===e.value.trim()))return!1;if(e.hasAttribute("minlength")&&parseFloat(e.getAttribute("minlength"))e.value.length)return!1;if(e.hasAttribute("pattern")&&!new RegExp(e.getAttribute("pattern"),"i").test(String(e.value)))return!1;switch(e.type){case"number":if(e.hasAttribute("min")&&parseFloat(e.getAttribute("min"))parseFloat(e.value))return!1;break;case"date":if(e.hasAttribute("min")&&new Date(e.getAttribute("min"))new Date(e.value))return!1;case"week":case"time":if(e.hasAttribute("min")&&e.getAttribute("min")e.value)return!1;case"email":if(!new RegExp(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,"i").test(String(e.value)))return!1;case"url":var t=new RegExp(/^([a-z]([a-z]|\d|\+|-|\.)*):(\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?((\[(|(v[\da-f]{1,}\.(([a-z]|\d|-|\.|_|~)|[!\$&'\(\)\*\+,;=]|:)+))\])|((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=])*)(:\d*)?)(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*|(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)){0})(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/,"i");if("url"===e.type&&!t.test(String(e.value)))return!1}}return!0}(r)})),!0!==t&&e&&(e.classList.add("has-error"),e.dispatchEvent(r)),{valid:t,field:e}}}])&&b(t.prototype,r),n&&b(t,n),e}();function E(e){return function(e){if(Array.isArray(e))return k(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return k(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return k(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:0;if(e<0)return!1;Array.prototype.forEach.call(this.pages,(function(e){e.hide()})),this.pages[e].show()}},{key:"navigate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(1===e&&!t&&!this.getCurrentPage().validate().valid||-1===e&&0===this.index)return!1;this.pages[this.index].hide();var r=new Event("wizerdForm_navigate",{cancelable:!0});if(this.form.dispatchEvent(r),this.index===this.pages.length-1&&e>0){var n=new Event("submit");this.form.dispatchEvent(n)}else this.index+=e;this.goToPage(this.index),this.updateControls()}},{key:"verifyNewPageIndex",value:function(e){return(e<0||e>this.pages.length)&&(e=this.pages.length),e}},{key:"prepareAddPage",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=document.createElement("fieldset");e=this.verifyNewPageIndex(e);var r=new A(t,e,this.options);this.pages.splice(e,0,r);for(var n=e+1;n1&&void 0!==arguments[1]?arguments[1]:-1;if("function"==typeof e&&(e=e()),o(e)&&""!==e){var r=this.prepareAddPage(t),n=this.pages[t+1];void 0!==n?this.form.insertBefore(r,n.page):this.form.insertBefore(r,this.pages[t-1].page.nextSibling),this.replacePage(t,e),this.applyFormElementClasses(),this.goToPage(this.index)}}},{key:"replacePage",value:function(e,t){void 0!==e&&void 0!==t&&("function"==typeof t&&(t=t()),o(t)&&""!==t&&(e=Math.min(this.verifyNewPageIndex(e),this.pages.length-1),this.pages[e].page.innerHTML=t))}},{key:"addFormControl",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=new g(e,t,r,n);return this.controls[e]=a,i&&this.updateControls(),a}},{key:"createElement",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return f(e,t,r)}},{key:"setControlsWrapper",value:function(){var e;if(!this.controlsWrapper)if(!1!==this.options.controlsWrapper&&"object"===C(this.options.controlsWrapper))e=this.options.controlsWrapper;else if(!1!==this.options.controlsWrapper){var t=document.createElement("div");t.className="wizerdform-controls",e=t,"bottom"===this.options.controlsPosition?this.form.appendChild(t):this.form.insertBefore(t,this.form.firstChild)}else e=this.form;return this.controlsWrapper=e,e}},{key:"updateControls",value:function(){if(void 0!==this.controlsWrapper&&"object"===C(this.controlsWrapper)){var e=h(f("fragment",{},E(Array.from(i(this.controls),(function(e){return e.data})))));i(this.controls).forEach((function(t,r){var n=e.childNodes[r];t.element=n})),p(e,this.controlsWrapper)}}},{key:"removeControls",value:function(){var e,t=this;i(this.controls).forEach((function(e){t.removeControl(e.key)})),void 0!==this.controlsWrapper&&"wizerdform-controls"===this.controlsWrapper.className&&(null===(e=this.controlsWrapper.parentNode)||void 0===e||e.removeChild(this.controlsWrapper))}},{key:"removeControl",value:function(e){this.controls.hasOwnProperty(e)&&(delete this.controls[e],this.updateControls())}},{key:"on",value:function(e,t){switch(e){case"input":case"change":this.evtHandleInput(t);break;case"error":this.evtHandleValidationError(t);break;case"navigate":this.evtHandleNavigation(t);break;case"submit":this.evtHandleSubmit(t)}}},{key:"evtHandleInput",value:function(e){var t=this;Array.prototype.forEach.call(this.getCurrentPage().getElements(),(function(r){r.addEventListener("keyup",(function(n){if(n.target===r){var i=r.value;e.bind(r,n,{wizerdForm:t,el:r,value:i})()}}))}))}},{key:"evtHandleValidationError",value:function(e){var t=this;Array.prototype.forEach.call(this.getCurrentPage().getElements(),(function(r){r.addEventListener("wizerdForm_validationFailed",(function(n){e.bind(r,n,{wizerdForm:t,el:r})()}))}))}},{key:"evtHandleNavigation",value:function(e){var t=this;this.form.addEventListener("wizerdForm_navigate",(function(r){var n=t.index;e.bind(t,r,{wizerdForm:t,index:n})()}))}},{key:"evtHandleSubmit",value:function(e){var t=this;this.form.addEventListener("submit",(function(r){e.bind(t,r,{wizerdForm:t})()}))}}])&&x(t.prototype,r),n&&x(t,n),e}();P(z,"currentKey",0);var D=z}},t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}return r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r(725)}().default})); \ No newline at end of file diff --git a/example/example.html b/example/example.html index 260d992..f9b205d 100644 --- a/example/example.html +++ b/example/example.html @@ -90,6 +90,12 @@

2. Page

+
+

3. Page

+ + +
+ @@ -101,10 +107,12 @@

2. Page

wizerdForm.init(); wizerdForm.addPage(` -
- - -
+ + + `, 1); + wizerdForm.addPage(` + + `, -1); const prevButton = wizerdForm.addFormControl( @@ -120,7 +128,7 @@

2. Page

prevButton.addEventListener('click', () => { - wizerdForm.navigate(-1); + wizerdForm.navigate(-1, true); }); const someotherctr = wizerdForm.addFormControl( @@ -133,7 +141,7 @@

2. Page

'next' ) someotherctr.addEventListener('click', () => { - wizerdForm.navigate(1); + wizerdForm.navigate(1, true); }); const progressBar = wizerdForm.addFormControl( diff --git a/package.json b/package.json index 5b13660..17e161d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@steinrein/wizerd-forms", - "version": "1.0.3", + "version": "1.0.5", "description": "Library for creating flexible multistep forms.", "main": "dist/wizerdform.bundle.js", "types": "dist/umd/index.d.ts",