strapi-plugin-hubspot 0.4.2 → 0.6.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +116 -4
  3. package/dist/_chunks/Forms-BF4_zA-m.js +1007 -0
  4. package/dist/_chunks/Forms-CW1KFO9U.mjs +989 -0
  5. package/dist/_chunks/{HubspotObjectInput-DutelVp6.mjs → HubspotObjectInput-CpxeM2J0.mjs} +4 -16
  6. package/dist/_chunks/{HubspotObjectInput-Br2jTFkG.js → HubspotObjectInput-hjAYWtaU.js} +4 -16
  7. package/dist/_chunks/HubspotPropertyInput-C-52Lu24.mjs +227 -0
  8. package/dist/_chunks/HubspotPropertyInput-OSeIBaRC.js +245 -0
  9. package/dist/_chunks/Settings-2V7TH5CX.mjs +321 -0
  10. package/dist/_chunks/Settings-DcA9M5Tw.js +339 -0
  11. package/dist/_chunks/en-CJ9wYHgN.mjs +197 -0
  12. package/dist/_chunks/en-C_-N8cjv.js +197 -0
  13. package/dist/_chunks/fr-BHObPoUp.js +197 -0
  14. package/dist/_chunks/fr-DttDn-2Y.mjs +197 -0
  15. package/dist/_chunks/{Settings-CQsB0B2T.mjs → index-C1UJXE_o.mjs} +576 -317
  16. package/dist/_chunks/{index-BUlB1rK9.js → index-CMzg-x5i.js} +12 -4
  17. package/dist/_chunks/{Settings-CvbKVl-t.js → index-Dgbid2LK.js} +580 -322
  18. package/dist/_chunks/{index-CKoBcX1T.mjs → index-DkGOTp8p.mjs} +12 -4
  19. package/dist/_chunks/{objectLabels-dM4o67Fz.mjs → objectLabels-D9UEuOGr.mjs} +1 -1
  20. package/dist/_chunks/{objectLabels-B76t8qqg.js → objectLabels-Th7aYW-B.js} +1 -1
  21. package/dist/_chunks/useHubspotSchema-Bgrgg8Mt.js +75 -0
  22. package/dist/_chunks/useHubspotSchema-DQkQcA_V.mjs +58 -0
  23. package/dist/admin/index.js +2 -1
  24. package/dist/admin/index.mjs +2 -1
  25. package/dist/admin/src/builder/ConditionEditor.d.ts +17 -0
  26. package/dist/admin/src/builder/FieldPanel.d.ts +16 -0
  27. package/dist/admin/src/builder/types.d.ts +90 -0
  28. package/dist/admin/src/index.d.ts +1 -0
  29. package/dist/admin/src/pages/FormEditor.d.ts +9 -0
  30. package/dist/admin/src/pages/Forms.d.ts +4 -0
  31. package/dist/admin/src/pages/FormsList.d.ts +8 -0
  32. package/dist/admin/src/useHubspotSchema.d.ts +28 -0
  33. package/dist/server/index.js +880 -5
  34. package/dist/server/index.mjs +880 -5
  35. package/dist/server/src/__tests__/conditions.test.d.ts +1 -0
  36. package/dist/server/src/__tests__/forms.test.d.ts +1 -0
  37. package/dist/server/src/__tests__/formsSubmit.test.d.ts +1 -0
  38. package/dist/server/src/__tests__/importLegacy.test.d.ts +1 -0
  39. package/dist/server/src/conditions.d.ts +88 -0
  40. package/dist/server/src/content-types.d.ts +161 -9
  41. package/dist/server/src/forms.d.ts +81 -0
  42. package/dist/server/src/formsAdmin.d.ts +39 -0
  43. package/dist/server/src/importLegacy.d.ts +25 -0
  44. package/dist/server/src/index.d.ts +214 -16
  45. package/dist/shared/types.d.ts +103 -0
  46. package/dist/shared/types.js +2 -0
  47. package/dist/shared/types.mjs +2 -0
  48. package/package.json +23 -6
  49. package/dist/_chunks/HubspotPropertyInput-CK6Yj9rC.mjs +0 -177
  50. package/dist/_chunks/HubspotPropertyInput-DIPDPRXJ.js +0 -195
  51. package/dist/_chunks/en-D4ueeUcJ.mjs +0 -82
  52. package/dist/_chunks/en-PBG7-vMR.js +0 -82
  53. package/dist/_chunks/fr-DL4wdV8I.js +0 -82
  54. package/dist/_chunks/fr-DYnxVmIO.mjs +0 -82
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ const icons = require("@strapi/icons");
2
3
  const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
