jenesius-vue-form
Advanced tools
Comparing version
@@ -150,2 +150,6 @@ import EventEmitter from "jenesius-event-emitter"; | ||
validate(): boolean; | ||
/** | ||
* @description Method return values in {[key]: value} format. | ||
* */ | ||
getValues(...names: string[]): any; | ||
} | ||
@@ -152,0 +156,0 @@ interface FormParams { |
@@ -0,2 +1,9 @@ | ||
/** | ||
* @description На вход получает объект данных, возвращает максимально упрощённо разложенный объект. (Предыдущее название: | ||
* DeepenObject) | ||
* { { | ||
* address.city.name: 'Berlin' ---> address: { city: { name: 'Berlin' } } | ||
* } } | ||
* */ | ||
export default function grandObject(object: any): any; | ||
export declare function grandValue(name: string, value: any): any; |
/*! | ||
* jenesius-vue-form v2.0.30 | ||
* jenesius-vue-form v2.0.31 | ||
* (c) 2022 Jenesius | ||
@@ -197,3 +197,11 @@ * @license MIT | ||
} | ||
/** | ||
* @description На вход получает объект данных, возвращает максимально упрощённо разложенный объект. (Предыдущее название: | ||
* DeepenObject) | ||
* { { | ||
* address.city.name: 'Berlin' ---> address: { city: { name: 'Berlin' } } | ||
* } } | ||
* */ | ||
function grandObject(object) { | ||
@@ -765,3 +773,20 @@ return bypassObject(object).reduce((acc, _ref) => { | ||
} | ||
/** | ||
* @description Method return values in {[key]: value} format. | ||
* */ | ||
getValues() { | ||
for (var _len2 = arguments.length, names = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { | ||
names[_key2] = arguments[_key2]; | ||
} | ||
if (!names || !names.length) return this.values; | ||
const cast = names.reduce((acc, name) => { | ||
acc[name] = true; | ||
return acc; | ||
}, {}); | ||
return getCastObject(this.values, grandObject(cast)); | ||
} | ||
} | ||
@@ -1525,6 +1550,6 @@ | ||
var css_248z$2 = "\n.container-code[data-v-22d9b9d8]{\r\n padding: 0 10px;\r\n display: grid;\r\n place-content: center;\n}\n.container-default-code[data-v-22d9b9d8]{\r\n width: 24px;\r\n height: 16px;\r\n\r\n background-color: #dadada;\r\n text-align: center;\n}\n.container-default-code>span[data-v-22d9b9d8]{\r\n color: gray;\n}\n.tel-code[data-v-22d9b9d8]{\r\n user-select: none;\r\n border: 1px solid #f6f6f6;\n}\r\n"; | ||
var css_248z$2 = "\n.container-code[data-v-d039c044]{\r\n padding: 0 10px;\r\n display: grid;\r\n place-content: center;\n}\n.container-default-code[data-v-d039c044]{\r\n width: 24px;\r\n height: 16px;\r\n\t\tdisplay: grid;\r\n\r\n background-color: #dadada;\r\n text-align: center;\n}\n.tel-code[data-v-d039c044]{\r\n user-select: none;\r\n border: 1px solid #f6f6f6;\n}\n.container-default-code>span[data-v-d039c044]{\r\n\t\tcolor: gray;\r\n\t\tfont-size: 11px;\n}\r\n"; | ||
styleInject(css_248z$2); | ||
const _withScopeId = n => (vue.pushScopeId("data-v-22d9b9d8"), n = n(), vue.popScopeId(), n); | ||
const _withScopeId = n => (vue.pushScopeId("data-v-d039c044"), n = n(), vue.popScopeId(), n); | ||
@@ -1564,3 +1589,3 @@ const _hoisted_1$1 = { | ||
var WidgetInputTelCode = /* @__PURE__ */_export_sfc(_sfc_main$2, [["__scopeId", "data-v-22d9b9d8"], ["__file", "widget-input-tel-code.vue"]]); | ||
var WidgetInputTelCode = /* @__PURE__ */_export_sfc(_sfc_main$2, [["__scopeId", "data-v-d039c044"], ["__file", "widget-input-tel-code.vue"]]); | ||
@@ -1567,0 +1592,0 @@ var css_248z$1 = "\n.container-input-tel[data-v-c923e9a6]{\r\n display: flex;\r\n height: 35px;\r\n max-height: 35px;\r\n\r\n\t border-radius: 4px;\r\n\t border: 1px solid #c8c8c8;\r\n background-color: white;\n}\n.input-tel_disabled[data-v-c923e9a6]{\r\n\t background-color: #e9e9e9;\n}\n.input-tel[data-v-c923e9a6]{\r\n border: 0;\r\n outline: none;\r\n background-color: transparent;\r\n\r\n\t color: #1c1c1c;\r\n flex-grow: 1;\n}\r\n"; |
{ | ||
"name": "jenesius-vue-form", | ||
"version": "2.0.30", | ||
"version": "2.0.31", | ||
"description": "Heavy form system for Vue.js", | ||
@@ -66,13 +66,14 @@ "author": "Jenesius", | ||
"@vue/test-utils": "^2.0.0-rc.18", | ||
"@vue/vue3-jest": "^28.0.1", | ||
"babel-core": "^7.0.0-bridge.0", | ||
"core-js": "^3.8.3", | ||
"eslint": "^7.32.0", | ||
"eslint-plugin-vue": "9.1.1", | ||
"jest": "^26.6.3", | ||
"jest": "^28.1.3", | ||
"rollup": "^2.75.7", | ||
"rollup-plugin-postcss": "^4.0.2", | ||
"rollup-plugin-vue": "^6.0.0", | ||
"ts-jest": "^26.5.6", | ||
"ts-jest": "^28.0.7", | ||
"typescript": "~4.5.5", | ||
"vitepress": "^1.0.0-alpha.1", | ||
"vue-jest": "^5.0.0-alpha.10" | ||
"vitepress": "^1.0.0-alpha.1" | ||
}, | ||
@@ -79,0 +80,0 @@ "browserslist": [ |
81473
1.9%1804
1.81%31
3.33%