33.0.0 • Published 10 days ago

@simpleview/sv-mosaic v33.0.0

Weekly downloads
129
License
MIT
Repository
github
Last release
10 days ago

One line change...

npm version

sv-mosaic

npm install sv-mosaic

Mosaic is a React user interface library designed to create admin interfaces. It is designed to be product agnostic allowing it to be utilized in any manner of Admin interface.

It is built on top of React Material-UI and is it recommended that you pin to the same version that Mosaic is using.

Storybook: https://simpleviewinc.github.io/sv-mosaic/

Changelog - See the latest changes to sv-mosaic.

Usage

  • Add sv-mosaic to your package.json and pin to a specific version.
  • sv-mosaic has a host of peerDependencies which are not bundled into the library in order to minimize the bundle size of those that are using the package. You will need to ensure all of the peerDependencies of the package are satisfied. See the package.json for the current peerDependencies.

All components are exported individually and should be imported via destructuring to ensure proper tree-shaking.

import { DataView } from "@simpleview/sv-mosaic"

For faster import statements, import just the resource you want, exposed by package.json "exports" key.

import DataView from "@simpleview/sv-mosaic/components/DataView";
import formActions from "@simpleview/sv-mosaic/formActions";

Optimization Guidelines

Optimization Guidelines - Ensure you're properly using Mosaic and React for optimal client-side performance.

Installation

  • Ensure you have sv-kubernetes installed.
  • If you want your windows box to have TypeScript completions of npm packages. Install Node via https://nodejs.org/en/download/, easiest method is the Windows Install 64-bit. It may ask you to restart your box. In windows cmd
    		```
    		cd d:\PATH\TO\sv-kubernetes\containers\sv-mosaic
    		npm install
    		```
  • Putty/Shell into sv-kubernetes Install the container sudo sv install sv-mosaic --type=container --branch=develop * Run the container
    		```
    		cd /sv/containers/sv-mosaic
    		sudo npm run docker
    		yarn start
    		```

The service should now be accessible at http://kube.simpleview.io:10000/

Unit Testing

  • Ensure you have sv-mosaic installed per the instructions above.
  • Putty/Shell into sv-kubernetes * Run the container
    		```
    		cd /sv/containers/sv-mosaic
    		sudo npm run docker
    		yarn test
    		```

Repo Structure

When external parties consume this project the assumption is that all exported components are "top-level" meaning that you can destructure all necessary imports. This is necessary to ensure optimal and easy tree shaking.

import { DataView, DataViewFilterDate, transform_get } from "@simpleview/sv-mosaic";
  • /components/ - Each exported component have it's own sub-folder in this folder. Component - e.g. DataView, DataViewFilterDate index.ts This file File which should re-export the primary component as default. So if in the folder /DataViewFilterDate/ then index.ts should re-export /DataViewFilterDate/DataViewFilterDate.tsx. This file should also export all entities in the ComponentTypes.ts file. This makes the type definitions usable throughout the project and by external consumers. Component.tsx - The primary component file. ComponentTypes.ts - If the component needs to declare it's own typescript Interfaces or Types througout the folder, declare them here. The props for the primary component should always be called [Component]Props, e.g. DataViewProps. All TypeScript type and interface definitions should be unique across the project this way if they are exported, they are guaranteed to be unique. Prefix them with the name of the Component, e.g. DataViewOptions, DataViewColumn. Additional.tsx - For private sub-components needed by this component which are not logical to be consumed outside of the project or within the project, simply place them in this folder and do not re-export them in the index.ts. Component.stories.tsx - Definition of the component playground used to test and demonstrate this components capabilities. Component.stories.mdx - The text documentation that describes this component and how to use it. Component.test.js - Jest file for testing this component. * /internal/ - Deprecated. No new content should go here, pending refactors to move it's content into the component folders.
  • /types/index.ts - Used for storing Global mosaic types which are used in multiple locations across the project and aren't specific to a specific component.
  • /theme/ - Definition of shared colors and theming that is used across the project. Exported globally as theme.
  • /utils/ - Folder for non-react javascript utilities. Some of these are re-exported by the root index.ts, and some are private to the project.
  • index.ts - The primary entrypoint for the project. It will re-export all entities from all public components.

