@aglyn/plugins-marketing 1.0.0-beta.143

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.
Files changed (183) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +7 -0
  3. package/package.json +56 -0
  4. package/src/index.d.ts +19 -0
  5. package/src/index.js +20 -0
  6. package/src/index.js.map +1 -0
  7. package/src/lib/components/announcement-bar-card.component.d.ts +20 -0
  8. package/src/lib/components/announcement-bar-card.component.js +292 -0
  9. package/src/lib/components/announcement-bar-card.component.js.map +1 -0
  10. package/src/lib/components/campaign-composer.d.ts +84 -0
  11. package/src/lib/components/campaign-composer.js +1643 -0
  12. package/src/lib/components/campaign-composer.js.map +1 -0
  13. package/src/lib/components/campaign-conversions-card.d.ts +22 -0
  14. package/src/lib/components/campaign-conversions-card.js +642 -0
  15. package/src/lib/components/campaign-conversions-card.js.map +1 -0
  16. package/src/lib/components/campaign-detail-card.d.ts +55 -0
  17. package/src/lib/components/campaign-detail-card.js +771 -0
  18. package/src/lib/components/campaign-detail-card.js.map +1 -0
  19. package/src/lib/components/campaign-edit-drawer.d.ts +60 -0
  20. package/src/lib/components/campaign-edit-drawer.js +252 -0
  21. package/src/lib/components/campaign-edit-drawer.js.map +1 -0
  22. package/src/lib/components/campaign-email-zones.d.ts +111 -0
  23. package/src/lib/components/campaign-email-zones.js +54 -0
  24. package/src/lib/components/campaign-email-zones.js.map +1 -0
  25. package/src/lib/components/campaign-glance-card.component.d.ts +18 -0
  26. package/src/lib/components/campaign-glance-card.component.js +151 -0
  27. package/src/lib/components/campaign-glance-card.component.js.map +1 -0
  28. package/src/lib/components/campaign-members-section.d.ts +87 -0
  29. package/src/lib/components/campaign-members-section.js +499 -0
  30. package/src/lib/components/campaign-members-section.js.map +1 -0
  31. package/src/lib/components/campaign-reach-sections.d.ts +137 -0
  32. package/src/lib/components/campaign-reach-sections.js +694 -0
  33. package/src/lib/components/campaign-reach-sections.js.map +1 -0
  34. package/src/lib/components/campaign-report-card.d.ts +91 -0
  35. package/src/lib/components/campaign-report-card.js +667 -0
  36. package/src/lib/components/campaign-report-card.js.map +1 -0
  37. package/src/lib/components/campaign-test-send-drawer.d.ts +45 -0
  38. package/src/lib/components/campaign-test-send-drawer.js +238 -0
  39. package/src/lib/components/campaign-test-send-drawer.js.map +1 -0
  40. package/src/lib/components/campaigns-card.d.ts +31 -0
  41. package/src/lib/components/campaigns-card.js +667 -0
  42. package/src/lib/components/campaigns-card.js.map +1 -0
  43. package/src/lib/components/conversion-attribution.component.d.ts +62 -0
  44. package/src/lib/components/conversion-attribution.component.js +127 -0
  45. package/src/lib/components/conversion-attribution.component.js.map +1 -0
  46. package/src/lib/components/email-compose-card.d.ts +12 -0
  47. package/src/lib/components/email-compose-card.js +157 -0
  48. package/src/lib/components/email-compose-card.js.map +1 -0
  49. package/src/lib/components/email-detail.d.ts +40 -0
  50. package/src/lib/components/email-detail.js +1180 -0
  51. package/src/lib/components/email-detail.js.map +1 -0
  52. package/src/lib/components/email-edit-drawer.d.ts +54 -0
  53. package/src/lib/components/email-edit-drawer.js +172 -0
  54. package/src/lib/components/email-edit-drawer.js.map +1 -0
  55. package/src/lib/components/email-messages-widget.d.ts +22 -0
  56. package/src/lib/components/email-messages-widget.js +49 -0
  57. package/src/lib/components/email-messages-widget.js.map +1 -0
  58. package/src/lib/components/email-recipients-card.d.ts +50 -0
  59. package/src/lib/components/email-recipients-card.js +338 -0
  60. package/src/lib/components/email-recipients-card.js.map +1 -0
  61. package/src/lib/components/emails-list-card.d.ts +36 -0
  62. package/src/lib/components/emails-list-card.js +544 -0
  63. package/src/lib/components/emails-list-card.js.map +1 -0
  64. package/src/lib/components/experiment-zones.d.ts +78 -0
  65. package/src/lib/components/experiment-zones.js +65 -0
  66. package/src/lib/components/experiment-zones.js.map +1 -0
  67. package/src/lib/components/host-experiments-card.component.d.ts +17 -0
  68. package/src/lib/components/host-experiments-card.component.js +887 -0
  69. package/src/lib/components/host-experiments-card.component.js.map +1 -0
  70. package/src/lib/components/host-marketing-summary-card.component.d.ts +15 -0
  71. package/src/lib/components/host-marketing-summary-card.component.js +161 -0
  72. package/src/lib/components/host-marketing-summary-card.component.js.map +1 -0
  73. package/src/lib/components/host-overlays-card.component.d.ts +19 -0
  74. package/src/lib/components/host-overlays-card.component.js +783 -0
  75. package/src/lib/components/host-overlays-card.component.js.map +1 -0
  76. package/src/lib/components/marketing-console-page.d.ts +28 -0
  77. package/src/lib/components/marketing-console-page.js +166 -0
  78. package/src/lib/components/marketing-console-page.js.map +1 -0
  79. package/src/lib/components/marketing-console-sections.d.ts +34 -0
  80. package/src/lib/components/marketing-console-sections.js +77 -0
  81. package/src/lib/components/marketing-console-sections.js.map +1 -0
  82. package/src/lib/components/overlay-stats-row.component.d.ts +15 -0
  83. package/src/lib/components/overlay-stats-row.component.js +78 -0
  84. package/src/lib/components/overlay-stats-row.component.js.map +1 -0
  85. package/src/lib/components/popup-card.component.d.ts +18 -0
  86. package/src/lib/components/popup-card.component.js +462 -0
  87. package/src/lib/components/popup-card.component.js.map +1 -0
  88. package/src/lib/components/record-attribution-widget.d.ts +35 -0
  89. package/src/lib/components/record-attribution-widget.js +33 -0
  90. package/src/lib/components/record-attribution-widget.js.map +1 -0
  91. package/src/lib/components/site-runtime.d.ts +9 -0
  92. package/src/lib/components/site-runtime.js +1081 -0
  93. package/src/lib/components/site-runtime.js.map +1 -0
  94. package/src/lib/components/use-campaign-send-api.d.ts +35 -0
  95. package/src/lib/components/use-campaign-send-api.js +99 -0
  96. package/src/lib/components/use-campaign-send-api.js.map +1 -0
  97. package/src/lib/components/use-campaign-topic-options.d.ts +20 -0
  98. package/src/lib/components/use-campaign-topic-options.js +44 -0
  99. package/src/lib/components/use-campaign-topic-options.js.map +1 -0
  100. package/src/lib/components/use-emails-hub-path.d.ts +39 -0
  101. package/src/lib/components/use-emails-hub-path.js +70 -0
  102. package/src/lib/components/use-emails-hub-path.js.map +1 -0
  103. package/src/lib/components/use-marketing-hub-path.d.ts +21 -0
  104. package/src/lib/components/use-marketing-hub-path.js +50 -0
  105. package/src/lib/components/use-marketing-hub-path.js.map +1 -0
  106. package/src/lib/components/use-overlay-copy-editor.d.ts +79 -0
  107. package/src/lib/components/use-overlay-copy-editor.js +110 -0
  108. package/src/lib/components/use-overlay-copy-editor.js.map +1 -0
  109. package/src/lib/constants/bundle-common.d.ts +8 -0
  110. package/src/lib/constants/bundle-common.js +9 -0
  111. package/src/lib/constants/bundle-common.js.map +1 -0
  112. package/src/lib/model/campaign-membership-figures.d.ts +109 -0
  113. package/src/lib/model/campaign-membership-figures.js +113 -0
  114. package/src/lib/model/campaign-membership-figures.js.map +1 -0
  115. package/src/lib/model/compile-client-automations.d.ts +65 -0
  116. package/src/lib/model/compile-client-automations.js +95 -0
  117. package/src/lib/model/compile-client-automations.js.map +1 -0
  118. package/src/lib/model/experiments.d.ts +130 -0
  119. package/src/lib/model/experiments.js +186 -0
  120. package/src/lib/model/experiments.js.map +1 -0
  121. package/src/lib/model/index.d.ts +26 -0
  122. package/src/lib/model/index.js +26 -0
  123. package/src/lib/model/index.js.map +1 -0
  124. package/src/lib/model/marketing-record-routes.d.ts +6 -0
  125. package/src/lib/model/marketing-record-routes.js +46 -0
  126. package/src/lib/model/marketing-record-routes.js.map +1 -0
  127. package/src/lib/model/overlay-copy.d.ts +62 -0
  128. package/src/lib/model/overlay-copy.js +78 -0
  129. package/src/lib/model/overlay-copy.js.map +1 -0
  130. package/src/lib/model/overlays.d.ts +113 -0
  131. package/src/lib/model/overlays.js +93 -0
  132. package/src/lib/model/overlays.js.map +1 -0
  133. package/src/lib/model/site-contract.d.ts +100 -0
  134. package/src/lib/model/site-contract.js +23 -0
  135. package/src/lib/model/site-contract.js.map +1 -0
  136. package/src/lib/plugin.d.ts +27 -0
  137. package/src/lib/plugin.js +168 -0
  138. package/src/lib/plugin.js.map +1 -0
  139. package/src/lib/preview-props.d.ts +31 -0
  140. package/src/lib/preview-props.js +54 -0
  141. package/src/lib/preview-props.js.map +1 -0
  142. package/src/lib/server/campaign-manage.d.ts +62 -0
  143. package/src/lib/server/campaign-manage.js +829 -0
  144. package/src/lib/server/campaign-manage.js.map +1 -0
  145. package/src/lib/server/campaign-process-scheduled.d.ts +26 -0
  146. package/src/lib/server/campaign-process-scheduled.js +198 -0
  147. package/src/lib/server/campaign-process-scheduled.js.map +1 -0
  148. package/src/lib/server/campaign-recipients.d.ts +55 -0
  149. package/src/lib/server/campaign-recipients.js +219 -0
  150. package/src/lib/server/campaign-recipients.js.map +1 -0
  151. package/src/lib/server/campaign-send.d.ts +487 -0
  152. package/src/lib/server/campaign-send.js +3157 -0
  153. package/src/lib/server/campaign-send.js.map +1 -0
  154. package/src/lib/server/email-campaign-reach.d.ts +174 -0
  155. package/src/lib/server/email-campaign-reach.js +254 -0
  156. package/src/lib/server/email-campaign-reach.js.map +1 -0
  157. package/src/lib/server/email-events.d.ts +27 -0
  158. package/src/lib/server/email-events.js +714 -0
  159. package/src/lib/server/email-events.js.map +1 -0
  160. package/src/lib/server/get-client-automations.d.ts +60 -0
  161. package/src/lib/server/get-client-automations.js +87 -0
  162. package/src/lib/server/get-client-automations.js.map +1 -0
  163. package/src/lib/server/get-overlays.d.ts +28 -0
  164. package/src/lib/server/get-overlays.js +65 -0
  165. package/src/lib/server/get-overlays.js.map +1 -0
  166. package/src/lib/server/get-screen-experiments.d.ts +42 -0
  167. package/src/lib/server/get-screen-experiments.js +82 -0
  168. package/src/lib/server/get-screen-experiments.js.map +1 -0
  169. package/src/lib/server/lists-materialize.d.ts +18 -0
  170. package/src/lib/server/lists-materialize.js +130 -0
  171. package/src/lib/server/lists-materialize.js.map +1 -0
  172. package/src/lib/server/marketing-figures.d.ts +37 -0
  173. package/src/lib/server/marketing-figures.js +248 -0
  174. package/src/lib/server/marketing-figures.js.map +1 -0
  175. package/src/lib/server/site-page-enricher.d.ts +26 -0
  176. package/src/lib/server/site-page-enricher.js +210 -0
  177. package/src/lib/server/site-page-enricher.js.map +1 -0
  178. package/src/lib/server.d.ts +20 -0
  179. package/src/lib/server.js +152 -0
  180. package/src/lib/server.js.map +1 -0
  181. package/src/lib/site.d.ts +22 -0
  182. package/src/lib/site.js +48 -0
  183. package/src/lib/site.js.map +1 -0
