{"_id":"@agile-central-technical-services/utils-treegrid-derived-columns","_rev":"2-0cf8435a72b90660246a61df62e73af1","name":"@agile-central-technical-services/utils-treegrid-derived-columns","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@agile-central-technical-services/utils-treegrid-derived-columns","version":"1.0.0","description":"Extend Rally.ui.grid.TreeGridView to support \"derived columns\" (columns not part of data model)","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","postversion":"git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/RallyTechServices/utils-treegrid-derived-columns.git"},"keywords":["rally","agile","central","technical","services","tree","grid","derived","columns"],"author":{"name":"Tyr Johanson"},"license":"ISC","bugs":{"url":"https://github.com/RallyTechServices/utils-treegrid-derived-columns/issues"},"homepage":"https://github.com/RallyTechServices/utils-treegrid-derived-columns#readme","gitHead":"d0b950eb2d2385ec5ae03401c8e4495f8c0b1109","_id":"@agile-central-technical-services/utils-treegrid-derived-columns@1.0.0","_shasum":"0484ab0b032e5e088f8b6c93ad75d3bf53b74def","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"tyrjo","email":"tyrjo@yahoo.com"},"dist":{"shasum":"0484ab0b032e5e088f8b6c93ad75d3bf53b74def","tarball":"https://registry.npmjs.org/@agile-central-technical-services/utils-treegrid-derived-columns/-/utils-treegrid-derived-columns-1.0.0.tgz","fileCount":3,"unpackedSize":8824,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbGDDiCRA9TVsSAnZWagAAsBQP/j6h4NizsSlGBmh7JTaE\nXwuvGuxpUAAozI2SvIeFLDw9hbfzWSZcd82i/mHIgNo1PLV9daJwz7oI/g9R\nsBC+/+IYl9K6vvlerZf3US8snQkKTNDMWWZs8SS4heuFjyRN3yQpaUPQOqUv\nlotLeOr4clMPAwlcJpTMNiyBwCsfgJLJcqmEXGin5zkOtyuXwrfqSA+XupUk\nBUH4Rr3sJBCZQmuvCaCPlHTvlzn1ipuXCmd8EtlqM9Z8OOaZYRkJdGSn8vJ+\nryU7Ek5CC3QKirR9dQTvipeYO2CMo2GxbMfu0sHQKQMl6KV13H5Qf9GxbY2c\n7clgpHjM4cSjZHHaFKtQFphrefKO3SL6FtxM61KUkifWkEuBDEH6D1OHi2oO\nckV95xYIibntZxPMKOk0aVqZEDh96vPgldlNxQOweg7lXeefMtTwarqOoAUB\nI0NRcjGSqMHV0CzgxDqTUhzPAj2ugT4UD89eUJG3RZ2XieAdlGohTagEaQ+v\ncTd00+j7dZV3t8UA1zumVoLDCK7psaUYtolJ8FC8Ap4t4OneW7Gs9nL/IHqU\nuhdFcqWCAK75S1f43W0xJU5anwmuW8Sr3dnKGcbmkgssdBoD8oMk28sKAkXt\nCtLW1y7cFzDm1/D6d3XnYS2BeSxkiBQk9a7REsBaJlAeP81Db5OJ2miyTmqW\nVqwZ\r\n=LFb2\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-T+TeU1muyUAyi3YzcrvG4wWM1bJps8FIQ57jvcLehiKJ4qaav07j9NcTZi9qGbTKAUK5fI+kgt55o2jSyJ0How==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWuQLrfq024dgg1n2cs0As5UoCVRQIajQtsHzEKs19HwIhAL77pXW6HPkjgHaqmz4KHx7rUUEd8e60XHA5xyGB7zOI"}]},"maintainers":[{"name":"tyrjo","email":"tyrjo@yahoo.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/utils-treegrid-derived-columns_1.0.0_1528312033044_0.3860395777083028"},"_hasShrinkwrap":false}},"time":{"created":"2018-06-06T19:07:12.799Z","1.0.0":"2018-06-06T19:07:13.130Z","modified":"2022-06-12T14:21:39.062Z"},"maintainers":[{"name":"tyrjo","email":"tyrjo@yahoo.com"}],"description":"Extend Rally.ui.grid.TreeGridView to support \"derived columns\" (columns not part of data model)","homepage":"https://github.com/RallyTechServices/utils-treegrid-derived-columns#readme","keywords":["rally","agile","central","technical","services","tree","grid","derived","columns"],"repository":{"type":"git","url":"git+https://github.com/RallyTechServices/utils-treegrid-derived-columns.git"},"author":{"name":"Tyr Johanson"},"bugs":{"url":"https://github.com/RallyTechServices/utils-treegrid-derived-columns/issues"},"license":"ISC","readme":"# utils-treegrid-derived-columns\n\n![This is a screenshot](https://github.com/RallyTechServices/utils-treegrid-derived-columns/raw/master/screenshot.png)\n\nThis module provides a Rally.ui.grid.TreeGridView that addes support for a `derivedColumnCfgs`\nconfig that accepts column definitions that are \"derived\" from the model data, but are not a field\non the model itself. This can be because the columns use a dataIndex that was added to the data after load,\nor because the column is a template column that renders without using a dataIndex.\n\nIn the screenshot, `Name` and `Release` are standard columns of the PortfolioItem, selected using the\n`rallygridboardfieldpicker` plugin, the rest of the columns are \"derived\" based on calculations after the\nportfolio items are loaded.\n\nThe derived column size and ordering will be saved and restored with the grid state.  They\nwill also cooporate with the `rallygridboardfieldpicker` plugin.  They won't show up in the field\npicker, but will preserve the order among themselves and any fields added by the field picker.\n\n## Example usage\n```\naddGrid: function() {\n    this.add({\n        xtype: 'rallygridboard',\n        context: this.getContext(),\n        modelNames: ['PortfolioItem/Theme']\n        toggleState: 'grid',\n        height: this.getHeight(),\n        plugins: [\n            {\n                ptype: 'rallygridboardfieldpicker'\n            }\n        ],\n        gridConfig: {\n            store: store,\n            columnCfgs: this.getColumns(),\n            derivedColumnCfgs: this.getDerivedColumnCfgs()\n        }\n    });\n},\n\ngetColumnCfgs() {\n        // Currently mostly derived columns. The column picker will add other standard columns\n        return ['FormattedID', 'Name'].concat(this.getDerivedColumnCfgs());\n    },\n\ngetDerivedColumnCfgs: function() {\n    var periodDays = Rally.getApp().getSetting(TsConstants.SETTINGS.PERIOD_LENGTH);\n    return [{\n        text: 'Feature Cycle Time - Overall Median (Days)',\n        xtype: 'templatecolumn',\n        tpl: new Ext.XTemplate(''),\n        scope: this,\n        renderer: function(value, meta, record) {\n            return this.nanRenderer(record, 'CycleTimeMedian');\n        }\n    }, {\n        text: 'Feature Cycle Time - Last ' + Ext.util.Format.plural(periodDays, 'Day', 'Days'),\n        xtype: 'templatecolumn',\n        tpl: new Ext.XTemplate(''),\n        scope: this,\n        renderer: function(value, meta, record) {\n            return this.nanRenderer(record, 'CycleTimeCurrentPeriod');\n        }\n    }, {\n        text: 'Feature Cycle Time - ' + periodDays + ' Day Trend',\n        tpl: '{CycleTimeTrend}',\n        xtype: 'templatecolumn',\n        scope: this,\n        renderer: function(value, meta, record) {\n            return this.cycleTimeTrendRenderer(record, 'CycleTimeTrend');\n        }\n    }, {\n        text: 'Feature Throughput - Last ' + Ext.util.Format.plural(periodDays, 'Day', 'Days'),\n        xtype: 'templatecolumn',\n        tpl: new Ext.XTemplate(''),\n        scope: this,\n        renderer: function(value, meta, record) {\n            return this.nanRenderer(record, 'ThroughputMedian');\n        }\n\n    }, {\n        text: 'Feature Throughput - ' + periodDays + ' Day Trend',\n        tpl: '{ThroughputTrend}',\n        xtype: 'templatecolumn',\n        scope: this,\n        renderer: function(value, meta, record) {\n            return this.throughputTrendRenderer(record, 'ThroughputTrend');\n        }\n    }, {\n        text: TsConstants.LABELS.WIP,\n        xtype: 'templatecolumn',\n        tpl: new Ext.XTemplate(''),\n        scope: this,\n        renderer: function(value, meta, record) {\n            return this.wipRenderer(record);\n        }\n    }];\n},\n```\n\n## Developer Notes\nTo Update\n1. `npm version patch` - This will update the package.json to a new version and create a git tag (e.g. `v1.0.1`). It will also run the `postversion` script\nto push the changes and tag to GitHub.\n2. `npm publish --access public` - This will publish the new version to npmjs.org\n3. Create the new release in [`utils-treegrid-derived-columns/releases'](https://github.com/RallyTechServices/utils-treegrid-derived-columns/releases)\n\n\n","readmeFilename":"README.md"}