@nymphjs/tilmeld-setup 1.0.0-beta.131 → 1.0.0-beta.133
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 +8 -0
- package/dist/app/index.js +81 -47
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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-beta.133](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.132...v1.0.0-beta.133) (2026-10-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
9
|
+
|
|
10
|
+
# [1.0.0-beta.132](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.131...v1.0.0-beta.132) (2026-10-26)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
13
|
+
|
|
6
14
|
# [1.0.0-beta.131](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.130...v1.0.0-beta.131) (2026-10-20)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
package/dist/app/index.js
CHANGED
|
@@ -22766,7 +22766,9 @@
|
|
|
22766
22766
|
Array.prototype.slice.call(params));
|
|
22767
22767
|
}
|
|
22768
22768
|
toJSON() {
|
|
22769
|
-
this.$
|
|
22769
|
+
if (this.$isASleepingReference && this.$sleepingReference) {
|
|
22770
|
+
return this.$sleepingReference;
|
|
22771
|
+
}
|
|
22770
22772
|
const obj = {
|
|
22771
22773
|
class: entityConstructorsToClassNames(this.constructor),
|
|
22772
22774
|
guid: this.guid,
|
|
@@ -22780,30 +22782,52 @@
|
|
|
22780
22782
|
}
|
|
22781
22783
|
return obj;
|
|
22782
22784
|
}
|
|
22783
|
-
$init(entityJson) {
|
|
22785
|
+
$init(entityJson, isFromSave) {
|
|
22784
22786
|
if (entityJson == null) {
|
|
22785
|
-
return this
|
|
22787
|
+
return this;
|
|
22786
22788
|
}
|
|
22787
22789
|
this.$isASleepingReference = false;
|
|
22788
22790
|
this.$sleepingReference = null;
|
|
22789
22791
|
this.guid = entityJson.guid;
|
|
22790
22792
|
this.cdate = entityJson.cdate;
|
|
22791
22793
|
this.mdate = entityJson.mdate;
|
|
22792
|
-
|
|
22794
|
+
if (
|
|
22795
|
+
// The instance is new.
|
|
22796
|
+
!this.$originalTags.length ||
|
|
22797
|
+
// The data is coming from a save.
|
|
22798
|
+
isFromSave ||
|
|
22799
|
+
// The tags haven't been modified.
|
|
22800
|
+
JSON.stringify([...this.tags].sort()) ===
|
|
22801
|
+
JSON.stringify([...this.$originalTags].sort())) {
|
|
22802
|
+
this.tags = entityJson.tags;
|
|
22803
|
+
}
|
|
22793
22804
|
this.$originalTags = entityJson.tags.slice(0);
|
|
22794
|
-
this.$
|
|
22795
|
-
|
|
22796
|
-
|
|
22797
|
-
|
|
22798
|
-
|
|
22799
|
-
|
|
22800
|
-
|
|
22801
|
-
|
|
22802
|
-
|
|
22803
|
-
|
|
22804
|
-
|
|
22805
|
+
if (!this.$nymph.weakCache || !this.$nymph.weakCacheKeepDirtyData) {
|
|
22806
|
+
// Clear dirty data tracker.
|
|
22807
|
+
for (let name in this.$dirty) {
|
|
22808
|
+
delete this.$dirty[name];
|
|
22809
|
+
}
|
|
22810
|
+
}
|
|
22811
|
+
for (let name in this.$dataStore) {
|
|
22812
|
+
if (!this.$dirty[name]) {
|
|
22813
|
+
if (name in entityJson.data) {
|
|
22814
|
+
this.$dataStore[name] = classNamesToEntityConstructors(this.$nymph, referencesToEntities(entityJson.data[name], this.$nymph));
|
|
22815
|
+
this.$dirty[name] = false;
|
|
22816
|
+
}
|
|
22817
|
+
else {
|
|
22818
|
+
delete this.$dataStore[name];
|
|
22819
|
+
delete this.$dirty[name];
|
|
22820
|
+
}
|
|
22821
|
+
}
|
|
22822
|
+
}
|
|
22823
|
+
for (let name in entityJson.data) {
|
|
22824
|
+
if (!(name in this.$dataStore)) {
|
|
22825
|
+
this.$dataStore[name] = classNamesToEntityConstructors(this.$nymph, referencesToEntities(entityJson.data[name], this.$nymph));
|
|
22826
|
+
this.$dirty[name] = false;
|
|
22827
|
+
}
|
|
22828
|
+
}
|
|
22805
22829
|
this.$nymph.setEntityToCache(this.constructor, this);
|
|
22806
|
-
return this
|
|
22830
|
+
return this;
|
|
22807
22831
|
}
|
|
22808
22832
|
$addTag(...tags) {
|
|
22809
22833
|
this.$check();
|
|
@@ -22849,10 +22873,14 @@
|
|
|
22849
22873
|
return false;
|
|
22850
22874
|
}
|
|
22851
22875
|
const obData = sortObj(object.toJSON());
|
|
22852
|
-
obData
|
|
22876
|
+
if ('tags' in obData) {
|
|
22877
|
+
obData.tags?.sort();
|
|
22878
|
+
}
|
|
22853
22879
|
// obData.data = sortObj(obData.data);
|
|
22854
22880
|
const myData = sortObj(this.toJSON());
|
|
22855
|
-
myData
|
|
22881
|
+
if ('tags' in myData) {
|
|
22882
|
+
myData.tags?.sort();
|
|
22883
|
+
}
|
|
22856
22884
|
// myData.data = sortObj(myData.data);
|
|
22857
22885
|
return isEqual(obData, myData);
|
|
22858
22886
|
}
|
|
@@ -22913,10 +22941,14 @@
|
|
|
22913
22941
|
}
|
|
22914
22942
|
else {
|
|
22915
22943
|
const obData = sortObj(object.toJSON());
|
|
22916
|
-
obData
|
|
22944
|
+
if ('tags' in obData) {
|
|
22945
|
+
obData.tags?.sort();
|
|
22946
|
+
}
|
|
22917
22947
|
// obData.data = sortObj(obData.data);
|
|
22918
22948
|
const myData = sortObj(this.toJSON());
|
|
22919
|
-
myData
|
|
22949
|
+
if ('tags' in myData) {
|
|
22950
|
+
myData.tags?.sort();
|
|
22951
|
+
}
|
|
22920
22952
|
// myData.data = sortObj(myData.data);
|
|
22921
22953
|
return isEqual(obData, myData);
|
|
22922
22954
|
}
|
|
@@ -22949,7 +22981,7 @@
|
|
|
22949
22981
|
$wake() {
|
|
22950
22982
|
if (!this.$asleep()) {
|
|
22951
22983
|
this.$wakePromise = null;
|
|
22952
|
-
return Promise.resolve(this
|
|
22984
|
+
return Promise.resolve(this);
|
|
22953
22985
|
}
|
|
22954
22986
|
if (this.$sleepingReference?.[1] == null) {
|
|
22955
22987
|
throw new InvalidStateError('Tried to wake a sleeping reference with no GUID.');
|
|
@@ -22962,7 +22994,7 @@
|
|
|
22962
22994
|
const errObj = { data, textStatus: 'No data returned.' };
|
|
22963
22995
|
return Promise.reject(errObj);
|
|
22964
22996
|
}
|
|
22965
|
-
return this.$init(data);
|
|
22997
|
+
return this.$init(data, false);
|
|
22966
22998
|
})
|
|
22967
22999
|
.finally(() => {
|
|
22968
23000
|
this.$wakePromise = null;
|
|
@@ -22981,7 +23013,7 @@
|
|
|
22981
23013
|
newLevel = level - 1;
|
|
22982
23014
|
}
|
|
22983
23015
|
if (newLevel !== undefined && newLevel < 0) {
|
|
22984
|
-
resolve(this
|
|
23016
|
+
resolve(this);
|
|
22985
23017
|
return;
|
|
22986
23018
|
}
|
|
22987
23019
|
const promises = [];
|
|
@@ -23016,10 +23048,10 @@
|
|
|
23016
23048
|
};
|
|
23017
23049
|
walkData(this.$data);
|
|
23018
23050
|
if (promises.length) {
|
|
23019
|
-
Promise.all(promises).then(() => resolve(this
|
|
23051
|
+
Promise.all(promises).then(() => resolve(this), (errObj) => reject(errObj));
|
|
23020
23052
|
}
|
|
23021
23053
|
else {
|
|
23022
|
-
resolve(this
|
|
23054
|
+
resolve(this);
|
|
23023
23055
|
}
|
|
23024
23056
|
};
|
|
23025
23057
|
if (this.$asleep()) {
|
|
@@ -23052,7 +23084,7 @@
|
|
|
23052
23084
|
if (data == null) {
|
|
23053
23085
|
throw new Error("The entity's data could not be refreshed.");
|
|
23054
23086
|
}
|
|
23055
|
-
this.$init(data);
|
|
23087
|
+
this.$init(data, false);
|
|
23056
23088
|
return true;
|
|
23057
23089
|
}
|
|
23058
23090
|
$removeTag(...tags) {
|
|
@@ -23073,7 +23105,7 @@
|
|
|
23073
23105
|
const paramArray = Array.prototype.slice.call(params);
|
|
23074
23106
|
const data = await this.$nymph.serverCall(this, method, paramArray, stateless);
|
|
23075
23107
|
if (!stateless && data.entity) {
|
|
23076
|
-
this.$init(data.entity);
|
|
23108
|
+
this.$init(data.entity, false);
|
|
23077
23109
|
}
|
|
23078
23110
|
return data.return;
|
|
23079
23111
|
}
|
|
@@ -23082,7 +23114,7 @@
|
|
|
23082
23114
|
return this.$sleepingReference;
|
|
23083
23115
|
}
|
|
23084
23116
|
if (this.guid == null) {
|
|
23085
|
-
return this
|
|
23117
|
+
return this;
|
|
23086
23118
|
}
|
|
23087
23119
|
return [
|
|
23088
23120
|
'nymph_entity_reference',
|
|
@@ -23745,6 +23777,7 @@
|
|
|
23745
23777
|
responseCallbacks = [];
|
|
23746
23778
|
restUrl = '';
|
|
23747
23779
|
weakCache = false;
|
|
23780
|
+
weakCacheKeepDirtyData = false;
|
|
23748
23781
|
/**
|
|
23749
23782
|
* Headers that will be sent with every request.
|
|
23750
23783
|
*
|
|
@@ -23763,6 +23796,7 @@
|
|
|
23763
23796
|
this.restUrl = NymphOptions.restUrl;
|
|
23764
23797
|
// @ts-ignore TS doesn't know about WeakRef.
|
|
23765
23798
|
this.weakCache = !!NymphOptions.weakCache && typeof WeakRef !== 'undefined';
|
|
23799
|
+
this.weakCacheKeepDirtyData = !!NymphOptions.weakCacheKeepDirtyData;
|
|
23766
23800
|
if ('returnNullOnNotFound' in NymphOptions &&
|
|
23767
23801
|
NymphOptions.returnNullOnNotFound != null) {
|
|
23768
23802
|
this.returnNullOnNotFound = NymphOptions.returnNullOnNotFound;
|
|
@@ -23904,11 +23938,11 @@
|
|
|
23904
23938
|
return entity.map((e, i) => response[i] &&
|
|
23905
23939
|
response[i].guid != null &&
|
|
23906
23940
|
(e.guid == null || e.guid === response[i].guid)
|
|
23907
|
-
? e.$init(response[i])
|
|
23941
|
+
? e.$init(response[i], method !== 'GET')
|
|
23908
23942
|
: e);
|
|
23909
23943
|
}
|
|
23910
23944
|
else if (!Array.isArray(entity) && response.guid != null) {
|
|
23911
|
-
return entity.$init(response);
|
|
23945
|
+
return entity.$init(response, method !== 'GET');
|
|
23912
23946
|
}
|
|
23913
23947
|
throw new Error('Server error');
|
|
23914
23948
|
}
|
|
@@ -23936,7 +23970,7 @@
|
|
|
23936
23970
|
return data;
|
|
23937
23971
|
}
|
|
23938
23972
|
else {
|
|
23939
|
-
return this.initEntity(data);
|
|
23973
|
+
return this.initEntity(data, false);
|
|
23940
23974
|
}
|
|
23941
23975
|
}
|
|
23942
23976
|
return null;
|
|
@@ -24001,9 +24035,9 @@
|
|
|
24001
24035
|
if (options.return && options.return === 'guid') {
|
|
24002
24036
|
return data;
|
|
24003
24037
|
}
|
|
24004
|
-
return data.map((e) => this.initEntity(e));
|
|
24038
|
+
return data.map((e) => this.initEntity(e, false));
|
|
24005
24039
|
}
|
|
24006
|
-
initEntity(entityJSON) {
|
|
24040
|
+
initEntity(entityJSON, isFromSave) {
|
|
24007
24041
|
const EntityClass = classNamesToEntityConstructors(this, entityJSON.class);
|
|
24008
24042
|
if (!EntityClass) {
|
|
24009
24043
|
throw new ClassNotAvailableError(entityJSON.class + ' class cannot be found.');
|
|
@@ -24016,7 +24050,7 @@
|
|
|
24016
24050
|
entity = entityFromCache;
|
|
24017
24051
|
}
|
|
24018
24052
|
}
|
|
24019
|
-
return entity.$init(entityJSON);
|
|
24053
|
+
return entity.$init(entityJSON, isFromSave);
|
|
24020
24054
|
}
|
|
24021
24055
|
getEntityFromCache(EntityClass, guid) {
|
|
24022
24056
|
if (!this.weakCache) {
|
|
@@ -24030,10 +24064,10 @@
|
|
|
24030
24064
|
}
|
|
24031
24065
|
return this.cache.set(EntityClass, entity);
|
|
24032
24066
|
}
|
|
24033
|
-
initEntitiesFromData(item) {
|
|
24067
|
+
initEntitiesFromData(item, isFromSave) {
|
|
24034
24068
|
if (Array.isArray(item)) {
|
|
24035
24069
|
// Recurse into lower arrays.
|
|
24036
|
-
return item.map((entry) => this.initEntitiesFromData(entry));
|
|
24070
|
+
return item.map((entry) => this.initEntitiesFromData(entry, isFromSave));
|
|
24037
24071
|
}
|
|
24038
24072
|
else if (item instanceof Object && !(item instanceof Entity)) {
|
|
24039
24073
|
if (item.hasOwnProperty('class') &&
|
|
@@ -24043,12 +24077,12 @@
|
|
|
24043
24077
|
item.hasOwnProperty('tags') &&
|
|
24044
24078
|
item.hasOwnProperty('data') &&
|
|
24045
24079
|
classNamesToEntityConstructors(this, item.class) != null) {
|
|
24046
|
-
return this.initEntity(item);
|
|
24080
|
+
return this.initEntity(item, isFromSave);
|
|
24047
24081
|
}
|
|
24048
24082
|
else {
|
|
24049
24083
|
for (let [key, value] of Object.entries(item)) {
|
|
24050
24084
|
// @ts-ignore: Key comes from the object. It's fine.
|
|
24051
|
-
item[key] = this.initEntitiesFromData(value);
|
|
24085
|
+
item[key] = this.initEntitiesFromData(value, isFromSave);
|
|
24052
24086
|
}
|
|
24053
24087
|
}
|
|
24054
24088
|
}
|
|
@@ -24094,7 +24128,7 @@
|
|
|
24094
24128
|
});
|
|
24095
24129
|
return {
|
|
24096
24130
|
...data,
|
|
24097
|
-
return: this.initEntitiesFromData(data.return),
|
|
24131
|
+
return: this.initEntitiesFromData(data.return, false),
|
|
24098
24132
|
};
|
|
24099
24133
|
}
|
|
24100
24134
|
async serverCallStatic(className, method, params) {
|
|
@@ -24112,7 +24146,7 @@
|
|
|
24112
24146
|
},
|
|
24113
24147
|
},
|
|
24114
24148
|
});
|
|
24115
|
-
return this.initEntitiesFromData(data);
|
|
24149
|
+
return this.initEntitiesFromData(data, false);
|
|
24116
24150
|
}
|
|
24117
24151
|
async serverCallStaticIterator(className, method, params) {
|
|
24118
24152
|
const iterable = await requester.POST_ITERATOR({
|
|
@@ -24139,7 +24173,7 @@
|
|
|
24139
24173
|
yield response;
|
|
24140
24174
|
}
|
|
24141
24175
|
else {
|
|
24142
|
-
yield that.initEntitiesFromData(response);
|
|
24176
|
+
yield that.initEntitiesFromData(response, false);
|
|
24143
24177
|
}
|
|
24144
24178
|
}
|
|
24145
24179
|
},
|
|
@@ -24247,8 +24281,8 @@
|
|
|
24247
24281
|
}
|
|
24248
24282
|
constructor() {
|
|
24249
24283
|
super();
|
|
24250
|
-
this
|
|
24251
|
-
this
|
|
24284
|
+
this.enabled = true;
|
|
24285
|
+
this.abilities = [];
|
|
24252
24286
|
}
|
|
24253
24287
|
async $checkGroupname() {
|
|
24254
24288
|
return await this.$serverCall('$checkGroupname', [], true);
|
|
@@ -24426,10 +24460,10 @@
|
|
|
24426
24460
|
}
|
|
24427
24461
|
constructor() {
|
|
24428
24462
|
super();
|
|
24429
|
-
this
|
|
24430
|
-
this
|
|
24431
|
-
this
|
|
24432
|
-
this
|
|
24463
|
+
this.enabled = true;
|
|
24464
|
+
this.abilities = [];
|
|
24465
|
+
this.groups = [];
|
|
24466
|
+
this.inheritAbilities = true;
|
|
24433
24467
|
}
|
|
24434
24468
|
async $checkUsername() {
|
|
24435
24469
|
return await this.$serverCall('$checkUsername', [], true);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nymphjs/tilmeld-setup",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.133",
|
|
4
4
|
"description": "Nymph.js - Tilmeld Setup App",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
},
|
|
42
42
|
"license": "Apache-2.0",
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@nymphjs/nymph": "^1.0.0-beta.
|
|
45
|
-
"@nymphjs/tilmeld": "^1.0.0-beta.
|
|
44
|
+
"@nymphjs/nymph": "^1.0.0-beta.133",
|
|
45
|
+
"@nymphjs/tilmeld": "^1.0.0-beta.133",
|
|
46
46
|
"express": "^5.2.1",
|
|
47
47
|
"locutus": "^3.0.36"
|
|
48
48
|
},
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
"@material/elevation": "^14.0.0",
|
|
51
51
|
"@material/typography": "^14.0.0",
|
|
52
52
|
"@mdi/js": "^7.4.47",
|
|
53
|
-
"@nymphjs/client": "^1.0.0-beta.
|
|
54
|
-
"@nymphjs/driver-sqlite3": "^1.0.0-beta.
|
|
55
|
-
"@nymphjs/query-parser": "^1.0.0-beta.
|
|
56
|
-
"@nymphjs/server": "^1.0.0-beta.
|
|
57
|
-
"@nymphjs/tilmeld-client": "^1.0.0-beta.
|
|
58
|
-
"@nymphjs/tilmeld-components": "^1.0.0-beta.
|
|
53
|
+
"@nymphjs/client": "^1.0.0-beta.133",
|
|
54
|
+
"@nymphjs/driver-sqlite3": "^1.0.0-beta.133",
|
|
55
|
+
"@nymphjs/query-parser": "^1.0.0-beta.133",
|
|
56
|
+
"@nymphjs/server": "^1.0.0-beta.133",
|
|
57
|
+
"@nymphjs/tilmeld-client": "^1.0.0-beta.133",
|
|
58
|
+
"@nymphjs/tilmeld-components": "^1.0.0-beta.133",
|
|
59
59
|
"@rollup/plugin-commonjs": "^29.0.3",
|
|
60
60
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
61
61
|
"@rollup/plugin-sucrase": "^5.1.0",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"tslib": "^2.8.1",
|
|
99
99
|
"typescript": "^7.0.2"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "4edb32e721ba78f0be8d43d675578168f166b8b5"
|
|
102
102
|
}
|