Good Example Components:

  • /components/Button/
  • /components/LeftNav/
  • /components/CheckboxList/
  • /components/Checkbox/

Publishing

Publishing to NPM and storybook is automated. You do not need to run build, or publish.

  • Whenever a push to master changes the package.json, @simpleview/sv-mosaic and @simpleview/sv-mosaic-types will be published to NPM via the publish github action which runs scripts/conditional-publish
  • Whenever a push to master occurs the storybook is automatically built and pushed to the gh-pages branch via the storybook github action.
33.0.0

10 days ago

32.1.1

24 days ago

32.1.1-0.0.2

1 month ago

32.1.1-0.0.1

1 month ago

32.1.0

1 month ago

32.0.0

2 months ago

31.1.0

2 months ago

31.0.2

3 months ago

31.0.0

3 months ago

30.0.0

4 months ago

30.0.1-0

4 months ago

29.0.0

4 months ago

28.0.2

5 months ago

25.1.1-qa-27ffe7

9 months ago

25.1.1

9 months ago

25.2.0-qa-1bb275

9 months ago

25.1.1-qa-156703

9 months ago

26.1.0-qa-e121ff

8 months ago

25.1.0-qa-e0d2cd

10 months ago

25.2.1-qa-73e997

8 months ago

24.0.0-qa-328941

11 months ago

25.2.0-qa-bc3966

9 months ago

25.0.0-qa-7b067f

10 months ago

25.0.0

10 months ago

25.1.1-qa-5e9987

9 months ago

24.0.0-qa-15862b

11 months ago

25.0.0-qa-d2d161

10 months ago

26.1.0

8 months ago

26.0.0-qa-504f7e

8 months ago

25.1.1-qa-ba5107

10 months ago

25.2.0-qa-355bf5

9 months ago

25.1.0-qa-f2162e

10 months ago

27.0.0-qa-f4bda4

6 months ago

25.0.0-qa-8e63e3

10 months ago

26.0.0

8 months ago

25.2.0

9 months ago

25.2.1

9 months ago

26.1.0-qa-eb58fa

8 months ago

25.1.0-qa-00af7e

10 months ago

27.1.0

6 months ago

27.0.0-qa-37bd53

6 months ago

25.2.1-qa-2f9adb

9 months ago

24.0.0-qa-b2b1f9

10 months ago

25.2.1-qa-f19135

9 months ago

25.2.0-qa-2a1db4

9 months ago

25.2.1-qa-45fcca

8 months ago

25.1.0-qa-6177fb

10 months ago

26.1.0-qa-31d20d

7 months ago

27.0.0

7 months ago

25.2.0-qa-58b1b1

9 months ago

25.1.0-qa-1e2f8e

10 months ago

25.2.1-qa-092c0d

8 months ago

26.1.0-qa-9508cf

8 months ago

25.2.0-qa-2dd7fe

9 months ago

25.2.1-qa-38ff3c

8 months ago

25.2.0-qa-a00357

9 months ago

27.0.0-qa-ef2044

6 months ago

26.0.0-qa-c1b8a5

8 months ago

25.0.0-qa-a28919

10 months ago

27.0.0-qa-3df2c8

6 months ago

25.2.1-qa-9e64f1

8 months ago

26.0.0-qa-5cacc7

8 months ago

25.2.0-qa-fbd0b4

9 months ago

28.0.1

5 months ago

26.0.0-qa-c47d38

8 months ago

24.0.0-qa-41402f

10 months ago

25.2.1-qa-6a89a3

9 months ago

25.1.1-qa-ddaaad

9 months ago

25.0.0-qa-24bfaa

10 months ago

