dbm 1.4.17 → 1.4.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/core/LifeCycleObject.js
CHANGED
|
@@ -3,9 +3,11 @@ import Dbm from "../index.js";
|
|
|
3
3
|
export default class LifeCycleObject {
|
|
4
4
|
constructor() {
|
|
5
5
|
|
|
6
|
+
/*
|
|
6
7
|
if(process.env.NODE_ENV === "development") {
|
|
7
8
|
this._debugId = Math.round(Math.random()*1000000000000);
|
|
8
9
|
}
|
|
10
|
+
*/
|
|
9
11
|
|
|
10
12
|
this._constructProperties();
|
|
11
13
|
this._construct();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dbm",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.18",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"description": "",
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@tweenjs/tween.js": "^25.0.0",
|
|
17
|
-
"js-cookie": "^3.0.
|
|
17
|
+
"js-cookie": "^3.0.8"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"react": "
|
|
21
|
-
"react-dom": "
|
|
20
|
+
"react": "^19.2.7",
|
|
21
|
+
"react-dom": "^19.2.7"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -60,7 +60,15 @@ export default class Relation extends Dbm.react.BaseObject {
|
|
|
60
60
|
Dbm.react.text.text(Dbm.react.source.item("identifier"))
|
|
61
61
|
)
|
|
62
62
|
)
|
|
63
|
-
)
|
|
63
|
+
),
|
|
64
|
+
React.createElement("div", {"className": "flex-row small-item-spacing small-description"},
|
|
65
|
+
React.createElement("div", {"className": "flex-row-item"},
|
|
66
|
+
Dbm.react.text.text(relation.startAt)
|
|
67
|
+
),
|
|
68
|
+
React.createElement("div", {"className": "flex-row-item"},
|
|
69
|
+
Dbm.react.text.text(relation.endAt)
|
|
70
|
+
)
|
|
71
|
+
),
|
|
64
72
|
)
|
|
65
73
|
)
|
|
66
74
|
}
|
|
@@ -15,24 +15,26 @@ export default class ClickOutsideTrigger extends Dbm.react.BaseObject {
|
|
|
15
15
|
if(!commands) {
|
|
16
16
|
commands = this.getPropValue("command");
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
command
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
18
|
+
|
|
19
|
+
if(commands) {
|
|
20
|
+
if(this.getPropValueWithoutNull("active", true)) {
|
|
21
|
+
let currentElement = this.item["mainElement"];
|
|
22
|
+
if(!(currentElement.contains(aEvent.srcElement) || currentElement === aEvent.srcElement)) {
|
|
23
|
+
commands = Dbm.utils.ArrayFunctions.singleOrArray(commands);
|
|
24
|
+
let currentArray = commands;
|
|
25
|
+
let currentArrayLength = currentArray.length;
|
|
26
|
+
for(let i = 0; i < currentArrayLength; i++) {
|
|
27
|
+
let command = currentArray[i];
|
|
28
|
+
try {
|
|
29
|
+
command.perform(this, aEvent);
|
|
30
|
+
}
|
|
31
|
+
catch(theError) {
|
|
32
|
+
console.error("Error while running command", theError, command);
|
|
33
|
+
}
|
|
34
|
+
|
|
31
35
|
}
|
|
32
|
-
|
|
33
36
|
}
|
|
34
37
|
}
|
|
35
|
-
|
|
36
38
|
}
|
|
37
39
|
else{
|
|
38
40
|
console.warn("Click outside doesn't have any commands", this);
|
package/repository/Item.js
CHANGED
package/tracking/GtagTracker.js
CHANGED
|
@@ -1,3 +1,60 @@
|
|
|
1
1
|
import Dbm from "../../../index.js";
|
|
2
2
|
|
|
3
|
-
export {default as WprrApiParser} from "./WprrApiParser.js";
|
|
3
|
+
export {default as WprrApiParser} from "./WprrApiParser.js";
|
|
4
|
+
|
|
5
|
+
export const setProject = function(aProject) {
|
|
6
|
+
Dbm.repository.getItem("wprr").setValue("project", aProject);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const setupRangeData = function(aData) {
|
|
10
|
+
let group = Dbm.repository.getItem("wprr").project.items;
|
|
11
|
+
let data = aData;
|
|
12
|
+
let itemsData = Dbm.objectPath(data, "items");
|
|
13
|
+
let encodings = Dbm.objectPath(data, "encodings");
|
|
14
|
+
for(let objectName in encodings) {
|
|
15
|
+
|
|
16
|
+
let ids = encodings[objectName];
|
|
17
|
+
let currentArray = ids;
|
|
18
|
+
let currentArrayLength = currentArray.length;
|
|
19
|
+
|
|
20
|
+
for(let i = 0; i < currentArrayLength; i++) {
|
|
21
|
+
let currentId = currentArray[i];
|
|
22
|
+
let item = group.getItem(currentId);
|
|
23
|
+
group.prepareItem(item, objectName);
|
|
24
|
+
group.setupItem(item, objectName, itemsData[""+currentId]);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
let mainIds = Dbm.objectPath(data, "ids");
|
|
29
|
+
|
|
30
|
+
let items = Dbm.repository.getItems(mainIds);
|
|
31
|
+
|
|
32
|
+
return items;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
let rangeLoaded = function(aRequestItem) {
|
|
36
|
+
console.log("rangeLoaded");
|
|
37
|
+
console.log(aRequestItem);
|
|
38
|
+
let items = setupRangeData(aRequestItem.data["data"]);
|
|
39
|
+
aRequestItem.items = items;
|
|
40
|
+
aRequestItem.parsed = true;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const loadRange = function(aUrl, aCallback) {
|
|
44
|
+
let request = new Dbm.loading.JsonLoader();
|
|
45
|
+
request.setUrl(aUrl);
|
|
46
|
+
|
|
47
|
+
request.item.setValue("items", []);
|
|
48
|
+
request.item.setValue("parsed", false);
|
|
49
|
+
|
|
50
|
+
if(aCallback) {
|
|
51
|
+
let callbackCommand = Dbm.commands.callFunction(aCallback, [Dbm.core.source.staticObject(request.item, "items")]);
|
|
52
|
+
|
|
53
|
+
Dbm.flow.runWhenMatched(request.item.properties.parsed, true, callbackCommand);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
Dbm.flow.runWhenMatched(request.item.properties.status, Dbm.loading.LoadingStatus.LOADED, Dbm.commands.callFunction(rangeLoaded, [request.item]));
|
|
57
|
+
request.load();
|
|
58
|
+
|
|
59
|
+
return request.item.properties.items;
|
|
60
|
+
}
|