@@ -0,0 +1,78 @@
1
+ import type { ExperimentTarget, ExperimentVariant } from '../model/experiments';
2
+ /**
3
+ * The two zones the A/B testing card hosts (AGL-2914).
4
+ *
5
+ * A/B testing is this plugin's: the experiment document, its variants, the
6
+ * traffic split, the counters and the comparison. What it never had was
7
+ * anyone to help WRITE the variants or READ the result in words, and the
8
+ * plugin that could do both may not be imported here any more than this one
9
+ * may be imported there.
10
+ *
11
+ * So the card hosts two positions and says what each hands a widget. A
12
+ * widget is drawn by the console shell's own renderer, through the context it
13
+ * hands down, so every gate a console page's slot applies — the plugins this
14
+ * workspace has, the entitlement the widget declares, the permission its
15
+ * reader must hold — applies here unchanged. Outside the shell the context is
16
+ * `null` and a zone draws nothing, which is also what a workspace with no
17
+ * widget for the zone gets: the card renders exactly as it did before these
18
+ * positions existed.
19
+ *
20
+ * ## A widget proposes; this card writes
21
+ *
22
+ * {@link EXPERIMENT_VARIANTS_ZONE} hands a widget the experiment being
23
+ * edited and a `proposeVariants` callback. The callback fills the editor's
24
+ * OWN fields, unsaved, and the dialog's Save is the only write — the same
25
+ * guarded write a typed variant takes. Nothing a widget returns reaches
26
+ * Firestore, starts a test or moves a visitor.
27
+ *
28
+ * {@link EXPERIMENT_RESULT_ZONE} hands a widget the test whose results are
29
+ * open, by the name the results figures label it with, so a widget that
30
+ * explains a result is looking at the same test the reader is. It takes no
31
+ * callback: there is nothing to apply to an explanation.
32
+ */
33
+ /** One variant as the editor holds it, for a widget writing alternatives to it. */
34
+ export interface MarketingExperimentVariantDraft {
35
+ id: string;
36
+ name: string;
37
+ /** A screen or section variant's copy is its screen version, so it carries none here. */
38
+ subject: string;
39
+ body: string;
40
+ }
41
+ /** What {@link EXPERIMENT_VARIANTS_ZONE} hands each widget. */
42
+ export interface MarketingExperimentVariantsZoneProps {
43
+ hostId: string;
44
+ /** The experiment's id once it has been saved; empty while it is new. */
45
+ experimentId: string;
46
+ /** The experiment's name as the editor holds it. */
47
+ name: string;
48
+ target: ExperimentTarget;
49
+ /** The conversion event the test counts, as the goal names it. */
50
+ goal: string;
51
+ variants: MarketingExperimentVariantDraft[];
52
+ /**
53
+ * Fills the editor's variant fields with what a widget proposes, unsaved.
54
+ * `key` identifies the proposal so a widget can tell which of its own the
55
+ * editor is showing. Variants past the ones the editor holds are ignored:
56
+ * the editor's list is the test's shape and a widget does not change it.
57
+ */
58
+ proposeVariants: (variants: readonly MarketingExperimentVariantDraft[], key: string) => void;
59
+ }
60
+ /** What {@link EXPERIMENT_RESULT_ZONE} hands each widget. */
61
+ export interface MarketingExperimentResultZoneProps {
62
+ hostId: string;
63
+ experimentId: string;
64
+ /** The test's name as the results figures label it, which is how a reader names one. */
65
+ test: string;
66
+ }
67
+ export declare const EXPERIMENT_VARIANTS_ZONE: import("@aglyn/aglyn/plugin-manager/plugin-zones").PluginZone<MarketingExperimentVariantsZoneProps>;
68
+ export declare const EXPERIMENT_RESULT_ZONE: import("@aglyn/aglyn/plugin-manager/plugin-zones").PluginZone<MarketingExperimentResultZoneProps>;
69
+ export declare function ExperimentVariantsZone(props: MarketingExperimentVariantsZoneProps): import("react").JSX.Element;
70
+ export declare namespace ExperimentVariantsZone {
71
+ var displayName: string;
72
+ }
73
+ export declare function ExperimentResultZone(props: MarketingExperimentResultZoneProps): import("react").JSX.Element;
74
+ export declare namespace ExperimentResultZone {
75
+ var displayName: string;
76
+ }
77
+ /** The editor's variants as the zone hands them over. */
78
+ export declare function marketingExperimentVariantDrafts(variants: readonly ExperimentVariant[] | undefined): MarketingExperimentVariantDraft[];
@@ -0,0 +1,65 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ 'use client';
17
+ import { _ as _extends } from "@swc/helpers/_/_extends";
18
+ import { jsx as _jsx } from "react/jsx-runtime";
19
+ import { useConsoleWidgetSlot } from "@aglyn/aglyn/app-utils/console-widget-slot-context";
20
+ import { definePluginZone } from "@aglyn/aglyn/plugin-manager/plugin-zones";
21
+ export const EXPERIMENT_VARIANTS_ZONE = definePluginZone('experimentVariants');
22
+ export const EXPERIMENT_RESULT_ZONE = definePluginZone('experimentResult');
23
+ /**
24
+ * Draws a hosted zone through the shell's renderer, or nothing at all when
25
+ * there is no shell. One component for both zones: they differ only in the
26
+ * id they name and the props they carry, and a zone that drew a heading or a
27
+ * wrapper of its own would change the card for every workspace that has no
28
+ * widget for it.
29
+ */ function HostedZone(props) {
30
+ const { slot, zone, Slot } = props;
31
+ return /*#__PURE__*/ _jsx(Slot, _extends({
32
+ slot: slot
33
+ }, zone));
34
+ }
35
+ export function ExperimentVariantsZone(props) {
36
+ const Slot = useConsoleWidgetSlot();
37
+ return Slot ? /*#__PURE__*/ _jsx(HostedZone, {
38
+ slot: EXPERIMENT_VARIANTS_ZONE.id,
39
+ zone: _extends({}, props),
40
+ Slot: Slot
41
+ }) : null;
42
+ }
43
+ ExperimentVariantsZone.displayName = 'ExperimentVariantsZone';
44
+ export function ExperimentResultZone(props) {
45
+ const Slot = useConsoleWidgetSlot();
46
+ return Slot ? /*#__PURE__*/ _jsx(HostedZone, {
47
+ slot: EXPERIMENT_RESULT_ZONE.id,
48
+ zone: _extends({}, props),
49
+ Slot: Slot
50
+ }) : null;
51
+ }
52
+ ExperimentResultZone.displayName = 'ExperimentResultZone';
53
+ /** The editor's variants as the zone hands them over. */ export function marketingExperimentVariantDrafts(variants) {
54
+ return (variants != null ? variants : []).map((variant)=>{
55
+ var _variant_name, _variant_subject, _variant_body;
56
+ return {
57
+ id: variant.id,
58
+ name: (_variant_name = variant.name) != null ? _variant_name : '',
59
+ subject: (_variant_subject = variant.subject) != null ? _variant_subject : '',
60
+ body: (_variant_body = variant.body) != null ? _variant_body : ''
61
+ };
62
+ });
63
+ }
64
+
65
+ //# sourceMappingURL=experiment-zones.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/marketing/src/lib/components/experiment-zones.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use client'\n\nimport {\n type ConsoleWidgetSlotRenderer,\n useConsoleWidgetSlot,\n} from '@aglyn/aglyn/app-utils/console-widget-slot-context'\nimport { definePluginZone } from '@aglyn/aglyn/plugin-manager/plugin-zones'\nimport type { ExperimentTarget, ExperimentVariant } from '../model/experiments'\n\n/**\n * The two zones the A/B testing card hosts (AGL-2914).\n *\n * A/B testing is this plugin's: the experiment document, its variants, the\n * traffic split, the counters and the comparison. What it never had was\n * anyone to help WRITE the variants or READ the result in words, and the\n * plugin that could do both may not be imported here any more than this one\n * may be imported there.\n *\n * So the card hosts two positions and says what each hands a widget. A\n * widget is drawn by the console shell's own renderer, through the context it\n * hands down, so every gate a console page's slot applies — the plugins this\n * workspace has, the entitlement the widget declares, the permission its\n * reader must hold — applies here unchanged. Outside the shell the context is\n * `null` and a zone draws nothing, which is also what a workspace with no\n * widget for the zone gets: the card renders exactly as it did before these\n * positions existed.\n *\n * ## A widget proposes; this card writes\n *\n * {@link EXPERIMENT_VARIANTS_ZONE} hands a widget the experiment being\n * edited and a `proposeVariants` callback. The callback fills the editor's\n * OWN fields, unsaved, and the dialog's Save is the only write — the same\n * guarded write a typed variant takes. Nothing a widget returns reaches\n * Firestore, starts a test or moves a visitor.\n *\n * {@link EXPERIMENT_RESULT_ZONE} hands a widget the test whose results are\n * open, by the name the results figures label it with, so a widget that\n * explains a result is looking at the same test the reader is. It takes no\n * callback: there is nothing to apply to an explanation.\n */\n\n/** One variant as the editor holds it, for a widget writing alternatives to it. */\nexport interface MarketingExperimentVariantDraft {\n id: string\n name: string\n /** A screen or section variant's copy is its screen version, so it carries none here. */\n subject: string\n body: string\n}\n\n/** What {@link EXPERIMENT_VARIANTS_ZONE} hands each widget. */\nexport interface MarketingExperimentVariantsZoneProps {\n hostId: string\n /** The experiment's id once it has been saved; empty while it is new. */\n experimentId: string\n /** The experiment's name as the editor holds it. */\n name: string\n target: ExperimentTarget\n /** The conversion event the test counts, as the goal names it. */\n goal: string\n variants: MarketingExperimentVariantDraft[]\n /**\n * Fills the editor's variant fields with what a widget proposes, unsaved.\n * `key` identifies the proposal so a widget can tell which of its own the\n * editor is showing. Variants past the ones the editor holds are ignored:\n * the editor's list is the test's shape and a widget does not change it.\n */\n proposeVariants: (\n variants: readonly MarketingExperimentVariantDraft[],\n key: string,\n ) => void\n}\n\n/** What {@link EXPERIMENT_RESULT_ZONE} hands each widget. */\nexport interface MarketingExperimentResultZoneProps {\n hostId: string\n experimentId: string\n /** The test's name as the results figures label it, which is how a reader names one. */\n test: string\n}\n\nexport const EXPERIMENT_VARIANTS_ZONE =\n definePluginZone<MarketingExperimentVariantsZoneProps>('experimentVariants')\n\nexport const EXPERIMENT_RESULT_ZONE =\n definePluginZone<MarketingExperimentResultZoneProps>('experimentResult')\n\n/**\n * Draws a hosted zone through the shell's renderer, or nothing at all when\n * there is no shell. One component for both zones: they differ only in the\n * id they name and the props they carry, and a zone that drew a heading or a\n * wrapper of its own would change the card for every workspace that has no\n * widget for it.\n */\nfunction HostedZone(props: {\n slot: string\n zone: Record<string, unknown>\n Slot: ConsoleWidgetSlotRenderer\n}) {\n const { slot, zone, Slot } = props\n return <Slot slot={slot} {...zone} />\n}\n\nexport function ExperimentVariantsZone(props: MarketingExperimentVariantsZoneProps) {\n const Slot = useConsoleWidgetSlot()\n return Slot ? (\n <HostedZone slot={EXPERIMENT_VARIANTS_ZONE.id} zone={{ ...props }} Slot={Slot} />\n ) : null\n}\nExperimentVariantsZone.displayName = 'ExperimentVariantsZone'\n\nexport function ExperimentResultZone(props: MarketingExperimentResultZoneProps) {\n const Slot = useConsoleWidgetSlot()\n return Slot ? (\n <HostedZone slot={EXPERIMENT_RESULT_ZONE.id} zone={{ ...props }} Slot={Slot} />\n ) : null\n}\nExperimentResultZone.displayName = 'ExperimentResultZone'\n\n/** The editor's variants as the zone hands them over. */\nexport function marketingExperimentVariantDrafts(\n variants: readonly ExperimentVariant[] | undefined,\n): MarketingExperimentVariantDraft[] {\n return (variants ?? []).map((variant) => ({\n id: variant.id,\n name: variant.name ?? '',\n subject: variant.subject ?? '',\n body: variant.body ?? '',\n }))\n}\n"],"names":["useConsoleWidgetSlot","definePluginZone","EXPERIMENT_VARIANTS_ZONE","EXPERIMENT_RESULT_ZONE","HostedZone","props","slot","zone","Slot","ExperimentVariantsZone","id","displayName","ExperimentResultZone","marketingExperimentVariantDrafts","variants","map","variant","name","subject","body"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;;AAEA,SAEEA,oBAAoB,QACf,qDAAoD;AAC3D,SAASC,gBAAgB,QAAQ,2CAA0C;AA2E3E,OAAO,MAAMC,2BACXD,iBAAuD,sBAAqB;AAE9E,OAAO,MAAME,yBACXF,iBAAqD,oBAAmB;AAE1E;;;;;;CAMC,GACD,SAASG,WAAWC,KAInB;IACC,MAAM,EAAEC,IAAI,EAAEC,IAAI,EAAEC,IAAI,EAAE,GAAGH;IAC7B,qBAAO,KAACG;QAAKF,MAAMA;OAAUC;AAC/B;AAEA,OAAO,SAASE,uBAAuBJ,KAA2C;IAChF,MAAMG,OAAOR;IACb,OAAOQ,qBACL,KAACJ;QAAWE,MAAMJ,yBAAyBQ,EAAE;QAAEH,MAAM,aAAKF;QAASG,MAAMA;SACvE;AACN;AACAC,uBAAuBE,WAAW,GAAG;AAErC,OAAO,SAASC,qBAAqBP,KAAyC;IAC5E,MAAMG,OAAOR;IACb,OAAOQ,qBACL,KAACJ;QAAWE,MAAMH,uBAAuBO,EAAE;QAAEH,MAAM,aAAKF;QAASG,MAAMA;SACrE;AACN;AACAI,qBAAqBD,WAAW,GAAG;AAEnC,uDAAuD,GACvD,OAAO,SAASE,iCACdC,QAAkD;IAElD,OAAO,CAACA,mBAAAA,WAAY,EAAE,EAAEC,GAAG,CAAC,CAACC;YAErBA,eACGA,kBACHA;eAJkC;YACxCN,IAAIM,QAAQN,EAAE;YACdO,IAAI,GAAED,gBAAAA,QAAQC,IAAI,YAAZD,gBAAgB;YACtBE,OAAO,GAAEF,mBAAAA,QAAQE,OAAO,YAAfF,mBAAmB;YAC5BG,IAAI,GAAEH,gBAAAA,QAAQG,IAAI,YAAZH,gBAAgB;QACxB;;AACF"}
@@ -0,0 +1,17 @@
1
+ import { type AglynOrgBilling } from '@aglyn/aglyn';
2
+ export interface HostExperimentsCardProps {
3
+ hostId: string;
4
+ /** Resolved entitlement source (AGL-395). */
5
+ org?: Partial<AglynOrgBilling>;
6
+ }
7
+ /**
8
+ * Experiments manager (AGL-252): create screen/section/email A/B tests
9
+ * with weighted variants and a conversion goal; start/pause/finish them
10
+ * and read exposures/conversions per variant. Business tier
11
+ * (`ab-testing`).
12
+ */
13
+ export declare function HostExperimentsCard(props: HostExperimentsCardProps): import("react").JSX.Element;
14
+ export declare namespace HostExperimentsCard {
15
+ var displayName: string;
16
+ }
17
+ export default HostExperimentsCard;