@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
package/Readme.md ADDED
@@ -0,0 +1,10 @@
1
+ # Blog
2
+
3
+ - React Component Library with Vite and Deploy in NPM : https://articles.wesionary.team/react-component-library-with-vite-and-deploy-in-npm-579c2880d6ff
4
+
5
+ - Create a React component library with Vite and Typescript : https://dev.to/nicolaserny/create-a-react-component-library-with-vite-and-typescript-1ih9
6
+
7
+ # Storybook
8
+
9
+ - configure storybook with mantine : https://mantine.dev/guides/storybook/
10
+ - Supporting Vitest : https://github.com/storybookjs/storybook/issues/17326
@@ -0,0 +1 @@
1
+ export * from './logo';
@@ -0,0 +1,6 @@
1
+ import { FC, SVGProps } from 'react';
2
+ interface ICNDIcon extends SVGProps<SVGSVGElement> {
3
+ color?: string;
4
+ }
5
+ declare const CNDIcon: FC<ICNDIcon>;
6
+ export default CNDIcon;
@@ -0,0 +1 @@
1
+ export { default as CNDIcon } from './cnd';
@@ -0,0 +1,3 @@
1
+ import Keycloak from 'keycloak-js';
2
+ declare const KeycloakContext: import("react").Context<Keycloak>;
3
+ export default KeycloakContext;
@@ -0,0 +1,7 @@
1
+ import { ReactNode, FC } from 'react';
2
+ interface IKeycloakGuard {
3
+ children: ReactNode;
4
+ fallback?: ReactNode;
5
+ }
6
+ declare const KeycloakGuard: FC<IKeycloakGuard>;
7
+ export default KeycloakGuard;
@@ -0,0 +1,3 @@
1
+ import Keycloak from 'keycloak-js';
2
+ declare function useKeycloak(): Keycloak;
3
+ export default useKeycloak;
@@ -0,0 +1,10 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import Keycloak from 'keycloak-js';
3
+ export interface IKeycloakProviderProps {
4
+ keycloak: Keycloak;
5
+ onLoad?: 'check-sso' | 'login-required';
6
+ }
7
+ declare const KeycloakProvider: FC<IKeycloakProviderProps & {
8
+ children: ReactNode;
9
+ }>;
10
+ export default KeycloakProvider;
@@ -0,0 +1,4 @@
1
+ export { default as AuthProvider } from './auth.provider';
2
+ export * from './auth.provider';
3
+ export { default as useAuth } from './auth.hooks';
4
+ export { default as AuthGuard } from './auth.guard';
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
@@ -0,0 +1,10 @@
1
+ import { IReactiveFieldMeta } from '@/reactive-form';
2
+ import { DefaultValues } from 'react-hook-form';
3
+ interface ICanvasForm<T extends Record<string, any>> {
4
+ submitButtonText: string;
5
+ meta: IReactiveFieldMeta<T>[];
6
+ defaultValues: DefaultValues<T>;
7
+ onSubmit: (submitedData: T) => void;
8
+ }
9
+ declare const CanvasForm: <T extends Record<string, any>>(props: ICanvasForm<T>) => import("react").JSX.Element;
10
+ export default CanvasForm;
@@ -0,0 +1 @@
1
+ export { default as CanvasForm } from './canvas-form';
@@ -0,0 +1,11 @@
1
+ import { FC } from 'react';
2
+ import { IHeaderAction } from './header-status.types';
3
+ export type HmFlowHeaderStatus = 'green' | 'red' | 'yellow' | 'purple' | 'orange';
4
+ interface IHmFlowHeader {
5
+ title: string;
6
+ textStatus: string;
7
+ color?: HmFlowHeaderStatus;
8
+ actions: IHeaderAction[];
9
+ }
10
+ declare const HeaderStatus: FC<IHmFlowHeader>;
11
+ export default HeaderStatus;
@@ -0,0 +1,13 @@
1
+ import { ActionHandlerDepsType } from '@/hm-flow/node';
2
+ import { JSX } from 'react';
3
+ export interface IHeaderActionsHandlersParams {
4
+ deps: ActionHandlerDepsType;
5
+ }
6
+ export type HeaderActionHandlerType = (params: IHeaderActionsHandlersParams) => void;
7
+ export type HeaderActionType = 'edit';
8
+ export interface IHeaderAction {
9
+ name: string;
10
+ type: HeaderActionType;
11
+ icon: JSX.Element;
12
+ onClick: (params: IHeaderActionsHandlersParams) => void;
13
+ }
@@ -0,0 +1,2 @@
1
+ export { default as HeaderStatus } from './header-status';
2
+ export type { HmFlowHeaderStatus } from './header-status';
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { IHmFlowBottomItem } from './hm-flow-bottom.type';
3
+ export interface IHmFlowBottomProps {
4
+ items: IHmFlowBottomItem[];
5
+ }
6
+ declare const HmFlowBottom: FC<IHmFlowBottomProps>;
7
+ export default HmFlowBottom;
@@ -0,0 +1,5 @@
1
+ import { ComponentType } from 'react';
2
+ export interface IHmFlowBottomItem {
3
+ name: string;
4
+ component: ComponentType<any>;
5
+ }
@@ -0,0 +1,3 @@
1
+ export { default as HmFlowBottom } from './hm-flow-bottom';
2
+ export type { IHmFlowBottomProps } from './hm-flow-bottom';
3
+ export * from './hm-flow-bottom.type';
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { IHmFlowHeaderItem } from './hm-flow-header.type';
3
+ export interface IHmFlowHeaderProps {
4
+ items: IHmFlowHeaderItem[];
5
+ }
6
+ declare const HmFlowHeader: FC<IHmFlowHeaderProps>;
7
+ export default HmFlowHeader;
@@ -0,0 +1,5 @@
1
+ import { ComponentType } from 'react';
2
+ export interface IHmFlowHeaderItem {
3
+ name: string;
4
+ component: ComponentType<any>;
5
+ }
@@ -0,0 +1,3 @@
1
+ export { default as HmFlowHeader } from './hm-flow-header';
2
+ export type { IHmFlowHeaderProps } from './hm-flow-header';
3
+ export * from './hm-flow-header.type';
@@ -0,0 +1,11 @@
1
+ import { FC, SetStateAction } from 'react';
2
+ import { IHmFlowModalItem } from './hm-flow-modal.type';
3
+ export interface IHmFlowModalProps {
4
+ items: IHmFlowModalItem[];
5
+ modalOpened: boolean;
6
+ currentModalTab: string | null;
7
+ testMode?: boolean;
8
+ setModalOpened: (value: SetStateAction<boolean>) => void;
9
+ }
10
+ declare const HmFlowModal: FC<IHmFlowModalProps>;
11
+ export default HmFlowModal;
@@ -0,0 +1,13 @@
1
+ import { Node } from '@xyflow/react';
2
+ import { ComponentType, Dispatch, SetStateAction } from 'react';
3
+ export interface IHmFlowModalItemProps {
4
+ nodes: Node[];
5
+ currentNode: any;
6
+ setNodes: React.Dispatch<React.SetStateAction<Node[]>>;
7
+ setCurrentNode: Dispatch<SetStateAction<any>>;
8
+ onUpdateNode: (node: Node) => void;
9
+ }
10
+ export interface IHmFlowModalItem {
11
+ name: string;
12
+ component: ComponentType<any>;
13
+ }
@@ -0,0 +1,3 @@
1
+ export { default as HmFlowModal } from './hm-flow-modal';
2
+ export type { IHmFlowModalProps } from './hm-flow-modal';
3
+ export * from './hm-flow-modal.type';
@@ -0,0 +1,11 @@
1
+ import { FC } from 'react';
2
+ import { IHmFlowSideBarItem } from './hm-flow-sidebar.type';
3
+ export interface IHmFlowSideBarProps {
4
+ items: IHmFlowSideBarItem[];
5
+ drawerOpened: boolean;
6
+ onDrawerClose: () => void;
7
+ currentTab: string | null;
8
+ testMode?: boolean;
9
+ }
10
+ declare const HmFlowSideBar: FC<IHmFlowSideBarProps>;
11
+ export default HmFlowSideBar;
@@ -0,0 +1,5 @@
1
+ import { ComponentType } from 'react';
2
+ export interface IHmFlowSideBarItem {
3
+ name: string;
4
+ component: ComponentType<any>;
5
+ }
@@ -0,0 +1,3 @@
1
+ export { default as HmFlowSideBar } from './hm-flow-sidebar';
2
+ export type { IHmFlowSideBarProps } from './hm-flow-sidebar';
3
+ export * from './hm-flow-sidebar.type';
@@ -0,0 +1,9 @@
1
+ export * from './header-status';
2
+ export * from './hm-flow-bottom';
3
+ export * from './hm-flow-header';
4
+ export * from './hm-flow-modal';
5
+ export * from './hm-flow-sidebar';
6
+ export * from './node-editor';
7
+ export * from './node-search';
8
+ export * from './canvas-form';
9
+ export * from './toolbar';
@@ -0,0 +1 @@
1
+ export { default as NodeEditor } from './node-editor';
@@ -0,0 +1,7 @@
1
+ import { IActionsHandlersParams } from '@/hm-flow';
2
+ import { FC } from 'react';
3
+ interface IPreviewToEditNodeProps {
4
+ onUpdateNode: (params: IActionsHandlersParams) => void;
5
+ }
6
+ declare const NodeEditor: FC<IPreviewToEditNodeProps>;
7
+ export default NodeEditor;
@@ -0,0 +1,2 @@
1
+ export { default as NodesItem } from './nodes-item';
2
+ export { default as NodesSearch } from './nodes-search';
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ export interface INodesItemProps {
3
+ img: string;
4
+ label: string;
5
+ onSelect: (label: string) => void;
6
+ }
7
+ declare const NodesItem: FC<INodesItemProps>;
8
+ export default NodesItem;
@@ -0,0 +1,8 @@
1
+ import { INodeAction, IPyNode } from '@/hm-flow';
2
+ import { FC } from 'react';
3
+ interface INodesSearchProps {
4
+ searchItems: IPyNode[];
5
+ actions: INodeAction[];
6
+ }
7
+ declare const NodesSearch: FC<INodesSearchProps>;
8
+ export default NodesSearch;
@@ -0,0 +1 @@
1
+ export { default as Toolbar } from './toolbar';
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { IToolbarAction } from './toolbar.types';
3
+ interface IToolbar {
4
+ actions: IToolbarAction[];
5
+ }
6
+ declare const Toolbar: FC<IToolbar>;
7
+ export default Toolbar;
@@ -0,0 +1,17 @@
1
+ import { ActionHandlerDepsType } from '@/hm-flow/node/types';
2
+ import { JSX } from 'react';
3
+ export type ToolbarActionType = 'save' | 'layout' | 'run' | 'deleteFlow';
4
+ export type ToolbarPosition = 'main' | 'left' | 'right';
5
+ export interface ToolbarActionsHandlersParams {
6
+ deps: ActionHandlerDepsType;
7
+ }
8
+ export type ToolbarActionHandlerType = (params: ToolbarActionsHandlersParams) => void;
9
+ export interface IToolbarAction {
10
+ name: string;
11
+ variant?: string;
12
+ type: ToolbarActionType;
13
+ icon: JSX.Element;
14
+ position?: ToolbarPosition;
15
+ color?: 'default' | 'primary' | 'info' | 'success' | 'warning' | 'danger';
16
+ onClick: (params: ToolbarActionsHandlersParams) => void;
17
+ }
@@ -0,0 +1,18 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import type { NodeBase } from '@xyflow/system';
3
+ import { IHmFlowModalProps, IHmFlowSideBarProps } from './components';
4
+ import { IInitialNodeData, ICanvasConfigs } from './hm-flow.types';
5
+ import { ActionHandlerDepsType, PyNodeDataWithActionType } from './node';
6
+ export interface IHmFlowBase {
7
+ initialData?: IInitialNodeData;
8
+ canvasConfig?: ICanvasConfigs;
9
+ sideBarComponent: (params: Omit<IHmFlowSideBarProps, 'items'>) => ReactNode;
10
+ modalComponent: (params: Omit<IHmFlowModalProps, 'items'>) => ReactNode;
11
+ bottomComponent: () => ReactNode;
12
+ headerComponent: () => ReactNode;
13
+ onCanvasDoubleClick: (deps: ActionHandlerDepsType) => void;
14
+ onCanvasDoubleClicked?: (deps: ActionHandlerDepsType) => void;
15
+ onNodeDoubleClick: (event: React.MouseEvent, node: NodeBase<PyNodeDataWithActionType>, deps: ActionHandlerDepsType) => void;
16
+ }
17
+ declare const HmFlowBase: FC<IHmFlowBase>;
18
+ export default HmFlowBase;
@@ -0,0 +1,61 @@
1
+ import { Edge, Node, ReactFlowJsonObject, XYPosition } from '@xyflow/react';
2
+ import { SetViewport } from '@xyflow/system';
3
+ import { Dispatch, RefObject, SetStateAction } from 'react';
4
+ import { PyNodeDataWithActionType } from './node';
5
+ export interface ICanvasDoubleClickParams {
6
+ reactFlowWrapper: RefObject<HTMLDivElement>;
7
+ screenToFlowPosition: (clientPosition: XYPosition, options?: {
8
+ snapToGrid: boolean;
9
+ }) => XYPosition;
10
+ setCurrentTab: Dispatch<SetStateAction<string | null>>;
11
+ setClickedPosition: Dispatch<SetStateAction<{
12
+ x: number;
13
+ y: number;
14
+ } | null>>;
15
+ setDrawerOpened: Dispatch<SetStateAction<boolean>>;
16
+ }
17
+ export interface IOnNodeDoubleClick {
18
+ setCurrentModalTab: Dispatch<SetStateAction<string | null>>;
19
+ setModalOpened: Dispatch<SetStateAction<boolean>>;
20
+ setCurrentNode: Dispatch<SetStateAction<any>>;
21
+ }
22
+ export interface ICanvasDeps {
23
+ clickedPosition: {
24
+ x: number;
25
+ y: number;
26
+ } | null;
27
+ setClickedPosition: Dispatch<SetStateAction<{
28
+ x: number;
29
+ y: number;
30
+ } | null>>;
31
+ reactFlowWrapper: RefObject<HTMLDivElement>;
32
+ }
33
+ export interface IDrawerDeps {
34
+ setDrawerOpened: Dispatch<SetStateAction<boolean>>;
35
+ setCurrentTab: Dispatch<SetStateAction<string | null>>;
36
+ }
37
+ export interface IModalDeps {
38
+ setCurrentModalTab: Dispatch<SetStateAction<string | null>>;
39
+ setModalOpened: Dispatch<SetStateAction<boolean>>;
40
+ }
41
+ export interface INodeDeps {
42
+ nodes: Node[];
43
+ edges: Edge[];
44
+ stateJoinsNode: boolean;
45
+ setStateJoinsNode: Dispatch<SetStateAction<boolean>>;
46
+ currentNode: Node | null;
47
+ setCurrentNode: Dispatch<SetStateAction<any>>;
48
+ nodeCounters: Record<string, number>;
49
+ setNodes: Dispatch<SetStateAction<Node[]>>;
50
+ setEdges: Dispatch<SetStateAction<Edge[]>>;
51
+ setNodeCounters: Dispatch<SetStateAction<Record<string, number>>>;
52
+ }
53
+ export interface IReactFlowDeps {
54
+ screenToFlowPosition: (clientPosition: XYPosition, options?: {
55
+ snapToGrid: boolean;
56
+ }) => XYPosition;
57
+ toObject: () => ReactFlowJsonObject<Node<PyNodeDataWithActionType>, Edge>;
58
+ setViewport: SetViewport;
59
+ onLayout: (direction: string) => void;
60
+ }
61
+ export type HmFlowChildrenDepsType = IDrawerDeps & IModalDeps & INodeDeps & ICanvasDeps & IReactFlowDeps;
@@ -0,0 +1,18 @@
1
+ import { FC } from 'react';
2
+ import { HmFlowHeaderStatus } from './components';
3
+ import { ICanvasConfigs, IHmFlowData } from './hm-flow.types';
4
+ import { ActionHandlerDepsType, INodeAction, IPyNode } from './node';
5
+ export interface IHmFlow {
6
+ searchItems: IPyNode[];
7
+ defaultHmFlowData: IHmFlowData;
8
+ canvasConfig?: ICanvasConfigs;
9
+ color?: HmFlowHeaderStatus;
10
+ textStatus: string;
11
+ onCanvasDoubleClicked?: (deps: ActionHandlerDepsType) => void;
12
+ onHmflowSave?: (flow: IHmFlowData) => void;
13
+ onHmflowRun?: (flow: IHmFlowData) => void;
14
+ onHmflowDelete?: () => void;
15
+ }
16
+ export declare const defaultActions: INodeAction[];
17
+ declare const HmFlow: FC<IHmFlow>;
18
+ export default HmFlow;
@@ -0,0 +1,60 @@
1
+ import { BackgroundVariant, ColorMode, Edge, Node, NodeTypes, PanelPosition, Viewport } from '@xyflow/react';
2
+ import { CSSProperties } from 'react';
3
+ import { ActionHandlerDepsType, PyNodeDataWithActionType } from './node';
4
+ export type IInitialNodeData = {
5
+ nodes?: Node[];
6
+ edges?: Edge[];
7
+ };
8
+ export type HmFlowSpacingType = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number;
9
+ export interface IHmFlowActionsHandlersParams {
10
+ deps: ActionHandlerDepsType;
11
+ }
12
+ export type HmFlowNodeTypes = NodeTypes;
13
+ export declare const HmFlowBackgroundVariant: {
14
+ readonly dots: BackgroundVariant.Dots;
15
+ readonly cross: BackgroundVariant.Cross;
16
+ readonly lines: BackgroundVariant.Lines;
17
+ };
18
+ export type HmFlowBackgroundVariantType = keyof typeof HmFlowBackgroundVariant;
19
+ export interface ICanvasConfigs {
20
+ miniMap?: boolean;
21
+ mapAttr?: {
22
+ nodeColor?: string;
23
+ nodeStrokeColor?: string;
24
+ nodeBorderRadius?: number;
25
+ nodeStrokeWidth?: number;
26
+ position?: PanelPosition;
27
+ zoomable?: boolean;
28
+ pannable?: boolean;
29
+ };
30
+ controls?: boolean;
31
+ ctlAttr?: {
32
+ showZoom?: boolean;
33
+ showFitView?: boolean;
34
+ showInteractive?: boolean;
35
+ position?: PanelPosition;
36
+ orientation?: 'horizontal' | 'vertical';
37
+ };
38
+ background?: boolean;
39
+ bgAttr?: {
40
+ bgColor?: string;
41
+ color?: string;
42
+ style?: CSSProperties;
43
+ gap?: number | [number, number];
44
+ size?: number;
45
+ offset?: number;
46
+ variant?: HmFlowBackgroundVariantType;
47
+ };
48
+ colorMode?: ColorMode;
49
+ }
50
+ export interface IHmFlowMetadata {
51
+ name: string;
52
+ description?: string;
53
+ version?: string;
54
+ }
55
+ export interface IHmFlowData {
56
+ metadata: IHmFlowMetadata;
57
+ nodes: Node<PyNodeDataWithActionType>[];
58
+ edges: Edge[];
59
+ viewport: Viewport;
60
+ }
@@ -0,0 +1,7 @@
1
+ export { useHmFlowInteractions } from './use-hm-flow-interactions';
2
+ export { useNodesService } from './use-nodes-service';
3
+ export { useHmFlowService } from './use-hm-flow-service';
4
+ export { useNodeAndEdgeHandlers } from './use-nodes-edges-handlers';
5
+ export { default as useHmFlow } from './use-hm-flow';
6
+ export { default as useHmFlowChildrenDeps } from './use-hm-flow-children-deps';
7
+ export type { HmFlowJsonObject } from './use-hm-flow-service';
@@ -0,0 +1,2 @@
1
+ declare const useHmFlowChildrenDeps: () => import("../provider").HmFlowChildrenDepsContextType;
2
+ export default useHmFlowChildrenDeps;
@@ -0,0 +1,28 @@
1
+ import { Node } from '@xyflow/react';
2
+ import { Dispatch, RefObject, SetStateAction } from 'react';
3
+ import { PyNodeDataWithActionType } from '../node';
4
+ interface IUseHMFlowInteractions {
5
+ reactFlowWrapper: RefObject<HTMLDivElement>;
6
+ setDrawerOpened: Dispatch<SetStateAction<boolean>>;
7
+ setCurrentTab: Dispatch<SetStateAction<string | null>>;
8
+ }
9
+ export declare const useHmFlowInteractions: (params: IUseHMFlowInteractions) => {
10
+ clickedPosition: {
11
+ x: number;
12
+ y: number;
13
+ } | null;
14
+ reactFlowWrapper: RefObject<HTMLDivElement>;
15
+ setClickedPosition: Dispatch<SetStateAction<{
16
+ x: number;
17
+ y: number;
18
+ } | null>>;
19
+ setDrawerOpened: Dispatch<SetStateAction<boolean>>;
20
+ setCurrentTab: Dispatch<SetStateAction<string | null>>;
21
+ screenToFlowPosition: (clientPosition: import("@xyflow/system").XYPosition, options?: {
22
+ snapToGrid?: boolean;
23
+ snapGrid?: import("@xyflow/system").SnapGrid;
24
+ }) => import("@xyflow/system").XYPosition;
25
+ toObject: () => import("@xyflow/react").ReactFlowJsonObject<Node<PyNodeDataWithActionType>, import("@xyflow/react").Edge>;
26
+ setViewport: import("@xyflow/system").SetViewport;
27
+ };
28
+ export {};
@@ -0,0 +1,19 @@
1
+ import { Edge, Node, ReactFlowJsonObject } from '@xyflow/react';
2
+ import { IHeaderAction } from '../components/header-status/header-status.types';
3
+ import { IToolbarAction } from '../components/toolbar/toolbar.types';
4
+ import { IHmFlowData, IHmFlowMetadata } from '../hm-flow.types';
5
+ import { PyNodeDataWithActionType } from '../node';
6
+ export type HmFlowJsonObject = ReactFlowJsonObject<Node<PyNodeDataWithActionType>, Edge>;
7
+ export interface IUseHmFlowService {
8
+ bottomActions?: IToolbarAction[];
9
+ headerActions?: IHeaderAction[];
10
+ onHmflowSave?: (flow: IHmFlowData) => void;
11
+ onHmflowRun?: (flow: IHmFlowData) => void;
12
+ onHmflowDelete?: () => void;
13
+ defaultHmFlowMetadata?: IHmFlowMetadata;
14
+ }
15
+ export declare const useHmFlowService: (params: IUseHmFlowService) => {
16
+ hmflowData: import("react").RefObject<IHmFlowData>;
17
+ bottomAction: IToolbarAction[];
18
+ headerAction: IHeaderAction[];
19
+ };
@@ -0,0 +1,2 @@
1
+ declare const useHmFlow: () => import("../provider/hm-flow-context").HmFlowContextType;
2
+ export default useHmFlow;
@@ -0,0 +1,21 @@
1
+ import { Edge, Node } from '@xyflow/react';
2
+ import { IInitialNodeData } from '../hm-flow.types';
3
+ interface IUseNodeAndEdgeHandlers {
4
+ initialData?: IInitialNodeData;
5
+ }
6
+ export declare const useNodeAndEdgeHandlers: (params: IUseNodeAndEdgeHandlers) => {
7
+ nodes: any[];
8
+ setNodes: import("react").Dispatch<import("react").SetStateAction<any[]>>;
9
+ selectedNodes: string[];
10
+ setSelectedNodes: import("react").Dispatch<import("react").SetStateAction<string[]>>;
11
+ currentNode: Node | null;
12
+ setCurrentNode: import("react").Dispatch<import("react").SetStateAction<Node | null>>;
13
+ edges: Edge[];
14
+ setEdges: import("react").Dispatch<import("react").SetStateAction<Edge[]>>;
15
+ selectedEdges: string[];
16
+ onNodesChange: import("@xyflow/react").OnNodesChange<any>;
17
+ onEdgesChange: import("@xyflow/react").OnEdgesChange<Edge>;
18
+ onConnect: (params: any) => void;
19
+ onLayout: (direction: string | undefined) => void;
20
+ };
21
+ export {};
@@ -0,0 +1,11 @@
1
+ import { Node } from '@xyflow/react';
2
+ import { ActionHandlerDepsType, IActionsHandlersParams, INodeAction, PyNodeDataWithActionType } from '../node';
3
+ export interface IUseNodesServiceParams {
4
+ defaultActions: INodeAction[];
5
+ }
6
+ export declare const useNodesService: (params: IUseNodesServiceParams) => {
7
+ actions: INodeAction[];
8
+ onNodeDoubleClick: (event: React.MouseEvent, node: Node<PyNodeDataWithActionType>, deps: ActionHandlerDepsType) => void;
9
+ onUpdateNode: (params: IActionsHandlersParams) => void;
10
+ searchNode: (deps: ActionHandlerDepsType) => void;
11
+ };
@@ -0,0 +1,9 @@
1
+ export { default as HmFlowBase } from './hm-flow-base';
2
+ export type { IHmFlowBase } from './hm-flow-base';
3
+ export { default as HmFlowProvider } from './provider/hm-flow-provider';
4
+ export { default as HmFlow } from './hm-flow';
5
+ export * from './node';
6
+ export * from './hm-flow.types';
7
+ export * from './hm-flow';
8
+ export * from './hooks';
9
+ import '@xyflow/react/dist/style.css';
@@ -0,0 +1,4 @@
1
+ export * from './types';
2
+ export * from './utils';
3
+ export { default as PyNode } from './node';
4
+ export { default as NodeWrapper } from './node-wrapper';
@@ -0,0 +1,9 @@
1
+ import { Node, NodeProps } from '@xyflow/react';
2
+ import { ComponentType } from 'react';
3
+ import { INodeAction } from './types';
4
+ interface INodeWrapper<TPyNodeProps extends Node> extends NodeProps<TPyNodeProps> {
5
+ NodeType: ComponentType<NodeProps<TPyNodeProps>>;
6
+ actions?: INodeAction[];
7
+ }
8
+ declare const NodeWrapper: <TPyNodeProps extends Node>(props: INodeWrapper<TPyNodeProps>) => import("react").JSX.Element;
9
+ export default NodeWrapper;
@@ -0,0 +1,5 @@
1
+ import { NodeProps } from '@xyflow/react';
2
+ import { FC } from 'react';
3
+ import { PyNodeType } from './types';
4
+ declare const PyNode: FC<NodeProps<PyNodeType>>;
5
+ export default PyNode;
@@ -0,0 +1,35 @@
1
+ import { Node, NodeProps } from '@xyflow/react';
2
+ import { HmFlowChildrenDepsType } from '../hm-flow-base.types';
3
+ import { MantineSize } from '@mantine/core';
4
+ import { JSX } from 'react';
5
+ export type ActionHandlerDepsType = HmFlowChildrenDepsType;
6
+ export interface IActionsHandlersParams {
7
+ node: NodeProps<PyNodeType>;
8
+ deps: ActionHandlerDepsType;
9
+ }
10
+ export type ActionHandlerType = (params: IActionsHandlersParams) => void;
11
+ export interface INodeAction {
12
+ label: string;
13
+ type: NodeActionType;
14
+ icon: JSX.Element;
15
+ onClick: (params: IActionsHandlersParams) => void;
16
+ variant?: string;
17
+ color?: string;
18
+ }
19
+ export type NodeActionType = 'edit' | 'delete' | 'duplicate' | 'add' | 'selectSearchItem';
20
+ export interface IPyNode {
21
+ id: string;
22
+ type: 'pyNode';
23
+ data: PyNodeDataWithActionType;
24
+ }
25
+ export type PyNodeDataWithActionType = {
26
+ label: string;
27
+ icon: string;
28
+ name: string;
29
+ color: string;
30
+ image: string;
31
+ parameters?: {} | null;
32
+ actionSize?: MantineSize;
33
+ actions: INodeAction[];
34
+ };
35
+ export type PyNodeType = Node<PyNodeDataWithActionType, 'pyNode'>;
@@ -0,0 +1,3 @@
1
+ import { NodeProps } from '@xyflow/react';
2
+ import { IPyNode, PyNodeType } from './types';
3
+ export declare const pyNodeToNodeProps: (node: IPyNode) => NodeProps<PyNodeType>;