0.4.17 • Published 1 month ago

@theseam/ui-common v0.4.17

Weekly downloads
5
License
-
Repository
github
Last release
1 month ago

UI Common

This project is for common components and styles to be used in applications developed for The Seam.

Getting Started

Development is mainly done in Storybook for this project. You can add demos to the default app if they don't work well in a story scenario.

Start storybook:

$ npm run storybook

Usage

npm install

$ npm i @theseam/ui-common

npm link

In this project

$ npm run build:ui-common # For development you can use build-w:ui-common for watch mode.
$ cd dist/ui-common
# $ npm i # May be needed if linking in a new project, which may not have the dependencies in its own node_modules, since `npm link @theseam/ui-common` doesn't install dependencies like `npm i @theseam/ui-common`
$ npm link

In other project

$ npm link @theseam/ui-common

angular.json

This change shouldn't be needed when the build process is more refined. The libraries icons include font files as a path that the sass compiler isn't finding through npm link. If not using npm link, change "node_modules/@theseam/ui-common/node_modules/@marklb/ngx-datatable/release/assets/icons.css" to "node_modules/@marklb/ngx-datatable/release/assets/icons.css"

{
  ...,
  "projects": {
    "app": {
      "architect": {
        "build": {
          ...,
          "options": {
            ...,
            "styles": [
              ...,
              "node_modules/@theseam/ui-common/node_modules/@marklb/ngx-datatable/release/assets/icons.css"
            ],
            "es5BrowserSupport": true,
            "preserveSymlinks": true
          }
        },
        "test": {
          "options": {
            "styles": {
              ...,
              "node_modules/@theseam/ui-common/node_modules/@marklb/ngx-datatable/release/assets/icons.css"
            }
          }
        }
      }
    }
  }
}

tsconfig.json

The compiler options are for importing js libraries that don't have valid ES module exports.

{
  "compilerOptions": {
    ...,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
  },
  "paths": {
    // These paths may not be needed, but sometimes the way the build tools reference modules will confuse the type checking by including the path in the `.d.ts` files, causing the same named objects to not be the same.
    "@angular/*": ["node_modules/@angular/*"],
    "rxjs/*": ["node_modules/rxjs/*"],
    "rxjs": ["node_modules/rxjs"],
    "@ng-select/*": ["node_modules/@ng-select/*"],
  }
}

polyfils.ts

This is needed for a library that checks if a property is defined on the global object.

...
 // Add global to window, assigning the value of window itself.
(window as any).global = window

Styles

The files used for the styles aren't very important, but the two separate files are.

styles/styles.scss

This is the global stylesheet. There will not be any component scoping added, so the rules will be applied to any matching elements like normal.

@import '~@theseam/ui-common/styles/theme';
...

styles/_utilities.scss

This is the file that should be careful about its imports. There should not be any css rules in this file or any files imported by this file. It should only have compile time only code, such as variables, functions, and mixins. If you need access to variables in a component's stylesheet, then import this file. The reason this file should not have any rules is, because each component's stylesheet is compiled independently scoped to that component and any rules in an imported file will be copied for each component that imports that file whether is is used or not.

@import '~@theseam/ui-common/styles/utilities';
...

Publishing

Run the following commands to publish a new package version to the repository.

There isn't a publish script yet, so the version in projects/ui-common/package.json has to be manually incremented first.

$ npm run build:ui-common
$ cd dist/ui-common
$ npm publish
0.4.17

1 month ago

0.4.16

1 month ago

0.4.15

1 month ago

0.4.14

4 months ago

0.4.12-beta.1

4 months ago

0.4.9

7 months ago

0.4.8

7 months ago

0.3.15-beta.0

9 months ago

0.3.15-beta.1

8 months ago

0.4.10

7 months ago

0.4.13

6 months ago

0.4.11

7 months ago

0.4.12

7 months ago

0.4.5

7 months ago

0.4.4

8 months ago

0.4.7

7 months ago

0.4.6

7 months ago

0.4.1

9 months ago

0.4.3

8 months ago

0.4.2

8 months ago