24.0.0-qa-360c34

11 months ago

26.1.0-qa-164d0a

7 months ago

27.0.0-qa-26d25b

7 months ago

23.0.0

12 months ago

23.0.0-qa-d7384b

12 months ago

22.0.0-qa-462a9b

12 months ago

24.0.0-qa-ea61c6

12 months ago

24.0.0-qa-31bce9

12 months ago

23.0.0-qa-65e336

12 months ago

22.0.0

1 year ago

23.0.0-qa-fa1052

12 months ago

23.0.0-qa-1e8e24

12 months ago

23.0.0-qa-aafb13

12 months ago

24.0.0-qa-3de6a1

12 months ago

24.0.0

11 months ago

19.0.0

1 year ago

21.0.0

1 year ago

18.0.0

1 year ago

20.0.0

1 year ago

15.0.0

1 year ago

17.0.0

1 year ago

16.0.0

1 year ago

12.0.0

1 year ago

13.0.0

1 year ago

14.0.0

1 year ago

8.0.0-qa-71f64e

2 years ago

10.0.0

2 years ago

10.0.0-qa-3d4e07

2 years ago

9.0.0

2 years ago

7.0.0-qa-5db0e7

2 years ago

11.0.0

1 year ago

9.0.0-qa-07814e

2 years ago

9.0.0-qa-8047d4

2 years ago

8.0.0

2 years ago

9.0.0-qa-a1aa06

2 years ago

6.0.1-qa-8d342a

2 years ago

7.0.0-qa-29c886

2 years ago

6.0.1-qa-2b47a8

2 years ago

6.0.1-qa-22b5f2

2 years ago

6.0.0-qa-919226

2 years ago

6.0.1

2 years ago

6.0.1-qa-a36d30

2 years ago

7.0.0

2 years ago

6.0.1-qa-47931a

2 years ago

6.0.0-rc1

2 years ago

5.1.1

2 years ago

5.1.0

2 years ago

5.0.0-rc.0

2 years ago

5.1.1-rc10

2 years ago

5.0.0-rc.1

2 years ago

5.1.1-rc11

2 years ago

5.0.0-rc.2

2 years ago

5.0.0-rc.3

2 years ago

5.0.0-rc.4

2 years ago

5.1.1-rc14

2 years ago

5.1.1-rc13

2 years ago

4.2.4-rc0

2 years ago

4.2.3

2 years ago

4.2.2

2 years ago

4.2.5

2 years ago

4.2.4

2 years ago

4.2.1

2 years ago

4.2.0

2 years ago

5.0.0

2 years ago

5.1.1-rc1

2 years ago

5.1.1-rc2

2 years ago

5.1.1-rc0

2 years ago

5.1.1-rc9

2 years ago

5.1.1-rc7

2 years ago

5.1.1-rc8

2 years ago

5.1.1-rc5

2 years ago

5.1.1-rc6

2 years ago

5.1.1-rc3

2 years ago

5.1.1-rc4

2 years ago

4.1.3

2 years ago

4.1.5

2 years ago

4.1.0

2 years ago

4.1.2

2 years ago

4.1.1

2 years ago

4.0.3

2 years ago

4.0.2

2 years ago

3.2.8

2 years ago

3.2.7

3 years ago

3.2.6

3 years ago

3.2.5

3 years ago

3.2.4

3 years ago

3.2.3

4 years ago

3.2.1

4 years ago

3.2.0

4 years ago

3.1.3

4 years ago

3.1.2

4 years ago

3.1.1

4 years ago

3.1.0

4 years ago

3.0.0-rc.0

4 years ago

3.0.0

4 years ago

2.2.5

4 years ago

2.2.3

4 years ago

2.2.4

4 years ago

2.2.2

4 years ago

2.2.1

4 years ago

2.2.0

4 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.0

4 years ago

1.0.0

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.1-0

4 years ago

0.1.0-0

4 years ago

0.0.3

4 years ago