@antelopejs/dms-marketing 0.6.0 → 0.7.0
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/dist/config.d.ts +3 -0
- package/dist/config.js +11 -0
- package/dist/config.js.map +1 -1
- package/dist/data-api/websites.d.ts +10 -4
- package/dist/data-api/websites.js +79 -3
- package/dist/data-api/websites.js.map +1 -1
- package/dist/db/models/page_snapshots.model.d.ts +2 -0
- package/dist/db/models/page_snapshots.model.js +6 -0
- package/dist/db/models/page_snapshots.model.js.map +1 -1
- package/dist/db/models/websites.model.d.ts +1 -0
- package/dist/db/models/websites.model.js +9 -0
- package/dist/db/models/websites.model.js.map +1 -1
- package/dist/db/tables/page_snapshots.table.d.ts +1 -0
- package/dist/db/tables/page_snapshots.table.js +4 -0
- package/dist/db/tables/page_snapshots.table.js.map +1 -1
- package/dist/db/tables/websites.table.d.ts +2 -0
- package/dist/db/tables/websites.table.js +4 -0
- package/dist/db/tables/websites.table.js.map +1 -1
- package/dist/frontend-module.d.ts +6 -0
- package/dist/frontend-module.js +46 -0
- package/dist/frontend-module.js.map +1 -0
- package/dist/index.js +3 -11
- package/dist/index.js.map +1 -1
- package/dist/pages/acquisition/page.d.ts +1 -0
- package/dist/pages/acquisition/page.js +9 -4
- package/dist/pages/acquisition/page.js.map +1 -1
- package/dist/pages/blocks.d.ts +11 -2
- package/dist/pages/blocks.js +43 -5
- package/dist/pages/blocks.js.map +1 -1
- package/dist/pages/funnel/page.d.ts +1 -0
- package/dist/pages/funnel/page.js +1 -0
- package/dist/pages/funnel/page.js.map +1 -1
- package/dist/pages/funnels/page.d.ts +1 -0
- package/dist/pages/funnels/page.js +4 -2
- package/dist/pages/funnels/page.js.map +1 -1
- package/dist/pages/overview/page.d.ts +1 -0
- package/dist/pages/overview/page.js +5 -6
- package/dist/pages/overview/page.js.map +1 -1
- package/dist/pages/pages/page.d.ts +1 -0
- package/dist/pages/pages/page.js +1 -0
- package/dist/pages/pages/page.js.map +1 -1
- package/dist/pages/settings/form.js +1 -0
- package/dist/pages/settings/form.js.map +1 -1
- package/dist/pages/websites/page.d.ts +2 -3
- package/dist/pages/websites/page.js +63 -5
- package/dist/pages/websites/page.js.map +1 -1
- package/dist/routes/dashboard-tracking.js +5 -1
- package/dist/routes/dashboard-tracking.js.map +1 -1
- package/dist/routes/funnels.d.ts +2 -0
- package/dist/routes/funnels.js +6 -5
- package/dist/routes/funnels.js.map +1 -1
- package/dist/routes/public-endpoints.js +1 -1
- package/dist/routes/public-endpoints.js.map +1 -1
- package/dist/routes/snapshot.d.ts +1 -1
- package/dist/routes/snapshot.js +30 -13
- package/dist/routes/snapshot.js.map +1 -1
- package/dist/routes/stats.d.ts +10 -4
- package/dist/routes/stats.js +77 -23
- package/dist/routes/stats.js.map +1 -1
- package/dist/routes/websites.d.ts +5 -1
- package/dist/routes/websites.js +31 -13
- package/dist/routes/websites.js.map +1 -1
- package/dist/services/acquisition-report.d.ts +1 -0
- package/dist/services/acquisition-report.js +1 -0
- package/dist/services/acquisition-report.js.map +1 -1
- package/dist/services/collect.js +7 -2
- package/dist/services/collect.js.map +1 -1
- package/dist/services/dashboard-tracking.d.ts +7 -14
- package/dist/services/dashboard-tracking.js +42 -26
- package/dist/services/dashboard-tracking.js.map +1 -1
- package/dist/services/funnels-table.d.ts +3 -2
- package/dist/services/funnels-table.js +9 -9
- package/dist/services/funnels-table.js.map +1 -1
- package/dist/services/heatmap.d.ts +6 -0
- package/dist/services/heatmap.js +82 -17
- package/dist/services/heatmap.js.map +1 -1
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.js +1 -0
- package/dist/services/index.js.map +1 -1
- package/dist/services/prune.js +6 -1
- package/dist/services/prune.js.map +1 -1
- package/dist/services/realtime.d.ts +3 -0
- package/dist/services/realtime.js +49 -0
- package/dist/services/realtime.js.map +1 -0
- package/dist/services/request-body.d.ts +1 -0
- package/dist/services/request-body.js +18 -0
- package/dist/services/request-body.js.map +1 -1
- package/dist/services/sessionize.d.ts +1 -0
- package/dist/services/sessionize.js +9 -0
- package/dist/services/sessionize.js.map +1 -1
- package/dist/services/snapshots.d.ts +28 -1
- package/dist/services/snapshots.js +147 -26
- package/dist/services/snapshots.js.map +1 -1
- package/dist/services/tenant-website.d.ts +11 -0
- package/dist/services/tenant-website.js +27 -5
- package/dist/services/tenant-website.js.map +1 -1
- package/dist/services/website-report.d.ts +5 -0
- package/dist/services/website-report.js +13 -1
- package/dist/services/website-report.js.map +1 -1
- package/dist/services/workspace-scope.d.ts +31 -0
- package/dist/services/workspace-scope.js +72 -0
- package/dist/services/workspace-scope.js.map +1 -0
- package/dist/types/constants.d.ts +7 -0
- package/dist/types/constants.js +8 -1
- package/dist/types/constants.js.map +1 -1
- package/dist/types/events.d.ts +25 -25
- package/dist/types/snapshots.d.ts +29 -29
- package/dist/types/snapshots.js +1 -1
- package/dist/types/snapshots.js.map +1 -1
- package/dist/utils/funnel-steps-type.d.ts +13 -13
- package/frontend-vue/app/components/ChannelsCard.vue +19 -2
- package/frontend-vue/app/components/Context.vue +50 -376
- package/frontend-vue/app/components/FunnelBuilder.vue +28 -22
- package/frontend-vue/app/components/FunnelFigure.vue +15 -2
- package/frontend-vue/app/components/FunnelReport.vue +3 -0
- package/frontend-vue/app/components/FunnelTemplates.vue +15 -13
- package/frontend-vue/app/components/InstallGuide.vue +1 -1
- package/frontend-vue/app/components/PagePreview.vue +330 -74
- package/frontend-vue/app/components/PagesExplorer.vue +230 -85
- package/frontend-vue/app/components/TopListTabs.vue +51 -18
- package/frontend-vue/app/components/WebsiteCard.vue +394 -0
- package/frontend-vue/app/components/WebsiteCreate.vue +159 -0
- package/frontend-vue/app/components/WebsitePicker.vue +210 -0
- package/frontend-vue/app/components/WebsiteSettings.vue +539 -0
- package/frontend-vue/app/components/WorkspaceScope.vue +119 -0
- package/frontend-vue/app/composables/useContextWebsite.ts +105 -0
- package/frontend-vue/app/composables/useCopyDraft.ts +47 -0
- package/frontend-vue/app/composables/useMarketingApi.ts +92 -4
- package/frontend-vue/app/composables/useMarketingReads.ts +32 -23
- package/frontend-vue/app/composables/useMarketingRoutes.ts +25 -2
- package/frontend-vue/app/composables/useRecordCrumb.ts +17 -0
- package/frontend-vue/app/composables/useSnapshotFrame.ts +35 -1
- package/frontend-vue/app/utils/anchor-drift.ts +58 -0
- package/frontend-vue/app/utils/drift-dismissals.ts +20 -0
- package/frontend-vue/app/utils/fill-height.ts +141 -0
- package/frontend-vue/app/utils/format.ts +21 -2
- package/frontend-vue/app/utils/funnel-draft.ts +22 -0
- package/frontend-vue/app/utils/heatmap.ts +17 -0
- package/frontend-vue/app/utils/page-snapshot.ts +75 -0
- package/frontend-vue/app/utils/snapshot-options.ts +148 -0
- package/frontend-vue/app/utils/snapshotScrollRoot.ts +93 -0
- package/frontend-vue/app/utils/website-card.ts +93 -0
- package/frontend-vue/app/utils/website-purge.ts +95 -0
- package/frontend-vue/app/utils/website-settings.ts +121 -0
- package/frontend-vue/app/utils/website-state.ts +93 -0
- package/frontend-vue/app/utils/workspace-scope.ts +51 -0
- package/frontend-vue/i18n/locales/marketing-en-GB.json +112 -36
- package/frontend-vue/i18n/locales/marketing-fr-FR.json +112 -36
- package/frontend-vue/package.json +1 -1
- package/frontend-vue/tests/anchor-drift.test.ts +59 -0
- package/frontend-vue/tests/build-flags.test.ts +38 -0
- package/frontend-vue/tests/context-bar.test.ts +226 -0
- package/frontend-vue/tests/copy-draft.test.ts +64 -0
- package/frontend-vue/tests/drift-dismissals.test.ts +12 -0
- package/frontend-vue/tests/fill-height.test.ts +110 -0
- package/frontend-vue/tests/format.test.ts +14 -0
- package/frontend-vue/tests/funnel-draft.test.ts +37 -0
- package/frontend-vue/tests/heatmap.test.ts +25 -0
- package/frontend-vue/tests/install-guide.test.ts +25 -0
- package/frontend-vue/tests/marketing-reads.test.ts +20 -6
- package/frontend-vue/tests/page-snapshot.test.ts +62 -0
- package/frontend-vue/tests/record-crumb.test.ts +43 -0
- package/frontend-vue/tests/registration.test.ts +4 -1
- package/frontend-vue/tests/routes.test.ts +21 -0
- package/frontend-vue/tests/save-funnel.test.ts +47 -0
- package/frontend-vue/tests/server-parity.test.ts +3 -0
- package/frontend-vue/tests/snapshot-options.test.ts +148 -0
- package/frontend-vue/tests/snapshot-scroll-root.test.ts +84 -0
- package/frontend-vue/tests/stubs/frontend-module.ts +5 -1
- package/frontend-vue/tests/top-list-tabs.test.ts +158 -0
- package/frontend-vue/tests/website-card.test.ts +119 -0
- package/frontend-vue/tests/website-purge.test.ts +70 -0
- package/frontend-vue/tests/website-settings.test.ts +133 -0
- package/frontend-vue/tests/website-state.test.ts +96 -0
- package/frontend-vue/tests/workspace-scope-control.test.ts +113 -0
- package/frontend-vue/tests/workspace-scope.test.ts +55 -0
- package/package.json +5 -4
- package/skills/dms-marketing/SKILL.md +47 -6
- package/static/snapshot.js +539 -48
- package/static/tracker.js +154 -5
- package/frontend-vue/app/components/WebsitesGrid.vue +0 -812
|
@@ -12,11 +12,11 @@ export declare const snapshotRequestSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
12
12
|
width: z.ZodNumber;
|
|
13
13
|
height: z.ZodNumber;
|
|
14
14
|
}, "strip", z.ZodTypeAny, {
|
|
15
|
-
width: number;
|
|
16
15
|
height: number;
|
|
17
|
-
}, {
|
|
18
16
|
width: number;
|
|
17
|
+
}, {
|
|
19
18
|
height: number;
|
|
19
|
+
width: number;
|
|
20
20
|
}>;
|
|
21
21
|
colorScheme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
|
|
22
22
|
token: z.ZodString;
|
|
@@ -25,40 +25,40 @@ export declare const snapshotRequestSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
25
25
|
width: z.ZodNumber;
|
|
26
26
|
height: z.ZodNumber;
|
|
27
27
|
}, "strip", z.ZodTypeAny, {
|
|
28
|
-
width: number;
|
|
29
28
|
height: number;
|
|
30
|
-
}, {
|
|
31
29
|
width: number;
|
|
30
|
+
}, {
|
|
32
31
|
height: number;
|
|
32
|
+
width: number;
|
|
33
33
|
}>;
|
|
34
34
|
html: z.ZodString;
|
|
35
35
|
}, "strip", z.ZodTypeAny, {
|
|
36
36
|
url: string;
|
|
37
|
+
token: string;
|
|
38
|
+
html: string;
|
|
37
39
|
website: string;
|
|
38
40
|
viewport: {
|
|
39
|
-
width: number;
|
|
40
41
|
height: number;
|
|
42
|
+
width: number;
|
|
41
43
|
};
|
|
42
|
-
token: string;
|
|
43
44
|
document: {
|
|
44
|
-
width: number;
|
|
45
45
|
height: number;
|
|
46
|
+
width: number;
|
|
46
47
|
};
|
|
47
|
-
html: string;
|
|
48
48
|
colorScheme?: "light" | "dark" | undefined;
|
|
49
49
|
}, {
|
|
50
50
|
url: string;
|
|
51
|
+
token: string;
|
|
52
|
+
html: string;
|
|
51
53
|
website: string;
|
|
52
54
|
viewport: {
|
|
53
|
-
width: number;
|
|
54
55
|
height: number;
|
|
56
|
+
width: number;
|
|
55
57
|
};
|
|
56
|
-
token: string;
|
|
57
58
|
document: {
|
|
58
|
-
width: number;
|
|
59
59
|
height: number;
|
|
60
|
+
width: number;
|
|
60
61
|
};
|
|
61
|
-
html: string;
|
|
62
62
|
colorScheme?: "light" | "dark" | undefined;
|
|
63
63
|
}>, z.ZodObject<{
|
|
64
64
|
website: z.ZodString;
|
|
@@ -67,11 +67,11 @@ export declare const snapshotRequestSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
67
67
|
width: z.ZodNumber;
|
|
68
68
|
height: z.ZodNumber;
|
|
69
69
|
}, "strip", z.ZodTypeAny, {
|
|
70
|
-
width: number;
|
|
71
70
|
height: number;
|
|
72
|
-
}, {
|
|
73
71
|
width: number;
|
|
72
|
+
}, {
|
|
74
73
|
height: number;
|
|
74
|
+
width: number;
|
|
75
75
|
}>;
|
|
76
76
|
colorScheme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
|
|
77
77
|
token: z.ZodString;
|
|
@@ -79,22 +79,22 @@ export declare const snapshotRequestSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
79
79
|
oversizeBytes: z.ZodNumber;
|
|
80
80
|
}, "strip", z.ZodTypeAny, {
|
|
81
81
|
url: string;
|
|
82
|
+
token: string;
|
|
82
83
|
website: string;
|
|
83
84
|
viewport: {
|
|
84
|
-
width: number;
|
|
85
85
|
height: number;
|
|
86
|
+
width: number;
|
|
86
87
|
};
|
|
87
|
-
token: string;
|
|
88
88
|
oversizeBytes: number;
|
|
89
89
|
colorScheme?: "light" | "dark" | undefined;
|
|
90
90
|
}, {
|
|
91
91
|
url: string;
|
|
92
|
+
token: string;
|
|
92
93
|
website: string;
|
|
93
94
|
viewport: {
|
|
94
|
-
width: number;
|
|
95
95
|
height: number;
|
|
96
|
+
width: number;
|
|
96
97
|
};
|
|
97
|
-
token: string;
|
|
98
98
|
oversizeBytes: number;
|
|
99
99
|
colorScheme?: "light" | "dark" | undefined;
|
|
100
100
|
}>]>;
|
|
@@ -106,52 +106,52 @@ export declare const snapshotDeclarationSchema: z.ZodObject<Omit<{
|
|
|
106
106
|
width: z.ZodNumber;
|
|
107
107
|
height: z.ZodNumber;
|
|
108
108
|
}, "strip", z.ZodTypeAny, {
|
|
109
|
-
width: number;
|
|
110
109
|
height: number;
|
|
111
|
-
}, {
|
|
112
110
|
width: number;
|
|
111
|
+
}, {
|
|
113
112
|
height: number;
|
|
113
|
+
width: number;
|
|
114
114
|
}>;
|
|
115
115
|
colorScheme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
|
|
116
116
|
token: z.ZodString;
|
|
117
|
-
}, "
|
|
117
|
+
}, "token" | "website"> & {
|
|
118
118
|
websiteId: z.ZodString;
|
|
119
119
|
document: z.ZodObject<{
|
|
120
120
|
width: z.ZodNumber;
|
|
121
121
|
height: z.ZodNumber;
|
|
122
122
|
}, "strip", z.ZodTypeAny, {
|
|
123
|
-
width: number;
|
|
124
123
|
height: number;
|
|
125
|
-
}, {
|
|
126
124
|
width: number;
|
|
125
|
+
}, {
|
|
127
126
|
height: number;
|
|
127
|
+
width: number;
|
|
128
128
|
}>;
|
|
129
129
|
html: z.ZodString;
|
|
130
130
|
}, "strip", z.ZodTypeAny, {
|
|
131
131
|
url: string;
|
|
132
|
+
html: string;
|
|
132
133
|
websiteId: string;
|
|
133
134
|
viewport: {
|
|
134
|
-
width: number;
|
|
135
135
|
height: number;
|
|
136
|
+
width: number;
|
|
136
137
|
};
|
|
137
138
|
document: {
|
|
138
|
-
width: number;
|
|
139
139
|
height: number;
|
|
140
|
+
width: number;
|
|
140
141
|
};
|
|
141
|
-
html: string;
|
|
142
142
|
colorScheme?: "light" | "dark" | undefined;
|
|
143
143
|
}, {
|
|
144
144
|
url: string;
|
|
145
|
+
html: string;
|
|
145
146
|
websiteId: string;
|
|
146
147
|
viewport: {
|
|
147
|
-
width: number;
|
|
148
148
|
height: number;
|
|
149
|
+
width: number;
|
|
149
150
|
};
|
|
150
151
|
document: {
|
|
151
|
-
width: number;
|
|
152
152
|
height: number;
|
|
153
|
+
width: number;
|
|
153
154
|
};
|
|
154
|
-
html: string;
|
|
155
155
|
colorScheme?: "light" | "dark" | undefined;
|
|
156
156
|
}>;
|
|
157
157
|
export {};
|
package/dist/types/snapshots.js
CHANGED
|
@@ -34,7 +34,7 @@ const snapshotPageSchema = zod_1.z.object({
|
|
|
34
34
|
exports.snapshotRequestSchema = zod_1.z.union([
|
|
35
35
|
snapshotPageSchema.extend({
|
|
36
36
|
document: dimensionSchema(constants_1.MAX_SNAPSHOT_DOCUMENT_PX),
|
|
37
|
-
html: zod_1.z.string().min(1).max(constants_1.
|
|
37
|
+
html: zod_1.z.string().min(1).max(constants_1.MAX_SNAPSHOT_INFLATED_BYTES),
|
|
38
38
|
}),
|
|
39
39
|
snapshotPageSchema.extend({
|
|
40
40
|
oversizeBytes: zod_1.z.number().int().positive().max(constants_1.MAX_REPORTED_SNAPSHOT_BYTES),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snapshots.js","sourceRoot":"","sources":["../../src/types/snapshots.ts"],"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;
|
|
5
5
|
value: z.ZodString;
|
|
6
6
|
}, "strip", z.ZodTypeAny, {
|
|
7
|
-
kind: "
|
|
7
|
+
kind: "custom" | "url";
|
|
8
8
|
value: string;
|
|
9
9
|
}, {
|
|
10
|
-
kind: "
|
|
10
|
+
kind: "custom" | "url";
|
|
11
11
|
value: string;
|
|
12
12
|
}>, {
|
|
13
|
-
kind: "
|
|
13
|
+
kind: "custom" | "url";
|
|
14
14
|
value: string;
|
|
15
15
|
}, {
|
|
16
|
-
kind: "
|
|
16
|
+
kind: "custom" | "url";
|
|
17
17
|
value: string;
|
|
18
18
|
}>;
|
|
19
19
|
export type FunnelStepInput = z.output<typeof stepSchema>;
|
|
@@ -26,34 +26,34 @@ export declare class FunnelStepsType extends DataType {
|
|
|
26
26
|
kind: z.ZodEnum<["url", "custom"]>;
|
|
27
27
|
value: z.ZodString;
|
|
28
28
|
}, "strip", z.ZodTypeAny, {
|
|
29
|
-
kind: "
|
|
29
|
+
kind: "custom" | "url";
|
|
30
30
|
value: string;
|
|
31
31
|
}, {
|
|
32
|
-
kind: "
|
|
32
|
+
kind: "custom" | "url";
|
|
33
33
|
value: string;
|
|
34
34
|
}>, {
|
|
35
|
-
kind: "
|
|
35
|
+
kind: "custom" | "url";
|
|
36
36
|
value: string;
|
|
37
37
|
}, {
|
|
38
|
-
kind: "
|
|
38
|
+
kind: "custom" | "url";
|
|
39
39
|
value: string;
|
|
40
40
|
}>, "many">]>, any, string | {
|
|
41
|
-
kind: "
|
|
41
|
+
kind: "custom" | "url";
|
|
42
42
|
value: string;
|
|
43
43
|
}[]>, z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
44
44
|
kind: z.ZodEnum<["url", "custom"]>;
|
|
45
45
|
value: z.ZodString;
|
|
46
46
|
}, "strip", z.ZodTypeAny, {
|
|
47
|
-
kind: "
|
|
47
|
+
kind: "custom" | "url";
|
|
48
48
|
value: string;
|
|
49
49
|
}, {
|
|
50
|
-
kind: "
|
|
50
|
+
kind: "custom" | "url";
|
|
51
51
|
value: string;
|
|
52
52
|
}>, {
|
|
53
|
-
kind: "
|
|
53
|
+
kind: "custom" | "url";
|
|
54
54
|
value: string;
|
|
55
55
|
}, {
|
|
56
|
-
kind: "
|
|
56
|
+
kind: "custom" | "url";
|
|
57
57
|
value: string;
|
|
58
58
|
}>, "many">>;
|
|
59
59
|
}
|
|
@@ -22,6 +22,8 @@ interface ChannelsResponse {
|
|
|
22
22
|
items: ChannelRow[]
|
|
23
23
|
/** The comparison days lost their channel split: no delta to show. */
|
|
24
24
|
compareUnavailable?: boolean
|
|
25
|
+
/** Compared with a window that has rows: else no change column. */
|
|
26
|
+
compared?: boolean
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
const props = withDefaults(
|
|
@@ -34,6 +36,7 @@ const props = withDefaults(
|
|
|
34
36
|
{ periodScope: undefined, componentId: undefined, pageId: undefined },
|
|
35
37
|
)
|
|
36
38
|
|
|
39
|
+
/** The channels the route always lists, each in its row: the skeleton's. */
|
|
37
40
|
const SKELETON_ROWS = 6
|
|
38
41
|
/** The key the campaigns table is mounted under on the page: its tab reads `?campaigns.tab=`. */
|
|
39
42
|
const CAMPAIGNS_TAB_QUERY = 'campaigns.tab'
|
|
@@ -48,6 +51,12 @@ const { data, isLoading, error, refresh } = useChartFetch<ChannelsResponse>({
|
|
|
48
51
|
})
|
|
49
52
|
|
|
50
53
|
const rows = computed(() => data.value?.items ?? [])
|
|
54
|
+
/**
|
|
55
|
+
* The change column, while the period is compared (kept through a re-read):
|
|
56
|
+
* "No comparison" leaves it out rather than a column of dashes.
|
|
57
|
+
*/
|
|
58
|
+
const compared = computed(() => data.value?.compared !== false)
|
|
59
|
+
const columns = computed(() => (compared.value ? 5 : 4))
|
|
51
60
|
const maxShare = computed(() =>
|
|
52
61
|
Math.max(1, ...rows.value.map((row) => row.share)),
|
|
53
62
|
)
|
|
@@ -168,6 +177,7 @@ function showCampaigns(channel: string): void {
|
|
|
168
177
|
{{ t('page.marketing.acquisition.channels.share') }}
|
|
169
178
|
</th>
|
|
170
179
|
<th
|
|
180
|
+
v-if="compared"
|
|
171
181
|
scope="col"
|
|
172
182
|
class="px-4 py-2 text-right font-normal"
|
|
173
183
|
:title="t('page.marketing.acquisition.channels.vs_previous_hint')"
|
|
@@ -182,9 +192,16 @@ function showCampaigns(channel: string): void {
|
|
|
182
192
|
:key="index"
|
|
183
193
|
class="border-t border-default"
|
|
184
194
|
>
|
|
185
|
-
|
|
195
|
+
<!-- A channel row's size: its icon well sets the height. -->
|
|
196
|
+
<td class="w-10 py-2.5 ps-4">
|
|
197
|
+
<USkeleton class="size-8 rounded-[9px]" />
|
|
198
|
+
</td>
|
|
199
|
+
<td class="px-2 py-2.5" :colspan="columns - 2">
|
|
186
200
|
<USkeleton class="h-4 w-full" />
|
|
187
201
|
</td>
|
|
202
|
+
<td class="px-4 py-2.5">
|
|
203
|
+
<USkeleton class="ms-auto h-4 w-12" />
|
|
204
|
+
</td>
|
|
188
205
|
</tr>
|
|
189
206
|
</tbody>
|
|
190
207
|
<tbody v-else :class="isLoading ? 'opacity-60' : ''">
|
|
@@ -243,7 +260,7 @@ function showCampaigns(channel: string): void {
|
|
|
243
260
|
>
|
|
244
261
|
{{ formatPercentage(row.share / 100, locale, fractionDigits(1)) }}
|
|
245
262
|
</td>
|
|
246
|
-
<td class="px-4 py-2.5 text-right">
|
|
263
|
+
<td v-if="compared" class="px-4 py-2.5 text-right">
|
|
247
264
|
<span
|
|
248
265
|
class="rounded px-1.5 py-0.5 font-mono text-[11px] whitespace-nowrap tabular-nums"
|
|
249
266
|
:class="deltaClass(row.delta)"
|