0.3.14-beta.2

9 months ago

0.3.14-beta.1

9 months ago

0.4.12-beta.0

6 months ago

0.3.13-beta.1

11 months ago

0.3.13-beta.0

12 months ago

0.3.12

12 months ago

0.4.0-beta.5

1 year ago

0.4.0-beta.6

1 year ago

0.3.12-beta.0

1 year ago

0.4.0-beta.0

1 year ago

0.4.0-beta.1

1 year ago

0.4.0-beta.2

1 year ago

0.4.0-beta.3

1 year ago

0.4.0-beta.4

1 year ago

0.3.11

2 years ago

0.3.8

2 years ago

0.3.9

2 years ago

0.3.10

2 years ago

0.3.7

2 years ago

0.3.6

2 years ago

0.3.5

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.3.4

2 years ago

0.3.3

2 years ago

0.3.0

2 years ago

0.2.17

2 years ago

0.2.16

2 years ago

0.2.15

2 years ago

0.2.14

2 years ago

0.2.13

2 years ago

0.2.12

2 years ago

0.2.11

2 years ago

0.2.10

2 years ago

0.2.9

3 years ago

0.2.8

3 years ago

0.2.7

3 years ago

0.2.6

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.2.2

3 years ago

0.1.21

3 years ago

0.1.20

3 years ago

0.1.19

3 years ago

0.1.16

3 years ago

0.1.17

3 years ago

0.1.18

3 years ago

0.1.15

3 years ago

0.1.14

3 years ago

0.1.13

3 years ago

0.1.11

3 years ago

0.1.12

3 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.91

4 years ago

0.0.90

4 years ago

0.0.89

4 years ago

0.0.88

4 years ago

0.0.85

4 years ago

0.0.86

4 years ago

0.0.87

4 years ago

0.1.0-beta.1

4 years ago

0.0.86-beta.1

4 years ago

0.0.87-beta.1

4 years ago

0.0.87-beta.2

4 years ago

0.0.84

4 years ago

0.0.83

4 years ago

0.0.82

4 years ago

0.0.81

4 years ago

0.0.80

4 years ago

0.0.79

4 years ago

0.0.78

4 years ago

0.0.77

4 years ago

0.0.76

4 years ago

0.0.75

4 years ago

0.0.74

4 years ago

0.0.73

4 years ago

0.0.72

4 years ago

0.0.70

4 years ago

0.0.71

4 years ago

0.0.69

4 years ago

0.0.68

4 years ago

0.0.67

4 years ago

0.0.66

4 years ago

0.0.65

4 years ago

0.0.63

4 years ago

0.0.64

4 years ago

0.0.62

4 years ago

0.0.60

4 years ago

0.0.61

4 years ago

0.0.59

4 years ago

0.0.58

4 years ago

0.0.57

4 years ago

0.0.56

4 years ago

0.0.55

4 years ago

0.0.54

4 years ago

0.0.53

4 years ago

0.0.52

4 years ago

0.0.51

4 years ago

0.0.50

4 years ago

0.0.48

4 years ago

0.0.49

4 years ago

0.0.47

4 years ago

0.0.46

4 years ago

0.0.45

4 years ago

0.0.44

4 years ago

0.0.43

4 years ago

0.0.42

4 years ago

0.0.41

4 years ago

0.0.40

4 years ago

0.0.39

4 years ago

0.0.37

4 years ago

0.0.38

4 years ago

0.0.36

4 years ago

0.0.35

4 years ago

0.0.34

4 years ago

0.0.33

4 years ago

0.0.30

4 years ago

0.0.31

4 years ago

0.0.32

4 years ago

0.0.29

4 years ago

0.0.28

4 years ago

0.0.27

4 years ago

0.0.26

4 years ago

0.0.25

4 years ago

0.0.24

4 years ago

0.0.23

4 years ago

0.0.22

4 years ago

0.0.21

4 years ago

0.0.20

4 years ago

0.0.19

4 years ago

0.0.18

4 years ago

0.0.17

5 years ago

0.0.16

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.9

5 years ago