@aglyn/plugins-workflows 1.0.0-beta.246 → 1.0.0-beta.249
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.
- package/package.json +12 -12
- package/src/lib/components/automation-step-fields.component.d.ts +6 -1
- package/src/lib/components/automation-step-fields.component.js +34 -49
- package/src/lib/components/automation-step-fields.component.js.map +1 -1
- package/src/lib/components/element-picker-dialog.component.d.ts +39 -0
- package/src/lib/components/element-picker-dialog.component.js +185 -0
- package/src/lib/components/element-picker-dialog.component.js.map +1 -0
- package/src/lib/components/element-selector-field.component.d.ts +41 -0
- package/src/lib/components/element-selector-field.component.js +126 -0
- package/src/lib/components/element-selector-field.component.js.map +1 -0
- package/src/lib/components/host-actions-card.component.js +11 -11
- package/src/lib/components/host-actions-card.component.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aglyn/plugins-workflows",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.249",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"homepage": "https://aglyn.com",
|
|
6
6
|
"repository": {
|
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
"./package.json": "./package.json"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aglyn/aglyn": "1.0.0-beta.
|
|
29
|
-
"@aglyn/shared-data-mdi": "1.0.0-beta.
|
|
30
|
-
"@aglyn/shared-ui-jsx": "1.0.0-beta.
|
|
31
|
-
"@aglyn/shared-ui-next": "1.0.0-beta.
|
|
32
|
-
"@aglyn/shared-ui-snackstack": "1.0.0-beta.
|
|
33
|
-
"@aglyn/shared-util-email": "1.0.0-beta.
|
|
34
|
-
"@aglyn/shared-util-http": "1.0.0-beta.
|
|
35
|
-
"@aglyn/shared-util-timestamp": "1.0.0-beta.
|
|
36
|
-
"@aglyn/tenant-data-admin": "1.0.0-beta.
|
|
37
|
-
"@aglyn/tenant-feature-instance": "1.0.0-beta.
|
|
38
|
-
"@aglyn/tenant-runtime": "1.0.0-beta.
|
|
28
|
+
"@aglyn/aglyn": "1.0.0-beta.249",
|
|
29
|
+
"@aglyn/shared-data-mdi": "1.0.0-beta.249",
|
|
30
|
+
"@aglyn/shared-ui-jsx": "1.0.0-beta.249",
|
|
31
|
+
"@aglyn/shared-ui-next": "1.0.0-beta.249",
|
|
32
|
+
"@aglyn/shared-ui-snackstack": "1.0.0-beta.249",
|
|
33
|
+
"@aglyn/shared-util-email": "1.0.0-beta.249",
|
|
34
|
+
"@aglyn/shared-util-http": "1.0.0-beta.249",
|
|
35
|
+
"@aglyn/shared-util-timestamp": "1.0.0-beta.249",
|
|
36
|
+
"@aglyn/tenant-data-admin": "1.0.0-beta.249",
|
|
37
|
+
"@aglyn/tenant-feature-instance": "1.0.0-beta.249",
|
|
38
|
+
"@aglyn/tenant-runtime": "1.0.0-beta.249",
|
|
39
39
|
"@swc/helpers": "0.5.23"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
@@ -61,6 +61,11 @@ export interface AutomationStepFieldsProps {
|
|
|
61
61
|
event: string | null | undefined;
|
|
62
62
|
afterWait: boolean;
|
|
63
63
|
};
|
|
64
|
+
/**
|
|
65
|
+
* The site an element step's "Pick element" opens (AGL-3758). Absent, an
|
|
66
|
+
* element step takes a custom selector only.
|
|
67
|
+
*/
|
|
68
|
+
siteHostId?: string;
|
|
64
69
|
}
|
|
65
70
|
/**
|
|
66
71
|
* What the email step says about its merge tags (AGL-3458): both spellings
|
|
@@ -71,4 +76,4 @@ export declare const SEND_EMAIL_MERGE_HELP: string;
|
|
|
71
76
|
* One step's row: its number, what it does, the fields that kind takes, and
|
|
72
77
|
* the condition that gates it.
|
|
73
78
|
*/
|
|
74
|
-
export declare function AutomationStepFields({ step, index, kind, kinds, stepForKind, pickers, onSteps, fields, replyContext, }: AutomationStepFieldsProps): import("react").JSX.Element;
|
|
79
|
+
export declare function AutomationStepFields({ step, index, kind, kinds, stepForKind, pickers, onSteps, fields, replyContext, siteHostId, }: AutomationStepFieldsProps): import("react").JSX.Element;
|
|
@@ -34,6 +34,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
34
34
|
import { FormControlLabel, FormHelperText, IconButton, MenuItem, Stack, Switch, TextField, Typography } from "@mui/material";
|
|
35
35
|
import { SEND_EMAIL_REPLY_INELIGIBLE_REASONS, sendEmailIsTransactionalReply, sendEmailReplyIneligibility } from "../model/host-actions.js";
|
|
36
36
|
import { draftPlaceholderIn } from "@aglyn/aglyn/app-utils/draft-placeholders";
|
|
37
|
+
import { ElementSelectorField } from "./element-selector-field.component.js";
|
|
37
38
|
/** A task's priorities, by meaning, as the create-task step offers them (AGL-3517). */ const TASK_PRIORITY_OPTIONS = [
|
|
38
39
|
{
|
|
39
40
|
value: 'high',
|
|
@@ -382,7 +383,7 @@ export function defaultStep(type) {
|
|
|
382
383
|
/**
|
|
383
384
|
* One step's row: its number, what it does, the fields that kind takes, and
|
|
384
385
|
* the condition that gates it.
|
|
385
|
-
*/ export function AutomationStepFields({ step, index, kind, kinds, stepForKind, pickers, onSteps, fields, replyContext }) {
|
|
386
|
+
*/ export function AutomationStepFields({ step, index, kind, kinds, stepForKind, pickers, onSteps, fields, replyContext, siteHostId }) {
|
|
386
387
|
var _ref, _step_workflowId, _step_severity, _ref1, _step_webhookId, _ref2, _step_datasetId, _step_overlayId, _step_selector, _step_selector1, _step_className, _step_selector2, _step_selector3, _step_offsetPx, _step_selector4, _step_name, _step_value, _step_drawerNodeId, _step_menuNodeId, _step_html, _step_code, _step_url, _step_eventName, _step_subject, _step_body, _step_title, _step_listId, _step_campaignId, _step_lifecycleStage, _step_tag, _step_title1, _step_kind, _step_priority, _step_dueInDays, _step_kind1, _step_direction, _CRM_ACTIVITY_DIRECTIONS_step_kind, _step_body1, _step_eventName1, _step_timeoutMinutes, _step_delayMinutes, _ref3, _step_when_conditions__field, _step_when_conditions__value;
|
|
387
388
|
var _workflowOptions_find, _webhookOptions_find, _datasetOptions_find, _CRM_ACTIVITY_DIRECTIONS_step_kind1, _step_when_conditions_, _step_when_conditions, _step_when, _step_when_conditions_1, _step_when_conditions1, _step_when1, _step_when_conditions_2, _step_when_conditions2, _step_when2, _step_when_conditions_3, _step_when_conditions3, _step_when3;
|
|
388
389
|
const { workflowOptions, datasetOptions, overlayOptions, listOptions, campaignOptions, webhookOptions } = pickers;
|
|
@@ -568,32 +569,27 @@ export function defaultStep(type) {
|
|
|
568
569
|
value: option.id,
|
|
569
570
|
children: option.name
|
|
570
571
|
}, option.id))
|
|
571
|
-
}) : step.type === 'stickyNav' ? /*#__PURE__*/ _jsx(
|
|
572
|
-
label: "
|
|
572
|
+
}) : step.type === 'stickyNav' ? /*#__PURE__*/ _jsx(ElementSelectorField, {
|
|
573
|
+
label: "Bar",
|
|
574
|
+
emptyLabel: "Header or nav",
|
|
575
|
+
hostId: siteHostId,
|
|
573
576
|
value: (_step_selector = step.selector) != null ? _step_selector : '',
|
|
574
|
-
onChange: (
|
|
577
|
+
onChange: (selector)=>patch((previous)=>_extends({}, previous, {
|
|
575
578
|
steps: previous.steps.map((s, index2)=>index2 === index ? _extends({}, s, {
|
|
576
|
-
selector
|
|
579
|
+
selector
|
|
577
580
|
}) : s)
|
|
578
|
-
}))
|
|
579
|
-
size: "small",
|
|
580
|
-
sx: {
|
|
581
|
-
flex: 1
|
|
582
|
-
}
|
|
581
|
+
}))
|
|
583
582
|
}) : step.type === 'addClass' || step.type === 'removeClass' || step.type === 'toggleClass' ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
584
583
|
children: [
|
|
585
|
-
/*#__PURE__*/ _jsx(
|
|
586
|
-
label: "
|
|
584
|
+
/*#__PURE__*/ _jsx(ElementSelectorField, {
|
|
585
|
+
label: "Element",
|
|
586
|
+
hostId: siteHostId,
|
|
587
587
|
value: (_step_selector1 = step.selector) != null ? _step_selector1 : '',
|
|
588
|
-
onChange: (
|
|
588
|
+
onChange: (selector)=>patch((previous)=>_extends({}, previous, {
|
|
589
589
|
steps: previous.steps.map((s, index2)=>index2 === index ? _extends({}, s, {
|
|
590
|
-
selector
|
|
590
|
+
selector
|
|
591
591
|
}) : s)
|
|
592
|
-
}))
|
|
593
|
-
size: "small",
|
|
594
|
-
sx: {
|
|
595
|
-
flex: 1
|
|
596
|
-
}
|
|
592
|
+
}))
|
|
597
593
|
}),
|
|
598
594
|
/*#__PURE__*/ _jsx(TextField, {
|
|
599
595
|
label: "Class name",
|
|
@@ -610,39 +606,31 @@ export function defaultStep(type) {
|
|
|
610
606
|
})
|
|
611
607
|
]
|
|
612
608
|
}) : step.type === 'showElement' || step.type === 'hideElement' || step.type === 'toggleElement' || step.type === 'playVideo' ? // Element choreography (AGL-562) and Play a video
|
|
613
|
-
// (AGL-2867)
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
label: "CSS selector",
|
|
609
|
+
// (AGL-2867), picked on the live page (AGL-3758).
|
|
610
|
+
/*#__PURE__*/ _jsx(ElementSelectorField, {
|
|
611
|
+
label: "Element",
|
|
612
|
+
hostId: siteHostId,
|
|
618
613
|
placeholder: '[data-aglyn="leaf:…"] or .my-class',
|
|
619
614
|
value: (_step_selector2 = step.selector) != null ? _step_selector2 : '',
|
|
620
|
-
onChange: (
|
|
615
|
+
onChange: (selector)=>patch((previous)=>_extends({}, previous, {
|
|
621
616
|
steps: previous.steps.map((s, index2)=>index2 === index ? _extends({}, s, {
|
|
622
|
-
selector
|
|
617
|
+
selector
|
|
623
618
|
}) : s)
|
|
624
|
-
}))
|
|
625
|
-
size: "small",
|
|
626
|
-
sx: {
|
|
627
|
-
flex: 1
|
|
628
|
-
}
|
|
619
|
+
}))
|
|
629
620
|
}) : step.type === 'scrollTo' ? // Scroll to element (AGL-2867): the target, how the page
|
|
630
621
|
// moves, and the room left above it for a sticky header.
|
|
631
622
|
/*#__PURE__*/ _jsxs(_Fragment, {
|
|
632
623
|
children: [
|
|
633
|
-
/*#__PURE__*/ _jsx(
|
|
634
|
-
label: "
|
|
624
|
+
/*#__PURE__*/ _jsx(ElementSelectorField, {
|
|
625
|
+
label: "Element",
|
|
626
|
+
hostId: siteHostId,
|
|
635
627
|
placeholder: '[data-aglyn="leaf:…"] or .my-class',
|
|
636
628
|
value: (_step_selector3 = step.selector) != null ? _step_selector3 : '',
|
|
637
|
-
onChange: (
|
|
629
|
+
onChange: (selector)=>patch((previous)=>_extends({}, previous, {
|
|
638
630
|
steps: previous.steps.map((s, index2)=>index2 === index ? _extends({}, s, {
|
|
639
|
-
selector
|
|
631
|
+
selector
|
|
640
632
|
}) : s)
|
|
641
|
-
}))
|
|
642
|
-
size: "small",
|
|
643
|
-
sx: {
|
|
644
|
-
flex: 1
|
|
645
|
-
}
|
|
633
|
+
}))
|
|
646
634
|
}),
|
|
647
635
|
/*#__PURE__*/ _jsxs(TextField, {
|
|
648
636
|
select: true,
|
|
@@ -688,19 +676,16 @@ export function defaultStep(type) {
|
|
|
688
676
|
// it holds any other, as the interaction builder's does.
|
|
689
677
|
/*#__PURE__*/ _jsxs(_Fragment, {
|
|
690
678
|
children: [
|
|
691
|
-
/*#__PURE__*/ _jsx(
|
|
692
|
-
label: "
|
|
679
|
+
/*#__PURE__*/ _jsx(ElementSelectorField, {
|
|
680
|
+
label: "Element",
|
|
681
|
+
hostId: siteHostId,
|
|
693
682
|
placeholder: '[data-aglyn="leaf:…"] or .my-class',
|
|
694
683
|
value: (_step_selector4 = step.selector) != null ? _step_selector4 : '',
|
|
695
|
-
onChange: (
|
|
684
|
+
onChange: (selector)=>patch((previous)=>_extends({}, previous, {
|
|
696
685
|
steps: previous.steps.map((s, index2)=>index2 === index ? _extends({}, s, {
|
|
697
|
-
selector
|
|
686
|
+
selector
|
|
698
687
|
}) : s)
|
|
699
|
-
}))
|
|
700
|
-
size: "small",
|
|
701
|
-
sx: {
|
|
702
|
-
flex: 1
|
|
703
|
-
}
|
|
688
|
+
}))
|
|
704
689
|
}),
|
|
705
690
|
/*#__PURE__*/ _jsx(TextField, {
|
|
706
691
|
label: "Attribute",
|