@fayz-ai/plugin-marketing 0.1.5 → 0.2.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/index.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -7
- package/src/index.ts +7 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fayz-ai/plugin-marketing",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Fayz SDK — marketing campaigns & broadcasts plugin",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"@tanstack/react-table": "^8.20.0",
|
|
27
27
|
"lucide-react": "^0.400.0",
|
|
28
28
|
"zustand": "^4.5.0",
|
|
29
|
-
"@fayz-ai/
|
|
30
|
-
"@fayz-ai/
|
|
31
|
-
"@fayz-ai/
|
|
29
|
+
"@fayz-ai/core": "^0.6.6",
|
|
30
|
+
"@fayz-ai/saas": "^0.6.6",
|
|
31
|
+
"@fayz-ai/ui": "^0.6.6"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/react": "^18.3.0",
|
|
@@ -43,9 +43,6 @@
|
|
|
43
43
|
"fayz-plugin",
|
|
44
44
|
"fayz-sdk"
|
|
45
45
|
],
|
|
46
|
-
"publishConfig": {
|
|
47
|
-
"access": "public"
|
|
48
|
-
},
|
|
49
46
|
"scripts": {
|
|
50
47
|
"build": "tsup && tsc --emitDeclarationOnly --declaration --declarationMap --noEmit false",
|
|
51
48
|
"dev": "tsup --watch",
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import type { PluginManifest, PluginScope, VerticalId } from '@fayz-ai/core'
|
|
2
|
+
import type { PluginManifest, PluginRegistryDef, PluginScope, VerticalId } from '@fayz-ai/core'
|
|
3
3
|
import { getSupabaseClientOptional, registerTranslations } from '@fayz-ai/core'
|
|
4
4
|
import { PluginSettingsPanel } from '@fayz-ai/saas'
|
|
5
5
|
import { MarketingPage } from './MarketingPage'
|
|
@@ -50,6 +50,8 @@ export interface MarketingPluginOptions {
|
|
|
50
50
|
scope?: PluginScope
|
|
51
51
|
verticalId?: VerticalId
|
|
52
52
|
dataProvider?: MarketingDataProvider
|
|
53
|
+
/** App/vertical-owned settings registries rendered inside Marketing settings. */
|
|
54
|
+
settingsRegistries?: PluginRegistryDef[]
|
|
53
55
|
/** Optional DI to read real conversions (mounted later). */
|
|
54
56
|
attributionBridge?: AttributionBridge
|
|
55
57
|
/** Optional DI to read real landing-page performance (mounted later). */
|
|
@@ -101,7 +103,10 @@ export function createMarketingPlugin(options?: MarketingPluginOptions): PluginM
|
|
|
101
103
|
// Settings lives in the SDK-core central Settings area (not a module tab).
|
|
102
104
|
// General preferences (channel tracking toggles) + a Channels registry tab,
|
|
103
105
|
// mirroring how plugin-menu surfaces Allergens.
|
|
104
|
-
const marketingRegistries =
|
|
106
|
+
const marketingRegistries = [
|
|
107
|
+
...buildMarketingRegistries(config.channels),
|
|
108
|
+
...(options?.settingsRegistries ?? []),
|
|
109
|
+
]
|
|
105
110
|
const SettingsComponent: React.ComponentType<unknown> = () =>
|
|
106
111
|
React.createElement(MarketingContextProvider, { config, provider, store },
|
|
107
112
|
React.createElement(PluginSettingsPanel, {
|