strapi-plugin-hubspot 0.9.0 → 0.11.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 (36) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/_chunks/{Forms-BsKys-Hc.mjs → Forms-DadTbe9Q.mjs} +203 -16
  3. package/dist/_chunks/{Forms-JuzNfsbL.js → Forms-Dn2W6OS4.js} +202 -15
  4. package/dist/_chunks/{HubspotFormInput-CIvHS5rp.mjs → HubspotFormInput-NO59AtM_.mjs} +1 -1
  5. package/dist/_chunks/{HubspotFormInput-ph9pe6xY.js → HubspotFormInput-S_Z2t_DN.js} +1 -1
  6. package/dist/_chunks/{HubspotObjectInput-dAd-lMdD.js → HubspotObjectInput-BIgIa_Dm.js} +3 -3
  7. package/dist/_chunks/{HubspotObjectInput-BX1qYD2c.mjs → HubspotObjectInput-DAo3FAMz.mjs} +3 -3
  8. package/dist/_chunks/{HubspotPropertyInput-BM3ZaY8f.js → HubspotPropertyInput-B-piLcIy.js} +3 -3
  9. package/dist/_chunks/{HubspotPropertyInput-C2Z6472q.mjs → HubspotPropertyInput-KX1Bhcsl.mjs} +3 -3
  10. package/dist/_chunks/{Settings-Cdcjy9DA.js → Settings-DMu_QThB.js} +2 -2
  11. package/dist/_chunks/{Settings-DnwGetcc.mjs → Settings-Dz0PEFOv.mjs} +2 -2
  12. package/dist/_chunks/{en-Cqfair98.js → en-BDGqW_yS.js} +24 -1
  13. package/dist/_chunks/{en-CcQWnXra.mjs → en-CH5LSPkL.mjs} +24 -1
  14. package/dist/_chunks/{fr-CBRZ9q8U.mjs → fr-65-RaB3w.mjs} +24 -1
  15. package/dist/_chunks/{fr-D117-3Ta.js → fr-C82LMqUM.js} +24 -1
  16. package/dist/_chunks/{index-BbRtXnAL.js → index-B7Ru1fu5.js} +6 -6
  17. package/dist/_chunks/{index-LTaVoyWJ.mjs → index-DA31TY2n.mjs} +6 -6
  18. package/dist/_chunks/{objectLabels-DE2xGq7f.mjs → objectLabels-Bl7sO5pb.mjs} +1 -1
  19. package/dist/_chunks/{objectLabels-DU0Cagt_.js → objectLabels-FTh984_h.js} +1 -1
  20. package/dist/_chunks/{useHubspotSchema-BSKow0X3.mjs → useHubspotSchema-BlDilCHc.mjs} +1 -1
  21. package/dist/_chunks/{useHubspotSchema-DzBMAxv7.js → useHubspotSchema-C2_PuXEm.js} +1 -1
  22. package/dist/admin/index.js +1 -1
  23. package/dist/admin/index.mjs +1 -1
  24. package/dist/admin/src/builder/CompanyMapEditor.d.ts +14 -0
  25. package/dist/admin/src/builder/types.d.ts +14 -2
  26. package/dist/server/index.js +1029 -17
  27. package/dist/server/index.mjs +1029 -17
  28. package/dist/server/src/__tests__/company.test.d.ts +1 -0
  29. package/dist/server/src/company.d.ts +79 -0
  30. package/dist/server/src/conditions.d.ts +7 -1
  31. package/dist/server/src/content-types.d.ts +3 -0
  32. package/dist/server/src/data/naf.d.ts +1 -0
  33. package/dist/server/src/forms.d.ts +16 -0
  34. package/dist/server/src/index.d.ts +13 -0
  35. package/dist/shared/types.d.ts +51 -2
  36. package/package.json +2 -2
@@ -3,7 +3,7 @@ import * as React from "react";
3
3
  import { u as useIntl } from "./index-CEh8vkxY.mjs";
4
4
  import { Field, Flex, Loader, Combobox, ComboboxOption } from "@strapi/design-system";
5
5
  import { useFetchClient } from "@strapi/strapi/admin";
