@inspirer-dev/crm-dashboard 1.0.94 → 1.0.97
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/admin/src/components/TriggerParamsField/constants.ts +18 -0
- package/admin/src/components/TriggerParamsField/index.tsx +7 -1
- package/dist/_chunks/{index-CKr1VvX0.mjs → index-B6p8h4bP.mjs} +21 -1
- package/dist/_chunks/{index-BqcFfrh8.js → index-Bw4JD4Cy.js} +21 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -99,6 +99,24 @@ export const TRIGGER_PARAMS: TriggerParamDef[] = [
|
|
|
99
99
|
placeholder: '250',
|
|
100
100
|
stageTypes: ['modal', 'side_hint', 'retry'],
|
|
101
101
|
},
|
|
102
|
+
{
|
|
103
|
+
key: 'depositSuccess',
|
|
104
|
+
label: 'Пополнение депозита',
|
|
105
|
+
description: 'Срабатывает после успешного пополнения; значение = мин. сумма (0 = любая)',
|
|
106
|
+
unit: '₽',
|
|
107
|
+
min: 0,
|
|
108
|
+
placeholder: '0',
|
|
109
|
+
stageTypes: ['modal', 'side_hint'],
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
key: 'depositCount',
|
|
113
|
+
label: 'Номер депозита',
|
|
114
|
+
description: 'Срабатывает строго на N-й успешный депозит (точное совпадение)',
|
|
115
|
+
unit: '',
|
|
116
|
+
min: 1,
|
|
117
|
+
placeholder: '2',
|
|
118
|
+
stageTypes: ['modal', 'side_hint'],
|
|
119
|
+
},
|
|
102
120
|
];
|
|
103
121
|
|
|
104
122
|
export const STAGE_TYPE_LABELS: Record<string, string> = {
|
|
@@ -357,7 +357,13 @@ const TriggerParamsField = forwardRef<HTMLDivElement, TriggerParamsFieldProps>(
|
|
|
357
357
|
};
|
|
358
358
|
|
|
359
359
|
const addParamToGroup = (idx: number, key: string) => {
|
|
360
|
-
|
|
360
|
+
// Event triggers carry a value that must persist the moment they're added
|
|
361
|
+
// (serialize drops null), so seed a sensible default instead of silently
|
|
362
|
+
// requiring the user to type one: depositSuccess 0 = "any amount",
|
|
363
|
+
// depositCount 1 = "1st deposit".
|
|
364
|
+
const defaultOnAdd: Record<string, number> = { depositSuccess: 0, depositCount: 1 };
|
|
365
|
+
const defaultValue = key in defaultOnAdd ? defaultOnAdd[key] : null;
|
|
366
|
+
const next = groups.map((g, i) => (i === idx ? { ...g, [key]: defaultValue } : g));
|
|
361
367
|
update(next);
|
|
362
368
|
};
|
|
363
369
|
|
|
@@ -93,6 +93,24 @@ const TRIGGER_PARAMS = [
|
|
|
93
93
|
min: 0,
|
|
94
94
|
placeholder: "250",
|
|
95
95
|
stageTypes: ["modal", "side_hint", "retry"]
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
key: "depositSuccess",
|
|
99
|
+
label: "Пополнение депозита",
|
|
100
|
+
description: "Срабатывает после успешного пополнения; значение = мин. сумма (0 = любая)",
|
|
101
|
+
unit: "₽",
|
|
102
|
+
min: 0,
|
|
103
|
+
placeholder: "0",
|
|
104
|
+
stageTypes: ["modal", "side_hint"]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
key: "depositCount",
|
|
108
|
+
label: "Номер депозита",
|
|
109
|
+
description: "Срабатывает строго на N-й успешный депозит (точное совпадение)",
|
|
110
|
+
unit: "",
|
|
111
|
+
min: 1,
|
|
112
|
+
placeholder: "2",
|
|
113
|
+
stageTypes: ["modal", "side_hint"]
|
|
96
114
|
}
|
|
97
115
|
];
|
|
98
116
|
const STAGE_TYPE_LABELS = {
|
|
@@ -349,7 +367,9 @@ const TriggerParamsField = forwardRef(
|
|
|
349
367
|
update(next.length > 0 ? next : [{}]);
|
|
350
368
|
};
|
|
351
369
|
const addParamToGroup = (idx, key) => {
|
|
352
|
-
const
|
|
370
|
+
const defaultOnAdd = { depositSuccess: 0, depositCount: 1 };
|
|
371
|
+
const defaultValue = key in defaultOnAdd ? defaultOnAdd[key] : null;
|
|
372
|
+
const next = groups.map((g, i) => i === idx ? { ...g, [key]: defaultValue } : g);
|
|
353
373
|
update(next);
|
|
354
374
|
};
|
|
355
375
|
const removeParamFromGroup = (idx, key) => {
|
|
@@ -97,6 +97,24 @@ const TRIGGER_PARAMS = [
|
|
|
97
97
|
min: 0,
|
|
98
98
|
placeholder: "250",
|
|
99
99
|
stageTypes: ["modal", "side_hint", "retry"]
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
key: "depositSuccess",
|
|
103
|
+
label: "Пополнение депозита",
|
|
104
|
+
description: "Срабатывает после успешного пополнения; значение = мин. сумма (0 = любая)",
|
|
105
|
+
unit: "₽",
|
|
106
|
+
min: 0,
|
|
107
|
+
placeholder: "0",
|
|
108
|
+
stageTypes: ["modal", "side_hint"]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
key: "depositCount",
|
|
112
|
+
label: "Номер депозита",
|
|
113
|
+
description: "Срабатывает строго на N-й успешный депозит (точное совпадение)",
|
|
114
|
+
unit: "",
|
|
115
|
+
min: 1,
|
|
116
|
+
placeholder: "2",
|
|
117
|
+
stageTypes: ["modal", "side_hint"]
|
|
100
118
|
}
|
|
101
119
|
];
|
|
102
120
|
const STAGE_TYPE_LABELS = {
|
|
@@ -353,7 +371,9 @@ const TriggerParamsField = React.forwardRef(
|
|
|
353
371
|
update(next.length > 0 ? next : [{}]);
|
|
354
372
|
};
|
|
355
373
|
const addParamToGroup = (idx, key) => {
|
|
356
|
-
const
|
|
374
|
+
const defaultOnAdd = { depositSuccess: 0, depositCount: 1 };
|
|
375
|
+
const defaultValue = key in defaultOnAdd ? defaultOnAdd[key] : null;
|
|
376
|
+
const next = groups.map((g, i) => i === idx ? { ...g, [key]: defaultValue } : g);
|
|
357
377
|
update(next);
|
|
358
378
|
};
|
|
359
379
|
const removeParamFromGroup = (idx, key) => {
|
package/dist/admin/index.js
CHANGED
package/dist/admin/index.mjs
CHANGED