@headless-adminapp/fluent 0.0.17-alpha.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.
Files changed (244) hide show
  1. package/App/App.d.ts +6 -0
  2. package/App/App.js +12 -0
  3. package/App/AppHeaderContianer.d.ts +2 -0
  4. package/App/AppHeaderContianer.js +67 -0
  5. package/App/AppLogo.d.ts +8 -0
  6. package/App/AppLogo.js +17 -0
  7. package/App/AppProvider.d.ts +9 -0
  8. package/App/AppProvider.js +50 -0
  9. package/App/AppStringContext.d.ts +16 -0
  10. package/App/AppStringContext.js +23 -0
  11. package/App/AppUI.d.ts +2 -0
  12. package/App/AppUI.js +16 -0
  13. package/App/NavigationContainer.d.ts +1 -0
  14. package/App/NavigationContainer.js +63 -0
  15. package/App/QuickActionItem.d.ts +10 -0
  16. package/App/QuickActionItem.js +32 -0
  17. package/App/index.d.ts +1 -0
  18. package/App/index.js +5 -0
  19. package/App/utils.d.ts +14 -0
  20. package/App/utils.js +27 -0
  21. package/CommandBar/Button.d.ts +11 -0
  22. package/CommandBar/Button.js +36 -0
  23. package/CommandBar/Divider.d.ts +2 -0
  24. package/CommandBar/Divider.js +10 -0
  25. package/CommandBar/IconButton.d.ts +9 -0
  26. package/CommandBar/IconButton.js +32 -0
  27. package/CommandBar/Label.d.ts +7 -0
  28. package/CommandBar/Label.js +23 -0
  29. package/CommandBar/MenuButton.d.ts +13 -0
  30. package/CommandBar/MenuButton.js +43 -0
  31. package/CommandBar/MenuItem.d.ts +11 -0
  32. package/CommandBar/MenuItem.js +37 -0
  33. package/CommandBar/MenuItems.d.ts +6 -0
  34. package/CommandBar/MenuItems.js +11 -0
  35. package/CommandBar/MenuList.d.ts +6 -0
  36. package/CommandBar/MenuList.js +13 -0
  37. package/CommandBar/Wrapper.d.ts +8 -0
  38. package/CommandBar/Wrapper.js +24 -0
  39. package/CommandBar/index.d.ts +9 -0
  40. package/CommandBar/index.js +17 -0
  41. package/CommandBar/types.d.ts +0 -0
  42. package/CommandBar/types.js +1 -0
  43. package/DataForm/SectionControl.d.ts +10 -0
  44. package/DataForm/SectionControl.js +8 -0
  45. package/DataGrid/ActionCell.d.ts +8 -0
  46. package/DataGrid/ActionCell.js +11 -0
  47. package/DataGrid/CommandContainer.d.ts +2 -0
  48. package/DataGrid/CommandContainer.js +11 -0
  49. package/DataGrid/CustomizeColumns/AddColumns.d.ts +10 -0
  50. package/DataGrid/CustomizeColumns/AddColumns.js +94 -0
  51. package/DataGrid/CustomizeColumns/ColumnItem.d.ts +16 -0
  52. package/DataGrid/CustomizeColumns/ColumnItem.js +86 -0
  53. package/DataGrid/CustomizeColumns/CustomizeColumns.d.ts +6 -0
  54. package/DataGrid/CustomizeColumns/CustomizeColumns.js +80 -0
  55. package/DataGrid/CustomizeColumns/index.d.ts +1 -0
  56. package/DataGrid/CustomizeColumns/index.js +5 -0
  57. package/DataGrid/FormSubgridCommandContainer.d.ts +2 -0
  58. package/DataGrid/FormSubgridCommandContainer.js +24 -0
  59. package/DataGrid/FormSubgridViewSelector.d.ts +2 -0
  60. package/DataGrid/FormSubgridViewSelector.js +41 -0
  61. package/DataGrid/GridColumnHeader/ConditionValueControl.d.ts +9 -0
  62. package/DataGrid/GridColumnHeader/ConditionValueControl.js +89 -0
  63. package/DataGrid/GridColumnHeader/FilterForm.d.ts +11 -0
  64. package/DataGrid/GridColumnHeader/FilterForm.js +55 -0
  65. package/DataGrid/GridColumnHeader/OperatorSelect.d.ts +9 -0
  66. package/DataGrid/GridColumnHeader/OperatorSelect.js +21 -0
  67. package/DataGrid/GridColumnHeader/TableHeaderFilterCell.d.ts +22 -0
  68. package/DataGrid/GridColumnHeader/TableHeaderFilterCell.js +152 -0
  69. package/DataGrid/GridColumnHeader/index.d.ts +1 -0
  70. package/DataGrid/GridColumnHeader/index.js +5 -0
  71. package/DataGrid/GridColumnHeader/utils.d.ts +5 -0
  72. package/DataGrid/GridColumnHeader/utils.js +18 -0
  73. package/DataGrid/GridHeaderContainer.d.ts +2 -0
  74. package/DataGrid/GridHeaderContainer.js +9 -0
  75. package/DataGrid/GridHeaderDesktop.d.ts +6 -0
  76. package/DataGrid/GridHeaderDesktop.js +40 -0
  77. package/DataGrid/GridPaginationContainer.d.ts +2 -0
  78. package/DataGrid/GridPaginationContainer.js +20 -0
  79. package/DataGrid/GridTableContainer.d.ts +12 -0
  80. package/DataGrid/GridTableContainer.js +248 -0
  81. package/DataGrid/ScrollbarWithMoreDataRequest.d.ts +9 -0
  82. package/DataGrid/ScrollbarWithMoreDataRequest.js +33 -0
  83. package/DataGrid/TableCell/TableCellAction.d.ts +8 -0
  84. package/DataGrid/TableCell/TableCellAction.js +41 -0
  85. package/DataGrid/TableCell/TableCellBase.d.ts +7 -0
  86. package/DataGrid/TableCell/TableCellBase.js +9 -0
  87. package/DataGrid/TableCell/TableCellCheckbox.d.ts +6 -0
  88. package/DataGrid/TableCell/TableCellCheckbox.js +14 -0
  89. package/DataGrid/TableCell/TableCellLink.d.ts +8 -0
  90. package/DataGrid/TableCell/TableCellLink.js +33 -0
  91. package/DataGrid/TableCell/TableCellText.d.ts +7 -0
  92. package/DataGrid/TableCell/TableCellText.js +24 -0
  93. package/DataGrid/TableCell/index.d.ts +4 -0
  94. package/DataGrid/TableCell/index.js +20 -0
  95. package/DataGrid/getAttributeFormattedValue.d.ts +16 -0
  96. package/DataGrid/getAttributeFormattedValue.js +92 -0
  97. package/DataGrid/index.d.ts +4 -0
  98. package/DataGrid/index.js +11 -0
  99. package/DataGrid/useTableColumns.d.ts +10 -0
  100. package/DataGrid/useTableColumns.js +251 -0
  101. package/DataGrid/utils.d.ts +2 -0
  102. package/DataGrid/utils.js +15 -0
  103. package/DialogContainer/AlertDialog.d.ts +10 -0
  104. package/DialogContainer/AlertDialog.js +15 -0
  105. package/DialogContainer/ConfirmDialog.d.ts +12 -0
  106. package/DialogContainer/ConfirmDialog.js +18 -0
  107. package/DialogContainer/DialogContainer.d.ts +1 -0
  108. package/DialogContainer/DialogContainer.js +43 -0
  109. package/DialogContainer/ErrorDialog.d.ts +10 -0
  110. package/DialogContainer/ErrorDialog.js +22 -0
  111. package/DialogContainer/PromptDialog.d.ts +27 -0
  112. package/DialogContainer/PromptDialog.js +99 -0
  113. package/DialogContainer/index.d.ts +1 -0
  114. package/DialogContainer/index.js +5 -0
  115. package/LICENSE +21 -0
  116. package/OverflowCommandBar/OverflowCommandBar.d.ts +10 -0
  117. package/OverflowCommandBar/OverflowCommandBar.js +32 -0
  118. package/OverflowCommandBar/OverflowMenu.d.ts +4 -0
  119. package/OverflowCommandBar/OverflowMenu.js +45 -0
  120. package/OverflowCommandBar/OverflowMenuDivider.d.ts +4 -0
  121. package/OverflowCommandBar/OverflowMenuDivider.js +14 -0
  122. package/OverflowCommandBar/index.d.ts +3 -0
  123. package/OverflowCommandBar/index.js +9 -0
  124. package/OverflowCommandBar/render.d.ts +2 -0
  125. package/OverflowCommandBar/render.js +26 -0
  126. package/OverflowCommandBar/utils.d.ts +4 -0
  127. package/OverflowCommandBar/utils.js +17 -0
  128. package/PageEntityForm/CommandContainer.d.ts +2 -0
  129. package/PageEntityForm/CommandContainer.js +49 -0
  130. package/PageEntityForm/FormTabRelated.d.ts +6 -0
  131. package/PageEntityForm/FormTabRelated.js +41 -0
  132. package/PageEntityForm/PageEntityForm.d.ts +8 -0
  133. package/PageEntityForm/PageEntityForm.js +30 -0
  134. package/PageEntityForm/PageEntityFormDesktopContainer.d.ts +2 -0
  135. package/PageEntityForm/PageEntityFormDesktopContainer.js +120 -0
  136. package/PageEntityForm/PageEntityFormStringContext.d.ts +8 -0
  137. package/PageEntityForm/PageEntityFormStringContext.js +15 -0
  138. package/PageEntityForm/RecordCard.d.ts +10 -0
  139. package/PageEntityForm/RecordCard.js +134 -0
  140. package/PageEntityForm/RecordSetNavigatorContainer.d.ts +2 -0
  141. package/PageEntityForm/RecordSetNavigatorContainer.js +72 -0
  142. package/PageEntityForm/RelatedViewSelector.d.ts +15 -0
  143. package/PageEntityForm/RelatedViewSelector.js +78 -0
  144. package/PageEntityForm/SectionContainer.d.ts +6 -0
  145. package/PageEntityForm/SectionContainer.js +62 -0
  146. package/PageEntityForm/StandardControl.d.ts +24 -0
  147. package/PageEntityForm/StandardControl.js +227 -0
  148. package/PageEntityForm/SubgridControl.d.ts +13 -0
  149. package/PageEntityForm/SubgridControl.js +66 -0
  150. package/PageEntityForm/index.d.ts +1 -0
  151. package/PageEntityForm/index.js +5 -0
  152. package/PageEntityView/FormSubgridContainer.d.ts +7 -0
  153. package/PageEntityView/FormSubgridContainer.js +65 -0
  154. package/PageEntityView/PageEntityView.d.ts +8 -0
  155. package/PageEntityView/PageEntityView.js +22 -0
  156. package/PageEntityView/PageEntityViewDesktopContainer.d.ts +2 -0
  157. package/PageEntityView/PageEntityViewDesktopContainer.js +14 -0
  158. package/PageEntityView/PageEntityViewDesktopFrame.d.ts +9 -0
  159. package/PageEntityView/PageEntityViewDesktopFrame.js +48 -0
  160. package/PageEntityView/PageEntityViewStringContext.d.ts +23 -0
  161. package/PageEntityView/PageEntityViewStringContext.js +30 -0
  162. package/PageEntityView/index.d.ts +1 -0
  163. package/PageEntityView/index.js +5 -0
  164. package/ProgressIndicatorContainer/index.d.ts +1 -0
  165. package/ProgressIndicatorContainer/index.js +30 -0
  166. package/ToastNotificationContainer/index.d.ts +1 -0
  167. package/ToastNotificationContainer/index.js +44 -0
  168. package/components/BodyLoading.d.ts +6 -0
  169. package/components/BodyLoading.js +19 -0
  170. package/components/DialogLogin.d.ts +6 -0
  171. package/components/DialogLogin.js +9 -0
  172. package/components/LoginForm.d.ts +6 -0
  173. package/components/LoginForm.js +101 -0
  174. package/components/PageBroken.d.ts +8 -0
  175. package/components/PageBroken.js +15 -0
  176. package/components/PageLoading.d.ts +5 -0
  177. package/components/PageLoading.js +15 -0
  178. package/components/PageLogin.d.ts +7 -0
  179. package/components/PageLogin.js +46 -0
  180. package/form/FormControl.d.ts +6 -0
  181. package/form/FormControl.js +95 -0
  182. package/form/FormControlLoading.d.ts +2 -0
  183. package/form/FormControlLoading.js +9 -0
  184. package/form/controls/CurrencyControl.d.ts +4 -0
  185. package/form/controls/CurrencyControl.js +16 -0
  186. package/form/controls/DateControl.d.ts +6 -0
  187. package/form/controls/DateControl.js +21 -0
  188. package/form/controls/DateRangeControl.d.ts +6 -0
  189. package/form/controls/DateRangeControl.js +49 -0
  190. package/form/controls/DateTimeControl.d.ts +6 -0
  191. package/form/controls/DateTimeControl.js +23 -0
  192. package/form/controls/EmailControl.d.ts +6 -0
  193. package/form/controls/EmailControl.js +22 -0
  194. package/form/controls/LookupControl.d.ts +26 -0
  195. package/form/controls/LookupControl.js +134 -0
  196. package/form/controls/MultiSelectControl.d.ts +6 -0
  197. package/form/controls/MultiSelectControl.js +17 -0
  198. package/form/controls/MultiSelectLookupControl.d.ts +26 -0
  199. package/form/controls/MultiSelectLookupControl.js +187 -0
  200. package/form/controls/NumberControl.d.ts +4 -0
  201. package/form/controls/NumberControl.js +15 -0
  202. package/form/controls/PasswordControl.d.ts +6 -0
  203. package/form/controls/PasswordControl.js +13 -0
  204. package/form/controls/SelectControl.d.ts +9 -0
  205. package/form/controls/SelectControl.js +29 -0
  206. package/form/controls/SwitchControl.d.ts +4 -0
  207. package/form/controls/SwitchControl.js +6 -0
  208. package/form/controls/TelephoneControl.d.ts +5 -0
  209. package/form/controls/TelephoneControl.js +16 -0
  210. package/form/controls/TextAreaControl.d.ts +6 -0
  211. package/form/controls/TextAreaControl.js +16 -0
  212. package/form/controls/TextControl.d.ts +10 -0
  213. package/form/controls/TextControl.js +24 -0
  214. package/form/controls/types.d.ts +14 -0
  215. package/form/controls/types.js +2 -0
  216. package/form/controls/useLookupData.d.ts +19 -0
  217. package/form/controls/useLookupData.js +104 -0
  218. package/form/layout/FormBody/FormBody.d.ts +2 -0
  219. package/form/layout/FormBody/FormBody.js +11 -0
  220. package/form/layout/FormBody/index.d.ts +1 -0
  221. package/form/layout/FormBody/index.js +17 -0
  222. package/form/layout/FormSection/FormSection.d.ts +16 -0
  223. package/form/layout/FormSection/FormSection.js +83 -0
  224. package/form/layout/FormSection/FormSectionColumn.d.ts +6 -0
  225. package/form/layout/FormSection/FormSectionColumn.js +15 -0
  226. package/form/layout/FormSection/FormSectionLoading.d.ts +6 -0
  227. package/form/layout/FormSection/FormSectionLoading.js +7 -0
  228. package/form/layout/FormSection/index.d.ts +1 -0
  229. package/form/layout/FormSection/index.js +5 -0
  230. package/form/layout/FormTab/FormTab.d.ts +13 -0
  231. package/form/layout/FormTab/FormTab.js +82 -0
  232. package/form/layout/FormTab/FormTabColumn.d.ts +6 -0
  233. package/form/layout/FormTab/FormTabColumn.js +15 -0
  234. package/form/layout/FormTab/index.d.ts +1 -0
  235. package/form/layout/FormTab/index.js +5 -0
  236. package/form/layout/TabContext.d.ts +6 -0
  237. package/form/layout/TabContext.js +5 -0
  238. package/form/layout/index.d.ts +3 -0
  239. package/form/layout/index.js +11 -0
  240. package/form/types.d.ts +74 -0
  241. package/form/types.js +5 -0
  242. package/package.json +30 -0
  243. package/types/index.d.ts +32 -0
  244. package/types/index.js +2 -0
