strapi-plugin-hubspot 0.11.0 → 0.13.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/CHANGELOG.md +33 -0
- package/README.md +18 -0
- package/dist/_chunks/{Forms-DadTbe9Q.mjs → Forms-CHB-sKem.mjs} +218 -121
- package/dist/_chunks/{Forms-Dn2W6OS4.js → Forms-lrzuWzoB.js} +217 -120
- package/dist/_chunks/{HubspotFormInput-S_Z2t_DN.js → HubspotFormInput-Bb6it0nP.js} +1 -1
- package/dist/_chunks/{HubspotFormInput-NO59AtM_.mjs → HubspotFormInput-YI09keTC.mjs} +1 -1
- package/dist/_chunks/{HubspotObjectInput-DAo3FAMz.mjs → HubspotObjectInput-CzLKT9oj.mjs} +3 -3
- package/dist/_chunks/{HubspotObjectInput-BIgIa_Dm.js → HubspotObjectInput-D3A6xzb3.js} +3 -3
- package/dist/_chunks/{HubspotPropertyInput-KX1Bhcsl.mjs → HubspotPropertyInput-DicskLcN.mjs} +3 -3
- package/dist/_chunks/{HubspotPropertyInput-B-piLcIy.js → HubspotPropertyInput-Dss3eUlL.js} +3 -3
- package/dist/_chunks/{Settings-Dz0PEFOv.mjs → Settings-4CbX3SPK.mjs} +2 -2
- package/dist/_chunks/{Settings-DMu_QThB.js → Settings-Ch8tPZAV.js} +2 -2
- package/dist/_chunks/{en-CH5LSPkL.mjs → en-D8DJiSxd.mjs} +3 -1
- package/dist/_chunks/{en-BDGqW_yS.js → en-PYFibnDc.js} +3 -1
- package/dist/_chunks/{fr-65-RaB3w.mjs → fr-BMjixfXn.mjs} +3 -1
- package/dist/_chunks/{fr-C82LMqUM.js → fr-yHk4sSEl.js} +3 -1
- package/dist/_chunks/{index-B7Ru1fu5.js → index-BAvedd2m.js} +6 -6
- package/dist/_chunks/{index-DA31TY2n.mjs → index-BE2ribUL.mjs} +6 -6
- package/dist/_chunks/{objectLabels-FTh984_h.js → objectLabels-CycoU0zY.js} +1 -1
- package/dist/_chunks/{objectLabels-Bl7sO5pb.mjs → objectLabels-DGJxYjKz.mjs} +1 -1
- package/dist/_chunks/{useHubspotSchema-C2_PuXEm.js → useHubspotSchema-DRfaI6mF.js} +1 -1
- package/dist/_chunks/{useHubspotSchema-BlDilCHc.mjs → useHubspotSchema-e31UsYb2.mjs} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/builder/Sortable.d.ts +25 -0
- package/dist/admin/src/builder/__tests__/CompanyMapEditor.test.d.ts +1 -0
- package/dist/admin/src/builder/__tests__/ConditionEditor.test.d.ts +1 -0
- package/dist/admin/src/builder/__tests__/testUtils.d.ts +4 -0
- package/dist/server/index.js +110 -44
- package/dist/server/index.mjs +110 -44
- package/dist/server/src/__tests__/contract.test.d.ts +1 -0
- package/dist/server/src/__tests__/rateLimit.test.d.ts +1 -0
- package/dist/server/src/company.d.ts +5 -0
- package/dist/server/src/index.d.ts +12 -3
- package/dist/server/src/rateLimit.d.ts +18 -0
- package/package.json +11 -2
|
@@ -7,9 +7,12 @@ const index = require("./index-DkTxsEqL.js");
|
|
|
7
7
|
const designSystem = require("@strapi/design-system");
|
|
8
8
|
const icons = require("@strapi/icons");
|
|
9
9
|
const admin = require("@strapi/strapi/admin");
|
|
10
|
-
const index$1 = require("./index-
|
|
11
|
-
const
|
|
12
|
-
const
|
|
10
|
+
const index$1 = require("./index-BAvedd2m.js");
|
|
11
|
+
const core = require("@dnd-kit/core");
|
|
12
|
+
const sortable = require("@dnd-kit/sortable");
|
|
13
|
+
const utilities = require("@dnd-kit/utilities");
|
|
14
|
+
const objectLabels = require("./objectLabels-CycoU0zY.js");
|
|
15
|
+
const useHubspotSchema = require("./useHubspotSchema-DRfaI6mF.js");
|
|
13
16
|
function _interopNamespace(e) {
|
|
14
17
|
if (e && e.__esModule) return e;
|
|
15
18
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
@@ -170,6 +173,48 @@ const ConditionEditor = ({ condition, candidates, onChange }) => {
|
|
|
170
173
|
] })
|
|
171
174
|
] });
|
|
172
175
|
};
|
|
176
|
+
function SortableList({
|
|
177
|
+
ids,
|
|
178
|
+
onReorder,
|
|
179
|
+
children
|
|
180
|
+
}) {
|
|
181
|
+
const sensors = core.useSensors(
|
|
182
|
+
// An 8px activation distance keeps clicks (selection!) from starting drags.
|
|
183
|
+
core.useSensor(core.PointerSensor, { activationConstraint: { distance: 8 } }),
|
|
184
|
+
core.useSensor(core.KeyboardSensor, { coordinateGetter: sortable.sortableKeyboardCoordinates })
|
|
185
|
+
);
|
|
186
|
+
const handleDragEnd = (event) => {
|
|
187
|
+
const { active, over } = event;
|
|
188
|
+
if (!over || active.id === over.id) return;
|
|
189
|
+
const from = ids.indexOf(String(active.id));
|
|
190
|
+
const to = ids.indexOf(String(over.id));
|
|
191
|
+
if (from === -1 || to === -1) return;
|
|
192
|
+
onReorder(sortable.arrayMove(ids, from, to));
|
|
193
|
+
};
|
|
194
|
+
return /* @__PURE__ */ jsxRuntime.jsx(core.DndContext, { sensors, collisionDetection: core.closestCenter, onDragEnd: handleDragEnd, children: /* @__PURE__ */ jsxRuntime.jsx(sortable.SortableContext, { items: ids, strategy: sortable.verticalListSortingStrategy, children }) });
|
|
195
|
+
}
|
|
196
|
+
function SortableItem({
|
|
197
|
+
id,
|
|
198
|
+
children
|
|
199
|
+
}) {
|
|
200
|
+
const { attributes, listeners, setNodeRef, transform, transition, isDragging } = sortable.useSortable({
|
|
201
|
+
id
|
|
202
|
+
});
|
|
203
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
204
|
+
"div",
|
|
205
|
+
{
|
|
206
|
+
ref: setNodeRef,
|
|
207
|
+
style: {
|
|
208
|
+
transform: utilities.CSS.Transform.toString(transform),
|
|
209
|
+
transition,
|
|
210
|
+
opacity: isDragging ? 0.5 : void 0,
|
|
211
|
+
zIndex: isDragging ? 2 : void 0,
|
|
212
|
+
position: "relative"
|
|
213
|
+
},
|
|
214
|
+
children: children({ attributes, listeners })
|
|
215
|
+
}
|
|
216
|
+
);
|
|
217
|
+
}
|
|
173
218
|
const FIELD_TYPES = [
|
|
174
219
|
"text",
|
|
175
220
|
"email",
|
|
@@ -692,6 +737,10 @@ const FormEditor = () => {
|
|
|
692
737
|
}
|
|
693
738
|
return next;
|
|
694
739
|
});
|
|
740
|
+
function reorderByIds(items, ids) {
|
|
741
|
+
const byId = new Map(items.map((item) => [item.id, item]));
|
|
742
|
+
return ids.map((id) => byId.get(id)).filter((item) => Boolean(item));
|
|
743
|
+
}
|
|
695
744
|
const moveStep = (stepIndex, delta) => patchDefinition((steps) => {
|
|
696
745
|
const target = stepIndex + delta;
|
|
697
746
|
if (target < 0 || target >= steps.length) return steps;
|
|
@@ -813,154 +862,202 @@ const FormEditor = () => {
|
|
|
813
862
|
feedback && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingBottom: 4, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: feedback.tone === "success" ? "success600" : "danger600", children: feedback.text }) }),
|
|
814
863
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 6, alignItems: "flex-start", children: [
|
|
815
864
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { flex: "1", children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 4, children: [
|
|
816
|
-
|
|
817
|
-
|
|
865
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
866
|
+
SortableList,
|
|
818
867
|
{
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
borderWidth: selection.kind === "step" && selection.stepId === step.id ? "1px" : void 0,
|
|
828
|
-
children: [
|
|
829
|
-
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", alignItems: "center", paddingBottom: 2, children: [
|
|
830
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
831
|
-
designSystem.Flex,
|
|
868
|
+
ids: definition.steps.map((s) => s.id),
|
|
869
|
+
onReorder: (ids) => patchDefinition((steps) => reorderByIds(steps, ids)),
|
|
870
|
+
children: definition.steps.map((step, stepIndex) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
871
|
+
SortableItem,
|
|
872
|
+
{
|
|
873
|
+
id: step.id,
|
|
874
|
+
children: (stepHandle) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
875
|
+
designSystem.Box,
|
|
832
876
|
{
|
|
833
|
-
|
|
834
|
-
|
|
877
|
+
background: "neutral0",
|
|
878
|
+
hasRadius: true,
|
|
879
|
+
shadow: "tableShadow",
|
|
880
|
+
padding: 4,
|
|
835
881
|
onClick: () => setSelection({ kind: "step", stepId: step.id }),
|
|
836
882
|
style: { cursor: "pointer" },
|
|
883
|
+
borderColor: selection.kind === "step" && selection.stepId === step.id ? "primary600" : void 0,
|
|
884
|
+
borderStyle: selection.kind === "step" && selection.stepId === step.id ? "solid" : void 0,
|
|
885
|
+
borderWidth: selection.kind === "step" && selection.stepId === step.id ? "1px" : void 0,
|
|
837
886
|
children: [
|
|
838
|
-
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
designSystem.IconButton,
|
|
868
|
-
{
|
|
869
|
-
label: t("editor.step-delete", "Delete the step and its fields"),
|
|
870
|
-
onClick: () => {
|
|
871
|
-
setSelection({ kind: "form" });
|
|
872
|
-
patchDefinition((steps) => steps.filter((s) => s.id !== step.id));
|
|
873
|
-
},
|
|
874
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(icons.Trash, {})
|
|
875
|
-
}
|
|
876
|
-
)
|
|
877
|
-
] })
|
|
878
|
-
] }),
|
|
879
|
-
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 2, children: [
|
|
880
|
-
step.fields.map((field, fieldIndex) => {
|
|
881
|
-
const flags = fieldFlags(field.id);
|
|
882
|
-
const isSelected = selection.kind === "field" && selection.fieldId === field.id;
|
|
883
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
884
|
-
designSystem.Box,
|
|
885
|
-
{
|
|
886
|
-
background: isSelected ? "primary100" : "neutral100",
|
|
887
|
-
hasRadius: true,
|
|
888
|
-
padding: 3,
|
|
889
|
-
onClick: (e) => {
|
|
890
|
-
e.stopPropagation();
|
|
891
|
-
setSelection({ kind: "field", fieldId: field.id });
|
|
892
|
-
},
|
|
893
|
-
style: { cursor: "pointer" },
|
|
894
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", alignItems: "center", children: [
|
|
895
|
-
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", wrap: "wrap", children: [
|
|
896
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "semiBold", children: field.label || field.name || "—" }),
|
|
897
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { children: field.type }),
|
|
898
|
-
field.required && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { backgroundColor: "neutral150", textColor: "neutral600", children: t("editor.required", "required") }),
|
|
899
|
-
field.hubspot?.property && /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Badge, { backgroundColor: "primary100", textColor: "primary700", children: [
|
|
900
|
-
field.hubspot.object ?? "contact",
|
|
901
|
-
".",
|
|
902
|
-
field.hubspot.property
|
|
903
|
-
] }),
|
|
904
|
-
field.visibleIf?.rules?.length ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { backgroundColor: "alternative100", textColor: "alternative700", children: t("editor.conditional", "Conditional") }) : null,
|
|
905
|
-
(flags.error || flags.problem) && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { backgroundColor: "danger100", textColor: "danger700", children: flags.error?.code ?? flags.problem?.code })
|
|
906
|
-
] }),
|
|
887
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", alignItems: "center", paddingBottom: 2, children: [
|
|
888
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
889
|
+
designSystem.Flex,
|
|
890
|
+
{
|
|
891
|
+
gap: 2,
|
|
892
|
+
alignItems: "center",
|
|
893
|
+
onClick: () => setSelection({ kind: "step", stepId: step.id }),
|
|
894
|
+
style: { cursor: "pointer" },
|
|
895
|
+
children: [
|
|
896
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
897
|
+
"span",
|
|
898
|
+
{
|
|
899
|
+
...stepHandle.attributes,
|
|
900
|
+
...stepHandle.listeners,
|
|
901
|
+
onClick: (e) => e.stopPropagation(),
|
|
902
|
+
style: { cursor: "grab", display: "inline-flex", color: "inherit" },
|
|
903
|
+
"aria-label": t("editor.drag-step", "Drag to reorder the step"),
|
|
904
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(icons.Drag, {})
|
|
905
|
+
}
|
|
906
|
+
),
|
|
907
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { variant: "delta", children: [
|
|
908
|
+
t("editor.step", "Step {n}", { n: stepIndex + 1 }),
|
|
909
|
+
step.title ? ` — ${step.title}` : ""
|
|
910
|
+
] }),
|
|
911
|
+
step.visibleIf?.rules?.length ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { backgroundColor: "alternative100", textColor: "alternative700", children: t("editor.conditional", "Conditional") }) : null,
|
|
912
|
+
errors.some((e) => e.stepId === step.id) && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { backgroundColor: "danger100", textColor: "danger700", children: t("editor.flag-error", "To fix") })
|
|
913
|
+
]
|
|
914
|
+
}
|
|
915
|
+
),
|
|
907
916
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 1, onClick: (e) => e.stopPropagation(), children: [
|
|
908
917
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
909
918
|
designSystem.IconButton,
|
|
910
919
|
{
|
|
911
|
-
label: t("editor.
|
|
912
|
-
onClick: () =>
|
|
913
|
-
disabled: stepIndex === 0
|
|
920
|
+
label: t("editor.step-up", "Move the step up"),
|
|
921
|
+
onClick: () => moveStep(stepIndex, -1),
|
|
922
|
+
disabled: stepIndex === 0,
|
|
914
923
|
children: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowUp, {})
|
|
915
924
|
}
|
|
916
925
|
),
|
|
917
926
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
918
927
|
designSystem.IconButton,
|
|
919
928
|
{
|
|
920
|
-
label: t("editor.
|
|
921
|
-
onClick: () =>
|
|
922
|
-
disabled: stepIndex === definition.steps.length - 1
|
|
929
|
+
label: t("editor.step-down", "Move the step down"),
|
|
930
|
+
onClick: () => moveStep(stepIndex, 1),
|
|
931
|
+
disabled: stepIndex === definition.steps.length - 1,
|
|
923
932
|
children: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowDown, {})
|
|
924
933
|
}
|
|
925
934
|
),
|
|
926
935
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
927
936
|
designSystem.IconButton,
|
|
928
937
|
{
|
|
929
|
-
label: t("editor.
|
|
938
|
+
label: t("editor.step-delete", "Delete the step and its fields"),
|
|
930
939
|
onClick: () => {
|
|
931
940
|
setSelection({ kind: "form" });
|
|
932
|
-
|
|
933
|
-
fields: step.fields.filter((f) => f.id !== field.id)
|
|
934
|
-
});
|
|
941
|
+
patchDefinition((steps) => steps.filter((s) => s.id !== step.id));
|
|
935
942
|
},
|
|
936
943
|
children: /* @__PURE__ */ jsxRuntime.jsx(icons.Trash, {})
|
|
937
944
|
}
|
|
938
945
|
)
|
|
939
946
|
] })
|
|
947
|
+
] }),
|
|
948
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 2, children: [
|
|
949
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
950
|
+
SortableList,
|
|
951
|
+
{
|
|
952
|
+
ids: step.fields.map((f) => f.id),
|
|
953
|
+
onReorder: (ids) => patchStep(step.id, { fields: reorderByIds(step.fields, ids) }),
|
|
954
|
+
children: step.fields.map((field, fieldIndex) => {
|
|
955
|
+
const flags = fieldFlags(field.id);
|
|
956
|
+
const isSelected = selection.kind === "field" && selection.fieldId === field.id;
|
|
957
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
958
|
+
SortableItem,
|
|
959
|
+
{
|
|
960
|
+
id: field.id,
|
|
961
|
+
children: (fieldHandle) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
962
|
+
designSystem.Box,
|
|
963
|
+
{
|
|
964
|
+
background: isSelected ? "primary100" : "neutral100",
|
|
965
|
+
hasRadius: true,
|
|
966
|
+
padding: 3,
|
|
967
|
+
onClick: (e) => {
|
|
968
|
+
e.stopPropagation();
|
|
969
|
+
setSelection({ kind: "field", fieldId: field.id });
|
|
970
|
+
},
|
|
971
|
+
style: { cursor: "pointer" },
|
|
972
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", alignItems: "center", children: [
|
|
973
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", wrap: "wrap", children: [
|
|
974
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
975
|
+
"span",
|
|
976
|
+
{
|
|
977
|
+
...fieldHandle.attributes,
|
|
978
|
+
...fieldHandle.listeners,
|
|
979
|
+
onClick: (e) => e.stopPropagation(),
|
|
980
|
+
style: { cursor: "grab", display: "inline-flex" },
|
|
981
|
+
"aria-label": t("editor.drag-field", "Drag to reorder the field"),
|
|
982
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(icons.Drag, {})
|
|
983
|
+
}
|
|
984
|
+
),
|
|
985
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "semiBold", children: field.label || field.name || "—" }),
|
|
986
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { children: field.type }),
|
|
987
|
+
field.required && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { backgroundColor: "neutral150", textColor: "neutral600", children: t("editor.required", "required") }),
|
|
988
|
+
field.hubspot?.property && /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Badge, { backgroundColor: "primary100", textColor: "primary700", children: [
|
|
989
|
+
field.hubspot.object ?? "contact",
|
|
990
|
+
".",
|
|
991
|
+
field.hubspot.property
|
|
992
|
+
] }),
|
|
993
|
+
field.visibleIf?.rules?.length ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { backgroundColor: "alternative100", textColor: "alternative700", children: t("editor.conditional", "Conditional") }) : null,
|
|
994
|
+
(flags.error || flags.problem) && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { backgroundColor: "danger100", textColor: "danger700", children: flags.error?.code ?? flags.problem?.code })
|
|
995
|
+
] }),
|
|
996
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 1, onClick: (e) => e.stopPropagation(), children: [
|
|
997
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
998
|
+
designSystem.IconButton,
|
|
999
|
+
{
|
|
1000
|
+
label: t("editor.field-up", "Move up"),
|
|
1001
|
+
onClick: () => moveField(stepIndex, fieldIndex, -1),
|
|
1002
|
+
disabled: stepIndex === 0 && fieldIndex === 0,
|
|
1003
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowUp, {})
|
|
1004
|
+
}
|
|
1005
|
+
),
|
|
1006
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1007
|
+
designSystem.IconButton,
|
|
1008
|
+
{
|
|
1009
|
+
label: t("editor.field-down", "Move down"),
|
|
1010
|
+
onClick: () => moveField(stepIndex, fieldIndex, 1),
|
|
1011
|
+
disabled: stepIndex === definition.steps.length - 1 && fieldIndex === step.fields.length - 1,
|
|
1012
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowDown, {})
|
|
1013
|
+
}
|
|
1014
|
+
),
|
|
1015
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1016
|
+
designSystem.IconButton,
|
|
1017
|
+
{
|
|
1018
|
+
label: t("editor.field-delete", "Delete the field"),
|
|
1019
|
+
onClick: () => {
|
|
1020
|
+
setSelection({ kind: "form" });
|
|
1021
|
+
patchStep(step.id, {
|
|
1022
|
+
fields: step.fields.filter((f) => f.id !== field.id)
|
|
1023
|
+
});
|
|
1024
|
+
},
|
|
1025
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(icons.Trash, {})
|
|
1026
|
+
}
|
|
1027
|
+
)
|
|
1028
|
+
] })
|
|
1029
|
+
] })
|
|
1030
|
+
}
|
|
1031
|
+
)
|
|
1032
|
+
},
|
|
1033
|
+
field.id
|
|
1034
|
+
);
|
|
1035
|
+
})
|
|
1036
|
+
}
|
|
1037
|
+
),
|
|
1038
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1039
|
+
designSystem.Button,
|
|
1040
|
+
{
|
|
1041
|
+
variant: "tertiary",
|
|
1042
|
+
startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Plus, {}),
|
|
1043
|
+
onClick: (e) => {
|
|
1044
|
+
e.stopPropagation();
|
|
1045
|
+
const field = newField(t("editor.new-field", "New field"));
|
|
1046
|
+
patchStep(step.id, { fields: [...step.fields, field] });
|
|
1047
|
+
setSelection({ kind: "field", fieldId: field.id });
|
|
1048
|
+
},
|
|
1049
|
+
children: t("editor.add-field", "Add a field")
|
|
1050
|
+
}
|
|
1051
|
+
)
|
|
940
1052
|
] })
|
|
941
|
-
|
|
942
|
-
field.id
|
|
943
|
-
);
|
|
944
|
-
}),
|
|
945
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
946
|
-
designSystem.Button,
|
|
947
|
-
{
|
|
948
|
-
variant: "tertiary",
|
|
949
|
-
startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Plus, {}),
|
|
950
|
-
onClick: (e) => {
|
|
951
|
-
e.stopPropagation();
|
|
952
|
-
const field = newField(t("editor.new-field", "New field"));
|
|
953
|
-
patchStep(step.id, { fields: [...step.fields, field] });
|
|
954
|
-
setSelection({ kind: "field", fieldId: field.id });
|
|
955
|
-
},
|
|
956
|
-
children: t("editor.add-field", "Add a field")
|
|
1053
|
+
]
|
|
957
1054
|
}
|
|
958
1055
|
)
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
)
|
|
1056
|
+
},
|
|
1057
|
+
step.id
|
|
1058
|
+
))
|
|
1059
|
+
}
|
|
1060
|
+
),
|
|
964
1061
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
965
1062
|
designSystem.Button,
|
|
966
1063
|
{
|
|
@@ -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-
|
|
8
|
+
const index$1 = require("./index-BAvedd2m.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" } });
|
|
@@ -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-
|
|
6
|
+
import { P as PLUGIN_ID, g as getTranslation } from "./index-BE2ribUL.mjs";
|
|
7
7
|
const HubspotFormInput = React.forwardRef(
|
|
8
8
|
({ name, value, onChange, disabled, error, required, label, hint, labelAction }, ref) => {
|
|
9
9
|
const { formatMessage } = useIntl();
|
|
@@ -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-
|
|
6
|
-
import { o as objectLabel } from "./objectLabels-
|
|
7
|
-
import { u as useHubspotSchema } from "./useHubspotSchema-
|
|
5
|
+
import { g as getTranslation } from "./index-BE2ribUL.mjs";
|
|
6
|
+
import { o as objectLabel } from "./objectLabels-DGJxYjKz.mjs";
|
|
7
|
+
import { u as useHubspotSchema } from "./useHubspotSchema-e31UsYb2.mjs";
|
|
8
8
|
const HubspotObjectInput = React.forwardRef(
|
|
9
9
|
({ name, value, onChange, disabled, error, required, label, hint, labelAction }, ref) => {
|
|
10
10
|
const intl = useIntl();
|
|
@@ -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-
|
|
8
|
-
const objectLabels = require("./objectLabels-
|
|
9
|
-
const useHubspotSchema = require("./useHubspotSchema-
|
|
7
|
+
const index$1 = require("./index-BAvedd2m.js");
|
|
8
|
+
const objectLabels = require("./objectLabels-CycoU0zY.js");
|
|
9
|
+
const useHubspotSchema = require("./useHubspotSchema-DRfaI6mF.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" } });
|
package/dist/_chunks/{HubspotPropertyInput-KX1Bhcsl.mjs → HubspotPropertyInput-DicskLcN.mjs}
RENAMED
|
@@ -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-
|
|
8
|
-
import { o as objectLabel } from "./objectLabels-
|
|
9
|
-
import { u as useHubspotSchema } from "./useHubspotSchema-
|
|
7
|
+
import { g as getTranslation } from "./index-BE2ribUL.mjs";
|
|
8
|
+
import { o as objectLabel } from "./objectLabels-DGJxYjKz.mjs";
|
|
9
|
+
import { u as useHubspotSchema } from "./useHubspotSchema-e31UsYb2.mjs";
|
|
10
10
|
const oneLine = {
|
|
11
11
|
display: "block",
|
|
12
12
|
whiteSpace: "nowrap",
|
|
@@ -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-
|
|
10
|
-
const objectLabels = require("./objectLabels-
|
|
11
|
-
const useHubspotSchema = require("./useHubspotSchema-
|
|
9
|
+
const index$1 = require("./index-BAvedd2m.js");
|
|
10
|
+
const objectLabels = require("./objectLabels-CycoU0zY.js");
|
|
11
|
+
const useHubspotSchema = require("./useHubspotSchema-DRfaI6mF.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" } });
|
|
@@ -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-
|
|
6
|
+
import { g as getTranslation, P as PLUGIN_ID } from "./index-BE2ribUL.mjs";
|
|
7
7
|
import { Link as Link$1 } from "react-router-dom";
|
|
8
|
-
import { o as objectLabel } from "./objectLabels-
|
|
8
|
+
import { o as objectLabel } from "./objectLabels-DGJxYjKz.mjs";
|
|
9
9
|
const AuditSection = ({ configured }) => {
|
|
10
10
|
const intl = useIntl();
|
|
11
11
|
const { formatMessage } = intl;
|
|
@@ -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-
|
|
8
|
+
const index$1 = require("./index-BAvedd2m.js");
|
|
9
9
|
const reactRouterDom = require("react-router-dom");
|
|
10
|
-
const objectLabels = require("./objectLabels-
|
|
10
|
+
const objectLabels = require("./objectLabels-CycoU0zY.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" } });
|
|
@@ -267,7 +267,9 @@ const en = {
|
|
|
267
267
|
"company.datum.headquarters": "Is headquarters",
|
|
268
268
|
"company.datum.naf": "NAF code",
|
|
269
269
|
"company.datum.nafLabel": "NAF label",
|
|
270
|
-
"company.datum.headcount": "Headcount range"
|
|
270
|
+
"company.datum.headcount": "Headcount range",
|
|
271
|
+
"editor.drag-step": "Drag to reorder the step",
|
|
272
|
+
"editor.drag-field": "Drag to reorder the field"
|
|
271
273
|
};
|
|
272
274
|
export {
|
|
273
275
|
en as default
|
|
@@ -269,6 +269,8 @@ const en = {
|
|
|
269
269
|
"company.datum.headquarters": "Is headquarters",
|
|
270
270
|
"company.datum.naf": "NAF code",
|
|
271
271
|
"company.datum.nafLabel": "NAF label",
|
|
272
|
-
"company.datum.headcount": "Headcount range"
|
|
272
|
+
"company.datum.headcount": "Headcount range",
|
|
273
|
+
"editor.drag-step": "Drag to reorder the step",
|
|
274
|
+
"editor.drag-field": "Drag to reorder the field"
|
|
273
275
|
};
|
|
274
276
|
exports.default = en;
|
|
@@ -267,7 +267,9 @@ const fr = {
|
|
|
267
267
|
"company.datum.headquarters": "Est le siège",
|
|
268
268
|
"company.datum.naf": "Code NAF",
|
|
269
269
|
"company.datum.nafLabel": "Libellé NAF",
|
|
270
|
-
"company.datum.headcount": "Tranche d'effectif"
|
|
270
|
+
"company.datum.headcount": "Tranche d'effectif",
|
|
271
|
+
"editor.drag-step": "Glisser pour réordonner l'étape",
|
|
272
|
+
"editor.drag-field": "Glisser pour réordonner le champ"
|
|
271
273
|
};
|
|
272
274
|
export {
|
|
273
275
|
fr as default
|
|
@@ -269,6 +269,8 @@ const fr = {
|
|
|
269
269
|
"company.datum.headquarters": "Est le siège",
|
|
270
270
|
"company.datum.naf": "Code NAF",
|
|
271
271
|
"company.datum.nafLabel": "Libellé NAF",
|
|
272
|
-
"company.datum.headcount": "Tranche d'effectif"
|
|
272
|
+
"company.datum.headcount": "Tranche d'effectif",
|
|
273
|
+
"editor.drag-step": "Glisser pour réordonner l'étape",
|
|
274
|
+
"editor.drag-field": "Glisser pour réordonner le champ"
|
|
273
275
|
};
|
|
274
276
|
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-
|
|
29
|
+
Component: async () => (await Promise.resolve().then(() => require("./Forms-lrzuWzoB.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-
|
|
44
|
+
Input: async () => Promise.resolve().then(() => require("./HubspotPropertyInput-Dss3eUlL.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-
|
|
107
|
+
Input: async () => Promise.resolve().then(() => require("./HubspotObjectInput-D3A6xzb3.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-
|
|
123
|
+
Input: async () => Promise.resolve().then(() => require("./HubspotFormInput-Bb6it0nP.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-
|
|
139
|
+
Component: async () => (await Promise.resolve().then(() => require("./Settings-Ch8tPZAV.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-
|
|
149
|
+
const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => Promise.resolve().then(() => require("./en-PYFibnDc.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-yHk4sSEl.js")) }), `./translations/${locale}.json`, 3);
|
|
150
150
|
return { data: prefixPluginTranslations(data), locale };
|
|
151
151
|
} catch {
|
|
152
152
|
return { data: {}, locale };
|