@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,95 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ const jsx_runtime_1 = require("react/jsx-runtime");
18
+ const react_components_1 = require("@fluentui/react-components");
19
+ const react_1 = require("react");
20
+ // import { AttachmentControl } from './controls/AttachmentControl';
21
+ const CurrencyControl_1 = require("./controls/CurrencyControl");
22
+ const DateControl_1 = require("./controls/DateControl");
23
+ const DateTimeControl_1 = require("./controls/DateTimeControl");
24
+ const EmailControl_1 = require("./controls/EmailControl");
25
+ const LookupControl_1 = require("./controls/LookupControl");
26
+ const MultiSelectControl_1 = __importDefault(require("./controls/MultiSelectControl"));
27
+ const MultiSelectLookupControl_1 = require("./controls/MultiSelectLookupControl");
28
+ const NumberControl_1 = require("./controls/NumberControl");
29
+ const PasswordControl_1 = require("./controls/PasswordControl");
30
+ const SelectControl_1 = __importDefault(require("./controls/SelectControl"));
31
+ const SwitchControl_1 = require("./controls/SwitchControl");
32
+ const TelephoneControl_1 = require("./controls/TelephoneControl");
33
+ const TextAreaControl_1 = require("./controls/TextAreaControl");
34
+ const TextControl_1 = require("./controls/TextControl");
35
+ const FormControlLoading_1 = require("./FormControlLoading");
36
+ function Control(props) {
37
+ const { type, label: _label, value, onChange } = props, rest = __rest(props, ["type", "label", "value", "onChange"]);
38
+ switch (type) {
39
+ case 'custom':
40
+ return props.renderControl({
41
+ value: props.value,
42
+ onChange: props.onChange,
43
+ disabled: props.disabled,
44
+ });
45
+ case 'text':
46
+ return ((0, jsx_runtime_1.jsx)(TextControl_1.TextControl, Object.assign({ value: value, onChange: onChange }, rest)));
47
+ case 'textarea':
48
+ return ((0, jsx_runtime_1.jsx)(TextAreaControl_1.TextAreaControl, Object.assign({ value: value, onChange: onChange }, rest)));
49
+ case 'telephone':
50
+ return ((0, jsx_runtime_1.jsx)(TelephoneControl_1.TelephoneControl, Object.assign({ value: value, onChange: onChange }, rest)));
51
+ case 'email':
52
+ return ((0, jsx_runtime_1.jsx)(EmailControl_1.EmailControl, Object.assign({ value: value, onChange: onChange }, rest)));
53
+ case 'password':
54
+ return ((0, jsx_runtime_1.jsx)(PasswordControl_1.PasswordControl, Object.assign({ value: value, onChange: onChange }, rest)));
55
+ case 'number':
56
+ return ((0, jsx_runtime_1.jsx)(NumberControl_1.NumberControl, Object.assign({ value: value, onChange: onChange }, rest)));
57
+ case 'currency':
58
+ return ((0, jsx_runtime_1.jsx)(CurrencyControl_1.CurrencyControl, Object.assign({ value: value, onChange: onChange }, rest)));
59
+ case 'date':
60
+ return ((0, jsx_runtime_1.jsx)(DateControl_1.DateControl, Object.assign({ value: value, onChange: onChange }, rest)));
61
+ case 'datetime':
62
+ return ((0, jsx_runtime_1.jsx)(DateTimeControl_1.DateTimeControl, Object.assign({ value: value, onChange: onChange }, rest)));
63
+ case 'select':
64
+ return ((0, jsx_runtime_1.jsx)(SelectControl_1.default, Object.assign({ value: value, onChange: onChange }, rest)));
65
+ case 'multi-select':
66
+ return ((0, jsx_runtime_1.jsx)(MultiSelectControl_1.default, Object.assign({ value: value, onChange: onChange }, rest)));
67
+ case 'lookup':
68
+ return ((0, jsx_runtime_1.jsx)(LookupControl_1.LookupControl, Object.assign({ value: value, onChange: onChange }, rest)));
69
+ case 'lookups':
70
+ return ((0, jsx_runtime_1.jsx)(MultiSelectLookupControl_1.MultiSelectLookupControl, Object.assign({ value: value, onChange: onChange }, rest)));
71
+ case 'switch':
72
+ return ((0, jsx_runtime_1.jsx)(SwitchControl_1.SwitchControl, Object.assign({ value: value, onChange: onChange }, rest)));
73
+ // case 'attachment':
74
+ // return (
75
+ // <AttachmentControl
76
+ // value={value}
77
+ // onChange={onChange}
78
+ // {...(rest as any)}
79
+ // />
80
+ // );
81
+ default:
82
+ return (0, jsx_runtime_1.jsx)("div", {});
83
+ }
84
+ }
85
+ function randomUUID() {
86
+ return Math.random().toString(36).substring(2, 15);
87
+ }
88
+ function FormControl(props) {
89
+ const { label, id, onChange, error, helperText, required } = props;
90
+ const _id = (0, react_1.useMemo)(() => id || randomUUID(), [id]);
91
+ const noop = (0, react_1.useCallback)(() => { }, []);
92
+ return ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column' }, children: [(0, jsx_runtime_1.jsx)(react_components_1.Label, { style: { width: 160, marginTop: 4 }, children: label }), (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', flex: 1, flexDirection: 'column' }, children: (0, jsx_runtime_1.jsx)(Control, Object.assign({ id: _id, onChange: onChange || noop }, props)) })] }));
93
+ }
94
+ FormControl.Loading = FormControlLoading_1.FormControlLoading;
95
+ exports.default = FormControl;
@@ -0,0 +1,2 @@
1
+ import { FC } from 'react';
2
+ export declare const FormControlLoading: FC;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FormControlLoading = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_components_1 = require("@fluentui/react-components");
6
+ const FormControlLoading = () => {
7
+ return ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column', gap: 6, marginTop: 2 }, children: [(0, jsx_runtime_1.jsx)(react_components_1.Skeleton, { style: { width: 100, height: 20 } }), (0, jsx_runtime_1.jsx)(react_components_1.Skeleton, { style: { height: 32 } })] }));
8
+ };
9
+ exports.FormControlLoading = FormControlLoading;
@@ -0,0 +1,4 @@
1
+ import { ControlProps } from './types';
2
+ export interface CurrencyControlProps extends ControlProps<number> {
3
+ }
4
+ export declare function CurrencyControl({ value, onChange, id, name, onBlur, onFocus, error, disabled, placeholder, autoFocus, borderOnFocusOnly, readOnly, }: CurrencyControlProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CurrencyControl = CurrencyControl;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_components_1 = require("@fluentui/react-components");
6
+ function CurrencyControl({ value, onChange, id, name, onBlur, onFocus, error, disabled, placeholder, autoFocus, borderOnFocusOnly, readOnly, }) {
7
+ var _a;
8
+ console.log('CurrencyControl', value);
9
+ return ((0, jsx_runtime_1.jsx)(react_components_1.Input, { placeholder: placeholder, id: id, autoFocus: autoFocus, name: name, value: (_a = value === null || value === void 0 ? void 0 : value.toString()) !== null && _a !== void 0 ? _a : '', 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(), appearance: "filled-darker", onFocus: () => onFocus === null || onFocus === void 0 ? void 0 : onFocus(),
10
+ // invalid={error}
11
+ // icon={<div>₹</div>}
12
+ // startDecorator={<div>₹</div>}
13
+ contentBefore: (0, jsx_runtime_1.jsx)("div", { children: "\u20B9" }), disabled: disabled, readOnly: readOnly, style: {
14
+ width: '100%',
15
+ } }));
16
+ }
@@ -0,0 +1,6 @@
1
+ import { ControlProps } from './types';
2
+ export interface DateControlProps extends ControlProps<string> {
3
+ maxDate?: Date;
4
+ minDate?: Date;
5
+ }
6
+ export declare function DateControl({ value, onChange, id, name, onBlur, onFocus, error, placeholder, disabled, maxDate, minDate, borderOnFocusOnly, readOnly, }: DateControlProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DateControl = DateControl;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_datepicker_compat_1 = require("@fluentui/react-datepicker-compat");
9
+ const locale_1 = require("@headless-adminapp/app/locale");
10
+ const dayjs_1 = __importDefault(require("dayjs"));
11
+ const AppStringContext_1 = require("../../App/AppStringContext");
12
+ function DateControl({ value, onChange, id, name, onBlur, onFocus, error, placeholder, disabled, maxDate, minDate, borderOnFocusOnly, readOnly, }) {
13
+ const { dateFormats } = (0, locale_1.useLocale)();
14
+ const { datePickerStrings } = (0, AppStringContext_1.useAppStrings)();
15
+ return ((0, jsx_runtime_1.jsx)(react_datepicker_compat_1.DatePicker, { id: id, name: name, onFocus: () => onFocus === null || onFocus === void 0 ? void 0 : onFocus(), onBlur: () => onBlur === null || onBlur === void 0 ? void 0 : onBlur(), placeholder: placeholder, appearance: "filled-darker",
16
+ // size="sm"
17
+ // error={error}
18
+ // maxDate={maxDate}
19
+ // minDate={minDate}
20
+ disabled: disabled, readOnly: readOnly, formatDate: (date) => (date ? (0, dayjs_1.default)(date).format(dateFormats.short) : ''), value: value ? new Date(value) : null, onSelectDate: (date) => onChange === null || onChange === void 0 ? void 0 : onChange(date ? date.toISOString() : null), strings: datePickerStrings }));
21
+ }
@@ -0,0 +1,6 @@
1
+ import { ControlProps } from './types';
2
+ export interface DateRangeControlProps extends ControlProps<[string | null, string | null]> {
3
+ maxDate?: Date;
4
+ minDate?: Date;
5
+ }
6
+ export declare function DateRangeControl({ value, onChange, id, name, onBlur, onFocus, disabled, maxDate, minDate, readOnly, }: DateRangeControlProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DateRangeControl = DateRangeControl;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_datepicker_compat_1 = require("@fluentui/react-datepicker-compat");
9
+ const locale_1 = require("@headless-adminapp/app/locale");
10
+ const dayjs_1 = __importDefault(require("dayjs"));
11
+ const react_1 = require("react");
12
+ const AppStringContext_1 = require("../../App/AppStringContext");
13
+ function DateRangeControl({ value, onChange, id, name, onBlur, onFocus, disabled, maxDate, minDate, readOnly, }) {
14
+ const [from, setFrom] = (0, react_1.useState)(value ? value[0] : null);
15
+ const [to, setTo] = (0, react_1.useState)(value ? value[1] : null);
16
+ const { datePickerStrings } = (0, AppStringContext_1.useAppStrings)();
17
+ const { dateFormats } = (0, locale_1.useLocale)();
18
+ (0, react_1.useEffect)(() => {
19
+ if (value) {
20
+ setFrom(value[0]);
21
+ setTo(value[1]);
22
+ }
23
+ }, [value]);
24
+ const _minDate = minDate
25
+ ? new Date(minDate)
26
+ : from
27
+ ? new Date(from)
28
+ : undefined;
29
+ const _maxDate = maxDate ? new Date(maxDate) : to ? new Date(to) : undefined;
30
+ const handleChangeFrom = (date) => {
31
+ var _a;
32
+ setFrom(date ? date.toISOString() : null);
33
+ // if (date && to) {
34
+ onChange === null || onChange === void 0 ? void 0 : onChange([(_a = date === null || date === void 0 ? void 0 : date.toISOString()) !== null && _a !== void 0 ? _a : null, to]);
35
+ // }
36
+ };
37
+ const handleChangeTo = (date) => {
38
+ var _a;
39
+ setTo(date ? date.toISOString() : null);
40
+ // if (date && from) {
41
+ onChange === null || onChange === void 0 ? void 0 : onChange([from, (_a = date === null || date === void 0 ? void 0 : date.toISOString()) !== null && _a !== void 0 ? _a : null]);
42
+ // }
43
+ };
44
+ return ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', gap: 8 }, children: [(0, jsx_runtime_1.jsx)(react_datepicker_compat_1.DatePicker, { id: id, name: name, onFocus: () => onFocus === null || onFocus === void 0 ? void 0 : onFocus(), onBlur: () => onBlur === null || onBlur === void 0 ? void 0 : onBlur(), placeholder: "From", appearance: "filled-darker", disabled: disabled, readOnly: readOnly, formatDate: (date) => date ? (0, dayjs_1.default)(date).format(dateFormats.short) : '', value: from ? new Date(from) : null, onSelectDate: (date) => handleChangeFrom(date), strings: datePickerStrings, minDate: minDate, maxDate: _maxDate, style: { flex: 1 }, input: {
45
+ style: { width: '100%' },
46
+ } }), (0, jsx_runtime_1.jsx)(react_datepicker_compat_1.DatePicker, { id: id, name: name, onFocus: () => onFocus === null || onFocus === void 0 ? void 0 : onFocus(), onBlur: () => onBlur === null || onBlur === void 0 ? void 0 : onBlur(), placeholder: "To", appearance: "filled-darker", disabled: disabled, readOnly: readOnly, formatDate: (date) => (date ? (0, dayjs_1.default)(date).format('YYYY-MM-DD') : ''), value: to ? new Date(to) : null, onSelectDate: (date) => handleChangeTo(date), strings: datePickerStrings, minDate: _minDate, maxDate: maxDate, style: { flex: 1 }, input: {
47
+ style: { width: '100%' },
48
+ } })] }));
49
+ }
@@ -0,0 +1,6 @@
1
+ import { ControlProps } from './types';
2
+ export interface DateTimeControlProps extends ControlProps<string> {
3
+ maxDate?: Date;
4
+ minDate?: Date;
5
+ }
6
+ export declare function DateTimeControl({ value, onChange, id, name, onBlur, onFocus, error, placeholder, disabled, maxDate, minDate, borderOnFocusOnly, readOnly, }: DateTimeControlProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DateTimeControl = DateTimeControl;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_datepicker_compat_1 = require("@fluentui/react-datepicker-compat");
9
+ const dayjs_1 = __importDefault(require("dayjs"));
10
+ function DateTimeControl({ value, onChange, id, name, onBlur, onFocus, error, placeholder, disabled, maxDate, minDate, borderOnFocusOnly, readOnly, }) {
11
+ // const { shortDate: dateFormat } = useLocale();
12
+ // return (
13
+ // <TimePicker
14
+ // )
15
+ return ((0, jsx_runtime_1.jsx)(react_datepicker_compat_1.DatePicker, { id: id, name: name, onFocus: () => onFocus === null || onFocus === void 0 ? void 0 : onFocus(), onBlur: () => onBlur === null || onBlur === void 0 ? void 0 : onBlur(), placeholder: placeholder, appearance: "filled-darker", formatDate: (date) => date ? (0, dayjs_1.default)(date).format('YYYY-MM-DD HH:mm:ss') : '',
16
+ // size="sm"
17
+ // error={error}
18
+ // maxDate={maxDate}
19
+ // minDate={minDate}
20
+ disabled: disabled, readOnly: readOnly,
21
+ // inputFormat={inputFormat}
22
+ value: value ? new Date(value) : null, onSelectDate: (date) => onChange === null || onChange === void 0 ? void 0 : onChange(date ? date.toISOString() : null) }));
23
+ }
@@ -0,0 +1,6 @@
1
+ import { ControlProps } from './types';
2
+ export interface EmailControlProps extends ControlProps<string> {
3
+ autoComplete?: string;
4
+ textTransform?: 'capitalize' | 'uppercase' | 'lowercase' | 'none';
5
+ }
6
+ export declare function EmailControl({ value, onChange, id, name, onBlur, onFocus, error, placeholder, disabled, autoComplete, textTransform, borderOnFocusOnly, readOnly, }: EmailControlProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EmailControl = EmailControl;
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 EmailControl({ value, onChange, id, name, onBlur, onFocus, error, placeholder, disabled, autoComplete, textTransform, borderOnFocusOnly, readOnly, }) {
8
+ return ((0, jsx_runtime_1.jsx)(react_components_1.Input, { type: "email", placeholder: placeholder, id: id, appearance: "filled-darker", name: name,
9
+ // size="sm"
10
+ value: value || '', onChange: (e) => {
11
+ textTransform === 'uppercase'
12
+ ? onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value.toUpperCase())
13
+ : textTransform === 'lowercase'
14
+ ? onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value.toLowerCase())
15
+ : onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value);
16
+ }, onBlur: () => onBlur === null || onBlur === void 0 ? void 0 : onBlur(), onFocus: () => onFocus === null || onFocus === void 0 ? void 0 : onFocus(),
17
+ // invalid={error}
18
+ disabled: disabled, readOnly: readOnly, autoComplete: autoComplete, style: {
19
+ flex: 1,
20
+ paddingRight: react_components_1.tokens.spacingHorizontalXS,
21
+ }, contentAfter: !!value ? ((0, jsx_runtime_1.jsx)(react_components_1.Button, { onClick: () => window.open(`mailto:${value}`, '_blank'), color: "primary", appearance: "transparent", icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Mail, {}), size: "small" })) : undefined }));
22
+ }
@@ -0,0 +1,26 @@
1
+ import { Schema } from '@headless-adminapp/core/schema';
2
+ import { ISchemaExperienceStore } from '@headless-adminapp/core/store';
3
+ import { IDataService } from '@headless-adminapp/core/transport';
4
+ import { ControlProps } from './types';
5
+ export interface LookupOption {
6
+ limit: number;
7
+ search: string;
8
+ enabled?: boolean;
9
+ }
10
+ export type DataLookup = {
11
+ id: string;
12
+ name: string;
13
+ logicalName: string;
14
+ };
15
+ export type LookupControlProps = ControlProps<DataLookup> & {
16
+ async?: boolean;
17
+ lookupKey?: string;
18
+ openRecord?: (id: string) => void;
19
+ dataService: IDataService;
20
+ schema: Schema;
21
+ experienceStore: ISchemaExperienceStore;
22
+ viewId?: string;
23
+ allowNavigation?: boolean;
24
+ allowNewRecord?: boolean;
25
+ };
26
+ export declare function LookupControl(props: LookupControlProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,134 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LookupControl = LookupControl;
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 LookupControl(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
+ const routeResolver = (0, hooks_2.useRouteResolver)();
39
+ const router = (0, hooks_2.useRouter)();
40
+ const path = (0, react_1.useMemo)(() => {
41
+ if (!value) {
42
+ return '';
43
+ }
44
+ if (!allowNavigation) {
45
+ return '';
46
+ }
47
+ return routeResolver({
48
+ logicalName: schema.logicalName,
49
+ type: app_1.PageType.EntityForm,
50
+ id: value.id,
51
+ });
52
+ }, [allowNavigation, routeResolver, schema.logicalName, value]);
53
+ const handleOpenRecord = (0, react_1.useCallback)((event) => {
54
+ event.preventDefault();
55
+ event.stopPropagation();
56
+ if (!path) {
57
+ return;
58
+ }
59
+ router.push(path);
60
+ }, [path, router]);
61
+ (0, react_1.useEffect)(() => {
62
+ if (open)
63
+ setLookupEnabled(true);
64
+ }, [open]);
65
+ const [debouncedSearchText] = (0, hooks_1.useDebouncedValue)(searchText, 500);
66
+ const styles = useStyles();
67
+ // const useLookupData = useMemo(
68
+ // () =>
69
+ // createUseLookupDataHook({
70
+ // dataResolver: dataResolverRef.current,
71
+ // useLookupQuery: undefined,
72
+ // lookupKey,
73
+ // }),
74
+ // [lookupKey]
75
+ // );
76
+ // const {
77
+ // data,
78
+ // isLoading: loading,
79
+ // isFetching,
80
+ // } = useLookupData({
81
+ // limit: 10,
82
+ // search: async ? debouncedSearchText : '',
83
+ // enabled: lookupEnabled,
84
+ // });
85
+ const { isLoading: isViewLoading, view } = (0, useLookupData_1.useGetLookupView)(schema.logicalName, viewId);
86
+ const { data, isLoading } = (0, useLookupData_1.useLookupData)({
87
+ schema,
88
+ view: view === null || view === void 0 ? void 0 : view.experience,
89
+ searchText: debouncedSearchText,
90
+ dataService,
91
+ enabled: lookupEnabled && !isViewLoading && !value && !readOnly && !disabled,
92
+ });
93
+ (0, react_1.useEffect)(() => {
94
+ if (value) {
95
+ setSearchText(value.name);
96
+ }
97
+ else {
98
+ setSearchText('');
99
+ }
100
+ }, [value]);
101
+ const handleChange = (value) => {
102
+ setSearchText('');
103
+ if (!value) {
104
+ return onChange === null || onChange === void 0 ? void 0 : onChange(null);
105
+ }
106
+ else {
107
+ return onChange === null || onChange === void 0 ? void 0 : onChange({
108
+ id: value[schema.idAttribute],
109
+ name: value[schema.primaryAttribute],
110
+ logicalName: schema.logicalName,
111
+ });
112
+ }
113
+ };
114
+ return ((0, jsx_runtime_1.jsxs)("div", { style: { position: 'relative', width: '100%' }, children: [(0, jsx_runtime_1.jsxs)(react_components_1.Combobox, { name: name, appearance: "filled-darker", expandIcon: 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 })), placeholder: placeholder, inputMode: "search", style: { width: '100%' }, autoComplete: "off", readOnly: readOnly || disabled,
115
+ // disabled={disabled}
116
+ open: open && !value && !readOnly && !disabled, value: !value ? searchText : '', onOpenChange: (e, data) => setOpen(data.open), onChange: (e) => {
117
+ setSearchText(e.target.value);
118
+ }, onOptionSelect: (e, item) => {
119
+ console.log('onOptionSelect', item);
120
+ const _item = data === null || data === void 0 ? void 0 : data.records.find((x) => String(x[schema.idAttribute]) === item.optionValue);
121
+ handleChange(_item !== null && _item !== void 0 ? _item : null);
122
+ }, 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: {
123
+ paddingInline: react_components_1.tokens.spacingHorizontalL,
124
+ paddingBlock: react_components_1.tokens.spacingVerticalS,
125
+ }, 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 }) })] }))] }), !!value && ((0, jsx_runtime_1.jsx)("div", { style: {
126
+ position: 'absolute',
127
+ inset: 0,
128
+ alignItems: 'center',
129
+ paddingInline: 4,
130
+ display: 'flex',
131
+ }, children: (0, jsx_runtime_1.jsx)(react_components_1.TagGroup, { as: "div", children: (0, jsx_runtime_1.jsx)(react_components_1.Tag, { as: "span", appearance: "brand", size: "small", dismissible: !disabled && !readOnly, value: value.id, style: { paddingRight: !disabled && !readOnly ? 0 : 5 }, dismissIcon: (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', cursor: 'pointer' }, onClick: () => {
132
+ onChange === null || onChange === void 0 ? void 0 : onChange(null);
133
+ }, children: (0, jsx_runtime_1.jsx)(icons_1.Icons.Close, { size: 16 }) }), children: allowNavigation && path ? ((0, jsx_runtime_1.jsx)(react_components_1.Link, { href: path, 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 })) }) }) }))] }));
134
+ };
@@ -0,0 +1,6 @@
1
+ import { Lookup } from './SelectControl';
2
+ import { ControlProps } from './types';
3
+ export interface MultiSelectControlProps<T> extends ControlProps<T[]> {
4
+ options: Lookup<T>[];
5
+ }
6
+ export default function MultiSelectControl<T extends string | number>({ value, onChange, options, id, name, disabled, error, onBlur, onFocus, placeholder, }: MultiSelectControlProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = MultiSelectControl;
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 MultiSelectControl({ value, onChange, options, id, name, disabled, error, onBlur, onFocus, placeholder, }) {
8
+ const transformedOptions = (0, react_1.useMemo)(() => options.map((x) => ({ label: x.label, value: String(x.value) })), [options]);
9
+ const handleChange = (value) => {
10
+ const selectedOptions = options.filter((x) => value.includes(String(x.value)));
11
+ onChange === null || onChange === void 0 ? void 0 : onChange(selectedOptions.map((x) => x.value));
12
+ };
13
+ const selectedOptions = (0, react_1.useMemo)(() => options.filter((x) => value === null || value === void 0 ? void 0 : value.includes(x.value)), [options, value]);
14
+ return ((0, jsx_runtime_1.jsx)(react_components_1.Dropdown, { placeholder: placeholder, id: id, name: name, appearance: "filled-darker", multiselect: true, value: selectedOptions.map((x) => x.label).join(', '), selectedOptions: value ? value.map(String) : [], onOptionSelect: (event, data) => {
15
+ handleChange(data.selectedOptions);
16
+ }, onBlur: () => onBlur === null || onBlur === void 0 ? void 0 : onBlur(), onFocus: () => onFocus === null || onFocus === void 0 ? void 0 : onFocus(), disabled: disabled, children: transformedOptions.map((x) => ((0, jsx_runtime_1.jsx)(react_components_1.Option, { value: x.value, children: x.label }, x.value))) }));
17
+ }
@@ -0,0 +1,26 @@
1
+ import { Schema } from '@headless-adminapp/core/schema';
2
+ import { ISchemaExperienceStore } from '@headless-adminapp/core/store';
3
+ import { IDataService } from '@headless-adminapp/core/transport';
4
+ import { ControlProps } from './types';
5
+ export interface LookupOption {
6
+ limit: number;
7
+ search: string;
8
+ enabled?: boolean;
9
+ }
10
+ export type DataLookup = {
11
+ id: string;
12
+ name: string;
13
+ logicalName: string;
14
+ };
15
+ export type MultiSelectLookupControlProps = ControlProps<DataLookup[]> & {
16
+ async?: boolean;
17
+ lookupKey?: string;
18
+ openRecord?: (id: string) => void;
19
+ dataService: IDataService;
20
+ schema: Schema;
21
+ experienceStore: ISchemaExperienceStore;
22
+ viewId?: string;
23
+ allowNavigation?: boolean;
24
+ allowNewRecord?: boolean;
25
+ };
26
+ export declare function MultiSelectLookupControl(props: MultiSelectLookupControlProps): import("react/jsx-runtime").JSX.Element;