bruce-models 6.3.1 → 6.3.3
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/bruce-models.es5.js +42 -3
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +42 -3
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/environment.js +40 -2
- package/dist/lib/environment.js.map +1 -1
- package/dist/lib/project/project-view-bookmark.js +1 -0
- package/dist/lib/project/project-view-bookmark.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/environment.d.ts +21 -0
- package/dist/types/project/project-view-bookmark.d.ts +1 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -1668,7 +1668,45 @@
|
|
|
1668
1668
|
|
|
1669
1669
|
// Global instance for smaller use-cases where you don't want to manage the getters yourself.
|
|
1670
1670
|
let _getters;
|
|
1671
|
+
const LOCAL_STORAGE_SESSION_ID = "nxt-ssid";
|
|
1672
|
+
function setLocalValue(key, value) {
|
|
1673
|
+
if (typeof window !== "undefined" && window["localStorage"]) {
|
|
1674
|
+
window["localStorage"].setItem(key, value);
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
function getLocalValue(key) {
|
|
1678
|
+
if (typeof window !== "undefined" && window["localStorage"]) {
|
|
1679
|
+
return window["localStorage"].getItem(key);
|
|
1680
|
+
}
|
|
1681
|
+
return null;
|
|
1682
|
+
}
|
|
1671
1683
|
(function (ENVIRONMENT) {
|
|
1684
|
+
/**
|
|
1685
|
+
* Sets the local-storage session ID.
|
|
1686
|
+
* This is read by default when the ENVIRONMENT is initially created on load.
|
|
1687
|
+
* This is used by scenarios where the app doesn't manage its own session ID.
|
|
1688
|
+
*
|
|
1689
|
+
* If you want to override this logic so default widgets call your function, simply re-assign this function to your own.
|
|
1690
|
+
* Eg: ENVIRONMENT.SetPageLoadSessionId = (sessionId: string) => { ... };
|
|
1691
|
+
* @param sessionId
|
|
1692
|
+
*/
|
|
1693
|
+
ENVIRONMENT.SetPageLoadSessionId = (sessionId) => {
|
|
1694
|
+
setLocalValue(LOCAL_STORAGE_SESSION_ID, sessionId ? sessionId : "anonymous");
|
|
1695
|
+
};
|
|
1696
|
+
/**
|
|
1697
|
+
* Loads the session ID from local-storage.
|
|
1698
|
+
* This is used by default when the ENVIRONMENT is initially created on load.
|
|
1699
|
+
* This is used by scenarios where the app doesn't manage its own session ID.
|
|
1700
|
+
*
|
|
1701
|
+
* If you want to override this logic so default widgets call your function, simply re-assign this function to your own.
|
|
1702
|
+
* Eg: ENVIRONMENT.GetPageLoadSessionId = () => { ... };
|
|
1703
|
+
* @param sessionId
|
|
1704
|
+
* @returns
|
|
1705
|
+
*/
|
|
1706
|
+
ENVIRONMENT.GetPageLoadSessionId = () => {
|
|
1707
|
+
const ssid = getLocalValue(LOCAL_STORAGE_SESSION_ID);
|
|
1708
|
+
return ssid ? ssid : "anonymous";
|
|
1709
|
+
};
|
|
1672
1710
|
// If true, then defaults are not touched and it's assumed this is being managed.
|
|
1673
1711
|
ENVIRONMENT.IS_SELF_MANAGED = false;
|
|
1674
1712
|
// Unused if IS_SELF_MANAGED is false.
|
|
@@ -1676,9 +1714,9 @@
|
|
|
1676
1714
|
// Default client account ID.
|
|
1677
1715
|
accountId: "",
|
|
1678
1716
|
// Default environment.
|
|
1679
|
-
env: exports.Api.EEnv.
|
|
1717
|
+
env: exports.Api.EEnv.PROD,
|
|
1680
1718
|
// Default session ID.
|
|
1681
|
-
sessionId:
|
|
1719
|
+
sessionId: ENVIRONMENT.GetPageLoadSessionId()
|
|
1682
1720
|
};
|
|
1683
1721
|
// Subscribe to get notified when someone calls Reset.
|
|
1684
1722
|
// If you are manually updating params, call OnParamsChange.Trigger() to notify others.
|
|
@@ -10549,6 +10587,7 @@
|
|
|
10549
10587
|
let EContentType;
|
|
10550
10588
|
(function (EContentType) {
|
|
10551
10589
|
EContentType["WEB_3D"] = "WEB_3D";
|
|
10590
|
+
EContentType["WEB_3D_MODEL_SPACE"] = "WEB_3D_MODEL_SPACE";
|
|
10552
10591
|
EContentType["WEB_3D_SPLIT_PLUGIN"] = "WEB_3D_SPLIT_PLUGIN";
|
|
10553
10592
|
EContentType["IFRAME"] = "IFRAME";
|
|
10554
10593
|
})(EContentType = ProjectViewBookmark.EContentType || (ProjectViewBookmark.EContentType = {}));
|
|
@@ -15627,7 +15666,7 @@
|
|
|
15627
15666
|
})(exports.Tracking || (exports.Tracking = {}));
|
|
15628
15667
|
|
|
15629
15668
|
// This is updated with the package.json version on build.
|
|
15630
|
-
const VERSION = "6.3.
|
|
15669
|
+
const VERSION = "6.3.3";
|
|
15631
15670
|
|
|
15632
15671
|
exports.VERSION = VERSION;
|
|
15633
15672
|
exports.AbstractApi = AbstractApi;
|