@paris-ias/trees 2.0.16 → 2.0.18
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/dist/form/actions.cjs.js +47 -9
- package/dist/form/actions.js +47 -9
- package/dist/form/affiliations.cjs.js +47 -9
- package/dist/form/affiliations.js +47 -9
- package/dist/form/apps.cjs.js +47 -9
- package/dist/form/apps.js +47 -9
- package/dist/form/disciplines.cjs.js +47 -9
- package/dist/form/disciplines.js +47 -9
- package/dist/form/events.cjs.js +47 -9
- package/dist/form/events.js +47 -9
- package/dist/form/fellowships.cjs.js +53 -664
- package/dist/form/fellowships.js +53 -664
- package/dist/form/files.cjs.js +47 -9
- package/dist/form/files.js +47 -9
- package/dist/form/mailing.cjs.js +47 -9
- package/dist/form/mailing.js +47 -9
- package/dist/form/news.cjs.js +47 -9
- package/dist/form/news.js +47 -9
- package/dist/form/people.cjs.js +47 -9
- package/dist/form/people.js +47 -9
- package/dist/form/projects.cjs.js +47 -9
- package/dist/form/projects.js +47 -9
- package/dist/form/publications.cjs.js +47 -9
- package/dist/form/publications.js +47 -9
- package/dist/form/tags.cjs.js +47 -9
- package/dist/form/tags.js +47 -9
- package/dist/form/users.cjs.js +47 -9
- package/dist/form/users.js +47 -9
- package/dist/graphql/client/misc/apex.mutations.delete.gql +3 -0
- package/dist/graphql/client/misc/apex.mutations.upsert.gql +8 -0
- package/dist/graphql/schemas/apex-resolvers-list.json +2 -0
- package/dist/graphql/schemas/schema.apex.graphql +2 -0
- package/dist/list/actions.cjs.js +49 -10
- package/dist/list/actions.js +49 -10
- package/dist/list/affiliations.cjs.js +49 -10
- package/dist/list/affiliations.js +49 -10
- package/dist/list/apps.cjs.js +49 -10
- package/dist/list/apps.js +49 -10
- package/dist/list/disciplines.cjs.js +49 -10
- package/dist/list/disciplines.js +49 -10
- package/dist/list/events.cjs.js +65 -18
- package/dist/list/events.js +65 -18
- package/dist/list/fellowships.cjs.js +55 -13
- package/dist/list/fellowships.js +55 -13
- package/dist/list/files.cjs.js +49 -10
- package/dist/list/files.js +49 -10
- package/dist/list/mailing.cjs.js +49 -10
- package/dist/list/mailing.js +49 -10
- package/dist/list/news.cjs.js +51 -11
- package/dist/list/news.js +51 -11
- package/dist/list/people.cjs.js +57 -14
- package/dist/list/people.js +57 -14
- package/dist/list/projects.cjs.js +51 -11
- package/dist/list/projects.js +51 -11
- package/dist/list/publications.cjs.js +55 -13
- package/dist/list/publications.js +55 -13
- package/dist/list/tags.cjs.js +49 -10
- package/dist/list/tags.js +49 -10
- package/dist/list/users.cjs.js +57 -14
- package/dist/list/users.js +57 -14
- package/package.json +1 -1
package/dist/form/actions.cjs.js
CHANGED
|
@@ -1,17 +1,55 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
// Deep freeze utility to make exports immutable
|
|
4
|
-
const
|
|
5
|
-
Object.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
const lockAllBut = (obj, mutableKeys = []) => {
|
|
5
|
+
for (const key of Object.getOwnPropertyNames(obj)) {
|
|
6
|
+
if (mutableKeys.includes(key)) continue;
|
|
7
|
+
|
|
8
|
+
const desc = Object.getOwnPropertyDescriptor(obj, key);
|
|
9
|
+
if (!desc) continue;
|
|
10
|
+
|
|
11
|
+
if ("value" in desc) {
|
|
12
|
+
Object.defineProperty(obj, key, {
|
|
13
|
+
...desc,
|
|
14
|
+
writable: false,
|
|
15
|
+
configurable: false,
|
|
16
|
+
});
|
|
17
|
+
} else {
|
|
18
|
+
Object.defineProperty(obj, key, {
|
|
19
|
+
...desc,
|
|
20
|
+
configurable: false,
|
|
21
|
+
});
|
|
11
22
|
}
|
|
12
|
-
}
|
|
23
|
+
}
|
|
24
|
+
Object.preventExtensions(obj);
|
|
13
25
|
return obj;
|
|
14
26
|
};
|
|
27
|
+
const selectiveDeepFreeze = (obj, path = []) => {
|
|
28
|
+
if (obj === null || typeof obj !== "object") return obj;
|
|
29
|
+
|
|
30
|
+
if (Array.isArray(obj)) {
|
|
31
|
+
obj.forEach((v, i) => selectiveDeepFreeze(v, path.concat(String(i))));
|
|
32
|
+
return Object.freeze(obj);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const parentKey = path.length >= 1 ? path[path.length - 1] : null;
|
|
36
|
+
const grandParentKey = path.length >= 2 ? path[path.length - 2] : null;
|
|
37
|
+
|
|
38
|
+
const isFilterEntry = grandParentKey === "filters";
|
|
39
|
+
|
|
40
|
+
if (isFilterEntry) {
|
|
41
|
+
for (const k of Object.getOwnPropertyNames(obj)) {
|
|
42
|
+
if (k === "value") continue; // laisser value libre
|
|
43
|
+
selectiveDeepFreeze(obj[k], path.concat(parentKey, k));
|
|
44
|
+
}
|
|
45
|
+
return lockAllBut(obj, ["value"]);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
for (const prop of Object.getOwnPropertyNames(obj)) {
|
|
49
|
+
selectiveDeepFreeze(obj[prop], path.concat(prop));
|
|
50
|
+
}
|
|
51
|
+
return Object.freeze(obj);
|
|
52
|
+
};
|
|
15
53
|
|
|
16
54
|
const data = {
|
|
17
55
|
"_defaults": {
|
|
@@ -97,6 +135,6 @@ const data = {
|
|
|
97
135
|
}
|
|
98
136
|
};
|
|
99
137
|
|
|
100
|
-
var actions =
|
|
138
|
+
var actions = selectiveDeepFreeze(data);
|
|
101
139
|
|
|
102
140
|
module.exports = actions;
|
package/dist/form/actions.js
CHANGED
|
@@ -1,15 +1,53 @@
|
|
|
1
1
|
// Deep freeze utility to make exports immutable
|
|
2
|
-
const
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
const lockAllBut = (obj, mutableKeys = []) => {
|
|
3
|
+
for (const key of Object.getOwnPropertyNames(obj)) {
|
|
4
|
+
if (mutableKeys.includes(key)) continue;
|
|
5
|
+
|
|
6
|
+
const desc = Object.getOwnPropertyDescriptor(obj, key);
|
|
7
|
+
if (!desc) continue;
|
|
8
|
+
|
|
9
|
+
if ("value" in desc) {
|
|
10
|
+
Object.defineProperty(obj, key, {
|
|
11
|
+
...desc,
|
|
12
|
+
writable: false,
|
|
13
|
+
configurable: false,
|
|
14
|
+
});
|
|
15
|
+
} else {
|
|
16
|
+
Object.defineProperty(obj, key, {
|
|
17
|
+
...desc,
|
|
18
|
+
configurable: false,
|
|
19
|
+
});
|
|
9
20
|
}
|
|
10
|
-
}
|
|
21
|
+
}
|
|
22
|
+
Object.preventExtensions(obj);
|
|
11
23
|
return obj;
|
|
12
24
|
};
|
|
25
|
+
const selectiveDeepFreeze = (obj, path = []) => {
|
|
26
|
+
if (obj === null || typeof obj !== "object") return obj;
|
|
27
|
+
|
|
28
|
+
if (Array.isArray(obj)) {
|
|
29
|
+
obj.forEach((v, i) => selectiveDeepFreeze(v, path.concat(String(i))));
|
|
30
|
+
return Object.freeze(obj);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const parentKey = path.length >= 1 ? path[path.length - 1] : null;
|
|
34
|
+
const grandParentKey = path.length >= 2 ? path[path.length - 2] : null;
|
|
35
|
+
|
|
36
|
+
const isFilterEntry = grandParentKey === "filters";
|
|
37
|
+
|
|
38
|
+
if (isFilterEntry) {
|
|
39
|
+
for (const k of Object.getOwnPropertyNames(obj)) {
|
|
40
|
+
if (k === "value") continue; // laisser value libre
|
|
41
|
+
selectiveDeepFreeze(obj[k], path.concat(parentKey, k));
|
|
42
|
+
}
|
|
43
|
+
return lockAllBut(obj, ["value"]);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
for (const prop of Object.getOwnPropertyNames(obj)) {
|
|
47
|
+
selectiveDeepFreeze(obj[prop], path.concat(prop));
|
|
48
|
+
}
|
|
49
|
+
return Object.freeze(obj);
|
|
50
|
+
};
|
|
13
51
|
|
|
14
52
|
const data = {
|
|
15
53
|
"_defaults": {
|
|
@@ -95,6 +133,6 @@ const data = {
|
|
|
95
133
|
}
|
|
96
134
|
};
|
|
97
135
|
|
|
98
|
-
var actions =
|
|
136
|
+
var actions = selectiveDeepFreeze(data);
|
|
99
137
|
|
|
100
138
|
export { actions as default };
|
|
@@ -1,17 +1,55 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
// Deep freeze utility to make exports immutable
|
|
4
|
-
const
|
|
5
|
-
Object.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
const lockAllBut = (obj, mutableKeys = []) => {
|
|
5
|
+
for (const key of Object.getOwnPropertyNames(obj)) {
|
|
6
|
+
if (mutableKeys.includes(key)) continue;
|
|
7
|
+
|
|
8
|
+
const desc = Object.getOwnPropertyDescriptor(obj, key);
|
|
9
|
+
if (!desc) continue;
|
|
10
|
+
|
|
11
|
+
if ("value" in desc) {
|
|
12
|
+
Object.defineProperty(obj, key, {
|
|
13
|
+
...desc,
|
|
14
|
+
writable: false,
|
|
15
|
+
configurable: false,
|
|
16
|
+
});
|
|
17
|
+
} else {
|
|
18
|
+
Object.defineProperty(obj, key, {
|
|
19
|
+
...desc,
|
|
20
|
+
configurable: false,
|
|
21
|
+
});
|
|
11
22
|
}
|
|
12
|
-
}
|
|
23
|
+
}
|
|
24
|
+
Object.preventExtensions(obj);
|
|
13
25
|
return obj;
|
|
14
26
|
};
|
|
27
|
+
const selectiveDeepFreeze = (obj, path = []) => {
|
|
28
|
+
if (obj === null || typeof obj !== "object") return obj;
|
|
29
|
+
|
|
30
|
+
if (Array.isArray(obj)) {
|
|
31
|
+
obj.forEach((v, i) => selectiveDeepFreeze(v, path.concat(String(i))));
|
|
32
|
+
return Object.freeze(obj);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const parentKey = path.length >= 1 ? path[path.length - 1] : null;
|
|
36
|
+
const grandParentKey = path.length >= 2 ? path[path.length - 2] : null;
|
|
37
|
+
|
|
38
|
+
const isFilterEntry = grandParentKey === "filters";
|
|
39
|
+
|
|
40
|
+
if (isFilterEntry) {
|
|
41
|
+
for (const k of Object.getOwnPropertyNames(obj)) {
|
|
42
|
+
if (k === "value") continue; // laisser value libre
|
|
43
|
+
selectiveDeepFreeze(obj[k], path.concat(parentKey, k));
|
|
44
|
+
}
|
|
45
|
+
return lockAllBut(obj, ["value"]);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
for (const prop of Object.getOwnPropertyNames(obj)) {
|
|
49
|
+
selectiveDeepFreeze(obj[prop], path.concat(prop));
|
|
50
|
+
}
|
|
51
|
+
return Object.freeze(obj);
|
|
52
|
+
};
|
|
15
53
|
|
|
16
54
|
const data = {
|
|
17
55
|
"_defaults": {
|
|
@@ -192,6 +230,6 @@ const data = {
|
|
|
192
230
|
}
|
|
193
231
|
};
|
|
194
232
|
|
|
195
|
-
var affiliations =
|
|
233
|
+
var affiliations = selectiveDeepFreeze(data);
|
|
196
234
|
|
|
197
235
|
module.exports = affiliations;
|
|
@@ -1,15 +1,53 @@
|
|
|
1
1
|
// Deep freeze utility to make exports immutable
|
|
2
|
-
const
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
const lockAllBut = (obj, mutableKeys = []) => {
|
|
3
|
+
for (const key of Object.getOwnPropertyNames(obj)) {
|
|
4
|
+
if (mutableKeys.includes(key)) continue;
|
|
5
|
+
|
|
6
|
+
const desc = Object.getOwnPropertyDescriptor(obj, key);
|
|
7
|
+
if (!desc) continue;
|
|
8
|
+
|
|
9
|
+
if ("value" in desc) {
|
|
10
|
+
Object.defineProperty(obj, key, {
|
|
11
|
+
...desc,
|
|
12
|
+
writable: false,
|
|
13
|
+
configurable: false,
|
|
14
|
+
});
|
|
15
|
+
} else {
|
|
16
|
+
Object.defineProperty(obj, key, {
|
|
17
|
+
...desc,
|
|
18
|
+
configurable: false,
|
|
19
|
+
});
|
|
9
20
|
}
|
|
10
|
-
}
|
|
21
|
+
}
|
|
22
|
+
Object.preventExtensions(obj);
|
|
11
23
|
return obj;
|
|
12
24
|
};
|
|
25
|
+
const selectiveDeepFreeze = (obj, path = []) => {
|
|
26
|
+
if (obj === null || typeof obj !== "object") return obj;
|
|
27
|
+
|
|
28
|
+
if (Array.isArray(obj)) {
|
|
29
|
+
obj.forEach((v, i) => selectiveDeepFreeze(v, path.concat(String(i))));
|
|
30
|
+
return Object.freeze(obj);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const parentKey = path.length >= 1 ? path[path.length - 1] : null;
|
|
34
|
+
const grandParentKey = path.length >= 2 ? path[path.length - 2] : null;
|
|
35
|
+
|
|
36
|
+
const isFilterEntry = grandParentKey === "filters";
|
|
37
|
+
|
|
38
|
+
if (isFilterEntry) {
|
|
39
|
+
for (const k of Object.getOwnPropertyNames(obj)) {
|
|
40
|
+
if (k === "value") continue; // laisser value libre
|
|
41
|
+
selectiveDeepFreeze(obj[k], path.concat(parentKey, k));
|
|
42
|
+
}
|
|
43
|
+
return lockAllBut(obj, ["value"]);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
for (const prop of Object.getOwnPropertyNames(obj)) {
|
|
47
|
+
selectiveDeepFreeze(obj[prop], path.concat(prop));
|
|
48
|
+
}
|
|
49
|
+
return Object.freeze(obj);
|
|
50
|
+
};
|
|
13
51
|
|
|
14
52
|
const data = {
|
|
15
53
|
"_defaults": {
|
|
@@ -190,6 +228,6 @@ const data = {
|
|
|
190
228
|
}
|
|
191
229
|
};
|
|
192
230
|
|
|
193
|
-
var affiliations =
|
|
231
|
+
var affiliations = selectiveDeepFreeze(data);
|
|
194
232
|
|
|
195
233
|
export { affiliations as default };
|
package/dist/form/apps.cjs.js
CHANGED
|
@@ -1,17 +1,55 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
// Deep freeze utility to make exports immutable
|
|
4
|
-
const
|
|
5
|
-
Object.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
const lockAllBut = (obj, mutableKeys = []) => {
|
|
5
|
+
for (const key of Object.getOwnPropertyNames(obj)) {
|
|
6
|
+
if (mutableKeys.includes(key)) continue;
|
|
7
|
+
|
|
8
|
+
const desc = Object.getOwnPropertyDescriptor(obj, key);
|
|
9
|
+
if (!desc) continue;
|
|
10
|
+
|
|
11
|
+
if ("value" in desc) {
|
|
12
|
+
Object.defineProperty(obj, key, {
|
|
13
|
+
...desc,
|
|
14
|
+
writable: false,
|
|
15
|
+
configurable: false,
|
|
16
|
+
});
|
|
17
|
+
} else {
|
|
18
|
+
Object.defineProperty(obj, key, {
|
|
19
|
+
...desc,
|
|
20
|
+
configurable: false,
|
|
21
|
+
});
|
|
11
22
|
}
|
|
12
|
-
}
|
|
23
|
+
}
|
|
24
|
+
Object.preventExtensions(obj);
|
|
13
25
|
return obj;
|
|
14
26
|
};
|
|
27
|
+
const selectiveDeepFreeze = (obj, path = []) => {
|
|
28
|
+
if (obj === null || typeof obj !== "object") return obj;
|
|
29
|
+
|
|
30
|
+
if (Array.isArray(obj)) {
|
|
31
|
+
obj.forEach((v, i) => selectiveDeepFreeze(v, path.concat(String(i))));
|
|
32
|
+
return Object.freeze(obj);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const parentKey = path.length >= 1 ? path[path.length - 1] : null;
|
|
36
|
+
const grandParentKey = path.length >= 2 ? path[path.length - 2] : null;
|
|
37
|
+
|
|
38
|
+
const isFilterEntry = grandParentKey === "filters";
|
|
39
|
+
|
|
40
|
+
if (isFilterEntry) {
|
|
41
|
+
for (const k of Object.getOwnPropertyNames(obj)) {
|
|
42
|
+
if (k === "value") continue; // laisser value libre
|
|
43
|
+
selectiveDeepFreeze(obj[k], path.concat(parentKey, k));
|
|
44
|
+
}
|
|
45
|
+
return lockAllBut(obj, ["value"]);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
for (const prop of Object.getOwnPropertyNames(obj)) {
|
|
49
|
+
selectiveDeepFreeze(obj[prop], path.concat(prop));
|
|
50
|
+
}
|
|
51
|
+
return Object.freeze(obj);
|
|
52
|
+
};
|
|
15
53
|
|
|
16
54
|
const data = {
|
|
17
55
|
"_defaults": {
|
|
@@ -146,6 +184,6 @@ const data = {
|
|
|
146
184
|
}
|
|
147
185
|
};
|
|
148
186
|
|
|
149
|
-
var apps =
|
|
187
|
+
var apps = selectiveDeepFreeze(data);
|
|
150
188
|
|
|
151
189
|
module.exports = apps;
|
package/dist/form/apps.js
CHANGED
|
@@ -1,15 +1,53 @@
|
|
|
1
1
|
// Deep freeze utility to make exports immutable
|
|
2
|
-
const
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
const lockAllBut = (obj, mutableKeys = []) => {
|
|
3
|
+
for (const key of Object.getOwnPropertyNames(obj)) {
|
|
4
|
+
if (mutableKeys.includes(key)) continue;
|
|
5
|
+
|
|
6
|
+
const desc = Object.getOwnPropertyDescriptor(obj, key);
|
|
7
|
+
if (!desc) continue;
|
|
8
|
+
|
|
9
|
+
if ("value" in desc) {
|
|
10
|
+
Object.defineProperty(obj, key, {
|
|
11
|
+
...desc,
|
|
12
|
+
writable: false,
|
|
13
|
+
configurable: false,
|
|
14
|
+
});
|
|
15
|
+
} else {
|
|
16
|
+
Object.defineProperty(obj, key, {
|
|
17
|
+
...desc,
|
|
18
|
+
configurable: false,
|
|
19
|
+
});
|
|
9
20
|
}
|
|
10
|
-
}
|
|
21
|
+
}
|
|
22
|
+
Object.preventExtensions(obj);
|
|
11
23
|
return obj;
|
|
12
24
|
};
|
|
25
|
+
const selectiveDeepFreeze = (obj, path = []) => {
|
|
26
|
+
if (obj === null || typeof obj !== "object") return obj;
|
|
27
|
+
|
|
28
|
+
if (Array.isArray(obj)) {
|
|
29
|
+
obj.forEach((v, i) => selectiveDeepFreeze(v, path.concat(String(i))));
|
|
30
|
+
return Object.freeze(obj);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const parentKey = path.length >= 1 ? path[path.length - 1] : null;
|
|
34
|
+
const grandParentKey = path.length >= 2 ? path[path.length - 2] : null;
|
|
35
|
+
|
|
36
|
+
const isFilterEntry = grandParentKey === "filters";
|
|
37
|
+
|
|
38
|
+
if (isFilterEntry) {
|
|
39
|
+
for (const k of Object.getOwnPropertyNames(obj)) {
|
|
40
|
+
if (k === "value") continue; // laisser value libre
|
|
41
|
+
selectiveDeepFreeze(obj[k], path.concat(parentKey, k));
|
|
42
|
+
}
|
|
43
|
+
return lockAllBut(obj, ["value"]);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
for (const prop of Object.getOwnPropertyNames(obj)) {
|
|
47
|
+
selectiveDeepFreeze(obj[prop], path.concat(prop));
|
|
48
|
+
}
|
|
49
|
+
return Object.freeze(obj);
|
|
50
|
+
};
|
|
13
51
|
|
|
14
52
|
const data = {
|
|
15
53
|
"_defaults": {
|
|
@@ -144,6 +182,6 @@ const data = {
|
|
|
144
182
|
}
|
|
145
183
|
};
|
|
146
184
|
|
|
147
|
-
var apps =
|
|
185
|
+
var apps = selectiveDeepFreeze(data);
|
|
148
186
|
|
|
149
187
|
export { apps as default };
|
|
@@ -1,17 +1,55 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
// Deep freeze utility to make exports immutable
|
|
4
|
-
const
|
|
5
|
-
Object.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
const lockAllBut = (obj, mutableKeys = []) => {
|
|
5
|
+
for (const key of Object.getOwnPropertyNames(obj)) {
|
|
6
|
+
if (mutableKeys.includes(key)) continue;
|
|
7
|
+
|
|
8
|
+
const desc = Object.getOwnPropertyDescriptor(obj, key);
|
|
9
|
+
if (!desc) continue;
|
|
10
|
+
|
|
11
|
+
if ("value" in desc) {
|
|
12
|
+
Object.defineProperty(obj, key, {
|
|
13
|
+
...desc,
|
|
14
|
+
writable: false,
|
|
15
|
+
configurable: false,
|
|
16
|
+
});
|
|
17
|
+
} else {
|
|
18
|
+
Object.defineProperty(obj, key, {
|
|
19
|
+
...desc,
|
|
20
|
+
configurable: false,
|
|
21
|
+
});
|
|
11
22
|
}
|
|
12
|
-
}
|
|
23
|
+
}
|
|
24
|
+
Object.preventExtensions(obj);
|
|
13
25
|
return obj;
|
|
14
26
|
};
|
|
27
|
+
const selectiveDeepFreeze = (obj, path = []) => {
|
|
28
|
+
if (obj === null || typeof obj !== "object") return obj;
|
|
29
|
+
|
|
30
|
+
if (Array.isArray(obj)) {
|
|
31
|
+
obj.forEach((v, i) => selectiveDeepFreeze(v, path.concat(String(i))));
|
|
32
|
+
return Object.freeze(obj);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const parentKey = path.length >= 1 ? path[path.length - 1] : null;
|
|
36
|
+
const grandParentKey = path.length >= 2 ? path[path.length - 2] : null;
|
|
37
|
+
|
|
38
|
+
const isFilterEntry = grandParentKey === "filters";
|
|
39
|
+
|
|
40
|
+
if (isFilterEntry) {
|
|
41
|
+
for (const k of Object.getOwnPropertyNames(obj)) {
|
|
42
|
+
if (k === "value") continue; // laisser value libre
|
|
43
|
+
selectiveDeepFreeze(obj[k], path.concat(parentKey, k));
|
|
44
|
+
}
|
|
45
|
+
return lockAllBut(obj, ["value"]);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
for (const prop of Object.getOwnPropertyNames(obj)) {
|
|
49
|
+
selectiveDeepFreeze(obj[prop], path.concat(prop));
|
|
50
|
+
}
|
|
51
|
+
return Object.freeze(obj);
|
|
52
|
+
};
|
|
15
53
|
|
|
16
54
|
const data = {
|
|
17
55
|
"_defaults": {
|
|
@@ -44,6 +82,6 @@ const data = {
|
|
|
44
82
|
}
|
|
45
83
|
};
|
|
46
84
|
|
|
47
|
-
var disciplines =
|
|
85
|
+
var disciplines = selectiveDeepFreeze(data);
|
|
48
86
|
|
|
49
87
|
module.exports = disciplines;
|
package/dist/form/disciplines.js
CHANGED
|
@@ -1,15 +1,53 @@
|
|
|
1
1
|
// Deep freeze utility to make exports immutable
|
|
2
|
-
const
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
const lockAllBut = (obj, mutableKeys = []) => {
|
|
3
|
+
for (const key of Object.getOwnPropertyNames(obj)) {
|
|
4
|
+
if (mutableKeys.includes(key)) continue;
|
|
5
|
+
|
|
6
|
+
const desc = Object.getOwnPropertyDescriptor(obj, key);
|
|
7
|
+
if (!desc) continue;
|
|
8
|
+
|
|
9
|
+
if ("value" in desc) {
|
|
10
|
+
Object.defineProperty(obj, key, {
|
|
11
|
+
...desc,
|
|
12
|
+
writable: false,
|
|
13
|
+
configurable: false,
|
|
14
|
+
});
|
|
15
|
+
} else {
|
|
16
|
+
Object.defineProperty(obj, key, {
|
|
17
|
+
...desc,
|
|
18
|
+
configurable: false,
|
|
19
|
+
});
|
|
9
20
|
}
|
|
10
|
-
}
|
|
21
|
+
}
|
|
22
|
+
Object.preventExtensions(obj);
|
|
11
23
|
return obj;
|
|
12
24
|
};
|
|
25
|
+
const selectiveDeepFreeze = (obj, path = []) => {
|
|
26
|
+
if (obj === null || typeof obj !== "object") return obj;
|
|
27
|
+
|
|
28
|
+
if (Array.isArray(obj)) {
|
|
29
|
+
obj.forEach((v, i) => selectiveDeepFreeze(v, path.concat(String(i))));
|
|
30
|
+
return Object.freeze(obj);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const parentKey = path.length >= 1 ? path[path.length - 1] : null;
|
|
34
|
+
const grandParentKey = path.length >= 2 ? path[path.length - 2] : null;
|
|
35
|
+
|
|
36
|
+
const isFilterEntry = grandParentKey === "filters";
|
|
37
|
+
|
|
38
|
+
if (isFilterEntry) {
|
|
39
|
+
for (const k of Object.getOwnPropertyNames(obj)) {
|
|
40
|
+
if (k === "value") continue; // laisser value libre
|
|
41
|
+
selectiveDeepFreeze(obj[k], path.concat(parentKey, k));
|
|
42
|
+
}
|
|
43
|
+
return lockAllBut(obj, ["value"]);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
for (const prop of Object.getOwnPropertyNames(obj)) {
|
|
47
|
+
selectiveDeepFreeze(obj[prop], path.concat(prop));
|
|
48
|
+
}
|
|
49
|
+
return Object.freeze(obj);
|
|
50
|
+
};
|
|
13
51
|
|
|
14
52
|
const data = {
|
|
15
53
|
"_defaults": {
|
|
@@ -42,6 +80,6 @@ const data = {
|
|
|
42
80
|
}
|
|
43
81
|
};
|
|
44
82
|
|
|
45
|
-
var disciplines =
|
|
83
|
+
var disciplines = selectiveDeepFreeze(data);
|
|
46
84
|
|
|
47
85
|
export { disciplines as default };
|
package/dist/form/events.cjs.js
CHANGED
|
@@ -1,17 +1,55 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
// Deep freeze utility to make exports immutable
|
|
4
|
-
const
|
|
5
|
-
Object.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
const lockAllBut = (obj, mutableKeys = []) => {
|
|
5
|
+
for (const key of Object.getOwnPropertyNames(obj)) {
|
|
6
|
+
if (mutableKeys.includes(key)) continue;
|
|
7
|
+
|
|
8
|
+
const desc = Object.getOwnPropertyDescriptor(obj, key);
|
|
9
|
+
if (!desc) continue;
|
|
10
|
+
|
|
11
|
+
if ("value" in desc) {
|
|
12
|
+
Object.defineProperty(obj, key, {
|
|
13
|
+
...desc,
|
|
14
|
+
writable: false,
|
|
15
|
+
configurable: false,
|
|
16
|
+
});
|
|
17
|
+
} else {
|
|
18
|
+
Object.defineProperty(obj, key, {
|
|
19
|
+
...desc,
|
|
20
|
+
configurable: false,
|
|
21
|
+
});
|
|
11
22
|
}
|
|
12
|
-
}
|
|
23
|
+
}
|
|
24
|
+
Object.preventExtensions(obj);
|
|
13
25
|
return obj;
|
|
14
26
|
};
|
|
27
|
+
const selectiveDeepFreeze = (obj, path = []) => {
|
|
28
|
+
if (obj === null || typeof obj !== "object") return obj;
|
|
29
|
+
|
|
30
|
+
if (Array.isArray(obj)) {
|
|
31
|
+
obj.forEach((v, i) => selectiveDeepFreeze(v, path.concat(String(i))));
|
|
32
|
+
return Object.freeze(obj);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const parentKey = path.length >= 1 ? path[path.length - 1] : null;
|
|
36
|
+
const grandParentKey = path.length >= 2 ? path[path.length - 2] : null;
|
|
37
|
+
|
|
38
|
+
const isFilterEntry = grandParentKey === "filters";
|
|
39
|
+
|
|
40
|
+
if (isFilterEntry) {
|
|
41
|
+
for (const k of Object.getOwnPropertyNames(obj)) {
|
|
42
|
+
if (k === "value") continue; // laisser value libre
|
|
43
|
+
selectiveDeepFreeze(obj[k], path.concat(parentKey, k));
|
|
44
|
+
}
|
|
45
|
+
return lockAllBut(obj, ["value"]);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
for (const prop of Object.getOwnPropertyNames(obj)) {
|
|
49
|
+
selectiveDeepFreeze(obj[prop], path.concat(prop));
|
|
50
|
+
}
|
|
51
|
+
return Object.freeze(obj);
|
|
52
|
+
};
|
|
15
53
|
|
|
16
54
|
const data = {
|
|
17
55
|
"_defaults": {
|
|
@@ -699,6 +737,6 @@ const data = {
|
|
|
699
737
|
}
|
|
700
738
|
};
|
|
701
739
|
|
|
702
|
-
var events =
|
|
740
|
+
var events = selectiveDeepFreeze(data);
|
|
703
741
|
|
|
704
742
|
module.exports = events;
|