43.2.1 • Published 1 month ago

@simpleview/sv-mosaic v43.2.1

Weekly downloads
129
License
MIT
Repository
github
Last release
1 month 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.
40.0.1-c2e5f1c35

5 months ago

39.3.2

6 months ago

39.3.1

6 months ago

39.3.0

6 months ago

42.1.0

3 months ago

39.3.1-4a840dbd0

6 months ago

39.3.1-5ea6c60f6

6 months ago

39.2.1

7 months ago

39.2.0

7 months ago

43.0.0

3 months ago

39.3.1-4a840dbc9

6 months ago

39.3.3-35a44fc3b

6 months ago

42.0.0

4 months ago

40.0.0

5 months ago

39.3.3-80435581e

6 months ago

41.0.0

4 months ago

39.1.0

8 months ago

43.1.0

3 months ago

40.1.0

5 months ago

39.0.0

8 months ago

43.2.1

1 month ago

43.2.0

2 months ago

39.3.1-6f8e9fc5f

6 months ago

39.0.0-991f0d090

8 months ago

38.0.0

9 months ago

38.0.1-400ab842c

9 months ago

38.0.1-62799cabb

9 months ago

37.3.2-59696b6aa

9 months ago

37.3.1-4c8f61069

9 months ago

37.3.1-0.0.1

9 months ago

37.3.0

10 months ago

37.2.2

10 months ago

37.2.2-0.0.2

10 months ago

37.2.2-0.0.1

10 months ago

36.0.0

1 year ago

36.1.0

1 year ago

36.2.1

12 months ago

36.2.2

11 months ago

37.0.0

11 months ago

37.1.0

10 months ago

37.2.1

10 months ago

35.0.0

1 year ago

34.0.0

1 year ago

33.0.0

1 year ago

32.1.1

1 year ago

32.1.1-0.0.2

1 year ago

32.1.1-0.0.1

1 year ago

32.1.0

1 year ago

32.0.0

1 year ago

31.1.0

1 year ago

31.0.2

1 year ago

31.0.0

1 year ago

30.0.0

1 year ago

30.0.1-0

1 year ago

29.0.0

2 years ago

28.0.2

2 years ago

25.1.1-qa-27ffe7

2 years ago

25.1.1

2 years ago

25.2.0-qa-1bb275

2 years ago

25.1.1-qa-156703

2 years ago

26.1.0-qa-e121ff

2 years ago

25.1.0-qa-e0d2cd

2 years ago

25.2.1-qa-73e997

2 years ago

24.0.0-qa-328941

2 years ago

25.2.0-qa-bc3966

2 years ago

25.0.0-qa-7b067f

2 years ago

25.0.0

2 years ago

25.1.1-qa-5e9987

2 years ago

24.0.0-qa-15862b

2 years ago

25.0.0-qa-d2d161

2 years ago

26.1.0

2 years ago

26.0.0-qa-504f7e

2 years ago

25.1.1-qa-ba5107

2 years ago

25.2.0-qa-355bf5

2 years ago

25.1.0-qa-f2162e

2 years ago

27.0.0-qa-f4bda4

2 years ago

25.0.0-qa-8e63e3

2 years ago

26.0.0

2 years ago

25.2.0

2 years ago

25.2.1

2 years ago

26.1.0-qa-eb58fa

2 years ago

25.1.0-qa-00af7e

2 years ago

27.1.0

2 years ago

27.0.0-qa-37bd53

2 years ago

25.2.1-qa-2f9adb

2 years ago

24.0.0-qa-b2b1f9

2 years ago

25.2.1-qa-f19135

2 years ago

25.2.0-qa-2a1db4

2 years ago

25.2.1-qa-45fcca

2 years ago

25.1.0-qa-6177fb

2 years ago

26.1.0-qa-31d20d

2 years ago

27.0.0

2 years ago

25.2.0-qa-58b1b1

2 years ago

25.1.0-qa-1e2f8e

2 years ago

25.2.1-qa-092c0d

2 years ago

26.1.0-qa-9508cf

2 years ago

25.2.0-qa-2dd7fe

2 years ago

25.2.1-qa-38ff3c

2 years ago

25.2.0-qa-a00357

2 years ago

27.0.0-qa-ef2044

2 years ago

26.0.0-qa-c1b8a5

2 years ago

25.0.0-qa-a28919

2 years ago

27.0.0-qa-3df2c8

2 years ago

25.2.1-qa-9e64f1

2 years ago

26.0.0-qa-5cacc7

2 years ago

25.2.0-qa-fbd0b4

2 years ago

28.0.1

2 years ago

26.0.0-qa-c47d38

2 years ago

24.0.0-qa-41402f

2 years ago

25.2.1-qa-6a89a3

2 years ago

25.1.1-qa-ddaaad

2 years ago

25.0.0-qa-24bfaa

2 years ago

24.0.0-qa-360c34

2 years ago

26.1.0-qa-164d0a

2 years ago

27.0.0-qa-26d25b

