conexys-elements 1.1.23 → 1.1.26
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/components/AppFormFields.d.ts.map +1 -1
- package/dist/components/AppFormFieldsFromConfig.d.ts.map +1 -1
- package/dist/components/AppFormFieldsNoUser.d.ts.map +1 -1
- package/dist/components/AppFormFieldsTable.d.ts.map +1 -1
- package/dist/components/form/components/FormLogin.d.ts.map +1 -1
- package/dist/components/form/components/InputPassword.d.ts.map +1 -1
- package/dist/components/form/components/InputText.d.ts.map +1 -1
- package/dist/index.esm.js +111 -18
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +111 -18
- package/dist/index.js.map +1 -1
- package/dist/types/components/appFormFields.types.d.ts +1 -0
- package/dist/types/components/appFormFields.types.d.ts.map +1 -1
- package/dist/types/components/appFormFieldsFromConfig.types.d.ts +1 -0
- package/dist/types/components/appFormFieldsFromConfig.types.d.ts.map +1 -1
- package/dist/types/components/appFormFieldsNoUser.types.d.ts +1 -0
- package/dist/types/components/appFormFieldsNoUser.types.d.ts.map +1 -1
- package/dist/types/components/appFormFieldsTable.types.d.ts +1 -0
- package/dist/types/components/appFormFieldsTable.types.d.ts.map +1 -1
- package/dist/types/components/form.types.d.ts +4 -0
- package/dist/types/components/form.types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppFormFields.d.ts","sourceRoot":"","sources":["../../src/components/AppFormFields.tsx"],"names":[],"mappings":"AASA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAOzE,OAAO,KAAK,EAIV,kBAAkB,EACnB,MAAM,yCAAyC,CAAC;AAuBjD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,OAAO,EACP,aAAa,EACb,YAAY,EACZ,eAAe,EACf,EAAE,EACF,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,MAAe,EACf,iBAAyB,GAC1B,EAAE,kBAAkB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"AppFormFields.d.ts","sourceRoot":"","sources":["../../src/components/AppFormFields.tsx"],"names":[],"mappings":"AASA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAOzE,OAAO,KAAK,EAIV,kBAAkB,EACnB,MAAM,yCAAyC,CAAC;AAuBjD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,OAAO,EACP,aAAa,EACb,YAAY,EACZ,eAAe,EACf,EAAE,EACF,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,MAAe,EACf,iBAAyB,GAC1B,EAAE,kBAAkB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAyK/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppFormFieldsFromConfig.d.ts","sourceRoot":"","sources":["../../src/components/AppFormFieldsFromConfig.tsx"],"names":[],"mappings":"AASA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAIvC,OAAO,KAAK,EAGV,4BAA4B,EAC7B,MAAM,mDAAmD,CAAC;AAsB3D,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,EAC9C,UAAU,EAAE,kBAAkB,EAC9B,iBAAiB,EAAE,yBAAyB,EAC5C,MAAW,EACX,aAAkB,EAClB,YAAiB,EACjB,eAAoB,EACpB,EAAO,EACP,QAAa,EACb,QAAa,EACb,SAAc,EACd,IAAS,EACT,eAAe,EACf,SAAS,EACT,SAA0B,EAC1B,gBAAoB,EACpB,MAAM,EACN,CAAC,EAAE,mBAAmB,EACtB,WAAoB,EACpB,MAAe,EACf,aAAsB,GACvB,EAAE,4BAA4B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"AppFormFieldsFromConfig.d.ts","sourceRoot":"","sources":["../../src/components/AppFormFieldsFromConfig.tsx"],"names":[],"mappings":"AASA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAIvC,OAAO,KAAK,EAGV,4BAA4B,EAC7B,MAAM,mDAAmD,CAAC;AAsB3D,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,EAC9C,UAAU,EAAE,kBAAkB,EAC9B,iBAAiB,EAAE,yBAAyB,EAC5C,MAAW,EACX,aAAkB,EAClB,YAAiB,EACjB,eAAoB,EACpB,EAAO,EACP,QAAa,EACb,QAAa,EACb,SAAc,EACd,IAAS,EACT,eAAe,EACf,SAAS,EACT,SAA0B,EAC1B,gBAAoB,EACpB,MAAM,EACN,CAAC,EAAE,mBAAmB,EACtB,WAAoB,EACpB,MAAe,EACf,aAAsB,GACvB,EAAE,4BAA4B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAkHzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppFormFieldsNoUser.d.ts","sourceRoot":"","sources":["../../src/components/AppFormFieldsNoUser.tsx"],"names":[],"mappings":"AASA,OAAO,KAMN,MAAM,OAAO,CAAC;AAQf,OAAO,KAAK,EAIV,wBAAwB,EACzB,MAAM,+CAA+C,CAAC;AASvD,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAC1C,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,SAAS,GACV,EAAE,wBAAwB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"AppFormFieldsNoUser.d.ts","sourceRoot":"","sources":["../../src/components/AppFormFieldsNoUser.tsx"],"names":[],"mappings":"AASA,OAAO,KAMN,MAAM,OAAO,CAAC;AAQf,OAAO,KAAK,EAIV,wBAAwB,EACzB,MAAM,+CAA+C,CAAC;AASvD,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAC1C,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,SAAS,GACV,EAAE,wBAAwB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CA6IrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppFormFieldsTable.d.ts","sourceRoot":"","sources":["../../src/components/AppFormFieldsTable.tsx"],"names":[],"mappings":"AASA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAQzE,OAAO,KAAK,EAKV,uBAAuB,EACxB,MAAM,8CAA8C,CAAC;AA6BtD,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,IAAI,EACJ,MAAM,EACN,OAAO,EACP,aAAa,EACb,YAAY,EACZ,eAAe,EACf,EAAE,EACF,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,IAAI,EACJ,MAAM,EACN,WAAW,GACZ,EAAE,uBAAuB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"AppFormFieldsTable.d.ts","sourceRoot":"","sources":["../../src/components/AppFormFieldsTable.tsx"],"names":[],"mappings":"AASA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAQzE,OAAO,KAAK,EAKV,uBAAuB,EACxB,MAAM,8CAA8C,CAAC;AA6BtD,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,IAAI,EACJ,MAAM,EACN,OAAO,EACP,aAAa,EACb,YAAY,EACZ,eAAe,EACf,EAAE,EACF,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,IAAI,EACJ,MAAM,EACN,WAAW,GACZ,EAAE,uBAAuB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAgQpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormLogin.d.ts","sourceRoot":"","sources":["../../../../src/components/form/components/FormLogin.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FormLogin.d.ts","sourceRoot":"","sources":["../../../../src/components/form/components/FormLogin.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,KAAK,EAEV,cAAc,EACf,MAAM,sCAAsC,CAAC;AAU9C,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA0TvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputPassword.d.ts","sourceRoot":"","sources":["../../../../src/components/form/components/InputPassword.tsx"],"names":[],"mappings":"AAQA,OAAO,
|
|
1
|
+
{"version":3,"file":"InputPassword.d.ts","sourceRoot":"","sources":["../../../../src/components/form/components/InputPassword.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAS3D,OAAO,KAAK,EACV,kBAAkB,EAEnB,MAAM,sCAAsC,CAAC;AAkB9C,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAwS/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputText.d.ts","sourceRoot":"","sources":["../../../../src/components/form/components/InputText.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAgC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"InputText.d.ts","sourceRoot":"","sources":["../../../../src/components/form/components/InputText.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAUrD,OAAO,KAAK,EACV,cAAc,EAEf,MAAM,sCAAsC,CAAC;AAY9C,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAoOvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
package/dist/index.esm.js
CHANGED
|
@@ -40,8 +40,11 @@ import Checkboxmui from '@mui/material/Checkbox';
|
|
|
40
40
|
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
41
41
|
import { useForm } from 'react-hook-form';
|
|
42
42
|
import Button$3 from '@mui/material/Button';
|
|
43
|
+
import Visibility from '@mui/icons-material/Visibility';
|
|
44
|
+
import VisibilityOff from '@mui/icons-material/VisibilityOff';
|
|
43
45
|
import TextField from '@mui/material/TextField';
|
|
44
46
|
import InputLabel from '@mui/material/InputLabel';
|
|
47
|
+
import InputAdornment from '@mui/material/InputAdornment';
|
|
45
48
|
import JoditEditor from 'jodit-react';
|
|
46
49
|
import Radio from '@mui/material/Radio';
|
|
47
50
|
import RadioGroup from '@mui/material/RadioGroup';
|
|
@@ -4168,6 +4171,7 @@ function AppFormFields({
|
|
|
4168
4171
|
maxLength: block.maxlength,
|
|
4169
4172
|
pattern: block.pattern
|
|
4170
4173
|
},
|
|
4174
|
+
showPasswordToggle: block.showPasswordToggle,
|
|
4171
4175
|
items: block.items
|
|
4172
4176
|
}, 'form')), additionalfields1.content.body.map(block => RenderForm({
|
|
4173
4177
|
component: block.component,
|
|
@@ -4191,6 +4195,7 @@ function AppFormFields({
|
|
|
4191
4195
|
maxLength: block.maxlength,
|
|
4192
4196
|
pattern: block.pattern
|
|
4193
4197
|
},
|
|
4198
|
+
showPasswordToggle: block.showPasswordToggle,
|
|
4194
4199
|
items: block.items
|
|
4195
4200
|
}, 'form')), children);
|
|
4196
4201
|
}
|
|
@@ -4265,6 +4270,7 @@ function AppFormFieldsFromConfig({
|
|
|
4265
4270
|
maxLength: block.maxlength || block.validate && block.validate.maxLength,
|
|
4266
4271
|
pattern: block.pattern || block.validate && block.validate.pattern
|
|
4267
4272
|
},
|
|
4273
|
+
showPasswordToggle: block.showPasswordToggle,
|
|
4268
4274
|
items: block.items || []
|
|
4269
4275
|
}, nouser || 'user')));
|
|
4270
4276
|
}
|
|
@@ -4624,6 +4630,7 @@ function AppFormFieldsNoUser({
|
|
|
4624
4630
|
maxLength: block.maxlength,
|
|
4625
4631
|
pattern: block.pattern
|
|
4626
4632
|
},
|
|
4633
|
+
showPasswordToggle: block.showPasswordToggle,
|
|
4627
4634
|
items: block.items
|
|
4628
4635
|
}, 'nouser')), additionalfields1.content.body.map(block => RenderForm({
|
|
4629
4636
|
component: block.component,
|
|
@@ -4647,6 +4654,7 @@ function AppFormFieldsNoUser({
|
|
|
4647
4654
|
maxLength: block.maxlength,
|
|
4648
4655
|
pattern: block.pattern
|
|
4649
4656
|
},
|
|
4657
|
+
showPasswordToggle: block.showPasswordToggle,
|
|
4650
4658
|
items: block.items
|
|
4651
4659
|
}, 'nouser')), children);
|
|
4652
4660
|
}
|
|
@@ -4800,6 +4808,7 @@ function AppFormFieldsTable({
|
|
|
4800
4808
|
maxLength: block.maxlength || block.validate && block.validate.maxLength,
|
|
4801
4809
|
pattern: block.pattern || block.validate && block.validate.pattern
|
|
4802
4810
|
},
|
|
4811
|
+
showPasswordToggle: block.showPasswordToggle,
|
|
4803
4812
|
items: block.items || [],
|
|
4804
4813
|
itemID: id1,
|
|
4805
4814
|
adminCheck: show === 'admin'
|
|
@@ -4831,6 +4840,7 @@ function AppFormFieldsTable({
|
|
|
4831
4840
|
maxLength: block.maxlength || block.validate && block.validate.maxLength,
|
|
4832
4841
|
pattern: block.pattern || block.validate && block.validate.pattern
|
|
4833
4842
|
},
|
|
4843
|
+
showPasswordToggle: block.showPasswordToggle,
|
|
4834
4844
|
items: block.items || [],
|
|
4835
4845
|
itemID: id1,
|
|
4836
4846
|
adminCheck: show === 'admin'
|
|
@@ -10292,6 +10302,11 @@ const FormLogin = ({
|
|
|
10292
10302
|
const [trigger1, setTrigger1] = useState(0);
|
|
10293
10303
|
const [trigger2, setTrigger2] = useState(0);
|
|
10294
10304
|
const [isChecked, setIsChecked] = useState(false);
|
|
10305
|
+
const showToggle = block.showPasswordToggle === true;
|
|
10306
|
+
const [showPassword, setShowPassword] = useState(false);
|
|
10307
|
+
const [showConfirmation, setShowConfirmation] = useState(false);
|
|
10308
|
+
const handleTogglePassword = () => setShowPassword(v => !v);
|
|
10309
|
+
const handleToggleConfirmation = () => setShowConfirmation(v => !v);
|
|
10295
10310
|
const handleChange = () => {
|
|
10296
10311
|
setIsChecked(current => !current);
|
|
10297
10312
|
};
|
|
@@ -10340,7 +10355,7 @@ const FormLogin = ({
|
|
|
10340
10355
|
}, block.label)), /*#__PURE__*/React__default.createElement("div", {
|
|
10341
10356
|
className: "input-group"
|
|
10342
10357
|
}, /*#__PURE__*/React__default.createElement("input", {
|
|
10343
|
-
type: block.type,
|
|
10358
|
+
type: showToggle && showPassword ? 'text' : block.type,
|
|
10344
10359
|
value: block.value || '',
|
|
10345
10360
|
name: block.name,
|
|
10346
10361
|
onChange: block.onChange,
|
|
@@ -10350,7 +10365,13 @@ const FormLogin = ({
|
|
|
10350
10365
|
className: "input-group-text"
|
|
10351
10366
|
}, /*#__PURE__*/React__default.createElement("i", {
|
|
10352
10367
|
className: "bx bx-lock text-4"
|
|
10353
|
-
}))
|
|
10368
|
+
})), showToggle && (/*#__PURE__*/React__default.createElement("button", {
|
|
10369
|
+
type: "button",
|
|
10370
|
+
className: "input-group-text password-toggle-btn",
|
|
10371
|
+
onClick: handleTogglePassword,
|
|
10372
|
+
"aria-label": t('System.show_password'),
|
|
10373
|
+
tabIndex: -1
|
|
10374
|
+
}, showPassword ? /*#__PURE__*/React__default.createElement(VisibilityOff, null) : /*#__PURE__*/React__default.createElement(Visibility, null)))), /*#__PURE__*/React__default.createElement(NavLink, {
|
|
10354
10375
|
to: forgot_passworddir,
|
|
10355
10376
|
className: "float-end"
|
|
10356
10377
|
}, t('login.recover_password')));
|
|
@@ -10454,15 +10475,23 @@ const FormLogin = ({
|
|
|
10454
10475
|
className: "col-sm-6 mb-3"
|
|
10455
10476
|
}, /*#__PURE__*/React__default.createElement("label", null, labels[1]), /*#__PURE__*/React__default.createElement("span", {
|
|
10456
10477
|
className: "required"
|
|
10457
|
-
}, "*"), /*#__PURE__*/React__default.createElement("
|
|
10478
|
+
}, "*"), /*#__PURE__*/React__default.createElement("div", {
|
|
10479
|
+
className: "input-group"
|
|
10480
|
+
}, /*#__PURE__*/React__default.createElement("input", {
|
|
10458
10481
|
id: ids[1],
|
|
10459
|
-
type:
|
|
10482
|
+
type: showToggle && showPassword ? 'text' : 'password',
|
|
10460
10483
|
className: errors.password ? 'form-control form-control-lg is-invalid' : 'form-control form-control-lg',
|
|
10461
10484
|
...register('password', {
|
|
10462
10485
|
required: true,
|
|
10463
10486
|
minLength: 5
|
|
10464
10487
|
})
|
|
10465
|
-
}),
|
|
10488
|
+
}), showToggle && (/*#__PURE__*/React__default.createElement("button", {
|
|
10489
|
+
type: "button",
|
|
10490
|
+
className: "input-group-text password-toggle-btn",
|
|
10491
|
+
onClick: handleTogglePassword,
|
|
10492
|
+
"aria-label": t('System.show_password'),
|
|
10493
|
+
tabIndex: -1
|
|
10494
|
+
}, showPassword ? /*#__PURE__*/React__default.createElement(VisibilityOff, null) : /*#__PURE__*/React__default.createElement(Visibility, null)))), errors.password?.type === 'required' && (/*#__PURE__*/React__default.createElement("em", {
|
|
10466
10495
|
className: "error invalid-feedback"
|
|
10467
10496
|
}, t('error.please_enter_password'))), errors.password?.type === 'minLength' && (/*#__PURE__*/React__default.createElement("em", {
|
|
10468
10497
|
className: "error invalid-feedback"
|
|
@@ -10470,16 +10499,24 @@ const FormLogin = ({
|
|
|
10470
10499
|
className: "col-sm-6 mb-3"
|
|
10471
10500
|
}, /*#__PURE__*/React__default.createElement("label", null, labels[2]), /*#__PURE__*/React__default.createElement("span", {
|
|
10472
10501
|
className: "required"
|
|
10473
|
-
}, "*"), /*#__PURE__*/React__default.createElement("
|
|
10502
|
+
}, "*"), /*#__PURE__*/React__default.createElement("div", {
|
|
10503
|
+
className: "input-group"
|
|
10504
|
+
}, /*#__PURE__*/React__default.createElement("input", {
|
|
10474
10505
|
id: ids[2],
|
|
10475
|
-
type:
|
|
10506
|
+
type: showToggle && showConfirmation ? 'text' : 'password',
|
|
10476
10507
|
className: errors.password_confirmation ? 'form-control form-control-lg is-invalid' : 'form-control form-control-lg',
|
|
10477
10508
|
...register('password_confirmation', {
|
|
10478
10509
|
required: true,
|
|
10479
10510
|
minLength: 5,
|
|
10480
10511
|
validate: value => value === password.current || t('error.passwords_do_not_match')
|
|
10481
10512
|
})
|
|
10482
|
-
}),
|
|
10513
|
+
}), showToggle && (/*#__PURE__*/React__default.createElement("button", {
|
|
10514
|
+
type: "button",
|
|
10515
|
+
className: "input-group-text password-toggle-btn",
|
|
10516
|
+
onClick: handleToggleConfirmation,
|
|
10517
|
+
"aria-label": t('System.show_password'),
|
|
10518
|
+
tabIndex: -1
|
|
10519
|
+
}, showConfirmation ? /*#__PURE__*/React__default.createElement(VisibilityOff, null) : /*#__PURE__*/React__default.createElement(Visibility, null)))), errors.password_confirmation?.type === 'required' && (/*#__PURE__*/React__default.createElement("em", {
|
|
10483
10520
|
className: "error invalid-feedback"
|
|
10484
10521
|
}, t('error.repeat_password'))), errors.password_confirmation?.type === 'minLength' && (/*#__PURE__*/React__default.createElement("em", {
|
|
10485
10522
|
className: "error invalid-feedback"
|
|
@@ -10763,6 +10800,11 @@ const InputPassword = ({
|
|
|
10763
10800
|
inParagraph = false
|
|
10764
10801
|
}) => {
|
|
10765
10802
|
const [t] = useTranslation('global');
|
|
10803
|
+
const showToggle = block.showPasswordToggle === true;
|
|
10804
|
+
const [showPassword, setShowPassword] = useState(false);
|
|
10805
|
+
const [showConfirmation, setShowConfirmation] = useState(false);
|
|
10806
|
+
const handleTogglePassword = () => setShowPassword(v => !v);
|
|
10807
|
+
const handleToggleConfirmation = () => setShowConfirmation(v => !v);
|
|
10766
10808
|
const {
|
|
10767
10809
|
register,
|
|
10768
10810
|
formState: {
|
|
@@ -10796,7 +10838,7 @@ const InputPassword = ({
|
|
|
10796
10838
|
}, block.label, block.validate.required && /*#__PURE__*/React__default.createElement("span", {
|
|
10797
10839
|
className: "required"
|
|
10798
10840
|
}, "*")), /*#__PURE__*/React__default.createElement("input", {
|
|
10799
|
-
type:
|
|
10841
|
+
type: showToggle && showPassword ? 'text' : 'password',
|
|
10800
10842
|
id: block.id,
|
|
10801
10843
|
className: errors.password ? `${block.className} is-invalid` : block.className,
|
|
10802
10844
|
...register(block.name, {
|
|
@@ -10805,7 +10847,13 @@ const InputPassword = ({
|
|
|
10805
10847
|
maxLength: block.validate.maxLength
|
|
10806
10848
|
}),
|
|
10807
10849
|
required: true
|
|
10808
|
-
}),
|
|
10850
|
+
}), showToggle && (/*#__PURE__*/React__default.createElement("button", {
|
|
10851
|
+
type: "button",
|
|
10852
|
+
className: "password-toggle-btn",
|
|
10853
|
+
onClick: handleTogglePassword,
|
|
10854
|
+
"aria-label": t('System.show_password'),
|
|
10855
|
+
tabIndex: -1
|
|
10856
|
+
}, showPassword ? /*#__PURE__*/React__default.createElement(VisibilityOff, null) : /*#__PURE__*/React__default.createElement(Visibility, null))), errors.password && (/*#__PURE__*/React__default.createElement("span", {
|
|
10809
10857
|
className: "error invalid-feedback"
|
|
10810
10858
|
}, errors.password.type === 'required' && t('error.please_enter_password'), errors.password.type === 'minLength' && `${t('error.password_minimum')} ${block.validate.minLength} ${t('characters')}`, errors.password.type === 'maxLength' && `${t('error.password_maximum')} ${block.validate.maxLength} ${t('characters')}`)))) : (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(InputLabel, {
|
|
10811
10859
|
htmlFor: block.id
|
|
@@ -10815,7 +10863,7 @@ const InputPassword = ({
|
|
|
10815
10863
|
hiddenLabel: true,
|
|
10816
10864
|
size: "small",
|
|
10817
10865
|
id: block.id,
|
|
10818
|
-
type:
|
|
10866
|
+
type: showToggle && showPassword ? 'text' : 'password',
|
|
10819
10867
|
value: resetvalue,
|
|
10820
10868
|
className: errors.password ? `${block.className} is-invalid` : block.className,
|
|
10821
10869
|
...register(block.name, {
|
|
@@ -10823,7 +10871,19 @@ const InputPassword = ({
|
|
|
10823
10871
|
minLength: block.validate.minLength,
|
|
10824
10872
|
maxLength: block.validate.maxLength
|
|
10825
10873
|
}),
|
|
10826
|
-
required: true
|
|
10874
|
+
required: true,
|
|
10875
|
+
slotProps: showToggle ? {
|
|
10876
|
+
input: {
|
|
10877
|
+
endAdornment: (/*#__PURE__*/React__default.createElement(InputAdornment, {
|
|
10878
|
+
position: "end"
|
|
10879
|
+
}, /*#__PURE__*/React__default.createElement(IconButton, {
|
|
10880
|
+
"aria-label": t('System.show_password'),
|
|
10881
|
+
onClick: handleTogglePassword,
|
|
10882
|
+
edge: "end",
|
|
10883
|
+
tabIndex: -1
|
|
10884
|
+
}, showPassword ? /*#__PURE__*/React__default.createElement(VisibilityOff, null) : /*#__PURE__*/React__default.createElement(Visibility, null))))
|
|
10885
|
+
}
|
|
10886
|
+
} : undefined
|
|
10827
10887
|
}), errors.password?.type === 'required' && (/*#__PURE__*/React__default.createElement("em", {
|
|
10828
10888
|
className: "error invalid-feedback"
|
|
10829
10889
|
}, t('error.please_enter_password'))), errors.password?.type === 'minLength' && (/*#__PURE__*/React__default.createElement("em", {
|
|
@@ -10837,7 +10897,7 @@ const InputPassword = ({
|
|
|
10837
10897
|
}, t('System.repeat'), " ", block.label, block.validate.required && /*#__PURE__*/React__default.createElement("span", {
|
|
10838
10898
|
className: "required"
|
|
10839
10899
|
}, "*")), /*#__PURE__*/React__default.createElement("input", {
|
|
10840
|
-
type:
|
|
10900
|
+
type: showToggle && showConfirmation ? 'text' : 'password',
|
|
10841
10901
|
id: block.id + 100,
|
|
10842
10902
|
className: errors.password_confirmation ? `${block.className} is-invalid` : block.className,
|
|
10843
10903
|
...register(`${block.name}_confirmation`, {
|
|
@@ -10847,7 +10907,13 @@ const InputPassword = ({
|
|
|
10847
10907
|
validate: value => value === password.current || t('error.passwords_do_not_match')
|
|
10848
10908
|
}),
|
|
10849
10909
|
required: true
|
|
10850
|
-
}),
|
|
10910
|
+
}), showToggle && (/*#__PURE__*/React__default.createElement("button", {
|
|
10911
|
+
type: "button",
|
|
10912
|
+
className: "password-toggle-btn",
|
|
10913
|
+
onClick: handleToggleConfirmation,
|
|
10914
|
+
"aria-label": t('System.show_password'),
|
|
10915
|
+
tabIndex: -1
|
|
10916
|
+
}, showConfirmation ? /*#__PURE__*/React__default.createElement(VisibilityOff, null) : /*#__PURE__*/React__default.createElement(Visibility, null))), errors.password_confirmation && (/*#__PURE__*/React__default.createElement("span", {
|
|
10851
10917
|
className: "error invalid-feedback"
|
|
10852
10918
|
}, errors.password_confirmation.type === 'required' && t('error.repeat_password'), errors.password_confirmation.type === 'minLength' && `${t('error.password_minimum')} ${block.validate.minLength} ${t('characters')}`, errors.password_confirmation.type === 'maxLength' && `${t('error.password_maximum')} ${block.validate.maxLength} ${t('characters')}`, errors.password_confirmation.type === 'validate' && t('error.password_not_match'))))) : (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(InputLabel, {
|
|
10853
10919
|
htmlFor: block.id + 100
|
|
@@ -10857,7 +10923,7 @@ const InputPassword = ({
|
|
|
10857
10923
|
hiddenLabel: true,
|
|
10858
10924
|
size: "small",
|
|
10859
10925
|
id: block.id + 100,
|
|
10860
|
-
type:
|
|
10926
|
+
type: showToggle && showConfirmation ? 'text' : 'password',
|
|
10861
10927
|
value: resetvalue,
|
|
10862
10928
|
className: errors.password_confirmation ? `${block.className} is-invalid` : block.className,
|
|
10863
10929
|
...register(`${block.name}_confirmation`, {
|
|
@@ -10866,7 +10932,19 @@ const InputPassword = ({
|
|
|
10866
10932
|
maxLength: block.validate.maxLength,
|
|
10867
10933
|
validate: value => value === password.current || t('error.passwords_do_not_match')
|
|
10868
10934
|
}),
|
|
10869
|
-
required: true
|
|
10935
|
+
required: true,
|
|
10936
|
+
slotProps: showToggle ? {
|
|
10937
|
+
input: {
|
|
10938
|
+
endAdornment: (/*#__PURE__*/React__default.createElement(InputAdornment, {
|
|
10939
|
+
position: "end"
|
|
10940
|
+
}, /*#__PURE__*/React__default.createElement(IconButton, {
|
|
10941
|
+
"aria-label": t('System.show_password'),
|
|
10942
|
+
onClick: handleToggleConfirmation,
|
|
10943
|
+
edge: "end",
|
|
10944
|
+
tabIndex: -1
|
|
10945
|
+
}, showConfirmation ? /*#__PURE__*/React__default.createElement(VisibilityOff, null) : /*#__PURE__*/React__default.createElement(Visibility, null))))
|
|
10946
|
+
}
|
|
10947
|
+
} : undefined
|
|
10870
10948
|
}), errors.password_confirmation?.type === 'required' && (/*#__PURE__*/React__default.createElement("em", {
|
|
10871
10949
|
className: "error invalid-feedback"
|
|
10872
10950
|
}, t('error.repeat_password'))), errors.password_confirmation?.type === 'minLength' && (/*#__PURE__*/React__default.createElement("em", {
|
|
@@ -11019,6 +11097,9 @@ const InputText = /*#__PURE__*/React__default.memo(({
|
|
|
11019
11097
|
const [t] = useTranslation('global');
|
|
11020
11098
|
const [errors, setError] = useState(false);
|
|
11021
11099
|
const [texterror, setTextError] = useState('');
|
|
11100
|
+
const showToggle = block.showPasswordToggle === true;
|
|
11101
|
+
const [showPassword, setShowPassword] = useState(false);
|
|
11102
|
+
const handleTogglePassword = () => setShowPassword(v => !v);
|
|
11022
11103
|
const handleInputBlur = useCallback(async event => {
|
|
11023
11104
|
const session = authStorage.getSessionId(configLogs) || '';
|
|
11024
11105
|
const value = event.target.value;
|
|
@@ -11110,14 +11191,26 @@ const InputText = /*#__PURE__*/React__default.memo(({
|
|
|
11110
11191
|
size: "small",
|
|
11111
11192
|
name: block.name,
|
|
11112
11193
|
id: block.id,
|
|
11113
|
-
type: block.type,
|
|
11194
|
+
type: showToggle && showPassword ? 'text' : block.type,
|
|
11114
11195
|
placeholder: block.placeholder,
|
|
11115
11196
|
value: block.value || '',
|
|
11116
11197
|
onChange: block.onChange,
|
|
11117
11198
|
onBlur: handleInputBlur,
|
|
11118
11199
|
autoComplete: block.autocomplete,
|
|
11119
11200
|
className: errors ? `${block.className} is-invalid` : block.className,
|
|
11120
|
-
required: block.validate.required
|
|
11201
|
+
required: block.validate.required,
|
|
11202
|
+
slotProps: showToggle ? {
|
|
11203
|
+
input: {
|
|
11204
|
+
endAdornment: (/*#__PURE__*/React__default.createElement(InputAdornment, {
|
|
11205
|
+
position: "end"
|
|
11206
|
+
}, /*#__PURE__*/React__default.createElement(IconButton, {
|
|
11207
|
+
"aria-label": t('System.show_password'),
|
|
11208
|
+
onClick: handleTogglePassword,
|
|
11209
|
+
edge: "end",
|
|
11210
|
+
tabIndex: -1
|
|
11211
|
+
}, showPassword ? /*#__PURE__*/React__default.createElement(VisibilityOff, null) : /*#__PURE__*/React__default.createElement(Visibility, null))))
|
|
11212
|
+
}
|
|
11213
|
+
} : undefined
|
|
11121
11214
|
}));
|
|
11122
11215
|
if (block.style === 'login') {
|
|
11123
11216
|
return /*#__PURE__*/React__default.createElement("div", {
|