@drawbridge/components 0.1.13 → 0.1.15

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 (242) hide show
  1. package/components/styles.css +364 -2
  2. package/dist/advertisement.js +3 -1
  3. package/dist/advertisement.mjs +3 -1
  4. package/dist/bridge/advertisements.js +2 -0
  5. package/dist/bridge/advertisements.mjs +2 -0
  6. package/dist/bridge/countdown.js +2 -1
  7. package/dist/bridge/countdown.mjs +2 -1
  8. package/dist/bridge/form-subdomain-embed.js +18 -20
  9. package/dist/bridge/form-subdomain-embed.mjs +18 -20
  10. package/dist/bridge/form-subdomain-header.js +24 -1
  11. package/dist/bridge/form-subdomain-header.mjs +24 -1
  12. package/dist/bridge/form-subdomain-missions.js +577 -0
  13. package/dist/bridge/form-subdomain-missions.mjs +540 -0
  14. package/dist/bridge/form-subdomain.js +530 -220
  15. package/dist/bridge/form-subdomain.mjs +533 -222
  16. package/dist/bridge/lib/entry.js +59 -0
  17. package/dist/bridge/lib/entry.mjs +29 -0
  18. package/dist/bridge/lib/location.js +38 -0
  19. package/dist/bridge/lib/location.mjs +13 -0
  20. package/dist/bridge/lib/order.js +71 -0
  21. package/dist/bridge/lib/order.mjs +44 -0
  22. package/dist/bridge/lib/url.js +9 -0
  23. package/dist/bridge/lib/url.mjs +7 -0
  24. package/dist/bridge/share-button.js +5 -3
  25. package/dist/bridge/share-button.mjs +5 -3
  26. package/dist/bridge/subdomain-content.js +7 -6
  27. package/dist/bridge/subdomain-content.mjs +7 -6
  28. package/dist/bridge/template-layout.js +59 -21
  29. package/dist/bridge/template-layout.mjs +59 -21
  30. package/dist/bridge/template-modal.js +42 -76
  31. package/dist/bridge/template-modal.mjs +39 -73
  32. package/dist/bridge/template-preview.js +208 -0
  33. package/dist/bridge/template-preview.mjs +173 -0
  34. package/dist/bridge/template-subdomain-gallery.js +6 -2
  35. package/dist/bridge/template-subdomain-gallery.mjs +6 -2
  36. package/dist/bridge/template-subdomain-link.js +6 -1
  37. package/dist/bridge/template-subdomain-link.mjs +6 -1
  38. package/dist/bridge/template-subdomain.js +20 -15
  39. package/dist/bridge/template-subdomain.mjs +20 -15
  40. package/dist/dashboard/accordion.js +74 -39
  41. package/dist/dashboard/accordion.mjs +74 -39
  42. package/dist/dashboard/avatar.js +109 -3
  43. package/dist/dashboard/avatar.mjs +106 -4
  44. package/dist/dashboard/buttons-subscription.js +384 -0
  45. package/dist/dashboard/buttons-subscription.mjs +349 -0
  46. package/dist/dashboard/card-campaign-switch.js +277 -0
  47. package/dist/dashboard/card-campaign-switch.mjs +243 -0
  48. package/dist/dashboard/card-order.js +231 -29
  49. package/dist/dashboard/card-order.mjs +231 -29
  50. package/dist/dashboard/card-section.js +26 -2
  51. package/dist/dashboard/card-section.mjs +26 -2
  52. package/dist/dashboard/card-tile.js +6 -7
  53. package/dist/dashboard/card-tile.mjs +6 -7
  54. package/dist/dashboard/connection-workflows.js +205 -0
  55. package/dist/dashboard/connection-workflows.mjs +171 -0
  56. package/dist/dashboard/device.js +95 -0
  57. package/dist/dashboard/device.mjs +72 -0
  58. package/dist/dashboard/form-admin-campaign.js +19 -50
  59. package/dist/dashboard/form-admin-campaign.mjs +20 -51
  60. package/dist/dashboard/form-ai.js +9 -6
  61. package/dist/dashboard/form-ai.mjs +9 -6
  62. package/dist/dashboard/form-auth.js +35 -25
  63. package/dist/dashboard/form-auth.mjs +36 -26
  64. package/dist/dashboard/form-file.js +10 -1
  65. package/dist/dashboard/form-file.mjs +10 -1
  66. package/dist/dashboard/form-filters-analytics.js +14 -1
  67. package/dist/dashboard/form-filters-analytics.mjs +15 -2
  68. package/dist/dashboard/form-organization-campaign-advertisement.js +15 -1
  69. package/dist/dashboard/form-organization-campaign-advertisement.mjs +16 -2
  70. package/dist/dashboard/form-organization-campaign-agreement.js +215 -164
  71. package/dist/dashboard/form-organization-campaign-agreement.mjs +215 -164
  72. package/dist/dashboard/form-organization-campaign-field-email.js +0 -34
  73. package/dist/dashboard/form-organization-campaign-field-email.mjs +0 -34
  74. package/dist/dashboard/form-organization-campaign-field-list.js +466 -0
  75. package/dist/dashboard/form-organization-campaign-field-list.mjs +437 -0
  76. package/dist/dashboard/form-organization-campaign-field-phone.js +0 -34
  77. package/dist/dashboard/form-organization-campaign-field-phone.mjs +0 -34
  78. package/dist/dashboard/form-organization-campaign-field-remove.js +66 -0
  79. package/dist/dashboard/form-organization-campaign-field-remove.mjs +33 -0
  80. package/dist/dashboard/form-organization-campaign-field-select.js +51 -5
  81. package/dist/dashboard/form-organization-campaign-field-select.mjs +51 -5
  82. package/dist/dashboard/form-organization-campaign-field-textarea.js +46 -8
  83. package/dist/dashboard/form-organization-campaign-field-textarea.mjs +46 -8
  84. package/dist/dashboard/form-organization-campaign-integration-age.js +6 -12
  85. package/dist/dashboard/form-organization-campaign-integration-age.mjs +6 -12
  86. package/dist/dashboard/form-organization-campaign-integration-enable.js +52 -24
  87. package/dist/dashboard/form-organization-campaign-integration-enable.mjs +54 -26
  88. package/dist/dashboard/form-organization-campaign-integration-geocode.js +6 -12
  89. package/dist/dashboard/form-organization-campaign-integration-geocode.mjs +6 -12
  90. package/dist/dashboard/form-organization-campaign-integration-gtm.js +6 -12
  91. package/dist/dashboard/form-organization-campaign-integration-gtm.mjs +6 -12
  92. package/dist/dashboard/form-organization-campaign-link.js +7 -1
  93. package/dist/dashboard/form-organization-campaign-link.mjs +7 -1
  94. package/dist/dashboard/form-organization-campaign-mission.js +291 -0
  95. package/dist/dashboard/form-organization-campaign-mission.mjs +258 -0
  96. package/dist/dashboard/form-organization-campaign-page-embed.js +13 -2
  97. package/dist/dashboard/form-organization-campaign-page-embed.mjs +12 -1
  98. package/dist/dashboard/form-organization-campaign-page.js +20 -11
  99. package/dist/dashboard/form-organization-campaign-page.mjs +20 -11
  100. package/dist/dashboard/form-organization-campaign-prize-edit.js +12 -1
  101. package/dist/dashboard/form-organization-campaign-prize-edit.mjs +12 -1
  102. package/dist/dashboard/form-organization-campaign-section.js +243 -0
  103. package/dist/dashboard/form-organization-campaign-section.mjs +214 -0
  104. package/dist/dashboard/form-organization-campaign.js +114 -469
  105. package/dist/dashboard/form-organization-campaign.mjs +113 -467
  106. package/dist/dashboard/form-organization-export.js +4 -7
  107. package/dist/dashboard/form-organization-export.mjs +4 -7
  108. package/dist/dashboard/form-organization-identity.js +46 -51
  109. package/dist/dashboard/form-organization-identity.mjs +46 -51
  110. package/dist/dashboard/form-organization-workflow.js +708 -687
  111. package/dist/dashboard/form-organization-workflow.mjs +704 -683
  112. package/dist/dashboard/form-organization.js +82 -110
  113. package/dist/dashboard/form-organization.mjs +81 -109
  114. package/dist/dashboard/form-otc.js +4 -5
  115. package/dist/dashboard/form-otc.mjs +4 -5
  116. package/dist/dashboard/form-payment-methods.js +20 -9
  117. package/dist/dashboard/form-payment-methods.mjs +20 -9
  118. package/dist/dashboard/form-stripe.js +30 -0
  119. package/dist/dashboard/form-stripe.mjs +26 -0
  120. package/dist/dashboard/input-array.js +4 -2
  121. package/dist/dashboard/input-array.mjs +4 -2
  122. package/dist/dashboard/input-combobox.js +7 -3
  123. package/dist/dashboard/input-combobox.mjs +7 -3
  124. package/dist/dashboard/input-date.js +7 -0
  125. package/dist/dashboard/input-date.mjs +7 -0
  126. package/dist/dashboard/input-fields.js +80 -20
  127. package/dist/dashboard/input-fields.mjs +80 -20
  128. package/dist/dashboard/input-file.js +21 -1
  129. package/dist/dashboard/input-file.mjs +21 -1
  130. package/dist/dashboard/input-font.js +10 -1
  131. package/dist/dashboard/input-font.mjs +10 -1
  132. package/dist/dashboard/lib/item-list.js +57 -0
  133. package/dist/dashboard/lib/item-list.mjs +33 -0
  134. package/dist/dashboard/lib/menu.js +50 -0
  135. package/dist/dashboard/lib/menu.mjs +26 -0
  136. package/dist/dashboard/locked.js +82 -0
  137. package/dist/dashboard/locked.mjs +53 -0
  138. package/dist/dashboard/menu.js +72 -19
  139. package/dist/dashboard/menu.mjs +72 -19
  140. package/dist/dashboard/note-ai.js +69 -0
  141. package/dist/dashboard/note-ai.mjs +36 -0
  142. package/dist/dashboard/preview.js +419 -0
  143. package/dist/dashboard/preview.mjs +384 -0
  144. package/dist/dashboard/steps.js +39 -13
  145. package/dist/dashboard/steps.mjs +37 -12
  146. package/dist/dashboard/table-contacts.js +136 -0
  147. package/dist/dashboard/table-contacts.mjs +103 -0
  148. package/dist/dashboard/template-not-found.js +4 -2
  149. package/dist/dashboard/template-not-found.mjs +4 -2
  150. package/dist/dashboard/template-socket.js +20 -7
  151. package/dist/dashboard/template-socket.mjs +20 -7
  152. package/dist/icons/desktop.js +46 -0
  153. package/dist/icons/desktop.mjs +27 -0
  154. package/dist/icons/phone.js +46 -0
  155. package/dist/icons/phone.mjs +27 -0
  156. package/dist/icons/puzzle-piece.js +46 -0
  157. package/dist/icons/puzzle-piece.mjs +27 -0
  158. package/dist/icons/tablet.js +46 -0
  159. package/dist/icons/tablet.mjs +27 -0
  160. package/dist/icons/users.js +46 -0
  161. package/dist/icons/users.mjs +27 -0
  162. package/dist/input-checkbox.js +1 -0
  163. package/dist/input-checkbox.mjs +1 -0
  164. package/dist/input-code.js +83 -0
  165. package/dist/input-code.mjs +50 -0
  166. package/dist/input-text.js +2 -1
  167. package/dist/input-text.mjs +2 -1
  168. package/dist/shared/button.js +1 -1
  169. package/dist/shared/button.mjs +1 -1
  170. package/dist/shared/input-checkbox-list.js +0 -1
  171. package/dist/shared/input-checkbox-list.mjs +0 -1
  172. package/dist/shared/input-switch.js +6 -1
  173. package/dist/shared/input-switch.mjs +6 -1
  174. package/dist/shared/lib/campaign.js +123 -0
  175. package/dist/shared/lib/campaign.mjs +96 -0
  176. package/dist/shared/lib/helpers.js +14 -2
  177. package/dist/shared/lib/helpers.mjs +13 -2
  178. package/package.json +133 -13
  179. package/types/bridge/form-subdomain-header.d.ts +2 -0
  180. package/types/bridge/form-subdomain-missions.d.ts +38 -0
  181. package/types/bridge/form-subdomain.d.ts +23 -1
  182. package/types/bridge/lib/entry.d.ts +26 -0
  183. package/types/bridge/lib/location.d.ts +13 -0
  184. package/types/bridge/lib/order.d.ts +30 -0
  185. package/types/bridge/lib/url.d.ts +19 -0
  186. package/types/bridge/template-modal.d.ts +1 -1
  187. package/types/bridge/template-preview.d.ts +10 -0
  188. package/types/bridge/template-subdomain-link.d.ts +2 -0
  189. package/types/dashboard/accordion.d.ts +2 -0
  190. package/types/dashboard/avatar.d.ts +18 -2
  191. package/types/dashboard/buttons-subscription.d.ts +22 -0
  192. package/types/dashboard/card-campaign-switch.d.ts +32 -0
  193. package/types/dashboard/card-order.d.ts +25 -1
  194. package/types/dashboard/card-section.d.ts +2 -0
  195. package/types/dashboard/connection-workflows.d.ts +33 -0
  196. package/types/dashboard/device.d.ts +12 -0
  197. package/types/dashboard/form-admin-campaign.d.ts +3 -2
  198. package/types/dashboard/form-ai.d.ts +2 -2
  199. package/types/dashboard/form-organization-campaign-agreement.d.ts +18 -12
  200. package/types/dashboard/form-organization-campaign-field-email.d.ts +1 -2
  201. package/types/dashboard/form-organization-campaign-field-list.d.ts +36 -0
  202. package/types/dashboard/form-organization-campaign-field-phone.d.ts +1 -2
  203. package/types/dashboard/form-organization-campaign-field-remove.d.ts +22 -0
  204. package/types/dashboard/form-organization-campaign-field-select.d.ts +2 -1
  205. package/types/dashboard/form-organization-campaign-field-textarea.d.ts +2 -1
  206. package/types/dashboard/form-organization-campaign-integration-age.d.ts +3 -3
  207. package/types/dashboard/form-organization-campaign-integration-enable.d.ts +3 -3
  208. package/types/dashboard/form-organization-campaign-mission.d.ts +40 -0
  209. package/types/dashboard/form-organization-campaign-section.d.ts +29 -0
  210. package/types/dashboard/form-organization-campaign.d.ts +27 -17
  211. package/types/dashboard/form-organization-identity.d.ts +2 -0
  212. package/types/dashboard/form-organization-workflow.d.ts +56 -47
  213. package/types/dashboard/form-organization.d.ts +7 -2
  214. package/types/dashboard/form-stripe.d.ts +3 -0
  215. package/types/dashboard/input-combobox.d.ts +2 -0
  216. package/types/dashboard/input-date.d.ts +2 -0
  217. package/types/dashboard/input-fields.d.ts +3 -2
  218. package/types/dashboard/input-file.d.ts +4 -0
  219. package/types/dashboard/lib/item-list.d.ts +14 -0
  220. package/types/dashboard/lib/menu.d.ts +17 -0
  221. package/types/dashboard/locked.d.ts +10 -0
  222. package/types/dashboard/menu.d.ts +10 -2
  223. package/types/dashboard/note-ai.d.ts +15 -0
  224. package/types/dashboard/preview.d.ts +33 -0
  225. package/types/dashboard/steps.d.ts +19 -4
  226. package/types/dashboard/table-cell-title.d.ts +2 -2
  227. package/types/dashboard/table-contacts.d.ts +2 -0
  228. package/types/icons/desktop.d.ts +5 -0
  229. package/types/icons/phone.d.ts +5 -0
  230. package/types/icons/puzzle-piece.d.ts +5 -0
  231. package/types/icons/tablet.d.ts +5 -0
  232. package/types/icons/users.d.ts +5 -0
  233. package/types/input-code.d.ts +23 -0
  234. package/types/shared/input-switch.d.ts +2 -0
  235. package/types/shared/lib/campaign.d.ts +35 -0
  236. package/types/shared/lib/helpers.d.ts +3 -0
  237. package/dist/dashboard/card-integration.js +0 -187
  238. package/dist/dashboard/card-integration.mjs +0 -158
  239. package/dist/dashboard/iframe.js +0 -159
  240. package/dist/dashboard/iframe.mjs +0 -130
  241. package/types/dashboard/card-integration.d.ts +0 -24
  242. package/types/dashboard/iframe.d.ts +0 -18