3
4
  const v = glob[path];
4
5
  if (v) {
@@ -20,6 +21,13 @@ const getTranslation = (id) => `${PLUGIN_ID}.${id}`;
20
21
  const prefixPluginTranslations = (trad) => Object.fromEntries(Object.entries(trad).map(([key, value]) => [getTranslation(key), value]));
21
22
  const index = {
22
23
  register(app) {
24
+ app.addMenuLink({
25
+ to: `plugins/${PLUGIN_ID}`,
26
+ icon: icons.PaperPlane,
27
+ intlLabel: { id: `${PLUGIN_ID}.menu.label`, defaultMessage: "HubSpot Forms" },
28
+ permissions: [{ action: `plugin::${PLUGIN_ID}.forms`, subject: null }],
29
+ Component: async () => (await Promise.resolve().then(() => require("./Forms-BF4_zA-m.js"))).default
30
+ });
23
31
  app.customFields.register({
24
32
  name: "property",
25
33
  pluginId: PLUGIN_ID,
@@ -33,7 +41,7 @@ const index = {
33
41
  defaultMessage: "Picked from the portal's real properties"
34
42
  },
35
43
  components: {
36
- Input: async () => Promise.resolve().then(() => require("./HubspotPropertyInput-DIPDPRXJ.js"))
44
+ Input: async () => Promise.resolve().then(() => require("./HubspotPropertyInput-OSeIBaRC.js"))
37
45
  },
38
46
  // Exposed in the Content-Type Builder. Without this, `objectField` could
39
47
  // only be set by hand-editing schema.json — which is not how anyone
@@ -96,7 +104,7 @@ const index = {
96
104
  defaultMessage: "Picked from the portal's configured objects"
97
105
  },
98
106
  components: {
99
- Input: async () => Promise.resolve().then(() => require("./HubspotObjectInput-Br2jTFkG.js"))
107
+ Input: async () => Promise.resolve().then(() => require("./HubspotObjectInput-hjAYWtaU.js"))
100
108
  }
101
109
  });
102
110
  app.createSettingSection(
@@ -112,7 +120,7 @@ const index = {
112
120
  // Mirrors the RBAC action registered server-side: a role without it
113
121
  // doesn't see the link at all — the routes refuse it anyway.
114
122
  permissions: [{ action: `plugin::${PLUGIN_ID}.settings`, subject: null }],
115
- Component: async () => (await Promise.resolve().then(() => require("./Settings-CvbKVl-t.js"))).default
123
+ Component: async () => (await Promise.resolve().then(() => require("./Settings-DcA9M5Tw.js"))).default
116
124
  }
117
125
  ]
118
126
  );
@@ -122,7 +130,7 @@ const index = {
122
130
  return Promise.all(
123
131
  locales.map(async (locale) => {
124
132
  try {
125
- const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => Promise.resolve().then(() => require("./en-PBG7-vMR.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-DL4wdV8I.js")) }), `./translations/${locale}.json`, 3);
133
+ const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => Promise.resolve().then(() => require("./en-C_-N8cjv.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-BHObPoUp.js")) }), `./translations/${locale}.json`, 3);
126
134
  return { data: prefixPluginTranslations(data), locale };
127
135
  } catch {
128
136
  return { data: {}, locale };