@funcd-dev/ui 0.0.0-bootstrap.0

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 (200) hide show
  1. package/Readme.md +10 -0
  2. package/dist/atoms/index.d.ts +1 -0
  3. package/dist/atoms/logo/cnd.d.ts +6 -0
  4. package/dist/atoms/logo/index.d.ts +1 -0
  5. package/dist/auth/auth.context.d.ts +3 -0
  6. package/dist/auth/auth.guard.d.ts +7 -0
  7. package/dist/auth/auth.hooks.d.ts +3 -0
  8. package/dist/auth/auth.provider.d.ts +10 -0
  9. package/dist/auth/index.d.ts +4 -0
  10. package/dist/favicon.svg +1 -0
  11. package/dist/hm-flow/components/canvas-form/canvas-form.d.ts +10 -0
  12. package/dist/hm-flow/components/canvas-form/index.d.ts +1 -0
  13. package/dist/hm-flow/components/header-status/header-status.d.ts +11 -0
  14. package/dist/hm-flow/components/header-status/header-status.types.d.ts +13 -0
  15. package/dist/hm-flow/components/header-status/index.d.ts +2 -0
  16. package/dist/hm-flow/components/hm-flow-bottom/hm-flow-bottom.d.ts +7 -0
  17. package/dist/hm-flow/components/hm-flow-bottom/hm-flow-bottom.type.d.ts +5 -0
  18. package/dist/hm-flow/components/hm-flow-bottom/index.d.ts +3 -0
  19. package/dist/hm-flow/components/hm-flow-header/hm-flow-header.d.ts +7 -0
  20. package/dist/hm-flow/components/hm-flow-header/hm-flow-header.type.d.ts +5 -0
  21. package/dist/hm-flow/components/hm-flow-header/index.d.ts +3 -0
  22. package/dist/hm-flow/components/hm-flow-modal/hm-flow-modal.d.ts +11 -0
  23. package/dist/hm-flow/components/hm-flow-modal/hm-flow-modal.type.d.ts +13 -0
  24. package/dist/hm-flow/components/hm-flow-modal/index.d.ts +3 -0
  25. package/dist/hm-flow/components/hm-flow-sidebar/hm-flow-sidebar.d.ts +11 -0
  26. package/dist/hm-flow/components/hm-flow-sidebar/hm-flow-sidebar.type.d.ts +5 -0
  27. package/dist/hm-flow/components/hm-flow-sidebar/index.d.ts +3 -0
  28. package/dist/hm-flow/components/index.d.ts +9 -0
  29. package/dist/hm-flow/components/node-editor/index.d.ts +1 -0
  30. package/dist/hm-flow/components/node-editor/node-editor.d.ts +7 -0
  31. package/dist/hm-flow/components/node-search/index.d.ts +2 -0
  32. package/dist/hm-flow/components/node-search/nodes-item.d.ts +8 -0
  33. package/dist/hm-flow/components/node-search/nodes-search.d.ts +8 -0
  34. package/dist/hm-flow/components/toolbar/index.d.ts +1 -0
  35. package/dist/hm-flow/components/toolbar/toolbar.d.ts +7 -0
  36. package/dist/hm-flow/components/toolbar/toolbar.types.d.ts +17 -0
  37. package/dist/hm-flow/hm-flow-base.d.ts +18 -0
  38. package/dist/hm-flow/hm-flow-base.types.d.ts +61 -0
  39. package/dist/hm-flow/hm-flow.d.ts +18 -0
  40. package/dist/hm-flow/hm-flow.types.d.ts +60 -0
  41. package/dist/hm-flow/hooks/index.d.ts +7 -0
  42. package/dist/hm-flow/hooks/use-hm-flow-children-deps.d.ts +2 -0
  43. package/dist/hm-flow/hooks/use-hm-flow-interactions.d.ts +28 -0
  44. package/dist/hm-flow/hooks/use-hm-flow-service.d.ts +19 -0
  45. package/dist/hm-flow/hooks/use-hm-flow.d.ts +2 -0
  46. package/dist/hm-flow/hooks/use-nodes-edges-handlers.d.ts +21 -0
  47. package/dist/hm-flow/hooks/use-nodes-service.d.ts +11 -0
  48. package/dist/hm-flow/index.d.ts +9 -0
  49. package/dist/hm-flow/node/index.d.ts +4 -0
  50. package/dist/hm-flow/node/node-wrapper.d.ts +9 -0
  51. package/dist/hm-flow/node/node.d.ts +5 -0
  52. package/dist/hm-flow/node/types.d.ts +35 -0
  53. package/dist/hm-flow/node/utils.d.ts +3 -0
  54. package/dist/hm-flow/provider/hm-flow-children-deps-context.d.ts +5 -0
  55. package/dist/hm-flow/provider/hm-flow-children-deps-provider.d.ts +8 -0
  56. package/dist/hm-flow/provider/hm-flow-context.d.ts +5 -0
  57. package/dist/hm-flow/provider/hm-flow-provider.d.ts +8 -0
  58. package/dist/hm-flow/provider/index.d.ts +5 -0
  59. package/dist/hm-flow/utils.d.ts +5 -0
  60. package/dist/index.d.ts +11 -0
  61. package/dist/index.es.js +6905 -0
  62. package/dist/index.umd.js +1 -0
  63. package/dist/layouts/app-layout/app-layout.d.ts +15 -0
  64. package/dist/layouts/app-layout/index.d.ts +1 -0
  65. package/dist/layouts/bottom-bar/bottom-bar-button.d.ts +12 -0
  66. package/dist/layouts/bottom-bar/bottom-bar.d.ts +8 -0
  67. package/dist/layouts/bottom-bar/index.d.ts +1 -0
  68. package/dist/layouts/header/header.d.ts +8 -0
  69. package/dist/layouts/header/index.d.ts +1 -0
  70. package/dist/layouts/index.d.ts +5 -0
  71. package/dist/layouts/sidebar/index.d.ts +1 -0
  72. package/dist/layouts/sidebar/navbar-button.d.ts +11 -0
  73. package/dist/layouts/sidebar/sidebar.d.ts +7 -0
  74. package/dist/layouts/types/common.d.ts +10 -0
  75. package/dist/layouts/types/index.d.ts +1 -0
  76. package/dist/mantine.theme.d.ts +6 -0
  77. package/dist/molecules/data-grid/data-grid.d.ts +5 -0
  78. package/dist/molecules/data-grid/hm/data-grid-container.d.ts +8 -0
  79. package/dist/molecules/data-grid/hm/hm-data-grid.util.d.ts +7 -0
  80. package/dist/molecules/data-grid/hm/render-checkbox.d.ts +3 -0
  81. package/dist/molecules/data-grid/hm/render-row.d.ts +7 -0
  82. package/dist/molecules/data-grid/hm/types.d.ts +171 -0
  83. package/dist/molecules/data-grid/hm/use-data-gri-parser.hook.d.ts +359 -0
  84. package/dist/molecules/data-grid/hm/use-render-row.hook.d.ts +3 -0
  85. package/dist/molecules/data-grid/hm-data-grid.d.ts +4 -0
  86. package/dist/molecules/data-grid/index.d.ts +2 -0
  87. package/dist/molecules/flow-card/card.d.ts +14 -0
  88. package/dist/molecules/flow-card/index.d.ts +1 -0
  89. package/dist/molecules/hm-chart/hm-chart.util.d.ts +113 -0
  90. package/dist/molecules/hm-chart/index.d.ts +21 -0
  91. package/dist/molecules/hm-drawer.d.ts +5 -0
  92. package/dist/molecules/index.d.ts +9 -0
  93. package/dist/molecules/nav-bar-link.d.ts +7 -0
  94. package/dist/molecules/search-bar/index.d.ts +4 -0
  95. package/dist/molecules/stats-ring/index.d.ts +10 -0
  96. package/dist/molecules/table/HmTableAction.d.ts +8 -0
  97. package/dist/molecules/table/HmTableHead.d.ts +7 -0
  98. package/dist/molecules/table/HmTableRow.d.ts +8 -0
  99. package/dist/molecules/table/index.d.ts +9 -0
  100. package/dist/molecules/table/types.d.ts +15 -0
  101. package/dist/molecules/toggle-theme-mode/index.d.ts +4 -0
  102. package/dist/reactive-chart/chart-builder.d.ts +15 -0
  103. package/dist/reactive-chart/dashboard/chart-group.d.ts +9 -0
  104. package/dist/reactive-chart/dashboard/dynamic-chart.d.ts +12 -0
  105. package/dist/reactive-chart/dashboard/index.d.ts +3 -0
  106. package/dist/reactive-chart/dashboard/reactive-dashboard.d.ts +13 -0
  107. package/dist/reactive-chart/dashboard/types.d.ts +58 -0
  108. package/dist/reactive-chart/dashboard-layout/layout-grid-item.d.ts +10 -0
  109. package/dist/reactive-chart/dashboard-layout/layout-grid.d.ts +8 -0
  110. package/dist/reactive-chart/index.d.ts +3 -0
  111. package/dist/reactive-chart/reactive-charts/index.d.ts +5 -0
  112. package/dist/reactive-chart/reactive-charts/reactive-bar-chart/index.d.ts +2 -0
  113. package/dist/reactive-chart/reactive-charts/reactive-bar-chart/reactive-bar-chart.d.ts +5 -0
  114. package/dist/reactive-chart/reactive-charts/reactive-bar-chart/types.d.ts +11 -0
  115. package/dist/reactive-chart/reactive-charts/reactive-line-chart/index.d.ts +2 -0
  116. package/dist/reactive-chart/reactive-charts/reactive-line-chart/reactive-line-chart.d.ts +5 -0
  117. package/dist/reactive-chart/reactive-charts/reactive-line-chart/types.d.ts +11 -0
  118. package/dist/reactive-chart/reactive-charts/reactive-pie-chart/index.d.ts +2 -0
  119. package/dist/reactive-chart/reactive-charts/reactive-pie-chart/reactive-pie-chart.d.ts +5 -0
  120. package/dist/reactive-chart/reactive-charts/reactive-pie-chart/types.d.ts +12 -0
  121. package/dist/reactive-chart/reactive-charts/types/chart-custom-meta.d.ts +13 -0
  122. package/dist/reactive-chart/reactive-charts/types/chart-custom-props.d.ts +10 -0
  123. package/dist/reactive-chart/reactive-charts/types/index.d.ts +3 -0
  124. package/dist/reactive-chart/reactive-charts/types/reactive-chart-base.d.ts +37 -0
  125. package/dist/reactive-chart/reactive-charts/utils/chart-container.d.ts +13 -0
  126. package/dist/reactive-chart/reactive-charts/utils/chart-option.util.d.ts +9 -0
  127. package/dist/reactive-chart/reactive-charts/utils/index.d.ts +3 -0
  128. package/dist/reactive-chart/reactive-charts/utils/use-chart-rows.d.ts +10 -0
  129. package/dist/reactive-form/form/dynamic-field.d.ts +10 -0
  130. package/dist/reactive-form/form/form-group.d.ts +9 -0
  131. package/dist/reactive-form/form/index.d.ts +3 -0
  132. package/dist/reactive-form/form/reactive-form.d.ts +8 -0
  133. package/dist/reactive-form/form/types.d.ts +25 -0
  134. package/dist/reactive-form/form-builder.d.ts +16 -0
  135. package/dist/reactive-form/form-layout/layout-flex.d.ts +5 -0
  136. package/dist/reactive-form/index.d.ts +3 -0
  137. package/dist/reactive-form/reactive-fields/index.d.ts +14 -0
  138. package/dist/reactive-form/reactive-fields/reactive-autocomplete/index.d.ts +2 -0
  139. package/dist/reactive-form/reactive-fields/reactive-autocomplete/reactive-autocomplete.d.ts +5 -0
  140. package/dist/reactive-form/reactive-fields/reactive-autocomplete/types.d.ts +12 -0
  141. package/dist/reactive-form/reactive-fields/reactive-checkbox/index.d.ts +2 -0
  142. package/dist/reactive-form/reactive-fields/reactive-checkbox/reactive-checkbox.d.ts +5 -0
  143. package/dist/reactive-form/reactive-fields/reactive-checkbox/types.d.ts +4 -0
  144. package/dist/reactive-form/reactive-fields/reactive-list/index.d.ts +2 -0
  145. package/dist/reactive-form/reactive-fields/reactive-list/reactive-list-field.d.ts +5 -0
  146. package/dist/reactive-form/reactive-fields/reactive-list/types.d.ts +10 -0
  147. package/dist/reactive-form/reactive-fields/reactive-multi-select/index.d.ts +2 -0
  148. package/dist/reactive-form/reactive-fields/reactive-multi-select/reactive-multi-select.d.ts +5 -0
  149. package/dist/reactive-form/reactive-fields/reactive-multi-select/types.d.ts +12 -0
  150. package/dist/reactive-form/reactive-fields/reactive-number-field/index.d.ts +2 -0
  151. package/dist/reactive-form/reactive-fields/reactive-number-field/number-field.d.ts +5 -0
  152. package/dist/reactive-form/reactive-fields/reactive-number-field/types.d.ts +6 -0
  153. package/dist/reactive-form/reactive-fields/reactive-password-field/index.d.ts +2 -0
  154. package/dist/reactive-form/reactive-fields/reactive-password-field/reactive-password-field.d.ts +5 -0
  155. package/dist/reactive-form/reactive-fields/reactive-password-field/types.d.ts +11 -0
  156. package/dist/reactive-form/reactive-fields/reactive-radio/index.d.ts +2 -0
  157. package/dist/reactive-form/reactive-fields/reactive-radio/reactive-radio.d.ts +5 -0
  158. package/dist/reactive-form/reactive-fields/reactive-radio/types.d.ts +9 -0
  159. package/dist/reactive-form/reactive-fields/reactive-range/index.d.ts +2 -0
  160. package/dist/reactive-form/reactive-fields/reactive-range/reactive-range.d.ts +5 -0
  161. package/dist/reactive-form/reactive-fields/reactive-range/types.d.ts +18 -0
  162. package/dist/reactive-form/reactive-fields/reactive-select/index.d.ts +2 -0
  163. package/dist/reactive-form/reactive-fields/reactive-select/reactive-select.d.ts +5 -0
  164. package/dist/reactive-form/reactive-fields/reactive-select/types.d.ts +6 -0
  165. package/dist/reactive-form/reactive-fields/reactive-switch/index.d.ts +2 -0
  166. package/dist/reactive-form/reactive-fields/reactive-switch/reactive-switch.d.ts +5 -0
  167. package/dist/reactive-form/reactive-fields/reactive-switch/types.d.ts +4 -0
  168. package/dist/reactive-form/reactive-fields/reactive-text-field/index.d.ts +2 -0
  169. package/dist/reactive-form/reactive-fields/reactive-text-field/reactive-text-field.d.ts +5 -0
  170. package/dist/reactive-form/reactive-fields/reactive-text-field/types.d.ts +4 -0
  171. package/dist/reactive-form/reactive-fields/reactive-textarea-field/index.d.ts +2 -0
  172. package/dist/reactive-form/reactive-fields/reactive-textarea-field/reactive-textarea-field.d.ts +5 -0
  173. package/dist/reactive-form/reactive-fields/reactive-textarea-field/types.d.ts +6 -0
  174. package/dist/reactive-form/reactive-fields/types/field-custom-meta.d.ts +22 -0
  175. package/dist/reactive-form/reactive-fields/types/field-custom-props.d.ts +29 -0
  176. package/dist/reactive-form/reactive-fields/types/field-filter-key.d.ts +6 -0
  177. package/dist/reactive-form/reactive-fields/types/index.d.ts +4 -0
  178. package/dist/reactive-form/reactive-fields/types/reactive-field-base.d.ts +35 -0
  179. package/dist/reactive-form/reactive-fields/utils/field-error-interceptor.d.ts +4 -0
  180. package/dist/reactive-form/reactive-fields/utils/index.d.ts +1 -0
  181. package/dist/template/create-node-form/create-node-form.d.ts +8 -0
  182. package/dist/template/create-node-form/index.d.ts +3 -0
  183. package/dist/template/create-node-form/parameter-block.d.ts +16 -0
  184. package/dist/template/create-node-form/useCreateNodeForm.d.ts +27 -0
  185. package/dist/template/index.d.ts +1 -0
  186. package/dist/theme/index.d.ts +2 -0
  187. package/dist/theme/theme.context.d.ts +10 -0
  188. package/dist/theme/theme.provider.d.ts +8 -0
  189. package/dist/types/common.d.ts +1 -0
  190. package/dist/types/form.d.ts +2 -0
  191. package/dist/types/index.d.ts +5 -0
  192. package/dist/types/nested-props.d.ts +60 -0
  193. package/dist/types/object-utils.d.ts +43 -0
  194. package/dist/types/path-value.d.ts +10 -0
  195. package/dist/ui.css +2 -0
  196. package/dist/utils/async-response-parser.util.d.ts +31 -0
  197. package/dist/utils/data-utils.d.ts +3 -0
  198. package/dist/utils/field-regex.util.d.ts +6 -0
  199. package/dist/utils/index.d.ts +3 -0
  200. package/package.json +115 -0
