@vived/host 4.12.1 → 4.12.2

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.
@@ -19,6 +19,9 @@ exports.assetFileAdapter = {
19
19
  * @param setVM - Callback function that will receive view model updates
20
20
  */
21
21
  subscribe: (id, appObjects, setVM) => {
22
+ if (!id) {
23
+ return;
24
+ }
22
25
  const pm = AssetFilePM_1.AssetFilePM.getByID(id, appObjects);
23
26
  if (!pm) {
24
27
  appObjects.submitError("assetFileAdapter", "Unable to find AssetFilePM");
@@ -34,6 +37,9 @@ exports.assetFileAdapter = {
34
37
  * @param setVM - Callback function to remove from updates
35
38
  */
36
39
  unsubscribe: (id, appObjects, setVM) => {
40
+ if (!id) {
41
+ return;
42
+ }
37
43
  const pm = AssetFilePM_1.AssetFilePM.getByID(id, appObjects);
38
44
  if (!pm) {
39
45
  appObjects.submitError("assetFileAdapter", "Unable to find AssetFilePM");
@@ -1 +1 @@
1
- {"version":3,"file":"assetFileAdapter.js","sourceRoot":"","sources":["../../../../src/Assets/Adapters/assetFileAdapter.ts"],"names":[],"mappings":";;;AAEA,oDAI4B;AAE5B;;;GAGG;AACU,QAAA,gBAAgB,GAA2B;IACtD;;OAEG;IACH,SAAS,EAAE,gCAAkB;IAE7B;;;;;;OAMG;IACH,SAAS,EAAE,CACT,EAAU,EACV,UAAyB,EACzB,KAAgC,EAChC,EAAE;QACF,MAAM,EAAE,GAAG,yBAAW,CAAC,OAAO,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;QAC/C,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,UAAU,CAAC,WAAW,CAAC,kBAAkB,EAAE,4BAA4B,CAAC,CAAC;YACzE,OAAO;QACT,CAAC;QACD,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;IAED;;;;;;OAMG;IACH,WAAW,EAAE,CACX,EAAU,EACV,UAAyB,EACzB,KAAgC,EAChC,EAAE;QACF,MAAM,EAAE,GAAG,yBAAW,CAAC,OAAO,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;QAC/C,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,UAAU,CAAC,WAAW,CAAC,kBAAkB,EAAE,4BAA4B,CAAC,CAAC;YACzE,OAAO;QACT,CAAC;QACD,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;CACF,CAAC","sourcesContent":["// filepath: c:\\Users\\amosp\\Documents\\WebGL\\vivedlearning_host\\src\\Assets\\Adapters\\assetFileAdapter.ts\nimport { AppObjectRepo, PmAdapter } from \"@vived/core\";\nimport {\n AssetFilePM,\n AssetFileVM,\n defaultAssetFileVM\n} from \"../PMs/AssetFilePM\";\n\n/**\n * Adapter for connecting AssetFilePM to UI components\n * Provides the interface for React components to subscribe to AssetFileVM updates\n */\nexport const assetFileAdapter: PmAdapter<AssetFileVM> = {\n /**\n * Default view model used before subscription is established\n */\n defaultVM: defaultAssetFileVM,\n\n /**\n * Subscribe a view function to updates from the presentation manager\n *\n * @param id - ID of the asset to observe\n * @param appObjects - Repository of app objects\n * @param setVM - Callback function that will receive view model updates\n */\n subscribe: (\n id: string,\n appObjects: AppObjectRepo,\n setVM: (vm: AssetFileVM) => void\n ) => {\n const pm = AssetFilePM.getByID(id, appObjects);\n if (!pm) {\n appObjects.submitError(\"assetFileAdapter\", \"Unable to find AssetFilePM\");\n return;\n }\n pm.addView(setVM);\n },\n\n /**\n * Unsubscribe a view function from updates\n *\n * @param id - ID of the asset to stop observing\n * @param appObjects - Repository of app objects\n * @param setVM - Callback function to remove from updates\n */\n unsubscribe: (\n id: string,\n appObjects: AppObjectRepo,\n setVM: (vm: AssetFileVM) => void\n ) => {\n const pm = AssetFilePM.getByID(id, appObjects);\n if (!pm) {\n appObjects.submitError(\"assetFileAdapter\", \"Unable to find AssetFilePM\");\n return;\n }\n pm.removeView(setVM);\n }\n};\n"]}
1
+ {"version":3,"file":"assetFileAdapter.js","sourceRoot":"","sources":["../../../../src/Assets/Adapters/assetFileAdapter.ts"],"names":[],"mappings":";;;AAEA,oDAI4B;AAE5B;;;GAGG;AACU,QAAA,gBAAgB,GAA2B;IACtD;;OAEG;IACH,SAAS,EAAE,gCAAkB;IAE7B;;;;;;OAMG;IACH,SAAS,EAAE,CACT,EAAU,EACV,UAAyB,EACzB,KAAgC,EAChC,EAAE;QACF,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,OAAO;QACT,CAAC;QACD,MAAM,EAAE,GAAG,yBAAW,CAAC,OAAO,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;QAC/C,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,UAAU,CAAC,WAAW,CAAC,kBAAkB,EAAE,4BAA4B,CAAC,CAAC;YACzE,OAAO;QACT,CAAC;QACD,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;IAED;;;;;;OAMG;IACH,WAAW,EAAE,CACX,EAAU,EACV,UAAyB,EACzB,KAAgC,EAChC,EAAE;QACF,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,OAAO;QACT,CAAC;QACD,MAAM,EAAE,GAAG,yBAAW,CAAC,OAAO,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;QAC/C,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,UAAU,CAAC,WAAW,CAAC,kBAAkB,EAAE,4BAA4B,CAAC,CAAC;YACzE,OAAO;QACT,CAAC;QACD,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;CACF,CAAC","sourcesContent":["// filepath: c:\\Users\\amosp\\Documents\\WebGL\\vivedlearning_host\\src\\Assets\\Adapters\\assetFileAdapter.ts\nimport { AppObjectRepo, PmAdapter } from \"@vived/core\";\nimport {\n AssetFilePM,\n AssetFileVM,\n defaultAssetFileVM\n} from \"../PMs/AssetFilePM\";\n\n/**\n * Adapter for connecting AssetFilePM to UI components\n * Provides the interface for React components to subscribe to AssetFileVM updates\n */\nexport const assetFileAdapter: PmAdapter<AssetFileVM> = {\n /**\n * Default view model used before subscription is established\n */\n defaultVM: defaultAssetFileVM,\n\n /**\n * Subscribe a view function to updates from the presentation manager\n *\n * @param id - ID of the asset to observe\n * @param appObjects - Repository of app objects\n * @param setVM - Callback function that will receive view model updates\n */\n subscribe: (\n id: string,\n appObjects: AppObjectRepo,\n setVM: (vm: AssetFileVM) => void\n ) => {\n if (!id) {\n return;\n }\n const pm = AssetFilePM.getByID(id, appObjects);\n if (!pm) {\n appObjects.submitError(\"assetFileAdapter\", \"Unable to find AssetFilePM\");\n return;\n }\n pm.addView(setVM);\n },\n\n /**\n * Unsubscribe a view function from updates\n *\n * @param id - ID of the asset to stop observing\n * @param appObjects - Repository of app objects\n * @param setVM - Callback function to remove from updates\n */\n unsubscribe: (\n id: string,\n appObjects: AppObjectRepo,\n setVM: (vm: AssetFileVM) => void\n ) => {\n if (!id) {\n return;\n }\n const pm = AssetFilePM.getByID(id, appObjects);\n if (!pm) {\n appObjects.submitError(\"assetFileAdapter\", \"Unable to find AssetFilePM\");\n return;\n }\n pm.removeView(setVM);\n }\n};\n"]}
@@ -16,6 +16,9 @@ export const assetFileAdapter = {
16
16
  * @param setVM - Callback function that will receive view model updates
17
17
  */
18
18
  subscribe: (id, appObjects, setVM) => {
19
+ if (!id) {
20
+ return;
21
+ }
19
22
  const pm = AssetFilePM.getByID(id, appObjects);
20
23
  if (!pm) {
21
24
  appObjects.submitError("assetFileAdapter", "Unable to find AssetFilePM");
@@ -31,6 +34,9 @@ export const assetFileAdapter = {
31
34
  * @param setVM - Callback function to remove from updates
32
35
  */
33
36
  unsubscribe: (id, appObjects, setVM) => {
37
+ if (!id) {
38
+ return;
39
+ }
34
40
  const pm = AssetFilePM.getByID(id, appObjects);
35
41
  if (!pm) {
36
42
  appObjects.submitError("assetFileAdapter", "Unable to find AssetFilePM");
@@ -1 +1 @@
1
- {"version":3,"file":"assetFileAdapter.js","sourceRoot":"","sources":["../../../../src/Assets/Adapters/assetFileAdapter.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EAEX,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAA2B;IACtD;;OAEG;IACH,SAAS,EAAE,kBAAkB;IAE7B;;;;;;OAMG;IACH,SAAS,EAAE,CACT,EAAU,EACV,UAAyB,EACzB,KAAgC,EAChC,EAAE;QACF,MAAM,EAAE,GAAG,WAAW,CAAC,OAAO,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;QAC/C,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,UAAU,CAAC,WAAW,CAAC,kBAAkB,EAAE,4BAA4B,CAAC,CAAC;YACzE,OAAO;QACT,CAAC;QACD,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;IAED;;;;;;OAMG;IACH,WAAW,EAAE,CACX,EAAU,EACV,UAAyB,EACzB,KAAgC,EAChC,EAAE;QACF,MAAM,EAAE,GAAG,WAAW,CAAC,OAAO,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;QAC/C,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,UAAU,CAAC,WAAW,CAAC,kBAAkB,EAAE,4BAA4B,CAAC,CAAC;YACzE,OAAO;QACT,CAAC;QACD,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;CACF,CAAC","sourcesContent":["// filepath: c:\\Users\\amosp\\Documents\\WebGL\\vivedlearning_host\\src\\Assets\\Adapters\\assetFileAdapter.ts\nimport { AppObjectRepo, PmAdapter } from \"@vived/core\";\nimport {\n AssetFilePM,\n AssetFileVM,\n defaultAssetFileVM\n} from \"../PMs/AssetFilePM\";\n\n/**\n * Adapter for connecting AssetFilePM to UI components\n * Provides the interface for React components to subscribe to AssetFileVM updates\n */\nexport const assetFileAdapter: PmAdapter<AssetFileVM> = {\n /**\n * Default view model used before subscription is established\n */\n defaultVM: defaultAssetFileVM,\n\n /**\n * Subscribe a view function to updates from the presentation manager\n *\n * @param id - ID of the asset to observe\n * @param appObjects - Repository of app objects\n * @param setVM - Callback function that will receive view model updates\n */\n subscribe: (\n id: string,\n appObjects: AppObjectRepo,\n setVM: (vm: AssetFileVM) => void\n ) => {\n const pm = AssetFilePM.getByID(id, appObjects);\n if (!pm) {\n appObjects.submitError(\"assetFileAdapter\", \"Unable to find AssetFilePM\");\n return;\n }\n pm.addView(setVM);\n },\n\n /**\n * Unsubscribe a view function from updates\n *\n * @param id - ID of the asset to stop observing\n * @param appObjects - Repository of app objects\n * @param setVM - Callback function to remove from updates\n */\n unsubscribe: (\n id: string,\n appObjects: AppObjectRepo,\n setVM: (vm: AssetFileVM) => void\n ) => {\n const pm = AssetFilePM.getByID(id, appObjects);\n if (!pm) {\n appObjects.submitError(\"assetFileAdapter\", \"Unable to find AssetFilePM\");\n return;\n }\n pm.removeView(setVM);\n }\n};\n"]}
1
+ {"version":3,"file":"assetFileAdapter.js","sourceRoot":"","sources":["../../../../src/Assets/Adapters/assetFileAdapter.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EAEX,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAA2B;IACtD;;OAEG;IACH,SAAS,EAAE,kBAAkB;IAE7B;;;;;;OAMG;IACH,SAAS,EAAE,CACT,EAAU,EACV,UAAyB,EACzB,KAAgC,EAChC,EAAE;QACF,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,OAAO;QACT,CAAC;QACD,MAAM,EAAE,GAAG,WAAW,CAAC,OAAO,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;QAC/C,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,UAAU,CAAC,WAAW,CAAC,kBAAkB,EAAE,4BAA4B,CAAC,CAAC;YACzE,OAAO;QACT,CAAC;QACD,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;IAED;;;;;;OAMG;IACH,WAAW,EAAE,CACX,EAAU,EACV,UAAyB,EACzB,KAAgC,EAChC,EAAE;QACF,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,OAAO;QACT,CAAC;QACD,MAAM,EAAE,GAAG,WAAW,CAAC,OAAO,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;QAC/C,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,UAAU,CAAC,WAAW,CAAC,kBAAkB,EAAE,4BAA4B,CAAC,CAAC;YACzE,OAAO;QACT,CAAC;QACD,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;CACF,CAAC","sourcesContent":["// filepath: c:\\Users\\amosp\\Documents\\WebGL\\vivedlearning_host\\src\\Assets\\Adapters\\assetFileAdapter.ts\nimport { AppObjectRepo, PmAdapter } from \"@vived/core\";\nimport {\n AssetFilePM,\n AssetFileVM,\n defaultAssetFileVM\n} from \"../PMs/AssetFilePM\";\n\n/**\n * Adapter for connecting AssetFilePM to UI components\n * Provides the interface for React components to subscribe to AssetFileVM updates\n */\nexport const assetFileAdapter: PmAdapter<AssetFileVM> = {\n /**\n * Default view model used before subscription is established\n */\n defaultVM: defaultAssetFileVM,\n\n /**\n * Subscribe a view function to updates from the presentation manager\n *\n * @param id - ID of the asset to observe\n * @param appObjects - Repository of app objects\n * @param setVM - Callback function that will receive view model updates\n */\n subscribe: (\n id: string,\n appObjects: AppObjectRepo,\n setVM: (vm: AssetFileVM) => void\n ) => {\n if (!id) {\n return;\n }\n const pm = AssetFilePM.getByID(id, appObjects);\n if (!pm) {\n appObjects.submitError(\"assetFileAdapter\", \"Unable to find AssetFilePM\");\n return;\n }\n pm.addView(setVM);\n },\n\n /**\n * Unsubscribe a view function from updates\n *\n * @param id - ID of the asset to stop observing\n * @param appObjects - Repository of app objects\n * @param setVM - Callback function to remove from updates\n */\n unsubscribe: (\n id: string,\n appObjects: AppObjectRepo,\n setVM: (vm: AssetFileVM) => void\n ) => {\n if (!id) {\n return;\n }\n const pm = AssetFilePM.getByID(id, appObjects);\n if (!pm) {\n appObjects.submitError(\"assetFileAdapter\", \"Unable to find AssetFilePM\");\n return;\n }\n pm.removeView(setVM);\n }\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"assetFileAdapter.d.ts","sourceRoot":"","sources":["../../../../src/Assets/Adapters/assetFileAdapter.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,SAAS,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAEL,WAAW,EAEZ,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,CAAC,WAAW,CA6CnD,CAAC"}
1
+ {"version":3,"file":"assetFileAdapter.d.ts","sourceRoot":"","sources":["../../../../src/Assets/Adapters/assetFileAdapter.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,SAAS,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAEL,WAAW,EAEZ,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,CAAC,WAAW,CAmDnD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vived/host",
3
- "version": "4.12.1",
3
+ "version": "4.12.2",
4
4
  "description": "Public Host package for the VIVED Learning App system",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",