@dataloop-ai/components 0.16.7 → 0.16.9

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
@@ -1,45 +1,38 @@
1
1
  # [Dataloop Components Library](https://dataloop-ai.github.io/components/) ![components version](https://img.shields.io/npm/v/@dataloop-ai/components?label=Latest%20Library%20Version) ![release status](https://img.shields.io/badge/Relese%20Status-Beta-yellowgreen)
2
2
 
3
- This repository contains custom made vue components for Dataloop platform and apps use
3
+ Welcome to the Dataloop Components Library, which contains custom-made Vue components for the Dataloop platform and apps use. The Vue components are written using the Vue3 composition API and can be used in Vue2 projects as well, as long as you install vue-demi. You can find our documentation with our Storybook link [here](https://dataloop-ai.github.io/components/).
4
4
 
5
- The vue components are written in vue3 composition api and can be used in vue 2 projects as well as long as you install vue-demi
6
-
7
- You can see our documentation with our storybook link [here](https://dataloop-ai.github.io/components/)
5
+ ## Release Status
6
+ The current release status is beta. You can check the latest library version by looking at the shield above or by visiting our npm page.
8
7
 
9
8
  ## Development
10
9
 
11
- Working on this repo is simple as it already has hooks set up to guarantee high code quality
12
-
13
- The repository has automatic lint on staged files and run tests. if any were to fail then the commit itself will fail too.
10
+ Working with this repository is straightforward, as it already has hooks set up to guarantee high code quality. The repository has automatic linting on staged files and runs tests. If any tests fail, the commit itself will fail too
14
11
 
15
12
  ### Using Components in other projects
16
- using the components is as simple as installing the npm package and importing them normally into your vue app
13
+ Using our components is simple: just install the npm package and import them normally into your Vue app. If you're working on a Vue2 project, make sure to install @vue/composition-api.
17
14
 
18
- make sure you if you are on vue2 project to install @vue/composition-api
19
15
 
20
16
  ### Adding new Components
21
- in order to add new components you are required to open a pull request
22
- the pull request must contain the following in order for it to be approved
17
+ To add new components, you are required to open a pull request. The pull request must contain the following to be approved:
23
18
 
24
- - the component vue file
25
- - the story relating to the component ( for storybook integration )
26
- - tests for the component
19
+ - The component Vue file
20
+ - The story relating to the component (for Storybook integration)
21
+ - Tests for the component
27
22
 
28
- any pull requests with missing requirements will not be approved.
23
+ Any pull requests with missing requirements will not be approved.
29
24
 
30
25
  ## Scripts
31
- the work environment is set up to be used on visual studio code.
32
-
33
- the launch.json file contains 3 main configs
26
+ The work environment is set up to be used on Visual Studio Code.
34
27
 
35
- 1. running a vite server to simulate vue3 environment
36
- 2. running a storybook server to view the stories
37
- 3. running tests
28
+ The launch.json file contains three main configurations:
38
29
 
39
- you can also access these commands by running the following
30
+ 1. Running a Vite server to simulate the Vue3 environment
31
+ 2. Running a Storybook server to view the stories
32
+ 3. Running tests
40
33
 
41
- 1. npm run dev ( for vite server )
42
- 2. npm run storybook ( for storybook server )
43
- 3. npm run test ( for tests )
34
+ You can also access these commands by running the following:
44
35
 
45
- There are automatic pipelines when working. if development gets merged into master we automatically bump version by a minor and any other fix branch to master will only bump it by patch.
36
+ 1. npm run dev (for the Vite server)
37
+ 2. npm run storybook (for the Storybook server)
38
+ 3. npm run test (for running tests)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataloop-ai/components",
3
- "version": "0.16.7",
3
+ "version": "0.16.9",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -22,7 +22,7 @@
22
22
  "check-only": "if grep -E -H -r --exclude-dir=.git --exclude-dir=node_modules --exclude=*.json --exclude=*.yml '^(describe|it).only' .; then echo 'Found only in test files' && exit 1; fi"
23
23
  },
24
24
  "dependencies": {
25
- "@dataloop-ai/icons": "^3.0.5",
25
+ "@dataloop-ai/icons": "^3.0.6",
26
26
  "@types/lodash": "^4.14.184",
27
27
  "chart.js": "^3.9.1",
28
28
  "lodash": "^4.17.21",
@@ -38,7 +38,7 @@
38
38
  </div>
39
39
  </div>
40
40
  <div
41
- v-if="withProgressBar"
41
+ v-if="progress"
42
42
  class="kpi_box__progress_bar"
43
43
  >
44
44
  <dl-progress-bar
@@ -107,14 +107,9 @@ export default defineComponent({
107
107
  },
108
108
  progress: {
109
109
  type: Object as PropType<DlKpiProgressType>,
110
- default: () => ({} as DlKpiProgressType)
110
+ default: null
111
111
  },
112
- withBorder: {
113
- type: Boolean,
114
- default: false,
115
- required: false
116
- },
117
- withProgressBar: {
112
+ bordered: {
118
113
  type: Boolean,
119
114
  default: false,
120
115
  required: false
@@ -127,6 +122,9 @@ export default defineComponent({
127
122
  },
128
123
  setup(props) {
129
124
  const progressValue = (progress: DlKpiProgressType) => {
125
+ if (!progress) {
126
+ return null
127
+ }
130
128
  return progress?.value ? progress.value / 100 : null
131
129
  }
132
130
 
@@ -136,7 +134,7 @@ export default defineComponent({
136
134
 
137
135
  const cssVars = computed(() => {
138
136
  return {
139
- '--dl-kpi-border': props.withBorder ? '1px solid #e4e4e4' : '',
137
+ '--dl-kpi-border': props.bordered ? '1px solid #e4e4e4' : '',
140
138
  '--dl-kpi-title-max-width': isSingleWord(props.title)
141
139
  ? '100%'
142
140
  : '90%', // todo: caused a bug with single words
@@ -61,10 +61,6 @@ export default defineComponent({
61
61
  validator(value: CounterItem[]): boolean {
62
62
  return value.length <= 8
63
63
  }
64
- },
65
- abbreviateNumbers: {
66
- type: Boolean,
67
- default: true
68
64
  }
69
65
  },
70
66
  data() {