@bytebrand/fe-ui-core 4.8.2 → 4.8.4

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.
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env sh
2
+ . "$(dirname -- "$0")/_/husky.sh"
3
+
4
+ npm run test:ci
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytebrand/fe-ui-core",
3
- "version": "4.8.2",
3
+ "version": "4.8.4",
4
4
  "description": "UI components for the auto.de project",
5
5
  "main": "index.ts",
6
6
  "module": "dist/common.js",
@@ -97,12 +97,14 @@
97
97
  "tslint-config-airbnb": "^5.11.1",
98
98
  "tslint-loader": "^3.5.4",
99
99
  "typescript": "^3.5.1",
100
- "webpack-cli": "^3.3.6"
100
+ "webpack-cli": "^3.3.6",
101
+ "husky": "^9.0.11"
101
102
  },
102
103
  "resolutions": {
103
104
  "@types/react": "^16.8.3"
104
105
  },
105
106
  "scripts": {
107
+ "prepare": "husky",
106
108
  "storybook": "start-storybook -p 6006",
107
109
  "clean": "rm -rf ./dist/*.*",
108
110
  "build:lib": "yarn clean && webpack --config ./webpack.config.js --progress",
@@ -203,4 +203,7 @@
203
203
  flex-shrink: 0;
204
204
 
205
205
  .longTitle
206
- max-width: 157px
206
+ max-width: 157px
207
+
208
+ .valueDescription
209
+ font-size: 11px
@@ -62,14 +62,14 @@ class AccordionWidget extends React.Component<IAccardionSectionProps, IAccardion
62
62
  <div className={styles.table}>
63
63
  <h3 className={styles.tableName}>{header}</h3>
64
64
  {propsList.map((prop, i) => {
65
- const { title, subTitle, value, isVisible = true, isLongTitle = false } = decoratedProps[prop];
65
+ const { title, subTitle, value, isVisible = true, isLongTitle = false, valueDescription = '' } = decoratedProps[prop];
66
66
  return isVisible && (
67
67
  <div key={i} className={title ? styles.tr : ''}>
68
68
  {title && <div className={classnames(styles.th, isLongTitle ? styles.longTitle : '')}>
69
69
  <span className={styles.title}>{title}</span>
70
70
  {subTitle ? <p className={styles.subTitle}>{subTitle}</p> : null}
71
71
  </div>}
72
- <div className={styles.td}>{value}</div>
72
+ <div className={styles.td}>{value} {valueDescription ? <span className={styles.valueDescription}>{valueDescription}</span> : ''}</div>
73
73
  </div>
74
74
  );
75
75
  })}
@@ -11,6 +11,7 @@ export interface IDecoratedProp {
11
11
  subTitle?: string;
12
12
  isVisible?: boolean;
13
13
  isLongTitle?: boolean;
14
+ valueDescription?: string;
14
15
  readonly value?: (string | JSX.Element);
15
16
  }
16
17
 
@@ -1568,7 +1568,8 @@ const getDecoratedProps = (
1568
1568
  return Number.isFinite(co2PriceLow)
1569
1569
  ? t('vehicleProps:value.wltpCo2Price', { price: getFormattedPrice(co2PriceLow, '$,.2f') })
1570
1570
  : t('vehicleProps:value.na');
1571
- }
1571
+ },
1572
+ valueDescription: t('vehicleProps:value.wltpCo2PriceSpec')
1572
1573
  },
1573
1574
  wltpCo2CostsMiddle: {
1574
1575
  get title() {
@@ -1583,7 +1584,8 @@ const getDecoratedProps = (
1583
1584
  return Number.isFinite(co2PriceMedium)
1584
1585
  ? t('vehicleProps:value.wltpCo2Price', { price: getFormattedPrice(co2PriceMedium, '$,.2f') })
1585
1586
  : t('vehicleProps:value.na');
1586
- }
1587
+ },
1588
+ valueDescription: t('vehicleProps:value.wltpCo2PriceSpec')
1587
1589
  },
1588
1590
  wltpCo2CostsHigh: {
1589
1591
  get title() {
@@ -1598,7 +1600,8 @@ const getDecoratedProps = (
1598
1600
  return Number.isFinite(co2PriceHigh)
1599
1601
  ? t('vehicleProps:value.wltpCo2Price', { price: getFormattedPrice(co2PriceHigh, '$,.2f') })
1600
1602
  : t('vehicleProps:value.na');
1601
- }
1603
+ },
1604
+ valueDescription: t('vehicleProps:value.wltpCo2PriceSpec')
1602
1605
  },
1603
1606
  powerPrice: {
1604
1607
  title: t('vehicleProps:title.powerPrice'),
package/.gitlab-ci.yml DELETED
@@ -1,62 +0,0 @@
1
- stages:
2
- - build
3
- - test
4
- - deploy
5
-
6
- image: node:16.13.2-buster
7
-
8
- before_script:
9
- - "[[ -s $HOME/.nvm/nvm.sh ]] && . $HOME/.nvm/nvm.sh"
10
- - source ~/.bashrc
11
- - nvm use 16
12
-
13
- build:
14
- stage: build
15
- script:
16
- - echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN_VALUE" >> .npmrc
17
- - sed -i s/npm_token_value/${NPM_TOKEN_VALUE}/ ./.npmrc
18
- - yarn
19
- cache:
20
- paths:
21
- - node_modules/
22
- artifacts:
23
- expire_in: 1 days
24
- when: on_success
25
- paths:
26
- - node_modules/
27
-
28
- test:
29
- stage: test
30
- script:
31
- - yarn test:ci
32
- cache:
33
- paths:
34
- - coverage/
35
- artifacts:
36
- paths:
37
- - coverage/
38
- when: always
39
- reports:
40
- junit:
41
- - junit.xml
42
- coverage_report:
43
- coverage_format: cobertura
44
- path: coverage/cobertura-coverage.xml
45
- # only:
46
- # - master
47
- tags:
48
- - 01gitlab-runner-gcloud
49
-
50
- pages:
51
- stage: deploy
52
- dependencies:
53
- - test
54
- script:
55
- - mkdir .public
56
- - cp -r coverage/cobertura-coverage.xml .public/cobertura-coverage.xml
57
- - mv .public public
58
- artifacts:
59
- paths:
60
- - public
61
- only:
62
- - master