@bigbinary/neeto-approvals-frontend 0.2.3 → 0.2.5
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/dist/index.cjs.js +16 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +16 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4347,17 +4347,20 @@ var Form$2 = function Form(_ref) {
|
|
|
4347
4347
|
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Pane.Body, null, /*#__PURE__*/React.createElement("div", {
|
|
4348
4348
|
className: "w-full space-y-6"
|
|
4349
4349
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
4350
|
+
required: true,
|
|
4350
4351
|
className: "w-full",
|
|
4351
4352
|
label: t("inputs.labels.firstName"),
|
|
4352
4353
|
name: "firstName",
|
|
4353
4354
|
placeholder: t("inputs.placeholders.firstName"),
|
|
4354
4355
|
ref: inputReference
|
|
4355
4356
|
}), /*#__PURE__*/React.createElement(Input, {
|
|
4357
|
+
required: true,
|
|
4356
4358
|
className: "w-full",
|
|
4357
4359
|
label: t("inputs.labels.lastName"),
|
|
4358
4360
|
name: "lastName",
|
|
4359
4361
|
placeholder: t("inputs.placeholders.lastName")
|
|
4360
4362
|
}), /*#__PURE__*/React.createElement(Input, {
|
|
4363
|
+
required: true,
|
|
4361
4364
|
className: "w-full",
|
|
4362
4365
|
label: t("common.email"),
|
|
4363
4366
|
name: "email",
|
|
@@ -5250,10 +5253,14 @@ function _toConsumableArray(arr) {
|
|
|
5250
5253
|
|
|
5251
5254
|
var _t;
|
|
5252
5255
|
var VALID_VARIABLE_NAME_REGEX = /^[a-z](?:\w*[a-z0-9])*$/i;
|
|
5256
|
+
var EVERYONE_VISIBILITY = {
|
|
5257
|
+
label: t$2("select.visibility.everyone"),
|
|
5258
|
+
value: "everyone"
|
|
5259
|
+
};
|
|
5253
5260
|
var TEMPLATE_FORM_INITIAL_VALUES = {
|
|
5254
5261
|
name: "",
|
|
5255
5262
|
description: "",
|
|
5256
|
-
visibility:
|
|
5263
|
+
visibility: EVERYONE_VISIBILITY,
|
|
5257
5264
|
approver: "",
|
|
5258
5265
|
variables: [],
|
|
5259
5266
|
message: ""
|
|
@@ -5274,10 +5281,6 @@ var TEMPLATE_FORM_VALIDATION_SCHEMA = yup.object().shape({
|
|
|
5274
5281
|
})).matches(VALID_VARIABLE_NAME_REGEX, t$2("validations.variableName"))
|
|
5275
5282
|
}))
|
|
5276
5283
|
});
|
|
5277
|
-
var EVERYONE_VISIBILITY = {
|
|
5278
|
-
label: t$2("select.visibility.everyone"),
|
|
5279
|
-
value: "everyone"
|
|
5280
|
-
};
|
|
5281
5284
|
|
|
5282
5285
|
var DynamicBlock = function DynamicBlock() {
|
|
5283
5286
|
var _useTranslation = useTranslation(),
|
|
@@ -5310,6 +5313,7 @@ var DynamicBlock = function DynamicBlock() {
|
|
|
5310
5313
|
key: index
|
|
5311
5314
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
5312
5315
|
autoFocus: true,
|
|
5316
|
+
required: true,
|
|
5313
5317
|
label: t("common.variable_", {
|
|
5314
5318
|
number: index + 1
|
|
5315
5319
|
}),
|
|
@@ -5334,6 +5338,7 @@ var DynamicBlock = function DynamicBlock() {
|
|
|
5334
5338
|
}
|
|
5335
5339
|
}));
|
|
5336
5340
|
})), /*#__PURE__*/React.createElement(FormikEditor, {
|
|
5341
|
+
required: true,
|
|
5337
5342
|
key: variables,
|
|
5338
5343
|
label: t("inputs.labels.message"),
|
|
5339
5344
|
name: "message",
|
|
@@ -5390,6 +5395,7 @@ var Form$1 = function Form(_ref) {
|
|
|
5390
5395
|
className: "flex w-full flex-col space-y-6"
|
|
5391
5396
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
5392
5397
|
autoFocus: true,
|
|
5398
|
+
required: true,
|
|
5393
5399
|
className: "w-1/2",
|
|
5394
5400
|
label: t("common.name"),
|
|
5395
5401
|
name: "name",
|
|
@@ -5402,6 +5408,7 @@ var Form$1 = function Form(_ref) {
|
|
|
5402
5408
|
}), /*#__PURE__*/React.createElement("div", {
|
|
5403
5409
|
className: "flex space-x-6"
|
|
5404
5410
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
5411
|
+
required: true,
|
|
5405
5412
|
label: t("inputs.labels.approver"),
|
|
5406
5413
|
name: "approver",
|
|
5407
5414
|
options: approvers.map(function (approver) {
|
|
@@ -6049,7 +6056,8 @@ var Form = function Form(_ref) {
|
|
|
6049
6056
|
}, function (_ref2) {
|
|
6050
6057
|
var setFieldValue = _ref2.setFieldValue,
|
|
6051
6058
|
values = _ref2.values,
|
|
6052
|
-
resetForm = _ref2.resetForm
|
|
6059
|
+
resetForm = _ref2.resetForm,
|
|
6060
|
+
dirty = _ref2.dirty;
|
|
6053
6061
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Pane.Body, null, /*#__PURE__*/React.createElement("div", {
|
|
6054
6062
|
className: "w-full space-y-6"
|
|
6055
6063
|
}, /*#__PURE__*/React.createElement(Select$1, {
|
|
@@ -6067,6 +6075,7 @@ var Form = function Form(_ref) {
|
|
|
6067
6075
|
}, function () {
|
|
6068
6076
|
return variables.map(function (variable, index) {
|
|
6069
6077
|
return /*#__PURE__*/React.createElement(Input, {
|
|
6078
|
+
required: true,
|
|
6070
6079
|
className: "w-full",
|
|
6071
6080
|
key: variable,
|
|
6072
6081
|
label: variable,
|
|
@@ -6083,6 +6092,7 @@ var Form = function Form(_ref) {
|
|
|
6083
6092
|
})))), /*#__PURE__*/React.createElement(Pane.Footer, {
|
|
6084
6093
|
className: "flex gap-x-2"
|
|
6085
6094
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
6095
|
+
disabled: !dirty,
|
|
6086
6096
|
label: t("buttons.saveChanges"),
|
|
6087
6097
|
loading: isLoading,
|
|
6088
6098
|
type: "submit"
|