diff --git a/README.org b/README.org
index 79a5a20..43a5e2a 100644
--- a/README.org
+++ b/README.org
@@ -3,24 +3,39 @@
My own local collection of (mostly) working examples of Vlocity LWCs.
-** List
-*** NEEDCLARIFICATION Step Example - baseStepNavigationComponent [[dired:./force-app/main/default/lwc/baseStepNavigationComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/baseStepNavigationComponent][gh]]
+* Contributing
+When creating a new component, use this naming convention:
+
+The name is 3 parts.
+ - First, prefix with =base=, =omni= or =lightning=
+ - Second, describe the type of component (i.e. "file input", "text", "checkbox", etc...)
+ - Then append =Component=
+
+Examples:
+ - =baseCheckboxComponent=
+ - =omniStepComponent=
+ - =omniTextComponent=
+ - =lightningFileInputComponent=
+
+
+
+* Current List
+Updated Regularly
+*** PROVIDEUPDATE Step Example - baseStepNavigationComponent [[dired:./force-app/main/default/lwc/baseStepNavigationComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/baseStepNavigationComponent][gh]]
Need to get info on how to get =stepIndex= for the =dispatchOmniEvent= to work
-*** NEEDCLARIFICATION Checkbox Example - baseCheckboxComponent [[dired:./force-app/main/default/lwc/baseCheckboxComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/baseCheckboxComponent][gh]]
-Not able to get the value of the checkbox
-*** NEEDCLARIFICATION Checkbox Example - omniCheckboxComponent [[dired:./force-app/main/default/lwc/omniCheckboxComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/omniCheckboxComponent][gh]]
-Not able to get the value of the checkbox
+ - WORKAROUND found =this.jsonDef.indexInParent=
*** NEEDCLARIFICATION File Upload - baseFileInputComponent [[dired:force-app/main/default/lwc/baseFileInputComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/baseFileInputComponent][gh]]
Not able to see the files on the input
-*** NEEDCLARIFICATION CSS Styling Example - textBlockHeader [[dired:~/Projects/vlocity/devr6/force-app/main/default/lwc/textBlock][link]] ap
+*** NEEDCLARIFICATION CSS Styling Example - textBlockHeader [[dired:~/Projects/vlocity/devr6/force-app/main/default/lwc/textBlockHeader/][link]] ap
Need to add styles to parent, so this isn't an effective solution
/Maybe explore adding just the class (and the rest styled via Newport)/
*** WAITING Typeahead Example - baseTypeaheadComponent [[dired:./force-app/main/default/lwc/baseTypeaheadComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/baseTypeaheadComponent][gh]]
Waiting on example from Sidd
*** DONE Accordion Example - baseAccordionComponent [[dired:./force-app/main/default/lwc/baseAccordionComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/baseAccordionComponent][gh]]
CLOSED: [2020-02-29 Sat 17:59]
+*** DONE Checkbox Example - omniCheckboxComponent [[dired:./force-app/main/default/lwc/omniCheckboxComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/omniCheckboxComponent][gh]]
+CLOSED: [2020-03-01 Sun 17:30]
*** DONE Text Example - omniTextComponent [[dired:./force-app/main/default/lwc/omniTextComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/omniTextComponent][gh]]
CLOSED: [2020-02-29 Sat 18:03]
*** DONE Vlocity Action Example - baseActionComponent [[dired:./force-app/main/default/lwc/baseActionComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/baseActionComponent][gh]]
CLOSED: [2020-02-29 Sat 18:03]
-
diff --git a/force-app/main/default/lwc/baseCheckboxComponent/baseCheckboxComponent.html b/force-app/main/default/lwc/baseCheckboxComponent/baseCheckboxComponent.html
deleted file mode 100644
index b8fc252..0000000
--- a/force-app/main/default/lwc/baseCheckboxComponent/baseCheckboxComponent.html
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/force-app/main/default/lwc/baseCheckboxComponent/baseCheckboxComponent.js b/force-app/main/default/lwc/baseCheckboxComponent/baseCheckboxComponent.js
deleted file mode 100644
index e8ffc3f..0000000
--- a/force-app/main/default/lwc/baseCheckboxComponent/baseCheckboxComponent.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import { LightningElement, track } from "lwc";
-import template from "./baseCheckboxComponent.html"
-import { OmniscriptBaseMixin } from 'vlocity_cmt/omniscriptBaseMixin';
-
-export default class BaseCheckboxComponent extends OmniscriptBaseMixin(LightningElement){
-
- connectedCallback() {
- // this.layout = this.getAttribute('data-omni-layout'); // returns lightning or newport
- console.debug("BaseCheckboxComponent - connected");
- }
-
- render() {
- return template;
- }
-}
diff --git a/force-app/main/default/lwc/baseCheckboxComponent/baseCheckboxComponent.js-meta.xml b/force-app/main/default/lwc/baseCheckboxComponent/baseCheckboxComponent.js-meta.xml
deleted file mode 100644
index 7112802..0000000
--- a/force-app/main/default/lwc/baseCheckboxComponent/baseCheckboxComponent.js-meta.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
- 46.0
- true
- vlocity_cmt
-
diff --git a/force-app/main/default/lwc/baseStepNavigationComponent/baseStepNavigationComponent.js b/force-app/main/default/lwc/baseStepNavigationComponent/baseStepNavigationComponent.js
index 3da1d3b..236495e 100644
--- a/force-app/main/default/lwc/baseStepNavigationComponent/baseStepNavigationComponent.js
+++ b/force-app/main/default/lwc/baseStepNavigationComponent/baseStepNavigationComponent.js
@@ -1,10 +1,10 @@
import { LightningElement } from 'lwc';
import template from './baseStepNavigationComponent.html'
import omniscriptStep from 'vlocity_cmt/omniscriptStep';
-import { OmniscriptBaseMixin } from 'vlocity_cmt/omniscriptBaseMixin';
+// import { OmniscriptBaseMixin } from 'vlocity_cmt/omniscriptBaseMixin';
import { dispatchOmniEvent } from 'vlocity_cmt/omniscriptUtils';
-export default class BaseStepNavigationComponent extends OmniscriptBaseMixin(omniscriptStep) {
+export default class BaseStepNavigationComponent extends omniscriptStep {
connectedCallback() {
console.debug("BaseStepNavigationComponent - connected");
@@ -15,8 +15,14 @@ export default class BaseStepNavigationComponent extends OmniscriptBaseMixin(omn
}
gotoPrev() {
- console.debug('gotoPrev stepIndex', this.stepIndex);
- dispatchOmniEvent(this, { moveToStep: this.stepIndex - 1 }, 'omniautoadvance');
+ try {
+ let jsDef = JSON.parse(JSON.stringify(this.jsonDef));
+ let idx = jsDef.indexInParent;
+ // console.debug('gotoPrev stepIndex', idx);
+ dispatchOmniEvent(this, { moveToStep: idx - 1 }, 'omniautoadvance');
+ } catch (e) {
+ console.debug("Could not parse jsonDef to get previous step index!", e);
+ }
}
render() {
diff --git a/force-app/main/default/lwc/jsconfig.json b/force-app/main/default/lwc/jsconfig.json
index 51f51cf..75da6ae 100644
--- a/force-app/main/default/lwc/jsconfig.json
+++ b/force-app/main/default/lwc/jsconfig.json
@@ -9,9 +9,6 @@
"c/baseActionComponent": [
"baseActionComponent/baseActionComponent.js"
],
- "c/baseCheckboxComponent": [
- "baseCheckboxComponent/baseCheckboxComponent.js"
- ],
"c/baseCssComponent": [
"baseCssComponent/baseCssComponent.js"
],
diff --git a/force-app/main/default/lwc/omniCheckboxComponent/omniCheckboxComponent.js b/force-app/main/default/lwc/omniCheckboxComponent/omniCheckboxComponent.js
index d761814..bc78a58 100644
--- a/force-app/main/default/lwc/omniCheckboxComponent/omniCheckboxComponent.js
+++ b/force-app/main/default/lwc/omniCheckboxComponent/omniCheckboxComponent.js
@@ -1,15 +1,13 @@
import { LightningElement } from "lwc";
-import OmniscriptCheckbox from "vlocity_cmt/omniscriptCheckbox";
+import omniscriptCheckbox from "vlocity_cmt/omniscriptCheckbox";
-export default class OmniCheckboxComponent extends OmniscriptCheckbox {
+export default class OmniCheckboxComponent extends omniscriptCheckbox {
connectedCallback() {
console.debug("OmniCheckboxComponent - connected");
- this.omniApplyCallResp({'checkbox':false});
}
handleChange(evt) {
console.debug("hangleChange: ", evt);
}
-
}