Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collection Flow V2 Main Branch #2912

Open
wants to merge 60 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
75d4a34
feat: added initial validator boilerplate & utilities & tests
chesterkmr Dec 2, 2024
b2c7a44
feat: implmeneted validate method & tests
chesterkmr Dec 3, 2024
e471f81
fix: test
chesterkmr Dec 3, 2024
7cb51fe
feat: implemented conditional validation rule apply & custom validators
chesterkmr Dec 4, 2024
4d2c708
feat: implemented useValidate & tests
chesterkmr Dec 4, 2024
c2987da
feat: finalized validator component
chesterkmr Dec 4, 2024
ce18a0c
feat: added story for validator
chesterkmr Dec 5, 2024
33544c6
feat: added renderer & tests & dynamic form boilerplate
chesterkmr Dec 10, 2024
4375b7d
feat: added rule engine
chesterkmr Dec 10, 2024
86b9afe
feat: implemented dynamic form context logic & tests & types
chesterkmr Dec 11, 2024
d8d4b25
feat: finalized core form logic & finalized field list & tests
chesterkmr Dec 13, 2024
5b175fe
fix: tests
chesterkmr Dec 13, 2024
0d94cb0
fix: build
chesterkmr Dec 13, 2024
b631eff
feat: added input boilerplates(unfinished) & field layout & tests
chesterkmr Dec 13, 2024
7be92c9
feat: added fields (wip)
chesterkmr Dec 16, 2024
e74241b
fix: fixed build & tests
chesterkmr Dec 17, 2024
32857eb
Merge branch 'dev' into bal-3139
chesterkmr Dec 17, 2024
a550b96
feat: implemented events & fixed tests
chesterkmr Dec 17, 2024
babea18
feat: implemented fields extend & removed elementsMap
chesterkmr Dec 18, 2024
7f07d19
feat: added select field & fixed types & tests
chesterkmr Dec 18, 2024
fbc135a
feat: added initial demo & bugfixes & updated tests
chesterkmr Dec 18, 2024
f4a885e
feat: added phone field & tests & updated storybook
chesterkmr Dec 18, 2024
8996991
feat: added file field & added tests & minor fixes
chesterkmr Dec 18, 2024
a8e111a
feat: added clear value on input hide & updates tests
chesterkmr Dec 19, 2024
e9e155f
feat: fixed onMount & onUnmount events & updated tests
chesterkmr Dec 19, 2024
7ebe91b
feat: added configurable file upload
chesterkmr Dec 19, 2024
93eec1e
feat: added task runner & tests
chesterkmr Dec 19, 2024
949373a
feat: implemented file upload on submit & tests
chesterkmr Dec 19, 2024
12534dc
feat: added more form stories & tests update
chesterkmr Dec 20, 2024
b633bcb
feat: added custom validators & custom inputs examples
chesterkmr Dec 20, 2024
695e0bd
feat: added radio field & tests
chesterkmr Dec 27, 2024
13bb76a
feat: added tags input & tests & config fixes
chesterkmr Dec 27, 2024
b34891c
Merge branch 'dev' into bal-3139
chesterkmr Dec 27, 2024
49869ff
feat: added v2 adapters for custom fields & updated exports from ui &…
chesterkmr Dec 27, 2024
82d8388
feat: added field descriptions & updated tests (#2914)
chesterkmr Dec 27, 2024
be6480d
Merge branch 'dev' into bal-3137
chesterkmr Jan 2, 2025
64a72fb
Merge branch 'dev' into bal-3137
alonp99 Jan 4, 2025
63020d1
feat: reworked ui elements for v2 & added tests (#2930)
chesterkmr Jan 6, 2025
1fdbda4
fix: better violation names on statistics page (BAL-3294) (#2932)
r4zendev Jan 5, 2025
d485660
fix: renamed property in applyWhen rule
chesterkmr Jan 7, 2025
a30f028
feat: added url format & refactor
chesterkmr Jan 7, 2025
8019fd8
Bal 3242 (#2939)
chesterkmr Jan 7, 2025
4ae6b95
feat: updated en translations
chesterkmr Jan 7, 2025
c62019a
fix: fixed kyb tests
chesterkmr Jan 7, 2025
6fc4c45
Bal 2977 (#2942)
chesterkmr Jan 7, 2025
76bd2d2
feat: added classnames to row & column
chesterkmr Jan 8, 2025
61ef477
fix: submit button styles
chesterkmr Jan 8, 2025
f5f1959
Bal 3330 (#2949)
chesterkmr Jan 8, 2025
be4e1b6
feat: implemented priority fields & bug fixes & tests (#2950)
chesterkmr Jan 9, 2025
85ff80d
fix: fixed build
chesterkmr Jan 9, 2025
7d49aa0
feat: implemented default data insertion on field list (#2951)
chesterkmr Jan 9, 2025
8b553a8
feat: added support of html tags in descriptions
chesterkmr Jan 9, 2025
11f078a
feat: added useControl hook
chesterkmr Jan 10, 2025
f79ee95
fix: reworked revision
chesterkmr Jan 10, 2025
2d20835
fix: fixed renderer stories
chesterkmr Jan 10, 2025
eeda079
Merge branch 'dev' into bal-3137
chesterkmr Jan 13, 2025
7e55313
Merge branch 'dev' into bal-3137
chesterkmr Jan 15, 2025
f5de88f
Bal 3356 (WIP) (#2967)
chesterkmr Jan 16, 2025
eb2d918
fix: fixed fieldlist
chesterkmr Jan 16, 2025
f96b888
feat: updated tests
chesterkmr Jan 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// vite.config.ts
import react from "file:///Users/ilyarudnev/Documents/Backend/ballerine/node_modules/.pnpm/@[email protected][email protected]/node_modules/@vitejs/plugin-react-swc/index.mjs";
import { defineConfig } from "file:///Users/ilyarudnev/Documents/Backend/ballerine/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/vitest/dist/config.js";
import terminal from "file:///Users/ilyarudnev/Documents/Backend/ballerine/node_modules/.pnpm/[email protected][email protected]/node_modules/vite-plugin-terminal/dist/index.mjs";
import tsconfigPaths from "file:///Users/ilyarudnev/Documents/Backend/ballerine/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/vite-tsconfig-paths/dist/index.js";
import topLevelAwait from "file:///Users/ilyarudnev/Documents/Backend/ballerine/node_modules/.pnpm/[email protected][email protected]/node_modules/vite-plugin-top-level-await/exports/import.mjs";
var vite_config_default = defineConfig((configEnv) => {
const isDevelopment = configEnv.mode === "development";
return {
server: {
open: true,
host: true,
port: 5137
// port: 443,
// https: true,
},
preview: {
port: 5137
},
plugins: [
topLevelAwait({
promiseExportName: "__tla",
promiseImportName: (i) => `__tla_${i}`
}),
terminal({
output: ["console", "terminal"],
strip: false
}),
react(),
tsconfigPaths()
// mkcert(),
],
css: {
modules: {
generateScopedName: isDevelopment ? "[name]__[local]__[hash:base64:5]" : "[hash:base64:5]"
}
},
test: {
exclude: ["e2e", "node_modules"],
environment: "jsdom",
setupFiles: ["./src/tests-setup.ts"]
},
build: {
sourcemap: true
}
};
});
export {
vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCIvVXNlcnMvaWx5YXJ1ZG5ldi9Eb2N1bWVudHMvQmFja2VuZC9iYWxsZXJpbmUvYXBwcy9iYWNrb2ZmaWNlLXYyXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ZpbGVuYW1lID0gXCIvVXNlcnMvaWx5YXJ1ZG5ldi9Eb2N1bWVudHMvQmFja2VuZC9iYWxsZXJpbmUvYXBwcy9iYWNrb2ZmaWNlLXYyL3ZpdGUuY29uZmlnLnRzXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ltcG9ydF9tZXRhX3VybCA9IFwiZmlsZTovLy9Vc2Vycy9pbHlhcnVkbmV2L0RvY3VtZW50cy9CYWNrZW5kL2JhbGxlcmluZS9hcHBzL2JhY2tvZmZpY2UtdjIvdml0ZS5jb25maWcudHNcIjtpbXBvcnQgcmVhY3QgZnJvbSAnQHZpdGVqcy9wbHVnaW4tcmVhY3Qtc3djJztcbmltcG9ydCB7IGRlZmluZUNvbmZpZyB9IGZyb20gJ3ZpdGVzdC9jb25maWcnO1xuaW1wb3J0IHRlcm1pbmFsIGZyb20gJ3ZpdGUtcGx1Z2luLXRlcm1pbmFsJztcbmltcG9ydCB0c2NvbmZpZ1BhdGhzIGZy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1BQ0osU0FBUyxDQUFDLE9BQU8sY0FBYztBQUFBLE1BQy9CLGFBQWE7QUFBQSxNQUNiLFlBQVksQ0FBQyxzQkFBc0I7QUFBQSxJQUNyQztBQUFBLElBQ0EsT0FBTztBQUFBLE1BQ0wsV0FBVztBQUFBLElBQ2I7QUFBQSxFQUNGO0FBQ0YsQ0FBQzsiLAogICJuYW1lcyI6IFtdCn0K
1 change: 1 addition & 0 deletions apps/kyb-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"i18next-http-backend": "^2.1.1",
"jmespath": "^0.16.0",
"json-logic-js": "^2.0.2",
"jsonata": "^2.0.6",
"ky": "^0.33.3",
"lodash": "^4.17.21",
"lucide-react": "^0.144.0",
Expand Down
10 changes: 5 additions & 5 deletions apps/kyb-app/src/components/organisms/DynamicUI/DynamicUI.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { PageResolver } from '@/components/organisms/DynamicUI/PageResolver';
import { StateManager } from '@/components/organisms/DynamicUI/StateManager/StateManager';
import { AnyChildren } from '@ballerine/ui';
import { dynamicUIContext } from './dynamic-ui.context';
import { useDynamicUIContextComposer } from '@/components/organisms/DynamicUI/hooks/useDynamicUIContextComposer';
import { TransitionListener } from '@/components/organisms/DynamicUI/TransitionListener';
import { UIState } from '@/components/organisms/DynamicUI/hooks/useUIStateLogic/types';
import { Page } from '@/components/organisms/DynamicUI/Page';
import { PageResolver } from '@/components/organisms/DynamicUI/PageResolver';
import { ActionsHandler } from '@/components/organisms/DynamicUI/StateManager/components/ActionsHandler';
import { StateManager } from '@/components/organisms/DynamicUI/StateManager/StateManager';
import { TransitionListener } from '@/components/organisms/DynamicUI/TransitionListener';
import { AnyChildren } from '@ballerine/ui';
import { dynamicUIContext } from './dynamic-ui.context';

const { Provider } = dynamicUIContext;

Expand Down
6 changes: 3 additions & 3 deletions apps/kyb-app/src/components/organisms/DynamicUI/Page/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ export const Page = ({ page, children }: PageProps) => {
[page],
);

const { payload } = useStateManagerContext();
const { state } = useDynamicUIContext();
const rulesResult = useRuleExecutor(payload, rules, definition, state);
const { payload, state } = useStateManagerContext();
const { state: _uiState } = useDynamicUIContext();
const rulesResult = useRuleExecutor(payload, rules, definition, _uiState);
const fieldErrors = useMemo(
() =>
rulesResult.reduce(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// @ts-nocheck

import { ErrorField } from '@/components/organisms/DynamicUI/rule-engines';
import { findDocumentDefinitionById } from '@/components/organisms/UIRenderer/elements/JSONForm/helpers/findDefinitionByName';
import { Document, UIElement, UIPage } from '@/domains/collection-flow';
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading