@pareto-engineering/design-system 5.12.6 → 5.12.7
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/{FormBuilder-CaHio0TV.js → FormBuilder-BeA-ypKe.js} +5451 -5454
- package/dist/assets/DragAndDrop.css +1 -1
- package/dist/index.js +1 -1
- package/dist/stories/a/AppContext.stories.js +1 -1
- package/dist/stories/a/AreaChart.stories.js +1 -1
- package/dist/stories/a/BarChart.stories.js +1 -1
- package/dist/stories/a/BlurOverlay.stories.js +1 -1
- package/dist/stories/a/ContentTree.stories.js +1 -1
- package/dist/stories/a/Conversation.stories.js +1 -1
- package/dist/stories/a/DatePicker.stories.js +1 -1
- package/dist/stories/a/DotInfo.stories.js +1 -1
- package/dist/stories/a/Figure.stories.js +1 -1
- package/dist/stories/a/HamburgerButton.stories.js +1 -1
- package/dist/stories/a/IconList.stories.js +1 -1
- package/dist/stories/a/Label.stories.js +1 -1
- package/dist/stories/a/LoadingCircle.stories.js +1 -1
- package/dist/stories/a/MetaCard.stories.js +1 -1
- package/dist/stories/a/Notification.stories.js +1 -1
- package/dist/stories/a/NotificationStack.stories.js +1 -1
- package/dist/stories/a/People.stories.js +1 -1
- package/dist/stories/a/PieChart.stories.js +1 -1
- package/dist/stories/a/Popover.stories.js +1 -1
- package/dist/stories/a/ProgressBar.stories.js +1 -1
- package/dist/stories/a/Quote.stories.js +1 -1
- package/dist/stories/a/Removable.stories.js +1 -1
- package/dist/stories/a/SVG.stories.js +1 -1
- package/dist/stories/a/SnapScroller.stories.js +1 -1
- package/dist/stories/a/Spinner.stories.js +1 -1
- package/dist/stories/a/TextSteps.stories.js +1 -1
- package/dist/stories/a/Timestamp.stories.js +1 -1
- package/dist/stories/a/Tip.stories.js +1 -1
- package/dist/stories/a/ToggleSwitch.stories.js +1 -1
- package/dist/stories/a/Tooltip.stories.js +1 -1
- package/dist/stories/a/XMLEditor.stories.js +1 -1
- package/dist/stories/b/Button/Button.stories.js +1 -1
- package/dist/stories/b/Button/Group.stories.js +1 -1
- package/dist/stories/b/Card/Card.stories.js +1 -1
- package/dist/stories/b/Card/Group.stories.js +1 -1
- package/dist/stories/b/Logo.stories.js +1 -1
- package/dist/stories/b/Page.stories.js +1 -1
- package/dist/stories/b/SocialMediaButton.stories.js +1 -1
- package/dist/stories/b/ThemeSelector.stories.js +1 -1
- package/dist/stories/b/Title.stories.js +1 -1
- package/dist/stories/c/Modal.stories.js +1 -1
- package/dist/stories/c/Shortener.stories.js +1 -1
- package/dist/stories/c/SocialMediaShareButton.stories.js +1 -1
- package/dist/stories/f/Checkbox.stories.js +1 -1
- package/dist/stories/f/ChoicesInput.stories.js +1 -1
- package/dist/stories/f/Combobox.stories.js +1 -1
- package/dist/stories/f/Description.stories.js +1 -1
- package/dist/stories/f/DragAndDropFileUpload.stories.js +1 -1
- package/dist/stories/f/EditorInput.stories.js +1 -1
- package/dist/stories/f/FileUpload.stories.js +1 -1
- package/dist/stories/f/Label.stories.js +1 -1
- package/dist/stories/f/LinkInput.stories.js +1 -1
- package/dist/stories/f/RadioInput.stories.js +1 -1
- package/dist/stories/f/RatingsInput.stories.js +1 -1
- package/dist/stories/f/SelectInput.stories.js +1 -1
- package/dist/stories/f/TextInput.stories.js +1 -1
- package/dist/stories/f/TextareaInput.stories.js +1 -1
- package/dist/stories/g/DragAndDrop.stories.js +131 -40
- package/dist/stories/g/ExpandableLexicalPreview.stories.js +1 -1
- package/dist/stories/g/FormBuilder.stories.js +1 -1
- package/dist/ui/a/AnimatedGradient/AnimatedGradient.js +1 -1
- package/dist/ui/a/AnimatedGradient/index.js +1 -1
- package/dist/ui/a/ContentTree/ContentTree.js +1 -1
- package/dist/ui/a/ContentTree/common/Tree/Tree.js +1 -1
- package/dist/ui/a/ContentTree/common/Tree/index.js +1 -1
- package/dist/ui/a/ContentTree/common/index.js +1 -1
- package/dist/ui/a/ContentTree/index.js +1 -1
- package/dist/ui/a/Conversation/Conversation.js +1 -1
- package/dist/ui/a/Conversation/index.js +1 -1
- package/dist/ui/a/Notification/Notification.js +1 -1
- package/dist/ui/a/Notification/index.js +1 -1
- package/dist/ui/a/NotificationStack/NotificationStack.js +1 -1
- package/dist/ui/a/NotificationStack/index.js +1 -1
- package/dist/ui/a/index.js +1 -1
- package/dist/ui/b/Button/Button.js +1 -1
- package/dist/ui/b/Button/index.js +1 -1
- package/dist/ui/b/Card/Card.js +1 -1
- package/dist/ui/b/Card/common/Group/Group.js +1 -1
- package/dist/ui/b/Card/common/Group/index.js +1 -1
- package/dist/ui/b/Card/common/index.js +1 -1
- package/dist/ui/b/Card/index.js +1 -1
- package/dist/ui/b/Logo/Logo.js +1 -1
- package/dist/ui/b/Logo/index.js +1 -1
- package/dist/ui/b/Page/Page.js +1 -1
- package/dist/ui/b/Page/common/PageHelmet/PageHelmet.js +1 -1
- package/dist/ui/b/Page/common/PageHelmet/index.js +1 -1
- package/dist/ui/b/Page/common/index.js +1 -1
- package/dist/ui/b/Page/index.js +1 -1
- package/dist/ui/b/SocialMediaButton/SocialMediaButton.js +1 -1
- package/dist/ui/b/SocialMediaButton/index.js +1 -1
- package/dist/ui/b/ThemeSelector/ThemeSelector.js +1 -1
- package/dist/ui/b/ThemeSelector/index.js +1 -1
- package/dist/ui/b/index.js +1 -1
- package/dist/ui/c/Modal/Modal.js +1 -1
- package/dist/ui/c/Modal/common/ModalHeader/ModalHeader.js +1 -1
- package/dist/ui/c/Modal/common/ModalHeader/index.js +1 -1
- package/dist/ui/c/Modal/common/index.js +1 -1
- package/dist/ui/c/Modal/index.js +1 -1
- package/dist/ui/c/Shortener/Shortener.js +1 -1
- package/dist/ui/c/Shortener/index.js +1 -1
- package/dist/ui/c/index.js +1 -1
- package/dist/ui/f/FormInput/FormInput.js +1 -1
- package/dist/ui/f/FormInput/index.js +1 -1
- package/dist/ui/f/common/Debugger/Debugger.js +1 -1
- package/dist/ui/f/common/Debugger/index.js +1 -1
- package/dist/ui/f/common/index.js +1 -1
- package/dist/ui/f/fields/Checkbox/Checkbox.js +1 -1
- package/dist/ui/f/fields/Checkbox/index.js +1 -1
- package/dist/ui/f/fields/ChoicesInput/ChoicesInput.js +1 -1
- package/dist/ui/f/fields/ChoicesInput/index.js +1 -1
- package/dist/ui/f/fields/DragAndDropFileUpload/DragAndDropFileUpload.js +1 -1
- package/dist/ui/f/fields/DragAndDropFileUpload/index.js +1 -1
- package/dist/ui/f/fields/EditorInput/EditorInput.js +1 -1
- package/dist/ui/f/fields/EditorInput/common/BlockFormatDropDown/BlockFormatDropDown.js +1 -1
- package/dist/ui/f/fields/EditorInput/common/BlockFormatDropDown/index.js +1 -1
- package/dist/ui/f/fields/EditorInput/common/ColorPicker/ColorPicker.js +1 -1
- package/dist/ui/f/fields/EditorInput/common/ColorPicker/index.js +1 -1
- package/dist/ui/f/fields/EditorInput/common/FontSizeDropDown/FontSizeDropDown.js +1 -1
- package/dist/ui/f/fields/EditorInput/common/FontSizeDropDown/index.js +1 -1
- package/dist/ui/f/fields/EditorInput/common/ToolbarPlugin/ToolbarPlugin.js +1 -1
- package/dist/ui/f/fields/EditorInput/common/ToolbarPlugin/index.js +1 -1
- package/dist/ui/f/fields/EditorInput/common/index.js +1 -1
- package/dist/ui/f/fields/EditorInput/index.js +1 -1
- package/dist/ui/f/fields/FileUpload/FileUpload.js +1 -1
- package/dist/ui/f/fields/FileUpload/common/Preview/Preview.js +1 -1
- package/dist/ui/f/fields/FileUpload/common/Preview/index.js +1 -1
- package/dist/ui/f/fields/FileUpload/common/PreviewNewRegistration/PreviewNewRegistration.js +1 -1
- package/dist/ui/f/fields/FileUpload/common/PreviewNewRegistration/index.js +1 -1
- package/dist/ui/f/fields/FileUpload/common/index.js +1 -1
- package/dist/ui/f/fields/FileUpload/index.js +1 -1
- package/dist/ui/f/fields/LatexPreviewInput/LatexPreviewInput.js +1 -1
- package/dist/ui/f/fields/LatexPreviewInput/index.js +1 -1
- package/dist/ui/f/fields/LinkInput/LinkInput.js +1 -1
- package/dist/ui/f/fields/LinkInput/index.js +1 -1
- package/dist/ui/f/fields/PasswordInput/PasswordInput.js +1 -1
- package/dist/ui/f/fields/PasswordInput/index.js +1 -1
- package/dist/ui/f/fields/QueryChoices/QueryChoices.js +1 -1
- package/dist/ui/f/fields/QueryChoices/index.js +1 -1
- package/dist/ui/f/fields/QueryCombobox/QueryCombobox.js +1 -1
- package/dist/ui/f/fields/QueryCombobox/common/Combobox/Combobox.js +1 -1
- package/dist/ui/f/fields/QueryCombobox/common/Combobox/index.js +1 -1
- package/dist/ui/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +1 -1
- package/dist/ui/f/fields/QueryCombobox/common/MultipleCombobox/index.js +1 -1
- package/dist/ui/f/fields/QueryCombobox/common/index.js +1 -1
- package/dist/ui/f/fields/QueryCombobox/index.js +1 -1
- package/dist/ui/f/fields/QuerySelect/QuerySelect.js +1 -1
- package/dist/ui/f/fields/QuerySelect/index.js +1 -1
- package/dist/ui/f/fields/RatingsInput/RatingsInput.js +1 -1
- package/dist/ui/f/fields/RatingsInput/index.js +1 -1
- package/dist/ui/f/fields/SearchDropdown/SearchDropdown.js +1 -1
- package/dist/ui/f/fields/SearchDropdown/index.js +1 -1
- package/dist/ui/f/fields/SelectInput/SelectInput.js +1 -1
- package/dist/ui/f/fields/SelectInput/common/Menu/Menu.js +1 -1
- package/dist/ui/f/fields/SelectInput/common/Menu/index.js +1 -1
- package/dist/ui/f/fields/SelectInput/common/Multiple/Multiple.js +1 -1
- package/dist/ui/f/fields/SelectInput/common/Multiple/index.js +1 -1
- package/dist/ui/f/fields/SelectInput/common/Single/Single.js +1 -1
- package/dist/ui/f/fields/SelectInput/common/Single/index.js +1 -1
- package/dist/ui/f/fields/SelectInput/common/index.js +1 -1
- package/dist/ui/f/fields/SelectInput/index.js +1 -1
- package/dist/ui/f/fields/SelectSingle/SelectSingle.js +1 -1
- package/dist/ui/f/fields/TextInput/TextInput.js +1 -1
- package/dist/ui/f/fields/TextInput/index.js +1 -1
- package/dist/ui/f/fields/TextareaInput/TextareaInput.js +1 -1
- package/dist/ui/f/fields/TextareaInput/index.js +1 -1
- package/dist/ui/f/fields/ToggleInput/ToggleInput.js +1 -1
- package/dist/ui/f/fields/ToggleInput/index.js +1 -1
- package/dist/ui/f/fields/index.js +1 -1
- package/dist/ui/f/index.js +1 -1
- package/dist/ui/g/DragAndDrop/DragAndDrop.js +65 -87
- package/dist/ui/g/DragAndDrop/common/DraggableItem/DraggableItem.js +29 -53
- package/dist/ui/g/DragAndDrop/common/MultiSectionDragAndDrop/MultiSectionDragAndDrop.js +54 -0
- package/dist/ui/g/DragAndDrop/common/MultiSectionDragAndDrop/index.js +4 -0
- package/dist/ui/g/DragAndDrop/common/SingleListDragAndDrop/SingleListDragAndDrop.js +55 -0
- package/dist/ui/g/DragAndDrop/common/SingleListDragAndDrop/index.js +4 -0
- package/dist/ui/g/DragAndDrop/common/index.js +6 -2
- package/dist/ui/g/DragAndDrop/common/useMultiSectionDragAndDrop.js +36 -0
- package/dist/ui/g/DragAndDrop/types.js +1 -0
- package/dist/ui/g/ExpandableLexicalPreview/ExpandableLexicalPreview.js +1 -1
- package/dist/ui/g/ExpandableLexicalPreview/common/NewWindowPortal/NewWindowPortal.js +1 -1
- package/dist/ui/g/ExpandableLexicalPreview/common/NewWindowPortal/index.js +1 -1
- package/dist/ui/g/ExpandableLexicalPreview/common/index.js +1 -1
- package/dist/ui/g/ExpandableLexicalPreview/index.js +1 -1
- package/dist/ui/g/FormBuilder/FormBuilder.js +1 -1
- package/dist/ui/g/FormBuilder/common/Builder/Builder.js +1 -1
- package/dist/ui/g/FormBuilder/common/Builder/common/ActionsContainer/ActionsContainer.js +1 -1
- package/dist/ui/g/FormBuilder/common/Builder/common/ActionsContainer/index.js +1 -1
- package/dist/ui/g/FormBuilder/common/Builder/common/AutoQASection/AutoQASection.js +1 -1
- package/dist/ui/g/FormBuilder/common/Builder/common/AutoQASection/index.js +1 -1
- package/dist/ui/g/FormBuilder/common/Builder/common/InputBuilder/InputBuilder.js +1 -1
- package/dist/ui/g/FormBuilder/common/Builder/common/InputBuilder/index.js +1 -1
- package/dist/ui/g/FormBuilder/common/Builder/common/Section/Section.js +1 -1
- package/dist/ui/g/FormBuilder/common/Builder/common/Section/index.js +1 -1
- package/dist/ui/g/FormBuilder/common/Builder/common/index.js +1 -1
- package/dist/ui/g/FormBuilder/common/Builder/index.js +1 -1
- package/dist/ui/g/FormBuilder/common/Renderer/Renderer.js +1 -1
- package/dist/ui/g/FormBuilder/common/Renderer/common/Section/Section.js +1 -1
- package/dist/ui/g/FormBuilder/common/Renderer/common/Section/index.js +1 -1
- package/dist/ui/g/FormBuilder/common/Renderer/common/index.js +1 -1
- package/dist/ui/g/FormBuilder/common/Renderer/index.js +1 -1
- package/dist/ui/g/FormBuilder/common/index.js +1 -1
- package/dist/ui/g/FormBuilder/index.js +1 -1
- package/dist/ui/g/index.js +1 -1
- package/dist/ui/index.js +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as t, g as o, q as s, E as p, n as r, m as l, l as n, r as u, k as i, Q as d, i as x, R as I, p as f, f as m, e as c, h as g, o as T } from "../../../FormBuilder-
|
|
1
|
+
import { j as t, g as o, q as s, E as p, n as r, m as l, l as n, r as u, k as i, Q as d, i as x, R as I, p as f, f as m, e as c, h as g, o as T } from "../../../FormBuilder-BeA-ypKe.js";
|
|
2
2
|
import { default as y } from "./SelectSingle/SelectSingle.js";
|
|
3
3
|
import { default as S } from "./LatexPreviewInput/convertLatexToHtml.js";
|
|
4
4
|
import { fileUploadOptions as Q, getFileType as U, getFileTypeFromUrl as b } from "./FileUpload/utils.js";
|
package/dist/ui/f/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as a } from "./common/Label/Label.js";
|
|
2
2
|
import { default as r } from "./common/Description/Description.js";
|
|
3
3
|
import { default as s } from "./common/CharacterCount/CharacterCount.js";
|
|
4
|
-
import { j as l, g as u, q as i, E as m, n as f, D as x, F as d, m as I, l as g, r as F, k as c, Q as h, i as T, R as C, p as D, f as b, e as y, h as S, o as U } from "../../FormBuilder-
|
|
4
|
+
import { j as l, g as u, q as i, E as m, n as f, D as x, F as d, m as I, l as g, r as F, k as c, Q as h, i as T, R as C, p as D, f as b, e as y, h as S, o as U } from "../../FormBuilder-BeA-ypKe.js";
|
|
5
5
|
import { lookUpInputValueFromOptions as L } from "./common/utils/lookUpInputValueFromOptions.js";
|
|
6
6
|
import { integerAndGreaterThanZero as w } from "./common/utils/validators.js";
|
|
7
7
|
import { default as v } from "./fields/SelectSingle/SelectSingle.js";
|
|
@@ -1,92 +1,70 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { P as
|
|
4
|
-
import
|
|
5
|
-
import f from "./common/
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
)
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { P as r } from "../../../index-CxkFVI6N.js";
|
|
4
|
+
import c from "./common/DraggableItem/DraggableItem.js";
|
|
5
|
+
import f from "./common/SingleListDragAndDrop/SingleListDragAndDrop.js";
|
|
6
|
+
import d from "./common/MultiSectionDragAndDrop/MultiSectionDragAndDrop.js";
|
|
7
|
+
import '../../../assets/DragAndDrop.css';const i = ({
|
|
8
|
+
id: t,
|
|
9
|
+
className: s,
|
|
10
|
+
style: a,
|
|
11
|
+
as: p,
|
|
12
|
+
onOrderChange: o,
|
|
13
|
+
items: l,
|
|
14
|
+
sections: e,
|
|
15
|
+
sectionTitleClassName: g
|
|
16
|
+
}) => Array.isArray(e) && e.length > 0 ? /* @__PURE__ */ n(
|
|
17
|
+
d,
|
|
18
|
+
{
|
|
19
|
+
id: t,
|
|
20
|
+
className: s,
|
|
21
|
+
style: a,
|
|
22
|
+
sections: e,
|
|
23
|
+
sectionTitleClassName: g,
|
|
24
|
+
onOrderChange: o
|
|
25
|
+
}
|
|
26
|
+
) : /* @__PURE__ */ n(
|
|
27
|
+
f,
|
|
28
|
+
{
|
|
29
|
+
id: t,
|
|
30
|
+
className: s,
|
|
31
|
+
style: a,
|
|
32
|
+
as: p,
|
|
33
|
+
items: l,
|
|
34
|
+
onOrderChange: o
|
|
35
|
+
}
|
|
36
|
+
), m = r.shape({
|
|
37
|
+
Content: r.elementType.isRequired,
|
|
38
|
+
identifier: r.string.isRequired,
|
|
39
|
+
disabled: r.bool,
|
|
40
|
+
as: r.string
|
|
41
|
+
}), u = r.shape({
|
|
42
|
+
id: r.string.isRequired,
|
|
43
|
+
title: r.string,
|
|
44
|
+
items: r.arrayOf(m).isRequired
|
|
45
|
+
});
|
|
46
|
+
i.propTypes = {
|
|
47
|
+
/** The HTML id for this element */
|
|
48
|
+
id: r.string,
|
|
49
|
+
/** The HTML class names for this element */
|
|
50
|
+
className: r.string,
|
|
51
|
+
/** The React-written, css properties for this element. */
|
|
52
|
+
style: r.objectOf(r.string),
|
|
53
|
+
/** The html element to use to display this component (single-list mode only). */
|
|
54
|
+
as: r.string,
|
|
55
|
+
/** The list of items to be dragged around (single-list mode). Use this OR sections, not both. */
|
|
56
|
+
items: r.arrayOf(m),
|
|
57
|
+
/** Array of sections for multi-section drag and drop mode. Use this OR items, not both. */
|
|
58
|
+
sections: r.arrayOf(u),
|
|
59
|
+
/** Custom class name for section titles (multi-section mode). */
|
|
60
|
+
sectionTitleClassName: r.string,
|
|
61
|
+
/** Callback when items are reordered. Receives items or sections array. */
|
|
62
|
+
onOrderChange: r.func
|
|
54
63
|
};
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* The HTML id for this element
|
|
58
|
-
*/
|
|
59
|
-
id: e.string,
|
|
60
|
-
/**
|
|
61
|
-
* The HTML class names for this element
|
|
62
|
-
*/
|
|
63
|
-
className: e.string,
|
|
64
|
-
/**
|
|
65
|
-
* The React-written, css properties for this element.
|
|
66
|
-
*/
|
|
67
|
-
style: e.objectOf(e.string),
|
|
68
|
-
/**
|
|
69
|
-
* The html element to use to display this component.
|
|
70
|
-
*/
|
|
71
|
-
as: e.string,
|
|
72
|
-
/**
|
|
73
|
-
* The list of items to be dragged around
|
|
74
|
-
*/
|
|
75
|
-
items: e.arrayOf(e.shape({
|
|
76
|
-
Content: e.elementType.isRequired,
|
|
77
|
-
identifier: e.string.isRequired,
|
|
78
|
-
disabled: e.bool,
|
|
79
|
-
as: e.string
|
|
80
|
-
})).isRequired,
|
|
81
|
-
/*
|
|
82
|
-
* A function to be called when the draggable items are re-ordered
|
|
83
|
-
*/
|
|
84
|
-
onOrderChange: e.func
|
|
85
|
-
};
|
|
86
|
-
m.defaultProps = {
|
|
64
|
+
i.defaultProps = {
|
|
87
65
|
as: "ul"
|
|
88
66
|
};
|
|
89
|
-
|
|
67
|
+
i.DraggableItem = c;
|
|
90
68
|
export {
|
|
91
|
-
|
|
69
|
+
i as default
|
|
92
70
|
};
|
|
@@ -1,75 +1,51 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import '../../../../../assets/DraggableItem.css';const C = y.base, P = "draggable-item", o = ({
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useState as b, useRef as h } from "react";
|
|
3
|
+
import { s as C } from "../../../../../exports.module-DmUnHWIJ.js";
|
|
4
|
+
import '../../../../../assets/DraggableItem.css';const T = C.base, j = "draggable-item", W = ({
|
|
6
5
|
id: l,
|
|
7
6
|
className: g,
|
|
8
|
-
style:
|
|
9
|
-
as: c,
|
|
10
|
-
Content:
|
|
11
|
-
index:
|
|
7
|
+
style: f,
|
|
8
|
+
as: c = "li",
|
|
9
|
+
Content: i,
|
|
10
|
+
index: e,
|
|
11
|
+
identifier: d,
|
|
12
|
+
sectionId: r,
|
|
12
13
|
disabled: m = !1,
|
|
13
14
|
...p
|
|
14
15
|
}) => {
|
|
15
|
-
const [
|
|
16
|
+
const [D, n] = b(!1), t = h(null), u = m ? {} : {
|
|
16
17
|
draggable: !0,
|
|
17
|
-
onDragStart: (
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
onDragStart: (a) => {
|
|
19
|
+
if (n(!0), a.dataTransfer.effectAllowed = "move", r ? a.dataTransfer.setData("application/json", JSON.stringify({
|
|
20
|
+
sectionId: r,
|
|
21
|
+
identifier: d,
|
|
22
|
+
index: e
|
|
23
|
+
})) : a.dataTransfer.setData("text/plain", String(e)), t.current) {
|
|
24
|
+
const s = t.current.getBoundingClientRect(), N = a.clientX - s.left, S = a.clientY - s.top;
|
|
25
|
+
a.dataTransfer.setDragImage(t.current, N, S);
|
|
21
26
|
}
|
|
22
27
|
},
|
|
23
28
|
onDragEnd: () => {
|
|
24
|
-
|
|
29
|
+
n(!1);
|
|
25
30
|
}
|
|
26
31
|
};
|
|
27
|
-
return /* @__PURE__ */
|
|
32
|
+
return /* @__PURE__ */ o(
|
|
28
33
|
c,
|
|
29
34
|
{
|
|
30
|
-
ref:
|
|
35
|
+
ref: t,
|
|
31
36
|
id: l,
|
|
32
37
|
className: [
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
T,
|
|
39
|
+
j,
|
|
35
40
|
g,
|
|
36
|
-
|
|
37
|
-
].filter((
|
|
38
|
-
style:
|
|
41
|
+
D && "dragging"
|
|
42
|
+
].filter((a) => a).join(" "),
|
|
43
|
+
style: f,
|
|
39
44
|
...p,
|
|
40
|
-
children: /* @__PURE__ */
|
|
45
|
+
children: /* @__PURE__ */ o(i, { ...u })
|
|
41
46
|
}
|
|
42
47
|
);
|
|
43
48
|
};
|
|
44
|
-
o.propTypes = {
|
|
45
|
-
/**
|
|
46
|
-
* The HTML id for this element
|
|
47
|
-
*/
|
|
48
|
-
id: t.string,
|
|
49
|
-
/**
|
|
50
|
-
* The HTML class names for this element
|
|
51
|
-
*/
|
|
52
|
-
className: t.string,
|
|
53
|
-
/**
|
|
54
|
-
* The React-written, css properties for this element.
|
|
55
|
-
*/
|
|
56
|
-
style: t.objectOf(t.string),
|
|
57
|
-
/**
|
|
58
|
-
* Component that receives dragHandleProps
|
|
59
|
-
*/
|
|
60
|
-
Content: t.elementType.isRequired,
|
|
61
|
-
/**
|
|
62
|
-
* The html element to use to display this component.
|
|
63
|
-
*/
|
|
64
|
-
as: t.string,
|
|
65
|
-
/**
|
|
66
|
-
* Whether dragging is disabled for this item
|
|
67
|
-
*/
|
|
68
|
-
disabled: t.bool
|
|
69
|
-
};
|
|
70
|
-
o.defaultProps = {
|
|
71
|
-
as: "li"
|
|
72
|
-
};
|
|
73
49
|
export {
|
|
74
|
-
|
|
50
|
+
W as default
|
|
75
51
|
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx as r, jsxs as N } from "react/jsx-runtime";
|
|
2
|
+
import { s as h } from "../../../../../exports.module-DmUnHWIJ.js";
|
|
3
|
+
import u from "../DraggableItem/DraggableItem.js";
|
|
4
|
+
import v from "../useMultiSectionDragAndDrop.js";
|
|
5
|
+
const b = h.base, j = "multi-section-drag-and-drop", A = ({
|
|
6
|
+
id: s,
|
|
7
|
+
className: i,
|
|
8
|
+
style: m,
|
|
9
|
+
sections: n,
|
|
10
|
+
sectionTitleClassName: d,
|
|
11
|
+
onOrderChange: p
|
|
12
|
+
}) => {
|
|
13
|
+
const {
|
|
14
|
+
sectionState: c,
|
|
15
|
+
handleDragOver: t,
|
|
16
|
+
handleDrop: o
|
|
17
|
+
} = v({ sections: n, onOrderChange: p });
|
|
18
|
+
return /* @__PURE__ */ r(
|
|
19
|
+
"div",
|
|
20
|
+
{
|
|
21
|
+
id: s,
|
|
22
|
+
className: [b, j, i].filter(Boolean).join(" "),
|
|
23
|
+
style: m,
|
|
24
|
+
children: c.map((a) => /* @__PURE__ */ N(
|
|
25
|
+
"div",
|
|
26
|
+
{
|
|
27
|
+
className: "droppable-section",
|
|
28
|
+
onDragOver: t,
|
|
29
|
+
onDrop: (e) => o(e, a.id),
|
|
30
|
+
children: [
|
|
31
|
+
a.title && (typeof a.title == "string" ? /* @__PURE__ */ r("p", { className: ["section-title", d].filter(Boolean).join(" "), children: a.title }) : a.title),
|
|
32
|
+
/* @__PURE__ */ r("div", { className: "section-items", children: a.items.map(({ identifier: e, disabled: D = !1, ...g }, l) => /* @__PURE__ */ r(
|
|
33
|
+
u,
|
|
34
|
+
{
|
|
35
|
+
disabled: D,
|
|
36
|
+
index: l,
|
|
37
|
+
identifier: e,
|
|
38
|
+
sectionId: a.id,
|
|
39
|
+
onDrop: (f) => o(f, a.id, l),
|
|
40
|
+
onDragOver: t,
|
|
41
|
+
...g
|
|
42
|
+
},
|
|
43
|
+
`${a.id}-${e}`
|
|
44
|
+
)) })
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
a.id
|
|
48
|
+
))
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
export {
|
|
53
|
+
A as default
|
|
54
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { useState as d, useEffect as N } from "react";
|
|
3
|
+
import { s as b } from "../../../../../exports.module-DmUnHWIJ.js";
|
|
4
|
+
import v from "../DraggableItem/DraggableItem.js";
|
|
5
|
+
const x = b.base, j = "single-list-drag-and-drop", L = ({
|
|
6
|
+
id: f,
|
|
7
|
+
className: g,
|
|
8
|
+
style: D,
|
|
9
|
+
as: u = "ul",
|
|
10
|
+
items: a,
|
|
11
|
+
onOrderChange: r
|
|
12
|
+
}) => {
|
|
13
|
+
const [m, n] = d(a), [I, p] = d(null);
|
|
14
|
+
N(() => {
|
|
15
|
+
n(a);
|
|
16
|
+
}, [a]);
|
|
17
|
+
const i = (t, o) => {
|
|
18
|
+
t.preventDefault();
|
|
19
|
+
const l = Number(t.dataTransfer.getData("text")), e = [...m], [s] = e.splice(l, 1);
|
|
20
|
+
e.splice(o, 0, s), n(e), r == null || r(e), p(null);
|
|
21
|
+
};
|
|
22
|
+
return /* @__PURE__ */ c(
|
|
23
|
+
u,
|
|
24
|
+
{
|
|
25
|
+
id: f,
|
|
26
|
+
className: [
|
|
27
|
+
x,
|
|
28
|
+
j,
|
|
29
|
+
g
|
|
30
|
+
].filter((t) => t).join(" "),
|
|
31
|
+
style: D,
|
|
32
|
+
children: m.map(({
|
|
33
|
+
identifier: t,
|
|
34
|
+
disabled: o = !1,
|
|
35
|
+
...l
|
|
36
|
+
}, e) => /* @__PURE__ */ c(
|
|
37
|
+
v,
|
|
38
|
+
{
|
|
39
|
+
className: I === e && "drag-over",
|
|
40
|
+
disabled: o,
|
|
41
|
+
onDrop: (s) => i(s, e),
|
|
42
|
+
onDragOver: (s) => {
|
|
43
|
+
s.preventDefault(), p(e);
|
|
44
|
+
},
|
|
45
|
+
index: e,
|
|
46
|
+
...l
|
|
47
|
+
},
|
|
48
|
+
t
|
|
49
|
+
))
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
};
|
|
53
|
+
export {
|
|
54
|
+
L as default
|
|
55
|
+
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { default as
|
|
1
|
+
import { default as e } from "./DraggableItem/DraggableItem.js";
|
|
2
|
+
import { default as o } from "./SingleListDragAndDrop/SingleListDragAndDrop.js";
|
|
3
|
+
import { default as l } from "./MultiSectionDragAndDrop/MultiSectionDragAndDrop.js";
|
|
2
4
|
export {
|
|
3
|
-
|
|
5
|
+
e as DraggableItem,
|
|
6
|
+
l as MultiSectionDragAndDrop,
|
|
7
|
+
o as SingleListDragAndDrop
|
|
4
8
|
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { useState as x, useEffect as I, useCallback as v } from "react";
|
|
2
|
+
const N = ({
|
|
3
|
+
sections: c,
|
|
4
|
+
onOrderChange: i
|
|
5
|
+
}) => {
|
|
6
|
+
const [n, l] = x(c || []);
|
|
7
|
+
I(() => {
|
|
8
|
+
l(c || []);
|
|
9
|
+
}, [c]);
|
|
10
|
+
const S = v((s) => {
|
|
11
|
+
s.preventDefault();
|
|
12
|
+
}, []), b = v((s, o, f) => {
|
|
13
|
+
if (s.preventDefault(), s.stopPropagation(), f === void 0 && s.target.closest(".draggable-item"))
|
|
14
|
+
return;
|
|
15
|
+
const u = s.dataTransfer.getData("application/json");
|
|
16
|
+
if (!u) return;
|
|
17
|
+
const { sectionId: r, index: m } = JSON.parse(u), e = n.find((t) => t.id === o), p = f ?? (e == null ? void 0 : e.items.length) ?? 0;
|
|
18
|
+
if (r === o && m === p || f === void 0 && r === o && e && m === e.items.length - 1)
|
|
19
|
+
return;
|
|
20
|
+
const a = n.map((t) => ({
|
|
21
|
+
...t,
|
|
22
|
+
items: [...t.items]
|
|
23
|
+
})), d = a.find((t) => t.id === r), D = a.find((t) => t.id === o);
|
|
24
|
+
if (!d || !D) return;
|
|
25
|
+
const [w] = d.items.splice(m, 1);
|
|
26
|
+
D.items.splice(p, 0, w), l(a), i == null || i(a);
|
|
27
|
+
}, [n, i]);
|
|
28
|
+
return {
|
|
29
|
+
sectionState: n,
|
|
30
|
+
handleDragOver: S,
|
|
31
|
+
handleDrop: b
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
N as default
|
|
36
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -6,7 +6,7 @@ import "../../../exports.module-DmUnHWIJ.js";
|
|
|
6
6
|
import "../../f/common/Label/Label.js";
|
|
7
7
|
import "../../f/common/Description/Description.js";
|
|
8
8
|
import "../../f/common/CharacterCount/CharacterCount.js";
|
|
9
|
-
import { s as V } from "../../../FormBuilder-
|
|
9
|
+
import { s as V } from "../../../FormBuilder-BeA-ypKe.js";
|
|
10
10
|
import "../../f/fields/QueryCombobox/common/Menu/Menu.js";
|
|
11
11
|
import "../../../debounce-Cm69Z_cF.js";
|
|
12
12
|
import "../../a/AppContext/Context.js";
|
|
@@ -6,7 +6,7 @@ import "../../../../a/AppContext/Context.js";
|
|
|
6
6
|
import "../../../../a/AppContext/ContextProvider.js";
|
|
7
7
|
import "../../../../a/AppContext/useTheme.js";
|
|
8
8
|
import "../../../../a/BlurOverlay/BlurOverlay.js";
|
|
9
|
-
import { H as N } from "../../../../../FormBuilder-
|
|
9
|
+
import { H as N } from "../../../../../FormBuilder-BeA-ypKe.js";
|
|
10
10
|
import "../../../../a/Conversation/Context.js";
|
|
11
11
|
import "../../../../a/DotInfo/DotInfo.js";
|
|
12
12
|
import "../../../../a/Figure/Figure.js";
|
|
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import "../../../../../../../index-CxkFVI6N.js";
|
|
4
4
|
import "../../../../../../../exports.module-DmUnHWIJ.js";
|
|
5
|
-
import { z as P } from "../../../../../../../FormBuilder-
|
|
5
|
+
import { z as P } from "../../../../../../../FormBuilder-BeA-ypKe.js";
|
|
6
6
|
import "../../../../../../../debounce-Cm69Z_cF.js";
|
|
7
7
|
import "../../../../../../../throttle-BCrS-Wew.js";
|
|
8
8
|
import "../../../../../../utils/hooks/useOutsideClick.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import { G as L } from "../../../../../../../FormBuilder-
|
|
2
|
+
import { G as L } from "../../../../../../../FormBuilder-BeA-ypKe.js";
|
|
3
3
|
import "../../../../../../a/AppContext/Context.js";
|
|
4
4
|
import "../../../../../../a/AppContext/ContextProvider.js";
|
|
5
5
|
import "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import { I as W } from "../../../../../../../FormBuilder-
|
|
2
|
+
import { I as W } from "../../../../../../../FormBuilder-BeA-ypKe.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../../../../../../f/common/Label/Label.js";
|
|
5
5
|
import "../../../../../../f/common/Description/Description.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import { x as W, y as X } from "../../../../../../../FormBuilder-
|
|
2
|
+
import { x as W, y as X } from "../../../../../../../FormBuilder-BeA-ypKe.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../../../../../../f/common/Label/Label.js";
|
|
5
5
|
import "../../../../../../f/common/Description/Description.js";
|
|
@@ -3,7 +3,7 @@ import "react";
|
|
|
3
3
|
import "formik";
|
|
4
4
|
import "../../../../../index-CxkFVI6N.js";
|
|
5
5
|
import "../../../../../exports.module-DmUnHWIJ.js";
|
|
6
|
-
import { v as d } from "../../../../../FormBuilder-
|
|
6
|
+
import { v as d } from "../../../../../FormBuilder-BeA-ypKe.js";
|
|
7
7
|
import "../../../../b/Page/Context.js";
|
|
8
8
|
import "../../../../b/Title/Title.js";
|
|
9
9
|
export {
|
|
@@ -6,7 +6,7 @@ import "../../../../../../f/common/Description/Description.js";
|
|
|
6
6
|
import "formik";
|
|
7
7
|
import "../../../../../../../exports.module-DmUnHWIJ.js";
|
|
8
8
|
import "../../../../../../f/common/CharacterCount/CharacterCount.js";
|
|
9
|
-
import { w as X } from "../../../../../../../FormBuilder-
|
|
9
|
+
import { w as X } from "../../../../../../../FormBuilder-BeA-ypKe.js";
|
|
10
10
|
import "../../../../../../f/fields/QueryCombobox/common/Menu/Menu.js";
|
|
11
11
|
import "../../../../../../../debounce-Cm69Z_cF.js";
|
|
12
12
|
import "../../../../../../a/AppContext/Context.js";
|