@digigov/form 2.0.7 → 2.0.8

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 CHANGED
@@ -1,6 +1,17 @@
1
1
  # Change Log - @digigov/form
2
2
 
3
- This log was last generated on Tue, 10 Feb 2026 13:53:35 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 11 Feb 2026 14:46:37 GMT and should not be manually modified.
4
+
5
+ ## 2.0.8
6
+ Wed, 11 Feb 2026 14:46:37 GMT
7
+
8
+ ### Patches
9
+
10
+ - introduce dialogLabel addHint
11
+
12
+ ### Updates
13
+
14
+ - Update FieldArray test file
4
15
 
5
16
  ## 2.0.7
6
17
  Tue, 10 Feb 2026 13:53:35 GMT
@@ -10,6 +10,7 @@ export interface ArrayEditModalProps extends Omit<ModalProps, 'children'> {
10
10
  editOrAppend: (data: FormData) => void;
11
11
  cancel: () => void;
12
12
  addTitle?: string;
13
+ addHint?: string;
13
14
  editLabel?: string;
14
15
  editProps?: any;
15
16
  appendLabel?: string;
@@ -9,7 +9,7 @@ import { useValidationSchema } from "../../validators/index.js";
9
9
  import { Modal, ModalAction, ModalContent, ModalHeading } from "@digigov/ui/app/Modal/index.js";
10
10
  import { Button } from "@digigov/ui/form/Button/index.js";
11
11
  import { Hint } from "@digigov/ui/typography/Hint/index.js";
12
- const ArrayEditModal_ArrayEditModal = /*#__PURE__*/ react.forwardRef(function({ type, title, hint, defaultValue, editOrAppend, cancel, addTitle, editLabel, editProps, appendLabel, appendProps, cancelLabel, cancelProps, ofField, error: customErrors, Field, ...modalProps }, ref) {
12
+ const ArrayEditModal_ArrayEditModal = /*#__PURE__*/ react.forwardRef(function({ type, title, hint, defaultValue, editOrAppend, cancel, addTitle, addHint, editLabel, editProps, appendLabel, appendProps, cancelLabel, cancelProps, ofField, error: customErrors, Field, ...modalProps }, ref) {
13
13
  const parentCtx = useFormContext();
14
14
  const schema = useValidationSchema('object' === ofField.type && ofField.extra.fields ? Object.values(ofField.extra.fields) : [
15
15
  ofField
@@ -104,7 +104,7 @@ const ArrayEditModal_ArrayEditModal = /*#__PURE__*/ react.forwardRef(function({
104
104
  ref: formRef
105
105
  }, /*#__PURE__*/ react.createElement(ModalHeading, {
106
106
  id: "modal-label"
107
- }, title ? title : 'edit' === type ? 'Επεξεργασία' : addTitle || 'Προσθήκη'), /*#__PURE__*/ react.createElement(ModalContent, null, hint && /*#__PURE__*/ react.createElement(Hint, null, hint), /*#__PURE__*/ react.createElement(Fieldset, null, ofField?.type === 'object' ? /*#__PURE__*/ react.createElement(FieldObject, {
107
+ }, title ? title : 'edit' === type ? 'Επεξεργασία' : addTitle || 'Προσθήκη'), /*#__PURE__*/ react.createElement(ModalContent, null, hint && !addHint && /*#__PURE__*/ react.createElement(Hint, null, hint), addHint && /*#__PURE__*/ react.createElement(Hint, null, addHint), /*#__PURE__*/ react.createElement(Fieldset, null, ofField?.type === 'object' ? /*#__PURE__*/ react.createElement(FieldObject, {
108
108
  ...ofField,
109
109
  defaultValue: defaultValue || void 0,
110
110
  formState: form.formState,
@@ -166,6 +166,7 @@ const FormDialog = /*#__PURE__*/ react.forwardRef(({ name: fieldArrayName, contr
166
166
  ofField: ofField,
167
167
  title: title,
168
168
  hint: customField.label?.secondary,
169
+ addHint: customField.extra?.label.object.dialogLabels?.addHint,
169
170
  name: fieldArrayName,
170
171
  defaultValue: defaultValue || void 0,
171
172
  Field: Field,
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Digigov v2.0.7
1
+ /** @license Digigov v2.0.8
2
2
  *
3
3
  * This source code is licensed under the BSD-2-Clause license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digigov/form",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "description": "@digigov form builder",
5
5
  "author": "GRNET Developers <devs@lists.grnet.gr>",
6
6
  "license": "BSD-2-Clause",
@@ -13,11 +13,11 @@
13
13
  "yup": "0.32.11",
14
14
  "dayjs": "1.10.4",
15
15
  "@hookform/resolvers": "5.0.1",
16
- "@digigov/react-icons": "2.0.7"
16
+ "@digigov/react-icons": "2.0.8"
17
17
  },
18
18
  "peerDependencies": {
19
- "@digigov/ui": "2.0.7",
20
- "@digigov/react-core": "2.0.7",
19
+ "@digigov/ui": "2.0.8",
20
+ "@digigov/react-core": "2.0.8",
21
21
  "clsx": "2.1.1",
22
22
  "react": "^18.3.0 || ^19.1.0",
23
23
  "react-dom": "^18.3.0 || ^19.1.0"
@@ -30,6 +30,7 @@ export interface ArrayEditModalProps extends Omit<ModalProps, 'children'> {
30
30
  editOrAppend: (data: FormData) => void;
31
31
  cancel: () => void;
32
32
  addTitle?: string;
33
+ addHint?: string;
33
34
  editLabel?: string;
34
35
  editProps?: any;
35
36
  appendLabel?: string;
@@ -54,6 +55,7 @@ export const ArrayEditModal = React.forwardRef<
54
55
  editOrAppend,
55
56
  cancel,
56
57
  addTitle,
58
+ addHint,
57
59
  editLabel,
58
60
  editProps,
59
61
  appendLabel,
@@ -190,7 +192,8 @@ export const ArrayEditModal = React.forwardRef<
190
192
  : addTitle || 'Προσθήκη'}
191
193
  </ModalHeading>
192
194
  <ModalContent>
193
- {hint && <Hint>{hint}</Hint>}
195
+ {hint && !addHint && <Hint>{hint}</Hint>}
196
+ {addHint && <Hint>{addHint}</Hint>}
194
197
  <Fieldset>
195
198
  {ofField?.type === 'object' ? (
196
199
  <FieldObject
@@ -246,6 +246,7 @@ export const FormDialog = React.forwardRef<HTMLButtonElement, FormDialogProps>(
246
246
  ofField={ofField}
247
247
  title={title}
248
248
  hint={customField.label?.secondary}
249
+ addHint={customField.extra?.label.object.dialogLabels?.addHint}
249
250
  name={fieldArrayName}
250
251
  defaultValue={defaultValue || undefined}
251
252
  Field={Field}
@@ -6,8 +6,6 @@ import { Default } from '@digigov/form/FieldArray/__stories__/Default';
6
6
  import { TableWithError } from '@digigov/form/FieldArray/__stories__/TableWithError';
7
7
  import { WithExactLength } from '@digigov/form/FieldArray/__stories__/WithExactLength';
8
8
  import { WithModal } from '@digigov/form/FieldArray/__stories__/WithModal';
9
- const SCREENSHOT_DELAY = 2_000;
10
- const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
11
9
 
12
10
  test('renders the All FieldArray variants', async ({ mount, page }) => {
13
11
  await mount(
@@ -35,7 +33,6 @@ test('renders the All FieldArray variants', async ({ mount, page }) => {
35
33
  // Move the mouse to the top-left corner to avoid random hover issues
36
34
  await page.mouse.move(0, 0);
37
35
 
38
- await delay(SCREENSHOT_DELAY);
39
36
 
40
37
  const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
41
38
  expect(screenshot).toMatchSnapshot();