@pinuts/bsr-uikit-relaunch 0.2.77 → 0.2.78
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.js +1 -1
- package/dist/items/eventWizardItems/EventPicker/Components/CheckboxField.d.ts.map +1 -1
- package/dist/items/eventWizardItems/EventPicker/Components/CheckboxField.js +2 -5
- package/node_modules/@pinuts/form-builder/dist/index.d.ts +2 -1
- package/node_modules/@pinuts/form-builder/dist/index.d.ts.map +1 -1
- package/node_modules/@pinuts/form-builder/dist/index.js +1 -1
- package/node_modules/@pinuts/form-builder/dist/index.js.LICENSE.txt +8 -0
- package/node_modules/@pinuts/form-builder/dist/shared/formRules/createFormRules.js +1 -1
- package/node_modules/@pinuts/form-builder/package.json +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxField.d.ts","sourceRoot":"","sources":["../../../../../src/items/eventWizardItems/EventPicker/Components/CheckboxField.jsx"],"names":[],"mappings":";AAOA,
|
|
1
|
+
{"version":3,"file":"CheckboxField.d.ts","sourceRoot":"","sources":["../../../../../src/items/eventWizardItems/EventPicker/Components/CheckboxField.jsx"],"names":[],"mappings":";AAOA,8DAwFC;;;;;;kBA/F6C,OAAO;2BAC1B,YAAY"}
|
|
@@ -27,8 +27,6 @@ const CheckboxField = props => {
|
|
|
27
27
|
isPreselected,
|
|
28
28
|
isDeselectable
|
|
29
29
|
} = config;
|
|
30
|
-
// eslint-disable-next-line no-console
|
|
31
|
-
console.log('CheckboxField config:', config);
|
|
32
30
|
const inputProps = {
|
|
33
31
|
id: value,
|
|
34
32
|
name: config.name,
|
|
@@ -40,13 +38,12 @@ const CheckboxField = props => {
|
|
|
40
38
|
} = useFormikContext();
|
|
41
39
|
const [field, meta] = useField(inputProps.name);
|
|
42
40
|
const checked = (meta.value || []).indexOf(value) > -1;
|
|
43
|
-
// eslint-disable-next-line no-console
|
|
44
|
-
console.log('CheckboxField checked:', checked);
|
|
45
41
|
(0, _react.useEffect)(() => {
|
|
46
42
|
if (isPreselected && !checked) {
|
|
47
43
|
setFieldValue(field.name, [...(values.components || []), value]);
|
|
48
44
|
}
|
|
49
45
|
}, [isPreselected, checked, setFieldValue, field.name, values.components, value]);
|
|
46
|
+
const isCheckboxDisabled = isPreselected ? !isDeselectable : false;
|
|
50
47
|
|
|
51
48
|
// the special onChangeHandler is used when singleSelectionCheckbox is true
|
|
52
49
|
// so that only one checkbox can be selected, like RadioButtons
|
|
@@ -80,7 +77,7 @@ const CheckboxField = props => {
|
|
|
80
77
|
checked: checked,
|
|
81
78
|
onChange: onChangeHandler,
|
|
82
79
|
"aria-describedby": descriptionId,
|
|
83
|
-
disabled:
|
|
80
|
+
disabled: isCheckboxDisabled
|
|
84
81
|
})), /*#__PURE__*/_react.default.createElement("label", {
|
|
85
82
|
className: "custom-control-label d-sm-flex align-items-center p-3 pl-4",
|
|
86
83
|
htmlFor: inputProps.id
|
|
@@ -4,6 +4,7 @@ import { usePopulatedComponentsWithValues } from './formbuilder/populateComponen
|
|
|
4
4
|
import { getComponentRegistry } from './formbuilder/ComponentRegistry';
|
|
5
5
|
import { registerComponent } from './formbuilder/ComponentRegistry';
|
|
6
6
|
import { getComponentFromRegistry } from './formbuilder/ComponentRegistry';
|
|
7
|
+
import FormPresentation from './presentation/FormPresentation';
|
|
7
8
|
import ComponentPopulator from './formbuilder/ComponentPopulator';
|
|
8
9
|
import * as hooks from './hooks';
|
|
9
10
|
import * as utils from './utils';
|
|
@@ -13,5 +14,5 @@ import { jsonLogic } from './shared/formRules/createFormRules.mjs';
|
|
|
13
14
|
import { validateValues } from './shared/formRules/createFormRules.mjs';
|
|
14
15
|
import { createFormRules } from './shared/formRules/createFormRules.mjs';
|
|
15
16
|
import { validateComponents } from './shared/formRules/createFormRules.mjs';
|
|
16
|
-
export { FormBuilder, populateComponents, usePopulatedComponentsWithValues, getComponentRegistry, registerComponent, getComponentFromRegistry, ComponentPopulator, hooks, utils, formik, formHooks, jsonLogic, validateValues, createFormRules, validateComponents };
|
|
17
|
+
export { FormBuilder, populateComponents, usePopulatedComponentsWithValues, getComponentRegistry, registerComponent, getComponentFromRegistry, FormPresentation, ComponentPopulator, hooks, utils, formik, formHooks, jsonLogic, validateValues, createFormRules, validateComponents };
|
|
17
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":"wBACwB,2BAA2B;mCACkB,kCAAkC;iDAAlC,kCAAkC;qCAOhG,iCAAiC;kCAAjC,iCAAiC;yCAAjC,iCAAiC;+
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":"wBACwB,2BAA2B;mCACkB,kCAAkC;iDAAlC,kCAAkC;qCAOhG,iCAAiC;kCAAjC,iCAAiC;yCAAjC,iCAAiC;6BALX,iCAAiC;+BAD/B,kCAAkC;uBAQ1C,SAAS;uBACT,SAAS;wBAZR,QAAQ;2BAaL,aAAa;0BACuC,wCAAwC;+BAAxC,wCAAwC;gCAAxC,wCAAwC;mCAAxC,wCAAwC"}
|