diff --git a/force-app/main/default/lwc/jsconfig.json b/force-app/main/default/lwc/jsconfig.json
index e901923..1d5e093 100644
--- a/force-app/main/default/lwc/jsconfig.json
+++ b/force-app/main/default/lwc/jsconfig.json
@@ -3,12 +3,21 @@
"experimentalDecorators": true,
"baseUrl": ".",
"paths": {
+ "c/customLayout": [
+ "customLayout/customLayout.js"
+ ],
"c/helloWorld": [
"helloWorld/helloWorld.js"
],
+ "c/myActionComponent": [
+ "myActionComponent/myActionComponent.js"
+ ],
"c/myCustomComponent": [
"myCustomComponent/myCustomComponent.js"
],
+ "c/myOmniComponentInBaseClass": [
+ "myOmniComponentInBaseClass/myOmniComponentInBaseClass.js"
+ ],
"c/myTextComponent": [
"myTextComponent/myTextComponent.js"
]
diff --git a/force-app/main/default/lwc/myActionComponent/myActionComponent.html b/force-app/main/default/lwc/myActionComponent/myActionComponent.html
new file mode 100755
index 0000000..3f2080f
--- /dev/null
+++ b/force-app/main/default/lwc/myActionComponent/myActionComponent.html
@@ -0,0 +1,32 @@
+
+ Wow.
+
+
+
+
+ URL: {url}
+
+
+
+
+ URL: {url}
+
+
+
diff --git a/force-app/main/default/lwc/myActionComponent/myActionComponent.js b/force-app/main/default/lwc/myActionComponent/myActionComponent.js
new file mode 100755
index 0000000..490fce1
--- /dev/null
+++ b/force-app/main/default/lwc/myActionComponent/myActionComponent.js
@@ -0,0 +1,53 @@
+import tmpl from './myActionComponent.html';
+import { LightningElement, track } from 'lwc';
+import { OmniscriptBaseMixin } from 'vlocity_cmt/omniscriptBaseMixin';
+
+export default class MyActionComponent extends OmniscriptBaseMixin(LightningElement) {
+ @track url;
+ @track query = JSON.stringify({
+ datasource: {
+ type: "query",
+ value: {
+ query: "SELECT Id, name FROM Contact LIMIT 1"
+ }
+ },
+ url: "/${data[0].Id}",
+ target: "_blank",
+ parameters: {},
+ navigate: false
+ });
+
+ connectedCallback() {
+ console.log('MyActionComponent - Connected');
+ }
+
+ render() {
+ return tmpl;
+ }
+
+ fetchData(evt) {
+ let action = evt.target;
+ let def = JSON.parse(this.query);
+ action.definition = this.query;
+ action.triggerAction();
+ }
+ // I'm passing these properties down to the navigate-action via
+ // attributes.
+ onSuccessCallback(evt) {
+ let result = evt.detail.result;
+ this._targetType = "Record";
+ this._targetId = result[0].Id;
+
+ // Because we're setting the attribute values via attributes,
+ // we need to give the ui a chance to re-render.
+ Promise.resolve().then(() => {
+ this.url = result[0].attributes.url;
+ });
+ }
+
+ onErrorCallback(error) {
+ console.log(error);
+ }
+
+
+}
diff --git a/force-app/main/default/lwc/myActionComponent/myActionComponent.js-meta.xml b/force-app/main/default/lwc/myActionComponent/myActionComponent.js-meta.xml
new file mode 100755
index 0000000..e645336
--- /dev/null
+++ b/force-app/main/default/lwc/myActionComponent/myActionComponent.js-meta.xml
@@ -0,0 +1,6 @@
+
+
+ 47.0
+ true
+ vlocity_cmt
+
diff --git a/force-app/main/default/lwc/myCustomComponent/myCustomComponent.html b/force-app/main/default/lwc/myCustomComponent/myCustomComponent.html
index b662fc3..c895caa 100755
--- a/force-app/main/default/lwc/myCustomComponent/myCustomComponent.html
+++ b/force-app/main/default/lwc/myCustomComponent/myCustomComponent.html
@@ -1,9 +1,11 @@
-
-
+
+
+
+
diff --git a/force-app/main/default/lwc/myCustomComponent/myCustomComponent.js b/force-app/main/default/lwc/myCustomComponent/myCustomComponent.js
index ce6439c..2c2df1b 100755
--- a/force-app/main/default/lwc/myCustomComponent/myCustomComponent.js
+++ b/force-app/main/default/lwc/myCustomComponent/myCustomComponent.js
@@ -1,10 +1,30 @@
-import { LightningElement } from 'lwc';
-import pubsub from 'vlocity_cmt/pubsub';
+import { LightningElement, track } from 'lwc';
import { OmniscriptBaseMixin } from 'vlocity_cmt/omniscriptBaseMixin';
export default class MyCustomComponent extends OmniscriptBaseMixin(LightningElement) {
+ @track layout;
+ @track theme;
+ @track parentClass;
+
connectedCallback() {
console.log("MyCustomComponent - Connected");
+
+ this.layout = this.getAttribute('data-omni-layout'); // returns lightning or newport
+ this.theme = this.layout === 'lightning' ? 'slds' : 'nds'; // we can now use theme={theme} in html
+ this.parentClass = this.layout === 'lightning' ? 'slds-grid slds-wrap' : 'nds-grid nds-wrap';
+
+ try {
+ console.log("MyCustomComponent - this:", this);
+ console.log("MyCustomComponent - this.omniScriptHeaderDef:", JSON.parse(JSON.stringify(this.omniScriptHeaderDef)));
+ console.log("MyCustomComponent - this.omniResume:", JSON.parse(JSON.stringify(this.omniResume)));
+ console.log("MyCustomComponent - this.omniSeedJson:", JSON.parse(JSON.stringify(this.omniSeedJson)));
+ console.log("MyCustomComponent - this.omniJsonDef:", JSON.parse(JSON.stringify(this.omniJsonDef)));
+ console.log("MyCustomComponent - this.omniJsonData:", JSON.parse(JSON.stringify(this.omniJsonData)));
+ // console.log("MyCustomComponent - this.omniLayout:", JSON.parse(JSON.stringify(this.omniLayout)));
+ } catch (e) {
+ console.debug("Error Parsing: ", e);
+
+ }
}
handleBlur(evt) {