@symbo.ls/atoms 2.11.277 → 2.11.284
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/Collection.js +18 -18
- package/Media.js +2 -0
- package/package.json +2 -2
package/Collection.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
import { isState, getChildStateInKey } from '@domql/state'
|
|
4
|
-
import { isString, isNot, isArray, isObject, isObjectLike,
|
|
4
|
+
import { isString, isNot, isArray, isObject, isObjectLike, deepClone } from '@domql/utils'
|
|
5
5
|
|
|
6
6
|
export const Collection = {
|
|
7
7
|
define: {
|
|
@@ -17,17 +17,17 @@ export const Collection = {
|
|
|
17
17
|
|
|
18
18
|
const { __ref: ref } = el
|
|
19
19
|
|
|
20
|
-
if (ref.
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
23
|
-
ref.__stateCollectionCache = deepClone(param)
|
|
24
|
-
delete ref.__noCollectionDifference
|
|
25
|
-
} else {
|
|
20
|
+
if (ref.__collectionCache) {
|
|
21
|
+
const equals = JSON.stringify(param) === JSON.stringify(ref.__collectionCache)
|
|
22
|
+
if (equals) {
|
|
26
23
|
ref.__noCollectionDifference = true
|
|
27
24
|
return
|
|
25
|
+
} else {
|
|
26
|
+
ref.__collectionCache = deepClone(param)
|
|
27
|
+
delete ref.__noCollectionDifference
|
|
28
28
|
}
|
|
29
29
|
} else {
|
|
30
|
-
ref.
|
|
30
|
+
ref.__collectionCache = deepClone(param)
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
const obj = {
|
|
@@ -84,13 +84,13 @@ export const Collection = {
|
|
|
84
84
|
const { __ref: ref } = el
|
|
85
85
|
|
|
86
86
|
if (ref.__stateCollectionCache) {
|
|
87
|
-
const
|
|
88
|
-
if (
|
|
89
|
-
ref.__stateCollectionCache = deepClone(param)
|
|
90
|
-
delete ref.__noCollectionDifference
|
|
91
|
-
} else {
|
|
87
|
+
const equals = JSON.stringify(param) === JSON.stringify(ref.__stateCollectionCache)
|
|
88
|
+
if (equals) {
|
|
92
89
|
ref.__noCollectionDifference = true
|
|
93
90
|
return
|
|
91
|
+
} else {
|
|
92
|
+
ref.__stateCollectionCache = deepClone(param)
|
|
93
|
+
delete ref.__noCollectionDifference
|
|
94
94
|
}
|
|
95
95
|
} else {
|
|
96
96
|
ref.__stateCollectionCache = deepClone(param)
|
|
@@ -127,13 +127,13 @@ export const Collection = {
|
|
|
127
127
|
const { __ref: ref } = el
|
|
128
128
|
|
|
129
129
|
if (ref.__propsCollectionCache) {
|
|
130
|
-
const
|
|
131
|
-
if (
|
|
132
|
-
ref.__propsCollectionCache = deepClone(param)
|
|
133
|
-
delete ref.__noCollectionDifference
|
|
134
|
-
} else {
|
|
130
|
+
const equals = JSON.stringify(param) === JSON.stringify(ref.__propsCollectionCache) // eslint-disable-line
|
|
131
|
+
if (equals) {
|
|
135
132
|
ref.__noCollectionDifference = true
|
|
136
133
|
return
|
|
134
|
+
} else {
|
|
135
|
+
ref.__propsCollectionCache = deepClone(param)
|
|
136
|
+
delete ref.__noCollectionDifference
|
|
137
137
|
}
|
|
138
138
|
} else {
|
|
139
139
|
ref.__propsCollectionCache = deepClone(param)
|
package/Media.js
CHANGED
|
@@ -161,6 +161,7 @@ const beforeClassAssign = (element, s) => {
|
|
|
161
161
|
props.update({
|
|
162
162
|
themeModifier: globalTheme
|
|
163
163
|
}, {
|
|
164
|
+
preventListeners: true,
|
|
164
165
|
preventRecursive: true,
|
|
165
166
|
isForced: true,
|
|
166
167
|
preventDefineUpdate: true
|
|
@@ -184,6 +185,7 @@ const beforeClassAssign = (element, s) => {
|
|
|
184
185
|
spacingRatio: parentProps.spacingRatio,
|
|
185
186
|
inheritSpacingRatio: true
|
|
186
187
|
}, {
|
|
188
|
+
preventListeners: true,
|
|
187
189
|
preventRecursive: true,
|
|
188
190
|
isForced: true,
|
|
189
191
|
preventDefineUpdate: true
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/atoms",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.284",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"gitHead": "
|
|
6
|
+
"gitHead": "ce9854b8d9a5c8782740df60f3c961838e373c85",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@domql/state": "latest",
|
|
9
9
|
"@domql/utils": "latest",
|