2 years ago

23.0.0

2 years ago

23.0.0-qa-d7384b

2 years ago

22.0.0-qa-462a9b

2 years ago

22.0.0-qa-fb3184

2 years ago

24.0.0-qa-ea61c6

2 years ago

24.0.0-qa-31bce9

2 years ago

23.0.0-qa-65e336

2 years ago

22.0.0

2 years ago

23.0.0-qa-fa1052

2 years ago

23.0.0-qa-1e8e24

2 years ago

23.0.0-qa-aafb13

2 years ago

24.0.0-qa-3de6a1

2 years ago

24.0.0

2 years ago

19.0.0

2 years ago

21.0.0

2 years ago

19.0.0-qa-d5601d

2 years ago

18.0.0-qa-ea7c57

2 years ago

21.0.0-qa-595dcc

2 years ago

18.0.0

2 years ago

21.0.0-qa-e1fad3

2 years ago

20.0.0

2 years ago

20.0.0-qa-9fc3d5

2 years ago

17.0.0-qa-6a48ef

2 years ago

15.0.0

2 years ago

16.0.0-qa-3cd76f

2 years ago

16.0.0-qa-db62e4

2 years ago

17.0.0

2 years ago

15.0.0-qa-8f232b

2 years ago

17.0.0-qa-1a053a

2 years ago

16.0.0

2 years ago

15.0.0-qa-d89f1f

2 years ago

14.0.0-qa-0932ba

3 years ago

12.0.0

3 years ago

13.0.0

3 years ago

14.0.0-qa-c0b2d1

2 years ago

12.0.0-qa-78a744

3 years ago

15.0.0-qa-d45ed5

2 years ago

13.0.0-qa-696ca1

3 years ago

14.0.0

2 years ago

14.0.0-qa-ad3498

3 years ago

15.0.0-qa-9a5e85

2 years ago

8.0.0-qa-71f64e

3 years ago

10.0.0

3 years ago

10.0.0-qa-3d4e07

3 years ago

12.0.0-qa-07473a

3 years ago

9.0.0

3 years ago

7.0.0-qa-5db0e7

3 years ago

12.0.0-qa-344dfe

3 years ago

11.0.0-qa-d6bdf9

3 years ago

11.0.0

3 years ago

9.0.0-qa-07814e

3 years ago

11.0.0-qa-3e4567

3 years ago

10.0.0-qa-738b56

3 years ago

9.0.0-qa-8047d4

3 years ago

8.0.0

3 years ago

9.0.0-qa-a1aa06

3 years ago

6.0.1-qa-8d342a

3 years ago

7.0.0-qa-29c886

3 years ago

6.0.1-qa-2b47a8

3 years ago

6.0.1-qa-22b5f2

3 years ago

6.0.0-qa-919226

3 years ago

6.0.1

3 years ago

6.0.1-qa-a36d30

3 years ago

7.0.0

3 years ago

6.0.1-qa-47931a

3 years ago

6.0.0-rc1

3 years ago

5.1.1

3 years ago

5.1.0

3 years ago

5.0.0-rc.0

3 years ago

5.1.1-rc10

3 years ago

5.0.0-rc.1

3 years ago

5.1.1-rc11

3 years ago

5.0.0-rc.2

3 years ago

5.0.0-rc.3

3 years ago

5.0.0-rc.4

3 years ago

5.1.1-rc14

3 years ago

5.1.1-rc13

3 years ago

4.2.4-rc0

3 years ago

4.2.3

3 years ago

4.2.2

3 years ago

4.2.5

3 years ago

4.2.4

3 years ago

4.2.1

3 years ago

4.2.0

3 years ago

5.0.0

3 years ago

5.1.1-rc1

3 years ago

5.1.1-rc2

3 years ago

5.1.1-rc0

3 years ago

5.1.1-rc9

3 years ago

5.1.1-rc7

3 years ago

5.1.1-rc8

3 years ago

5.1.1-rc5

3 years ago

5.1.1-rc6

3 years ago

5.1.1-rc3

3 years ago

5.1.1-rc4

3 years ago

4.1.3

3 years ago

4.1.5

3 years ago

4.1.0

3 years ago

4.1.2

3 years ago

4.1.1

3 years ago

4.0.3

3 years ago

4.0.2

3 years ago

3.2.8

3 years ago

3.2.7

4 years ago

3.2.6

5 years ago

3.2.5

5 years ago

3.2.4

5 years ago

3.2.3

5 years ago

3.2.1

5 years ago

3.2.0

5 years ago

3.1.3

5 years ago

3.1.2

5 years ago

3.1.1

5 years ago

3.1.0

5 years ago

3.0.0-rc.0

5 years ago

3.0.0

5 years ago

2.2.5

5 years ago

2.2.3

5 years ago

2.2.4

5 years ago

2.2.2

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.2

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.0.0

5 years ago

0.4.0

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.1.1-0

5 years ago

0.1.0-0

5 years ago

0.0.3

6 years ago