@@ -0,0 +1,136 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var table_contacts_exports = {};
29
+ __export(table_contacts_exports, {
30
+ contactColumns: () => contactColumns
31
+ });
32
+ module.exports = __toCommonJS(table_contacts_exports);
33
+ var import_jsx_runtime = require("react/jsx-runtime");
34
+ var import_drawbridge_utils = require("@drawbridge/drawbridge-utils");
35
+ var import_table_cell_title = __toESM(require("./table-cell-title"));
36
+ const contactColumns = [
37
+ // The name, or the first address when there is none. The Email column
38
+ // stays: a contact's address variants wrap there, and the title's second
39
+ // line is one line that would clip them.
40
+ {
41
+ accessorKey: "names",
42
+ header: "Name",
43
+ cell: ({ row, getValue }) => {
44
+ var _a, _b, _c;
45
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
46
+ import_table_cell_title.default,
47
+ {
48
+ ...{
49
+ title: ((_a = getValue()) == null ? void 0 : _a[0]) || ((_c = (_b = row.original) == null ? void 0 : _b.emails) == null ? void 0 : _c[0]) || "\u2014"
50
+ }
51
+ }
52
+ );
53
+ },
54
+ enableSorting: false
55
+ },
56
+ {
57
+ accessorKey: "emails",
58
+ header: "Email",
59
+ // Contacts accumulate address variants (jaime@, jaime+2@, jaime+3@), so let
60
+ // this cell wrap instead of truncating to one line — otherwise the last
61
+ // variant is clipped with no way to read it. whitespace-normal! overrides
62
+ // the table's default `truncate` (white-space:nowrap). The meta className
63
+ // REPLACES TableCell's 'px-4 text-left' default, so restate it.
64
+ meta: {
65
+ className: "px-4 text-left whitespace-normal! wrap-break-word"
66
+ },
67
+ cell: ({ getValue }) => {
68
+ var _a;
69
+ return ((_a = getValue()) == null ? void 0 : _a.join(", ")) || "\u2014";
70
+ },
71
+ enableSorting: false
72
+ },
73
+ {
74
+ accessorKey: "phones",
75
+ header: "Phone",
76
+ meta: {
77
+ className: "px-4 text-left whitespace-normal! wrap-break-word"
78
+ },
79
+ cell: ({ getValue }) => {
80
+ var _a;
81
+ return ((_a = getValue()) == null ? void 0 : _a.map((p) => p.number).join(", ")) || "\u2014";
82
+ },
83
+ enableSorting: false
84
+ },
85
+ {
86
+ accessorKey: "campaigns",
87
+ header: "Campaigns",
88
+ cell: ({ getValue }) => {
89
+ var _a;
90
+ return ((_a = getValue()) == null ? void 0 : _a.length) || 0;
91
+ },
92
+ enableSorting: false
93
+ },
94
+ {
95
+ id: "totals.submissions",
96
+ accessorKey: "totals.submissions",
97
+ header: "Submissions",
98
+ enableSorting: true
99
+ },
100
+ {
101
+ id: "totals.entries",
102
+ accessorKey: "totals.entries",
103
+ header: "Entries",
104
+ enableSorting: true
105
+ },
106
+ {
107
+ id: "totals.draws",
108
+ accessorKey: "totals.draws",
109
+ header: "Draws",
110
+ enableSorting: true
111
+ },
112
+ {
113
+ // `.total` is EVERY purchase — campaign-driven and discount-code alike.
114
+ // These were `totals.orders` / `totals.gross`, flat numbers that counted
115
+ // only campaign-driven sales while being headed "Orders" and "Revenue", so
116
+ // a redemption this person made showed here as nothing at all.
117
+ id: "totals.orders.total",
118
+ accessorKey: "totals.orders.total",
119
+ header: "Orders",
120
+ enableSorting: true
121
+ },
122
+ {
123
+ id: "totals.gross.total",
124
+ accessorKey: "totals.gross.total",
125
+ header: "Revenue",
126
+ cell: ({ getValue }) => {
127
+ const amount = getValue();
128
+ return amount ? (0, import_drawbridge_utils.formatCurrency)({ value: amount }) : "\u2014";
129
+ },
130
+ enableSorting: true
131
+ }
132
+ ];
133
+ // Annotate the CommonJS export names for ESM import in node:
134
+ 0 && (module.exports = {
135
+ contactColumns
136
+ });
@@ -0,0 +1,103 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { formatCurrency } from "@drawbridge/drawbridge-utils";
3
+ import TableCellTitle from "./table-cell-title.mjs";
4
+ const contactColumns = [
5
+ // The name, or the first address when there is none. The Email column
6
+ // stays: a contact's address variants wrap there, and the title's second
7
+ // line is one line that would clip them.
8
+ {
9
+ accessorKey: "names",
10
+ header: "Name",
11
+ cell: ({ row, getValue }) => {
12
+ var _a, _b, _c;
13
+ return /* @__PURE__ */ jsx(
14
+ TableCellTitle,
15
+ {
16
+ ...{
17
+ title: ((_a = getValue()) == null ? void 0 : _a[0]) || ((_c = (_b = row.original) == null ? void 0 : _b.emails) == null ? void 0 : _c[0]) || "\u2014"
18
+ }
19
+ }
20
+ );
21
+ },
22
+ enableSorting: false
23
+ },
24
+ {
25
+ accessorKey: "emails",
26
+ header: "Email",
27
+ // Contacts accumulate address variants (jaime@, jaime+2@, jaime+3@), so let
28
+ // this cell wrap instead of truncating to one line — otherwise the last
29
+ // variant is clipped with no way to read it. whitespace-normal! overrides
30
+ // the table's default `truncate` (white-space:nowrap). The meta className
31
+ // REPLACES TableCell's 'px-4 text-left' default, so restate it.
32
+ meta: {
33
+ className: "px-4 text-left whitespace-normal! wrap-break-word"
34
+ },
35
+ cell: ({ getValue }) => {
36
+ var _a;
37
+ return ((_a = getValue()) == null ? void 0 : _a.join(", ")) || "\u2014";
38
+ },
39
+ enableSorting: false
40
+ },
41
+ {
42
+ accessorKey: "phones",
43
+ header: "Phone",
44
+ meta: {
45
+ className: "px-4 text-left whitespace-normal! wrap-break-word"
46
+ },
47
+ cell: ({ getValue }) => {
48
+ var _a;
49
+ return ((_a = getValue()) == null ? void 0 : _a.map((p) => p.number).join(", ")) || "\u2014";
50
+ },
51
+ enableSorting: false
52
+ },
53
+ {
54
+ accessorKey: "campaigns",
55
+ header: "Campaigns",
56
+ cell: ({ getValue }) => {
57
+ var _a;
58
+ return ((_a = getValue()) == null ? void 0 : _a.length) || 0;
59
+ },
60
+ enableSorting: false
61
+ },
62
+ {
63
+ id: "totals.submissions",
64
+ accessorKey: "totals.submissions",
65
+ header: "Submissions",
66
+ enableSorting: true
67
+ },
68
+ {
69
+ id: "totals.entries",
70
+ accessorKey: "totals.entries",
71
+ header: "Entries",
72
+ enableSorting: true
73
+ },
74
+ {
75
+ id: "totals.draws",
76
+ accessorKey: "totals.draws",
77
+ header: "Draws",
78
+ enableSorting: true
79
+ },
80
+ {
81
+ // `.total` is EVERY purchase — campaign-driven and discount-code alike.
82
+ // These were `totals.orders` / `totals.gross`, flat numbers that counted
83
+ // only campaign-driven sales while being headed "Orders" and "Revenue", so
84
+ // a redemption this person made showed here as nothing at all.
85
+ id: "totals.orders.total",
86
+ accessorKey: "totals.orders.total",
87
+ header: "Orders",
88
+ enableSorting: true
89
+ },
90
+ {
91
+ id: "totals.gross.total",
92
+ accessorKey: "totals.gross.total",
93
+ header: "Revenue",
94
+ cell: ({ getValue }) => {
95
+ const amount = getValue();
96
+ return amount ? formatCurrency({ value: amount }) : "\u2014";
97
+ },
98
+ enableSorting: true
99
+ }
100
+ ];
101
+ export {
102
+ contactColumns
103
+ };
@@ -98,14 +98,16 @@ const TemplateNotFound = ({
98
98
  "div",
99
99
  {
100
100
  ...{
101
- className: "pt-6"
101
+ // Its own width, centred: not stretched to the heading's.
102
+ className: "flex justify-center pt-6"
102
103
  },
103
104
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
104
105
  import_button.default,
105
106
  {
106
107
  ...{
107
108
  element: import_link.default,
108
- href
109
+ href,
110
+ inline: true
109
111
  },
110
112
  children: button
111
113
  }
@@ -66,14 +66,16 @@ const TemplateNotFound = ({
66
66
  "div",
67
67
  {
68
68
  ...{
69
- className: "pt-6"
69
+ // Its own width, centred: not stretched to the heading's.
70
+ className: "flex justify-center pt-6"
70
71
  },
71
72
  children: /* @__PURE__ */ jsx(
72
73
  Button,
73
74
  {
74
75
  ...{
75
76
  element: Link,
76
- href
77
+ href,
78
+ inline: true
77
79
  },
78
80
  children: button
79
81
  }
@@ -300,6 +300,9 @@ const TemplateSocketOrganization = ({
300
300
  queryClient.invalidateQueries({
301
301
  queryKey: ["organization-workflow", params.organization]
302
302
  });
303
+ queryClient.invalidateQueries({
304
+ queryKey: ["menu", "campaign", params.organization]
305
+ });
303
306
  queryClient.invalidateQueries({
304
307
  queryKey: ["organization-affiliate-campaigns"]
305
308
  });
@@ -314,6 +317,9 @@ const TemplateSocketOrganization = ({
314
317
  queryClient.invalidateQueries({
315
318
  queryKey: ["organization", params.organization]
316
319
  });
320
+ queryClient.invalidateQueries({
321
+ queryKey: ["organization-campaign-missions"]
322
+ });
317
323
  },
318
324
  "organization.connections": () => {
319
325
  queryClient.invalidateQueries({
@@ -329,7 +335,7 @@ const TemplateSocketOrganization = ({
329
335
  queryKey: ["organization-workflows", params.organization]
330
336
  });
331
337
  queryClient.invalidateQueries({
332
- queryKey: ["organization-workflow-catalog", params.organization]
338
+ queryKey: ["organization-workflow", params.organization]
333
339
  });
334
340
  queryClient.invalidateQueries({
335
341
  queryKey: ["organization-campaign-products", params.organization]
@@ -501,10 +507,12 @@ const TemplateSocketOrganization = ({
501
507
  },
502
508
  // @story workflows/list
503
509
  // Sync emits this on every workflow status change, on delete, and when
504
- // a run-time issue is written or cleared. The open workflow page shows
505
- // it, the list carries it, and the dashboard's Next steps and the
506
- // sidebar Workflows dot are built server-side off the org and menu
507
- // queries — so all four refetch.
510
+ // a run-time issue is written or cleared. The open trigger page shows
511
+ // it, the campaign's Workflows page and a connection's Workflows drawer
512
+ // and error card carry it ( all under the two prefixes below ), the
513
+ // campaign's and the Dashboard's Next steps are built server-side off
514
+ // the campaign and the organization, and the Campaigns and Workflows
515
+ // dots off the two menus — so all of them refetch.
508
516
  "organization.workflows": () => {
509
517
  queryClient.invalidateQueries({
510
518
  queryKey: ["organization-workflows", params.organization]
@@ -515,11 +523,17 @@ const TemplateSocketOrganization = ({
515
523
  queryClient.invalidateQueries({
516
524
  queryKey: ["organization", params.organization]
517
525
  });
526
+ queryClient.invalidateQueries({
527
+ queryKey: ["campaign", params.campaign]
528
+ });
518
529
  queryClient.invalidateQueries({
519
530
  queryKey: ["menu", "organization", params.organization]
520
531
  });
521
532
  queryClient.invalidateQueries({
522
- queryKey: ["organization-workflow-catalog", params.organization]
533
+ queryKey: ["menu", "campaign", params.organization]
534
+ });
535
+ queryClient.invalidateQueries({
536
+ queryKey: ["campaign-sections"]
523
537
  });
524
538
  queryClient.invalidateQueries({
525
539
  queryKey: ["organizations"]
@@ -553,7 +567,6 @@ const TemplateSocketOrganization = ({
553
567
  ["organization-campaign-products", params == null ? void 0 : params.organization],
554
568
  ["organization-workflows", params == null ? void 0 : params.organization],
555
569
  ["organization-workflow", params == null ? void 0 : params.organization],
556
- ["organization-workflow-catalog", params == null ? void 0 : params.organization],
557
570
  ["organization-workflow-steps"],
558
571
  ["organization-contacts", params == null ? void 0 : params.organization],
559
572
  ["organization-exports", params == null ? void 0 : params.organization],
@@ -265,6 +265,9 @@ const TemplateSocketOrganization = ({
265
265
  queryClient.invalidateQueries({
266
266
  queryKey: ["organization-workflow", params.organization]
267
267
  });
268
+ queryClient.invalidateQueries({
269
+ queryKey: ["menu", "campaign", params.organization]
270
+ });
268
271
  queryClient.invalidateQueries({
269
272
  queryKey: ["organization-affiliate-campaigns"]
270
273
  });
@@ -279,6 +282,9 @@ const TemplateSocketOrganization = ({
279
282
  queryClient.invalidateQueries({
280
283
  queryKey: ["organization", params.organization]
281
284
  });
285
+ queryClient.invalidateQueries({
286
+ queryKey: ["organization-campaign-missions"]
287
+ });
282
288
  },
283
289
  "organization.connections": () => {
284
290
  queryClient.invalidateQueries({
@@ -294,7 +300,7 @@ const TemplateSocketOrganization = ({
294
300
  queryKey: ["organization-workflows", params.organization]
295
301
  });
296
302
  queryClient.invalidateQueries({
297
- queryKey: ["organization-workflow-catalog", params.organization]
303
+ queryKey: ["organization-workflow", params.organization]
298
304
  });
299
305
  queryClient.invalidateQueries({
300
306
  queryKey: ["organization-campaign-products", params.organization]
@@ -466,10 +472,12 @@ const TemplateSocketOrganization = ({
466
472
  },
467
473
  // @story workflows/list
468
474
  // Sync emits this on every workflow status change, on delete, and when
469
- // a run-time issue is written or cleared. The open workflow page shows
470
- // it, the list carries it, and the dashboard's Next steps and the
471
- // sidebar Workflows dot are built server-side off the org and menu
472
- // queries — so all four refetch.
475
+ // a run-time issue is written or cleared. The open trigger page shows
476
+ // it, the campaign's Workflows page and a connection's Workflows drawer
477
+ // and error card carry it ( all under the two prefixes below ), the
478
+ // campaign's and the Dashboard's Next steps are built server-side off
479
+ // the campaign and the organization, and the Campaigns and Workflows
480
+ // dots off the two menus — so all of them refetch.
473
481
  "organization.workflows": () => {
474
482
  queryClient.invalidateQueries({
475
483
  queryKey: ["organization-workflows", params.organization]
@@ -480,11 +488,17 @@ const TemplateSocketOrganization = ({
480
488
  queryClient.invalidateQueries({
481
489
  queryKey: ["organization", params.organization]
482
490
  });
491
+ queryClient.invalidateQueries({
492
+ queryKey: ["campaign", params.campaign]
493
+ });
483
494
  queryClient.invalidateQueries({
484
495
  queryKey: ["menu", "organization", params.organization]
485
496
  });
486
497
  queryClient.invalidateQueries({
487
- queryKey: ["organization-workflow-catalog", params.organization]
498
+ queryKey: ["menu", "campaign", params.organization]
499
+ });
500
+ queryClient.invalidateQueries({
501
+ queryKey: ["campaign-sections"]
488
502
  });
489
503
  queryClient.invalidateQueries({
490
504
  queryKey: ["organizations"]
@@ -518,7 +532,6 @@ const TemplateSocketOrganization = ({
518
532
  ["organization-campaign-products", params == null ? void 0 : params.organization],
519
533
  ["organization-workflows", params == null ? void 0 : params.organization],
520
534
  ["organization-workflow", params == null ? void 0 : params.organization],
521
- ["organization-workflow-catalog", params == null ? void 0 : params.organization],
522
535
  ["organization-workflow-steps"],
523
536
  ["organization-contacts", params == null ? void 0 : params.organization],
524
537
  ["organization-exports", params == null ? void 0 : params.organization],
@@ -0,0 +1,46 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var desktop_exports = {};
19
+ __export(desktop_exports, {
20
+ default: () => desktop_default
21
+ });
22
+ module.exports = __toCommonJS(desktop_exports);
23
+ var import_jsx_runtime = require("react/jsx-runtime");
24
+ const Desktop = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
25
+ "svg",
26
+ {
27
+ ...{
28
+ fill: "none",
29
+ stroke: "currentColor",
30
+ strokeWidth: 1.5,
31
+ viewBox: "0 0 24 24",
32
+ ...props
33
+ },
34
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
35
+ "path",
36
+ {
37
+ ...{
38
+ d: "M5.25 3.75h13.5A2.25 2.25 0 0 1 21 6v8.25a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 14.25V6a2.25 2.25 0 0 1 2.25-2.25ZM12 16.5v3.75M8.25 20.25h7.5",
39
+ strokeLinecap: "round",
40
+ strokeLinejoin: "round"
41
+ }
42
+ }
43
+ )
44
+ }
45
+ );
46
+ var desktop_default = Desktop;
@@ -0,0 +1,27 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ const Desktop = (props) => /* @__PURE__ */ jsx(
3
+ "svg",
4
+ {
5
+ ...{
6
+ fill: "none",
7
+ stroke: "currentColor",
8
+ strokeWidth: 1.5,
9
+ viewBox: "0 0 24 24",
10
+ ...props
11
+ },
12
+ children: /* @__PURE__ */ jsx(
13
+ "path",
14
+ {
15
+ ...{
16
+ d: "M5.25 3.75h13.5A2.25 2.25 0 0 1 21 6v8.25a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 14.25V6a2.25 2.25 0 0 1 2.25-2.25ZM12 16.5v3.75M8.25 20.25h7.5",
17
+ strokeLinecap: "round",
18
+ strokeLinejoin: "round"
19
+ }
20
+ }
21
+ )
22
+ }
23
+ );
24
+ var desktop_default = Desktop;
25
+ export {
26
+ desktop_default as default
27
+ };
@@ -0,0 +1,46 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var phone_exports = {};
19
+ __export(phone_exports, {
20
+ default: () => phone_default
21
+ });
22
+ module.exports = __toCommonJS(phone_exports);
23
+ var import_jsx_runtime = require("react/jsx-runtime");
24
+ const Phone = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
25
+ "svg",
26
+ {
27
+ ...{
28
+ fill: "none",
29
+ stroke: "currentColor",
30
+ strokeWidth: 1.5,
31
+ viewBox: "0 0 24 24",
32
+ ...props
33
+ },
34
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
35
+ "path",
36
+ {
37
+ ...{
38
+ d: "M9 2.25h6a2.25 2.25 0 0 1 2.25 2.25v15A2.25 2.25 0 0 1 15 21.75H9a2.25 2.25 0 0 1-2.25-2.25v-15A2.25 2.25 0 0 1 9 2.25ZM11.25 18.75h1.5",
39
+ strokeLinecap: "round",
40
+ strokeLinejoin: "round"
41
+ }
42
+ }
43
+ )
44
+ }
45
+ );
46
+ var phone_default = Phone;
@@ -0,0 +1,27 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ const Phone = (props) => /* @__PURE__ */ jsx(
3
+ "svg",
4
+ {
5
+ ...{
6
+ fill: "none",
7
+ stroke: "currentColor",
8
+ strokeWidth: 1.5,
9
+ viewBox: "0 0 24 24",
10
+ ...props
11
+ },
12
+ children: /* @__PURE__ */ jsx(
13
+ "path",
14
+ {
15
+ ...{
16
+ d: "M9 2.25h6a2.25 2.25 0 0 1 2.25 2.25v15A2.25 2.25 0 0 1 15 21.75H9a2.25 2.25 0 0 1-2.25-2.25v-15A2.25 2.25 0 0 1 9 2.25ZM11.25 18.75h1.5",
17
+ strokeLinecap: "round",
18
+ strokeLinejoin: "round"
19
+ }
20
+ }
21
+ )
22
+ }
23
+ );
24
+ var phone_default = Phone;
25
+ export {
26
+ phone_default as default
27
+ };
@@ -0,0 +1,46 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var puzzle_piece_exports = {};
19
+ __export(puzzle_piece_exports, {
20
+ default: () => puzzle_piece_default
21
+ });
22
+ module.exports = __toCommonJS(puzzle_piece_exports);
23
+ var import_jsx_runtime = require("react/jsx-runtime");
24
+ const PuzzlePiece = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
25
+ "svg",
26
+ {
27
+ ...{
28
+ fill: "none",
29
+ stroke: "currentColor",
30
+ strokeWidth: 1.5,
31
+ viewBox: "0 0 24 24",
32
+ ...props
33
+ },
34
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
35
+ "path",
36
+ {
37
+ ...{
38
+ d: "M14.25 6.087c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.036-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959v0a.64.64 0 0 1-.657.643 48.39 48.39 0 0 1-4.163-.3c.186 1.613.293 3.25.315 4.907a.656.656 0 0 1-.658.663v0c-.355 0-.676-.186-.959-.401a1.647 1.647 0 0 0-1.003-.349c-1.036 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401v0c.31 0 .555.26.532.57a48.039 48.039 0 0 1-.642 5.056c1.518.19 3.058.309 4.616.354a.64.64 0 0 0 .657-.643v0c0-.355-.186-.676-.401-.959a1.647 1.647 0 0 1-.349-1.003c0-1.035 1.008-1.875 2.25-1.875 1.243 0 2.25.84 2.25 1.875 0 .369-.128.713-.349 1.003-.215.283-.4.604-.4.959v0c0 .333.277.599.61.58a48.1 48.1 0 0 0 5.427-.63 48.05 48.05 0 0 0 .582-4.717.532.532 0 0 0-.533-.57v0c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.035 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.37 0 .713.128 1.003.349.283.215.604.401.96.401v0a.656.656 0 0 0 .658-.663 48.422 48.422 0 0 0-.37-5.36c-1.886.342-3.81.574-5.766.689a.578.578 0 0 1-.61-.58v0Z",
39
+ strokeLinecap: "round",
40
+ strokeLinejoin: "round"
41
+ }
42
+ }
43
+ )
44
+ }
45
+ );
46
+ var puzzle_piece_default = PuzzlePiece;
@@ -0,0 +1,27 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ const PuzzlePiece = (props) => /* @__PURE__ */ jsx(
3
+ "svg",
4
+ {
5
+ ...{
6
+ fill: "none",
7
+ stroke: "currentColor",
8
+ strokeWidth: 1.5,
9
+ viewBox: "0 0 24 24",
10
+ ...props
11
+ },
12
+ children: /* @__PURE__ */ jsx(
13
+ "path",
14
+ {
15
+ ...{
16
+ d: "M14.25 6.087c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.036-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959v0a.64.64 0 0 1-.657.643 48.39 48.39 0 0 1-4.163-.3c.186 1.613.293 3.25.315 4.907a.656.656 0 0 1-.658.663v0c-.355 0-.676-.186-.959-.401a1.647 1.647 0 0 0-1.003-.349c-1.036 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401v0c.31 0 .555.26.532.57a48.039 48.039 0 0 1-.642 5.056c1.518.19 3.058.309 4.616.354a.64.64 0 0 0 .657-.643v0c0-.355-.186-.676-.401-.959a1.647 1.647 0 0 1-.349-1.003c0-1.035 1.008-1.875 2.25-1.875 1.243 0 2.25.84 2.25 1.875 0 .369-.128.713-.349 1.003-.215.283-.4.604-.4.959v0c0 .333.277.599.61.58a48.1 48.1 0 0 0 5.427-.63 48.05 48.05 0 0 0 .582-4.717.532.532 0 0 0-.533-.57v0c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.035 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.37 0 .713.128 1.003.349.283.215.604.401.96.401v0a.656.656 0 0 0 .658-.663 48.422 48.422 0 0 0-.37-5.36c-1.886.342-3.81.574-5.766.689a.578.578 0 0 1-.61-.58v0Z",
17
+ strokeLinecap: "round",
18
+ strokeLinejoin: "round"
19
+ }
20
+ }
21
+ )
22
+ }
23
+ );
24
+ var puzzle_piece_default = PuzzlePiece;
25
+ export {
26
+ puzzle_piece_default as default
27
+ };