@@ -0,0 +1,187 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MultiSelectLookupControl = MultiSelectLookupControl;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_components_1 = require("@fluentui/react-components");
6
+ const hooks_1 = require("@headless-adminapp/app/hooks");
7
+ const hooks_2 = require("@headless-adminapp/app/route/hooks");
8
+ const app_1 = require("@headless-adminapp/core/experience/app");
9
+ const icons_1 = require("@headless-adminapp/icons");
10
+ const react_1 = require("react");
11
+ const AppStringContext_1 = require("../../App/AppStringContext");
12
+ const RecordCard_1 = require("../../PageEntityForm/RecordCard");
13
+ const useLookupData_1 = require("./useLookupData");
14
+ function MultiSelectLookupControl(props) {
15
+ const Control = LookupControlMd;
16
+ return (0, jsx_runtime_1.jsx)(Control, Object.assign({}, props));
17
+ }
18
+ const useStyles = (0, react_components_1.makeStyles)({
19
+ option: {
20
+ padding: 0,
21
+ '& .fui-Option__checkIcon': {
22
+ display: 'none',
23
+ },
24
+ '&[data-activedescendant-focusvisible]': {
25
+ background: react_components_1.tokens.colorNeutralBackground1Hover,
26
+ '&:after': {
27
+ border: 'none !important',
28
+ // background: tokens.colorNeutralBackground1Hover,
29
+ },
30
+ },
31
+ },
32
+ });
33
+ const LookupControlMd = ({ value, onChange, id, name, onBlur, onFocus, placeholder, disabled, autoFocus, readOnly, dataService, schema, viewId, allowNavigation, allowNewRecord, }) => {
34
+ const [lookupEnabled, setLookupEnabled] = (0, react_1.useState)(false);
35
+ const [open, setOpen] = (0, react_1.useState)(false);
36
+ const [searchText, setSearchText] = (0, react_1.useState)('');
37
+ const { loockupStrings } = (0, AppStringContext_1.useAppStrings)();
38
+ (0, react_1.useEffect)(() => {
39
+ if (open)
40
+ setLookupEnabled(true);
41
+ }, [open]);
42
+ const [debouncedSearchText] = (0, hooks_1.useDebouncedValue)(searchText, 500);
43
+ const styles = useStyles();
44
+ const { isLoading: isViewLoading, view } = (0, useLookupData_1.useGetLookupView)(schema.logicalName, viewId);
45
+ const { data, isLoading } = (0, useLookupData_1.useLookupData)({
46
+ schema,
47
+ view: view === null || view === void 0 ? void 0 : view.experience,
48
+ searchText: debouncedSearchText,
49
+ dataService,
50
+ enabled: lookupEnabled && !isViewLoading && !readOnly && !disabled,
51
+ });
52
+ const tagGroupContainerRef = (0, react_1.useRef)(null);
53
+ const [inputLeft, setInputLeft] = (0, react_1.useState)(0);
54
+ const [containerHeight, setContainerHeight] = (0, react_1.useState)(32);
55
+ (0, react_1.useEffect)(() => {
56
+ const timer = setInterval(() => {
57
+ var _a, _b, _c;
58
+ if (!tagGroupContainerRef.current) {
59
+ return;
60
+ }
61
+ const lastElementChild = (_b = (_a = tagGroupContainerRef.current) === null || _a === void 0 ? void 0 : _a.lastElementChild) === null || _b === void 0 ? void 0 : _b.querySelector('.fui-Tag:last-of-type');
62
+ if (!lastElementChild) {
63
+ setContainerHeight(32);
64
+ setInputLeft(0);
65
+ return;
66
+ }
67
+ const containerBoundingRect = tagGroupContainerRef.current.getBoundingClientRect();
68
+ const lastElementBoundingRect = lastElementChild === null || lastElementChild === void 0 ? void 0 : lastElementChild.getBoundingClientRect();
69
+ const remainingWidth = containerBoundingRect.right - ((_c = lastElementBoundingRect === null || lastElementBoundingRect === void 0 ? void 0 : lastElementBoundingRect.right) !== null && _c !== void 0 ? _c : 0);
70
+ let newHeight = containerBoundingRect.height + 8;
71
+ if (remainingWidth > 100) {
72
+ setInputLeft(containerBoundingRect.width - remainingWidth);
73
+ }
74
+ else {
75
+ setInputLeft(0);
76
+ newHeight = containerBoundingRect.height + 32 + 4;
77
+ }
78
+ setContainerHeight(newHeight);
79
+ }, 500);
80
+ return () => {
81
+ clearInterval(timer);
82
+ };
83
+ }, []);
84
+ // useEffect(() => {
85
+ // if (value) {
86
+ // // setSearchText(value.name); // TODO:
87
+ // } else {
88
+ // setSearchText('');
89
+ // }
90
+ // }, [value]);
91
+ const handleAdd = (selectedValue) => {
92
+ setSearchText('');
93
+ if (!value) {
94
+ return onChange === null || onChange === void 0 ? void 0 : onChange([
95
+ {
96
+ id: selectedValue[schema.idAttribute],
97
+ name: selectedValue[schema.primaryAttribute],
98
+ logicalName: schema.logicalName,
99
+ },
100
+ ]);
101
+ }
102
+ else {
103
+ if (value.find((x) => x.id === selectedValue[schema.idAttribute])) {
104
+ return;
105
+ }
106
+ return onChange === null || onChange === void 0 ? void 0 : onChange([
107
+ ...value,
108
+ {
109
+ id: selectedValue[schema.idAttribute],
110
+ name: selectedValue[schema.primaryAttribute],
111
+ logicalName: schema.logicalName,
112
+ },
113
+ ]);
114
+ }
115
+ };
116
+ const handleRemove = (id) => {
117
+ const newValue = value === null || value === void 0 ? void 0 : value.filter((x) => x.id !== id);
118
+ if (!(newValue === null || newValue === void 0 ? void 0 : newValue.length)) {
119
+ onChange === null || onChange === void 0 ? void 0 : onChange(null);
120
+ }
121
+ else {
122
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
123
+ }
124
+ };
125
+ return ((0, jsx_runtime_1.jsxs)("div", { style: { position: 'relative', width: '100%', height: containerHeight }, children: [(0, jsx_runtime_1.jsxs)(react_components_1.Combobox, { name: name, appearance: "filled-darker", expandIcon: (0, jsx_runtime_1.jsx)("div", { style: { position: 'absolute', right: 4, bottom: 8 }, children: readOnly || disabled ? null : isLoading ? ((0, jsx_runtime_1.jsx)(react_components_1.Spinner, { size: "extra-tiny" })) : ((0, jsx_runtime_1.jsx)(icons_1.Icons.Search, { size: 18 })) }), input: {
126
+ style: {
127
+ position: 'absolute',
128
+ bottom: 0,
129
+ right: 0,
130
+ left: inputLeft,
131
+ height: 30,
132
+ },
133
+ }, placeholder: placeholder, inputMode: "search", style: { width: '100%', height: '100%' }, autoComplete: "off", readOnly: readOnly || disabled, open: open && !readOnly && !disabled, value: searchText, onOpenChange: (e, data) => {
134
+ setOpen(data.open);
135
+ }, onChange: (e) => {
136
+ setSearchText(e.target.value);
137
+ }, onOptionSelect: (e, item) => {
138
+ console.log('onOptionSelect', item);
139
+ const _item = data === null || data === void 0 ? void 0 : data.records.find((x) => String(x[schema.idAttribute]) === item.optionValue);
140
+ if (!_item)
141
+ return;
142
+ handleAdd(_item);
143
+ }, disableAutoFocus: true, onBlur: onBlur, onFocus: onFocus, id: id, autoFocus: autoFocus, children: [data === null || data === void 0 ? void 0 : data.records.map((item) => ((0, jsx_runtime_1.jsx)(react_components_1.Option, { value: item[schema.idAttribute], className: (0, react_components_1.mergeClasses)(styles.option), text: item[schema.primaryAttribute], children: (0, jsx_runtime_1.jsx)(RecordCard_1.RecordCard, { cardView: view === null || view === void 0 ? void 0 : view.experience.card, record: item, schema: schema }) }, item[schema.idAttribute]))), !isLoading && !(data === null || data === void 0 ? void 0 : data.records.length) && ((0, jsx_runtime_1.jsx)("div", { style: {
144
+ paddingInline: react_components_1.tokens.spacingHorizontalL,
145
+ paddingBlock: react_components_1.tokens.spacingVerticalS,
146
+ }, children: (0, jsx_runtime_1.jsx)(react_components_1.Body1, { children: loockupStrings.noRecordsFound }) })), allowNewRecord && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_components_1.Divider, {}), (0, jsx_runtime_1.jsx)("div", { style: { marginTop: react_components_1.tokens.spacingVerticalXXS }, children: (0, jsx_runtime_1.jsx)(react_components_1.ToolbarButton, { style: { fontWeight: 'normal' }, icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Add, {}), children: loockupStrings.newRecord }) })] }))] }), (0, jsx_runtime_1.jsx)("div", { ref: tagGroupContainerRef, style: {
147
+ position: 'absolute',
148
+ top: 4,
149
+ left: 0,
150
+ right: 0,
151
+ alignItems: 'center',
152
+ paddingInline: 4,
153
+ display: 'flex',
154
+ pointerEvents: 'none',
155
+ }, children: (0, jsx_runtime_1.jsx)(react_components_1.TagGroup, { as: "div", style: { flexWrap: 'wrap', rowGap: 8 }, children: value === null || value === void 0 ? void 0 : value.map((item, index) => ((0, jsx_runtime_1.jsx)(TagItem, { disabled: disabled, readOnly: readOnly, value: item, onRemove: handleRemove, allowNavigation: allowNavigation }, `${item.id}-${index}`))) }) })] }));
156
+ };
157
+ function TagItem({ disabled, readOnly, value, onRemove, allowNavigation, }) {
158
+ const routeResolver = (0, hooks_2.useRouteResolver)();
159
+ const router = (0, hooks_2.useRouter)();
160
+ const path = (0, react_1.useMemo)(() => {
161
+ if (!value) {
162
+ return '';
163
+ }
164
+ if (!allowNavigation) {
165
+ return '';
166
+ }
167
+ return routeResolver({
168
+ logicalName: value.logicalName,
169
+ type: app_1.PageType.EntityForm,
170
+ id: value.id,
171
+ });
172
+ }, [allowNavigation, routeResolver, value]);
173
+ const handleOpenRecord = (0, react_1.useCallback)((event) => {
174
+ event.preventDefault();
175
+ event.stopPropagation();
176
+ if (!path) {
177
+ return;
178
+ }
179
+ router.push(path);
180
+ }, [path, router]);
181
+ return ((0, jsx_runtime_1.jsx)(react_components_1.Tag, { as: "span", appearance: "brand", size: "small", dismissible: !disabled && !readOnly, value: value.id, style: {
182
+ paddingRight: !disabled && !readOnly ? 0 : 5,
183
+ pointerEvents: 'auto',
184
+ }, dismissIcon: (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', cursor: 'pointer' }, onClick: () => {
185
+ onRemove === null || onRemove === void 0 ? void 0 : onRemove(value.id);
186
+ }, children: (0, jsx_runtime_1.jsx)(icons_1.Icons.Close, { size: 16 }) }), children: allowNavigation && !!path ? ((0, jsx_runtime_1.jsx)(react_components_1.Link, { onClick: handleOpenRecord, children: (0, jsx_runtime_1.jsx)(react_components_1.Body1, { style: { overflow: 'hidden', textOverflow: 'ellipsis' }, children: value === null || value === void 0 ? void 0 : value.name }) })) : ((0, jsx_runtime_1.jsx)(react_components_1.Body1, { style: { overflow: 'hidden', textOverflow: 'ellipsis' }, children: value === null || value === void 0 ? void 0 : value.name })) }));
187
+ }
@@ -0,0 +1,4 @@
1
+ import { ControlProps } from './types';
2
+ export interface NumberControlProps extends ControlProps<number> {
3
+ }
4
+ export declare function NumberControl({ value, onChange, id, name, onBlur, onFocus, error, disabled, placeholder, borderOnFocusOnly, readOnly, }: NumberControlProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NumberControl = NumberControl;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_components_1 = require("@fluentui/react-components");
6
+ function NumberControl({ value, onChange, id, name, onBlur, onFocus, error, disabled, placeholder, borderOnFocusOnly, readOnly, }) {
7
+ return ((0, jsx_runtime_1.jsx)(react_components_1.Input, { type: "number", placeholder: placeholder, id: id, appearance: "filled-darker", name: name,
8
+ // value={value ?? ''}
9
+ onChange: (e) => onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value ? Number(e.target.value) : null), onBlur: () => onBlur === null || onBlur === void 0 ? void 0 : onBlur(), onFocus: () => onFocus === null || onFocus === void 0 ? void 0 : onFocus(),
10
+ // invalid={error}
11
+ // size="sm"
12
+ disabled: disabled, readOnly: readOnly, style: {
13
+ width: '100%',
14
+ } }));
15
+ }
@@ -0,0 +1,6 @@
1
+ import { InputProps } from '@fluentui/react-components';
2
+ import { ControlProps } from './types';
3
+ export interface PasswordControlProps extends ControlProps<string> {
4
+ appearance?: InputProps['appearance'];
5
+ }
6
+ export declare function PasswordControl({ value, onChange, id, name, onBlur, onFocus, error, placeholder, disabled, autoFocus, appearance, }: PasswordControlProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PasswordControl = PasswordControl;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_components_1 = require("@fluentui/react-components");
6
+ const icons_1 = require("@headless-adminapp/icons");
7
+ const react_1 = require("react");
8
+ function PasswordControl({ value, onChange, id, name, onBlur, onFocus, error, placeholder, disabled, autoFocus, appearance = 'filled-darker', }) {
9
+ const [showPassword, setShowPassword] = (0, react_1.useState)(false);
10
+ return ((0, jsx_runtime_1.jsx)(react_components_1.Input, { placeholder: placeholder, id: id, name: name, appearance: appearance, type: showPassword ? 'text' : 'password', autoFocus: autoFocus, value: value || '', onChange: (e) => onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value), onBlur: () => onBlur === null || onBlur === void 0 ? void 0 : onBlur(), onFocus: () => onFocus === null || onFocus === void 0 ? void 0 : onFocus(),
11
+ // invalid={error}
12
+ disabled: disabled, contentAfter: (0, jsx_runtime_1.jsx)(react_components_1.Button, { appearance: "transparent", size: "small", onClick: () => setShowPassword(!showPassword), icon: showPassword ? (0, jsx_runtime_1.jsx)(icons_1.Icons.EyeOff, { size: 18 }) : (0, jsx_runtime_1.jsx)(icons_1.Icons.Eye, { size: 18 }) }) }));
13
+ }
@@ -0,0 +1,9 @@
1
+ import { ControlProps } from './types';
2
+ export interface Lookup<T = string> {
3
+ label: string;
4
+ value: T;
5
+ }
6
+ export interface SelectControlProps<T> extends ControlProps<T> {
7
+ options: Lookup<T>[];
8
+ }
9
+ export default function SelectControl<T extends string | number>({ value, onChange, options, id, name, disabled, error, onBlur, onFocus, placeholder, readOnly, }: SelectControlProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = SelectControl;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_components_1 = require("@fluentui/react-components");
6
+ const react_1 = require("react");
7
+ function SelectControl({ value, onChange, options, id, name, disabled, error, onBlur, onFocus, placeholder, readOnly, }) {
8
+ var _a;
9
+ const transformedOptions = (0, react_1.useMemo)(() => options.map((x) => ({ label: x.label, value: String(x.value) })), [options]);
10
+ const handleChange = (value) => {
11
+ const option = options.find((x) => String(x.value) === value);
12
+ if (option) {
13
+ onChange === null || onChange === void 0 ? void 0 : onChange(option.value);
14
+ }
15
+ else {
16
+ onChange === null || onChange === void 0 ? void 0 : onChange(null);
17
+ }
18
+ };
19
+ const selectedOption = (0, react_1.useMemo)(() => options.find((x) => x.value === value), [options, value]);
20
+ return ((0, jsx_runtime_1.jsx)(react_components_1.Dropdown, { placeholder: placeholder, id: id, name: name, appearance: "filled-darker",
21
+ // data={transformedOptions}
22
+ value: (_a = selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.label) !== null && _a !== void 0 ? _a : '',
23
+ // onChange={(e, v) => handleChange(v as string)}
24
+ selectedOptions: value ? [String(value)] : [], onOptionSelect: (event, data) => {
25
+ handleChange(data.optionValue);
26
+ }, onBlur: () => onBlur === null || onBlur === void 0 ? void 0 : onBlur(), onFocus: () => onFocus === null || onFocus === void 0 ? void 0 : onFocus(),
27
+ // error={error}
28
+ disabled: disabled, children: transformedOptions.map((x) => ((0, jsx_runtime_1.jsx)(react_components_1.Option, { value: x.value, children: x.label }, x.value))) }));
29
+ }
@@ -0,0 +1,4 @@
1
+ import { ControlProps } from './types';
2
+ export interface SwitchControlProps extends ControlProps<boolean> {
3
+ }
4
+ export declare function SwitchControl({ value, onChange, id, name, onBlur, onFocus, error, disabled, placeholder, readOnly, }: SwitchControlProps): null;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SwitchControl = SwitchControl;
4
+ function SwitchControl({ value, onChange, id, name, onBlur, onFocus, error, disabled, placeholder, readOnly, }) {
5
+ return null;
6
+ }
@@ -0,0 +1,5 @@
1
+ import { ControlProps } from './types';
2
+ export interface TelephoneControlProps extends ControlProps<string> {
3
+ autoComplete?: string;
4
+ }
5
+ export declare function TelephoneControl({ value, onChange, id, name, onBlur, onFocus, error, placeholder, disabled, autoComplete, }: TelephoneControlProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TelephoneControl = TelephoneControl;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_components_1 = require("@fluentui/react-components");
6
+ const icons_1 = require("@headless-adminapp/icons");
7
+ function TelephoneControl({ value, onChange, id, name, onBlur, onFocus, error, placeholder, disabled, autoComplete, }) {
8
+ return ((0, jsx_runtime_1.jsx)(react_components_1.Input, { type: "tel", placeholder: placeholder, id: id, appearance: "filled-darker", name: name, value: value || '', onChange: (e) => onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value), onBlur: () => onBlur === null || onBlur === void 0 ? void 0 : onBlur(), onFocus: () => onFocus === null || onFocus === void 0 ? void 0 : onFocus(),
9
+ // invalid={error}
10
+ disabled: disabled, autoComplete: autoComplete, style: {
11
+ width: '100%',
12
+ paddingRight: react_components_1.tokens.spacingHorizontalXS,
13
+ },
14
+ // size="sm"
15
+ contentAfter: !!value ? ((0, jsx_runtime_1.jsx)(react_components_1.Button, { appearance: "transparent", size: "small", onClick: () => window.open(`tel:${value}`, '_blank'), icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Phone, {}) })) : undefined }));
16
+ }
@@ -0,0 +1,6 @@
1
+ import { ControlProps } from './types';
2
+ export interface TextAreaControlProps extends ControlProps<string> {
3
+ rows?: number;
4
+ textTransform?: 'capitalize' | 'uppercase' | 'lowercase' | 'none';
5
+ }
6
+ export declare function TextAreaControl({ value, onChange, id, name, placeholder, onBlur, onFocus, error, disabled, rows, textTransform, }: TextAreaControlProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TextAreaControl = TextAreaControl;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_components_1 = require("@fluentui/react-components");
6
+ function TextAreaControl({ value, onChange, id, name, placeholder, onBlur, onFocus, error, disabled, rows = 5, textTransform, }) {
7
+ return ((0, jsx_runtime_1.jsx)(react_components_1.Textarea, { placeholder: placeholder, id: id, appearance: "filled-darker", name: name, value: value || '', onChange: (e) => {
8
+ textTransform === 'uppercase'
9
+ ? onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value.toUpperCase())
10
+ : textTransform === 'lowercase'
11
+ ? onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value.toLowerCase())
12
+ : onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value);
13
+ }, onBlur: () => onBlur === null || onBlur === void 0 ? void 0 : onBlur(), onFocus: () => onFocus === null || onFocus === void 0 ? void 0 : onFocus(),
14
+ // error={error}
15
+ disabled: disabled, rows: rows }));
16
+ }
@@ -0,0 +1,10 @@
1
+ import { InputProps } from '@fluentui/react-components';
2
+ import { ControlProps } from './types';
3
+ export interface TextControlProps extends ControlProps<string> {
4
+ autoComplete?: string;
5
+ autoCapitalize?: string;
6
+ autoCorrect?: string;
7
+ textTransform?: 'capitalize' | 'uppercase' | 'lowercase' | 'none';
8
+ appearance?: InputProps['appearance'];
9
+ }
10
+ export declare function TextControl({ value, onChange, id, name, onBlur, onFocus, placeholder, disabled, autoComplete, autoFocus, autoCapitalize, autoCorrect, textTransform, readOnly, appearance, }: TextControlProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TextControl = TextControl;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_components_1 = require("@fluentui/react-components");
6
+ function TextControl({ value, onChange, id, name, onBlur, onFocus,
7
+ // error,
8
+ placeholder, disabled, autoComplete, autoFocus, autoCapitalize, autoCorrect, textTransform,
9
+ // borderOnFocusOnly,
10
+ readOnly, appearance = 'filled-darker', }) {
11
+ const readonly = disabled || readOnly;
12
+ return ((0, jsx_runtime_1.jsx)(react_components_1.Input, { placeholder: placeholder, id: id, name: name, autoFocus: autoFocus, appearance: appearance, value: value || '', onChange: (e) => {
13
+ textTransform === 'uppercase'
14
+ ? onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value.toUpperCase())
15
+ : textTransform === 'lowercase'
16
+ ? onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value.toLowerCase())
17
+ : onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value);
18
+ }, onBlur: () => onBlur === null || onBlur === void 0 ? void 0 : onBlur(), onFocus: () => onFocus === null || onFocus === void 0 ? void 0 : onFocus(),
19
+ // invalid={error}
20
+ // readOnly={readOnly || disabled}
21
+ readOnly: readonly, autoComplete: autoComplete, autoCorrect: autoCorrect, autoCapitalize: autoCapitalize, className: (0, react_components_1.mergeClasses)(readonly && 'TextControl_readonly'), style: {
22
+ width: '100%',
23
+ } }));
24
+ }
@@ -0,0 +1,14 @@
1
+ export interface ControlProps<T> {
2
+ id?: string;
3
+ name?: string;
4
+ value: T | null;
5
+ onChange?: (value: T | null) => void;
6
+ disabled?: boolean;
7
+ onBlur?: () => void;
8
+ onFocus?: () => void;
9
+ error?: boolean;
10
+ placeholder?: string;
11
+ autoFocus?: boolean;
12
+ borderOnFocusOnly?: boolean;
13
+ readOnly?: boolean;
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,19 @@
1
+ import { ViewExperience } from '@headless-adminapp/core/experience/view';
2
+ import { InferredSchemaType, Schema, SchemaAttributes } from '@headless-adminapp/core/schema';
3
+ import { IDataService } from '@headless-adminapp/core/transport';
4
+ interface UseLookupDataOptions {
5
+ dataService: IDataService;
6
+ searchText?: string;
7
+ schema: Schema;
8
+ view: ViewExperience | null | undefined;
9
+ enabled?: boolean;
10
+ }
11
+ export declare function useLookupData<S extends SchemaAttributes = SchemaAttributes>({ schema, view, searchText, dataService, enabled, }: UseLookupDataOptions): {
12
+ data: import("@headless-adminapp/core/transport").RetriveRecordsResult<InferredSchemaType<S>> | undefined;
13
+ isLoading: boolean;
14
+ };
15
+ export declare function useGetLookupView(logicalName: string, viewId?: string): {
16
+ isLoading: boolean;
17
+ view: import("@headless-adminapp/core/experience/view").View<SchemaAttributes> | undefined;
18
+ };
19
+ export {};
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.useLookupData = useLookupData;
13
+ exports.useGetLookupView = useGetLookupView;
14
+ const hooks_1 = require("@headless-adminapp/app/hooks");
15
+ const hooks_2 = require("@headless-adminapp/app/metadata/hooks");
16
+ const react_query_1 = require("@tanstack/react-query");
17
+ const react_1 = require("react");
18
+ function useLookupData({ schema, view, searchText, dataService, enabled, }) {
19
+ var _a;
20
+ const [search] = (0, hooks_1.useDebouncedValue)(searchText, 500);
21
+ const columns = (0, react_1.useMemo)(() => {
22
+ var _a;
23
+ if (!(view === null || view === void 0 ? void 0 : view.card)) {
24
+ return [schema.primaryAttribute];
25
+ }
26
+ return Array.from(new Set([
27
+ view.card.primaryColumn,
28
+ view.card.avatarColumn,
29
+ ...((_a = view.card.secondaryColumns) !== null && _a !== void 0 ? _a : [])
30
+ .filter((x) => !x.expandedKey)
31
+ .map((x) => x.name),
32
+ ])).filter(Boolean);
33
+ }, [schema.primaryAttribute, view === null || view === void 0 ? void 0 : view.card]);
34
+ const expand = (0, react_1.useMemo)(() => {
35
+ var _a;
36
+ return (((_a = view === null || view === void 0 ? void 0 : view.card) === null || _a === void 0 ? void 0 : _a.secondaryColumns) || [])
37
+ .filter((x) => x.expandedKey)
38
+ .reduce((acc, x) => {
39
+ if (!acc[x.name]) {
40
+ acc[x.name] = [];
41
+ }
42
+ if (!acc[x.name].includes(x.expandedKey)) {
43
+ acc[x.name].push(x.expandedKey);
44
+ }
45
+ return acc;
46
+ }, {});
47
+ }, [(_a = view === null || view === void 0 ? void 0 : view.card) === null || _a === void 0 ? void 0 : _a.secondaryColumns]);
48
+ const queryKey = (0, react_1.useMemo)(() => [
49
+ 'data',
50
+ 'retriveLookupRecords',
51
+ schema.logicalName,
52
+ search,
53
+ view === null || view === void 0 ? void 0 : view.filter,
54
+ view === null || view === void 0 ? void 0 : view.defaultSorting,
55
+ columns,
56
+ expand,
57
+ ], [
58
+ columns,
59
+ expand,
60
+ schema.logicalName,
61
+ search,
62
+ view === null || view === void 0 ? void 0 : view.filter,
63
+ view === null || view === void 0 ? void 0 : view.defaultSorting,
64
+ ]);
65
+ const { data, isFetching } = (0, react_query_1.useQuery)({
66
+ queryKey: queryKey,
67
+ queryFn: () => __awaiter(this, void 0, void 0, function* () {
68
+ var _a;
69
+ const result = yield dataService.retriveRecords({
70
+ logicalName: schema.logicalName,
71
+ search,
72
+ columns: columns,
73
+ expand,
74
+ filter: (_a = view === null || view === void 0 ? void 0 : view.filter) !== null && _a !== void 0 ? _a : null,
75
+ skip: 0,
76
+ limit: 5,
77
+ sort: view === null || view === void 0 ? void 0 : view.defaultSorting,
78
+ });
79
+ return result;
80
+ }),
81
+ placeholderData: react_query_1.keepPreviousData,
82
+ enabled: enabled !== null && enabled !== void 0 ? enabled : false,
83
+ });
84
+ return {
85
+ data,
86
+ isLoading: isFetching,
87
+ };
88
+ }
89
+ function useGetLookupView(logicalName, viewId) {
90
+ const { experienceStore } = (0, hooks_2.useMetadata)();
91
+ const { isPending, data, error } = (0, react_query_1.useQuery)({
92
+ queryKey: ['data', 'getLookupView', logicalName, viewId],
93
+ queryFn: () => __awaiter(this, void 0, void 0, function* () {
94
+ return experienceStore.getViewLookupV2(logicalName, viewId);
95
+ }),
96
+ });
97
+ if (error) {
98
+ console.error(error);
99
+ }
100
+ return {
101
+ isLoading: isPending,
102
+ view: data,
103
+ };
104
+ }
@@ -0,0 +1,2 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ export declare const FormBody: FC<PropsWithChildren>;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FormBody = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const ScrollView_1 = require("@headless-adminapp/app/components/ScrollView");
6
+ const locale_1 = require("@headless-adminapp/app/locale");
7
+ const FormBody = ({ children }) => {
8
+ const { direction } = (0, locale_1.useLocale)();
9
+ return ((0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', flexDirection: 'column', flex: 1 }, children: (0, jsx_runtime_1.jsx)(ScrollView_1.ScrollView, { autoHide: true, className: "FormBody_scrollview", rtl: direction === 'rtl', children: children }) }));
10
+ };
11
+ exports.FormBody = FormBody;
@@ -0,0 +1 @@
1
+ export * from './FormBody';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./FormBody"), exports);
@@ -0,0 +1,16 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ import { FormSectionColumn } from './FormSectionColumn';
3
+ import { FormSectionLoading } from './FormSectionLoading';
4
+ interface FormSectionProps {
5
+ title?: string;
6
+ fullHeight?: boolean;
7
+ columnCount?: number;
8
+ labelPosition?: 'top' | 'left';
9
+ noPadding?: boolean;
10
+ hideLabel?: boolean;
11
+ }
12
+ export declare const FormSection: FC<PropsWithChildren<FormSectionProps>> & {
13
+ Column: typeof FormSectionColumn;
14
+ Loading: typeof FormSectionLoading;
15
+ };
16
+ export {};