@datarailsshared/dr_renderer 1.5.131 → 1.5.133

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.
@@ -10,7 +10,7 @@ on:
10
10
  branches:
11
11
  - 'master'
12
12
  - 'main'
13
- - 'migration-to-github'
13
+ - 'move-to-jfrog'
14
14
 
15
15
  concurrency:
16
16
  group: '${{ github.ref }}-${{ github.workflow }}'
@@ -18,7 +18,7 @@ concurrency:
18
18
 
19
19
  permissions:
20
20
  contents: read
21
- packages: write
21
+ packages: read
22
22
 
23
23
  jobs:
24
24
  publish-npm:
@@ -34,12 +34,40 @@ jobs:
34
34
  secrets:
35
35
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
36
36
 
37
- publish-gh-packages:
38
- name: Publish to GitHub Packages
37
+ publish-jfrog:
38
+ name: Publish to JFrog Artifactory
39
39
  needs: publish-npm
40
- uses: datarails/dr_github_reusable/.github/workflows/npm-publish-gh-packages.yml@main
41
- with:
42
- node_version: '14.16.1'
43
- package_scope: '@datarails'
44
- version: ${{ needs.publish-npm.outputs.version }}
45
- secrets: inherit
40
+ if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/move-to-jfrog') }}
41
+ runs-on: ubuntu-latest
42
+ steps:
43
+ - name: Checkout code
44
+ uses: actions/checkout@v4
45
+
46
+ - name: Setup Node.js
47
+ uses: actions/setup-node@v4
48
+ with:
49
+ node-version: '14.16.1'
50
+
51
+ - name: Install dependencies
52
+ run: npm install
53
+
54
+ - name: Update package version
55
+ run: |
56
+ VERSION="${{ needs.publish-npm.outputs.version }}"
57
+ sed -i "s/{{cicd_version}}/$VERSION/g" package.json
58
+ echo "Updated package.json to version $VERSION"
59
+
60
+ - name: Configure npm for JFrog Artifactory
61
+ env:
62
+ ARTIFACTORY_NPM_REPO: ${{ secrets.ARTIFACTORY_NPM_REPO }}
63
+ ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }}
64
+ run: |
65
+ REGISTRY_HOST=$(echo "$ARTIFACTORY_NPM_REPO" | sed 's|https://||' | sed 's|/$||')
66
+ {
67
+ echo "registry=${ARTIFACTORY_NPM_REPO}"
68
+ echo "//${REGISTRY_HOST}/:_authToken=${ARTIFACTORY_TOKEN}"
69
+ } > .npmrc
70
+ echo "✓ npm configured for JFrog Artifactory"
71
+
72
+ - name: Publish to JFrog Artifactory
73
+ run: npm publish
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datarailsshared/dr_renderer",
3
- "version": "1.5.131",
3
+ "version": "1.5.133",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -8238,11 +8238,10 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
8238
8238
  lodash.forEach(values, (value, key) => {
8239
8239
  const formatInfo = pivotData[type][key] || {};
8240
8240
  const valueToFloat = parseFloat(value);
8241
- const isBlankDate = formatInfo.type === 'Date' && (value === '' || value === '[blank]');
8242
8241
  const isDate = formatInfo.type === 'Date' && (moment_lib(valueToFloat).isValid() || moment_lib(value, formatInfo.format).isValid());
8243
8242
  const isNumberFormatting = !isDate && formatInfo.format && highchartsRenderer.isFormattingNumberAxis(pivotData);
8244
8243
 
8245
- if (isNumberFormatting || isDate || isBlankDate) {
8244
+ if (isNumberFormatting || isDate) {
8246
8245
  values[key] = highchartsRenderer.returnRawDataValue(
8247
8246
  formatInfo.type,
8248
8247
  !isNaN(valueToFloat) ? valueToFloat : value,
@@ -359,8 +359,8 @@ const withLabelWithPercentagePercentStacked = () => {
359
359
  createToggle('hide_subtotals', 'Hide subtotals', false),
360
360
  ...createLabelStyleGroup(),
361
361
  createDivider(),
362
- createCheckbox('show_value', 'Value', false, { clickFn: labelValueClickFn }),
363
- createCheckbox('show_out_of_x_axis', '% Out of [X Axis]', true, { clickFn: labelValueClickFn }),
362
+ createCheckbox('show_value', 'Value', true, { clickFn: labelValueClickFn }),
363
+ createCheckbox('show_out_of_x_axis', '% Out of [X Axis]', false, { clickFn: labelValueClickFn }),
364
364
  createCheckbox('show_out_of_data_series', '% Out of [Data Series]', false, { clickFn: labelValueClickFn }),
365
365
  // present_total and show_percentage removed - total is always 100% for percent stacking
366
366
  ]);
@@ -469,8 +469,8 @@ Object {
469
469
  "shadow": false,
470
470
  "show": true,
471
471
  "show_out_of_data_series": false,
472
- "show_out_of_x_axis": true,
473
- "show_value": false,
472
+ "show_out_of_x_axis": false,
473
+ "show_value": true,
474
474
  "vertical": false,
475
475
  },
476
476
  "legends_position": Object {
@@ -784,8 +784,8 @@ Object {
784
784
  "shadow": false,
785
785
  "show": true,
786
786
  "show_out_of_data_series": false,
787
- "show_out_of_x_axis": true,
788
- "show_value": false,
787
+ "show_out_of_x_axis": false,
788
+ "show_value": true,
789
789
  "vertical": false,
790
790
  },
791
791
  "legends_position": Object {
@@ -3515,14 +3515,14 @@ Object {
3515
3515
  },
3516
3516
  Object {
3517
3517
  "clickFn": "[Function]",
3518
- "default_value": false,
3518
+ "default_value": true,
3519
3519
  "element_label": "Value",
3520
3520
  "element_type": "checkbox",
3521
3521
  "value_name": "show_value",
3522
3522
  },
3523
3523
  Object {
3524
3524
  "clickFn": "[Function]",
3525
- "default_value": true,
3525
+ "default_value": false,
3526
3526
  "element_label": "% Out of [X Axis]",
3527
3527
  "element_type": "checkbox",
3528
3528
  "value_name": "show_out_of_x_axis",
@@ -5120,17 +5120,6 @@ describe('highcharts_renderer', () => {
5120
5120
  const formattedKey = highchartsRenderer.getFormattedKey(initialKey, pivotData, type);
5121
5121
  expect(formattedKey).toEqual(initialKey);
5122
5122
  });
5123
-
5124
- // some e2e tests exist that expects this behavior
5125
- it('should format blank value with [blank] text', () => {
5126
- const initialKey = ['DR_Others', ''];
5127
- const pivotData = {
5128
- colFormats: [{ type: "Text", name: "Month" }, { type: 'Date', name: "Date" }],
5129
- };
5130
- const type = 'colFormats';
5131
- const formattedKey = highchartsRenderer.getFormattedKey(initialKey, pivotData, type);
5132
- expect(formattedKey).toEqual(['DR_Others', '[blank]']);
5133
- });
5134
5123
  });
5135
5124
  });
5136
5125