@webiny/ai-powerups 6.5.0-beta.1 → 6.5.0-beta.3

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.
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
- export declare const CmsEntryWizardGate: (() => React.JSX.Element) & {
2
+ export declare const CmsEntryWizardGate: (() => React.JSX.Element | null) & {
3
3
  displayName: string;
4
4
  };
@@ -1,17 +1,20 @@
1
1
  import react, { useEffect } from "react";
2
2
  import { observer } from "mobx-react-lite";
3
+ import { useWcp } from "@webiny/app-admin";
3
4
  import { useModel } from "@webiny/app-headless-cms/admin/components/ModelProvider/useModel.js";
4
5
  import { useContentEntryFormPresenter } from "@webiny/app-headless-cms/exports/admin/cms/entry/editor.js";
5
6
  import { CmsEntryWizard } from "./CmsEntryWizard.js";
6
7
  const CmsEntryWizardGate = observer(()=>{
8
+ const wcp = useWcp();
7
9
  const { model } = useModel();
8
10
  const formPresenter = useContentEntryFormPresenter();
9
- const showWizard = model.settings?.aiEntryWizard === true;
11
+ const showWizard = model.settings?.aiEntryWizard === true && wcp.canUseAiEntryGeneration();
10
12
  useEffect(()=>{
11
13
  if (!showWizard) formPresenter.newEntry();
12
14
  }, [
13
15
  showWizard
14
16
  ]);
17
+ if (!showWizard) return null;
15
18
  return /*#__PURE__*/ react.createElement(CmsEntryWizard, null);
16
19
  });
17
20
  export { CmsEntryWizardGate };
@@ -1 +1 @@
1
- {"version":3,"file":"admin/presentation/CmsEntryWizard/CmsEntryWizardGate.js","sources":["../../../../src/admin/presentation/CmsEntryWizard/CmsEntryWizardGate.tsx"],"sourcesContent":["import React, { useEffect } from \"react\";\nimport { observer } from \"mobx-react-lite\";\nimport { useModel } from \"@webiny/app-headless-cms/admin/components/ModelProvider/useModel.js\";\nimport { useContentEntryFormPresenter } from \"@webiny/app-headless-cms/exports/admin/cms/entry/editor.js\";\nimport { CmsEntryWizard } from \"./CmsEntryWizard.js\";\n\nexport const CmsEntryWizardGate = observer(() => {\n const { model } = useModel();\n const formPresenter = useContentEntryFormPresenter();\n\n const showWizard = model.settings?.aiEntryWizard === true;\n\n useEffect(() => {\n if (!showWizard) {\n formPresenter.newEntry();\n }\n }, [showWizard]);\n\n return <CmsEntryWizard />;\n});\n"],"names":["CmsEntryWizardGate","observer","model","useModel","formPresenter","useContentEntryFormPresenter","showWizard","useEffect","CmsEntryWizard"],"mappings":";;;;;AAMO,MAAMA,qBAAqBC,SAAS;IACvC,MAAM,EAAEC,KAAK,EAAE,GAAGC;IAClB,MAAMC,gBAAgBC;IAEtB,MAAMC,aAAaJ,MAAM,QAAQ,EAAE,kBAAkB;IAErDK,UAAU;QACN,IAAI,CAACD,YACDF,cAAc,QAAQ;IAE9B,GAAG;QAACE;KAAW;IAEf,OAAO,WAAP,GAAO,oBAACE,gBAAcA;AAC1B"}
1
+ {"version":3,"file":"admin/presentation/CmsEntryWizard/CmsEntryWizardGate.js","sources":["../../../../src/admin/presentation/CmsEntryWizard/CmsEntryWizardGate.tsx"],"sourcesContent":["import React, { useEffect } from \"react\";\nimport { observer } from \"mobx-react-lite\";\nimport { useWcp } from \"@webiny/app-admin\";\nimport { useModel } from \"@webiny/app-headless-cms/admin/components/ModelProvider/useModel.js\";\nimport { useContentEntryFormPresenter } from \"@webiny/app-headless-cms/exports/admin/cms/entry/editor.js\";\nimport { CmsEntryWizard } from \"./CmsEntryWizard.js\";\n\nexport const CmsEntryWizardGate = observer(() => {\n const wcp = useWcp();\n const { model } = useModel();\n const formPresenter = useContentEntryFormPresenter();\n\n /**\n * The AI wizard depends on the CMS content generation feature, which is only registered\n * when the license allows AI entry generation.\n */\n const showWizard = model.settings?.aiEntryWizard === true && wcp.canUseAiEntryGeneration();\n\n useEffect(() => {\n if (!showWizard) {\n formPresenter.newEntry();\n }\n }, [showWizard]);\n\n if (!showWizard) {\n return null;\n }\n\n return <CmsEntryWizard />;\n});\n"],"names":["CmsEntryWizardGate","observer","wcp","useWcp","model","useModel","formPresenter","useContentEntryFormPresenter","showWizard","useEffect","CmsEntryWizard"],"mappings":";;;;;;AAOO,MAAMA,qBAAqBC,SAAS;IACvC,MAAMC,MAAMC;IACZ,MAAM,EAAEC,KAAK,EAAE,GAAGC;IAClB,MAAMC,gBAAgBC;IAMtB,MAAMC,aAAaJ,MAAM,QAAQ,EAAE,kBAAkB,QAAQF,IAAI,uBAAuB;IAExFO,UAAU;QACN,IAAI,CAACD,YACDF,cAAc,QAAQ;IAE9B,GAAG;QAACE;KAAW;IAEf,IAAI,CAACA,YACD,OAAO;IAGX,OAAO,WAAP,GAAO,oBAACE,gBAAcA;AAC1B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/ai-powerups",
3
- "version": "6.5.0-beta.1",
3
+ "version": "6.5.0-beta.3",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "exports": {
@@ -18,26 +18,26 @@
18
18
  "author": "Webiny Ltd.",
19
19
  "license": "Webiny Enterprise",
20
20
  "dependencies": {
21
- "@webiny/admin-ui": "6.5.0-beta.1",
22
- "@webiny/api-core": "6.5.0-beta.1",
23
- "@webiny/api-file-manager": "6.5.0-beta.1",
24
- "@webiny/api-headless-cms": "6.5.0-beta.1",
25
- "@webiny/api-website-builder": "6.5.0-beta.1",
26
- "@webiny/api-websockets": "6.5.0-beta.1",
27
- "@webiny/app": "6.5.0-beta.1",
28
- "@webiny/app-admin": "6.5.0-beta.1",
29
- "@webiny/app-headless-cms": "6.5.0-beta.1",
30
- "@webiny/app-website-builder": "6.5.0-beta.1",
31
- "@webiny/app-websockets": "6.5.0-beta.1",
32
- "@webiny/background-tasks": "6.5.0-beta.1",
21
+ "@webiny/admin-ui": "6.5.0-beta.3",
22
+ "@webiny/api-core": "6.5.0-beta.3",
23
+ "@webiny/api-file-manager": "6.5.0-beta.3",
24
+ "@webiny/api-headless-cms": "6.5.0-beta.3",
25
+ "@webiny/api-website-builder": "6.5.0-beta.3",
26
+ "@webiny/api-websockets": "6.5.0-beta.3",
27
+ "@webiny/app": "6.5.0-beta.3",
28
+ "@webiny/app-admin": "6.5.0-beta.3",
29
+ "@webiny/app-headless-cms": "6.5.0-beta.3",
30
+ "@webiny/app-website-builder": "6.5.0-beta.3",
31
+ "@webiny/app-websockets": "6.5.0-beta.3",
32
+ "@webiny/background-tasks": "6.5.0-beta.3",
33
33
  "@webiny/di": "1.0.2",
34
- "@webiny/feature": "6.5.0-beta.1",
35
- "@webiny/icons": "6.5.0-beta.1",
36
- "@webiny/languages": "6.5.0-beta.1",
37
- "@webiny/lexical-converter": "6.5.0-beta.1",
38
- "@webiny/project": "6.5.0-beta.1",
39
- "@webiny/project-aws": "6.5.0-beta.1",
40
- "@webiny/utils": "6.5.0-beta.1",
34
+ "@webiny/feature": "6.5.0-beta.3",
35
+ "@webiny/icons": "6.5.0-beta.3",
36
+ "@webiny/languages": "6.5.0-beta.3",
37
+ "@webiny/lexical-converter": "6.5.0-beta.3",
38
+ "@webiny/project": "6.5.0-beta.3",
39
+ "@webiny/project-aws": "6.5.0-beta.3",
40
+ "@webiny/utils": "6.5.0-beta.3",
41
41
  "ai": "7.0.34",
42
42
  "front-matter": "4.0.2",
43
43
  "happy-dom": "20.11.1",
@@ -49,11 +49,11 @@
49
49
  "zod": "4.4.3"
50
50
  },
51
51
  "devDependencies": {
52
- "@webiny/build-tools": "6.5.0-beta.1",
53
- "@webiny/handler-aws": "6.5.0-beta.1",
54
- "@webiny/handler-graphql": "6.5.0-beta.1",
55
- "@webiny/project-utils": "6.5.0-beta.1",
56
- "@webiny/wcp": "6.5.0-beta.1",
52
+ "@webiny/build-tools": "6.5.0-beta.3",
53
+ "@webiny/handler-aws": "6.5.0-beta.3",
54
+ "@webiny/handler-graphql": "6.5.0-beta.3",
55
+ "@webiny/project-utils": "6.5.0-beta.3",
56
+ "@webiny/wcp": "6.5.0-beta.3",
57
57
  "rimraf": "6.1.3",
58
58
  "typescript": "7.0.2",
59
59
  "vitest": "4.1.10"