-
Notifications
You must be signed in to change notification settings - Fork 463
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Interim commit to flip to another branch * more tweaks towards progress * Laid groundwork for data mapping side, and finished hiding sync preferences options * Changed sync_pref_field_visibility to hidden_sync_pref_fields * Typo on equality check.
- Loading branch information
Showing
9 changed files
with
239 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
sfdx/force-app/main/default/lwc/syncPreferencesItem/syncPreferencesItem.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* Created by jmather-c on 3/24/23. | ||
*/ | ||
|
||
.stripe-settings__item { | ||
margin-top: var(--lwc-spacingXLarge, 2rem); | ||
} |
10 changes: 10 additions & 0 deletions
10
sfdx/force-app/main/default/lwc/syncPreferencesItem/syncPreferencesItem.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!-- | ||
- Created by jmather-c on 3/24/23. | ||
--> | ||
|
||
<!-- Sync Preferences Item --> | ||
<template> | ||
<div if:true={displayItem} class={className}> | ||
<slot></slot> | ||
</div> | ||
</template> |
35 changes: 35 additions & 0 deletions
35
sfdx/force-app/main/default/lwc/syncPreferencesItem/syncPreferencesItem.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* Created by jmather-c on 3/24/23. | ||
*/ | ||
|
||
import { LightningElement, api } from 'lwc'; | ||
|
||
export default class SyncPreferencesItem extends LightningElement { | ||
@api name; | ||
@api toggleFieldVisibilityList; | ||
|
||
// controls if the widget is hidden by default | ||
@api hidden = false; | ||
|
||
// not proud of this but needed a simple way to remove the added margin for the first item in 'Sync Filters' | ||
@api first = false; | ||
|
||
get displayItem() { | ||
// console.log('name', this.name); | ||
// console.log('toggleFieldVisibilityList', JSON.parse(JSON.stringify(this.toggleFieldVisibilityList))); | ||
const isInToggleList = this.toggleFieldVisibilityList.indexOf(this.name) !== -1; | ||
if (this.hidden) { | ||
// if it is not visible by default, then it must be in toggleFieldVisibilityList to be visible | ||
return isInToggleList; | ||
} else { | ||
// if it is visible by default, then it must not be in toggleFieldVisibilityList to still be visible | ||
return isInToggleList === false; | ||
} | ||
|
||
} | ||
|
||
get className() { | ||
const activeClass = this.first ? 'stripe-settings__item_first' : 'stripe-settings__item'; | ||
return this.displayItem ? activeClass : 'stripe-settings__item_disabled'; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
sfdx/force-app/main/default/lwc/syncPreferencesItem/syncPreferencesItem.js-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>54.0</apiVersion> | ||
<description>Sync Preferences Item</description> | ||
<isExposed>false</isExposed> | ||
<masterLabel>Sync Preferences Item</masterLabel> | ||
</LightningComponentBundle> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.