@@ -0,0 +1,16 @@
1
+ import { ElementType, FunctionComponent } from 'react';
2
+ import { JSONData } from '@/types';
3
+ import { InputType, IReactiveField } from './reactive-fields';
4
+ type FieldMapType<TField extends JSONData, TFormValues extends JSONData = JSONData> = Record<string, ElementType<IReactiveField<TField, TFormValues>>>;
5
+ declare function getField<TField extends JSONData, TFormValues extends JSONData>(field: string): ElementType<IReactiveField<TField, TFormValues>>;
6
+ interface IDefineComponent {
7
+ name: InputType;
8
+ component: FunctionComponent<IReactiveField<any>>;
9
+ }
10
+ declare const defineWidget: (params: IDefineComponent) => void;
11
+ declare const _default: {
12
+ fieldMap: FieldMapType<any, JSONData>;
13
+ defineWidget: typeof defineWidget;
14
+ getField: typeof getField;
15
+ };
16
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { FC, ReactNode } from 'react';
2
+ declare const LayoutFlex: FC<{
3
+ children?: ReactNode;
4
+ }>;
5
+ export default LayoutFlex;
@@ -0,0 +1,3 @@
1
+ export * from './reactive-fields';
2
+ export * from './form';
3
+ export { default as FormBuilder } from './form-builder';
@@ -0,0 +1,14 @@
1
+ export * from './reactive-multi-select';
2
+ export * from './reactive-autocomplete';
3
+ export * from './reactive-checkbox';
4
+ export * from './reactive-number-field';
5
+ export * from './reactive-password-field';
6
+ export * from './reactive-radio';
7
+ export * from './reactive-range';
8
+ export * from './reactive-select';
9
+ export * from './reactive-switch';
10
+ export * from './reactive-text-field';
11
+ export * from './reactive-textarea-field';
12
+ export * from './reactive-list';
13
+ export * from './types';
14
+ export * from './utils';
@@ -0,0 +1,2 @@
1
+ export { default as ReactiveAutocomplete } from './reactive-autocomplete';
2
+ export * from './types';
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { IReactiveField } from '../types';
3
+ import { AutocompleteCustomProps } from './types';
4
+ declare const ReactiveAutocomplete: FC<IReactiveField<AutocompleteCustomProps>>;
5
+ export default ReactiveAutocomplete;
@@ -0,0 +1,12 @@
1
+ import { ComboboxData, MantineSize } from '@mantine/core';
2
+ import { ReactNode } from 'react';
3
+ export type AutocompleteCustomProps = {
4
+ data: ComboboxData;
5
+ size?: MantineSize;
6
+ placeholder?: string;
7
+ limit?: number;
8
+ maxDropdownHeight?: number;
9
+ leftSection?: ReactNode;
10
+ rightSection?: ReactNode;
11
+ onDropdownOpen?: () => void;
12
+ };
@@ -0,0 +1,2 @@
1
+ export { default as ReactiveCheckbox } from './reactive-checkbox';
2
+ export * from './types';
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { IReactiveField } from '../types';
3
+ import { CheckCustomProps } from './types';
4
+ declare const ReactiveCheckbox: FC<IReactiveField<CheckCustomProps>>;
5
+ export default ReactiveCheckbox;
@@ -0,0 +1,4 @@
1
+ import { MantineSize } from '@mantine/core';
2
+ export type CheckCustomProps = {
3
+ size?: MantineSize;
4
+ };
@@ -0,0 +1,2 @@
1
+ export { default as ReactiveListField } from './reactive-list-field';
2
+ export * from './types';
@@ -0,0 +1,5 @@
1
+ import { JSONData } from '@/types';
2
+ import { IReactiveField } from '../types';
3
+ import { ListFieldCustomProps } from './types';
4
+ declare const ReactiveListField: <TFormValues extends JSONData>(props: IReactiveField<ListFieldCustomProps<TFormValues>, TFormValues>) => import("react").JSX.Element;
5
+ export default ReactiveListField;
@@ -0,0 +1,10 @@
1
+ import { IHMColumn } from '@/molecules/table/types';
2
+ import { FieldMeta } from '@/reactive-form/form/types';
3
+ import { MantineSize } from '@mantine/core';
4
+ import { InputType } from '../types';
5
+ import { JSONData } from '@/types';
6
+ export type ListFieldColumnType<TFormValues extends JSONData> = FieldMeta<TFormValues, Exclude<InputType, 'list'>> & Pick<IHMColumn, 'rowRender'>;
7
+ export type ListFieldCustomProps<TFormValues extends JSONData> = {
8
+ size?: MantineSize;
9
+ columns: ListFieldColumnType<TFormValues>[];
10
+ };
@@ -0,0 +1,2 @@
1
+ export { default as ReactiveMultiSelect } from './reactive-multi-select';
2
+ export * from './types';
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { IReactiveField } from '../types';
3
+ import { MultiSelectCustomProps } from './types';
4
+ declare const ReactiveMultiSelect: FC<IReactiveField<MultiSelectCustomProps>>;
5
+ export default ReactiveMultiSelect;
@@ -0,0 +1,12 @@
1
+ import { ComboboxData, MantineSize } from '@mantine/core';
2
+ import { ReactNode } from 'react';
3
+ export type MultiSelectCustomProps = {
4
+ data: ComboboxData;
5
+ size?: MantineSize;
6
+ placeholder?: string;
7
+ limit?: number;
8
+ maxDropdownHeight?: number;
9
+ leftSection?: ReactNode;
10
+ rightSection?: ReactNode;
11
+ onDropdownOpen?: () => void;
12
+ };
@@ -0,0 +1,2 @@
1
+ export { default as ReactiveNumberField } from './number-field';
2
+ export * from './types';
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { IReactiveField } from '../types';
3
+ import { NumberFieldCustomProps } from './types';
4
+ declare const ReactiveNumberField: FC<IReactiveField<NumberFieldCustomProps>>;
5
+ export default ReactiveNumberField;
@@ -0,0 +1,6 @@
1
+ import { MantineSize } from '@mantine/core';
2
+ export type NumberFieldCustomProps = {
3
+ size?: MantineSize;
4
+ max?: number;
5
+ min?: number;
6
+ };
@@ -0,0 +1,2 @@
1
+ export { default as ReactivePasswordField } from './reactive-password-field';
2
+ export * from './types';
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { IReactiveField } from '../types';
3
+ import { PasswordFieldCustomProps } from './types';
4
+ declare const ReactivePasswordField: FC<IReactiveField<PasswordFieldCustomProps>>;
5
+ export default ReactivePasswordField;
@@ -0,0 +1,11 @@
1
+ import { MantineSize } from '@mantine/core';
2
+ import { FC } from 'react';
3
+ export type PasswordFieldCustomProps = {
4
+ /** Adds icon on the left side of input */
5
+ size?: MantineSize;
6
+ leftSection?: React.ReactNode;
7
+ rightSection?: React.ReactNode;
8
+ visibilityToggleIcon?: FC<{
9
+ reveal: boolean;
10
+ }>;
11
+ };
@@ -0,0 +1,2 @@
1
+ export { default as ReactiveRadio } from './reactive-radio';
2
+ export * from './types';
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { IReactiveField } from '../types';
3
+ import { RadioCustomProps } from './types';
4
+ declare const ReactiveRadio: FC<IReactiveField<RadioCustomProps>>;
5
+ export default ReactiveRadio;
@@ -0,0 +1,9 @@
1
+ import { MantineSize } from '@mantine/core';
2
+ export type RadioCustomProps = {
3
+ data: {
4
+ value: string;
5
+ label: string;
6
+ }[];
7
+ /** Space between label and inputs */
8
+ size?: MantineSize;
9
+ };
@@ -0,0 +1,2 @@
1
+ export { default as ReactiveRange } from './reactive-range';
2
+ export * from './types';
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { IReactiveField } from '../types';
3
+ import { RangeCustomProps } from './types';
4
+ declare const ReactiveRange: FC<IReactiveField<RangeCustomProps>>;
5
+ export default ReactiveRange;
@@ -0,0 +1,18 @@
1
+ import { MantineSize } from '@mantine/core';
2
+ export type RangeCustomProps = {
3
+ /** Marks which will be placed on the track */
4
+ marks?: {
5
+ value: number;
6
+ label?: React.ReactNode;
7
+ }[];
8
+ size?: MantineSize;
9
+ step?: number;
10
+ thumbSize?: number;
11
+ /** Thumb children, can be used to add icon */
12
+ thumbChildren?: React.ReactNode;
13
+ max?: number;
14
+ min?: number;
15
+ inverted?: boolean;
16
+ /** A transformation function, to change the scale of the slider */
17
+ scale?: (value: number) => number;
18
+ };
@@ -0,0 +1,2 @@
1
+ export { default as ReactiveSelect } from './reactive-select';
2
+ export * from './types';
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { IReactiveField } from '../types';
3
+ import { SelectCustomProps } from './types';
4
+ declare const ReactiveSelect: FC<IReactiveField<SelectCustomProps>>;
5
+ export default ReactiveSelect;
@@ -0,0 +1,6 @@
1
+ import { ComboboxData, MantineSize } from '@mantine/core';
2
+ export type SelectCustomProps = {
3
+ data: ComboboxData;
4
+ size?: MantineSize;
5
+ onDropdownOpen?: () => void;
6
+ };
@@ -0,0 +1,2 @@
1
+ export { default as ReactiveSwitch } from './reactive-switch';
2
+ export * from './types';
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { IReactiveField } from '../types';
3
+ import { SwitchCustomProps } from './types';
4
+ declare const ReactiveSwitch: FC<IReactiveField<SwitchCustomProps>>;
5
+ export default ReactiveSwitch;
@@ -0,0 +1,4 @@
1
+ import { MantineSize } from '@mantine/core';
2
+ export type SwitchCustomProps = {
3
+ size?: MantineSize;
4
+ };
@@ -0,0 +1,2 @@
1
+ export { default as ReactiveTextField } from './reactive-text-field';
2
+ export * from './types';
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { IReactiveField } from '../types';
3
+ import { TextFieldCustomProps } from './types';
4
+ declare const ReactiveTextField: FC<IReactiveField<TextFieldCustomProps>>;
5
+ export default ReactiveTextField;
@@ -0,0 +1,4 @@
1
+ import { MantineSize } from '@mantine/core';
2
+ export type TextFieldCustomProps = {
3
+ size?: MantineSize;
4
+ };
@@ -0,0 +1,2 @@
1
+ export { default as ReactiveTextareaField } from './reactive-textarea-field';
2
+ export * from './types';
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { IReactiveField } from '../types';
3
+ import { TextareaFieldCustomProps } from './types';
4
+ declare const ReactiveTextareaField: FC<IReactiveField<TextareaFieldCustomProps>>;
5
+ export default ReactiveTextareaField;
@@ -0,0 +1,6 @@
1
+ import { MantineSize } from '@mantine/core';
2
+ export type TextareaFieldCustomProps = {
3
+ size?: MantineSize;
4
+ minRows?: number;
5
+ maxRows?: number;
6
+ };
@@ -0,0 +1,22 @@
1
+ import { JSONData } from '@/types';
2
+ import { ICustomProps } from './field-custom-props';
3
+ import { InputType } from './reactive-field-base';
4
+ type CustomProps<TInputType extends InputType, TFormValues extends JSONData> = {
5
+ customProps: ICustomProps<TFormValues>[TInputType];
6
+ };
7
+ export type ConditionalProp<TInputType extends InputType, TFormValues extends JSONData = JSONData, IsPartialProps extends boolean = false> = IsPartialProps extends true ? Partial<CustomProps<TInputType, TFormValues>> : CustomProps<TInputType, TFormValues>;
8
+ export interface IConditionalProp<TFormValues extends JSONData> {
9
+ autocomplete: ConditionalProp<'autocomplete', TFormValues>;
10
+ text: ConditionalProp<'text', TFormValues, true>;
11
+ textarea: ConditionalProp<'textarea', TFormValues, true>;
12
+ password: ConditionalProp<'password', TFormValues, true>;
13
+ number: ConditionalProp<'number', TFormValues, true>;
14
+ checkbox: ConditionalProp<'checkbox', TFormValues, true>;
15
+ switch: ConditionalProp<'switch', TFormValues, true>;
16
+ select: ConditionalProp<'select', TFormValues, true>;
17
+ radio: ConditionalProp<'radio', TFormValues>;
18
+ range: ConditionalProp<'range', TFormValues>;
19
+ 'multi-select': ConditionalProp<'multi-select', TFormValues>;
20
+ list: ConditionalProp<'list'>;
21
+ }
22
+ export {};
@@ -0,0 +1,29 @@
1
+ import { JSONData } from '@/types';
2
+ import { AutocompleteCustomProps } from '../reactive-autocomplete';
3
+ import { CheckCustomProps } from '../reactive-checkbox';
4
+ import { MultiSelectCustomProps } from '../reactive-multi-select';
5
+ import { NumberFieldCustomProps } from '../reactive-number-field';
6
+ import { PasswordFieldCustomProps } from '../reactive-password-field';
7
+ import { RadioCustomProps } from '../reactive-radio';
8
+ import { RangeCustomProps } from '../reactive-range';
9
+ import { SelectCustomProps } from '../reactive-select';
10
+ import { SwitchCustomProps } from '../reactive-switch';
11
+ import { TextFieldCustomProps } from '../reactive-text-field';
12
+ import { CommonProps, InputType } from './reactive-field-base';
13
+ import { ListFieldCustomProps } from '../reactive-list';
14
+ import { TextareaFieldCustomProps } from '../reactive-textarea-field';
15
+ export type CustomPropsType = Record<InputType, any>;
16
+ export interface ICustomProps<TFormValues extends JSONData> {
17
+ autocomplete: CommonProps<AutocompleteCustomProps, TFormValues>;
18
+ text: CommonProps<TextFieldCustomProps, TFormValues>;
19
+ textarea: CommonProps<TextareaFieldCustomProps, TFormValues>;
20
+ password: CommonProps<PasswordFieldCustomProps, TFormValues>;
21
+ number: CommonProps<NumberFieldCustomProps, TFormValues>;
22
+ checkbox: CommonProps<CheckCustomProps, TFormValues>;
23
+ switch: CommonProps<SwitchCustomProps, TFormValues>;
24
+ select: CommonProps<SelectCustomProps, TFormValues>;
25
+ radio: CommonProps<RadioCustomProps, TFormValues>;
26
+ range: CommonProps<RangeCustomProps, TFormValues>;
27
+ 'multi-select': CommonProps<MultiSelectCustomProps, TFormValues>;
28
+ list: CommonProps<ListFieldCustomProps<TFormValues>, TFormValues>;
29
+ }
@@ -0,0 +1,6 @@
1
+ import { DeepOmitVariableKind, JSONData } from '@/types';
2
+ export interface IFilterKeys<TFormValues extends JSONData> {
3
+ text: DeepOmitVariableKind<TFormValues, boolean | any[]>;
4
+ checkbox: DeepOmitVariableKind<TFormValues, number | any[] | string>;
5
+ switch: DeepOmitVariableKind<TFormValues, number | any[] | string>;
6
+ }
@@ -0,0 +1,4 @@
1
+ export * from './reactive-field-base';
2
+ export * from './field-custom-props';
3
+ export * from './field-custom-meta';
4
+ export * from './field-filter-key';
@@ -0,0 +1,35 @@
1
+ import { Ref } from 'react';
2
+ import { RegisterOptions } from 'react-hook-form';
3
+ import { JSONData, Simplify } from '@/types';
4
+ import { FormProps } from '../../../types/form';
5
+ export type InputType = 'text' | 'textarea' | 'number' | 'password' | 'checkbox' | 'switch' | 'select' | 'multi-select' | 'radio' | 'range' | 'autocomplete' | 'list';
6
+ export type FormFieldOption<TFieldValues extends JSONData> = RegisterOptions<TFieldValues>;
7
+ export type ErrorFormType = {
8
+ type: string;
9
+ message: string;
10
+ ref: Ref<HTMLElement>;
11
+ };
12
+ export type ReactiveFieldErrorType = ErrorFormType | Record<string, any>;
13
+ export type ReactiveFieldProps<TFieldProps extends JSONData> = Simplify<{
14
+ 'data-testid': string;
15
+ } & TFieldProps>;
16
+ export interface IReactiveField<TFieldProps extends JSONData, TFormValues extends JSONData = JSONData> {
17
+ /** Key is used for register, input id and array map key */
18
+ fieldKey: string;
19
+ /** label is used for the input displayed name */
20
+ label: string;
21
+ /** react-hook-form register's options */
22
+ options?: FormFieldOption<TFormValues>;
23
+ form: FormProps<TFormValues>;
24
+ customProps: CommonProps<TFieldProps, TFormValues>;
25
+ error?: ReactiveFieldErrorType;
26
+ }
27
+ export type ReactiveFieldStoryType<TFieldProps extends JSONData, TFormValues extends JSONData = JSONData> = Omit<IReactiveField<TFieldProps, TFormValues>, 'error' | 'form'>;
28
+ export type CommonProps<TFieldProps extends JSONData, TFormValues extends JSONData = JSONData> = {
29
+ disabled?: boolean;
30
+ hidden?: boolean;
31
+ handleChange?: (params: {
32
+ form: FormProps<TFormValues>;
33
+ event: any;
34
+ }) => void;
35
+ } & TFieldProps;
@@ -0,0 +1,4 @@
1
+ import { ReactiveFieldErrorType } from '@/reactive-form/reactive-fields/types';
2
+ export declare const getError: (fieldKey: string, errors: ReactiveFieldErrorType) => any;
3
+ export declare const errorsArrayToObject: (errorsArray: ReactiveFieldErrorType[], listKey: string) => Record<string, ReactiveFieldErrorType>;
4
+ export declare const getMantineError: (error: ReactiveFieldErrorType | undefined) => string | boolean;
@@ -0,0 +1 @@
1
+ export * from './field-error-interceptor';
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ import { useCreateNodeForm } from './useCreateNodeForm';
3
+ interface ICreateNodeForm {
4
+ submitButtonText: string;
5
+ onSubmit: (formValues: ReturnType<typeof useCreateNodeForm>['formValues'], parameters: ReturnType<typeof useCreateNodeForm>['parameters'], wasmFile: File | null) => void;
6
+ }
7
+ declare const CreateNodeForm: FC<ICreateNodeForm>;
8
+ export default CreateNodeForm;
@@ -0,0 +1,3 @@
1
+ export { default as CreateNodeForm } from './create-node-form';
2
+ export type { IParameter } from './parameter-block';
3
+ export * from './useCreateNodeForm';
@@ -0,0 +1,16 @@
1
+ import { FC } from 'react';
2
+ export interface IParameter {
3
+ name: string;
4
+ defaultValue: string;
5
+ type: string;
6
+ description: string;
7
+ required: boolean;
8
+ }
9
+ interface IParameterBlock {
10
+ index: number;
11
+ param: IParameter;
12
+ onUpdate: <K extends keyof IParameter>(index: number, field: K, value: IParameter[K]) => void;
13
+ onDelete: () => void;
14
+ }
15
+ declare const ParameterBlock: FC<IParameterBlock>;
16
+ export default ParameterBlock;
@@ -0,0 +1,27 @@
1
+ export interface IFormValues {
2
+ name: string;
3
+ label: string;
4
+ icon: File | Blob | null;
5
+ color: string;
6
+ version: string;
7
+ description: string;
8
+ }
9
+ export interface IParameter {
10
+ name: string;
11
+ defaultValue: string;
12
+ type: string;
13
+ description: string;
14
+ required: boolean;
15
+ }
16
+ export declare const initialFormValues: IFormValues;
17
+ export declare const useCreateNodeForm: () => {
18
+ formValues: IFormValues;
19
+ updateFormValue: <K extends keyof IFormValues>(field: K, value: IFormValues[K]) => void;
20
+ parameters: IParameter[];
21
+ addParameter: () => void;
22
+ updateParameter: <K extends keyof IParameter>(index: number, field: K, value: IParameter[K]) => void;
23
+ deleteParameter: (index: number) => void;
24
+ wasmFile: File | null;
25
+ setWasmFile: import("react").Dispatch<import("react").SetStateAction<File | null>>;
26
+ resetForm: () => void;
27
+ };
@@ -0,0 +1 @@
1
+ export * from './create-node-form';
@@ -0,0 +1,2 @@
1
+ export { default as HMThemeProvider } from './theme.provider';
2
+ export type { IThemeContext } from './theme.context';
@@ -0,0 +1,10 @@
1
+ export interface IThemeContext {
2
+ }
3
+ /**
4
+ * HMR breaks by Vitejs with React context provider
5
+ * The workaround is to dedicate a seperate file for context and his related provider
6
+ * @see https://github.com/vitejs/vite/issues/3301#issuecomment-1192661323
7
+ * work in progress to resolve this vitejs isssue
8
+ * @see https://github.com/vitejs/vite/issues/3301#issuecomment-1257374648
9
+ */
10
+ export declare const ThemeContext: import("react").Context<IThemeContext>;
@@ -0,0 +1,8 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { IThemeContext } from './theme.context';
3
+ interface IThemeProvider {
4
+ theme: IThemeContext;
5
+ children: ReactNode;
6
+ }
7
+ declare const ThemeProvider: FC<IThemeProvider>;
8
+ export default ThemeProvider;
@@ -0,0 +1 @@
1
+ export type JSONData = Record<string, any>;
@@ -0,0 +1,2 @@
1
+ import type { UseFormReturn } from 'react-hook-form';
2
+ export type FormProps<T extends Record<string, any>> = UseFormReturn<T>;
@@ -0,0 +1,5 @@
1
+ export * from './form';
2
+ export * from './nested-props';
3
+ export * from './common';
4
+ export * from './object-utils';
5
+ export * from './path-value';
@@ -0,0 +1,60 @@
1
+ /**
2
+ * @see https://gist.github.com/staltz/368866ea6b8a167fbdac58cddf79c1bf?permalink_comment_id=3805194#gistcomment-3805194
3
+ * @see https://dev.to/pffigueiredo/typescript-utility-keyof-nested-object-2pa3
4
+ * @see https://steveholgado.com/typescript-types-from-arrays/
5
+ */
6
+ /**
7
+ * not implemented yet @see https://github.com/microsoft/TypeScript/issues/34933
8
+ */
9
+ export type NestedKeyOf<DynamicValue extends object> = {
10
+ [Key in keyof DynamicValue & (string | number)]: DynamicValue[Key] extends any[] ? `${Key}` : DynamicValue[Key] extends object ? `${Key}.${NestedKeyOf2<DynamicValue[Key]>}` : `${Key}`;
11
+ }[keyof DynamicValue & (string | number)];
12
+ type NestedKeyOf2<DynamicValue extends object> = {
13
+ [Key in keyof DynamicValue & (string | number)]: DynamicValue[Key] extends any[] ? `${Key}` : DynamicValue[Key] extends object ? `${Key}.${NestedKeyOf3<DynamicValue[Key]>}` : `${Key}`;
14
+ }[keyof DynamicValue & (string | number)];
15
+ type NestedKeyOf3<DynamicValue extends object> = {
16
+ [Key in keyof DynamicValue & (string | number)]: DynamicValue[Key] extends any[] ? `${Key}` : DynamicValue[Key] extends object ? `${Key}.${NestedKeyOf4<DynamicValue[Key]>}` : `${Key}`;
17
+ }[keyof DynamicValue & (string | number)];
18
+ type NestedKeyOf4<DynamicValue extends object> = {
19
+ [Key in keyof DynamicValue & (string | number)]: DynamicValue[Key] extends any[] ? `${Key}` : DynamicValue[Key] extends object ? `${Key}.${NestedKeyOf5<DynamicValue[Key]>}` : `${Key}`;
20
+ }[keyof DynamicValue & (string | number)];
21
+ type NestedKeyOf5<DynamicValue extends object> = {
22
+ [Key in keyof DynamicValue & (string | number)]: `${Key}`;
23
+ }[keyof DynamicValue & (string | number)];
24
+ /** Union of primitives to skip with deep omit utilities. */
25
+ export type Primitive = string | number | boolean | undefined | null;
26
+ /** Variable Kind */
27
+ type VariableKind = string | number | boolean;
28
+ /**
29
+ * @see https://gist.github.com/ahuggins-nhs/826906a58e4c1e59306bc0792e7826d1
30
+ */
31
+ /** Deeply omit members of an array of interface or array of type. */
32
+ export type DeepOmitArray<T extends object[], K> = {
33
+ [P in keyof T]: DeepOmit<T[P], K>;
34
+ };
35
+ export type DeepOmit<T, K> = T extends Primitive ? T : {
36
+ [P in Exclude<keyof T, K>]: T[P] extends infer TP ? TP extends Primitive[] ? TP : TP extends object[] ? DeepOmitArray<TP, K> : TP extends Primitive ? TP : DeepOmit<TP, K> : never;
37
+ };
38
+ /**
39
+ * Omit given variable
40
+ */
41
+ export type DeepOmitVariableKind<T, U extends VariableKind | Primitive[] | Record<string, any>[] | any[]> = {
42
+ [P in Exclude<keyof T, GetKeyKind<T, U>>]: T[P] extends infer TP ? TP extends any[] ? TP : TP extends object ? DeepOmitVariableKind<TP, U> : TP : never;
43
+ };
44
+ type GetKeyKind<T, U extends VariableKind | Primitive[] | Record<string, any>[]> = {
45
+ [K in keyof T]: T[K] extends U ? K : never;
46
+ }[keyof T];
47
+ export type DeepNonNullable<T> = T extends Primitive ? T : {
48
+ [P in keyof T]: T[P] extends infer TP ? TP extends object ? DeepNonNullable<TP> : NonNullable<TP> : never;
49
+ };
50
+ /**
51
+ * Deep remove undefined
52
+ */
53
+ export type DeepRequired<T> = {
54
+ [P in keyof T]-?: DeepRequired<T[P]>;
55
+ };
56
+ export type MakeOptional<T, K extends keyof T> = Omit<T, K> & Partial<T>;
57
+ export {};
58
+ /**
59
+ * below is a test for NestedKeyOf
60
+ */