@envisiongroup/porygon 1.0.0-rc.13 → 1.0.0-rc.14
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.d.ts +8 -15
- package/dist/index.js +73 -59
- package/dist/react-components/fields/{EFWAttachments → Attachments}/EFWAttachments.js +1 -1
- package/dist/react-components/fields/{EFWAttachments → Attachments}/EFWAttachments.types.d.ts +1 -1
- package/dist/react-components/fields/Attachments/EFWAttachments.utils.d.ts +8 -0
- package/dist/react-components/fields/Attachments/EFWAttachments.utils.js +4 -0
- package/dist/react-components/fields/{EFWAttachments/EFWAttachmentsCard → Attachments}/EFWAttachmentsCard.js +1 -1
- package/dist/react-components/fields/{EFWAttachments/EFWAttachmentsCard → Attachments}/EFWAttachmentsCard.types.d.ts +1 -1
- package/dist/react-components/fields/{EFWAttachmentsField → Attachments}/EFWAttachmentsField.js +2 -2
- package/dist/react-components/fields/{EFWAttachmentsField → Attachments}/EFWAttachmentsField.types.d.ts +2 -2
- package/dist/react-components/fields/Attachments/index.d.ts +5 -0
- package/dist/react-components/fields/Attachments/index.js +8 -0
- package/dist/react-components/fields/{EFWDatePicker → DatePicker}/EFWDatePicker.js +36 -36
- package/dist/react-components/fields/{EFWDatePicker → DatePicker}/EFWDatePicker.types.d.ts +1 -1
- package/dist/react-components/fields/{EFWDatePicker → DatePicker}/EFWDatePicker.utils.d.ts +9 -0
- package/dist/react-components/fields/DatePicker/EFWDatePicker.utils.js +101 -0
- package/dist/react-components/fields/DatePicker/EFWDatePickerField.js +213 -0
- package/dist/react-components/fields/DatePicker/EFWDatePickerField.types.d.ts +15 -0
- package/dist/react-components/fields/DatePicker/index.d.ts +5 -0
- package/dist/react-components/fields/DatePicker/index.js +8 -0
- package/dist/react-components/fields/Input/EFWInput.js +146 -0
- package/dist/react-components/fields/{EFWInput → Input}/EFWInput.types.d.ts +2 -2
- package/dist/react-components/fields/{EFWInput → Input}/EFWInput.utils.d.ts +13 -0
- package/dist/react-components/fields/Input/EFWInput.utils.js +102 -0
- package/dist/react-components/fields/{EFWInputField → Input}/EFWInputField.js +2 -2
- package/dist/react-components/fields/{EFWInputField → Input}/EFWInputField.types.d.ts +2 -2
- package/dist/react-components/fields/Input/index.d.ts +5 -0
- package/dist/react-components/fields/Input/index.js +8 -0
- package/dist/react-components/fields/NumberInput/EFWNumberInput.js +198 -0
- package/dist/react-components/fields/{EFWNumberInput → NumberInput}/EFWNumberInput.types.d.ts +1 -1
- package/dist/react-components/fields/{EFWNumberInput → NumberInput}/EFWNumberInput.utils.d.ts +10 -1
- package/dist/react-components/fields/{EFWNumberInput → NumberInput}/EFWNumberInput.utils.js +30 -26
- package/dist/react-components/fields/{EFWNumberInputField → NumberInput}/EFWNumberInputField.js +2 -2
- package/dist/react-components/fields/{EFWNumberInputField → NumberInput}/EFWNumberInputField.types.d.ts +2 -2
- package/dist/react-components/fields/NumberInput/index.d.ts +5 -0
- package/dist/react-components/fields/NumberInput/index.js +8 -0
- package/dist/react-components/fields/Switch/EFWSwitch.js +56 -0
- package/dist/react-components/fields/{EFWSwitch → Switch}/EFWSwitch.types.d.ts +1 -1
- package/dist/react-components/fields/Switch/EFWSwitch.utils.d.ts +9 -0
- package/dist/react-components/fields/Switch/EFWSwitch.utils.js +4 -0
- package/dist/react-components/fields/{EFWSwitchField → Switch}/EFWSwitchField.js +2 -2
- package/dist/react-components/fields/{EFWSwitchField → Switch}/EFWSwitchField.types.d.ts +2 -2
- package/dist/react-components/fields/Switch/index.d.ts +5 -0
- package/dist/react-components/fields/Switch/index.js +8 -0
- package/dist/react-components/fields/{EFWTagPicker → TagPicker}/EFWTagPicker.js +91 -81
- package/dist/react-components/fields/{EFWTagPicker → TagPicker}/EFWTagPicker.types.d.ts +1 -1
- package/dist/react-components/fields/TagPicker/EFWTagPicker.utils.d.ts +6 -0
- package/dist/react-components/fields/TagPicker/EFWTagPicker.utils.js +4 -0
- package/dist/react-components/fields/{EFWTagPickerField → TagPicker}/EFWTagPickerField.js +2 -2
- package/dist/react-components/fields/{EFWTagPickerField → TagPicker}/EFWTagPickerField.types.d.ts +2 -2
- package/dist/react-components/fields/TagPicker/index.d.ts +5 -0
- package/dist/react-components/fields/TagPicker/index.js +8 -0
- package/dist/react-components/fields/{EFWTextArea → TextArea}/EFWTextArea.js +25 -24
- package/dist/react-components/fields/{EFWTextArea → TextArea}/EFWTextArea.types.d.ts +1 -1
- package/dist/react-components/fields/TextArea/EFWTextArea.utils.d.ts +6 -0
- package/dist/react-components/fields/TextArea/EFWTextArea.utils.js +4 -0
- package/dist/react-components/fields/{EFWTextAreaField → TextArea}/EFWTextAreaField.js +2 -2
- package/dist/react-components/fields/{EFWTextAreaField → TextArea}/EFWTextAreaField.types.d.ts +2 -2
- package/dist/react-components/fields/TextArea/index.d.ts +5 -0
- package/dist/react-components/fields/TextArea/index.js +8 -0
- package/dist/react-components/fields/_shared/EFWField/EFWField.js +96 -0
- package/dist/react-components/forms/EFWForm/EFWForm.converter.d.ts +10 -1
- package/dist/react-components/forms/EFWForm/EFWForm.converter.js +41 -19
- package/dist/react-components/forms/EFWForm/EFWForm.types.d.ts +7 -7
- package/dist/react-components/forms/EFWForm/EFWForm.utils.d.ts +1 -1
- package/dist/react-components/forms/EFWForm/EFWForm.utils.js +29 -27
- package/dist/react-components/forms/EFWForm/index.d.ts +1 -1
- package/dist/react-components/forms/EFWForm/index.js +2 -2
- package/dist/react-components/tables/EFWTable/utils/CellRenderer/CellRenderer.js +1 -1
- package/dist/react-components/tables/EFWTable/utils/hashing.d.ts +2 -2
- package/dist/react-components/tables/EFWTable/utils/hashing.js +2 -2
- package/package.json +2 -1
- package/dist/react-components/fields/EFWAttachments/EFWAttachmentsCard/index.d.ts +0 -1
- package/dist/react-components/fields/EFWAttachments/EFWAttachmentsCard/index.js +0 -0
- package/dist/react-components/fields/EFWAttachments/index.d.ts +0 -2
- package/dist/react-components/fields/EFWAttachments/index.js +0 -4
- package/dist/react-components/fields/EFWAttachmentsField/index.d.ts +0 -2
- package/dist/react-components/fields/EFWAttachmentsField/index.js +0 -4
- package/dist/react-components/fields/EFWDatePicker/EFWDatePicker.utils.js +0 -90
- package/dist/react-components/fields/EFWDatePicker/index.d.ts +0 -2
- package/dist/react-components/fields/EFWDatePicker/index.js +0 -4
- package/dist/react-components/fields/EFWDatePickerField/EFWDatePickerField.js +0 -65
- package/dist/react-components/fields/EFWDatePickerField/EFWDatePickerField.types.d.ts +0 -7
- package/dist/react-components/fields/EFWDatePickerField/index.d.ts +0 -2
- package/dist/react-components/fields/EFWDatePickerField/index.js +0 -4
- package/dist/react-components/fields/EFWField/EFWField.js +0 -96
- package/dist/react-components/fields/EFWInput/EFWInput.js +0 -119
- package/dist/react-components/fields/EFWInput/EFWInput.utils.js +0 -83
- package/dist/react-components/fields/EFWInput/index.d.ts +0 -2
- package/dist/react-components/fields/EFWInput/index.js +0 -4
- package/dist/react-components/fields/EFWInputField/EFWInputField.utils.d.ts +0 -1
- package/dist/react-components/fields/EFWInputField/EFWInputField.utils.js +0 -0
- package/dist/react-components/fields/EFWInputField/index.d.ts +0 -2
- package/dist/react-components/fields/EFWInputField/index.js +0 -4
- package/dist/react-components/fields/EFWNumberInput/EFWNumberInput.js +0 -198
- package/dist/react-components/fields/EFWNumberInput/index.d.ts +0 -2
- package/dist/react-components/fields/EFWNumberInput/index.js +0 -4
- package/dist/react-components/fields/EFWNumberInputField/EFWNumberInputField.utils.d.ts +0 -1
- package/dist/react-components/fields/EFWNumberInputField/EFWNumberInputField.utils.js +0 -0
- package/dist/react-components/fields/EFWNumberInputField/index.d.ts +0 -2
- package/dist/react-components/fields/EFWNumberInputField/index.js +0 -4
- package/dist/react-components/fields/EFWSwitch/EFWSwitch.js +0 -55
- package/dist/react-components/fields/EFWSwitch/index.d.ts +0 -2
- package/dist/react-components/fields/EFWSwitch/index.js +0 -4
- package/dist/react-components/fields/EFWSwitchField/index.d.ts +0 -2
- package/dist/react-components/fields/EFWSwitchField/index.js +0 -4
- package/dist/react-components/fields/EFWTagPicker/index.d.ts +0 -2
- package/dist/react-components/fields/EFWTagPicker/index.js +0 -4
- package/dist/react-components/fields/EFWTagPickerField/EFWTagPickerField.utils.d.ts +0 -1
- package/dist/react-components/fields/EFWTagPickerField/EFWTagPickerField.utils.js +0 -0
- package/dist/react-components/fields/EFWTagPickerField/index.d.ts +0 -2
- package/dist/react-components/fields/EFWTagPickerField/index.js +0 -4
- package/dist/react-components/fields/EFWTextArea/EFWTextArea.utils.d.ts +0 -1
- package/dist/react-components/fields/EFWTextArea/EFWTextArea.utils.js +0 -0
- package/dist/react-components/fields/EFWTextArea/index.d.ts +0 -2
- package/dist/react-components/fields/EFWTextArea/index.js +0 -4
- package/dist/react-components/fields/EFWTextAreaField/EFWTextAreaField.utils.d.ts +0 -1
- package/dist/react-components/fields/EFWTextAreaField/EFWTextAreaField.utils.js +0 -0
- package/dist/react-components/fields/EFWTextAreaField/index.d.ts +0 -2
- package/dist/react-components/fields/EFWTextAreaField/index.js +0 -4
- package/dist/react-components/fields/types.d.ts +0 -1
- package/dist/react-components/fields/types.js +0 -0
- /package/dist/react-components/fields/{EFWAttachments → Attachments}/EFWAttachments.d.ts +0 -0
- /package/dist/react-components/fields/{EFWAttachments/EFWAttachmentsCard → Attachments}/EFWAttachmentsCard.d.ts +0 -0
- /package/dist/react-components/fields/{EFWAttachmentsField → Attachments}/EFWAttachmentsField.d.ts +0 -0
- /package/dist/react-components/fields/{EFWDatePicker → DatePicker}/EFWDatePicker.d.ts +0 -0
- /package/dist/react-components/fields/{EFWDatePickerField → DatePicker}/EFWDatePickerField.d.ts +0 -0
- /package/dist/react-components/fields/{EFWInput → Input}/EFWInput.d.ts +0 -0
- /package/dist/react-components/fields/{EFWInputField → Input}/EFWInputField.d.ts +0 -0
- /package/dist/react-components/fields/{EFWNumberInput → NumberInput}/EFWNumberInput.d.ts +0 -0
- /package/dist/react-components/fields/{EFWNumberInputField → NumberInput}/EFWNumberInputField.d.ts +0 -0
- /package/dist/react-components/fields/{EFWSwitch → Switch}/EFWSwitch.d.ts +0 -0
- /package/dist/react-components/fields/{EFWSwitchField → Switch}/EFWSwitchField.d.ts +0 -0
- /package/dist/react-components/fields/{EFWTagPicker → TagPicker}/EFWTagPicker.d.ts +0 -0
- /package/dist/react-components/fields/{EFWTagPickerField → TagPicker}/EFWTagPickerField.d.ts +0 -0
- /package/dist/react-components/fields/{EFWTextArea → TextArea}/EFWTextArea.d.ts +0 -0
- /package/dist/react-components/fields/{EFWTextAreaField → TextArea}/EFWTextAreaField.d.ts +0 -0
- /package/dist/react-components/fields/{EFWField → _shared/EFWField}/EFWField.d.ts +0 -0
- /package/dist/react-components/fields/{EFWField → _shared/EFWField}/EFWField.types.d.ts +0 -0
- /package/dist/react-components/fields/{EFWField → _shared/EFWField}/EFWField.utils.d.ts +0 -0
- /package/dist/react-components/fields/{EFWField → _shared/EFWField}/EFWField.utils.js +0 -0
- /package/dist/react-components/fields/{EFWField → _shared/EFWField}/index.d.ts +0 -0
- /package/dist/react-components/fields/{EFWField → _shared/EFWField}/index.js +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -2,21 +2,14 @@ export * from './react-components/buttons/EFWButton';
|
|
|
2
2
|
export * from './react-components/buttons/EFWDrawerButton';
|
|
3
3
|
export * from './react-components/buttons/EFWGroupButton';
|
|
4
4
|
export * from './react-components/commons/utils';
|
|
5
|
-
export * from './react-components/fields/
|
|
6
|
-
export * from './react-components/fields/
|
|
7
|
-
export * from './react-components/fields/
|
|
8
|
-
export * from './react-components/fields/
|
|
9
|
-
export * from './react-components/fields/
|
|
10
|
-
export * from './react-components/fields/
|
|
11
|
-
export * from './react-components/fields/
|
|
12
|
-
export * from './react-components/fields/
|
|
13
|
-
export * from './react-components/fields/EFWNumberInputField';
|
|
14
|
-
export * from './react-components/fields/EFWSwitch';
|
|
15
|
-
export * from './react-components/fields/EFWSwitchField';
|
|
16
|
-
export * from './react-components/fields/EFWTagPicker';
|
|
17
|
-
export * from './react-components/fields/EFWTagPickerField';
|
|
18
|
-
export * from './react-components/fields/EFWTextArea';
|
|
19
|
-
export * from './react-components/fields/EFWTextAreaField';
|
|
5
|
+
export * from './react-components/fields/_shared/EFWField';
|
|
6
|
+
export * from './react-components/fields/Attachments';
|
|
7
|
+
export * from './react-components/fields/DatePicker';
|
|
8
|
+
export * from './react-components/fields/Input';
|
|
9
|
+
export * from './react-components/fields/NumberInput';
|
|
10
|
+
export * from './react-components/fields/Switch';
|
|
11
|
+
export * from './react-components/fields/TagPicker';
|
|
12
|
+
export * from './react-components/fields/TextArea';
|
|
20
13
|
export * from './react-components/forms/EFWForm';
|
|
21
14
|
export * from './react-components/forms/EFWFormMessageBarGroup';
|
|
22
15
|
export * from './react-components/forms/EFWMessageBarManager/EFWMessageBarManager';
|
package/dist/index.js
CHANGED
|
@@ -1,63 +1,77 @@
|
|
|
1
|
-
import { formatFileSize as
|
|
1
|
+
import { formatFileSize as t, getErrorMessage as o, getFileIconUrl as m } from "./react-components/commons/utils.js";
|
|
2
2
|
import { EFWMessageBarManager as p } from "./react-components/forms/EFWMessageBarManager/EFWMessageBarManager.js";
|
|
3
|
-
import { EFWButton as
|
|
4
|
-
import { useEFWButton as
|
|
5
|
-
import { EFWDrawerButton as
|
|
6
|
-
import { EFWGroupButton as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
3
|
+
import { EFWButton as x } from "./react-components/buttons/EFWButton/EFWButton.js";
|
|
4
|
+
import { useEFWButton as l } from "./react-components/buttons/EFWButton/EFWButton.hooks.js";
|
|
5
|
+
import { EFWDrawerButton as u } from "./react-components/buttons/EFWDrawerButton/EFWDrawerButton.js";
|
|
6
|
+
import { EFWGroupButton as i } from "./react-components/buttons/EFWGroupButton/EFWGroupButton.js";
|
|
7
|
+
import { EFWField as n } from "./react-components/fields/_shared/EFWField/EFWField.js";
|
|
8
|
+
import { EFWAttachment as c } from "./react-components/fields/Attachments/EFWAttachments.js";
|
|
9
|
+
import { getAttachmentsFormattedValue as T } from "./react-components/fields/Attachments/EFWAttachments.utils.js";
|
|
10
|
+
import { EFWAttachmentsField as I } from "./react-components/fields/Attachments/EFWAttachmentsField.js";
|
|
11
|
+
import { EFWDatePicker as h } from "./react-components/fields/DatePicker/EFWDatePicker.js";
|
|
12
|
+
import { getDatePickerFormattedValue as A } from "./react-components/fields/DatePicker/EFWDatePicker.utils.js";
|
|
13
|
+
import { EFWDatePickerField as D } from "./react-components/fields/DatePicker/EFWDatePickerField.js";
|
|
14
|
+
import { EFWInput as w } from "./react-components/fields/Input/EFWInput.js";
|
|
15
|
+
import { getInputFormattedValue as S } from "./react-components/fields/Input/EFWInput.utils.js";
|
|
16
|
+
import { EFWInputField as N } from "./react-components/fields/Input/EFWInputField.js";
|
|
17
|
+
import { EFWNumberInput as G } from "./react-components/fields/NumberInput/EFWNumberInput.js";
|
|
18
|
+
import { getNumberInputFormattedValue as z } from "./react-components/fields/NumberInput/EFWNumberInput.utils.js";
|
|
19
|
+
import { EFWNumberInputField as U } from "./react-components/fields/NumberInput/EFWNumberInputField.js";
|
|
20
|
+
import { EFWSwitch as q } from "./react-components/fields/Switch/EFWSwitch.js";
|
|
21
|
+
import { getSwitchFormattedValue as J } from "./react-components/fields/Switch/EFWSwitch.utils.js";
|
|
22
|
+
import { EFWSwitchField as L } from "./react-components/fields/Switch/EFWSwitchField.js";
|
|
23
|
+
import { EFWTagPicker as R } from "./react-components/fields/TagPicker/EFWTagPicker.js";
|
|
24
|
+
import { getTagPickerFormattedValue as Y } from "./react-components/fields/TagPicker/EFWTagPicker.utils.js";
|
|
25
|
+
import { EFWTagPickerField as _ } from "./react-components/fields/TagPicker/EFWTagPickerField.js";
|
|
26
|
+
import { EFWTextArea as ee } from "./react-components/fields/TextArea/EFWTextArea.js";
|
|
27
|
+
import { getTextAreaFormattedValue as te } from "./react-components/fields/TextArea/EFWTextArea.utils.js";
|
|
28
|
+
import { EFWTextAreaField as me } from "./react-components/fields/TextArea/EFWTextAreaField.js";
|
|
29
|
+
import { getFormFieldDisplayText as pe } from "./react-components/forms/EFWForm/EFWForm.converter.js";
|
|
30
|
+
import { useFormController as xe } from "./react-components/forms/EFWForm/EFWForm.hooks.js";
|
|
31
|
+
import { EFWForm as le } from "./react-components/forms/EFWForm/EFWForm.js";
|
|
32
|
+
import { EFWFormMessageBarGroup as ue } from "./react-components/forms/EFWFormMessageBarGroup/EFWFormMessageBarGroup.js";
|
|
33
|
+
import { useDrawer as ie } from "./react-components/hooks/useDrawer/useDrawer.js";
|
|
34
|
+
import { EFWTable as ne } from "./react-components/tables/EFWTable/EFWTable.js";
|
|
35
|
+
import { useTableController as ce } from "./react-components/tables/EFWTable/hooks/useTableController/useTableController.js";
|
|
36
|
+
import { EFWTableEmpty as Te, EFWTableOverlay as be } from "./react-components/tables/EFWTable/components/EFWTableOverlay/EFWTableOverlay.js";
|
|
30
37
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
c as EFWAttachment,
|
|
39
|
+
I as EFWAttachmentsField,
|
|
40
|
+
x as EFWButton,
|
|
41
|
+
h as EFWDatePicker,
|
|
42
|
+
D as EFWDatePickerField,
|
|
43
|
+
u as EFWDrawerButton,
|
|
44
|
+
n as EFWField,
|
|
45
|
+
le as EFWForm,
|
|
46
|
+
ue as EFWFormMessageBarGroup,
|
|
47
|
+
i as EFWGroupButton,
|
|
48
|
+
w as EFWInput,
|
|
49
|
+
N as EFWInputField,
|
|
43
50
|
p as EFWMessageBarManager,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
51
|
+
G as EFWNumberInput,
|
|
52
|
+
U as EFWNumberInputField,
|
|
53
|
+
q as EFWSwitch,
|
|
54
|
+
L as EFWSwitchField,
|
|
55
|
+
ne as EFWTable,
|
|
56
|
+
Te as EFWTableEmpty,
|
|
57
|
+
be as EFWTableOverlay,
|
|
58
|
+
R as EFWTagPicker,
|
|
59
|
+
_ as EFWTagPickerField,
|
|
60
|
+
ee as EFWTextArea,
|
|
61
|
+
me as EFWTextAreaField,
|
|
62
|
+
t as formatFileSize,
|
|
63
|
+
T as getAttachmentsFormattedValue,
|
|
64
|
+
A as getDatePickerFormattedValue,
|
|
65
|
+
o as getErrorMessage,
|
|
66
|
+
m as getFileIconUrl,
|
|
67
|
+
pe as getFormFieldDisplayText,
|
|
68
|
+
S as getInputFormattedValue,
|
|
69
|
+
z as getNumberInputFormattedValue,
|
|
70
|
+
J as getSwitchFormattedValue,
|
|
71
|
+
Y as getTagPickerFormattedValue,
|
|
72
|
+
te as getTextAreaFormattedValue,
|
|
73
|
+
ie as useDrawer,
|
|
74
|
+
l as useEFWButton,
|
|
75
|
+
xe as useFormController,
|
|
76
|
+
ce as useTableController
|
|
63
77
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as C, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { makeStyles as j, mergeClasses as $, CardFooter as V, Button as D, Text as T } from "@fluentui/react-components";
|
|
3
3
|
import { useId as q, useRef as I, useMemo as P, useState as U, useEffect as S, useCallback as d } from "react";
|
|
4
|
-
import { EFWAttachmentsContainer as G } from "./EFWAttachmentsCard
|
|
4
|
+
import { EFWAttachmentsContainer as G } from "./EFWAttachmentsCard.js";
|
|
5
5
|
import { Attach20Regular as H } from "@fluentui/react-icons";
|
|
6
6
|
import { formatFileSize as J } from "../../commons/utils.js";
|
|
7
7
|
import { v4 as K } from "uuid";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EFWAttachmentsValue } from './EFWAttachments.types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Retorna una representación textual de los archivos adjuntos,
|
|
5
|
+
* útil para formularios, tablas u otros contextos donde se necesite
|
|
6
|
+
* una versión en texto plano del valor.
|
|
7
|
+
*/
|
|
8
|
+
export declare const getAttachmentsFormattedValue: (value: EFWAttachmentsValue[] | undefined | null) => string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n, jsxs as p } from "react/jsx-runtime";
|
|
2
2
|
import { makeStyles as w, Menu as g, MenuTrigger as b, SplitButton as v, Text as y, Caption2 as k, Image as C, MenuPopover as L, MenuList as R, MenuItem as m } from "@fluentui/react-components";
|
|
3
3
|
import { ArrowDownload20Regular as U, Dismiss20Regular as N } from "@fluentui/react-icons";
|
|
4
|
-
import { formatFileSize as j, getFileIconUrl as W } from "
|
|
4
|
+
import { formatFileSize as j, getFileIconUrl as W } from "../../commons/utils.js";
|
|
5
5
|
const I = w({
|
|
6
6
|
text: {
|
|
7
7
|
overflow: "hidden",
|
package/dist/react-components/fields/{EFWAttachmentsField → Attachments}/EFWAttachmentsField.js
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { EFWField as A } from "../EFWField/EFWField.js";
|
|
3
|
-
import { EFWAttachment as E } from "
|
|
2
|
+
import { EFWField as A } from "../_shared/EFWField/EFWField.js";
|
|
3
|
+
import { EFWAttachment as E } from "./EFWAttachments.js";
|
|
4
4
|
const j = (a) => {
|
|
5
5
|
const {
|
|
6
6
|
title: n,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EFWFieldProps } from '../EFWField/EFWField.types';
|
|
2
|
-
import { EFWAttachmentsProps, EFWAttachmentsValue, EFWAttachmentsOnChange } from '
|
|
1
|
+
import { EFWFieldProps } from '../_shared/EFWField/EFWField.types';
|
|
2
|
+
import { EFWAttachmentsProps, EFWAttachmentsValue, EFWAttachmentsOnChange } from './EFWAttachments.types';
|
|
3
3
|
|
|
4
4
|
export type EFWAttachmentsFieldValue = EFWAttachmentsValue;
|
|
5
5
|
export type EFWAttachmentsFieldOnChange = EFWAttachmentsOnChange;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { EFWAttachment } from './EFWAttachments';
|
|
2
|
+
export { getAttachmentsFormattedValue } from './EFWAttachments.utils';
|
|
3
|
+
export type { EFWAttachmentsProps, EFWAttachmentsValue, EFWAttachmentsOnChange } from './EFWAttachments.types';
|
|
4
|
+
export { EFWAttachmentsField } from './EFWAttachmentsField';
|
|
5
|
+
export type { EFWAttachmentsFieldProps, EFWAttachmentsFieldValue, EFWAttachmentsFieldOnChange } from './EFWAttachmentsField.types';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EFWAttachment as m } from "./EFWAttachments.js";
|
|
2
|
+
import { getAttachmentsFormattedValue as r } from "./EFWAttachments.utils.js";
|
|
3
|
+
import { EFWAttachmentsField as F } from "./EFWAttachmentsField.js";
|
|
4
|
+
export {
|
|
5
|
+
m as EFWAttachment,
|
|
6
|
+
F as EFWAttachmentsField,
|
|
7
|
+
r as getAttachmentsFormattedValue
|
|
8
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as g, Fragment as H } from "react/jsx-runtime";
|
|
2
2
|
import { makeStyles as J, tokens as l, mergeClasses as K, Text as O } from "@fluentui/react-components";
|
|
3
|
-
import { useId as Q, useMemo as
|
|
3
|
+
import { useId as Q, useMemo as F, useState as X, useRef as M, useCallback as h, useEffect as Z } from "react";
|
|
4
4
|
import { DatePicker as ee } from "@fluentui/react-datepicker-compat";
|
|
5
|
-
import { mapToValidDates as D, esLocalizedStrings as x } from "./EFWDatePicker.utils.js";
|
|
6
|
-
const p = [],
|
|
5
|
+
import { mapToValidDates as D, esLocalizedStrings as x, getDatePickerFormattedValue as te } from "./EFWDatePicker.utils.js";
|
|
6
|
+
const p = [], oe = J({
|
|
7
7
|
efwDatePickerControl: {
|
|
8
8
|
"& [disabled]": {
|
|
9
9
|
backgroundColor: l.colorNeutralBackground3,
|
|
@@ -25,13 +25,13 @@ const p = [], te = J({
|
|
|
25
25
|
borderBottomWidth: "2px"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
}),
|
|
28
|
+
}), ce = (C) => {
|
|
29
29
|
const {
|
|
30
30
|
editable: T = !0,
|
|
31
|
-
disabled:
|
|
32
|
-
placeholder:
|
|
33
|
-
className:
|
|
34
|
-
selectedDates:
|
|
31
|
+
disabled: V = !1,
|
|
32
|
+
placeholder: Y = "DD/MM/YYYY",
|
|
33
|
+
className: B = "",
|
|
34
|
+
selectedDates: k = p,
|
|
35
35
|
defaultSelectedDates: u = p,
|
|
36
36
|
allowTextInput: $ = !0,
|
|
37
37
|
localizedStrings: w = x,
|
|
@@ -40,41 +40,41 @@ const p = [], te = J({
|
|
|
40
40
|
showGoToToday: N = !0,
|
|
41
41
|
showCloseButton: R = !0,
|
|
42
42
|
restrictedDates: v = p,
|
|
43
|
-
friendlyDateFormat:
|
|
43
|
+
friendlyDateFormat: S = !1,
|
|
44
44
|
onSelectDate: s,
|
|
45
45
|
onChange: d,
|
|
46
46
|
validationState: z = "none",
|
|
47
47
|
setParentComponentState: m
|
|
48
|
-
} = C, P = Q(), b =
|
|
48
|
+
} = C, P = Q(), b = oe(), r = C.selectedDates !== void 0, A = F(() => D(k ?? []), [k]), y = F(() => D(u), [u]), [W, f] = X(() => D(u)), t = r ? A : W, j = M(null), G = M(null), L = h((o) => {
|
|
49
49
|
if (!o) return "";
|
|
50
|
-
const a = o.getDate(),
|
|
51
|
-
if (
|
|
52
|
-
return `${x.months[
|
|
50
|
+
const a = o.getDate(), e = o.getMonth(), c = o.getFullYear();
|
|
51
|
+
if (S)
|
|
52
|
+
return `${x.months[e]} ${a}, ${c}`;
|
|
53
53
|
{
|
|
54
|
-
const i = a < 10 ? `0${a}` : a,
|
|
55
|
-
return `${i}/${
|
|
54
|
+
const i = a < 10 ? `0${a}` : a, n = e + 1 < 10 ? `0${e + 1}` : e + 1;
|
|
55
|
+
return `${i}/${n}/${c}`;
|
|
56
56
|
}
|
|
57
|
-
}, [
|
|
58
|
-
const a =
|
|
59
|
-
let
|
|
60
|
-
return
|
|
61
|
-
}, [
|
|
57
|
+
}, [S]), U = h((o) => {
|
|
58
|
+
const a = t.length && t[0] instanceof Date ? t[0] : /* @__PURE__ */ new Date(), e = (o || "").trim().split("/"), c = e.length > 0 ? Math.max(1, Math.min(31, parseInt(e[0], 10))) : a.getDate(), i = e.length > 1 ? Math.max(1, Math.min(12, parseInt(e[1], 10))) - 1 : a.getMonth();
|
|
59
|
+
let n = e.length > 2 ? parseInt(e[2], 10) : a.getFullYear();
|
|
60
|
+
return n < 100 && (n += a.getFullYear() - a.getFullYear() % 100), new Date(n, i, c);
|
|
61
|
+
}, [t]), _ = h((o) => {
|
|
62
62
|
if (!(o instanceof Date)) {
|
|
63
|
-
!
|
|
63
|
+
!r && t.length > 0 && f([]), s?.(null), d?.([]), m?.("none", "");
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
|
-
if (
|
|
66
|
+
if (t.length > 0 && t[0] instanceof Date ? t[0].getTime() === o.getTime() : !1) {
|
|
67
67
|
s?.(o);
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
}, [
|
|
70
|
+
const e = [o];
|
|
71
|
+
r || f(e), s?.(o), d?.(e), m?.("none", "");
|
|
72
|
+
}, [t, r, s, d, m]);
|
|
73
73
|
Z(() => {
|
|
74
|
-
|
|
75
|
-
}, [
|
|
74
|
+
r || f(y);
|
|
75
|
+
}, [r, y]);
|
|
76
76
|
const q = K(
|
|
77
|
-
|
|
77
|
+
B,
|
|
78
78
|
b.efwDatePickerControl,
|
|
79
79
|
z === "error" && b.efwDatePickerControlError
|
|
80
80
|
);
|
|
@@ -82,12 +82,12 @@ const p = [], te = J({
|
|
|
82
82
|
ee,
|
|
83
83
|
{
|
|
84
84
|
calendar: {
|
|
85
|
-
componentRef:
|
|
85
|
+
componentRef: G,
|
|
86
86
|
restrictedDates: v
|
|
87
87
|
},
|
|
88
88
|
strings: w,
|
|
89
89
|
className: q,
|
|
90
|
-
ref:
|
|
90
|
+
ref: j,
|
|
91
91
|
id: P,
|
|
92
92
|
name: P,
|
|
93
93
|
autoComplete: "off",
|
|
@@ -96,19 +96,19 @@ const p = [], te = J({
|
|
|
96
96
|
spellCheck: "false",
|
|
97
97
|
allowTextInput: $,
|
|
98
98
|
disableAutoFocus: !0,
|
|
99
|
-
value:
|
|
99
|
+
value: t.length > 0 ? t[0] : null,
|
|
100
100
|
minDate: E,
|
|
101
101
|
maxDate: I,
|
|
102
|
-
disabled:
|
|
102
|
+
disabled: V,
|
|
103
103
|
onSelectDate: _,
|
|
104
|
-
formatDate:
|
|
104
|
+
formatDate: L,
|
|
105
105
|
parseDateFromString: U,
|
|
106
|
-
placeholder:
|
|
106
|
+
placeholder: Y,
|
|
107
107
|
showGoToToday: N,
|
|
108
108
|
showCloseButton: R
|
|
109
109
|
}
|
|
110
|
-
) : /* @__PURE__ */ g(O, { style:
|
|
110
|
+
) : /* @__PURE__ */ g(O, { style: t.length ? void 0 : { opacity: 0.7 }, children: te(t[0]) || "Sin datos disponibles" }) });
|
|
111
111
|
};
|
|
112
112
|
export {
|
|
113
|
-
|
|
113
|
+
ce as EFWDatePicker
|
|
114
114
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EFWFieldChildrenProps } from '../EFWField/EFWField.types';
|
|
1
|
+
import { EFWFieldChildrenProps } from '../_shared/EFWField/EFWField.types';
|
|
2
2
|
import { DatePickerProps, CalendarStrings } from '@fluentui/react-datepicker-compat';
|
|
3
3
|
|
|
4
4
|
export type EFWDatePickerValue = (Date | string);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CalendarStrings } from '@fluentui/react-datepicker-compat';
|
|
2
|
+
import { EFWDatePickerValue } from './EFWDatePicker.types';
|
|
2
3
|
|
|
3
4
|
declare const esLocalizedStrings: CalendarStrings;
|
|
4
5
|
/**
|
|
@@ -21,4 +22,12 @@ declare const normalizeToDate: (value: Date | string | null | undefined) => Date
|
|
|
21
22
|
declare const arraysAreEqual: (arr1: (Date | string)[], arr2: (Date | string)[]) => boolean;
|
|
22
23
|
export declare const mapToValidDates: (arr?: unknown[]) => Date[];
|
|
23
24
|
export declare const isValidDate: (date: Date) => boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Retorna el valor formateado que EFWDatePicker muestra cuando no está en modo editable.
|
|
27
|
+
* Soporta opcionalmente la inclusión de hora.
|
|
28
|
+
*/
|
|
29
|
+
export declare const getDatePickerFormattedValue: (value: EFWDatePickerValue | null | undefined, options?: {
|
|
30
|
+
includeTime?: boolean;
|
|
31
|
+
timeValue?: string;
|
|
32
|
+
}) => string;
|
|
24
33
|
export { esLocalizedStrings, esOnFormatDate, normalizeToDate, arraysAreEqual };
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { defaultDatePickerStrings as l } from "@fluentui/react-datepicker-compat";
|
|
2
|
+
const c = {
|
|
3
|
+
...l,
|
|
4
|
+
days: [
|
|
5
|
+
"Domingo",
|
|
6
|
+
"Lunes",
|
|
7
|
+
"Martes",
|
|
8
|
+
"Miercoles",
|
|
9
|
+
"Jueves",
|
|
10
|
+
"Viernes",
|
|
11
|
+
"Sabado"
|
|
12
|
+
],
|
|
13
|
+
shortDays: ["D", "L", "M", "M", "J", "V", "S"],
|
|
14
|
+
months: [
|
|
15
|
+
"Enero",
|
|
16
|
+
"Febrero",
|
|
17
|
+
"Marzo",
|
|
18
|
+
"Abril",
|
|
19
|
+
"Mayo",
|
|
20
|
+
"Junio",
|
|
21
|
+
"Julio",
|
|
22
|
+
"Agosto",
|
|
23
|
+
"Septiembre",
|
|
24
|
+
"Octubre",
|
|
25
|
+
"Noviembre",
|
|
26
|
+
"Diciembre"
|
|
27
|
+
],
|
|
28
|
+
shortMonths: [
|
|
29
|
+
"Ene",
|
|
30
|
+
"Feb",
|
|
31
|
+
"Mar",
|
|
32
|
+
"Abr",
|
|
33
|
+
"May",
|
|
34
|
+
"Jun",
|
|
35
|
+
"Jul",
|
|
36
|
+
"Ago",
|
|
37
|
+
"Sep",
|
|
38
|
+
"Oct",
|
|
39
|
+
"Nov",
|
|
40
|
+
"Dic"
|
|
41
|
+
],
|
|
42
|
+
goToToday: "Ir a hoy"
|
|
43
|
+
}, f = (t, e = !1) => {
|
|
44
|
+
if (!t) return "";
|
|
45
|
+
const n = t.getDate(), r = t.getMonth(), o = t.getFullYear();
|
|
46
|
+
if (e)
|
|
47
|
+
return `${c.months[r]} ${n}, ${o}`;
|
|
48
|
+
{
|
|
49
|
+
const s = n < 10 ? `0${n}` : n, u = r + 1 < 10 ? `0${r + 1}` : r + 1;
|
|
50
|
+
return `${s}/${u}/${o}`;
|
|
51
|
+
}
|
|
52
|
+
}, a = (t) => {
|
|
53
|
+
if (t instanceof Date) return t;
|
|
54
|
+
if (typeof t == "string")
|
|
55
|
+
try {
|
|
56
|
+
const e = new Date(t);
|
|
57
|
+
return isNaN(e.getTime()) ? null : e;
|
|
58
|
+
} catch {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
return null;
|
|
62
|
+
}, m = (t, e) => {
|
|
63
|
+
if (t.length !== e.length) return !1;
|
|
64
|
+
for (let n = 0; n < t.length; n++) {
|
|
65
|
+
const r = a(t[n]), o = a(e[n]);
|
|
66
|
+
if (!(r === null && o === null) && (r === null || o === null || r.getTime() !== o.getTime()))
|
|
67
|
+
return !1;
|
|
68
|
+
}
|
|
69
|
+
return !0;
|
|
70
|
+
}, D = (t = []) => t.map((e) => {
|
|
71
|
+
if (e instanceof Date)
|
|
72
|
+
return i(e) ? e : null;
|
|
73
|
+
if (typeof e == "string") {
|
|
74
|
+
const n = new Date(e);
|
|
75
|
+
return i(n) ? n : null;
|
|
76
|
+
}
|
|
77
|
+
if (typeof e == "number") {
|
|
78
|
+
const n = new Date(e);
|
|
79
|
+
return i(n) ? n : null;
|
|
80
|
+
}
|
|
81
|
+
return null;
|
|
82
|
+
}).filter((e) => e !== null), i = (t) => t instanceof Date && !isNaN(t.getTime()), h = (t, e) => {
|
|
83
|
+
if (!t) return "";
|
|
84
|
+
const n = a(t);
|
|
85
|
+
if (!n) return "";
|
|
86
|
+
let r = f(n);
|
|
87
|
+
if (e?.includeTime) {
|
|
88
|
+
const o = e.timeValue, s = o && o.length === 4 ? `${o.substring(0, 2)}:${o.substring(2, 4)}` : "00:00";
|
|
89
|
+
r += ` ${s}`;
|
|
90
|
+
}
|
|
91
|
+
return r;
|
|
92
|
+
};
|
|
93
|
+
export {
|
|
94
|
+
m as arraysAreEqual,
|
|
95
|
+
c as esLocalizedStrings,
|
|
96
|
+
f as esOnFormatDate,
|
|
97
|
+
h as getDatePickerFormattedValue,
|
|
98
|
+
i as isValidDate,
|
|
99
|
+
D as mapToValidDates,
|
|
100
|
+
a as normalizeToDate
|
|
101
|
+
};
|