Skip to content

Commit 6ea40aa

Browse files
Try single commit
1 parent c32bc41 commit 6ea40aa

1 file changed

Lines changed: 151 additions & 119 deletions

File tree

addon/popup.js

Lines changed: 151 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -4057,6 +4057,8 @@ class AllDataSelection extends React.PureComponent {
40574057
eventMonitorHref,
40584058
} = this.props;
40594059
let {flowDefinitionId} = this.state;
4060+
const actionWrapperClass = "slds-col slds-size_1-of-1 slds-p-horizontal_xx-small slds-m-bottom_xx-small";
4061+
const actionControlClass = "page-button slds-button slds-button_neutral";
40604062
// Show buttons for the available APIs.
40614063
let buttons = selectedValue.sobject.availableApis
40624064
? Array.from(selectedValue.sobject.availableApis)
@@ -4264,128 +4266,158 @@ class AllDataSelection extends React.PureComponent {
42644266
linkTarget,
42654267
})
42664268
),
4267-
selectedValue.recordId && selectedValue.recordId.startsWith("0Af")
4268-
? h(
4269-
"a",
4270-
{
4271-
href: this.getDeployStatusUrl(),
4272-
target: linkTarget,
4273-
className:
4274-
"button page-button slds-button slds-button_neutral slds-m-top_xx-small",
4275-
},
4276-
"Check Deploy Status"
4277-
)
4278-
: null,
4279-
selectedValue.recordId && selectedValue.recordId.startsWith("0Af")
4280-
? h(
4281-
"a",
4282-
{
4283-
href: this.getGeneratePackageUrl(),
4284-
target: linkTarget,
4285-
className:
4286-
"button page-button slds-button slds-button_neutral slds-m-top_xx-small",
4287-
},
4288-
"Generate package.xml"
4289-
)
4290-
: null,
4291-
flowDefinitionId
4292-
? h(
4293-
"a",
4294-
{
4295-
href: this.redirectToFlowVersions(),
4296-
target: linkTarget,
4297-
className:
4298-
"button page-button slds-button slds-button_neutral slds-m-top_xx-small slds-m-bottom_xx-small",
4299-
},
4300-
"Flow Versions"
4301-
)
4302-
: null,
4303-
flowDefinitionId
4304-
? h(
4305-
"a",
4306-
{
4307-
href: this.getFlowScannerUrl(),
4308-
target: linkTarget,
4309-
className:
4310-
"button page-button slds-button slds-button_neutral slds-m-top_xx-small slds-m-bottom_xx-small",
4311-
},
4312-
"Flow Scanner"
4313-
)
4314-
: null,
4315-
flowDefinitionId
4316-
? h(
4317-
"a",
4318-
{
4319-
href: this.getFlowCompareUrl(),
4320-
target: linkTarget,
4321-
className:
4322-
"button page-button slds-button slds-button_neutral slds-m-top_xx-small slds-m-bottom_xx-small",
4323-
},
4324-
"Flow Compare"
4325-
)
4326-
: null,
43274269
h(
4328-
"div", {},
4329-
buttons.map((button, index) =>
4330-
h(
4331-
"a",
4332-
{
4333-
key: button,
4334-
// If buttons for both APIs are shown, the keyboard shortcut should open the first button.
4335-
ref: index == 0 ? "showAllDataBtn" : null,
4336-
href: this.getAllDataUrl(button == "toolingApi"),
4337-
target: linkTarget,
4338-
className:
4339-
"slds-button slds-button_neutral slds-m-top_xx-small page-button slds-button slds-button_neutral slds-m-top_xx-small",
4340-
},
4341-
index == 0
4342-
? h("span", {}, "Show ", h("u", {}, "a"), "ll data")
4343-
: "Show all data",
4344-
button == "regularApi"
4345-
? ""
4346-
: button == "toolingApi"
4347-
? " (Tooling API)"
4348-
: " (Not readable)"
4270+
"div",
4271+
{className: "sfir-all-data-actions"},
4272+
selectedValue.recordId && selectedValue.recordId.startsWith("0Af")
4273+
? h(
4274+
"div",
4275+
{className: actionWrapperClass},
4276+
h(
4277+
"a",
4278+
{
4279+
href: this.getDeployStatusUrl(),
4280+
target: linkTarget,
4281+
className: actionControlClass,
4282+
},
4283+
"Check Deploy Status"
4284+
)
43494285
)
4350-
)
4351-
),
4352-
isFieldsPresent
4353-
? h(
4354-
"button",
4355-
{
4356-
ref: "showFieldApiNameBtn",
4357-
onClick: showApiName,
4358-
"data-target-link": linkTarget,
4359-
className:
4360-
"slds-button slds-button_neutral slds-m-top_xx-small page-button slds-button slds-button_neutral slds-m-top_xx-small",
4361-
},
4362-
h("span", {}, "Show ", h("u", {}, "f"), "ields API names")
4363-
)
4364-
: null,
4365-
selectedValue.sobject.name.endsWith("__e")
4366-
? h(
4367-
"div",
4368-
{className: "slds-button-group slds-m-top_xx-small", role: "group"},
4369-
h(
4370-
"a",
4371-
{
4372-
href: this.getSubscribeUrl(selectedValue.sobject.name),
4373-
target: linkTarget,
4374-
className: "slds-button slds-button_neutral page-button",
4375-
},
4376-
h("span", {}, h("u", {}), "Subscribe Event")
4377-
),
4378-
h(
4379-
"a",
4380-
{
4381-
href: this.getGenerateEventUrl(selectedValue.sobject.name),
4382-
target: linkTarget,
4383-
className: "slds-button slds-button_neutral page-button",
4384-
},
4385-
h("span", {}, "Generate Event")
4286+
: null,
4287+
selectedValue.recordId && selectedValue.recordId.startsWith("0Af")
4288+
? h(
4289+
"div",
4290+
{className: actionWrapperClass},
4291+
h(
4292+
"a",
4293+
{
4294+
href: this.getGeneratePackageUrl(),
4295+
target: linkTarget,
4296+
className: actionControlClass,
4297+
},
4298+
"Generate package.xml"
4299+
)
43864300
)
4387-
)
4388-
: null
4301+
: null,
4302+
flowDefinitionId
4303+
? h(
4304+
"div",
4305+
{className: actionWrapperClass},
4306+
h(
4307+
"a",
4308+
{
4309+
href: this.redirectToFlowVersions(),
4310+
target: linkTarget,
4311+
className: actionControlClass,
4312+
},
4313+
"Flow Versions"
4314+
)
4315+
)
4316+
: null,
4317+
flowDefinitionId
4318+
? h(
4319+
"div",
4320+
{className: actionWrapperClass},
4321+
h(
4322+
"a",
4323+
{
4324+
href: this.getFlowScannerUrl(),
4325+
target: linkTarget,
4326+
className: actionControlClass,
4327+
},
4328+
"Flow Scanner"
4329+
)
4330+
)
4331+
: null,
4332+
flowDefinitionId
4333+
? h(
4334+
"div",
4335+
{className: actionWrapperClass},
4336+
h(
4337+
"a",
4338+
{
4339+
href: this.getFlowCompareUrl(),
4340+
target: linkTarget,
4341+
className: actionControlClass,
4342+
},
4343+
"Flow Compare"
4344+
)
4345+
)
4346+
: null,
4347+
h(
4348+
"div", {},
4349+
buttons.map((button, index) =>
4350+
h(
4351+
"div",
4352+
{className: actionWrapperClass, key: button},
4353+
h(
4354+
"a",
4355+
{
4356+
// If buttons for both APIs are shown, the keyboard shortcut should open the first button.
4357+
...(index == 0 ? {ref: "showAllDataBtn"} : {}),
4358+
href: this.getAllDataUrl(button == "toolingApi"),
4359+
target: linkTarget,
4360+
className: actionControlClass,
4361+
},
4362+
index == 0
4363+
? h("span", {}, "Show ", h("u", {}, "a"), "ll data")
4364+
: "Show all data",
4365+
button == "regularApi"
4366+
? ""
4367+
: button == "toolingApi"
4368+
? " (Tooling API)"
4369+
: " (Not readable)"
4370+
)
4371+
)
4372+
)
4373+
),
4374+
isFieldsPresent
4375+
? h(
4376+
"div",
4377+
{className: actionWrapperClass},
4378+
h(
4379+
"button",
4380+
{
4381+
ref: "showFieldApiNameBtn",
4382+
onClick: showApiName,
4383+
"data-target-link": linkTarget,
4384+
className: actionControlClass,
4385+
},
4386+
h("span", {}, "Show ", h("u", {}, "f"), "ields API names")
4387+
)
4388+
)
4389+
: null,
4390+
selectedValue.sobject.name.endsWith("__e")
4391+
? h(
4392+
"div",
4393+
{className: actionWrapperClass},
4394+
h(
4395+
"a",
4396+
{
4397+
href: this.getSubscribeUrl(selectedValue.sobject.name),
4398+
target: linkTarget,
4399+
className: actionControlClass,
4400+
},
4401+
h("span", {}, h("u", {}), "Subscribe Event")
4402+
)
4403+
)
4404+
: null,
4405+
selectedValue.sobject.name.endsWith("__e")
4406+
? h(
4407+
"div",
4408+
{className: actionWrapperClass},
4409+
h(
4410+
"a",
4411+
{
4412+
href: this.getGenerateEventUrl(selectedValue.sobject.name),
4413+
target: linkTarget,
4414+
className: actionControlClass,
4415+
},
4416+
h("span", {}, "Generate Event")
4417+
)
4418+
)
4419+
: null
4420+
)
43894421
);
43904422
}
43914423
}

0 commit comments

Comments
 (0)