@bigbinary/neeto-rules-frontend 2.7.38 → 2.7.40-beta1
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/README.md +2 -0
- package/dist/.ready +1 -1
- package/dist/cjs/v2/NeetoRulesForm.js +14 -4
- package/dist/cjs/v2/NeetoRulesForm.js.map +1 -1
- package/dist/cjs/v2/RulePreview.js.map +1 -1
- package/dist/v2/NeetoRulesForm.js +14 -4
- package/dist/v2/NeetoRulesForm.js.map +1 -1
- package/dist/v2/RulePreview.js.map +1 -1
- package/package.json +1 -1
- package/types.d.ts +2 -0
package/README.md
CHANGED
|
@@ -236,6 +236,8 @@ The `NeetoRulesForm` component is used to create and edit automation rules.
|
|
|
236
236
|
- `handleClose`: The function to handle the form close.
|
|
237
237
|
- `showStatusSwitch`: To specify whether the status switch should be shown or
|
|
238
238
|
not. It is `true` by default.
|
|
239
|
+
- `statusHelpText`: To override the help text shown next to the status switch.
|
|
240
|
+
Accepts `{ active, inactive }`. Defaults to the automation rule help text.
|
|
239
241
|
|
|
240
242
|
#### Usage
|
|
241
243
|
|
package/dist/.ready
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Built at 2026-09-
|
|
1
|
+
Built at 2026-09-25T20:54:33.363Z
|
|
@@ -1200,7 +1200,11 @@ var TextareaField = function TextareaField(_ref) {
|
|
|
1200
1200
|
|
|
1201
1201
|
var ENABLED = index.STATUS_KEYS.ENABLED,
|
|
1202
1202
|
DISABLED = index.STATUS_KEYS.DISABLED;
|
|
1203
|
-
var Status = function Status() {
|
|
1203
|
+
var Status = function Status(_ref) {
|
|
1204
|
+
var _helpText$active, _helpText$inactive;
|
|
1205
|
+
var label = _ref.label,
|
|
1206
|
+
_ref$helpText = _ref.helpText,
|
|
1207
|
+
helpText = _ref$helpText === void 0 ? {} : _ref$helpText;
|
|
1204
1208
|
var _useFormikContext = formik.useFormikContext(),
|
|
1205
1209
|
status = _useFormikContext.values.status,
|
|
1206
1210
|
setFieldValue = _useFormikContext.setFieldValue;
|
|
@@ -1212,13 +1216,13 @@ var Status = function Status() {
|
|
|
1212
1216
|
};
|
|
1213
1217
|
return /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Switch, {
|
|
1214
1218
|
checked: defaultValue === ENABLED,
|
|
1215
|
-
label: t("neetoRules.labels.active"),
|
|
1219
|
+
label: label || t("neetoRules.labels.active"),
|
|
1216
1220
|
size: "lg",
|
|
1217
1221
|
labelProps: {
|
|
1218
1222
|
helpIconProps: {
|
|
1219
1223
|
icon: lucideReact.CircleHelp,
|
|
1220
1224
|
tooltipProps: {
|
|
1221
|
-
content:
|
|
1225
|
+
content: defaultValue === ENABLED ? (_helpText$active = helpText === null || helpText === void 0 ? void 0 : helpText.active) !== null && _helpText$active !== void 0 ? _helpText$active : t("neetoRules.tooltips.rule.active") : (_helpText$inactive = helpText === null || helpText === void 0 ? void 0 : helpText.inactive) !== null && _helpText$inactive !== void 0 ? _helpText$inactive : t("neetoRules.tooltips.rule.inactive")
|
|
1222
1226
|
}
|
|
1223
1227
|
}
|
|
1224
1228
|
},
|
|
@@ -1246,6 +1250,9 @@ var Form = function Form(_ref) {
|
|
|
1246
1250
|
handleCancel = _ref$handleCancel === void 0 ? neetoCist.noop : _ref$handleCancel,
|
|
1247
1251
|
_ref$showStatusSwitch = _ref.showStatusSwitch,
|
|
1248
1252
|
showStatusSwitch = _ref$showStatusSwitch === void 0 ? true : _ref$showStatusSwitch,
|
|
1253
|
+
statusSwitchLabel = _ref.statusSwitchLabel,
|
|
1254
|
+
_ref$statusHelpText = _ref.statusHelpText,
|
|
1255
|
+
statusHelpText = _ref$statusHelpText === void 0 ? {} : _ref$statusHelpText,
|
|
1249
1256
|
_ref$payloadKey = _ref.payloadKey,
|
|
1250
1257
|
payloadKey = _ref$payloadKey === void 0 ? "rule" : _ref$payloadKey,
|
|
1251
1258
|
_ref$isNameGeneration = _ref.isNameGenerationDisabled,
|
|
@@ -1356,7 +1363,10 @@ var Form = function Form(_ref) {
|
|
|
1356
1363
|
onClick: handleCancelNameGeneration
|
|
1357
1364
|
})]
|
|
1358
1365
|
})]
|
|
1359
|
-
}), showStatusSwitch && /*#__PURE__*/jsxRuntime.jsx(Status, {
|
|
1366
|
+
}), showStatusSwitch && /*#__PURE__*/jsxRuntime.jsx(Status, {
|
|
1367
|
+
helpText: statusHelpText,
|
|
1368
|
+
label: statusSwitchLabel
|
|
1369
|
+
})]
|
|
1360
1370
|
}), typeof _children === "function" ? _children === null || _children === void 0 ? void 0 : _children(_objectSpread$1({
|
|
1361
1371
|
values: values,
|
|
1362
1372
|
formattedValues: index.buildPayload(data, values),
|