@mtes-mct/monitor-ui 24.14.1 → 24.15.1
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/CHANGELOG.md +25 -0
- package/cypress/index.js +8 -2
- package/fields/CheckPicker.d.ts.map +1 -1
- package/fields/CheckTreePicker/index.d.ts +20 -0
- package/fields/CheckTreePicker/index.d.ts.map +1 -0
- package/fields/CheckTreePicker/types.d.ts +6 -0
- package/fields/CheckTreePicker/types.d.ts.map +1 -0
- package/fields/CheckTreePicker/utils.d.ts +9 -0
- package/fields/CheckTreePicker/utils.d.ts.map +1 -0
- package/fields/CoordinatesInput/DDCoordinatesInput.d.ts +1 -1
- package/fields/CoordinatesInput/DDCoordinatesInput.d.ts.map +1 -1
- package/fields/CoordinatesInput/index.d.ts +1 -1
- package/fields/CoordinatesInput/index.d.ts.map +1 -1
- package/fields/shared/CheckPickerBox.d.ts +21 -0
- package/fields/shared/CheckPickerBox.d.ts.map +1 -0
- package/fields/shared/StyledRsuitePickerBox.d.ts.map +1 -1
- package/formiks/FormikCheckPicker.d.ts.map +1 -1
- package/formiks/FormikCheckTreePicker.d.ts +4 -0
- package/formiks/FormikCheckTreePicker.d.ts.map +1 -0
- package/formiks/FormikCheckbox.d.ts.map +1 -1
- package/formiks/FormikCoordinatesInput.d.ts +1 -3
- package/formiks/FormikCoordinatesInput.d.ts.map +1 -1
- package/formiks/FormikDatePicker.d.ts.map +1 -1
- package/formiks/FormikDateRangePicker.d.ts +1 -1
- package/formiks/FormikDateRangePicker.d.ts.map +1 -1
- package/formiks/FormikMultiCascader.d.ts.map +1 -1
- package/formiks/FormikMultiCheckbox.d.ts.map +1 -1
- package/formiks/FormikMultiRadio.d.ts.map +1 -1
- package/formiks/FormikMultiSelect.d.ts.map +1 -1
- package/formiks/FormikNumberInput.d.ts.map +1 -1
- package/formiks/FormikPhoneInput.d.ts.map +1 -1
- package/formiks/FormikRichBooleanCheckbox.d.ts.map +1 -1
- package/formiks/FormikSearch.d.ts.map +1 -1
- package/formiks/FormikSelect.d.ts.map +1 -1
- package/formiks/FormikTextInput.d.ts.map +1 -1
- package/formiks/FormikTextarea.d.ts.map +1 -1
- package/formiks/FormikToggle.d.ts.map +1 -1
- package/index.js +404 -238
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
## [24.15.0](https://github.com/MTES-MCT/monitor-ui/compare/v24.14.1...v24.15.0) (2025-03-13)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* **components:** add checkTreePicker and stories ([b273d6f](https://github.com/MTES-MCT/monitor-ui/commit/b273d6f5a1260cf1950f6b5cfee21c22f19681c1))
|
|
6
|
+
* **components:** add checkTreePicker and stories ([0345ec5](https://github.com/MTES-MCT/monitor-ui/commit/0345ec50bd84818916f6ac026f7157c04d8eeced))
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **fields:** fix DDCoordinatesInput ([771508b](https://github.com/MTES-MCT/monitor-ui/commit/771508b3cf06e78ff48719b83356033d899bc9c4))
|
|
11
|
+
|
|
12
|
+
### Buid System & Dependencies
|
|
13
|
+
|
|
14
|
+
* **deps:** bump axios from 1.7.4 to 1.8.2 in the npm_and_yarn group ([8a01b64](https://github.com/MTES-MCT/monitor-ui/commit/8a01b64fa251d7c8915d136abe77b85c2402d5ac))
|
|
15
|
+
* **dev-deps:** bump @babel/runtime ([67cf0e8](https://github.com/MTES-MCT/monitor-ui/commit/67cf0e857b39c7ffc23e2e7dd4052521f941d300))
|
|
16
|
+
* **dev-deps:** bump the all-non-major-dependencies group ([6ff42cd](https://github.com/MTES-MCT/monitor-ui/commit/6ff42cdd0023a5af625a3340d968976f96cb86a4))
|
|
17
|
+
* **dev-deps:** bump the non-major-dev-dependencies group with 22 updates ([023fa93](https://github.com/MTES-MCT/monitor-ui/commit/023fa9368c4fc12eb5ef511eb1b0c7246b438f07))
|
|
18
|
+
|
|
19
|
+
## [24.14.1](https://github.com/MTES-MCT/monitor-ui/compare/v24.14.0...v24.14.1) (2025-03-03)
|
|
20
|
+
|
|
21
|
+
### Buid System & Dependencies
|
|
22
|
+
|
|
23
|
+
* **dev-deps:** bump the all-non-major-dependencies group ([41f36e4](https://github.com/MTES-MCT/monitor-ui/commit/41f36e48ee0e195ab5eb448f24ce042aeaa4f147))
|
|
24
|
+
* **dev-deps:** bump the non-major-dev-dependencies group with 23 updates ([e251f0f](https://github.com/MTES-MCT/monitor-ui/commit/e251f0f6c3f9bdb97c838436a536b4db2756a0d9))
|
|
25
|
+
|
|
1
26
|
## [24.14.0](https://github.com/MTES-MCT/monitor-ui/compare/v24.13.0...v24.14.0) (2025-02-24)
|
|
2
27
|
|
|
3
28
|
### Features
|
package/cypress/index.js
CHANGED
|
@@ -492,7 +492,7 @@ function fillTextInput(fieldElement, value, _label, force, delay) {
|
|
|
492
492
|
}).wait(250);
|
|
493
493
|
}
|
|
494
494
|
|
|
495
|
-
function pickCheckPickerOptions(fieldElement, values, label, force, delay) {
|
|
495
|
+
function pickCheckPickerOptions(fieldElement, values, label, force, delay, role = 'option') {
|
|
496
496
|
Cypress.log({
|
|
497
497
|
consoleProps: ()=>({
|
|
498
498
|
'Applied to': fieldElement,
|
|
@@ -534,7 +534,7 @@ function pickCheckPickerOptions(fieldElement, values, label, force, delay) {
|
|
|
534
534
|
force
|
|
535
535
|
}).wait(250);
|
|
536
536
|
}
|
|
537
|
-
cy.wrap(rsuitePickerPopupElement).find(
|
|
537
|
+
cy.wrap(rsuitePickerPopupElement).find(`[role="${role}"]`).contains(value).first().scrollIntoView().click({
|
|
538
538
|
force
|
|
539
539
|
});
|
|
540
540
|
});
|
|
@@ -848,6 +848,12 @@ function fill(label, value, options = {}) {
|
|
|
848
848
|
pickCheckPickerOptions(fieldElement, value, label, controlledOptions.force, controlledOptions.delay);
|
|
849
849
|
return;
|
|
850
850
|
// ---------------------------------------------------------------------
|
|
851
|
+
// CheckTreePicker
|
|
852
|
+
case fieldElement.classList.contains('Field-CheckTreePicker'):
|
|
853
|
+
assertStringArrayOrUndefined(value, 'CheckTreePicker');
|
|
854
|
+
pickCheckPickerOptions(fieldElement, value, label, controlledOptions.force, controlledOptions.delay, 'treeitem');
|
|
855
|
+
return;
|
|
856
|
+
// ---------------------------------------------------------------------
|
|
851
857
|
// MultiCascader
|
|
852
858
|
case fieldElement.classList.contains('Field-MultiCascader'):
|
|
853
859
|
assertStringArrayOrUndefined(value, 'MultiCascader');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckPicker.d.ts","sourceRoot":"","sources":["../../src/fields/CheckPicker.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAoC,KAAK,gBAAgB,IAAI,sBAAsB,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"CheckPicker.d.ts","sourceRoot":"","sources":["../../src/fields/CheckPicker.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAoC,KAAK,gBAAgB,IAAI,sBAAsB,EAAE,MAAM,QAAQ,CAAA;AAI1G,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAM3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAErD,MAAM,MAAM,gBAAgB,CAAC,WAAW,SAAS,eAAe,GAAG,MAAM,IAAI,IAAI,CAC/E,sBAAsB,CAAC,MAAM,CAAC,EAC9B,IAAI,GAAG,WAAW,GAAG,MAAM,GAAG,cAAc,GAAG,IAAI,GAAG,UAAU,GAAG,gBAAgB,GAAG,OAAO,GAAG,UAAU,CAC3G,GACC,UAAU,CAAC,WAAW,CAAC,CAAA;AAEzB,wBAAgB,WAAW,CAAC,WAAW,SAAS,eAAe,GAAG,MAAM,EAAE,EACxE,SAAS,EACT,YAAY,EACZ,0BAA8B,EAC9B,QAAgB,EAChB,KAAK,EACL,oBAA4B,EAC5B,aAAqB,EACrB,OAAe,EACf,UAAkB,EAClB,aAAqB,EACrB,uBAA+B,EAC/B,KAAK,EACL,QAAQ,EACR,OAAO,EACP,cAAc,EACd,UAAU,EACV,QAAgB,EAChB,UAAkB,EAClB,KAAK,EACL,KAAK,EACL,GAAG,aAAa,EACjB,EAAE,gBAAgB,CAAC,WAAW,CAAC,2CAyG/B"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type CheckTreePickerProps as RsuiteCheckTreePickerProps } from 'rsuite';
|
|
2
|
+
import type { TreeOption } from './types';
|
|
3
|
+
import type { Promisable } from 'type-fest';
|
|
4
|
+
export type CheckTreePickerProps = Omit<RsuiteCheckTreePickerProps, 'as' | 'container' | 'data' | 'defaultValue' | 'id' | 'onChange' | 'renderMenuItem' | 'value'> & {
|
|
5
|
+
error?: string | undefined;
|
|
6
|
+
isErrorMessageHidden?: boolean | undefined;
|
|
7
|
+
isLabelHidden?: boolean | undefined;
|
|
8
|
+
isLight?: boolean | undefined;
|
|
9
|
+
isRequired?: boolean | undefined;
|
|
10
|
+
isTransparent?: boolean | undefined;
|
|
11
|
+
isUndefinedWhenDisabled?: boolean | undefined;
|
|
12
|
+
label: string;
|
|
13
|
+
name: string;
|
|
14
|
+
onChange?: (nextValue: TreeOption[] | undefined) => Promisable<void>;
|
|
15
|
+
options: TreeOption[];
|
|
16
|
+
popupWidth?: number | undefined;
|
|
17
|
+
value?: TreeOption[] | undefined;
|
|
18
|
+
};
|
|
19
|
+
export declare function CheckTreePicker({ className, disabled, error, isErrorMessageHidden, isLabelHidden, isLight, isRequired, isTransparent, isUndefinedWhenDisabled, label, onChange, options, popupWidth, readOnly, style, value, ...originalProps }: CheckTreePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/CheckTreePicker/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,oBAAoB,IAAI,0BAA0B,EACxD,MAAM,QAAQ,CAAA;AAOf,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAE3C,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACrC,0BAA0B,EAC1B,IAAI,GAAG,WAAW,GAAG,MAAM,GAAG,cAAc,GAAG,IAAI,GAAG,UAAU,GAAG,gBAAgB,GAAG,OAAO,CAC9F,GAAG;IACF,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,oBAAoB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC1C,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACnC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAChC,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACnC,uBAAuB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7C,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,GAAG,SAAS,KAAK,UAAU,CAAC,IAAI,CAAC,CAAA;IACpE,OAAO,EAAE,UAAU,EAAE,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,KAAK,CAAC,EAAE,UAAU,EAAE,GAAG,SAAS,CAAA;CACjC,CAAA;AAED,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,QAAgB,EAChB,KAAK,EACL,oBAA4B,EAC5B,aAAqB,EACrB,OAAe,EACf,UAAkB,EAClB,aAAqB,EACrB,uBAA+B,EAC/B,KAAK,EACL,QAAQ,EACR,OAAO,EACP,UAAU,EACV,QAAgB,EAChB,KAAK,EACL,KAAK,EACL,GAAG,aAAa,EACjB,EAAE,oBAAoB,2CAqFtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/fields/CheckTreePicker/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAA;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CACvB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TreeOption } from './types';
|
|
2
|
+
import type { ValueType } from 'rsuite/esm/CheckTreePicker';
|
|
3
|
+
export declare function fromRsuiteValue(selectedValues: ValueType, allOptions: TreeOption[], previousSelectedValues?: ValueType): TreeOption[] | undefined;
|
|
4
|
+
export declare const findItemByValue: (options: TreeOption[], value: string | number) => {
|
|
5
|
+
item: TreeOption;
|
|
6
|
+
parent: TreeOption | undefined;
|
|
7
|
+
} | undefined;
|
|
8
|
+
export declare function toRsuiteValue(uiValues: TreeOption[] | undefined): ValueType | undefined;
|
|
9
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/fields/CheckTreePicker/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAE3D,wBAAgB,eAAe,CAC7B,cAAc,EAAE,SAAS,EACzB,UAAU,EAAE,UAAU,EAAE,EACxB,sBAAsB,CAAC,EAAE,SAAS,GACjC,UAAU,EAAE,GAAG,SAAS,CAqB1B;AACD,eAAO,MAAM,eAAe,GAC1B,SAAS,UAAU,EAAE,EACrB,OAAO,MAAM,GAAG,MAAM,KACrB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,UAAU,GAAG,SAAS,CAAA;CAAE,GAAG,SAoBzD,CAAA;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,UAAU,EAAE,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CASvF"}
|
|
@@ -3,7 +3,7 @@ type DDCoordinatesInputProps = {
|
|
|
3
3
|
coordinates: Coordinates | undefined;
|
|
4
4
|
disabled: boolean;
|
|
5
5
|
name: string;
|
|
6
|
-
onChange: (nextCoordinates: Coordinates
|
|
6
|
+
onChange: (nextCoordinates: Coordinates | undefined) => void;
|
|
7
7
|
readOnly: boolean;
|
|
8
8
|
};
|
|
9
9
|
export declare function DDCoordinatesInput({ coordinates, disabled, name, onChange, readOnly }: DDCoordinatesInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DDCoordinatesInput.d.ts","sourceRoot":"","sources":["../../../src/fields/CoordinatesInput/DDCoordinatesInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DDCoordinatesInput.d.ts","sourceRoot":"","sources":["../../../src/fields/CoordinatesInput/DDCoordinatesInput.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAI1D,KAAK,uBAAuB,GAAG;IAC7B,WAAW,EAAE,WAAW,GAAG,SAAS,CAAA;IACpC,QAAQ,EAAE,OAAO,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,CAAC,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK,IAAI,CAAA;IAC5D,QAAQ,EAAE,OAAO,CAAA;CAClB,CAAA;AAcD,wBAAgB,kBAAkB,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,uBAAuB,2CA2F9G"}
|
|
@@ -7,7 +7,7 @@ export type CoordinatesInputProps = {
|
|
|
7
7
|
coordinatesFormat: CoordinatesFormat;
|
|
8
8
|
defaultValue?: Coordinates | undefined;
|
|
9
9
|
disabled?: boolean | undefined;
|
|
10
|
-
error?: string | undefined;
|
|
10
|
+
error?: string | string[] | undefined;
|
|
11
11
|
isErrorMessageHidden?: boolean | undefined;
|
|
12
12
|
isLabelHidden?: boolean | undefined;
|
|
13
13
|
isLight?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/CoordinatesInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAS9C,OAAO,EAAkC,KAAK,aAAa,EAAE,MAAM,OAAO,CAAA;AAO1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAE3C,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,YAAY,CAAC,EAAE,WAAW,GAAG,SAAS,CAAA;IACtC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/CoordinatesInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAS9C,OAAO,EAAkC,KAAK,aAAa,EAAE,MAAM,OAAO,CAAA;AAO1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAE3C,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,YAAY,CAAC,EAAE,WAAW,GAAG,SAAS,CAAA;IACtC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAA;IACrC,oBAAoB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC1C,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACnC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAChC,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACnC,uBAAuB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7C,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,CAAC,eAAe,EAAE,WAAW,GAAG,SAAS,EAAE,WAAW,EAAE,WAAW,GAAG,SAAS,KAAK,UAAU,CAAC,IAAI,CAAC,CAAA;IAC/G,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC9B,KAAK,CAAC,EAAE,aAAa,GAAG,SAAS,CAAA;CAClC,CAAA;AACD,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,iBAAiB,EACjB,YAAY,EACZ,QAAgB,EAChB,KAAK,EACL,oBAA4B,EAC5B,aAAqB,EACrB,OAAe,EACf,UAAkB,EAClB,aAAqB,EACrB,uBAA+B,EAC/B,KAAK,EACL,IAAI,EACJ,QAAe,EACf,QAAgB,EAChB,KAAK,EACN,EAAE,qBAAqB,2CA0FvB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface CheckPickerBoxProps {
|
|
2
|
+
boxRef: React.RefObject<HTMLDivElement> | undefined;
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
className: string | undefined;
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
error: string | undefined;
|
|
7
|
+
hasError: boolean;
|
|
8
|
+
isErrorMessageHidden: boolean;
|
|
9
|
+
isLabelHidden?: boolean;
|
|
10
|
+
isLight: boolean;
|
|
11
|
+
isRequired?: boolean;
|
|
12
|
+
isTransparent: boolean;
|
|
13
|
+
label: string;
|
|
14
|
+
name: string;
|
|
15
|
+
popupWidth: number | undefined;
|
|
16
|
+
readOnly: boolean;
|
|
17
|
+
style: React.CSSProperties | undefined;
|
|
18
|
+
}
|
|
19
|
+
export declare function CheckPickerBox({ boxRef, children, className, disabled, error, hasError, isErrorMessageHidden, isLabelHidden, isLight, isRequired, isTransparent, label, name, popupWidth, readOnly, style }: CheckPickerBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=CheckPickerBox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckPickerBox.d.ts","sourceRoot":"","sources":["../../../src/fields/shared/CheckPickerBox.tsx"],"names":[],"mappings":"AAMA,UAAU,mBAAmB;IAC3B,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,GAAG,SAAS,CAAA;IACnD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,QAAQ,EAAE,OAAO,CAAA;IACjB,oBAAoB,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,aAAa,EAAE,OAAO,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,KAAK,CAAC,aAAa,GAAG,SAAS,CAAA;CACvC;AAED,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,oBAAoB,EACpB,aAAa,EACb,OAAO,EACP,UAAU,EACV,aAAa,EACb,KAAK,EACL,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,KAAK,EACN,EAAE,mBAAmB,2CAqBrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StyledRsuitePickerBox.d.ts","sourceRoot":"","sources":["../../../src/fields/shared/StyledRsuitePickerBox.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAA;AAE1D,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"StyledRsuitePickerBox.d.ts","sourceRoot":"","sources":["../../../src/fields/shared/StyledRsuitePickerBox.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAA;AAE1D,eAAO,MAAM,qBAAqB,gQA2djC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormikCheckPicker.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikCheckPicker.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormikCheckPicker.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikCheckPicker.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,MAAM,MAAM,sBAAsB,CAAC,WAAW,SAAS,eAAe,GAAG,MAAM,IAAI,IAAI,CACrF,gBAAgB,CAAC,WAAW,CAAC,EAC7B,OAAO,GAAG,UAAU,GAAG,OAAO,CAC/B,CAAA;AACD,wBAAgB,iBAAiB,CAAC,WAAW,SAAS,eAAe,GAAG,MAAM,EAAE,EAC9E,IAAI,EACJ,GAAG,aAAa,EACjB,EAAE,sBAAsB,CAAC,WAAW,CAAC,2CAQrC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type CheckTreePickerProps } from '@fields/CheckTreePicker';
|
|
2
|
+
export type FormikCheckTreePickerProps = Omit<CheckTreePickerProps, 'error' | 'onChange' | 'value'>;
|
|
3
|
+
export declare function FormikCheckTreePicker({ name, ...originalProps }: FormikCheckTreePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=FormikCheckTreePicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormikCheckTreePicker.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikCheckTreePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAKpF,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC,CAAA;AACnG,wBAAgB,qBAAqB,CAAC,EAAE,IAAI,EAAE,GAAG,aAAa,EAAE,EAAE,0BAA0B,2CAU3F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormikCheckbox.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikCheckbox.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAEvD,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,aAAa,EAAE,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC,CAAA;AACvF,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,GAAG,aAAa,EAAE,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"FormikCheckbox.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikCheckbox.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAEvD,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,aAAa,EAAE,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC,CAAA;AACvF,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,GAAG,aAAa,EAAE,EAAE,mBAAmB,2CAsB7E"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { CoordinatesInputProps } from '../fields/CoordinatesInput';
|
|
2
|
-
export type FormikCoordinatesInputProps = Omit<CoordinatesInputProps, '
|
|
3
|
-
name: string;
|
|
4
|
-
};
|
|
2
|
+
export type FormikCoordinatesInputProps = Omit<CoordinatesInputProps, 'error' | 'onChange'>;
|
|
5
3
|
export declare function FormikCoordinatesInput({ name, ...originalProps }: FormikCoordinatesInputProps): import("react/jsx-runtime").JSX.Element;
|
|
6
4
|
//# sourceMappingURL=FormikCoordinatesInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormikCoordinatesInput.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikCoordinatesInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormikCoordinatesInput.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikCoordinatesInput.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAGvE,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAAC,qBAAqB,EAAE,OAAO,GAAG,UAAU,CAAC,CAAA;AAE3F,wBAAgB,sBAAsB,CAAC,EAAE,IAAI,EAAE,GAAG,aAAa,EAAE,EAAE,2BAA2B,2CAgB7F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormikDatePicker.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikDatePicker.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormikDatePicker.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikDatePicker.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAmB,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAA;AAKvH,MAAM,MAAM,iCAAiC,GAAG,IAAI,CAAC,2BAA2B,EAAE,cAAc,GAAG,OAAO,GAAG,UAAU,CAAC,CAAA;AACxH,MAAM,MAAM,mCAAmC,GAAG,IAAI,CACpD,6BAA6B,EAC7B,cAAc,GAAG,OAAO,GAAG,UAAU,CACtC,CAAA;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,iCAAiC,GAAG,GAAG,CAAC,OAAO,CAAA;AACvF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,mCAAmC,GAAG,GAAG,CAAC,OAAO,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type DateRangePickerWithDateDateProps, type DateRangePickerWithStringDateProps } from '../fields/DateRangePicker';
|
|
2
2
|
export interface FormikDateRangePickerWithDateDateProps extends Omit<DateRangePickerWithDateDateProps, 'defaultValue' | 'error' | 'onChange'> {
|
|
3
3
|
name: string;
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormikDateRangePicker.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikDateRangePicker.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormikDateRangePicker.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikDateRangePicker.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,gCAAgC,EACrC,KAAK,kCAAkC,EACxC,MAAM,2BAA2B,CAAA;AASlC,MAAM,WAAW,sCACf,SAAQ,IAAI,CAAC,gCAAgC,EAAE,cAAc,GAAG,OAAO,GAAG,UAAU,CAAC;IACrF,IAAI,EAAE,MAAM,CAAA;CACb;AACD,MAAM,WAAW,wCACf,SAAQ,IAAI,CAAC,kCAAkC,EAAE,cAAc,GAAG,OAAO,GAAG,UAAU,CAAC;IACvF,IAAI,EAAE,MAAM,CAAA;CACb;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,sCAAsC,GAAG,GAAG,CAAC,OAAO,CAAA;AACjG,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,wCAAwC,GAAG,GAAG,CAAC,OAAO,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormikMultiCascader.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikMultiCascader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormikMultiCascader.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikMultiCascader.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,MAAM,MAAM,wBAAwB,CAAC,WAAW,SAAS,eAAe,GAAG,MAAM,IAAI,IAAI,CACvF,kBAAkB,CAAC,WAAW,CAAC,EAC/B,OAAO,GAAG,UAAU,GAAG,OAAO,CAC/B,CAAA;AACD,wBAAgB,mBAAmB,CAAC,WAAW,SAAS,eAAe,GAAG,MAAM,EAAE,EAChF,IAAI,EACJ,GAAG,aAAa,EACjB,EAAE,wBAAwB,CAAC,WAAW,CAAC,2CAQvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormikMultiCheckbox.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikMultiCheckbox.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormikMultiCheckbox.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikMultiCheckbox.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,MAAM,MAAM,wBAAwB,CAAC,WAAW,SAAS,eAAe,GAAG,MAAM,IAAI,IAAI,CACvF,kBAAkB,CAAC,WAAW,CAAC,EAC/B,OAAO,GAAG,UAAU,GAAG,OAAO,CAC/B,CAAA;AACD,wBAAgB,mBAAmB,CAAC,WAAW,SAAS,eAAe,GAAG,MAAM,EAAE,EAChF,IAAI,EACJ,GAAG,aAAa,EACjB,EAAE,wBAAwB,CAAC,WAAW,CAAC,2CAQvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormikMultiRadio.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikMultiRadio.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormikMultiRadio.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikMultiRadio.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,MAAM,MAAM,qBAAqB,CAAC,WAAW,SAAS,eAAe,GAAG,MAAM,IAAI,IAAI,CACpF,eAAe,CAAC,WAAW,CAAC,EAC5B,OAAO,GAAG,UAAU,GAAG,OAAO,CAC/B,CAAA;AACD,wBAAgB,gBAAgB,CAAC,WAAW,SAAS,eAAe,GAAG,MAAM,EAAE,EAC7E,IAAI,EACJ,GAAG,aAAa,EACjB,EAAE,qBAAqB,CAAC,WAAW,CAAC,2CAQpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormikMultiSelect.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikMultiSelect.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormikMultiSelect.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikMultiSelect.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,MAAM,MAAM,sBAAsB,CAAC,WAAW,SAAS,eAAe,GAAG,MAAM,IAAI,IAAI,CACrF,gBAAgB,CAAC,WAAW,CAAC,EAC7B,OAAO,GAAG,UAAU,GAAG,OAAO,CAC/B,CAAA;AACD,wBAAgB,iBAAiB,CAAC,WAAW,SAAS,eAAe,GAAG,MAAM,EAAE,EAC9E,IAAI,EACJ,GAAG,aAAa,EACjB,EAAE,sBAAsB,CAAC,WAAW,CAAC,2CAQrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormikNumberInput.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikNumberInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormikNumberInput.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikNumberInput.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE7D,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC,CAAA;AAC3F,wBAAgB,iBAAiB,CAAC,EAAE,IAAI,EAAE,GAAG,aAAa,EAAE,EAAE,sBAAsB,2CAQnF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormikPhoneInput.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikPhoneInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"FormikPhoneInput.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikPhoneInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAGrE,MAAM,MAAM,qBAAqB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,eAAe,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC,CAAA;AAC5G,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,GAAG,aAAa,EAAE,EAAE,qBAAqB,2CAQjF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormikRichBooleanCheckbox.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikRichBooleanCheckbox.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormikRichBooleanCheckbox.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikRichBooleanCheckbox.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAE3E,MAAM,MAAM,8BAA8B,GAAG,IAAI,CAC/C,wBAAwB,EACxB,cAAc,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,CAChD,CAAA;AACD,wBAAgB,yBAAyB,CAAC,EAAE,IAAI,EAAE,GAAG,aAAa,EAAE,EAAE,8BAA8B,2CAgBnG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormikSearch.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikSearch.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormikSearch.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikSearch.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,MAAM,MAAM,iBAAiB,CAAC,WAAW,SAAS,eAAe,GAAG,MAAM,IAAI,IAAI,CAChF,WAAW,CAAC,WAAW,CAAC,EACxB,cAAc,GAAG,OAAO,GAAG,UAAU,CACtC,CAAA;AACD,wBAAgB,YAAY,CAAC,WAAW,SAAS,eAAe,GAAG,MAAM,EAAE,EACzE,IAAI,EACJ,GAAG,aAAa,EACjB,EAAE,iBAAiB,CAAC,WAAW,CAAC,2CAQhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormikSelect.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikSelect.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormikSelect.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikSelect.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,MAAM,MAAM,iBAAiB,CAAC,WAAW,SAAS,eAAe,GAAG,MAAM,IAAI,IAAI,CAChF,WAAW,CAAC,WAAW,CAAC,EACxB,OAAO,GAAG,UAAU,GAAG,OAAO,CAC/B,CAAA;AACD,wBAAgB,YAAY,CAAC,WAAW,SAAS,eAAe,GAAG,MAAM,EAAE,EACzE,IAAI,EACJ,GAAG,aAAa,EACjB,EAAE,iBAAiB,CAAC,WAAW,CAAC,2CAQhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormikTextInput.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikTextInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormikTextInput.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikTextInput.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAEzD,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC,CAAA;AACvF,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,GAAG,aAAa,EAAE,EAAE,oBAAoB,2CAQ/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormikTextarea.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikTextarea.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormikTextarea.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikTextarea.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAEvD,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC,CAAA;AACrF,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,GAAG,aAAa,EAAE,EAAE,mBAAmB,2CAQ7E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormikToggle.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikToggle.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC,CAAA;AACnF,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,GAAG,aAAa,EAAE,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"FormikToggle.d.ts","sourceRoot":"","sources":["../../src/formiks/FormikToggle.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC,CAAA;AACnF,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,GAAG,aAAa,EAAE,EAAE,iBAAiB,2CAsBzE"}
|
package/index.js
CHANGED
|
@@ -55346,6 +55346,68 @@ const StyledRsuiteCheckbox = styled(Checkbox$1)`
|
|
|
55346
55346
|
}, []);
|
|
55347
55347
|
}
|
|
55348
55348
|
|
|
55349
|
+
/**
|
|
55350
|
+
* Force component re-rendering
|
|
55351
|
+
*
|
|
55352
|
+
* @see https://reactjs.org/docs/hooks-faq.html#is-there-something-like-forceupdate
|
|
55353
|
+
*/ function useForceUpdate() {
|
|
55354
|
+
const [, forceUpdate] = useReducer((x)=>x + 1, 0);
|
|
55355
|
+
const forceDebouncedUpdate = useMemo(()=>lodashExports.throttle(forceUpdate, 500), [
|
|
55356
|
+
forceUpdate
|
|
55357
|
+
]);
|
|
55358
|
+
return {
|
|
55359
|
+
forceDebouncedUpdate,
|
|
55360
|
+
forceUpdate
|
|
55361
|
+
};
|
|
55362
|
+
}
|
|
55363
|
+
|
|
55364
|
+
/**
|
|
55365
|
+
* @internal
|
|
55366
|
+
*/ function getRsuiteDataItemValueFromOptionValue(optionValue, optionValueKey) {
|
|
55367
|
+
if (optionValueKey) {
|
|
55368
|
+
if (typeof optionValue[optionValueKey] !== 'number' && typeof optionValue[optionValueKey] !== 'string') {
|
|
55369
|
+
throw new Error([
|
|
55370
|
+
`You must provide a valid option value key when using objects as option values.`,
|
|
55371
|
+
`The property value must exist and be a unique number or a string.`,
|
|
55372
|
+
`OptionValue: \`${JSON.stringify(optionValue)}\`.`,
|
|
55373
|
+
`OptionValueKey: \`${String(optionValueKey)}\`.`
|
|
55374
|
+
].join(' '));
|
|
55375
|
+
}
|
|
55376
|
+
return String(optionValue[optionValueKey]);
|
|
55377
|
+
}
|
|
55378
|
+
if (typeof optionValue !== 'boolean' && typeof optionValue !== 'number' && typeof optionValue !== 'string') {
|
|
55379
|
+
throw new Error([
|
|
55380
|
+
`You must provide an option value key when using objects as option values.`,
|
|
55381
|
+
`OptionValue: \`${JSON.stringify(optionValue)}\`.`
|
|
55382
|
+
].join(' '));
|
|
55383
|
+
}
|
|
55384
|
+
return String(optionValue);
|
|
55385
|
+
}
|
|
55386
|
+
|
|
55387
|
+
/**
|
|
55388
|
+
* @internal
|
|
55389
|
+
*/ function getRsuiteDataItemsFromOptions(options, optionValueKey) {
|
|
55390
|
+
return options.map((option)=>{
|
|
55391
|
+
const { value: optionValue, ...rest } = option;
|
|
55392
|
+
const rsuiteItemDataValue = getRsuiteDataItemValueFromOptionValue(optionValue, optionValueKey);
|
|
55393
|
+
return {
|
|
55394
|
+
...rest,
|
|
55395
|
+
optionValue,
|
|
55396
|
+
value: rsuiteItemDataValue
|
|
55397
|
+
};
|
|
55398
|
+
});
|
|
55399
|
+
}
|
|
55400
|
+
|
|
55401
|
+
/**
|
|
55402
|
+
* @see {@link getRsuiteDataItemValueFromOptionValue}
|
|
55403
|
+
* @internal
|
|
55404
|
+
*/ function getRsuiteDataItemValuesFromOptionValues(optionValues, optionValueKey) {
|
|
55405
|
+
if (!optionValues || optionValues.length === 0) {
|
|
55406
|
+
return [];
|
|
55407
|
+
}
|
|
55408
|
+
return optionValues.map((optionValue)=>getRsuiteDataItemValueFromOptionValue(optionValue, optionValueKey));
|
|
55409
|
+
}
|
|
55410
|
+
|
|
55349
55411
|
const StyledRsuitePickerBox = styled.div`
|
|
55350
55412
|
font-size: 13px !important;
|
|
55351
55413
|
position: relative;
|
|
@@ -55661,69 +55723,192 @@ const StyledRsuitePickerBox = styled.div`
|
|
|
55661
55723
|
}
|
|
55662
55724
|
}
|
|
55663
55725
|
}
|
|
55664
|
-
|
|
55665
|
-
|
|
55726
|
+
/** CheckTreePicker **/
|
|
55727
|
+
> .rs-check-tree {
|
|
55728
|
+
padding: 0;
|
|
55729
|
+
margin: 0;
|
|
55666
55730
|
|
|
55667
|
-
|
|
55668
|
-
|
|
55669
|
-
|
|
55670
|
-
|
|
55671
|
-
*/ function useForceUpdate() {
|
|
55672
|
-
const [, forceUpdate] = useReducer((x)=>x + 1, 0);
|
|
55673
|
-
const forceDebouncedUpdate = useMemo(()=>lodashExports.throttle(forceUpdate, 500), [
|
|
55674
|
-
forceUpdate
|
|
55675
|
-
]);
|
|
55676
|
-
return {
|
|
55677
|
-
forceDebouncedUpdate,
|
|
55678
|
-
forceUpdate
|
|
55679
|
-
};
|
|
55680
|
-
}
|
|
55731
|
+
.rs-check-tree-node-custom-icon {
|
|
55732
|
+
margin-top: -3px;
|
|
55733
|
+
margin-left: -6px;
|
|
55734
|
+
}
|
|
55681
55735
|
|
|
55682
|
-
|
|
55683
|
-
|
|
55684
|
-
|
|
55685
|
-
|
|
55686
|
-
|
|
55687
|
-
|
|
55688
|
-
|
|
55689
|
-
|
|
55690
|
-
|
|
55691
|
-
|
|
55692
|
-
|
|
55736
|
+
[role='treeitem'] {
|
|
55737
|
+
display: flex;
|
|
55738
|
+
align-items: center;
|
|
55739
|
+
.rs-check-item {
|
|
55740
|
+
width: 100%;
|
|
55741
|
+
color: ${(p)=>p.theme.color.gunMetal};
|
|
55742
|
+
line-height: 1;
|
|
55743
|
+
overflow: hidden;
|
|
55744
|
+
text-overflow: ellipsis;
|
|
55745
|
+
white-space: nowrap;
|
|
55746
|
+
.rs-check-item-focus {
|
|
55747
|
+
background-color: none;
|
|
55748
|
+
}
|
|
55749
|
+
|
|
55750
|
+
&:hover {
|
|
55751
|
+
background-color: ${(p)=>p.theme.color.blueYonder25} !important;
|
|
55752
|
+
color: ${(p)=>p.theme.color.blueYonder} !important;
|
|
55753
|
+
}
|
|
55754
|
+
|
|
55755
|
+
&.rs-picker-select-menu-item-active {
|
|
55756
|
+
background-color: transparent;
|
|
55757
|
+
font-weight: 500;
|
|
55758
|
+
|
|
55759
|
+
&:hover {
|
|
55760
|
+
background-color: ${(p)=>p.theme.color.blueYonder25};
|
|
55761
|
+
}
|
|
55762
|
+
}
|
|
55763
|
+
|
|
55764
|
+
&.rs-picker-select-menu-item-disabled {
|
|
55765
|
+
background-color: transparent;
|
|
55766
|
+
color: ${(p)=>p.theme.color.lightGray};
|
|
55767
|
+
}
|
|
55693
55768
|
}
|
|
55694
|
-
return String(optionValue[optionValueKey]);
|
|
55695
|
-
}
|
|
55696
|
-
if (typeof optionValue !== 'boolean' && typeof optionValue !== 'number' && typeof optionValue !== 'string') {
|
|
55697
|
-
throw new Error([
|
|
55698
|
-
`You must provide an option value key when using objects as option values.`,
|
|
55699
|
-
`OptionValue: \`${JSON.stringify(optionValue)}\`.`
|
|
55700
|
-
].join(' '));
|
|
55701
|
-
}
|
|
55702
|
-
return String(optionValue);
|
|
55703
|
-
}
|
|
55704
55769
|
|
|
55705
|
-
|
|
55706
|
-
|
|
55707
|
-
|
|
55708
|
-
return options.map((option)=>{
|
|
55709
|
-
const { value: optionValue, ...rest } = option;
|
|
55710
|
-
const rsuiteItemDataValue = getRsuiteDataItemValueFromOptionValue(optionValue, optionValueKey);
|
|
55711
|
-
return {
|
|
55712
|
-
...rest,
|
|
55713
|
-
optionValue,
|
|
55714
|
-
value: rsuiteItemDataValue
|
|
55715
|
-
};
|
|
55716
|
-
});
|
|
55717
|
-
}
|
|
55770
|
+
> .rs-check-item {
|
|
55771
|
+
> .rs-checkbox-checker {
|
|
55772
|
+
min-height: auto;
|
|
55718
55773
|
|
|
55719
|
-
|
|
55720
|
-
|
|
55721
|
-
|
|
55722
|
-
|
|
55723
|
-
|
|
55724
|
-
|
|
55774
|
+
> label {
|
|
55775
|
+
color: ${(p)=>p.theme.color.gunMetal};
|
|
55776
|
+
font-size: 13px !important;
|
|
55777
|
+
line-height: 1;
|
|
55778
|
+
overflow: hidden;
|
|
55779
|
+
text-overflow: ellipsis;
|
|
55780
|
+
white-space: nowrap;
|
|
55781
|
+
padding: 1px 0;
|
|
55782
|
+
|
|
55783
|
+
> .rs-check-tree-node-label-content {
|
|
55784
|
+
margin-left: 38px;
|
|
55785
|
+
background-color: initial;
|
|
55786
|
+
color: initial;
|
|
55787
|
+
}
|
|
55788
|
+
|
|
55789
|
+
> .rs-checkbox-wrapper {
|
|
55790
|
+
height: auto;
|
|
55791
|
+
left: 8px;
|
|
55792
|
+
top: 7px !important;
|
|
55793
|
+
margin-left: 14px;
|
|
55794
|
+
|
|
55795
|
+
> .rs-checkbox-inner {
|
|
55796
|
+
&:before {
|
|
55797
|
+
background-color: ${(p)=>p.theme.color.gainsboro};
|
|
55798
|
+
border: solid 2px ${(p)=>p.theme.color.lightGray};
|
|
55799
|
+
border-radius: 0;
|
|
55800
|
+
margin-right: 8px;
|
|
55801
|
+
}
|
|
55802
|
+
}
|
|
55803
|
+
}
|
|
55804
|
+
}
|
|
55805
|
+
}
|
|
55806
|
+
|
|
55807
|
+
&:hover {
|
|
55808
|
+
background-color: ${(p)=>p.theme.color.blueYonder25};
|
|
55809
|
+
|
|
55810
|
+
> .rs-checkbox-checker {
|
|
55811
|
+
> label {
|
|
55812
|
+
color: ${(p)=>p.theme.color.blueYonder};
|
|
55813
|
+
|
|
55814
|
+
> .rs-checkbox-wrapper {
|
|
55815
|
+
> .rs-checkbox-inner {
|
|
55816
|
+
&:before {
|
|
55817
|
+
background-color: ${(p)=>p.theme.color.blueYonder25};
|
|
55818
|
+
border: solid 2px ${(p)=>p.theme.color.blueYonder};
|
|
55819
|
+
}
|
|
55820
|
+
}
|
|
55821
|
+
}
|
|
55822
|
+
}
|
|
55823
|
+
}
|
|
55824
|
+
}
|
|
55825
|
+
|
|
55826
|
+
&.rs-check-item-focus {
|
|
55827
|
+
background-color: ${(p)=>p.theme.color.blueYonder25} !important;
|
|
55828
|
+
|
|
55829
|
+
> .rs-checkbox-checker {
|
|
55830
|
+
> label {
|
|
55831
|
+
font-weight: 400;
|
|
55832
|
+
}
|
|
55833
|
+
}
|
|
55834
|
+
}
|
|
55835
|
+
|
|
55836
|
+
&.rs-checkbox-checked {
|
|
55837
|
+
background-color: transparent;
|
|
55838
|
+
|
|
55839
|
+
&.rs-check-item-focus {
|
|
55840
|
+
background-color: ${(p)=>p.theme.color.blueYonder25} !important;
|
|
55841
|
+
}
|
|
55842
|
+
|
|
55843
|
+
> .rs-checkbox-checker {
|
|
55844
|
+
> label {
|
|
55845
|
+
color: ${(p)=>p.theme.color.gunMetal};
|
|
55846
|
+
font-weight: 500;
|
|
55847
|
+
|
|
55848
|
+
> .rs-checkbox-wrapper {
|
|
55849
|
+
> .rs-checkbox-inner {
|
|
55850
|
+
&:before {
|
|
55851
|
+
background-color: ${(p)=>p.theme.color.charcoal};
|
|
55852
|
+
border: solid 2px ${(p)=>p.theme.color.charcoal};
|
|
55853
|
+
}
|
|
55854
|
+
}
|
|
55855
|
+
}
|
|
55856
|
+
}
|
|
55857
|
+
}
|
|
55858
|
+
|
|
55859
|
+
&:hover,
|
|
55860
|
+
&._hover {
|
|
55861
|
+
background-color: ${(p)=>p.theme.color.blueYonder25};
|
|
55862
|
+
|
|
55863
|
+
> .rs-checkbox-checker {
|
|
55864
|
+
> label {
|
|
55865
|
+
color: ${(p)=>p.theme.color.blueYonder};
|
|
55866
|
+
|
|
55867
|
+
> .rs-checkbox-wrapper {
|
|
55868
|
+
> .rs-checkbox-inner {
|
|
55869
|
+
&:before {
|
|
55870
|
+
background-color: ${(p)=>p.theme.color.blueYonder};
|
|
55871
|
+
border: solid 2px ${(p)=>p.theme.color.blueYonder};
|
|
55872
|
+
}
|
|
55873
|
+
}
|
|
55874
|
+
}
|
|
55875
|
+
}
|
|
55876
|
+
}
|
|
55877
|
+
}
|
|
55878
|
+
}
|
|
55879
|
+
}
|
|
55880
|
+
}
|
|
55725
55881
|
}
|
|
55726
|
-
|
|
55882
|
+
}
|
|
55883
|
+
`;
|
|
55884
|
+
|
|
55885
|
+
function CheckPickerBox({ boxRef, children, className, disabled, error, hasError, isErrorMessageHidden, isLabelHidden, isLight, isRequired, isTransparent, label, name, popupWidth, readOnly, style }) {
|
|
55886
|
+
return /*#__PURE__*/ jsxs(Field$2, {
|
|
55887
|
+
className: className,
|
|
55888
|
+
style: style,
|
|
55889
|
+
children: [
|
|
55890
|
+
/*#__PURE__*/ jsx(Label, {
|
|
55891
|
+
$isDisabled: disabled,
|
|
55892
|
+
$isHidden: isLabelHidden,
|
|
55893
|
+
$isRequired: isRequired,
|
|
55894
|
+
htmlFor: name,
|
|
55895
|
+
children: label
|
|
55896
|
+
}),
|
|
55897
|
+
/*#__PURE__*/ jsx(StyledRsuitePickerBox, {
|
|
55898
|
+
ref: boxRef,
|
|
55899
|
+
$hasError: hasError,
|
|
55900
|
+
$isDisabled: disabled,
|
|
55901
|
+
$isLight: isLight,
|
|
55902
|
+
$isReadOnly: readOnly,
|
|
55903
|
+
$isTransparent: isTransparent,
|
|
55904
|
+
$popupWidth: popupWidth,
|
|
55905
|
+
children: children
|
|
55906
|
+
}),
|
|
55907
|
+
!isErrorMessageHidden && hasError && /*#__PURE__*/ jsx(FieldError, {
|
|
55908
|
+
children: error
|
|
55909
|
+
})
|
|
55910
|
+
]
|
|
55911
|
+
});
|
|
55727
55912
|
}
|
|
55728
55913
|
|
|
55729
55914
|
function CheckPicker({ className, customSearch, customSearchMinQueryLength = 1, disabled = false, error, isErrorMessageHidden = false, isLabelHidden = false, isLight = false, isRequired = false, isTransparent = false, isUndefinedWhenDisabled = false, label, onChange, options, optionValueKey, popupWidth, readOnly = false, searchable = false, style, value, ...originalProps }) {
|
|
@@ -55782,54 +55967,44 @@ function CheckPicker({ className, customSearch, customSearchMinQueryLength = 1,
|
|
|
55782
55967
|
}, [
|
|
55783
55968
|
forceUpdate
|
|
55784
55969
|
]);
|
|
55785
|
-
return /*#__PURE__*/
|
|
55970
|
+
return /*#__PURE__*/ jsx(CheckPickerBox, {
|
|
55971
|
+
boxRef: boxRef,
|
|
55786
55972
|
className: controlledClassName,
|
|
55973
|
+
disabled: disabled,
|
|
55974
|
+
error: controlledError,
|
|
55975
|
+
hasError: hasError,
|
|
55976
|
+
isErrorMessageHidden: isErrorMessageHidden,
|
|
55977
|
+
isLabelHidden: isLabelHidden,
|
|
55978
|
+
isLight: isLight,
|
|
55979
|
+
isRequired: isRequired,
|
|
55980
|
+
isTransparent: isTransparent,
|
|
55981
|
+
label: label,
|
|
55982
|
+
name: originalProps.name,
|
|
55983
|
+
popupWidth: popupWidth,
|
|
55984
|
+
readOnly: readOnly,
|
|
55787
55985
|
style: style,
|
|
55788
|
-
children:
|
|
55789
|
-
|
|
55790
|
-
|
|
55791
|
-
|
|
55792
|
-
|
|
55793
|
-
|
|
55794
|
-
|
|
55795
|
-
|
|
55796
|
-
|
|
55797
|
-
|
|
55798
|
-
|
|
55799
|
-
|
|
55800
|
-
|
|
55801
|
-
|
|
55802
|
-
|
|
55803
|
-
|
|
55804
|
-
|
|
55805
|
-
|
|
55806
|
-
|
|
55807
|
-
// when we don't, we don't need to control that and just pass the non-internally-controlled `rsuiteData`
|
|
55808
|
-
data: controlledRsuiteData ?? rsuiteData,
|
|
55809
|
-
disabled: disabled,
|
|
55810
|
-
id: originalProps.name,
|
|
55811
|
-
onChange: handleChange,
|
|
55812
|
-
onSearch: handleSearch,
|
|
55813
|
-
readOnly: readOnly,
|
|
55814
|
-
renderMenuItem: renderMenuItem,
|
|
55815
|
-
searchable: !!customSearch || searchable,
|
|
55816
|
-
// When we use a custom search, we use `controlledRsuiteData` to provide the matching options (data),
|
|
55817
|
-
// that's why we send this "always true" filter to disable Rsuite CheckPicker internal search filtering
|
|
55818
|
-
searchBy: customSearch ? ()=>true : undefined,
|
|
55819
|
-
size: originalProps.size ?? 'sm',
|
|
55820
|
-
value: selectedRsuiteValue,
|
|
55821
|
-
...originalProps
|
|
55822
|
-
})
|
|
55823
|
-
}),
|
|
55824
|
-
!isErrorMessageHidden && hasError && /*#__PURE__*/ jsx(FieldError, {
|
|
55825
|
-
children: controlledError
|
|
55826
|
-
})
|
|
55827
|
-
]
|
|
55986
|
+
children: boxRef.current && /*#__PURE__*/ jsx(CheckPicker$1, {
|
|
55987
|
+
container: boxRef.current,
|
|
55988
|
+
// When we use a custom search, we use `controlledRsuiteData` to provide the matching options (data),
|
|
55989
|
+
// when we don't, we don't need to control that and just pass the non-internally-controlled `rsuiteData`
|
|
55990
|
+
data: controlledRsuiteData ?? rsuiteData,
|
|
55991
|
+
disabled: disabled,
|
|
55992
|
+
id: originalProps.name,
|
|
55993
|
+
onChange: handleChange,
|
|
55994
|
+
onSearch: handleSearch,
|
|
55995
|
+
readOnly: readOnly,
|
|
55996
|
+
renderMenuItem: renderMenuItem,
|
|
55997
|
+
searchable: !!customSearch || searchable,
|
|
55998
|
+
// When we use a custom search, we use `controlledRsuiteData` to provide the matching options (data),
|
|
55999
|
+
// that's why we send this "always true" filter to disable Rsuite CheckPicker internal search filtering
|
|
56000
|
+
searchBy: customSearch ? ()=>true : undefined,
|
|
56001
|
+
size: originalProps.size ?? 'sm',
|
|
56002
|
+
value: selectedRsuiteValue,
|
|
56003
|
+
...originalProps
|
|
56004
|
+
})
|
|
55828
56005
|
});
|
|
55829
56006
|
}
|
|
55830
56007
|
|
|
55831
|
-
function c(e,u,c){var i=this,a=useRef(null),o=useRef(0),f=useRef(null),l=useRef([]),v=useRef(),m=useRef(),d=useRef(e),g=useRef(true);d.current=e;var p="undefined"!=typeof window,w=!u&&0!==u&&p;if("function"!=typeof e)throw new TypeError("Expected a function");u=+u||0;var s=!!(c=c||{}).leading,x=!("trailing"in c)||!!c.trailing,h="maxWait"in c,y="debounceOnServer"in c&&!!c.debounceOnServer,F=h?Math.max(+c.maxWait||0,u):null;useEffect(function(){return g.current=true,function(){g.current=false;}},[]);var A=useMemo(function(){var r=function(r){var n=l.current,t=v.current;return l.current=v.current=null,o.current=r,m.current=d.current.apply(t,n)},n=function(r,n){w&&cancelAnimationFrame(f.current),f.current=w?requestAnimationFrame(r):setTimeout(r,n);},t=function(r){if(!g.current)return false;var n=r-a.current;return !a.current||n>=u||n<0||h&&r-o.current>=F},e=function(n){return f.current=null,x&&l.current?r(n):(l.current=v.current=null,m.current)},c=function r(){var c=Date.now();if(t(c))return e(c);if(g.current){var i=u-(c-a.current),f=h?Math.min(i,F-(c-o.current)):i;n(r,f);}},A=function(){if(p||y){var e=Date.now(),d=t(e);if(l.current=[].slice.call(arguments),v.current=i,a.current=e,d){if(!f.current&&g.current)return o.current=a.current,n(c,u),s?r(a.current):m.current;if(h)return n(c,u),r(a.current)}return f.current||n(c,u),m.current}};return A.cancel=function(){f.current&&(w?cancelAnimationFrame(f.current):clearTimeout(f.current)),o.current=0,l.current=a.current=v.current=f.current=null;},A.isPending=function(){return !!f.current},A.flush=function(){return f.current?e(Date.now()):m.current},A},[s,h,u,F,x,w,p,y]);return A}
|
|
55832
|
-
|
|
55833
56008
|
function isNumeric(val) {
|
|
55834
56009
|
// parseFloat NaNs numeric-cast false positives (null|true|false|"")
|
|
55835
56010
|
// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
|
|
@@ -55839,74 +56014,91 @@ function isNumeric(val) {
|
|
|
55839
56014
|
}
|
|
55840
56015
|
|
|
55841
56016
|
const DECIMAL_PRECISION$1 = 6;
|
|
55842
|
-
|
|
56017
|
+
function isValueTooLong(value) {
|
|
56018
|
+
return isNumeric(value) && (value?.split('.')?.[1]?.length ?? 0) > DECIMAL_PRECISION$1;
|
|
56019
|
+
}
|
|
56020
|
+
function toControlledValue(value) {
|
|
56021
|
+
if (isValueTooLong(`${value}`) && isNumeric(value)) {
|
|
56022
|
+
return (+value).toFixed(DECIMAL_PRECISION$1);
|
|
56023
|
+
}
|
|
56024
|
+
return value ? `${value}` : undefined;
|
|
56025
|
+
}
|
|
55843
56026
|
function DDCoordinatesInput({ coordinates, disabled, name, onChange, readOnly }) {
|
|
55844
|
-
const
|
|
55845
|
-
const
|
|
55846
|
-
const [latitudeError, setLatitudeError] = useState(
|
|
55847
|
-
const [longitudeError, setLongitudeError] = useState(
|
|
55848
|
-
const
|
|
55849
|
-
|
|
55850
|
-
|
|
55851
|
-
|
|
55852
|
-
const [latitude, longitude] = coordinates;
|
|
55853
|
-
if (isNumeric(latitude) && isNumeric(longitude)) {
|
|
55854
|
-
return {
|
|
55855
|
-
latitude: Number(latitude).toFixed(DECIMAL_PRECISION$1),
|
|
55856
|
-
longitude: Number(longitude).toFixed(DECIMAL_PRECISION$1)
|
|
55857
|
-
};
|
|
55858
|
-
}
|
|
55859
|
-
return {
|
|
55860
|
-
latitude: undefined,
|
|
55861
|
-
longitude: undefined
|
|
55862
|
-
};
|
|
55863
|
-
}, [
|
|
55864
|
-
coordinates
|
|
55865
|
-
]);
|
|
55866
|
-
const handleChange = c((nextCoordinates)=>{
|
|
55867
|
-
if (!latitudeInputRef.current || !longitudeInputRef.current) {
|
|
56027
|
+
const [latitude, setLatitude] = useState();
|
|
56028
|
+
const [longitude, setLongitude] = useState();
|
|
56029
|
+
const [latitudeError, setLatitudeError] = useState(undefined);
|
|
56030
|
+
const [longitudeError, setLongitudeError] = useState(undefined);
|
|
56031
|
+
const handleLatitudeChange = (value)=>{
|
|
56032
|
+
setLatitudeError(undefined);
|
|
56033
|
+
setLatitude(value);
|
|
56034
|
+
if (isValueTooLong(value)) {
|
|
55868
56035
|
return;
|
|
55869
56036
|
}
|
|
55870
|
-
|
|
55871
|
-
const longitudeAsString = longitudeInputRef.current.value;
|
|
55872
|
-
setLongitudeError('');
|
|
55873
|
-
setLatitudeError('');
|
|
55874
|
-
if (!isNumeric(latitudeAsString)) {
|
|
56037
|
+
if (!!value && !isNumeric(value)) {
|
|
55875
56038
|
setLatitudeError('Champ Latitude incorrect');
|
|
56039
|
+
onChange(undefined);
|
|
56040
|
+
return;
|
|
56041
|
+
}
|
|
56042
|
+
if (isNumeric(longitude) && isNumeric(value)) {
|
|
56043
|
+
onChange([
|
|
56044
|
+
+value,
|
|
56045
|
+
+longitude
|
|
56046
|
+
]);
|
|
56047
|
+
} else {
|
|
56048
|
+
onChange(undefined);
|
|
56049
|
+
}
|
|
56050
|
+
};
|
|
56051
|
+
const handleLongitudeChange = (value)=>{
|
|
56052
|
+
setLongitudeError(undefined);
|
|
56053
|
+
setLongitude(value);
|
|
56054
|
+
if (isValueTooLong(value)) {
|
|
55876
56055
|
return;
|
|
55877
56056
|
}
|
|
55878
|
-
if (!isNumeric(
|
|
56057
|
+
if (!!value && !isNumeric(value)) {
|
|
55879
56058
|
setLongitudeError('Champ Longitude incorrect');
|
|
56059
|
+
onChange(undefined);
|
|
55880
56060
|
return;
|
|
55881
56061
|
}
|
|
55882
|
-
|
|
55883
|
-
|
|
55884
|
-
|
|
55885
|
-
|
|
55886
|
-
|
|
55887
|
-
|
|
55888
|
-
|
|
56062
|
+
if (isNumeric(latitude) && isNumeric(value)) {
|
|
56063
|
+
onChange([
|
|
56064
|
+
+latitude,
|
|
56065
|
+
+value
|
|
56066
|
+
]);
|
|
56067
|
+
} else {
|
|
56068
|
+
onChange(undefined);
|
|
56069
|
+
}
|
|
56070
|
+
};
|
|
56071
|
+
const formattedLatitude = ()=>{
|
|
56072
|
+
if (latitude) {
|
|
56073
|
+
return toControlledValue(latitude);
|
|
56074
|
+
}
|
|
56075
|
+
return toControlledValue(coordinates?.[0]);
|
|
56076
|
+
};
|
|
56077
|
+
const formattedLongitude = ()=>{
|
|
56078
|
+
if (longitude) {
|
|
56079
|
+
return toControlledValue(longitude);
|
|
56080
|
+
}
|
|
56081
|
+
return toControlledValue(coordinates?.[1]);
|
|
56082
|
+
};
|
|
55889
56083
|
return /*#__PURE__*/ jsxs(Box$9, {
|
|
55890
56084
|
children: [
|
|
55891
56085
|
/*#__PURE__*/ jsx(DDInput, {
|
|
55892
|
-
ref: latitudeInputRef,
|
|
55893
56086
|
"data-cy": "coordinates-dd-input-lat",
|
|
55894
56087
|
disabled: disabled,
|
|
55895
56088
|
name: `${name}-latitude`,
|
|
55896
|
-
onChange: ()=>
|
|
56089
|
+
onChange: (e)=>handleLatitudeChange(e.target.value),
|
|
55897
56090
|
placeholder: "Latitude",
|
|
55898
56091
|
readOnly: readOnly,
|
|
55899
|
-
value:
|
|
56092
|
+
value: formattedLatitude() ?? ''
|
|
55900
56093
|
}),
|
|
55901
56094
|
/*#__PURE__*/ jsx(DDInput, {
|
|
55902
|
-
ref: longitudeInputRef,
|
|
55903
56095
|
"data-cy": "coordinates-dd-input-lon",
|
|
55904
56096
|
disabled: disabled,
|
|
55905
56097
|
name: `${name}-longitude`,
|
|
55906
|
-
onChange: ()=>
|
|
56098
|
+
onChange: (e)=>handleLongitudeChange(e.target.value),
|
|
55907
56099
|
placeholder: "Longitude",
|
|
55908
56100
|
readOnly: readOnly,
|
|
55909
|
-
value:
|
|
56101
|
+
value: formattedLongitude() ?? ''
|
|
55910
56102
|
}),
|
|
55911
56103
|
/*#__PURE__*/ jsx(CoordinatesType$2, {
|
|
55912
56104
|
children: "(DD)"
|
|
@@ -66364,11 +66556,21 @@ const Box$7 = styled.div`
|
|
|
66364
66556
|
|
|
66365
66557
|
function CoordinatesInput({ className, coordinatesFormat, defaultValue, disabled = false, error, isErrorMessageHidden = false, isLabelHidden = false, isLight = false, isRequired = false, isTransparent = false, isUndefinedWhenDisabled = false, label, name, onChange = lodashExports.noop, readOnly = false, style }) {
|
|
66366
66558
|
const [clearCounter, setClearCounter] = useState(0);
|
|
66367
|
-
const
|
|
66559
|
+
const controlledErrors = useMemo(()=>{
|
|
66560
|
+
if (!error) {
|
|
66561
|
+
return [];
|
|
66562
|
+
}
|
|
66563
|
+
if (Array.isArray(error)) {
|
|
66564
|
+
return error.map((e)=>normalizeString(e));
|
|
66565
|
+
}
|
|
66566
|
+
return [
|
|
66567
|
+
normalizeString(error)
|
|
66568
|
+
];
|
|
66569
|
+
}, [
|
|
66368
66570
|
error
|
|
66369
66571
|
]);
|
|
66370
|
-
const hasError = useMemo(()=>
|
|
66371
|
-
|
|
66572
|
+
const hasError = useMemo(()=>controlledErrors.length > 0, [
|
|
66573
|
+
controlledErrors
|
|
66372
66574
|
]);
|
|
66373
66575
|
const key = useKey([
|
|
66374
66576
|
clearCounter,
|
|
@@ -66400,7 +66602,7 @@ function CoordinatesInput({ className, coordinatesFormat, defaultValue, disabled
|
|
|
66400
66602
|
coordinates: defaultValue,
|
|
66401
66603
|
disabled: disabled,
|
|
66402
66604
|
name: name,
|
|
66403
|
-
onChange: onChange,
|
|
66605
|
+
onChange: (nextCoordinates)=>onChange(nextCoordinates, defaultValue),
|
|
66404
66606
|
readOnly: readOnly
|
|
66405
66607
|
}, key);
|
|
66406
66608
|
default:
|
|
@@ -66432,9 +66634,9 @@ function CoordinatesInput({ className, coordinatesFormat, defaultValue, disabled
|
|
|
66432
66634
|
style: style,
|
|
66433
66635
|
children: [
|
|
66434
66636
|
getCoordinatesInput(),
|
|
66435
|
-
!isErrorMessageHidden && hasError &&
|
|
66436
|
-
|
|
66437
|
-
|
|
66637
|
+
!isErrorMessageHidden && hasError && controlledErrors.map((controlledError)=>/*#__PURE__*/ jsx(FieldError, {
|
|
66638
|
+
children: controlledError
|
|
66639
|
+
}, controlledError))
|
|
66438
66640
|
]
|
|
66439
66641
|
});
|
|
66440
66642
|
}
|
|
@@ -70623,12 +70825,9 @@ const StyledToggle = styled(Toggle$1)`
|
|
|
70623
70825
|
function FormikCheckbox({ name, ...originalProps }) {
|
|
70624
70826
|
const [field, meta, helpers] = useField(name);
|
|
70625
70827
|
const isChecked = Boolean(field.value);
|
|
70626
|
-
const handleChange =
|
|
70627
|
-
|
|
70628
|
-
|
|
70629
|
-
}, // We don't want to trigger infinite re-rendering since `helpers.setValue` changes after each rendering
|
|
70630
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
70631
|
-
[]);
|
|
70828
|
+
const handleChange = (isNextChecked)=>{
|
|
70829
|
+
helpers.setValue(isNextChecked);
|
|
70830
|
+
};
|
|
70632
70831
|
// A checkbox must initialize its Formik value on mount:
|
|
70633
70832
|
// it wouldn't make sense to keep it as `undefined` since `undefined` means `false` in the case of a checkbox
|
|
70634
70833
|
useEffect(()=>{
|
|
@@ -70647,11 +70846,9 @@ function FormikCheckbox({ name, ...originalProps }) {
|
|
|
70647
70846
|
|
|
70648
70847
|
function FormikCheckPicker({ name, ...originalProps }) {
|
|
70649
70848
|
const [field, meta, helpers] = useField(name);
|
|
70650
|
-
const handleChange =
|
|
70651
|
-
|
|
70652
|
-
|
|
70653
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
70654
|
-
[]);
|
|
70849
|
+
const handleChange = (nextValue)=>{
|
|
70850
|
+
helpers.setValue(nextValue);
|
|
70851
|
+
};
|
|
70655
70852
|
return /*#__PURE__*/ jsx(CheckPicker, {
|
|
70656
70853
|
...originalProps,
|
|
70657
70854
|
error: meta.error,
|
|
@@ -70663,11 +70860,9 @@ function FormikCheckPicker({ name, ...originalProps }) {
|
|
|
70663
70860
|
|
|
70664
70861
|
function FormikCoordinatesInput({ name, ...originalProps }) {
|
|
70665
70862
|
const [field, meta, helpers] = useField(name);
|
|
70666
|
-
const handleChange =
|
|
70667
|
-
|
|
70668
|
-
|
|
70669
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
70670
|
-
[]);
|
|
70863
|
+
const handleChange = (nextValue)=>{
|
|
70864
|
+
helpers.setValue(nextValue);
|
|
70865
|
+
};
|
|
70671
70866
|
return /*#__PURE__*/ jsx(CoordinatesInput, {
|
|
70672
70867
|
...originalProps,
|
|
70673
70868
|
defaultValue: field.value,
|
|
@@ -70680,11 +70875,9 @@ function FormikCoordinatesInput({ name, ...originalProps }) {
|
|
|
70680
70875
|
const UntypedDatePicker = DatePicker;
|
|
70681
70876
|
function FormikDatePicker({ name, ...originalProps }) {
|
|
70682
70877
|
const [field, meta, helpers] = useField(name);
|
|
70683
|
-
const handleChange =
|
|
70684
|
-
|
|
70685
|
-
|
|
70686
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
70687
|
-
[]);
|
|
70878
|
+
const handleChange = (nextValue)=>{
|
|
70879
|
+
helpers.setValue(nextValue);
|
|
70880
|
+
};
|
|
70688
70881
|
return /*#__PURE__*/ jsx(UntypedDatePicker, {
|
|
70689
70882
|
...originalProps,
|
|
70690
70883
|
defaultValue: field.value,
|
|
@@ -70697,11 +70890,9 @@ function FormikDatePicker({ name, ...originalProps }) {
|
|
|
70697
70890
|
const UntypedDateRangePicker = DateRangePicker;
|
|
70698
70891
|
function FormikDateRangePicker({ name, ...originalProps }) {
|
|
70699
70892
|
const [field, meta, helpers] = useField(name);
|
|
70700
|
-
const handleChange =
|
|
70701
|
-
|
|
70702
|
-
|
|
70703
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
70704
|
-
[]);
|
|
70893
|
+
const handleChange = (nextValue)=>{
|
|
70894
|
+
helpers.setValue(nextValue);
|
|
70895
|
+
};
|
|
70705
70896
|
return /*#__PURE__*/ jsx(UntypedDateRangePicker, {
|
|
70706
70897
|
...originalProps,
|
|
70707
70898
|
defaultValue: field.value,
|
|
@@ -70740,11 +70931,9 @@ function FormikEffect({ onChange, onError }) {
|
|
|
70740
70931
|
|
|
70741
70932
|
function FormikMultiCheckbox({ name, ...originalProps }) {
|
|
70742
70933
|
const [field, meta, helpers] = useField(name);
|
|
70743
|
-
const handleChange =
|
|
70744
|
-
|
|
70745
|
-
|
|
70746
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
70747
|
-
[]);
|
|
70934
|
+
const handleChange = (nextValue)=>{
|
|
70935
|
+
helpers.setValue(nextValue);
|
|
70936
|
+
};
|
|
70748
70937
|
return /*#__PURE__*/ jsx(MultiCheckbox, {
|
|
70749
70938
|
...originalProps,
|
|
70750
70939
|
error: meta.error,
|
|
@@ -70756,11 +70945,9 @@ function FormikMultiCheckbox({ name, ...originalProps }) {
|
|
|
70756
70945
|
|
|
70757
70946
|
function FormikMultiCascader({ name, ...originalProps }) {
|
|
70758
70947
|
const [field, meta, helpers] = useField(name);
|
|
70759
|
-
const handleChange =
|
|
70760
|
-
|
|
70761
|
-
|
|
70762
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
70763
|
-
[]);
|
|
70948
|
+
const handleChange = (nextValue)=>{
|
|
70949
|
+
helpers.setValue(nextValue);
|
|
70950
|
+
};
|
|
70764
70951
|
return /*#__PURE__*/ jsx(MultiCascader, {
|
|
70765
70952
|
...originalProps,
|
|
70766
70953
|
error: meta.error,
|
|
@@ -70772,11 +70959,9 @@ function FormikMultiCascader({ name, ...originalProps }) {
|
|
|
70772
70959
|
|
|
70773
70960
|
function FormikMultiSelect({ name, ...originalProps }) {
|
|
70774
70961
|
const [field, meta, helpers] = useField(name);
|
|
70775
|
-
const handleChange =
|
|
70776
|
-
|
|
70777
|
-
|
|
70778
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
70779
|
-
[]);
|
|
70962
|
+
const handleChange = (nextValue)=>{
|
|
70963
|
+
helpers.setValue(nextValue);
|
|
70964
|
+
};
|
|
70780
70965
|
return /*#__PURE__*/ jsx(MultiSelect, {
|
|
70781
70966
|
...originalProps,
|
|
70782
70967
|
error: meta.error,
|
|
@@ -70788,11 +70973,9 @@ function FormikMultiSelect({ name, ...originalProps }) {
|
|
|
70788
70973
|
|
|
70789
70974
|
function FormikMultiRadio({ name, ...originalProps }) {
|
|
70790
70975
|
const [field, meta, helpers] = useField(name);
|
|
70791
|
-
const handleChange =
|
|
70792
|
-
|
|
70793
|
-
|
|
70794
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
70795
|
-
[]);
|
|
70976
|
+
const handleChange = (nextValue)=>{
|
|
70977
|
+
helpers.setValue(nextValue);
|
|
70978
|
+
};
|
|
70796
70979
|
return /*#__PURE__*/ jsx(MultiRadio, {
|
|
70797
70980
|
...originalProps,
|
|
70798
70981
|
error: meta.error,
|
|
@@ -70804,11 +70987,9 @@ function FormikMultiRadio({ name, ...originalProps }) {
|
|
|
70804
70987
|
|
|
70805
70988
|
function FormikNumberInput({ name, ...originalProps }) {
|
|
70806
70989
|
const [field, meta, helpers] = useField(name);
|
|
70807
|
-
const handleChange =
|
|
70808
|
-
|
|
70809
|
-
|
|
70810
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
70811
|
-
[]);
|
|
70990
|
+
const handleChange = (nextValue)=>{
|
|
70991
|
+
helpers.setValue(nextValue);
|
|
70992
|
+
};
|
|
70812
70993
|
return /*#__PURE__*/ jsx(NumberInput, {
|
|
70813
70994
|
...originalProps,
|
|
70814
70995
|
error: meta.error,
|
|
@@ -70820,11 +71001,9 @@ function FormikNumberInput({ name, ...originalProps }) {
|
|
|
70820
71001
|
|
|
70821
71002
|
function FormikPhoneInput({ name, ...originalProps }) {
|
|
70822
71003
|
const [field, meta, helpers] = useField(name);
|
|
70823
|
-
const handleChange =
|
|
70824
|
-
|
|
70825
|
-
|
|
70826
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
70827
|
-
[]);
|
|
71004
|
+
const handleChange = (nextValue)=>{
|
|
71005
|
+
helpers.setValue(nextValue);
|
|
71006
|
+
};
|
|
70828
71007
|
return /*#__PURE__*/ jsx(PhoneInput, {
|
|
70829
71008
|
...originalProps,
|
|
70830
71009
|
error: meta.error,
|
|
@@ -70836,11 +71015,9 @@ function FormikPhoneInput({ name, ...originalProps }) {
|
|
|
70836
71015
|
|
|
70837
71016
|
function FormikRichBooleanCheckbox({ name, ...originalProps }) {
|
|
70838
71017
|
const [field, meta, helpers] = useField(name);
|
|
70839
|
-
const handleChange =
|
|
70840
|
-
|
|
70841
|
-
|
|
70842
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
70843
|
-
[]);
|
|
71018
|
+
const handleChange = (nextValue)=>{
|
|
71019
|
+
helpers.setValue(nextValue);
|
|
71020
|
+
};
|
|
70844
71021
|
return /*#__PURE__*/ jsx(RichBooleanCheckbox, {
|
|
70845
71022
|
error: meta.error,
|
|
70846
71023
|
name: name,
|
|
@@ -70852,11 +71029,9 @@ function FormikRichBooleanCheckbox({ name, ...originalProps }) {
|
|
|
70852
71029
|
|
|
70853
71030
|
function FormikSearch({ name, ...originalProps }) {
|
|
70854
71031
|
const [field, meta, helpers] = useField(name);
|
|
70855
|
-
const handleChange =
|
|
70856
|
-
|
|
70857
|
-
|
|
70858
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
70859
|
-
[]);
|
|
71032
|
+
const handleChange = (nextValue)=>{
|
|
71033
|
+
helpers.setValue(nextValue);
|
|
71034
|
+
};
|
|
70860
71035
|
return /*#__PURE__*/ jsx(Search, {
|
|
70861
71036
|
...originalProps,
|
|
70862
71037
|
error: meta.error,
|
|
@@ -70868,11 +71043,9 @@ function FormikSearch({ name, ...originalProps }) {
|
|
|
70868
71043
|
|
|
70869
71044
|
function FormikSelect({ name, ...originalProps }) {
|
|
70870
71045
|
const [field, meta, helpers] = useField(name);
|
|
70871
|
-
const handleChange =
|
|
70872
|
-
|
|
70873
|
-
|
|
70874
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
70875
|
-
[]);
|
|
71046
|
+
const handleChange = (nextValue)=>{
|
|
71047
|
+
helpers.setValue(nextValue);
|
|
71048
|
+
};
|
|
70876
71049
|
return /*#__PURE__*/ jsx(Select, {
|
|
70877
71050
|
...originalProps,
|
|
70878
71051
|
error: meta.error,
|
|
@@ -70884,11 +71057,9 @@ function FormikSelect({ name, ...originalProps }) {
|
|
|
70884
71057
|
|
|
70885
71058
|
function FormikTextarea({ name, ...originalProps }) {
|
|
70886
71059
|
const [field, meta, helpers] = useField(name);
|
|
70887
|
-
const handleChange =
|
|
70888
|
-
|
|
70889
|
-
|
|
70890
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
70891
|
-
[]);
|
|
71060
|
+
const handleChange = (nextValue)=>{
|
|
71061
|
+
helpers.setValue(nextValue);
|
|
71062
|
+
};
|
|
70892
71063
|
return /*#__PURE__*/ jsx(Textarea, {
|
|
70893
71064
|
...originalProps,
|
|
70894
71065
|
error: meta.error,
|
|
@@ -70900,11 +71071,9 @@ function FormikTextarea({ name, ...originalProps }) {
|
|
|
70900
71071
|
|
|
70901
71072
|
function FormikTextInput({ name, ...originalProps }) {
|
|
70902
71073
|
const [field, meta, helpers] = useField(name);
|
|
70903
|
-
const handleChange =
|
|
70904
|
-
|
|
70905
|
-
|
|
70906
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
70907
|
-
[]);
|
|
71074
|
+
const handleChange = (nextValue)=>{
|
|
71075
|
+
helpers.setValue(nextValue);
|
|
71076
|
+
};
|
|
70908
71077
|
return /*#__PURE__*/ jsx(TextInput, {
|
|
70909
71078
|
...originalProps,
|
|
70910
71079
|
error: meta.error,
|
|
@@ -70917,12 +71086,9 @@ function FormikTextInput({ name, ...originalProps }) {
|
|
|
70917
71086
|
function FormikToggle({ name, ...originalProps }) {
|
|
70918
71087
|
const [field, meta, helpers] = useField(name);
|
|
70919
71088
|
const isChecked = Boolean(field.value);
|
|
70920
|
-
const handleChange =
|
|
70921
|
-
|
|
70922
|
-
|
|
70923
|
-
}, // We don't want to trigger infinite re-rendering since `helpers.setValue` changes after each rendering
|
|
70924
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
70925
|
-
[]);
|
|
71089
|
+
const handleChange = (isNextChecked)=>{
|
|
71090
|
+
helpers.setValue(isNextChecked);
|
|
71091
|
+
};
|
|
70926
71092
|
// A toggle must initialize its Formik value on mount:
|
|
70927
71093
|
// it wouldn't make sense to keep it as `undefined` since `undefined` means `false` in the case of a toggle
|
|
70928
71094
|
useEffect(()=>{
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mtes-mct/monitor-ui",
|
|
3
3
|
"description": "Common React components, hooks, utilities and CSS stylesheets for MonitorFish, MonitorEnv and RapportNav.",
|
|
4
|
-
"version": "24.
|
|
4
|
+
"version": "24.15.1",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=20"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@babel/runtime": "7.26.
|
|
11
|
+
"@babel/runtime": "7.26.10",
|
|
12
12
|
"@tanstack/react-table": "8.21.2",
|
|
13
|
-
"@tanstack/react-virtual": "3.13.
|
|
13
|
+
"@tanstack/react-virtual": "3.13.4",
|
|
14
14
|
"prop-types": "15.8.1",
|
|
15
15
|
"tslib": "2.8.1"
|
|
16
16
|
},
|