@mapomodule/utils 1.0.0-alpha.43 → 1.0.0-alpha.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/helpers/objHelpers.js +6 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.0.0-alpha.45](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.44...v1.0.0-alpha.45) (2023-06-10)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* fix setPointed ([f43685d](https://github.com/lotrekagency/mapo/commit/f43685dce23fb9383d7b0501767b1c40ff442686))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [1.0.0-alpha.44](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.43...v1.0.0-alpha.44) (2023-06-10)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* added better reactivity to setPointed function ([78a4a88](https://github.com/lotrekagency/mapo/commit/78a4a88fbc98e5ce0d2662c074541eb4f8fd3ea1))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Performance Improvements
|
|
26
|
+
|
|
27
|
+
* EXPERIMENTAL: use Vue.set in setpointed and directly manipulate js object in FormField ([1c384e9](https://github.com/lotrekagency/mapo/commit/1c384e9d7c922b0e876512de874a3f9832ac30f1))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
# [1.0.0-alpha.43](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.42...v1.0.0-alpha.43) (2023-02-02)
|
|
7
34
|
|
|
8
35
|
|
package/helpers/objHelpers.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
var Vue = require('vue')
|
|
2
|
+
Vue = Vue.default || Vue
|
|
3
|
+
|
|
1
4
|
function deepClone(obj) {
|
|
2
5
|
const clone = obj instanceof Array ? Object.assign([]) : Object.assign({});
|
|
3
6
|
for (const i in obj) {
|
|
@@ -18,10 +21,10 @@ function getPointed(obj, kpointed, def) {
|
|
|
18
21
|
function setPointed(obj, kpointed, val) {
|
|
19
22
|
const arr = typeof kpointed == 'string' ? kpointed.split(".") : kpointed
|
|
20
23
|
if (arr.length == 1) {
|
|
21
|
-
obj
|
|
24
|
+
Vue.set(obj, arr[0], val)
|
|
22
25
|
return obj
|
|
23
26
|
}
|
|
24
|
-
obj
|
|
27
|
+
Vue.set(obj, arr[0], obj[arr[0]] || {})
|
|
25
28
|
return setPointed(obj[arr[0]], arr.slice(1), val)
|
|
26
29
|
}
|
|
27
30
|
|
|
@@ -112,4 +115,4 @@ module.exports = {
|
|
|
112
115
|
filesInObject,
|
|
113
116
|
findPropPaths,
|
|
114
117
|
diffObjs
|
|
115
|
-
}
|
|
118
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapomodule/utils",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.45",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "This is part of Mapo nuxt module. Provides a set of utils for the project.",
|
|
6
6
|
"author": "bnznamco <gabriele.baldi.01@gmail.com>",
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public"
|
|
11
11
|
},
|
|
12
|
-
"gitHead": "
|
|
12
|
+
"gitHead": "14f60bfff75726de0f9353e601de37dc27143efd"
|
|
13
13
|
}
|