strapi-plugin-hubspot 0.9.0 → 0.10.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 +15 -0
- package/dist/_chunks/{Forms-BsKys-Hc.mjs → Forms-BGdNbq-k.mjs} +57 -8
- package/dist/_chunks/{Forms-JuzNfsbL.js → Forms-BVkE1C46.js} +56 -7
- package/dist/_chunks/{HubspotFormInput-CIvHS5rp.mjs → HubspotFormInput-QJldybwT.mjs} +1 -1
- package/dist/_chunks/{HubspotFormInput-ph9pe6xY.js → HubspotFormInput-ddrrD-GJ.js} +1 -1
- package/dist/_chunks/{HubspotObjectInput-BX1qYD2c.mjs → HubspotObjectInput-B_W9dpvD.mjs} +3 -3
- package/dist/_chunks/{HubspotObjectInput-dAd-lMdD.js → HubspotObjectInput-DZ4H-vju.js} +3 -3
- package/dist/_chunks/{HubspotPropertyInput-BM3ZaY8f.js → HubspotPropertyInput-BJHUy5Zr.js} +3 -3
- package/dist/_chunks/{HubspotPropertyInput-C2Z6472q.mjs → HubspotPropertyInput-CiVxcnEt.mjs} +3 -3
- package/dist/_chunks/{Settings-DnwGetcc.mjs → Settings-B0NyQtsh.mjs} +2 -2
- package/dist/_chunks/{Settings-Cdcjy9DA.js → Settings-DaFRUzjG.js} +2 -2
- package/dist/_chunks/{en-CcQWnXra.mjs → en-D1sHFQdN.mjs} +8 -1
- package/dist/_chunks/{en-Cqfair98.js → en-zJv-SuNb.js} +8 -1
- package/dist/_chunks/{fr-CBRZ9q8U.mjs → fr-E3zTW7pq.mjs} +8 -1
- package/dist/_chunks/{fr-D117-3Ta.js → fr-fh0uH6Rp.js} +8 -1
- package/dist/_chunks/{index-LTaVoyWJ.mjs → index-BpapRdHX.mjs} +6 -6
- package/dist/_chunks/{index-BbRtXnAL.js → index-rgjWxSn4.js} +6 -6
- package/dist/_chunks/{objectLabels-DE2xGq7f.mjs → objectLabels-DQYwGDr3.mjs} +1 -1
- package/dist/_chunks/{objectLabels-DU0Cagt_.js → objectLabels-mBjwR5EE.js} +1 -1
- package/dist/_chunks/{useHubspotSchema-DzBMAxv7.js → useHubspotSchema-CJEiHbjz.js} +1 -1
- package/dist/_chunks/{useHubspotSchema-BSKow0X3.mjs → useHubspotSchema-DX4JTPFt.mjs} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/builder/types.d.ts +3 -1
- package/dist/server/index.js +24 -1
- package/dist/server/index.mjs +24 -1
- package/dist/server/src/conditions.d.ts +3 -1
- package/dist/shared/types.d.ts +15 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.0 — 2026-08-29
|
|
4
|
+
|
|
5
|
+
### Added — HubSpot-parity condition operators
|
|
6
|
+
- `in` / `notIn` ("is any of" / "is none of"): one rule matching several
|
|
7
|
+
values — a multi-select over the referenced field's options in the editor
|
|
8
|
+
(comma-separated input when the field has none). Closes the gap that
|
|
9
|
+
previously required stacking OR'd `eq` rules.
|
|
10
|
+
- `notContains`, `startsWith`, `endsWith` — case-insensitive, like `contains`.
|
|
11
|
+
- Structural validation flags an `in`/`notIn` rule with no values, like the
|
|
12
|
+
other comparators; switching operator clears the stale value shape.
|
|
13
|
+
|
|
14
|
+
Frontends mirroring the engine client-side must add the five operators (the
|
|
15
|
+
typed `Operator` union in `strapi-plugin-hubspot/types` is the reference —
|
|
16
|
+
the server remains the authority at submission either way).
|
|
17
|
+
|
|
3
18
|
## 0.9.0 — 2026-08-29
|
|
4
19
|
|
|
5
20
|
### Added
|
|
@@ -2,14 +2,37 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import { useParams, useSearchParams, Link, useNavigate, Routes, Route } from "react-router-dom";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { u as useIntl } from "./index-CEh8vkxY.mjs";
|
|
5
|
-
import { Typography, Flex, Box, SingleSelect, SingleSelectOption, TextInput, IconButton, Button, Field, Checkbox, Divider, Combobox, ComboboxOption, Loader, Badge, Textarea, Table, Thead, Tr, Th, Tbody, Td, Modal } from "@strapi/design-system";
|
|
5
|
+
import { Typography, Flex, Box, SingleSelect, SingleSelectOption, MultiSelect, MultiSelectOption, TextInput, IconButton, Button, Field, Checkbox, Divider, Combobox, ComboboxOption, Loader, Badge, Textarea, Table, Thead, Tr, Th, Tbody, Td, Modal } from "@strapi/design-system";
|
|
6
6
|
import { Trash, Plus, ArrowClockwise, ArrowLeft, ArrowUp, ArrowDown, List, Duplicate, Download } from "@strapi/icons";
|
|
7
7
|
import { useFetchClient } from "@strapi/strapi/admin";
|
|
8
|
-
import { g as getTranslation, P as PLUGIN_ID } from "./index-
|
|
9
|
-
import { o as objectLabel } from "./objectLabels-
|
|
10
|
-
import { u as useHubspotSchema } from "./useHubspotSchema-
|
|
11
|
-
const OPERATORS = [
|
|
12
|
-
|
|
8
|
+
import { g as getTranslation, P as PLUGIN_ID } from "./index-BpapRdHX.mjs";
|
|
9
|
+
import { o as objectLabel } from "./objectLabels-DQYwGDr3.mjs";
|
|
10
|
+
import { u as useHubspotSchema } from "./useHubspotSchema-DX4JTPFt.mjs";
|
|
11
|
+
const OPERATORS = [
|
|
12
|
+
"eq",
|
|
13
|
+
"neq",
|
|
14
|
+
"in",
|
|
15
|
+
"notIn",
|
|
16
|
+
"contains",
|
|
17
|
+
"notContains",
|
|
18
|
+
"startsWith",
|
|
19
|
+
"endsWith",
|
|
20
|
+
"empty",
|
|
21
|
+
"notEmpty",
|
|
22
|
+
"gt",
|
|
23
|
+
"lt"
|
|
24
|
+
];
|
|
25
|
+
const NEEDS_VALUE = /* @__PURE__ */ new Set([
|
|
26
|
+
"eq",
|
|
27
|
+
"neq",
|
|
28
|
+
"contains",
|
|
29
|
+
"notContains",
|
|
30
|
+
"startsWith",
|
|
31
|
+
"endsWith",
|
|
32
|
+
"gt",
|
|
33
|
+
"lt"
|
|
34
|
+
]);
|
|
35
|
+
const NEEDS_VALUES = /* @__PURE__ */ new Set(["in", "notIn"]);
|
|
13
36
|
const ConditionEditor = ({ condition, candidates, onChange }) => {
|
|
14
37
|
const { formatMessage } = useIntl();
|
|
15
38
|
const t = (id, defaultMessage) => formatMessage({ id: getTranslation(id), defaultMessage });
|
|
@@ -20,7 +43,12 @@ const ConditionEditor = ({ condition, candidates, onChange }) => {
|
|
|
20
43
|
empty: t("condition.op.empty", "is empty"),
|
|
21
44
|
notEmpty: t("condition.op.notEmpty", "is filled"),
|
|
22
45
|
gt: t("condition.op.gt", "is greater than"),
|
|
23
|
-
lt: t("condition.op.lt", "is less than")
|
|
46
|
+
lt: t("condition.op.lt", "is less than"),
|
|
47
|
+
in: t("condition.op.in", "is any of"),
|
|
48
|
+
notIn: t("condition.op.notIn", "is none of"),
|
|
49
|
+
notContains: t("condition.op.notContains", "doesn't contain"),
|
|
50
|
+
startsWith: t("condition.op.startsWith", "starts with"),
|
|
51
|
+
endsWith: t("condition.op.endsWith", "ends with")
|
|
24
52
|
};
|
|
25
53
|
const rules = condition?.rules ?? [];
|
|
26
54
|
const logic = condition?.logic ?? "and";
|
|
@@ -54,10 +82,31 @@ const ConditionEditor = ({ condition, candidates, onChange }) => {
|
|
|
54
82
|
{
|
|
55
83
|
"aria-label": t("condition.operator", "Operator"),
|
|
56
84
|
value: rule.operator,
|
|
57
|
-
onChange: (v) => updateRule(index, { operator: v }),
|
|
85
|
+
onChange: (v) => updateRule(index, { operator: v, value: "", values: [] }),
|
|
58
86
|
children: OPERATORS.map((op) => /* @__PURE__ */ jsx(SingleSelectOption, { value: op, children: opLabel[op] }, op))
|
|
59
87
|
}
|
|
60
88
|
) }),
|
|
89
|
+
NEEDS_VALUES.has(rule.operator) && /* @__PURE__ */ jsx(Box, { flex: "1", minWidth: "140px", children: targetOptions.length ? /* @__PURE__ */ jsx(
|
|
90
|
+
MultiSelect,
|
|
91
|
+
{
|
|
92
|
+
"aria-label": t("condition.values", "Values"),
|
|
93
|
+
value: rule.values ?? [],
|
|
94
|
+
withTags: true,
|
|
95
|
+
onChange: (values) => updateRule(index, { values }),
|
|
96
|
+
children: targetOptions.map((o) => /* @__PURE__ */ jsx(MultiSelectOption, { value: o.value, children: o.label || o.value }, o.value))
|
|
97
|
+
}
|
|
98
|
+
) : /* @__PURE__ */ jsx(
|
|
99
|
+
TextInput,
|
|
100
|
+
{
|
|
101
|
+
"aria-label": t("condition.values", "Values"),
|
|
102
|
+
placeholder: t("condition.values-placeholder", "value1, value2…"),
|
|
103
|
+
defaultValue: (rule.values ?? []).join(", "),
|
|
104
|
+
onBlur: (e) => updateRule(index, {
|
|
105
|
+
values: e.target.value.split(",").map((v) => v.trim()).filter(Boolean)
|
|
106
|
+
})
|
|
107
|
+
},
|
|
108
|
+
`${index}-${rule.operator}`
|
|
109
|
+
) }),
|
|
61
110
|
NEEDS_VALUE.has(rule.operator) && /* @__PURE__ */ jsx(Box, { flex: "1", minWidth: "110px", children: targetOptions.length ? /* @__PURE__ */ jsx(
|
|
62
111
|
SingleSelect,
|
|
63
112
|
{
|
|
@@ -7,9 +7,9 @@ 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 objectLabels = require("./objectLabels-
|
|
12
|
-
const useHubspotSchema = require("./useHubspotSchema-
|
|
10
|
+
const index$1 = require("./index-rgjWxSn4.js");
|
|
11
|
+
const objectLabels = require("./objectLabels-mBjwR5EE.js");
|
|
12
|
+
const useHubspotSchema = require("./useHubspotSchema-CJEiHbjz.js");
|
|
13
13
|
function _interopNamespace(e) {
|
|
14
14
|
if (e && e.__esModule) return e;
|
|
15
15
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
@@ -28,8 +28,31 @@ function _interopNamespace(e) {
|
|
|
28
28
|
return Object.freeze(n);
|
|
29
29
|
}
|
|
30
30
|
const React__namespace = /* @__PURE__ */ _interopNamespace(React);
|
|
31
|
-
const OPERATORS = [
|
|
32
|
-
|
|
31
|
+
const OPERATORS = [
|
|
32
|
+
"eq",
|
|
33
|
+
"neq",
|
|
34
|
+
"in",
|
|
35
|
+
"notIn",
|
|
36
|
+
"contains",
|
|
37
|
+
"notContains",
|
|
38
|
+
"startsWith",
|
|
39
|
+
"endsWith",
|
|
40
|
+
"empty",
|
|
41
|
+
"notEmpty",
|
|
42
|
+
"gt",
|
|
43
|
+
"lt"
|
|
44
|
+
];
|
|
45
|
+
const NEEDS_VALUE = /* @__PURE__ */ new Set([
|
|
46
|
+
"eq",
|
|
47
|
+
"neq",
|
|
48
|
+
"contains",
|
|
49
|
+
"notContains",
|
|
50
|
+
"startsWith",
|
|
51
|
+
"endsWith",
|
|
52
|
+
"gt",
|
|
53
|
+
"lt"
|
|
54
|
+
]);
|
|
55
|
+
const NEEDS_VALUES = /* @__PURE__ */ new Set(["in", "notIn"]);
|
|
33
56
|
const ConditionEditor = ({ condition, candidates, onChange }) => {
|
|
34
57
|
const { formatMessage } = index.useIntl();
|
|
35
58
|
const t = (id, defaultMessage) => formatMessage({ id: index$1.getTranslation(id), defaultMessage });
|
|
@@ -40,7 +63,12 @@ const ConditionEditor = ({ condition, candidates, onChange }) => {
|
|
|
40
63
|
empty: t("condition.op.empty", "is empty"),
|
|
41
64
|
notEmpty: t("condition.op.notEmpty", "is filled"),
|
|
42
65
|
gt: t("condition.op.gt", "is greater than"),
|
|
43
|
-
lt: t("condition.op.lt", "is less than")
|
|
66
|
+
lt: t("condition.op.lt", "is less than"),
|
|
67
|
+
in: t("condition.op.in", "is any of"),
|
|
68
|
+
notIn: t("condition.op.notIn", "is none of"),
|
|
69
|
+
notContains: t("condition.op.notContains", "doesn't contain"),
|
|
70
|
+
startsWith: t("condition.op.startsWith", "starts with"),
|
|
71
|
+
endsWith: t("condition.op.endsWith", "ends with")
|
|
44
72
|
};
|
|
45
73
|
const rules = condition?.rules ?? [];
|
|
46
74
|
const logic = condition?.logic ?? "and";
|
|
@@ -74,10 +102,31 @@ const ConditionEditor = ({ condition, candidates, onChange }) => {
|
|
|
74
102
|
{
|
|
75
103
|
"aria-label": t("condition.operator", "Operator"),
|
|
76
104
|
value: rule.operator,
|
|
77
|
-
onChange: (v) => updateRule(index2, { operator: v }),
|
|
105
|
+
onChange: (v) => updateRule(index2, { operator: v, value: "", values: [] }),
|
|
78
106
|
children: OPERATORS.map((op) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: op, children: opLabel[op] }, op))
|
|
79
107
|
}
|
|
80
108
|
) }),
|
|
109
|
+
NEEDS_VALUES.has(rule.operator) && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { flex: "1", minWidth: "140px", children: targetOptions.length ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
110
|
+
designSystem.MultiSelect,
|
|
111
|
+
{
|
|
112
|
+
"aria-label": t("condition.values", "Values"),
|
|
113
|
+
value: rule.values ?? [],
|
|
114
|
+
withTags: true,
|
|
115
|
+
onChange: (values) => updateRule(index2, { values }),
|
|
116
|
+
children: targetOptions.map((o) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.MultiSelectOption, { value: o.value, children: o.label || o.value }, o.value))
|
|
117
|
+
}
|
|
118
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
119
|
+
designSystem.TextInput,
|
|
120
|
+
{
|
|
121
|
+
"aria-label": t("condition.values", "Values"),
|
|
122
|
+
placeholder: t("condition.values-placeholder", "value1, value2…"),
|
|
123
|
+
defaultValue: (rule.values ?? []).join(", "),
|
|
124
|
+
onBlur: (e) => updateRule(index2, {
|
|
125
|
+
values: e.target.value.split(",").map((v) => v.trim()).filter(Boolean)
|
|
126
|
+
})
|
|
127
|
+
},
|
|
128
|
+
`${index2}-${rule.operator}`
|
|
129
|
+
) }),
|
|
81
130
|
NEEDS_VALUE.has(rule.operator) && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { flex: "1", minWidth: "110px", children: targetOptions.length ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
82
131
|
designSystem.SingleSelect,
|
|
83
132
|
{
|
|
@@ -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-BpapRdHX.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-
|
|
8
|
+
const index$1 = require("./index-rgjWxSn4.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" } });
|
|
@@ -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-BpapRdHX.mjs";
|
|
6
|
+
import { o as objectLabel } from "./objectLabels-DQYwGDr3.mjs";
|
|
7
|
+
import { u as useHubspotSchema } from "./useHubspotSchema-DX4JTPFt.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-rgjWxSn4.js");
|
|
8
|
+
const objectLabels = require("./objectLabels-mBjwR5EE.js");
|
|
9
|
+
const useHubspotSchema = require("./useHubspotSchema-CJEiHbjz.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" } });
|
|
@@ -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-rgjWxSn4.js");
|
|
10
|
+
const objectLabels = require("./objectLabels-mBjwR5EE.js");
|
|
11
|
+
const useHubspotSchema = require("./useHubspotSchema-CJEiHbjz.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" } });
|
package/dist/_chunks/{HubspotPropertyInput-C2Z6472q.mjs → HubspotPropertyInput-CiVxcnEt.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-BpapRdHX.mjs";
|
|
8
|
+
import { o as objectLabel } from "./objectLabels-DQYwGDr3.mjs";
|
|
9
|
+
import { u as useHubspotSchema } from "./useHubspotSchema-DX4JTPFt.mjs";
|
|
10
10
|
const oneLine = {
|
|
11
11
|
display: "block",
|
|
12
12
|
whiteSpace: "nowrap",
|
|
@@ -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-BpapRdHX.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-DQYwGDr3.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-rgjWxSn4.js");
|
|
9
9
|
const reactRouterDom = require("react-router-dom");
|
|
10
|
-
const objectLabels = require("./objectLabels-
|
|
10
|
+
const objectLabels = require("./objectLabels-mBjwR5EE.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" } });
|
|
@@ -244,7 +244,14 @@ 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…"
|
|
248
255
|
};
|
|
249
256
|
export {
|
|
250
257
|
en as default
|
|
@@ -246,6 +246,13 @@ 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…"
|
|
250
257
|
};
|
|
251
258
|
exports.default = en;
|
|
@@ -244,7 +244,14 @@ 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…"
|
|
248
255
|
};
|
|
249
256
|
export {
|
|
250
257
|
fr as default
|
|
@@ -246,6 +246,13 @@ 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…"
|
|
250
257
|
};
|
|
251
258
|
exports.default = fr;
|
|
@@ -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-
|
|
28
|
+
Component: async () => (await import("./Forms-BGdNbq-k.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-
|
|
43
|
+
Input: async () => import("./HubspotPropertyInput-CiVxcnEt.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-
|
|
106
|
+
Input: async () => import("./HubspotObjectInput-B_W9dpvD.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-
|
|
122
|
+
Input: async () => import("./HubspotFormInput-QJldybwT.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-
|
|
138
|
+
Component: async () => (await import("./Settings-B0NyQtsh.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-
|
|
148
|
+
const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => import("./en-D1sHFQdN.mjs"), "./translations/fr.json": () => import("./fr-E3zTW7pq.mjs") }), `./translations/${locale}.json`, 3);
|
|
149
149
|
return { data: prefixPluginTranslations(data), locale };
|
|
150
150
|
} catch {
|
|
151
151
|
return { data: {}, locale };
|
|
@@ -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-BVkE1C46.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-BJHUy5Zr.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-DZ4H-vju.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-ddrrD-GJ.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-DaFRUzjG.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-zJv-SuNb.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-fh0uH6Rp.js")) }), `./translations/${locale}.json`, 3);
|
|
150
150
|
return { data: prefixPluginTranslations(data), locale };
|
|
151
151
|
} catch {
|
|
152
152
|
return { data: {}, locale };
|
|
@@ -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-
|
|
4
|
+
const index = require("./index-rgjWxSn4.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,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-
|
|
3
|
+
import { P as PLUGIN_ID } from "./index-BpapRdHX.mjs";
|
|
4
4
|
let cached = null;
|
|
5
5
|
let inFlight = null;
|
|
6
6
|
const listeners = /* @__PURE__ */ new Set();
|
package/dist/admin/index.js
CHANGED
package/dist/admin/index.mjs
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
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";
|
package/dist/server/index.js
CHANGED
|
@@ -465,7 +465,17 @@ const contentTypes = {
|
|
|
465
465
|
}
|
|
466
466
|
}
|
|
467
467
|
};
|
|
468
|
-
const NEEDS_VALUE = /* @__PURE__ */ new Set([
|
|
468
|
+
const NEEDS_VALUE = /* @__PURE__ */ new Set([
|
|
469
|
+
"eq",
|
|
470
|
+
"neq",
|
|
471
|
+
"contains",
|
|
472
|
+
"notContains",
|
|
473
|
+
"startsWith",
|
|
474
|
+
"endsWith",
|
|
475
|
+
"gt",
|
|
476
|
+
"lt"
|
|
477
|
+
]);
|
|
478
|
+
const NEEDS_VALUES = /* @__PURE__ */ new Set(["in", "notIn"]);
|
|
469
479
|
function validateDefinition(definition) {
|
|
470
480
|
const errors = [];
|
|
471
481
|
const allIds = /* @__PURE__ */ new Set();
|
|
@@ -482,6 +492,9 @@ function validateDefinition(definition) {
|
|
|
482
492
|
if (NEEDS_VALUE.has(rule.operator) && (rule.value === void 0 || rule.value === "")) {
|
|
483
493
|
errors.push({ code: "missing-value", ...owner, target: rule.field });
|
|
484
494
|
}
|
|
495
|
+
if (NEEDS_VALUES.has(rule.operator) && !rule.values?.length) {
|
|
496
|
+
errors.push({ code: "missing-value", ...owner, target: rule.field });
|
|
497
|
+
}
|
|
485
498
|
}
|
|
486
499
|
};
|
|
487
500
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -515,6 +528,16 @@ function evaluateRule(rule, get) {
|
|
|
515
528
|
return asString(value) !== asString(rule.value);
|
|
516
529
|
case "contains":
|
|
517
530
|
return asString(value).toLowerCase().includes(asString(rule.value).toLowerCase());
|
|
531
|
+
case "notContains":
|
|
532
|
+
return !asString(value).toLowerCase().includes(asString(rule.value).toLowerCase());
|
|
533
|
+
case "startsWith":
|
|
534
|
+
return asString(value).toLowerCase().startsWith(asString(rule.value).toLowerCase());
|
|
535
|
+
case "endsWith":
|
|
536
|
+
return asString(value).toLowerCase().endsWith(asString(rule.value).toLowerCase());
|
|
537
|
+
case "in":
|
|
538
|
+
return (rule.values ?? []).some((v) => asString(v) === asString(value));
|
|
539
|
+
case "notIn":
|
|
540
|
+
return !(rule.values ?? []).some((v) => asString(v) === asString(value));
|
|
518
541
|
case "empty":
|
|
519
542
|
return isEmpty(value);
|
|
520
543
|
case "notEmpty":
|
package/dist/server/index.mjs
CHANGED
|
@@ -464,7 +464,17 @@ const contentTypes = {
|
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
466
|
};
|
|
467
|
-
const NEEDS_VALUE = /* @__PURE__ */ new Set([
|
|
467
|
+
const NEEDS_VALUE = /* @__PURE__ */ new Set([
|
|
468
|
+
"eq",
|
|
469
|
+
"neq",
|
|
470
|
+
"contains",
|
|
471
|
+
"notContains",
|
|
472
|
+
"startsWith",
|
|
473
|
+
"endsWith",
|
|
474
|
+
"gt",
|
|
475
|
+
"lt"
|
|
476
|
+
]);
|
|
477
|
+
const NEEDS_VALUES = /* @__PURE__ */ new Set(["in", "notIn"]);
|
|
468
478
|
function validateDefinition(definition) {
|
|
469
479
|
const errors2 = [];
|
|
470
480
|
const allIds = /* @__PURE__ */ new Set();
|
|
@@ -481,6 +491,9 @@ function validateDefinition(definition) {
|
|
|
481
491
|
if (NEEDS_VALUE.has(rule.operator) && (rule.value === void 0 || rule.value === "")) {
|
|
482
492
|
errors2.push({ code: "missing-value", ...owner, target: rule.field });
|
|
483
493
|
}
|
|
494
|
+
if (NEEDS_VALUES.has(rule.operator) && !rule.values?.length) {
|
|
495
|
+
errors2.push({ code: "missing-value", ...owner, target: rule.field });
|
|
496
|
+
}
|
|
484
497
|
}
|
|
485
498
|
};
|
|
486
499
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -514,6 +527,16 @@ function evaluateRule(rule, get) {
|
|
|
514
527
|
return asString(value) !== asString(rule.value);
|
|
515
528
|
case "contains":
|
|
516
529
|
return asString(value).toLowerCase().includes(asString(rule.value).toLowerCase());
|
|
530
|
+
case "notContains":
|
|
531
|
+
return !asString(value).toLowerCase().includes(asString(rule.value).toLowerCase());
|
|
532
|
+
case "startsWith":
|
|
533
|
+
return asString(value).toLowerCase().startsWith(asString(rule.value).toLowerCase());
|
|
534
|
+
case "endsWith":
|
|
535
|
+
return asString(value).toLowerCase().endsWith(asString(rule.value).toLowerCase());
|
|
536
|
+
case "in":
|
|
537
|
+
return (rule.values ?? []).some((v) => asString(v) === asString(value));
|
|
538
|
+
case "notIn":
|
|
539
|
+
return !(rule.values ?? []).some((v) => asString(v) === asString(value));
|
|
517
540
|
case "empty":
|
|
518
541
|
return isEmpty(value);
|
|
519
542
|
case "notEmpty":
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
* The condition engine — pure functions, no Strapi.
|
|
3
3
|
*/
|
|
4
4
|
export type Primitive = string | number | boolean;
|
|
5
|
-
export type Operator = "eq" | "neq" | "contains" | "empty" | "notEmpty" | "gt" | "lt";
|
|
5
|
+
export type Operator = "eq" | "neq" | "contains" | "notContains" | "startsWith" | "endsWith" | "empty" | "notEmpty" | "gt" | "lt" | "in" | "notIn";
|
|
6
6
|
export interface Rule {
|
|
7
7
|
/** Stable id (`fld_…`) of the field the rule reads — never its name. */
|
|
8
8
|
field: string;
|
|
9
9
|
operator: Operator;
|
|
10
10
|
value?: string;
|
|
11
|
+
/** For `in` / `notIn`: the values any one of which satisfies the rule. */
|
|
12
|
+
values?: string[];
|
|
11
13
|
}
|
|
12
14
|
export interface Condition {
|
|
13
15
|
logic: "and" | "or";
|
package/dist/shared/types.d.ts
CHANGED
|
@@ -8,13 +8,27 @@
|
|
|
8
8
|
* POST /api/hubspot/forms/:slug/submit → SubmitResponse (SubmitRequest in)
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
export type Operator =
|
|
11
|
+
export type Operator =
|
|
12
|
+
| "eq"
|
|
13
|
+
| "neq"
|
|
14
|
+
| "contains"
|
|
15
|
+
| "notContains"
|
|
16
|
+
| "startsWith"
|
|
17
|
+
| "endsWith"
|
|
18
|
+
| "empty"
|
|
19
|
+
| "notEmpty"
|
|
20
|
+
| "gt"
|
|
21
|
+
| "lt"
|
|
22
|
+
| "in"
|
|
23
|
+
| "notIn";
|
|
12
24
|
|
|
13
25
|
export interface Rule {
|
|
14
26
|
/** Stable id (`fld_…`) of the field the rule reads — never its name. */
|
|
15
27
|
field: string;
|
|
16
28
|
operator: Operator;
|
|
17
29
|
value?: string;
|
|
30
|
+
/** For `in` / `notIn`: the values any one of which satisfies the rule. */
|
|
31
|
+
values?: string[];
|
|
18
32
|
}
|
|
19
33
|
|
|
20
34
|
export interface Condition {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "strapi-plugin-hubspot",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "The form builder for HubSpot in Strapi — multi-step forms with conditional fields mapped to real CRM properties, a public submit pipeline with retries, and save-time mapping validation.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"strapi",
|
|
@@ -100,4 +100,4 @@
|
|
|
100
100
|
"engines": {
|
|
101
101
|
"node": ">=18.0.0"
|
|
102
102
|
}
|
|
103
|
-
}
|
|
103
|
+
}
|