eis-ui-render 0.31.0 → 0.31.2

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.
package/README.md CHANGED
@@ -2,119 +2,34 @@ This is a monorepo project, bootstrapped with [Create React App](https://github.
2
2
  It uses:
3
3
 
4
4
  * [React.js](https://reactjs.org/)
5
- * [Semantic UI](https://react.semantic-ui.com/)
6
- * [LESS](http://lesscss.org/)
5
+
7
6
 
8
7
  Check the [/docs](./docs) folder to get a basic understanding of the project's [architecture](./docs/Architecture.md) and [coding standards](./docs/standards.md) before continuing.
9
8
 
10
9
  ## Development Installation
11
10
 
12
- 1. Install [Node.js](https://nodejs.org/), if you haven't already (version 10.15.3).
13
- 2. Install [Yarn package manager](https://yarnpkg.com/en/), if you haven't already.
14
- 3. Install [LiveReload Chrome extension](https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei), for hot-reloading of CSS style changes.
15
- 4. Install [Webstorm](https://www.jetbrains.com/webstorm/) IDE, then configure [code style](docs/code-style.png), install `Save Action` plugin and configure it like this [screenshot](docs/save-action.png);
16
- 5. Create `.npmrc` configuration file based on `.npmrc.example`
17
- 6. Navigate to project root folder and install dependencies by running this command in terminal:
11
+ 1. Install [Node.js](https://nodejs.org/), if you haven't already (version v22).
12
+ 2. Navigate to project root folder and install dependencies by running this command in terminal:
18
13
 
19
- ### `yarn`
14
+ ### `npm install`
20
15
 
21
16
  ## Available Scripts
22
17
 
23
18
  In the project directory, you can run:
24
19
 
25
- ### `yarn start`
20
+ ### `npm run start`
26
21
 
27
22
  Runs the app in the development mode.<br>
28
- Open [http://localhost:3000](http://localhost:3000) to view it in Chrome browser, then activate LiveReload extension.
23
+ Open [http://localhost:3001](http://localhost:3001) to view it in Chrome browser, then activate LiveReload extension.
29
24
 
30
25
  The page will reload if you make edits.<br>
31
26
  You will also see any lint errors in the console.
32
27
 
33
- ### `yarn test`
34
-
35
- Launches the test runner (or `yarn test --watch -o` to run in interactive watch mode).<br>
36
- See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
37
-
38
- ### `yarn e2e`
39
-
40
- Launches end-to-end integration tests using Cypress.
41
-
42
- ### `yarn deploy`
43
-
44
- Build the app under `web` workspace and push it to GitHub pages [documentation](https://eisgroup.github.io/ui-render/).
45
-
46
- ### `yarn workspace web build`
47
-
48
- Builds the app for production to the `/repos/web/build` folder.<br>
49
- It correctly bundles React in production mode and optimizes the build for the best performance.
50
-
51
- The build is minified and the filenames include the hashes.<br>
52
- Your app is ready to be deployed!
53
-
54
- See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
55
-
56
- ### `yarn workspace web eject`
57
-
58
- **Note: this is a one-way operation. Once you `eject`, you can’t go back!**
59
-
60
- If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
61
-
62
- Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
63
-
64
- You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
65
-
66
- ## Learn More
67
-
68
- You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
69
-
70
- To learn React, check out the [React documentation](https://reactjs.org/).
71
-
28
+ ### Live build mode
72
29
 
73
- # Installation on Windows
74
- 1. Enable pasting into command prompt with CTRL + V
75
- - Install <https://www.autohotkey.com/>.
76
- - Download and execute <http://www.howtogeek.com/wp-content/uploads/gg/up/PasteCommandPrompt.ahk>.
30
+ - Install `yalc` globally ```npm install -g yalc```
31
+ - Run `npm start yalc-watch` to build library and life reload
32
+ - In your application add link to library with `yalc add eis-ui-render --link`
77
33
 
78
- 2. Install Git <https://git-scm.com/downloads>.
79
34
 
80
- 3. Enable Git password caching by installing <https://gitcredentialstore._plex.com/>.
81
35
 
82
- 4. Setup up git global configs at C:\Users\username (OPTIONAL)
83
- - Option 1: Add this to .gitconfig file (usually located at C:\Users\username)
84
- ```
85
- # This is Git's per-user configuration file.
86
- [user]
87
- name = Full Name
88
- email = example@gmail.com
89
- [alias]
90
- st = status
91
- ci = commit -m
92
- amend = commit --amend
93
- co = checkout
94
- cp = cherry-pick
95
- br = branch -avv
96
- up = rebase
97
- unstage = reset HEAD --
98
- last = log -1 HEAD
99
- lg = log --graph --pretty=format:'%C(auto)%h -%d %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
100
- [push]
101
- default = simple
102
- ```
103
- - Option 2: Using command line
104
- ```
105
- # Tell Git who you are
106
- git config --global user.name "Full Name"
107
- git config --global user.email example@gmail.com
108
- # Add some SVN-like aliases
109
- git config --global alias.st "status"
110
- git config --global alias.ci "commit -m"
111
- git config --global alias.amend "commit --amend"
112
- git config --global alias.co "checkout"
113
- git config --global alias.cp "cherry-pick"
114
- git config --global alias.br "branch -avv"
115
- git config --global alias.up "rebase"
116
- git config --global alias.unstage "reset HEAD --"
117
- git config --global alias.last "log -1 HEAD"
118
- git config --global alias.lg "log --graph --pretty=format:'%C(auto)%h -%d %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
119
- git config --global push.default "simple"
120
- ```
@@ -0,0 +1,43 @@
1
+ import React, { Component } from 'react';
2
+ interface Props {
3
+ data?: object;
4
+ meta?: object;
5
+ initialValues?: object;
6
+ onSubmit(formValues: object): void;
7
+ getFormData?(fn: Function): void;
8
+ onDataChanged?(): void;
9
+ getValidationErrors?(errors: object): void;
10
+ methods?: Record<string, Function>;
11
+ apiCalls?: {
12
+ updateExperienceData?: (data: any) => Promise<any>;
13
+ downloadFile?: (fileName: string) => Promise<any>;
14
+ uploadFile?: (data: string, file: Blob) => Promise<any>;
15
+ };
16
+ className?: string;
17
+ style?: object;
18
+ id?: string;
19
+ translate(v: string): string;
20
+ dateFormat?: string;
21
+ }
22
+ /**
23
+ * UI Render makes use of many npm packages written in pure JS using ES6 for these reasons:
24
+ * - Automatic tree shaking to optimize production bundle size by removing unused code imported from npm packages
25
+ * - IDE instant function/variable suggestions and automatic import
26
+ * - Easier for developers to read source code of imported npm packages, than reading compiled minified code.
27
+ *
28
+ * @logic:
29
+ * 1. This Component creates an empty <div/> inside HTML DOM (where UI Render will be)
30
+ * 2. When mounted, it calls global `window._mountUIRender` method defined in `/repos/policy/src/main.js`
31
+ * 3. Above method mounts pre-bundled UI Render to the above created <div/>, initiating UI Render instance.
32
+ * 4. On subsequent prop changes, it passes them to UI Render via <DOMProxy/> container
33
+ */
34
+ export declare class UIRender extends Component<Props, any> {
35
+ private _id;
36
+ private _instance;
37
+ get id(): string;
38
+ onMount: (instance: any) => any;
39
+ componentDidMount(): void;
40
+ componentDidUpdate(): void;
41
+ render(): React.JSX.Element;
42
+ }
43
+ export default UIRender;
@@ -0,0 +1,7 @@
1
+ import UIRender from './UIRender';
2
+ /**
3
+ * ROOT APP VIEW ===============================================================
4
+ * =============================================================================
5
+ */
6
+ export { UIRender };
7
+ export default UIRender;