@oliasoft-open-source/react-ui-library 2.2.1 → 2.3.0

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/.gitlab-ci.yml CHANGED
@@ -42,6 +42,8 @@ publish:
42
42
  script:
43
43
  # Get the version from package.json
44
44
  - VERSION=$(node -p "require('./package.json').version")
45
+ # Prepare MatterMost message
46
+ - MESSAGE="🤖 React UI Library version $VERSION released"
45
47
  # Prepare .npmrc
46
48
  - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
47
49
  # Configure git
@@ -70,4 +72,5 @@ publish:
70
72
  # Publish the NPM package to the public NPM registry
71
73
  echo "Publishing package to NPM registry"
72
74
  npm publish
75
+ ./scripts/send-mattermost-msg.sh "$MATTERMOST_BOT_KEY" "$MESSAGE"
73
76
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/react-ui-library",
3
- "version": "2.2.1",
3
+ "version": "2.3.0",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,21 @@
1
+ #!/bin/bash
2
+ set -eEuo pipefail
3
+
4
+ # This script requires the following things to be installed:
5
+ # - bash
6
+ # - curl
7
+
8
+ # Required inputs:
9
+ MATTERMOST_BOT_KEY=$1
10
+ MSG=$2
11
+
12
+ # Optional inputs:
13
+ CHANNEL=${3:-'#releases'}
14
+ USERNAME=${4:-'Gitlab CI/CD'}
15
+ ICON_URL=${5:-'https://avatars.githubusercontent.com/in/1724?s=80&v=4'}
16
+ MATTERMOST_URL=${6:-'https://mm.oliasoft.com/hooks/'}
17
+
18
+ curl -X POST \
19
+ --data-urlencode \
20
+ "payload={\"channel\": \"$CHANNEL\", \"username\": \"$USERNAME\", \"icon_url\": \"$ICON_URL\", \"text\": \"$MSG\"}" \
21
+ $MATTERMOST_URL$MATTERMOST_BOT_KEY
@@ -107,6 +107,7 @@ export const Table = (props) => {
107
107
  rowIndex={rowIndex}
108
108
  row={row}
109
109
  columnCount={columnCount}
110
+ columnWidths={columnWidths}
110
111
  colSpan={colSpan}
111
112
  hasRowActions={rowActions}
112
113
  key={`1_${rowIndex}`}
@@ -172,6 +173,7 @@ export const Table = (props) => {
172
173
  rowIndex={rowIndex}
173
174
  row={row}
174
175
  columnCount={columnCount}
176
+ columnWidths={columnWidths}
175
177
  colSpan={colSpan}
176
178
  hasRowActions={rowActions}
177
179
  key={`1_${rowIndex}`}
@@ -234,6 +234,20 @@ export const tableColspan = {
234
234
  ],
235
235
  };
236
236
 
237
+ export const tableColspanWidths = {
238
+ ...table,
239
+ columnWidths: ['auto', '120px', '120px', 'auto'],
240
+ headers: [
241
+ {
242
+ cells: [
243
+ { value: 'Header' },
244
+ { value: 'Header', colSpan: 2 },
245
+ { value: 'Header' },
246
+ ],
247
+ },
248
+ ],
249
+ };
250
+
237
251
  export const tableAlignment = {
238
252
  ...tableColspan,
239
253
  columnAlignment: ['left', 'right', 'right', 'left', 'right'],
@@ -60,6 +60,9 @@ Colspan.args = {
60
60
  table: storyData.tableColspan,
61
61
  };
62
62
 
63
+ export const ColspanWithWidths = Template.bind({});
64
+ ColspanWithWidths.args = { table: storyData.tableColspanWidths };
65
+
63
66
  export const ColumnAlignment = Template.bind({});
64
67
  ColumnAlignment.args = {
65
68
  table: storyData.tableAlignment,