6
- import { P as PLUGIN_ID, g as getTranslation } from "./index-LTaVoyWJ.mjs";
6
+ import { P as PLUGIN_ID, g as getTranslation } from "./index-DA31TY2n.mjs";
7
7
  const HubspotFormInput = React.forwardRef(
8
8
  ({ name, value, onChange, disabled, error, required, label, hint, labelAction }, ref) => {
9
9
  const { formatMessage } = useIntl();
@@ -5,7 +5,7 @@ const React = require("react");
5
5
  const index = require("./index-DkTxsEqL.js");
6
6
  const designSystem = require("@strapi/design-system");
7
7
  const admin = require("@strapi/strapi/admin");
8
- const index$1 = require("./index-BbRtXnAL.js");
8
+ const index$1 = require("./index-B7Ru1fu5.js");
9
9
  function _interopNamespace(e) {
10
10
  if (e && e.__esModule) return e;
11
11
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -4,9 +4,9 @@ const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
5
  const index = require("./index-DkTxsEqL.js");
6
6
  const designSystem = require("@strapi/design-system");
7
- const index$1 = require("./index-BbRtXnAL.js");
8
- const objectLabels = require("./objectLabels-DU0Cagt_.js");
9
- const useHubspotSchema = require("./useHubspotSchema-DzBMAxv7.js");
7
+ const index$1 = require("./index-B7Ru1fu5.js");
8
+ const objectLabels = require("./objectLabels-FTh984_h.js");
9
+ const useHubspotSchema = require("./useHubspotSchema-C2_PuXEm.js");
10
10
  function _interopNamespace(e) {
11
11
  if (e && e.__esModule) return e;
12
12
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -2,9 +2,9 @@ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import { u as useIntl } from "./index-CEh8vkxY.mjs";
4
4
  import { Field, Flex, Loader, SingleSelect, SingleSelectOption } from "@strapi/design-system";
5
- import { g as getTranslation } from "./index-LTaVoyWJ.mjs";
6
- import { o as objectLabel } from "./objectLabels-DE2xGq7f.mjs";
7
- import { u as useHubspotSchema } from "./useHubspotSchema-BSKow0X3.mjs";
5
+ import { g as getTranslation } from "./index-DA31TY2n.mjs";
6
+ import { o as objectLabel } from "./objectLabels-Bl7sO5pb.mjs";
7
+ import { u as useHubspotSchema } from "./useHubspotSchema-BlDilCHc.mjs";
8
8
  const HubspotObjectInput = React.forwardRef(
9
9
  ({ name, value, onChange, disabled, error, required, label, hint, labelAction }, ref) => {
10
10
  const intl = useIntl();
@@ -6,9 +6,9 @@ const index = require("./index-DkTxsEqL.js");
6
6
  const designSystem = require("@strapi/design-system");
7
7
  const icons = require("@strapi/icons");
8
8
  const admin = require("@strapi/strapi/admin");
9
- const index$1 = require("./index-BbRtXnAL.js");
10
- const objectLabels = require("./objectLabels-DU0Cagt_.js");
11
- const useHubspotSchema = require("./useHubspotSchema-DzBMAxv7.js");
9
+ const index$1 = require("./index-B7Ru1fu5.js");
10
+ const objectLabels = require("./objectLabels-FTh984_h.js");
11
+ const useHubspotSchema = require("./useHubspotSchema-C2_PuXEm.js");
12
12
  function _interopNamespace(e) {
13
13
  if (e && e.__esModule) return e;
14
14
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -4,9 +4,9 @@ import { u as useIntl } from "./index-CEh8vkxY.mjs";
4
4
  import { Field, Flex, Loader, Combobox, ComboboxOption, IconButton, Button, Typography, Link } from "@strapi/design-system";
5
5
  import { ArrowClockwise } from "@strapi/icons";
6
6
  import { useField } from "@strapi/strapi/admin";
7
- import { g as getTranslation } from "./index-LTaVoyWJ.mjs";
8
- import { o as objectLabel } from "./objectLabels-DE2xGq7f.mjs";
9
- import { u as useHubspotSchema } from "./useHubspotSchema-BSKow0X3.mjs";
7
+ import { g as getTranslation } from "./index-DA31TY2n.mjs";
8
+ import { o as objectLabel } from "./objectLabels-Bl7sO5pb.mjs";
9
+ import { u as useHubspotSchema } from "./useHubspotSchema-BlDilCHc.mjs";
10
10
  const oneLine = {
11
11
  display: "block",
12
12
  whiteSpace: "nowrap",
@@ -5,9 +5,9 @@ const React = require("react");
5
5
  const index = require("./index-DkTxsEqL.js");
6
6
  const designSystem = require("@strapi/design-system");
7
7
  const admin = require("@strapi/strapi/admin");
8
- const index$1 = require("./index-BbRtXnAL.js");
8
+ const index$1 = require("./index-B7Ru1fu5.js");
9
9
  const reactRouterDom = require("react-router-dom");
10
- const objectLabels = require("./objectLabels-DU0Cagt_.js");
10
+ const objectLabels = require("./objectLabels-FTh984_h.js");
11
11
  function _interopNamespace(e) {
12
12
  if (e && e.__esModule) return e;
13
13
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -3,9 +3,9 @@ import * as React from "react";
3
3
  import { u as useIntl } from "./index-CEh8vkxY.mjs";
4
4
  import { Flex, Divider, Typography, Button, Box, Link, Badge, Loader, Field } from "@strapi/design-system";
5
5
  import { useFetchClient } from "@strapi/strapi/admin";
6
- import { g as getTranslation, P as PLUGIN_ID } from "./index-LTaVoyWJ.mjs";
6
+ import { g as getTranslation, P as PLUGIN_ID } from "./index-DA31TY2n.mjs";
7
7
  import { Link as Link$1 } from "react-router-dom";
8
- import { o as objectLabel } from "./objectLabels-DE2xGq7f.mjs";
8
+ import { o as objectLabel } from "./objectLabels-Bl7sO5pb.mjs";
9
9
  const AuditSection = ({ configured }) => {
10
10
  const intl = useIntl();
11
11
  const { formatMessage } = intl;
@@ -246,6 +246,29 @@ const en = {
246
246
  "submissions.prev": "Previous",
247
247
  "submissions.next": "Next",
248
248
  "submissions.page": "{page} / {pages}",
249
- "submissions.meta-page": "Submitted from"
249
+ "submissions.meta-page": "Submitted from",
250
+ "condition.op.in": "is any of",
251
+ "condition.op.notIn": "is none of",
252
+ "condition.op.notContains": "doesn't contain",
253
+ "condition.op.startsWith": "starts with",
254
+ "condition.op.endsWith": "ends with",
255
+ "condition.values": "Values",
256
+ "condition.values-placeholder": "value1, value2…",
257
+ "company.section": "Company data (INSEE → HubSpot)",
258
+ "company.section-hint": "The visitor picks their company from the SIRENE registry; the server re-resolves the SIRET and sends each datum below to its property.",
259
+ "company.examples": "Placeholder examples (one per line)",
260
+ "company.examples-placeholder": "Ex. : un établissement d'un grand groupe\nEx. : le siège de votre PME",
261
+ "company.add-datum": "Send another datum",
262
+ "company.remove-datum": "Stop sending this datum",
263
+ "company.datum.name": "Legal name",
264
+ "company.datum.siret": "SIRET",
265
+ "company.datum.siren": "SIREN",
266
+ "company.datum.address": "Address",
267
+ "company.datum.zip": "Postal code",
268
+ "company.datum.city": "City",
269
+ "company.datum.headquarters": "Is headquarters",
270
+ "company.datum.naf": "NAF code",
271
+ "company.datum.nafLabel": "NAF label",
272
+ "company.datum.headcount": "Headcount range"
250
273
  };
251
274
  exports.default = en;
@@ -244,7 +244,30 @@ const en = {
244
244
  "submissions.prev": "Previous",
245
245
  "submissions.next": "Next",
246
246
  "submissions.page": "{page} / {pages}",
247
- "submissions.meta-page": "Submitted from"
247
+ "submissions.meta-page": "Submitted from",
248
+ "condition.op.in": "is any of",
249
+ "condition.op.notIn": "is none of",
250
+ "condition.op.notContains": "doesn't contain",
251
+ "condition.op.startsWith": "starts with",
252
+ "condition.op.endsWith": "ends with",
253
+ "condition.values": "Values",
254
+ "condition.values-placeholder": "value1, value2…",
255
+ "company.section": "Company data (INSEE → HubSpot)",
256
+ "company.section-hint": "The visitor picks their company from the SIRENE registry; the server re-resolves the SIRET and sends each datum below to its property.",
257
+ "company.examples": "Placeholder examples (one per line)",
258
+ "company.examples-placeholder": "Ex. : un établissement d'un grand groupe\nEx. : le siège de votre PME",
259
+ "company.add-datum": "Send another datum",
260
+ "company.remove-datum": "Stop sending this datum",
261
+ "company.datum.name": "Legal name",
262
+ "company.datum.siret": "SIRET",
263
+ "company.datum.siren": "SIREN",
264
+ "company.datum.address": "Address",
265
+ "company.datum.zip": "Postal code",
266
+ "company.datum.city": "City",
267
+ "company.datum.headquarters": "Is headquarters",
268
+ "company.datum.naf": "NAF code",
269
+ "company.datum.nafLabel": "NAF label",
270
+ "company.datum.headcount": "Headcount range"
248
271
  };
249
272
  export {
250
273
  en as default
@@ -244,7 +244,30 @@ const fr = {
244
244
  "submissions.prev": "Précédent",
245
245
  "submissions.next": "Suivant",
246
246
  "submissions.page": "{page} / {pages}",
247
- "submissions.meta-page": "Envoyée depuis"
247
+ "submissions.meta-page": "Envoyée depuis",
248
+ "condition.op.in": "est parmi",
249
+ "condition.op.notIn": "n'est pas parmi",
250
+ "condition.op.notContains": "ne contient pas",
251
+ "condition.op.startsWith": "commence par",
252
+ "condition.op.endsWith": "finit par",
253
+ "condition.values": "Valeurs",
254
+ "condition.values-placeholder": "valeur1, valeur2…",
255
+ "company.section": "Données entreprise (INSEE → HubSpot)",
256
+ "company.section-hint": "Le visiteur choisit son entreprise dans la base SIRENE ; le serveur re-résout le SIRET et envoie chaque donnée ci-dessous vers sa propriété.",
257
+ "company.examples": "Exemples de placeholder (un par ligne)",
258
+ "company.examples-placeholder": "Ex. : un établissement d'un grand groupe\nEx. : le siège de votre PME",
259
+ "company.add-datum": "Envoyer une autre donnée",
260
+ "company.remove-datum": "Ne plus envoyer cette donnée",
261
+ "company.datum.name": "Raison sociale",
262
+ "company.datum.siret": "SIRET",
263
+ "company.datum.siren": "SIREN",
264
+ "company.datum.address": "Adresse",
265
+ "company.datum.zip": "Code postal",
266
+ "company.datum.city": "Ville",
267
+ "company.datum.headquarters": "Est le siège",
268
+ "company.datum.naf": "Code NAF",
269
+ "company.datum.nafLabel": "Libellé NAF",
270
+ "company.datum.headcount": "Tranche d'effectif"
248
271
  };
249
272
  export {
250
273
  fr as default
@@ -246,6 +246,29 @@ const fr = {
246
246
  "submissions.prev": "Précédent",
247
247
  "submissions.next": "Suivant",
248
248
  "submissions.page": "{page} / {pages}",
249
- "submissions.meta-page": "Envoyée depuis"
249
+ "submissions.meta-page": "Envoyée depuis",
250
+ "condition.op.in": "est parmi",
251
+ "condition.op.notIn": "n'est pas parmi",
252
+ "condition.op.notContains": "ne contient pas",
253
+ "condition.op.startsWith": "commence par",
254
+ "condition.op.endsWith": "finit par",
255
+ "condition.values": "Valeurs",
256
+ "condition.values-placeholder": "valeur1, valeur2…",
257
+ "company.section": "Données entreprise (INSEE → HubSpot)",
258
+ "company.section-hint": "Le visiteur choisit son entreprise dans la base SIRENE ; le serveur re-résout le SIRET et envoie chaque donnée ci-dessous vers sa propriété.",
259
+ "company.examples": "Exemples de placeholder (un par ligne)",
260
+ "company.examples-placeholder": "Ex. : un établissement d'un grand groupe\nEx. : le siège de votre PME",
261
+ "company.add-datum": "Envoyer une autre donnée",
262
+ "company.remove-datum": "Ne plus envoyer cette donnée",
263
+ "company.datum.name": "Raison sociale",
264
+ "company.datum.siret": "SIRET",
265
+ "company.datum.siren": "SIREN",
266
+ "company.datum.address": "Adresse",
267
+ "company.datum.zip": "Code postal",
268
+ "company.datum.city": "Ville",
269
+ "company.datum.headquarters": "Est le siège",
270
+ "company.datum.naf": "Code NAF",
271
+ "company.datum.nafLabel": "Libellé NAF",
272
+ "company.datum.headcount": "Tranche d'effectif"
250
273
  };
251
274
  exports.default = fr;
@@ -26,7 +26,7 @@ const index = {
26
26
  icon: icons.PaperPlane,
27
27
  intlLabel: { id: `${PLUGIN_ID}.menu.label`, defaultMessage: "HubSpot Forms" },
28
28
  permissions: [{ action: `plugin::${PLUGIN_ID}.forms`, subject: null }],
29
- Component: async () => (await Promise.resolve().then(() => require("./Forms-JuzNfsbL.js"))).default
29
+ Component: async () => (await Promise.resolve().then(() => require("./Forms-Dn2W6OS4.js"))).default
30
30
  });
31
31
  app.customFields.register({
32
32
  name: "property",
@@ -41,7 +41,7 @@ const index = {
41
41
  defaultMessage: "Picked from the portal's real properties"
42
42
  },
43
43
  components: {
44
- Input: async () => Promise.resolve().then(() => require("./HubspotPropertyInput-BM3ZaY8f.js"))
44
+ Input: async () => Promise.resolve().then(() => require("./HubspotPropertyInput-B-piLcIy.js"))
45
45
  },
46
46
  // Exposed in the Content-Type Builder. Without this, `objectField` could
47
47
  // only be set by hand-editing schema.json — which is not how anyone
@@ -104,7 +104,7 @@ const index = {
104
104
  defaultMessage: "Picked from the portal's configured objects"
105
105
  },
106
106
  components: {
107
- Input: async () => Promise.resolve().then(() => require("./HubspotObjectInput-dAd-lMdD.js"))
107
+ Input: async () => Promise.resolve().then(() => require("./HubspotObjectInput-BIgIa_Dm.js"))
108
108
  }
109
109
  });
110
110
  app.customFields.register({
@@ -120,7 +120,7 @@ const index = {
120
120
  defaultMessage: "A form built in the HubSpot form builder, stored by slug"
121
121
  },
122
122
  components: {
123
- Input: async () => Promise.resolve().then(() => require("./HubspotFormInput-ph9pe6xY.js"))
123
+ Input: async () => Promise.resolve().then(() => require("./HubspotFormInput-S_Z2t_DN.js"))
124
124
  }
125
125
  });
126
126
  app.createSettingSection(
@@ -136,7 +136,7 @@ const index = {
136
136
  // Mirrors the RBAC action registered server-side: a role without it
137
137
  // doesn't see the link at all — the routes refuse it anyway.
138
138
  permissions: [{ action: `plugin::${PLUGIN_ID}.settings`, subject: null }],
139
- Component: async () => (await Promise.resolve().then(() => require("./Settings-Cdcjy9DA.js"))).default
139
+ Component: async () => (await Promise.resolve().then(() => require("./Settings-DMu_QThB.js"))).default
140
140
  }
141
141
  ]
142
142
  );
@@ -146,7 +146,7 @@ const index = {
146
146
  return Promise.all(
147
147
  locales.map(async (locale) => {
148
148
  try {
149
- const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => Promise.resolve().then(() => require("./en-Cqfair98.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-D117-3Ta.js")) }), `./translations/${locale}.json`, 3);
149
+ const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => Promise.resolve().then(() => require("./en-BDGqW_yS.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-C82LMqUM.js")) }), `./translations/${locale}.json`, 3);
150
150
  return { data: prefixPluginTranslations(data), locale };
151
151
  } catch {
152
152
  return { data: {}, locale };
@@ -25,7 +25,7 @@ const index = {
25
25
  icon: PaperPlane,
26
26
  intlLabel: { id: `${PLUGIN_ID}.menu.label`, defaultMessage: "HubSpot Forms" },
27
27
  permissions: [{ action: `plugin::${PLUGIN_ID}.forms`, subject: null }],
28
- Component: async () => (await import("./Forms-BsKys-Hc.mjs")).default
28
+ Component: async () => (await import("./Forms-DadTbe9Q.mjs")).default
29
29
  });
30
30
  app.customFields.register({
31
31
  name: "property",
@@ -40,7 +40,7 @@ const index = {
40
40
  defaultMessage: "Picked from the portal's real properties"
41
41
  },
42
42
  components: {
43
- Input: async () => import("./HubspotPropertyInput-C2Z6472q.mjs")
43
+ Input: async () => import("./HubspotPropertyInput-KX1Bhcsl.mjs")
44
44
  },
45
45
  // Exposed in the Content-Type Builder. Without this, `objectField` could
46
46
  // only be set by hand-editing schema.json — which is not how anyone
@@ -103,7 +103,7 @@ const index = {
103
103
  defaultMessage: "Picked from the portal's configured objects"
104
104
  },
105
105
  components: {
106
- Input: async () => import("./HubspotObjectInput-BX1qYD2c.mjs")
106
+ Input: async () => import("./HubspotObjectInput-DAo3FAMz.mjs")
107
107
  }
108
108
  });
109
109
  app.customFields.register({
@@ -119,7 +119,7 @@ const index = {
119
119
  defaultMessage: "A form built in the HubSpot form builder, stored by slug"
120
120
  },
121
121
  components: {
122
- Input: async () => import("./HubspotFormInput-CIvHS5rp.mjs")
122
+ Input: async () => import("./HubspotFormInput-NO59AtM_.mjs")
123
123
  }
124
124
  });
125
125
  app.createSettingSection(
@@ -135,7 +135,7 @@ const index = {
135
135
  // Mirrors the RBAC action registered server-side: a role without it
136
136
  // doesn't see the link at all — the routes refuse it anyway.
137
137
  permissions: [{ action: `plugin::${PLUGIN_ID}.settings`, subject: null }],
138
- Component: async () => (await import("./Settings-DnwGetcc.mjs")).default
138
+ Component: async () => (await import("./Settings-Dz0PEFOv.mjs")).default
139
139
  }
140
140
  ]
141
141
  );
@@ -145,7 +145,7 @@ const index = {
145
145
  return Promise.all(
146
146
  locales.map(async (locale) => {
147
147
  try {
148
- const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => import("./en-CcQWnXra.mjs"), "./translations/fr.json": () => import("./fr-CBRZ9q8U.mjs") }), `./translations/${locale}.json`, 3);
148
+ const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => import("./en-CH5LSPkL.mjs"), "./translations/fr.json": () => import("./fr-65-RaB3w.mjs") }), `./translations/${locale}.json`, 3);
149
149
  return { data: prefixPluginTranslations(data), locale };
150
150
  } catch {
151
151
  return { data: {}, locale };
@@ -1,4 +1,4 @@
1
- import { g as getTranslation } from "./index-LTaVoyWJ.mjs";
1
+ import { g as getTranslation } from "./index-DA31TY2n.mjs";
2
2
  const STANDARD = /* @__PURE__ */ new Set([
3
3
  "contact",
4
4
  "company",
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const index = require("./index-BbRtXnAL.js");
2
+ const index = require("./index-B7Ru1fu5.js");
3
3
  const STANDARD = /* @__PURE__ */ new Set([
4
4
  "contact",
5
5
  "company",
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { useFetchClient } from "@strapi/strapi/admin";
3
- import { P as PLUGIN_ID } from "./index-LTaVoyWJ.mjs";
3
+ import { P as PLUGIN_ID } from "./index-DA31TY2n.mjs";
4
4
  let cached = null;
5
5
  let inFlight = null;
6
6
  const listeners = /* @__PURE__ */ new Set();
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const React = require("react");
3
3
  const admin = require("@strapi/strapi/admin");
4
- const index = require("./index-BbRtXnAL.js");
4
+ const index = require("./index-B7Ru1fu5.js");
5
5
  function _interopNamespace(e) {
6
6
  if (e && e.__esModule) return e;
7
7
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
- const index = require("../_chunks/index-BbRtXnAL.js");
2
+ const index = require("../_chunks/index-B7Ru1fu5.js");
3
3
  require("@strapi/icons");
4
4
  module.exports = index.index;
@@ -1,4 +1,4 @@
1
- import { i } from "../_chunks/index-LTaVoyWJ.mjs";
1
+ import { i } from "../_chunks/index-DA31TY2n.mjs";
2
2
  import "@strapi/icons";
3
3
  export {
4
4
  i as default
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ import { type CompanyMap } from "./types";
3
+ interface Props {
4
+ map: CompanyMap;
5
+ onChange: (map: CompanyMap) => void;
6
+ }
7
+ /**
8
+ * The company field's mapping table: one row per SIRENE datum the editor
9
+ * chose to send — object select + property picker, fed by the same portal
10
+ * schema as every other picker. Only mapped rows render (the sidebar is
11
+ * 380px); the rest live behind the "add" select.
12
+ */
13
+ declare const CompanyMapEditor: ({ map, onChange }: Props) => React.JSX.Element;
14
+ export default CompanyMapEditor;
@@ -1,20 +1,28 @@
1
1
  /** Client-side mirror of the server's definition types (server/src/conditions.ts). */
2
- export type Operator = "eq" | "neq" | "contains" | "empty" | "notEmpty" | "gt" | "lt";
2
+ export type Operator = "eq" | "neq" | "contains" | "notContains" | "startsWith" | "endsWith" | "empty" | "notEmpty" | "gt" | "lt" | "in" | "notIn";
3
3
  export interface Rule {
4
4
  field: string;
5
5
  operator: Operator;
6
6
  value?: string;
7
+ /** For `in` / `notIn`: the values any one of which satisfies the rule. */
8
+ values?: string[];
7
9
  }
8
10
  export interface Condition {
9
11
  logic: "and" | "or";
10
12
  rules: Rule[];
11
13
  }
12
- export type FieldType = "text" | "email" | "tel" | "number" | "website" | "textarea" | "select" | "checkbox" | "radio";
14
+ export type FieldType = "text" | "email" | "tel" | "number" | "website" | "textarea" | "select" | "checkbox" | "radio" | "company";
13
15
  export declare const FIELD_TYPES: FieldType[];
14
16
  export interface FieldOption {
15
17
  value: string;
16
18
  label?: string;
17
19
  }
20
+ export type CompanyDatum = "name" | "siret" | "siren" | "address" | "zip" | "city" | "headquarters" | "naf" | "nafLabel" | "headcount";
21
+ export declare const COMPANY_DATA: CompanyDatum[];
22
+ export type CompanyMap = Partial<Record<CompanyDatum, {
23
+ object?: string;
24
+ property?: string;
25
+ }>>;
18
26
  export interface FormField {
19
27
  id: string;
20
28
  name: string;
@@ -32,6 +40,10 @@ export interface FormField {
32
40
  object?: string;
33
41
  property?: string;
34
42
  };
43
+ /** Company fields: SIRENE datum → HubSpot property, resolved server-side. */
44
+ companyMap?: CompanyMap;
45
+ /** Company fields: rotating placeholder examples, one per line. */
46
+ placeholderExamples?: string[];
35
47
  visibleIf?: Condition | null;
36
48
  }
37
49
  export interface FormStep {