├── .bowerrc ├── .editorconfig ├── .github ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md └── stale.yml ├── .gitignore ├── .jshintrc ├── .travis.yml ├── CONTRIBUTING.md ├── HISTORY.md ├── LICENSE ├── OSS_Notice.pdf ├── README.md ├── bower.json ├── css └── px-inbox-styles.html ├── demo ├── px-inbox-demo.html └── px-inbox-detail-demo.html ├── deploy.enc ├── examples └── inbox.html ├── favicon.ico ├── gulpfile.js ├── index.html ├── monogram-wdmk.png ├── package-lock.json ├── package.json ├── px-inbox-api.json ├── px-inbox.html ├── sass └── px-inbox.scss ├── scripts └── ghp.sh ├── test ├── index.html ├── px-inbox-fixture.html └── px-inbox-tests.js ├── wct.conf.json └── yarn.lock /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "./bower_components" 3 | } -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | 10 | # Change these settings to your own preference 11 | indent_style = space 12 | indent_size = 2 13 | 14 | # We recommend you to keep these unchanged 15 | end_of_line = lf 16 | charset = utf-8 17 | trim_trailing_whitespace = true 18 | insert_final_newline = true 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Submit an Issue 2 | 3 | Hi, 4 | 5 | Thanks for helping us improve the Predix UI platform by submitting an issue. 6 | 7 | Before you begin, please check the list of existing issues to avoid submitting a duplicate issue. 8 | 9 | To help us solve this issue as fast as possible, please fill out the following sections: 10 | 11 | ## Expected behavior and actual behavior: 12 | 13 | ## Steps to reproduce the problem: 14 | 15 | ## Environment (_component version number, Browser (including version), operating system, hardware, etc_): 16 | 17 | ## Screenshots (_optional, but very helpful_): 18 | 19 | ## Code examples help us better understand the issue - follow the appropriate codepen for the component by going to https://predix-ui.com, finding the component in question, and clicking on the pencil icon under the demo. 20 | Once you've created your code example, you can save it under a new url. 21 | Please note that you should NOT use the same methods for production as the ones used in codepen - these methods are not production ready. -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Pull Request 2 | 3 | Hi, 4 | 5 | Thanks for helping us improve the Predix UI platform by submitting a Pull Request. 6 | 7 | To help us merge your Pull Request as fast as possible, please fill out the following sections: 8 | 9 | * ## A description of the changes proposed in the pull request: 10 | 11 | * ## A reference to a related issue (if applicable): 12 | 13 | * ## @mentions of the person or team responsible for reviewing proposed changes: 14 | 15 | * ## working tests: 16 | #### The tests need to be functional and/or unit tests, written for the wct framework, and placed in the test folder, following our testing guidelines. -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Issues/PRs with no activity for a year will be marked as stale 2 | daysUntilStale: 365 3 | 4 | # If no one has replied inside a week after an issue is marked stale, close it. 5 | daysUntilClose: 7 6 | 7 | staleLabel: wontfix 8 | markComment: > 9 | This issue or PR has been automatically marked as stale because there has been 10 | no activity in over a year. It will be closed in 1 week if no further activity occurs. 11 | Thanks for your contribution, and please don't hesitate to comment if this issue/PR 12 | is still relevant. 13 | exemptLabels: 14 | - pinned 15 | - security 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | temp 4 | bower_components 5 | .idea 6 | reports 7 | css/noprefix 8 | bower_components-*/ 9 | bower-*.json 10 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "esversion": 6, 3 | "curly": true, 4 | "eqeqeq": true, 5 | "immed": true, 6 | "latedef": true, 7 | "noarg": true, 8 | "sub": true, 9 | "undef": true, 10 | "boss": true, 11 | "eqnull": true, 12 | "node": true, 13 | "browser": true, 14 | "expr": true, 15 | "globals": { 16 | "it": false, 17 | "xit": false, 18 | "describe": false, 19 | "xdescribe": false, 20 | "before": false, 21 | "after": false, 22 | "beforeEach": false, 23 | "afterEach": false, 24 | "expect": false, 25 | "spyOn": false, 26 | "alert": false, 27 | "require": false, 28 | "requirejs": false, 29 | "Card": true, 30 | "iOS": false, 31 | "$": true, 32 | "define": false, 33 | "angular": false, 34 | "Polymer": false, 35 | "suite": false, 36 | "test": false, 37 | "assert": false 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | dist: trusty 3 | language: node_js 4 | node_js: 5 | - stable 6 | branches: 7 | except: 8 | - gh-pages 9 | addons: 10 | firefox: latest 11 | apt: 12 | sources: 13 | - google-chrome 14 | packages: 15 | - google-chrome-stable 16 | before_script: 17 | - yarn add polymer-cli 18 | - polymer install --variants 19 | script: 20 | - xvfb-run wct --skip-plugin sauce 21 | - if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then wct --plugin sauce --skip-plugin 22 | local; fi 23 | after_success: 24 | - if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then openssl aes-256-cbc -k "$DEPLOYSECRET" 25 | -in deploy.enc -out deploy_key -d; fi 26 | - cd $TRAVIS_BUILD_DIR/scripts 27 | - chmod 755 ghp.sh 28 | - "./ghp.sh" 29 | env: 30 | global: 31 | - secure: Lqho2jdWYfRVeYswzah9jQCkm/gUoDEx1UTYPJmdobtH3GKdFcWm9Y1Yn5/1zTSWrSFFpxqEC94JYbZV1nRIdojIWFOdKbgc3HJgPa3lfKoyCFcxZ1cu/vPtn95s26tmImpoxTVjSFf94U5tkcXaceAJq/78Ou8pEDSoF0WslBFKq12+ysvvknDwlGS3vKp1FLS/ISGiNB3OoLrGgHdn/szdX+Z5Qww7FDiZ9n8xiPoYU1mn+igaR168BIifGcb1TzFGkunng32LKhp+kVv6a0GrWt6O5S/gFQO9Wt2nL9ItZlS3eP1GPfqVmS8mbhaXkByGzcuOpiq/u+nL96Cgv9/9PMIr2lDYY2g6lEpO382stqacF8G00OJgV1ZipLXgmQg7C3UjZ9vxvNvcYapdNOuqIa+tbVgyciEA7JlPYnc1gYDnJPWs0oL3L+kNakYjQjzsl9Ntg+lag+1lU0Bm4jHPg1csXXi1rEZqAN4DdOpEfKvOUEm2EFyseqXxVlVA3tBu6MQza09bBB/GHLXw4mJ3014Mftt0hvvbB0H2bza29LLryTQ5dS8GiaLWv07RCFr+uJlvhi9oGvRrpNbNpQ5U4qDpb8sve3JTOYznS6oyMcAATSehXM8lc3r6DAXwyhimilUg2VliwIed4znodLoSFrcTt0H/zSo/hjVSYpY= 32 | - secure: KzKQePdnrAPdG4xBLTwclwdBulVMGlA+/L8zXOfY0zpQAc8ORZ7n8sUKbV+bRqIQS3Cn8f4vTrpaaQ1RYfrdJ5tE6RcacsTFwP7RW2eHLEhO+tEL9v7CfJBwlXa/+2sZC5XpcOnchgX5SC3A3O709mb89XYxNRghUDibuwmr4oGKtE92PF8rIfQ+35OO/bcIN739S34I5ggJh/oUAVpC8KWufPPITWUnMfGxwbsKBuHcdE9QRs6kPAAVFpWPnm9rFHE51kA0ROty1Xyecfh2w8eH07Bi2zCwnVrRZEegl6G6ORVDZsv523AJPe5Q8Lvuvrpm0di4vfnv8ImlWU7aFb5UK+65vJfnIRNztzVkYO4IobX2TSeUseI3MTv43j6kn+ujvfHAyB38HZvtCmAW0JjLWP8shb/1fvHSa4gTjKnChQUQiUB8WVr4mUUdhuzB1nVk8jn3buVOv+1rVPpJDZmD0Iw1MkaUoeKaWXjLXPIx2E8k9a/CSwMVQ981DX93OpkjrLtaqgQfwEpHRpsXeBNSgpVqcbOJO4mThRvNdYbbESmeEFT+iTR7ddarwbwuJmbYs3QtZk3j2PHldfyTcqNRBT6NaaJZebVas7mtxF6AWaruHarcKPWWWvuJqpakezLci+MbuAOPRhi3bxBwL8SQtNBaQQrNjWVB89raGFw= 33 | - secure: xIJr7nbNXs4WPbT8D9wXAydQUOYa2nT+mmYCQsLqywkhLmLzH14TyPdlCxT2fpg5/g59op9tYN6VXqoDcKt0kk8GqgRdxBXIq0NqX4vCqb98mkFzZOdOh3HZEtsKcxTwxjFzzCI1jXjymwUgPrwx7l6k/Z+NT/2tZFAS4t5+Pmud7540BANFSyOW3cT+eXCD9BeuHHmI8qsrhqm6unT5ruHdoJzC4qWsf0jvK2O1Xy+Qm1CxJqvE1x8ICgmvK+Arhhx8wbvs9cU6BrwI/Vonj0sHLFJfOCka7Wv/8ufCvV+QHX32gNrRwKf1S9rd1ua3vBep6thRJ9DhikZuaP1OAC1XnrUa65NVcXslSEaeZmS1UCMecPWU9CKEhq06wU99+1HZrgVqo+hyZWJtibgiVr7SYI2ZgVDGDeLOscfWFPnFM6tZP1FOm5DrHAKLoVPXn2hfYxkSWUnrdaxzYxpywXWueCT7SWTy3QrrOdULtgXLqX9RJ6WXNOHVWs9GFAybNaM8/BdanRZqBVpa2ueLvx2RHeFSSx9n+88yJB01ivJfO1CIf1+0Wj4jZNoGNFKPTrOsXqSCPHxHBHmR98jySTaVISNZok4QjxfWiGDSaIHv5bta4d1cQDf0/SwQrZDu5dxeNuycXrrsPT8brK75DrhUTB3M0YI7afrmEAoscWE= 34 | - secure: umk+HKhwk1QVF718mrMb3KvAi/5DjkhPF86VDhMnsqBReq6TohM+J5T4SJCmAGtjDentxF29PekMil45i4cpjkQ10c84W/goLf4TyG3WwlFnSnfbw2w0nlwY8X3vpUKaPiMpahw8tyY6K4KPh7yGzvnVaqmFOE+7WQkwdIUlDdMe4LcKpyrrFyw7ZKZHalH1xQGdqdIGpmatExNfK2lsoSVgQwjyensxgo193UkQWPZ44Kpp9v7iqseziAyFN7f4Syl33FHwUv95snxEamdN88Rhzwqz+fy7hLjWvSTlw6r75F0nGgID+c+oiVnakVaytQOpOCixCKO47hA3laP3NWmGs8XqNf/V3f3179UXs0+L6QA8X0GqwfazQ8TJtVoBOOop79IniKdf6q/BvMBFfHJwm+7j8xC23qPw8RpfSW06z1dqCkjf6mnDTBPTIBe8VR/bTpgov7mluF/Q7hx2zWdwrwhA7km4Ck9PvGJ0K8DtywH4nzMchay3JxeHLC4V2yuyjFpadQRJiXTd33c4bDVWponWy509IiUN/cc5ay+Q7JpO6ygWQ84IhTtUnouyEsZIapxpwuIUMG57q1S9ZaAVWHvNZ4OQZfZjSAvcdan7XaIrlOTqY3aQg+f1rxrWhCUDaenp8Q1gqlRNj8zqwxZhZgWseyFckxXnVtytEzE= 35 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Predix UI Hi, Want to contribute your suggestions to Predix UI? **Here's how you can help.** Please follow the below steps carefully, so your suggestions will be clear and developers can make effective fixes. ## Using the GitHub issue tracker The GitHub issue tracker is the preferred channel for [bug reports](#bug-reports), [features requests](#feature-requests) and [submitting pull requests](#pull-requests), so please respect the following restrictions: * Please **do not** use the GitHub issue tracker for personal support requests. Stack Overflow ([`predix ui`](https://stackoverflow.com/questions/tagged/predix-ui) tag), or [Predix.io](https://predix.io) are better places to get help. * Please **do not** derail or troll issues. Keep the discussion on topic and respect the opinions of others. * Please **do not** post vague comments like "+1" or ":thumbsup:". Use [GitHub's "reactions" feature](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments). We reserve the right to delete comments. ## Issues and labels Our bug tracker utilizes several labels to help organize and identify issues. Here's what they represent and how we use them: - `browser bug` - Issues that are reported to us, but are actually the result of a browser-specific bug. These issues are diagnosed with reduced test cases and result in an issue opened on that browser's own bug tracker. - `confirmed` - Issues that have been confirmed with a reduced test case and identify a bug in a Predix UI component. - `css` - Issues stemming from our compiled CSS or source Sass files. - `docs` - Issues for improving or updating our documentation. - `examples` - Issues involving the example templates included in our docs. - `feature` - Issues asking for a new feature to be added, or an existing one to be extended or modified. New features require a minor version bump (e.g., `v3.0.0` to `v3.1.0`). - `gulp` - Issues with our included JavaScript-based gulpfile, which is used to run all our tests, concatenate and compile source files, and more. 2 | - `help wanted` - Issues that we need or would like the community to help us resolve. - `js` - Issues stemming from our compiled or source JavaScript files. - `meta` - Issues with the project itself or our GitHub repository. ## Bug reports A bug is a _demonstrable problem_ caused by the code in the repository. Good bug reports are extremely helpful. Guidelines for bug reports: 0. **Validate and lint your code**; [validate your HTML](http://html5.validator.nu) and [lint your HTML](http://www.dirtymarkup.com/) to ensure your problem isn't caused by a simple error in your own code. 1. **Use the GitHub issue search**; check if the issue has already been reported. 2. **Check if the issue has been fixed**; try to reproduce the issue by using the latest `master` or development branch in the repository. 3. **Isolate the problem**; ideally create a [reduced test case](https://css-tricks.com/reduced-test-cases/) and a live example using [CodePen](http://codepen.io/mdwragg/pen/LNwmpB) or [jsfiddle](https://jsfiddle.net/Lqmcwhw0/3/). A good bug report shouldn't require others to get more information. Please be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What browser(s) and OS experience the problem? Do other browsers show the bug differently? What would you expect for the outcome? Such details will help people fix potential bugs. Example: > Short and descriptive example bug report title > > A summary of the issue and the browser/OS environment in which it occurs. If > suitable, include the steps required to reproduce the bug. > > 1. This is the first step > 2. This is the second step > 3. Further steps, etc. > > `` - a link to the reduced test case > > Any other information relevant to the bug report. This might include the lines of code that you have identified as > causing the bug, and potential solutions (and your opinions on their > merits). ## Feature Requests Feature requests are welcome, but before opening one, determine if your idea suits the scope and aims of Predix UI. *You* need to make a strong case and convince the Predix UI team to adopt your feature. Please provide as much detail and context as possible. ## Pull Requests Your pull requests�patches, improvements, and new features�are a big help. The requests should be focused and avoid unrelated commits. **Please ask** before making a significant pull request (e.g., implementing features, refactoring code, or porting to a different language) that Predix UI developers might not merge into the component. Please follow the [coding guidelines](#code-guidelines) used throughout the project (indentation, accurate comments, etc.) and any other requirements (such as test coverage). **Do not edit any of the CSS files directly!** The files are automatically generated. You should edit the source files in [`sass/`] instead. **Do not edit the `gh-pages` branch.** That branch is generated from the documentation source files and is managed separately by the Predix UI team. Please use the following process to have your work considered for the project: 1. [Fork](https://help.github.com/fork-a-repo/) the component. 2. Create a new topic branch (off the main project development branch) to contain your feature, change, or fix: ``` bash git checkout -b ``` 3. Commit your changes in logical chunks. Please adhere to these [git commit message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) or your code is unlikely to be merged into the main project. Use Git's [interactive rebase](https://help.github.com/articles/interactive-rebase) feature to tidy up your commits before making them public. 4. Locally merge (or rebase) the latest commits into your branch: ``` bash git pull [--rebase] origin master ``` 5. Push your topic branch up to your fork: ``` bash git push origin ``` 6. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) with a clear title and description against the `master` branch. ## Code guidelines ### HTML [Adhere to the Code Guide.](http://codeguide.co/#html) - Use tags and elements appropriate for an HTML5 doctype (e.g., self-closing tags). - Use [WAI-ARIA](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) attributes in documentation examples to promote accessibility. ### CSS [Adhere to the Code Guide.](http://codeguide.co/#css) - When feasible, default color palettes should comply with [WCAG color contrast guidelines](http://www.w3.org/TR/WCAG20/#visual-audio-contrast). - Except in rare cases, don't remove default `:focus` styles (via e.g. `outline: none;`) without providing alternative styles. See [this A11Y Project post](http://a11yproject.com/posts/never-remove-css-outlines/) for more details. ### JS - 2 spaces (no tabs) - "Attractive" - no errors / warnings -------------------------------------------------------------------------------- /HISTORY.md: -------------------------------------------------------------------------------- 1 | v2.4.0 2 | ================== 3 | * Adding disable-search and disable-sort properties for hiding search and sort 4 | 5 | v2.3.5 6 | ================== 7 | * reduce icon-set imports 8 | 9 | v2.3.4 10 | ================== 11 | * fixing up versions 12 | * remove unneeded demo-style import 13 | 14 | v2.3.3 15 | ================== 16 | * properly scope localize (#13) 17 | 18 | v2.3.2 19 | ================== 20 | * add unit test for date objects 21 | 22 | v2.3.1 23 | ================== 24 | * accept dates as objects or strings 25 | 26 | v2.3.0 27 | ================== 28 | * Upgrades component to be Polymer 1.x/2.x hybrid compatible 29 | * Adds new property selectedItemRef that notifies out the selected item object. 30 | This makes it more convenient to bind the selected item and get information 31 | about it rather than looping over the listItems to find the one that matches 32 | the ID in selectedItem. 33 | * Refactor to remove moment.js dependency in favor of a small fromNow method, 34 | adds localization strings to match 35 | 36 | v2.2.7 37 | ================== 38 | * remove old css variables from documentation 39 | 40 | v2.2.6 41 | ================== 42 | * allow severity of undefined in sort order 43 | 44 | v2.2.5 45 | ================== 46 | * fix hover state (#11) 47 | 48 | v2.2.4 49 | ================== 50 | * add device flags 51 | 52 | v2.2.3 53 | ================== 54 | * fix alignment in IE/S9 55 | 56 | v2.2.2 57 | ================== 58 | * fix infinite resize loop 59 | 60 | v2.2.1 61 | ================== 62 | * tweak spacing again 63 | 64 | v2.2.0 65 | ================== 66 | * add support for localization 67 | 68 | v2.1.1 69 | ================== 70 | * tweak spacing 71 | 72 | v2.1.0 73 | ================== 74 | * add iron-resize and responsive behavior 75 | 76 | v2.0.3 77 | ================== 78 | * pickup latest forms css 79 | 80 | v2.0.2 81 | ================== 82 | * runtime theming for demo 83 | 84 | v2.0.1 85 | ================== 86 | * fix search icon and header layout 87 | 88 | v2.0.0 89 | ================== 90 | * update dependencies and colors for design refresh 91 | * removed unused code: px-input-group-design 92 | * component redesign 93 | * removed default styling 94 | * added requested enhancements #6 and #7 95 | * code review feedback 96 | 97 | v1.0.1 98 | ================== 99 | * fixed #5 100 | 101 | v1.0.0 102 | ================== 103 | * fix issues #3 & #4, uprev for semver reasons 104 | 105 | v0.2.30 106 | ================== 107 | * fix other typo 108 | 109 | v0.2.29 110 | ================== 111 | * fix typo 112 | 113 | v0.2.28 114 | ================== 115 | * replace getElementsByClassName 116 | 117 | v0.2.27 118 | ================== 119 | * updated px-vis-dropdown to 3.X 120 | 121 | v0.2.26 122 | ================== 123 | * change foreach loops to for loops 124 | 125 | v0.2.25 126 | ================== 127 | * forced default selection, updated demo per design feedback 128 | 129 | v0.2.24 130 | ================== 131 | * update style variables for dropdown 132 | 133 | v0.2.23 134 | ================== 135 | * Update demo page using px-demo 136 | 137 | v0.2.22 138 | ================== 139 | * Updating so px-demo-snippet and px-api-viewer get new grays 140 | 141 | v0.2.21 142 | ================== 143 | * small display issue in Safari (desktop/mobile) and Chrome (mobile) 144 | 145 | v0.2.20 146 | ================== 147 | * Update colors design to pick up new colors 148 | 149 | v0.2.19 150 | ================== 151 | * changing ghp.sh to account for Alpha releases 152 | 153 | v0.2.18 154 | ================== 155 | * update style of sort/search to closer match spec 156 | 157 | v0.2.17 158 | ================== 159 | * Update dependencies 160 | 161 | v0.2.16 162 | ================== 163 | * added word-wrap and word-break for long strings 164 | 165 | v0.2.15 166 | ================== 167 | * changing browser in wct testing from safari 8 to safari 10 on elcapitan 168 | 169 | v0.2.14 170 | ================== 171 | * fixed icon spacing issues 172 | 173 | v0.2.13 174 | ================== 175 | * changing all devDeps to ^ 176 | 177 | v0.2.12 178 | ================== 179 | * Update px-theme to 2.0.1 and update test fixtures 180 | 181 | v0.2.11 182 | ================== 183 | * update dependencies for dropdown 184 | 185 | v0.2.10 186 | ================== 187 | * separated predix and sketch styles 188 | 189 | v0.2.9 190 | ================== 191 | * bower updating px-demo-snippet 192 | 193 | v0.2.8 194 | ================== 195 | * added style variables for theming 196 | 197 | v0.2.7 198 | ================== 199 | * fixed svg sizing 200 | * added grey background to list items 201 | * added cursor 'pointer' for list items 202 | * hid detail on initial load 203 | * added picture to readme 204 | * updated demo 205 | 206 | v0.2.6 207 | ================== 208 | * fixed sauce credentials 209 | 210 | v0.2.1 211 | ================== 212 | * update dependencies 213 | 214 | v0.2.0 215 | ================== 216 | * change height from style variable to property 217 | * update demo 218 | 219 | v0.1.0 220 | ================== 221 | * bump version out of alpha 222 | 223 | v0.0.2 224 | ================== 225 | * added auto-ghp 226 | * fixed actionable text dependency 227 | 228 | v0.0.1 229 | ================== 230 | * Initial release 231 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /OSS_Notice.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/predixdesignsystem/px-inbox/2b405102dd257e2006ecc5957f03c8f616a87b2a/OSS_Notice.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # px-inbox [![Build Status](https://travis-ci.org/PredixDev/px-inbox.svg?branch=master)](https://travis-ci.org/PredixDev/px-inbox) 2 | 3 | ## Overview 4 | 5 | `Px-inbox` is a Predix UI component which provides a list/detail or “Inbox” view. This type of view is appropriate when a user has a list of items, with detailed information or actions associated with each item, e.g. alerts associated with a fleet of assets, or open cases in a field service engineer’s queue. It allows the user to switch back and forth between items without losing the higher level overview, or having to navigate back and forth between screens repeatedly. 6 | 7 | ## Usage 8 | 9 | ### Prerequisites 10 | 1. node.js 11 | 2. npm 12 | 3. bower 13 | 4. [webcomponents-lite.js polyfill](https://github.com/webcomponents/webcomponentsjs) 14 | 15 | Node, npm and bower are necessary to install the component and dependencies. webcomponents.js adds support for web components and custom elements to your application. 16 | 17 | ## Getting Started 18 | 19 | First, install the component via bower on the command line: 20 | 21 | ``` 22 | bower install px-inbox --save 23 | ``` 24 | 25 | Second, import the component in your application with the following tag in your head: 26 | 27 | ``` 28 | 29 | ``` 30 | 31 | Finally, use the component in your application: 32 | 33 | ``` 34 | 35 | // define or bind to your detail view here 36 | 37 | ``` 38 | 39 |
40 |
41 | 42 | ## Documentation 43 | 44 | Read the full API and view the demo [here](https://predixdev.github.io/predix-ui/?type=component&show=px-inbox/). 45 | 46 | The documentation in this repository is supplemental to the official Predix documentation, which is continuously updated and maintained by the Predix documentation team. Go to [http://predix.io](http://predix.io) to see the official Predix documentation. 47 | 48 | 49 | ## Local Development 50 | 51 | From the component's directory... 52 | 53 | ``` 54 | $ npm install 55 | $ bower install 56 | $ gulp sass 57 | ``` 58 | 59 | From the component's directory, to start a local server run: 60 | 61 | ``` 62 | $ gulp serve 63 | ``` 64 | 65 | Navigate to the root of that server (e.g. http://localhost:8080/) in a browser to open the API documentation page, with link to the "Demo" / working examples. 66 | 67 | ### GE Coding Style Guide 68 | [GE JS Developer's Guide](https://github.com/GeneralElectric/javascript) 69 | 70 |
71 |
72 | 73 | ## Known Issues 74 | 75 | Please use [Github Issues](https://github.com/PredixDev/px-inbox/issues) to submit any bugs you might find. 76 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "px-inbox", 3 | "version": "2.4.0", 4 | "main": [ 5 | "px-inbox.html" 6 | ], 7 | "ignore": [ 8 | "*.enc", 9 | ".*", 10 | "npm-debug.log", 11 | "gulpfile.js", 12 | "sass", 13 | "bower_components", 14 | "node_modules", 15 | "test", 16 | "OSS_Notice.pdf", 17 | "scripts", 18 | ".github", 19 | "px-demo.png", 20 | "*.md", 21 | ".jshintrc", 22 | ".editorconfig", 23 | "monogram-wdmk.png", 24 | "*.png", 25 | "wct.conf.json" 26 | ], 27 | "dependencies": { 28 | "polymer": "#1.9 - 2", 29 | "px-dropdown": "^4.1.0", 30 | "px-icon-set": "^2.1.0", 31 | "px-alert-label": "^2.1.0", 32 | "iron-resizable-behavior": "^2.0.1", 33 | "app-localize-behavior": "^2.0.0" 34 | }, 35 | "devDependencies": { 36 | "px-theme": "^3.0.0", 37 | "px-demo": "^3.0.0", 38 | "px-key-value-pair": "^1.2.0", 39 | "px-forms-design": "^2.0.0", 40 | "px-list-ui-design": "^2.0.0", 41 | "px-headings-design": "^1.0.0", 42 | "px-normalize-design": "^1.0.0", 43 | "px-box-sizing-design": "^1.0.0", 44 | "px-flexbox-design": "^1.0.0", 45 | "px-shadows-design": "^1.0.0", 46 | "px-actionable-design": "^2.0.0", 47 | "px-spacing-design": "^1.0.0", 48 | "px-helpers-design": "^1.0.7", 49 | "web-component-tester": "^6.4.0" 50 | }, 51 | "resolutions": { 52 | "webcomponentsjs": "^1.0.0" 53 | }, 54 | "variants": { 55 | "1.x": { 56 | "dependencies": { 57 | "polymer": "^1.9.0" 58 | }, 59 | "devDependencies": { 60 | "web-component-tester": "^5.0.0" 61 | }, 62 | "resolutions": { 63 | "webcomponentsjs": "^0.7.0" 64 | } 65 | } 66 | }, 67 | "license": "Apache-2.0" 68 | } -------------------------------------------------------------------------------- /css/px-inbox-styles.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 23 | -------------------------------------------------------------------------------- /demo/px-inbox-demo.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 99 | 100 | 101 | 260 | -------------------------------------------------------------------------------- /demo/px-inbox-detail-demo.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 34 | 35 | 36 | 75 | 76 | 77 | 120 | -------------------------------------------------------------------------------- /deploy.enc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/predixdesignsystem/px-inbox/2b405102dd257e2006ecc5957f03c8f616a87b2a/deploy.enc -------------------------------------------------------------------------------- /examples/inbox.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | px-inbox demo 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 45 | 46 | 47 | 48 | 49 | 66 | 67 | 68 | 164 | 165 | 166 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- 1 | @@ (@F  (n@ ( �P (�Y(@� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ڞ�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:���h��������������������������������������������������������������������������������������������������������������������������҈�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:���~���������������v�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:��Ց���������������������������������������������������������������������������������������������������������������������Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:���]���������������������ڿW�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�����������������������������������������������������������������������������������������������������������������ն@�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�׹F�����������������������������ַB�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�ָC���������������������������������������������������������������������������������������������������������ھU�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ;�������������������������������������Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:���Z���������������������������������������������������������������������������������������������������w�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:��ڝ��������������������������������������֔�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:���������������������������������������������������������������������������������������������ܤ�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:���u�����������������������������������������������n�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:��߬�������������������������������������������������������������������������������������Ե<�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�ڿV�����������������������������������������������������ٽQ�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�յ>���������������������������������������������������������������������������������ػL�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�ַB�������������������������������������������������������������ն?�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�ټP���������������������������������������������������������������������������h�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:���������������������������������������������������������������������Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:���o������������������������������������������������������������������Ց�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:��֓����������������������������������������������������������������������Ӌ�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:��ؚ�������������������������������������������������������������Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:���l�������������������������������������������������������������������������������e�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:���������������������������������������������������������ָC�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�ٽP�������������������������������������������������������������������������������������ػL�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�׹F���������������������������������������������������[�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�ն?���������������������������������������������������������������������������������������������յ=�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:���`������������������������������������������΀�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:��������������������������������������������������������������������������������������������������ߪ�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:��ц�������������������������������������Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:��҉������������������������������������������������������������������������������������������������������ρ�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:���������������������������������յ>�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:���d���������������������������������������������������������������������������������������������������������������^�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�ն@�������������������������ٽP�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�غK���������������������������������������������������������������������������������������������������������������������׹G�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�ھT�������������������p�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�յ<�����������������������������������������������������������������������������������������������������������������������������Ե<�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:���u����������ٛ�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:��ި������������������������������������������������������������������������������������������������������������������������������۠�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:��ۡ�����Դ;�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:��΀���������������������������������������������������������������������������������������������������������������������������������������x�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Ե<�ָE�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:���]���������������������������������������������������������������������������������������������������������������������������������������������ۿX�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�׹F�����������������������������������������������������������������������������������������������������������������������������������������������������ָC�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ;�������������������������������������������������������������������������������������������������������������������������������������������������������������Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:��ڞ��������������������������������������������������������������������������������������������������������������������������������������������������������������ז�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:���u�����������������������������������������������������������������������������������������������������������������������������������������������������������������������o�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�ڿW�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������ٽR�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�ַB��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ި��ި��ި��ި��ި��ި��ި��ި��ި��ި��ި��ި��ި��ި��ި��ި��ި��ި�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������̼��̼��̼��̼��̼��̼��̼��̼��̼��̼��̼��̼��̼��̼��̼��̼��̼��̼���˷�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������E���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���1�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������c���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���E���������������������������������������������������������������������������������������������������������������������������������������������������������������������ȵ����(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���b��������������������������������������������������������������������������������������������������������������������������������������������������������������ƭ���)���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(�Ǵ������������������������������������������������������������������������������������������������������������������������������������������������������������5���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���)��ū���������������������������������������������������������������������������������������������������������������������������������������������������K���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���5�����������������������������������������������������������������������������������������������������������������������������������������������k���(���(���(���(���(���(���(���(���(���(���(���(���(���(���.���(���(���(���(���(���(���(���(���(���(���(���(���(���J�������������������������������������������������������������������������������������������������������������������������������������ʹ����(���(���(���(���(���(���(���(���(���(���(���(���(���(�Ʊ��Ϳ����(���(���(���(���(���(���(���(���(���(���(���(���(���(���j������������������������������������������������������������������������������������������������������������������������������ʵ���,���(���(���(���(���(���(���(���(���(���(���(���(���(���X���������ëu���(���(���(���(���(���(���(���(���(���(���(���(���(���(�ɸ����������������������������������������������������������������������������������������������������������������������������:���(���(���(���(���(���(���(���(���(���(���(���(���(���<�������������������P���(���(���(���(���(���(���(���(���(���(���(���(���(���+��ɲ�������������������������������������������������������������������������������������������������������������������S���(���(���(���(���(���(���(���(���(���(���(���(���(���,��ʵ�����������������������7���(���(���(���(���(���(���(���(���(���(���(���(���(���8�������������������������������������������������������������������������������������������������������������ëu���(���(���(���(���(���(���(���(���(���(���(���(���(���(�ɸ���������������������������ƭ���)���(���(���(���(���(���(���(���(���(���(���(���(���(���P�����������������������������������������������������������������������������������������������������̽����(���(���(���(���(���(���(���(���(���(���(���(���(���(���g���������������������������������dz����(���(���(���(���(���(���(���(���(���(���(���(���(���(�ªs����������������������������������������������������������������������������������������������ͻ���.���(���(���(���(���(���(���(���(���(���(���(���(���(���F�������������������������������������������]���(���(���(���(���(���(���(���(���(���(���(���(���(���(�̼��������������������������������������������������������������������������������������������?���(���(���(���(���(���(���(���(���(���(���(���(���(���1���������������������������������������������������?���(���(���(���(���(���(���(���(���(���(���(���(���(���-��˸�����������������������������������������������������������������������������������Z���(���(���(���(���(���(���(���(���(���(���(���(���(���(������������������������������������������������������̺���-���(���(���(���(���(���(���(���(���(���(���(���(���(���=�����������������������������������������������������������������������������Ű���(���(���(���(���(���(���(���(���(���(���(���(���(���(�ìw���������������������������������������������������������˻����(���(���(���(���(���(���(���(���(���(���(���(���(���(���W���������������������������������������������������������������������������(���(���(���(���(���(���(���(���(���(���(���(���(���(���Q�������������������������������������������������������������������l���(���(���(���(���(���(���(���(���(���(���(���(���(���(�ĭz�������������������������������������������������������������������1���(���(���(���(���(���(���(���(���(���(���(���(���(���8���������������������������������������������������������������������������I���(���(���(���(���(���(���(���(���(���(���(���(���(���(���������������������������������������������������������������E���(���(���(���(���(���(���(���(���(���(���(���(���(���)��Ʈ�������������������������������������������������������������������������������3���(���(���(���(���(���(���(���(���(���(���(���(���(���0��ξ���������������������������������������������������b���(���(���(���(���(���(���(���(���(���(���(���(���(���(�Ǵ�����������������������������������������������������������������������������������¥���(���(���(���(���(���(���(���(���(���(���(���(���(���(���B���������������������������������������������Ǵ����(���(���(���(���(���(���(���(���(���(���(���(���(���(���_�����������������������������������������������������������������������������������������į|���(���(���(���(���(���(���(���(���(���(���(���(���(���(���^��������������������������������������ū���)���(���(���(���(���(���(���(���(���(���(���(���(���(���@���������������������������������������������������������������������������������������������������U���(���(���(���(���(���(���(���(���(���(���(���(���(���(�Ʊ������������������������������������5���(���(���(���(���(���(���(���(���(���(���(���(���(���.��ͻ�������������������������������������������������������������������������������������������������������:���(���(���(���(���(���(���(���(���(���(���(���(���(���)��ç���������������������������K���(���(���(���(���(���(���(���(���(���(���(���(���(���(�̼�����������������������������������������������������������������������������������������������������������ɳ���+���(���(���(���(���(���(���(���(���(���(���(���(���(���3�����������������������k���(���(���(���(���(���(���(���(���(���(���(���(���(���(���n�����������������������������������������������������������������������������������������������������������������ɶ����(���(���(���(���(���(���(���(���(���(���(���(���(���(���G�������������ʸ����(���(���(���(���(���(���(���(���(���(���(���(���(���(���K���������������������������������������������������������������������������������������������������������������������������d���(���(���(���(���(���(���(���(���(���(���(���(���(���(���e�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������( @ �����������������������������������������������������������������������������������������������������������������������������������������ߠ������������������ݝ������������������������������������������������������������������ޟ��ߡ��������������ߡ���������������{�ͨ�Ю)�Ю*�Ю*�Ю)�ϫ#�ټP�����������������������������������������������������������^�Ϫ!�Ю)�Ю*�Ю*�Ю*�ͨ���k���������������b�ѯ-�Դ:�Դ:�Դ:�Դ:�Ѯ,���r��������������������������������������������������σ�ѯ+�Դ:�Դ:�Դ:�Դ:�Ұ/�ڿV���������������������׹H�ұ1�Դ:�Դ:�Դ:�Գ9�ѯ,��ؙ������������������������������������������߫�Ұ/�ӳ8�Դ:�Դ:�Դ:�ӱ3�ն?�����������������������������Ӳ6�Ӳ5�Դ:�Դ:�Դ:�Ӳ6�Ӳ4�����������������������������������������Ե;�Ӳ4�Դ:�Դ:�Դ:�ӳ7�ұ1����������������������������������۠�ѯ.�Գ8�Դ:�Դ:�Դ:�ұ2�׹G���������������������������������ٽS�Ұ0�Դ;�Դ:�Դ:�Դ9�ѯ,��Ր���������������������������������������{�Ѯ+�Դ:�Դ:�Դ:�Դ:�ѯ-���c���������������������������s�Ѯ,�Դ:�Դ:�Դ:�Դ:�ѯ,���l�����������������������������������������������[�Ѱ.�Դ:�Դ:�Դ:�Դ:�Ѯ,��҉������������������ٛ�ѯ,�Գ9�Դ:�Դ:�Դ:�Ұ0�ؼP�����������������������������������������������������ָB�ұ2�Դ;�Դ:�Դ:�ӳ8�Ұ0�����������������Ӳ5�Ӳ6�Դ:�Դ:�Դ:�Ӳ4�Դ:�������������������������������������������������������������ұ3�ӳ6�Դ:�Դ:�Դ:�ӱ3�յ=���������׹H�ұ1�Դ:�Դ:�Դ:�ӳ8�Ұ0��߫��������������������������������������������������������������ח�ѯ,�Գ9�Դ:�Դ:�Դ:�ұ1���[���d�Ұ0�Դ:�Դ:�Դ:�Դ:�ѯ+��ч�����������������������������������������������������������������������s�Ѯ+�Դ:�Դ:�Դ:�Դ;�ұ3�ұ2�Դ;�Դ:�Դ:�Դ:�ѯ-���e�����������������������������������������������������������������������������ھU�Ѱ.�ӳ7�ӳ7�ӳ7�ӳ7�ӳ7�ӳ7�ӳ7�ӳ7�Ѱ/�׺I�������������������������������������������������������������������������������������ָD�Գ7�Դ:�Դ:�Դ:�Դ:�Դ:�Դ:�Գ7�յ=�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������v���]���b���b���b���b���b���b���^���m�������������������������������������������������������������������������������������ů~��~��������������������������}���k�����������������������������������������������������������������������������Ϳ����"���%���(���(���(���&���&���(���(���(���&����ȶ�����������������������������������������������������������������������ͼ���0���!���(���(���(���'���&���'���&���(���(���(���#���'��Ŭ�������������������������������������������������������������������G������(���(���(���'����Ű~�ɶ�������'���(���(���(������9���������������������������������������������������������������d������(���(���(���(������U�����������c�����(���(���(���(������R�����������������������������������������������������dz�������'���(���(���(������9�������������������C������)���(���(���(����ªr����������������������������������������������å���$���$���(���(���(���#���&��Ī������������������˷���,���"���(���(���(���%����ʹ��������������������������������������������5��� ���(���(���(���'����Ǵ��������������������������˺�������&���(���(���(���"���*��ɲ�����������������������������������M������(���(���(���(������c�����������������������������������q�����(���(���(���(������>�������������������������������l�����(���(���(���)������C�������������������������������������������O������(���(���(���(�����Y���������������������ɷ�������&���(���(���(���"���,��˷�����������������������������������������������4��� ���)���(���(���'����ĭy��������������ɮ���#������$���#���#���!����ʻ��������������������������������������������������������#��� ���#���#���#��� ����������������áU���1���;���;���;���:���2�Ȱz���������������������������������������������������������̷����3���:���;���;���;���4���H��̼���������������������������������������������������������������������������������������������������������������������������������(0 ������������������������������������������������������������������������������������������������������`���\���`���`���W���������������������������������������������������X���_���`���]���]����������ݛ�ϫ"�Ұ0�ұ2�ѯ-�ӳ7�����������������������������������������Ե<�ѯ,�ұ1�ұ1�Ϋ!��ڑ���������������x�Ю*�Դ:�Դ;�Ұ0�ؼN���������������������������������ڿV�ү.�Դ;�Դ;�Ѯ+���n���������������������ڿW�ү.�Դ;�Դ;�Ѯ+���q���������������������������{�Ѯ*�Դ;�Դ;�Ұ/�ټO�����������������������������յ>�ұ3�Դ;�Դ9�Ѯ*��ؙ������������������ݤ�Ѯ+�Դ9�Դ:�Ӳ4�Դ9�������������������������������������Ұ0�Գ7�Դ:�ӳ7�ұ2�����������������Ӳ6�Ӳ5�Դ:�Գ8�ѯ-������������������������������������������֔�Ю*�Դ:�Դ;�ұ2�ָC���������غK�Ұ0�Դ;�Դ:�Ѯ*��҉�����������������������������������������������o�Ѯ+�Դ;�Դ;�Ѱ/���g���o�ѯ.�Դ;�Դ;�ѯ,���f�����������������������������������������������������ټP�Ұ/�Դ:�Դ:�ұ2�ұ1�Դ:�Դ:�ұ1�׺H�������������������������������������������������������������Դ9�Ю)�ѯ.�ѯ.�ѯ.�ѯ.�Ѯ*�Ӳ4�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������R���-���4���4���4���4���.���J���������������������������������������������������������������k��~���#���#���������#���#��~���_�����������������������������������������������������ɶ�������'���)���$���/���0���$���)���'���ű�����������������������������������������������ǯ���$���#���(���&����Ϳ���ç������%���(���%��� �����������������������������������������������7������)���(�����p���������ĭy�����(���)���!���/���������������������������������������R������)���)������M�������������������U������)���)������G�����������������������������ªs�����(���)��� ���1���������������������������7������)���(�����f���������������������˻�������&���(���%��� ��¥��������������������������ƭ���#���$���(���'����Ǵ���������������л���'���"���(���'���Ű���������������������������������Ǵ������&���(���#���"��ʯ�����������?������%���%����¤a�����������������������������������������Ĩi������$���%������7��̺������ƨ��ū��Ū��Ū������������������������������������������������������Ĩ��ĩ��Ū��ū��Ǩ��̼�(  ����������������������������������������������������������������������A�״0�ֳ-��ӂ��������������������������׋�ֳ-�׵0�߽<�������������ѯ-�Ӳ6�Э)��ݥ���������������������Ѯ+�ӳ6�Ѯ+������������������ז�Э(�Ӳ6�ұ3�����������������ӳ7�Ӳ5�Э)��ӌ�����������������������o�Ѯ+�ұ1�׹H���������ټP�Ұ0�ѯ,���g�����������������������������ټO�Ұ0�ѯ-���r���y�ѯ,�Ұ1�غH�������������������������������������ӳ6�Э(�ϫ#�ϫ#�Э(�ұ2����������������������������������������������׏��ٖ��ٖ��׏��������������������������������������������������ʯ��̳��̳��ʯ�����������������������������������������������9��|��|��|��|���2���������������������������������������X����� ���?���B��� ������N�����������������������������Į{�����#���#��ͼ�������'���#��~���p���������������������Ϳ�������%���ɷ����������˻�������%���ʺ��������������������*���"�����g�������������������o��~���#���%��л�����������=��������J���������������������������Q���������5������¨�Ǯu�î{���v���������������������������������¬y�î{�Ǯu����� -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright (c) 2018, General Electric 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | 'use strict'; 19 | const path = require('path'); 20 | const gulp = require('gulp'); 21 | const pkg = require('./package.json'); 22 | const $ = require('gulp-load-plugins')(); 23 | const gulpSequence = require('gulp-sequence'); 24 | const importOnce = require('node-sass-import-once'); 25 | const stylemod = require('gulp-style-modules'); 26 | const browserSync = require('browser-sync').create(); 27 | const gulpif = require('gulp-if'); 28 | const combiner = require('stream-combiner2'); 29 | const bump = require('gulp-bump'); 30 | const argv = require('yargs').argv; 31 | const exec = require('child_process').exec; 32 | const { ensureLicense } = require('ensure-px-license'); 33 | 34 | const sassOptions = { 35 | importer: importOnce, 36 | importOnce: { 37 | index: true, 38 | bower: true 39 | } 40 | }; 41 | 42 | gulp.task('clean', function() { 43 | return gulp.src(['.tmp', 'css'], { read: false }) 44 | .pipe($.clean()); 45 | }); 46 | 47 | function handleError(err) { 48 | console.log(err.toString()); 49 | this.emit('end'); 50 | } 51 | 52 | function buildCSS() { 53 | return combiner.obj([ 54 | $.sass(sassOptions), 55 | $.autoprefixer({ 56 | browsers: ['last 2 versions'], 57 | cascade: false, 58 | flexbox: false 59 | }), 60 | gulpif(!argv.debug, $.cssmin()) 61 | ]).on('error', handleError); 62 | } 63 | 64 | gulp.task('sass', function() { 65 | return gulp.src(['./sass/*.scss']) 66 | .pipe(buildCSS()) 67 | .pipe(stylemod({ 68 | moduleId(file) { 69 | return path.basename(file.path, path.extname(file.path)) + '-styles'; 70 | } 71 | })) 72 | .pipe(ensureLicense()) 73 | .pipe(gulp.dest('css')) 74 | .pipe(browserSync.stream({ match: 'css/*.html' })); 75 | }); 76 | 77 | gulp.task('watch', function() { 78 | gulp.watch(['sass/*.scss'], ['sass']); 79 | }); 80 | 81 | gulp.task('serve', function() { 82 | browserSync.init({ 83 | port: 8080, 84 | notify: false, 85 | reloadOnRestart: true, 86 | logPrefix: `${pkg.name}`, 87 | https: false, 88 | server: ['./', 'bower_components'], 89 | }); 90 | 91 | gulp.watch(['css/*-styles.html', '*.html', '*.js', 'demo/*.html']).on('change', browserSync.reload); 92 | gulp.watch(['sass/*.scss'], ['sass']); 93 | }); 94 | 95 | gulp.task('bump:patch', function() { 96 | gulp.src(['./bower.json', './package.json']) 97 | .pipe(bump({ type: 'patch' })) 98 | .pipe(gulp.dest('./')); 99 | }); 100 | 101 | gulp.task('bump:minor', function() { 102 | gulp.src(['./bower.json', './package.json']) 103 | .pipe(bump({ type: 'minor' })) 104 | .pipe(gulp.dest('./')); 105 | }); 106 | 107 | gulp.task('bump:major', function() { 108 | gulp.src(['./bower.json', './package.json']) 109 | .pipe(bump({ type: 'major' })) 110 | .pipe(gulp.dest('./')); 111 | }); 112 | 113 | gulp.task('license', function() { 114 | return gulp.src(['./**/*.{html,js,css,scss}', '!./node_modules/**/*', '!./bower_components?(-1.x)/**/*']) 115 | .pipe(ensureLicense()) 116 | .pipe(gulp.dest('.')); 117 | }); 118 | 119 | gulp.task('default', function(callback) { 120 | gulpSequence('clean', 'sass', 'generate-api', 'license')(callback); 121 | }); 122 | 123 | /** 124 | * Special task for Polymer component repos. Analyzes the component source code 125 | * and generates documentation in `[component-name]-api.json`. 126 | */ 127 | gulp.task('generate-api', function (cb) { 128 | exec(`node_modules/.bin/polymer analyze ${pkg.name}.html > ${pkg.name}-api.json`, function(err, stdout, stderr) { 129 | console.log(stdout); 130 | console.log(stderr); 131 | cb(err); 132 | }); 133 | }); 134 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Predix UI 23 | 24 | 28 | 57 | 58 | 61 | 62 | 63 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 83 | 84 | 88 | 89 | 90 | 93 | 94 | 95 | 98 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /monogram-wdmk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/predixdesignsystem/px-inbox/2b405102dd257e2006ecc5957f03c8f616a87b2a/monogram-wdmk.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "px-inbox", 3 | "author": "General Electric", 4 | "description": "A Px component for list-detail view", 5 | "version": "2.4.0", 6 | "private": false, 7 | "extName": null, 8 | "repository": { 9 | "type": "git", 10 | "url": "https://github.com/PredixDev/px-inbox.git" 11 | }, 12 | "homepage": "https://www.predix-ui.com/", 13 | "devDependencies": { 14 | "browser-sync": "^2.13.0", 15 | "ensure-px-license": "^1.0.0", 16 | "gulp": "^3.9.1", 17 | "gulp-autoprefixer": "^3.1.0", 18 | "gulp-bump": "^2.4.0", 19 | "gulp-clean": "^0.3.2", 20 | "gulp-concat": "^2.6.0", 21 | "gulp-cssmin": "^0.1.7", 22 | "gulp-if": "^2.0.1", 23 | "gulp-load-plugins": "^1.2.4", 24 | "gulp-match": "^1.0.2", 25 | "gulp-rename": "^1.2.2", 26 | "gulp-sass": "^2.3.2", 27 | "gulp-sequence": "^0.4.5", 28 | "gulp-style-modules": "^0.1.0", 29 | "node-sass-import-once": "^1.2.0", 30 | "polymer-cli": "^1.5.7", 31 | "stream-combiner2": "^1.1.1", 32 | "yargs": "^5.0.0" 33 | }, 34 | "license": "Apache-2.0" 35 | } 36 | -------------------------------------------------------------------------------- /px-inbox-api.json: -------------------------------------------------------------------------------- 1 | { 2 | "schema_version": "1.0.0", 3 | "elements": [ 4 | { 5 | "description": "### Usage\n\n \n // define or bind to detail view here\n \n\n### Styling\nThe following custom properties are available for styling. See also px-alert-label for the variables to use for the badge icons.\n\nCustom property | Description | Default\n:----------------|:-------------|:----------\n`--px-inbox-list-width` | Width of the list portion of the inbox | 320px\n`--px-inbox-height` | Height of the full inbox component | 100vh\n`--px-inbox-border-color` | Border color for list items |\n`--px-inbox-secondary-text-color` | Text color for subtitle and date |\n`--px-inbox-li-background-color` | Background color for list items |\n`--px-inbox-li-background-color--hover` | Background color for list item when hovered |\n`--px-inbox-li-background-color--selected` | Background color for selected list item |\n`--px-inbox-li-text-color--selected` | Text color for selected list item |", 6 | "summary": "", 7 | "path": "px-inbox.html", 8 | "properties": [ 9 | { 10 | "name": "_parentResizable", 11 | "type": "Object | null | undefined", 12 | "description": "The closest ancestor element that implements `IronResizableBehavior`.", 13 | "privacy": "protected", 14 | "sourceRange": { 15 | "file": "../iron-resizable-behavior/iron-resizable-behavior.html", 16 | "start": { 17 | "line": 41, 18 | "column": 6 19 | }, 20 | "end": { 21 | "line": 41, 22 | "column": 75 23 | } 24 | }, 25 | "metadata": { 26 | "polymer": { 27 | "observer": "\"_parentResizableChanged\"", 28 | "attributeType": "Object" 29 | } 30 | }, 31 | "inheritedFrom": "Polymer.IronResizableBehavior" 32 | }, 33 | { 34 | "name": "_notifyingDescendant", 35 | "type": "boolean | null | undefined", 36 | "description": "True if this element is currently notifying its descendant elements of\nresize.", 37 | "privacy": "protected", 38 | "sourceRange": { 39 | "file": "../iron-resizable-behavior/iron-resizable-behavior.html", 40 | "start": { 41 | "line": 47, 42 | "column": 6 43 | }, 44 | "end": { 45 | "line": 47, 46 | "column": 57 47 | } 48 | }, 49 | "metadata": { 50 | "polymer": { 51 | "attributeType": "Boolean" 52 | } 53 | }, 54 | "defaultValue": "false", 55 | "inheritedFrom": "Polymer.IronResizableBehavior" 56 | }, 57 | { 58 | "name": "language", 59 | "type": "string | null | undefined", 60 | "description": "A valid IETF language tag as a string that `px-localize-behavior` will\nuse to localize this component. Refer to px-localize-behavior for\ncurrently supported languages.\n\nSee https://github.com/PolymerElements/app-localize-behavior for API\ndocumentation and more information.", 61 | "privacy": "public", 62 | "sourceRange": { 63 | "start": { 64 | "line": 219, 65 | "column": 6 66 | }, 67 | "end": { 68 | "line": 222, 69 | "column": 7 70 | } 71 | }, 72 | "metadata": { 73 | "polymer": { 74 | "attributeType": "String" 75 | } 76 | }, 77 | "defaultValue": "\"en\"" 78 | }, 79 | { 80 | "name": "resources", 81 | "type": "Object | null | undefined", 82 | "description": "List of strings needing to be localized for this component.", 83 | "privacy": "public", 84 | "sourceRange": { 85 | "start": { 86 | "line": 234, 87 | "column": 6 88 | }, 89 | "end": { 90 | "line": 260, 91 | "column": 7 92 | } 93 | }, 94 | "metadata": { 95 | "polymer": { 96 | "attributeType": "Object" 97 | } 98 | }, 99 | "defaultValue": "{\"en\":{\"Back\":\"Back\",\"Sort by\":\"Sort by\",\"Search\":\"Search\",\"Title\":\"Title\",\"Subtitle\":\"Subtitle\",\"Severity\":\"Severity\",\"Date\":\"Date\",\"years ago\":\"years ago\",\"a year ago\":\"a year ago\",\"months ago\":\"months ago\",\"a month ago\":\"a month ago\",\"days ago\":\"days ago\",\"a day ago\":\"a day ago\",\"hours ago\":\"hours ago\",\"an hour ago\":\"an hour ago\",\"minutes ago\":\"minutes ago\",\"a minute ago\":\"a minute ago\",\"a few seconds ago\":\"a few seconds ago\"}}" 100 | }, 101 | { 102 | "name": "formats", 103 | "type": "Object | null | undefined", 104 | "description": "Optional dictionary of user defined formats, as explained here:\nhttp://formatjs.io/guides/message-syntax/#custom-formats\n\nFor example, a valid dictionary of formats would be:\nthis.formats = {\n number: { USD: { style: 'currency', currency: 'USD' } }\n}", 105 | "privacy": "public", 106 | "sourceRange": { 107 | "file": "../app-localize-behavior/app-localize-behavior.html", 108 | "start": { 109 | "line": 189, 110 | "column": 4 111 | }, 112 | "end": { 113 | "line": 192, 114 | "column": 5 115 | } 116 | }, 117 | "metadata": { 118 | "polymer": { 119 | "attributeType": "Object" 120 | } 121 | }, 122 | "defaultValue": "{}", 123 | "inheritedFrom": "Polymer.AppLocalizeBehavior" 124 | }, 125 | { 126 | "name": "useKeyIfMissing", 127 | "type": "boolean | null | undefined", 128 | "description": "Use the key for localization if value for language is missing. Should\nalways be true for our components", 129 | "privacy": "public", 130 | "sourceRange": { 131 | "start": { 132 | "line": 227, 133 | "column": 6 134 | }, 135 | "end": { 136 | "line": 230, 137 | "column": 7 138 | } 139 | }, 140 | "metadata": { 141 | "polymer": { 142 | "attributeType": "Boolean" 143 | } 144 | }, 145 | "defaultValue": "true" 146 | }, 147 | { 148 | "name": "localize", 149 | "type": "Function | null | undefined", 150 | "description": "Translates a string to the current `language`. Any parameters to the\nstring should be passed in order, as follows:\n`localize(stringKey, param1Name, param1Value, param2Name, param2Value)`", 151 | "privacy": "public", 152 | "sourceRange": { 153 | "file": "../app-localize-behavior/app-localize-behavior.html", 154 | "start": { 155 | "line": 208, 156 | "column": 4 157 | }, 158 | "end": { 159 | "line": 211, 160 | "column": 5 161 | } 162 | }, 163 | "metadata": { 164 | "polymer": { 165 | "readOnly": true, 166 | "attributeType": "Function" 167 | } 168 | }, 169 | "inheritedFrom": "Polymer.AppLocalizeBehavior" 170 | }, 171 | { 172 | "name": "bubbleEvent", 173 | "type": "boolean | null | undefined", 174 | "description": "If true, will bubble up the event to the parents", 175 | "privacy": "public", 176 | "sourceRange": { 177 | "file": "../app-localize-behavior/app-localize-behavior.html", 178 | "start": { 179 | "line": 216, 180 | "column": 4 181 | }, 182 | "end": { 183 | "line": 219, 184 | "column": 5 185 | } 186 | }, 187 | "metadata": { 188 | "polymer": { 189 | "attributeType": "Boolean" 190 | } 191 | }, 192 | "defaultValue": "false", 193 | "inheritedFrom": "Polymer.AppLocalizeBehavior" 194 | }, 195 | { 196 | "name": "__localizationCache", 197 | "type": "Object", 198 | "description": "Internal singleton cache. This is the private implementation of the\nbehaviour; don't interact with it directly.\n ", 199 | "privacy": "private", 200 | "sourceRange": { 201 | "file": "../app-localize-behavior/app-localize-behavior.html", 202 | "start": { 203 | "line": 140, 204 | "column": 2 205 | }, 206 | "end": { 207 | "line": 144, 208 | "column": 3 209 | } 210 | }, 211 | "metadata": { 212 | "polymer": { 213 | "readOnly": false 214 | } 215 | }, 216 | "inheritedFrom": "Polymer.AppLocalizeBehavior" 217 | }, 218 | { 219 | "name": "listItems", 220 | "type": "Array | null | undefined", 221 | "description": "Array of items to include in the list. Each item in the array should be\nan object with the following keys:\n- id - must be a string, used to update the `selectedItem` property when an item is selected\n- title\n- subtitle\n- severity - one of \"important\", \"error\", \"warning\", or \"information\"\n- date - optional, should be valid 8601 date strings", 222 | "privacy": "public", 223 | "sourceRange": { 224 | "start": { 225 | "line": 135, 226 | "column": 6 227 | }, 228 | "end": { 229 | "line": 138, 230 | "column": 7 231 | } 232 | }, 233 | "metadata": { 234 | "polymer": { 235 | "observer": "\"_setInitialSelectedItem\"", 236 | "attributeType": "Array" 237 | } 238 | } 239 | }, 240 | { 241 | "name": "selectedItem", 242 | "type": "string | null | undefined", 243 | "description": "ID of the selected item. Set this property to update the selected item,\nor listen for changes to observe when the user selects an item.", 244 | "privacy": "public", 245 | "sourceRange": { 246 | "start": { 247 | "line": 143, 248 | "column": 6 249 | }, 250 | "end": { 251 | "line": 146, 252 | "column": 7 253 | } 254 | }, 255 | "metadata": { 256 | "polymer": { 257 | "notify": true, 258 | "attributeType": "String" 259 | } 260 | } 261 | }, 262 | { 263 | "name": "selectedItemRef", 264 | "type": "Object | null | undefined", 265 | "description": "Reference to the selected item object, updated when a new item is\nselected. Read-only, set `selectedItem` to change what's selected", 266 | "privacy": "public", 267 | "sourceRange": { 268 | "start": { 269 | "line": 151, 270 | "column": 6 271 | }, 272 | "end": { 273 | "line": 156, 274 | "column": 7 275 | } 276 | }, 277 | "metadata": { 278 | "polymer": { 279 | "notify": true, 280 | "readOnly": true, 281 | "attributeType": "Object" 282 | } 283 | } 284 | }, 285 | { 286 | "name": "disableSearch", 287 | "type": "boolean | null | undefined", 288 | "description": "Disables search ability.", 289 | "privacy": "public", 290 | "sourceRange": { 291 | "start": { 292 | "line": 160, 293 | "column": 6 294 | }, 295 | "end": { 296 | "line": 163, 297 | "column": 7 298 | } 299 | }, 300 | "metadata": { 301 | "polymer": { 302 | "attributeType": "Boolean" 303 | } 304 | }, 305 | "defaultValue": "false" 306 | }, 307 | { 308 | "name": "_query", 309 | "type": "string | null | undefined", 310 | "description": "Search query used to filter the list.", 311 | "privacy": "protected", 312 | "sourceRange": { 313 | "start": { 314 | "line": 167, 315 | "column": 6 316 | }, 317 | "end": { 318 | "line": 169, 319 | "column": 7 320 | } 321 | }, 322 | "metadata": { 323 | "polymer": { 324 | "attributeType": "String" 325 | } 326 | } 327 | }, 328 | { 329 | "name": "disableSort", 330 | "type": "boolean | null | undefined", 331 | "description": "Disables sort ability.", 332 | "privacy": "public", 333 | "sourceRange": { 334 | "start": { 335 | "line": 173, 336 | "column": 6 337 | }, 338 | "end": { 339 | "line": 176, 340 | "column": 7 341 | } 342 | }, 343 | "metadata": { 344 | "polymer": { 345 | "attributeType": "Boolean" 346 | } 347 | }, 348 | "defaultValue": "false" 349 | }, 350 | { 351 | "name": "sortBy", 352 | "type": "string | null | undefined", 353 | "description": "Determines how the inbox list is sorted. Updated automatically when the\nuser selects a new item from the sort by dropdown. Choose from one of\nthe following values to set through data binding:\n\"Title\" | \"Subtitle\" | \"Severity\" | \"Date\"", 354 | "privacy": "public", 355 | "sourceRange": { 356 | "start": { 357 | "line": 183, 358 | "column": 6 359 | }, 360 | "end": { 361 | "line": 187, 362 | "column": 7 363 | } 364 | }, 365 | "metadata": { 366 | "polymer": { 367 | "notify": true, 368 | "attributeType": "String" 369 | } 370 | }, 371 | "defaultValue": "\"Date\"" 372 | }, 373 | { 374 | "name": "sortOrder", 375 | "type": "string | null | undefined", 376 | "description": "Sets the sort order for the inbox list. Updated automatically when the\nuser clicks the arrow button to toggle the sort order. Choose from one\nof the following values to set through data binding:\n\"ascending\" | \"descending\"", 377 | "privacy": "public", 378 | "sourceRange": { 379 | "start": { 380 | "line": 194, 381 | "column": 6 382 | }, 383 | "end": { 384 | "line": 198, 385 | "column": 7 386 | } 387 | }, 388 | "metadata": { 389 | "polymer": { 390 | "notify": true, 391 | "attributeType": "String" 392 | } 393 | }, 394 | "defaultValue": "\"ascending\"" 395 | }, 396 | { 397 | "name": "disableAutoSelect", 398 | "type": "boolean | null | undefined", 399 | "description": "By default, the first item in `listItems` will be selected when the\n`listItems` property is changed. Set this flag to `true` to disable\nthe auto select behavior. This property must be set before `listItems`\nis first set, or the first item may be selected anyway. Its recommended\nto set this as a static attribute on the px-inbox tag to ensure it\nis set before the `listItems` are first set.", 400 | "privacy": "public", 401 | "sourceRange": { 402 | "start": { 403 | "line": 207, 404 | "column": 6 405 | }, 406 | "end": { 407 | "line": 210, 408 | "column": 7 409 | } 410 | }, 411 | "metadata": { 412 | "polymer": { 413 | "attributeType": "Boolean" 414 | } 415 | }, 416 | "defaultValue": "false" 417 | }, 418 | { 419 | "name": "_isCollapsed", 420 | "type": "boolean | null | undefined", 421 | "description": "Set to `true` when the inbox is collapsed on mobile screen sizes.", 422 | "privacy": "protected", 423 | "sourceRange": { 424 | "start": { 425 | "line": 264, 426 | "column": 6 427 | }, 428 | "end": { 429 | "line": 267, 430 | "column": 7 431 | } 432 | }, 433 | "metadata": { 434 | "polymer": { 435 | "attributeType": "Boolean" 436 | } 437 | }, 438 | "defaultValue": "false" 439 | }, 440 | { 441 | "name": "_detailViewActive", 442 | "type": "boolean | null | undefined", 443 | "description": "On small screens the user can navigate back and forth between a detail\nview showing the message contents, and a list view showing the inbox\nitems. This boolean manages the visible state.", 444 | "privacy": "protected", 445 | "sourceRange": { 446 | "start": { 447 | "line": 273, 448 | "column": 6 449 | }, 450 | "end": { 451 | "line": 277, 452 | "column": 7 453 | } 454 | }, 455 | "metadata": { 456 | "polymer": { 457 | "observer": "\"_setInitialSelectedItem\"", 458 | "attributeType": "Boolean" 459 | } 460 | }, 461 | "defaultValue": "false" 462 | } 463 | ], 464 | "methods": [ 465 | { 466 | "name": "created", 467 | "description": "", 468 | "privacy": "protected", 469 | "sourceRange": { 470 | "file": "../iron-resizable-behavior/iron-resizable-behavior.html", 471 | "start": { 472 | "line": 54, 473 | "column": 4 474 | }, 475 | "end": { 476 | "line": 59, 477 | "column": 5 478 | } 479 | }, 480 | "metadata": {}, 481 | "params": [], 482 | "return": { 483 | "type": "void" 484 | }, 485 | "inheritedFrom": "Polymer.IronResizableBehavior" 486 | }, 487 | { 488 | "name": "attached", 489 | "description": "", 490 | "privacy": "protected", 491 | "sourceRange": { 492 | "file": "../iron-resizable-behavior/iron-resizable-behavior.html", 493 | "start": { 494 | "line": 61, 495 | "column": 4 496 | }, 497 | "end": { 498 | "line": 63, 499 | "column": 5 500 | } 501 | }, 502 | "metadata": {}, 503 | "params": [], 504 | "return": { 505 | "type": "void" 506 | }, 507 | "inheritedFrom": "Polymer.IronResizableBehavior" 508 | }, 509 | { 510 | "name": "detached", 511 | "description": "", 512 | "privacy": "protected", 513 | "sourceRange": { 514 | "file": "../iron-resizable-behavior/iron-resizable-behavior.html", 515 | "start": { 516 | "line": 65, 517 | "column": 4 518 | }, 519 | "end": { 520 | "line": 74, 521 | "column": 5 522 | } 523 | }, 524 | "metadata": {}, 525 | "params": [], 526 | "return": { 527 | "type": "void" 528 | }, 529 | "inheritedFrom": "Polymer.IronResizableBehavior" 530 | }, 531 | { 532 | "name": "notifyResize", 533 | "description": "Can be called to manually notify a resizable and its descendant\nresizables of a resize change.", 534 | "privacy": "public", 535 | "sourceRange": { 536 | "file": "../iron-resizable-behavior/iron-resizable-behavior.html", 537 | "start": { 538 | "line": 80, 539 | "column": 4 540 | }, 541 | "end": { 542 | "line": 92, 543 | "column": 5 544 | } 545 | }, 546 | "metadata": {}, 547 | "params": [], 548 | "return": { 549 | "type": "void" 550 | }, 551 | "inheritedFrom": "Polymer.IronResizableBehavior" 552 | }, 553 | { 554 | "name": "assignParentResizable", 555 | "description": "Used to assign the closest resizable ancestor to this resizable\nif the ancestor detects a request for notifications.", 556 | "privacy": "public", 557 | "sourceRange": { 558 | "file": "../iron-resizable-behavior/iron-resizable-behavior.html", 559 | "start": { 560 | "line": 98, 561 | "column": 4 562 | }, 563 | "end": { 564 | "line": 110, 565 | "column": 5 566 | } 567 | }, 568 | "metadata": {}, 569 | "params": [ 570 | { 571 | "name": "parentResizable" 572 | } 573 | ], 574 | "return": { 575 | "type": "void" 576 | }, 577 | "inheritedFrom": "Polymer.IronResizableBehavior" 578 | }, 579 | { 580 | "name": "stopResizeNotificationsFor", 581 | "description": "Used to remove a resizable descendant from the list of descendants\nthat should be notified of a resize change.", 582 | "privacy": "public", 583 | "sourceRange": { 584 | "file": "../iron-resizable-behavior/iron-resizable-behavior.html", 585 | "start": { 586 | "line": 116, 587 | "column": 4 588 | }, 589 | "end": { 590 | "line": 123, 591 | "column": 5 592 | } 593 | }, 594 | "metadata": {}, 595 | "params": [ 596 | { 597 | "name": "target" 598 | } 599 | ], 600 | "return": { 601 | "type": "void" 602 | }, 603 | "inheritedFrom": "Polymer.IronResizableBehavior" 604 | }, 605 | { 606 | "name": "resizerShouldNotify", 607 | "description": "This method can be overridden to filter nested elements that should or\nshould not be notified by the current element. Return true if an element\nshould be notified, or false if it should not be notified.", 608 | "privacy": "public", 609 | "sourceRange": { 610 | "file": "../iron-resizable-behavior/iron-resizable-behavior.html", 611 | "start": { 612 | "line": 134, 613 | "column": 4 614 | }, 615 | "end": { 616 | "line": 136, 617 | "column": 5 618 | } 619 | }, 620 | "metadata": {}, 621 | "params": [ 622 | { 623 | "name": "element", 624 | "type": "HTMLElement", 625 | "description": "A candidate descendant element that\nimplements `IronResizableBehavior`." 626 | } 627 | ], 628 | "return": { 629 | "type": "boolean", 630 | "desc": "True if the `element` should be notified of resize." 631 | }, 632 | "inheritedFrom": "Polymer.IronResizableBehavior" 633 | }, 634 | { 635 | "name": "_onDescendantIronResize", 636 | "description": "", 637 | "privacy": "protected", 638 | "sourceRange": { 639 | "file": "../iron-resizable-behavior/iron-resizable-behavior.html", 640 | "start": { 641 | "line": 138, 642 | "column": 4 643 | }, 644 | "end": { 645 | "line": 150, 646 | "column": 5 647 | } 648 | }, 649 | "metadata": {}, 650 | "params": [ 651 | { 652 | "name": "event" 653 | } 654 | ], 655 | "return": { 656 | "type": "void" 657 | }, 658 | "inheritedFrom": "Polymer.IronResizableBehavior" 659 | }, 660 | { 661 | "name": "_fireResize", 662 | "description": "", 663 | "privacy": "protected", 664 | "sourceRange": { 665 | "file": "../iron-resizable-behavior/iron-resizable-behavior.html", 666 | "start": { 667 | "line": 152, 668 | "column": 4 669 | }, 670 | "end": { 671 | "line": 154, 672 | "column": 5 673 | } 674 | }, 675 | "metadata": {}, 676 | "params": [], 677 | "return": { 678 | "type": "void" 679 | }, 680 | "inheritedFrom": "Polymer.IronResizableBehavior" 681 | }, 682 | { 683 | "name": "_onIronRequestResizeNotifications", 684 | "description": "", 685 | "privacy": "protected", 686 | "sourceRange": { 687 | "file": "../iron-resizable-behavior/iron-resizable-behavior.html", 688 | "start": { 689 | "line": 156, 690 | "column": 4 691 | }, 692 | "end": { 693 | "line": 166, 694 | "column": 5 695 | } 696 | }, 697 | "metadata": {}, 698 | "params": [ 699 | { 700 | "name": "event" 701 | } 702 | ], 703 | "return": { 704 | "type": "void" 705 | }, 706 | "inheritedFrom": "Polymer.IronResizableBehavior" 707 | }, 708 | { 709 | "name": "_parentResizableChanged", 710 | "description": "", 711 | "privacy": "protected", 712 | "sourceRange": { 713 | "file": "../iron-resizable-behavior/iron-resizable-behavior.html", 714 | "start": { 715 | "line": 168, 716 | "column": 4 717 | }, 718 | "end": { 719 | "line": 172, 720 | "column": 5 721 | } 722 | }, 723 | "metadata": {}, 724 | "params": [ 725 | { 726 | "name": "parentResizable" 727 | } 728 | ], 729 | "return": { 730 | "type": "void" 731 | }, 732 | "inheritedFrom": "Polymer.IronResizableBehavior" 733 | }, 734 | { 735 | "name": "_notifyDescendant", 736 | "description": "", 737 | "privacy": "protected", 738 | "sourceRange": { 739 | "file": "../iron-resizable-behavior/iron-resizable-behavior.html", 740 | "start": { 741 | "line": 174, 742 | "column": 4 743 | }, 744 | "end": { 745 | "line": 185, 746 | "column": 5 747 | } 748 | }, 749 | "metadata": {}, 750 | "params": [ 751 | { 752 | "name": "descendant" 753 | } 754 | ], 755 | "return": { 756 | "type": "void" 757 | }, 758 | "inheritedFrom": "Polymer.IronResizableBehavior" 759 | }, 760 | { 761 | "name": "_requestResizeNotifications", 762 | "description": "", 763 | "privacy": "protected", 764 | "sourceRange": { 765 | "file": "../iron-resizable-behavior/iron-resizable-behavior.html", 766 | "start": { 767 | "line": 187, 768 | "column": 4 769 | }, 770 | "end": { 771 | "line": 232, 772 | "column": 5 773 | } 774 | }, 775 | "metadata": {}, 776 | "params": [], 777 | "return": { 778 | "type": "void" 779 | }, 780 | "inheritedFrom": "Polymer.IronResizableBehavior" 781 | }, 782 | { 783 | "name": "_findParent", 784 | "description": "", 785 | "privacy": "protected", 786 | "sourceRange": { 787 | "file": "../iron-resizable-behavior/iron-resizable-behavior.html", 788 | "start": { 789 | "line": 234, 790 | "column": 4 791 | }, 792 | "end": { 793 | "line": 246, 794 | "column": 5 795 | } 796 | }, 797 | "metadata": {}, 798 | "params": [], 799 | "return": { 800 | "type": "void" 801 | }, 802 | "inheritedFrom": "Polymer.IronResizableBehavior" 803 | }, 804 | { 805 | "name": "loadResources", 806 | "description": "", 807 | "privacy": "public", 808 | "sourceRange": { 809 | "file": "../app-localize-behavior/app-localize-behavior.html", 810 | "start": { 811 | "line": 222, 812 | "column": 2 813 | }, 814 | "end": { 815 | "line": 255, 816 | "column": 3 817 | } 818 | }, 819 | "metadata": {}, 820 | "params": [ 821 | { 822 | "name": "path" 823 | }, 824 | { 825 | "name": "language" 826 | }, 827 | { 828 | "name": "merge" 829 | } 830 | ], 831 | "return": { 832 | "type": "void" 833 | }, 834 | "inheritedFrom": "Polymer.AppLocalizeBehavior" 835 | }, 836 | { 837 | "name": "__computeLocalize", 838 | "description": "Returns a computed `localize` method, based on the current `language`.", 839 | "privacy": "private", 840 | "sourceRange": { 841 | "file": "../app-localize-behavior/app-localize-behavior.html", 842 | "start": { 843 | "line": 260, 844 | "column": 2 845 | }, 846 | "end": { 847 | "line": 300, 848 | "column": 3 849 | } 850 | }, 851 | "metadata": {}, 852 | "params": [ 853 | { 854 | "name": "language" 855 | }, 856 | { 857 | "name": "resources" 858 | }, 859 | { 860 | "name": "formats" 861 | } 862 | ], 863 | "inheritedFrom": "Polymer.AppLocalizeBehavior" 864 | }, 865 | { 866 | "name": "__onRequestResponse", 867 | "description": "", 868 | "privacy": "private", 869 | "sourceRange": { 870 | "file": "../app-localize-behavior/app-localize-behavior.html", 871 | "start": { 872 | "line": 302, 873 | "column": 2 874 | }, 875 | "end": { 876 | "line": 330, 877 | "column": 3 878 | } 879 | }, 880 | "metadata": {}, 881 | "params": [ 882 | { 883 | "name": "event" 884 | }, 885 | { 886 | "name": "language" 887 | }, 888 | { 889 | "name": "merge" 890 | } 891 | ], 892 | "return": { 893 | "type": "void" 894 | }, 895 | "inheritedFrom": "Polymer.AppLocalizeBehavior" 896 | }, 897 | { 898 | "name": "__onRequestError", 899 | "description": "", 900 | "privacy": "private", 901 | "sourceRange": { 902 | "file": "../app-localize-behavior/app-localize-behavior.html", 903 | "start": { 904 | "line": 332, 905 | "column": 2 906 | }, 907 | "end": { 908 | "line": 334, 909 | "column": 3 910 | } 911 | }, 912 | "metadata": {}, 913 | "params": [ 914 | { 915 | "name": "event" 916 | } 917 | ], 918 | "return": { 919 | "type": "void" 920 | }, 921 | "inheritedFrom": "Polymer.AppLocalizeBehavior" 922 | }, 923 | { 924 | "name": "__checkLocalizationCache", 925 | "description": "", 926 | "privacy": "private", 927 | "sourceRange": { 928 | "file": "../app-localize-behavior/app-localize-behavior.html", 929 | "start": { 930 | "line": 336, 931 | "column": 2 932 | }, 933 | "end": { 934 | "line": 344, 935 | "column": 3 936 | } 937 | }, 938 | "metadata": {}, 939 | "params": [ 940 | { 941 | "name": "proto" 942 | } 943 | ], 944 | "return": { 945 | "type": "void" 946 | }, 947 | "inheritedFrom": "Polymer.AppLocalizeBehavior" 948 | }, 949 | { 950 | "name": "_setInitialSelectedItem", 951 | "description": "Selects an inbox item when the component is first instantiated.", 952 | "privacy": "protected", 953 | "sourceRange": { 954 | "start": { 955 | "line": 285, 956 | "column": 4 957 | }, 958 | "end": { 959 | "line": 289, 960 | "column": 5 961 | } 962 | }, 963 | "metadata": {}, 964 | "params": [], 965 | "return": { 966 | "type": "void" 967 | } 968 | }, 969 | { 970 | "name": "_handleItemTapped", 971 | "description": "Selects an item when the user taps on it.", 972 | "privacy": "protected", 973 | "sourceRange": { 974 | "start": { 975 | "line": 293, 976 | "column": 4 977 | }, 978 | "end": { 979 | "line": 296, 980 | "column": 5 981 | } 982 | }, 983 | "metadata": {}, 984 | "params": [ 985 | { 986 | "name": "evt" 987 | } 988 | ], 989 | "return": { 990 | "type": "void" 991 | } 992 | }, 993 | { 994 | "name": "_handleShowListView", 995 | "description": "Returns the user to the inbox list view in collapsed mode.", 996 | "privacy": "protected", 997 | "sourceRange": { 998 | "start": { 999 | "line": 300, 1000 | "column": 4 1001 | }, 1002 | "end": { 1003 | "line": 302, 1004 | "column": 5 1005 | } 1006 | }, 1007 | "metadata": {}, 1008 | "params": [], 1009 | "return": { 1010 | "type": "void" 1011 | } 1012 | }, 1013 | { 1014 | "name": "_calculateBounds", 1015 | "description": "When the window or any parent container is resized, recalculates the bounds\nof the px-inbox and decide if the inbox is collapsed. Show the list and\ndetail views side-by-side when not collapsed, and toggle back and forth\nbetween then when collapsed.", 1016 | "privacy": "protected", 1017 | "sourceRange": { 1018 | "start": { 1019 | "line": 309, 1020 | "column": 4 1021 | }, 1022 | "end": { 1023 | "line": 319, 1024 | "column": 5 1025 | } 1026 | }, 1027 | "metadata": {}, 1028 | "params": [ 1029 | { 1030 | "name": "evt" 1031 | } 1032 | ], 1033 | "return": { 1034 | "type": "void" 1035 | } 1036 | }, 1037 | { 1038 | "name": "_getFormattedDate", 1039 | "description": "", 1040 | "privacy": "protected", 1041 | "sourceRange": { 1042 | "start": { 1043 | "line": 320, 1044 | "column": 4 1045 | }, 1046 | "end": { 1047 | "line": 328, 1048 | "column": 5 1049 | } 1050 | }, 1051 | "metadata": {}, 1052 | "params": [ 1053 | { 1054 | "name": "date" 1055 | }, 1056 | { 1057 | "name": "localize" 1058 | } 1059 | ] 1060 | }, 1061 | { 1062 | "name": "_isValidDate", 1063 | "description": "", 1064 | "privacy": "protected", 1065 | "sourceRange": { 1066 | "start": { 1067 | "line": 329, 1068 | "column": 4 1069 | }, 1070 | "end": { 1071 | "line": 331, 1072 | "column": 5 1073 | } 1074 | }, 1075 | "metadata": {}, 1076 | "params": [ 1077 | { 1078 | "name": "dateString" 1079 | } 1080 | ] 1081 | }, 1082 | { 1083 | "name": "_formatDateFromNow", 1084 | "description": "", 1085 | "privacy": "protected", 1086 | "sourceRange": { 1087 | "start": { 1088 | "line": 332, 1089 | "column": 4 1090 | }, 1091 | "end": { 1092 | "line": 351, 1093 | "column": 5 1094 | } 1095 | }, 1096 | "metadata": {}, 1097 | "params": [ 1098 | { 1099 | "name": "date" 1100 | }, 1101 | { 1102 | "name": "nowDate" 1103 | }, 1104 | { 1105 | "name": "localize" 1106 | } 1107 | ] 1108 | }, 1109 | { 1110 | "name": "_computeFilter", 1111 | "description": "Searches through the list titles and subtitles and filters based on the query.", 1112 | "privacy": "protected", 1113 | "sourceRange": { 1114 | "start": { 1115 | "line": 355, 1116 | "column": 4 1117 | }, 1118 | "end": { 1119 | "line": 370, 1120 | "column": 5 1121 | } 1122 | }, 1123 | "metadata": {}, 1124 | "params": [ 1125 | { 1126 | "name": "query" 1127 | } 1128 | ] 1129 | }, 1130 | { 1131 | "name": "_handleReverseSort", 1132 | "description": "Reverses the sort order for the component.", 1133 | "privacy": "protected", 1134 | "sourceRange": { 1135 | "start": { 1136 | "line": 374, 1137 | "column": 4 1138 | }, 1139 | "end": { 1140 | "line": 381, 1141 | "column": 5 1142 | } 1143 | }, 1144 | "metadata": {}, 1145 | "params": [], 1146 | "return": { 1147 | "type": "void" 1148 | } 1149 | }, 1150 | { 1151 | "name": "_computeSort", 1152 | "description": "Sort function for the array of list items.", 1153 | "privacy": "protected", 1154 | "sourceRange": { 1155 | "start": { 1156 | "line": 385, 1157 | "column": 4 1158 | }, 1159 | "end": { 1160 | "line": 437, 1161 | "column": 5 1162 | } 1163 | }, 1164 | "metadata": {}, 1165 | "params": [ 1166 | { 1167 | "name": "sortBy" 1168 | }, 1169 | { 1170 | "name": "sortOrder" 1171 | } 1172 | ] 1173 | }, 1174 | { 1175 | "name": "_getSortIcon", 1176 | "description": "", 1177 | "privacy": "protected", 1178 | "sourceRange": { 1179 | "start": { 1180 | "line": 438, 1181 | "column": 4 1182 | }, 1183 | "end": { 1184 | "line": 445, 1185 | "column": 5 1186 | } 1187 | }, 1188 | "metadata": {}, 1189 | "params": [ 1190 | { 1191 | "name": "sortOrder" 1192 | } 1193 | ] 1194 | }, 1195 | { 1196 | "name": "_getLocalizedSortOptions", 1197 | "description": "", 1198 | "privacy": "protected", 1199 | "sourceRange": { 1200 | "start": { 1201 | "line": 446, 1202 | "column": 4 1203 | }, 1204 | "end": { 1205 | "line": 453, 1206 | "column": 5 1207 | } 1208 | }, 1209 | "metadata": {}, 1210 | "params": [ 1211 | { 1212 | "name": "localize" 1213 | } 1214 | ] 1215 | }, 1216 | { 1217 | "name": "_getSelectedItemClassName", 1218 | "description": "", 1219 | "privacy": "protected", 1220 | "sourceRange": { 1221 | "start": { 1222 | "line": 454, 1223 | "column": 4 1224 | }, 1225 | "end": { 1226 | "line": 458, 1227 | "column": 5 1228 | } 1229 | }, 1230 | "metadata": {}, 1231 | "params": [ 1232 | { 1233 | "name": "selectedId" 1234 | }, 1235 | { 1236 | "name": "id" 1237 | } 1238 | ] 1239 | }, 1240 | { 1241 | "name": "_getCollapsedClassNames", 1242 | "description": "", 1243 | "privacy": "protected", 1244 | "sourceRange": { 1245 | "start": { 1246 | "line": 459, 1247 | "column": 4 1248 | }, 1249 | "end": { 1250 | "line": 463, 1251 | "column": 5 1252 | } 1253 | }, 1254 | "metadata": {}, 1255 | "params": [ 1256 | { 1257 | "name": "isCollapsed" 1258 | }, 1259 | { 1260 | "name": "detailViewActive" 1261 | } 1262 | ] 1263 | }, 1264 | { 1265 | "name": "_getLabel", 1266 | "description": "", 1267 | "privacy": "protected", 1268 | "sourceRange": { 1269 | "start": { 1270 | "line": 464, 1271 | "column": 4 1272 | }, 1273 | "end": { 1274 | "line": 469, 1275 | "column": 5 1276 | } 1277 | }, 1278 | "metadata": {}, 1279 | "params": [ 1280 | { 1281 | "name": "severity" 1282 | } 1283 | ] 1284 | }, 1285 | { 1286 | "name": "_computeSelectedItemRef", 1287 | "description": "", 1288 | "privacy": "protected", 1289 | "sourceRange": { 1290 | "start": { 1291 | "line": 470, 1292 | "column": 4 1293 | }, 1294 | "end": { 1295 | "line": 478, 1296 | "column": 5 1297 | } 1298 | }, 1299 | "metadata": {}, 1300 | "params": [ 1301 | { 1302 | "name": "selectedItemId" 1303 | }, 1304 | { 1305 | "name": "items" 1306 | } 1307 | ] 1308 | }, 1309 | { 1310 | "name": "_updateShadowScrollClassName", 1311 | "description": "When the user scrolls the inbox list, add a class to show a shadow\nto indicate some items are not visible.", 1312 | "privacy": "protected", 1313 | "sourceRange": { 1314 | "start": { 1315 | "line": 483, 1316 | "column": 4 1317 | }, 1318 | "end": { 1319 | "line": 492, 1320 | "column": 5 1321 | } 1322 | }, 1323 | "metadata": {}, 1324 | "params": [], 1325 | "return": { 1326 | "type": "void" 1327 | } 1328 | }, 1329 | { 1330 | "name": "_getSearchContainerClasses", 1331 | "description": "", 1332 | "privacy": "protected", 1333 | "sourceRange": { 1334 | "start": { 1335 | "line": 493, 1336 | "column": 4 1337 | }, 1338 | "end": { 1339 | "line": 495, 1340 | "column": 5 1341 | } 1342 | }, 1343 | "metadata": {}, 1344 | "params": [ 1345 | { 1346 | "name": "sortDisabled" 1347 | } 1348 | ] 1349 | }, 1350 | { 1351 | "name": "_getSearchClasses", 1352 | "description": "", 1353 | "privacy": "protected", 1354 | "sourceRange": { 1355 | "start": { 1356 | "line": 496, 1357 | "column": 4 1358 | }, 1359 | "end": { 1360 | "line": 499, 1361 | "column": 5 1362 | } 1363 | }, 1364 | "metadata": {}, 1365 | "params": [ 1366 | { 1367 | "name": "sortDisabled" 1368 | } 1369 | ] 1370 | }, 1371 | { 1372 | "name": "_getSortClasses", 1373 | "description": "", 1374 | "privacy": "protected", 1375 | "sourceRange": { 1376 | "start": { 1377 | "line": 500, 1378 | "column": 5 1379 | }, 1380 | "end": { 1381 | "line": 503, 1382 | "column": 5 1383 | } 1384 | }, 1385 | "metadata": {}, 1386 | "params": [ 1387 | { 1388 | "name": "searchDisabled" 1389 | } 1390 | ] 1391 | } 1392 | ], 1393 | "staticMethods": [], 1394 | "demos": [ 1395 | { 1396 | "url": "index.html", 1397 | "description": "" 1398 | } 1399 | ], 1400 | "metadata": {}, 1401 | "sourceRange": { 1402 | "start": { 1403 | "line": 117, 1404 | "column": 10 1405 | }, 1406 | "end": { 1407 | "line": 504, 1408 | "column": 3 1409 | } 1410 | }, 1411 | "privacy": "public", 1412 | "superclass": "HTMLElement", 1413 | "attributes": [ 1414 | { 1415 | "name": "language", 1416 | "description": "A valid IETF language tag as a string that `px-localize-behavior` will\nuse to localize this component. Refer to px-localize-behavior for\ncurrently supported languages.\n\nSee https://github.com/PolymerElements/app-localize-behavior for API\ndocumentation and more information.", 1417 | "sourceRange": { 1418 | "start": { 1419 | "line": 219, 1420 | "column": 6 1421 | }, 1422 | "end": { 1423 | "line": 222, 1424 | "column": 7 1425 | } 1426 | }, 1427 | "metadata": {}, 1428 | "type": "string | null | undefined" 1429 | }, 1430 | { 1431 | "name": "resources", 1432 | "description": "List of strings needing to be localized for this component.", 1433 | "sourceRange": { 1434 | "start": { 1435 | "line": 234, 1436 | "column": 6 1437 | }, 1438 | "end": { 1439 | "line": 260, 1440 | "column": 7 1441 | } 1442 | }, 1443 | "metadata": {}, 1444 | "type": "Object | null | undefined" 1445 | }, 1446 | { 1447 | "name": "formats", 1448 | "description": "Optional dictionary of user defined formats, as explained here:\nhttp://formatjs.io/guides/message-syntax/#custom-formats\n\nFor example, a valid dictionary of formats would be:\nthis.formats = {\n number: { USD: { style: 'currency', currency: 'USD' } }\n}", 1449 | "sourceRange": { 1450 | "file": "../app-localize-behavior/app-localize-behavior.html", 1451 | "start": { 1452 | "line": 189, 1453 | "column": 4 1454 | }, 1455 | "end": { 1456 | "line": 192, 1457 | "column": 5 1458 | } 1459 | }, 1460 | "metadata": {}, 1461 | "type": "Object | null | undefined", 1462 | "inheritedFrom": "Polymer.AppLocalizeBehavior" 1463 | }, 1464 | { 1465 | "name": "use-key-if-missing", 1466 | "description": "Use the key for localization if value for language is missing. Should\nalways be true for our components", 1467 | "sourceRange": { 1468 | "start": { 1469 | "line": 227, 1470 | "column": 6 1471 | }, 1472 | "end": { 1473 | "line": 230, 1474 | "column": 7 1475 | } 1476 | }, 1477 | "metadata": {}, 1478 | "type": "boolean | null | undefined" 1479 | }, 1480 | { 1481 | "name": "localize", 1482 | "description": "Translates a string to the current `language`. Any parameters to the\nstring should be passed in order, as follows:\n`localize(stringKey, param1Name, param1Value, param2Name, param2Value)`", 1483 | "sourceRange": { 1484 | "file": "../app-localize-behavior/app-localize-behavior.html", 1485 | "start": { 1486 | "line": 208, 1487 | "column": 4 1488 | }, 1489 | "end": { 1490 | "line": 211, 1491 | "column": 5 1492 | } 1493 | }, 1494 | "metadata": {}, 1495 | "type": "Function | null | undefined", 1496 | "inheritedFrom": "Polymer.AppLocalizeBehavior" 1497 | }, 1498 | { 1499 | "name": "bubble-event", 1500 | "description": "If true, will bubble up the event to the parents", 1501 | "sourceRange": { 1502 | "file": "../app-localize-behavior/app-localize-behavior.html", 1503 | "start": { 1504 | "line": 216, 1505 | "column": 4 1506 | }, 1507 | "end": { 1508 | "line": 219, 1509 | "column": 5 1510 | } 1511 | }, 1512 | "metadata": {}, 1513 | "type": "boolean | null | undefined", 1514 | "inheritedFrom": "Polymer.AppLocalizeBehavior" 1515 | }, 1516 | { 1517 | "name": "list-items", 1518 | "description": "Array of items to include in the list. Each item in the array should be\nan object with the following keys:\n- id - must be a string, used to update the `selectedItem` property when an item is selected\n- title\n- subtitle\n- severity - one of \"important\", \"error\", \"warning\", or \"information\"\n- date - optional, should be valid 8601 date strings", 1519 | "sourceRange": { 1520 | "start": { 1521 | "line": 135, 1522 | "column": 6 1523 | }, 1524 | "end": { 1525 | "line": 138, 1526 | "column": 7 1527 | } 1528 | }, 1529 | "metadata": {}, 1530 | "type": "Array | null | undefined" 1531 | }, 1532 | { 1533 | "name": "selected-item", 1534 | "description": "ID of the selected item. Set this property to update the selected item,\nor listen for changes to observe when the user selects an item.", 1535 | "sourceRange": { 1536 | "start": { 1537 | "line": 143, 1538 | "column": 6 1539 | }, 1540 | "end": { 1541 | "line": 146, 1542 | "column": 7 1543 | } 1544 | }, 1545 | "metadata": {}, 1546 | "type": "string | null | undefined" 1547 | }, 1548 | { 1549 | "name": "selected-item-ref", 1550 | "description": "Reference to the selected item object, updated when a new item is\nselected. Read-only, set `selectedItem` to change what's selected", 1551 | "sourceRange": { 1552 | "start": { 1553 | "line": 151, 1554 | "column": 6 1555 | }, 1556 | "end": { 1557 | "line": 156, 1558 | "column": 7 1559 | } 1560 | }, 1561 | "metadata": {}, 1562 | "type": "Object | null | undefined" 1563 | }, 1564 | { 1565 | "name": "disable-search", 1566 | "description": "Disables search ability.", 1567 | "sourceRange": { 1568 | "start": { 1569 | "line": 160, 1570 | "column": 6 1571 | }, 1572 | "end": { 1573 | "line": 163, 1574 | "column": 7 1575 | } 1576 | }, 1577 | "metadata": {}, 1578 | "type": "boolean | null | undefined" 1579 | }, 1580 | { 1581 | "name": "disable-sort", 1582 | "description": "Disables sort ability.", 1583 | "sourceRange": { 1584 | "start": { 1585 | "line": 173, 1586 | "column": 6 1587 | }, 1588 | "end": { 1589 | "line": 176, 1590 | "column": 7 1591 | } 1592 | }, 1593 | "metadata": {}, 1594 | "type": "boolean | null | undefined" 1595 | }, 1596 | { 1597 | "name": "sort-by", 1598 | "description": "Determines how the inbox list is sorted. Updated automatically when the\nuser selects a new item from the sort by dropdown. Choose from one of\nthe following values to set through data binding:\n\"Title\" | \"Subtitle\" | \"Severity\" | \"Date\"", 1599 | "sourceRange": { 1600 | "start": { 1601 | "line": 183, 1602 | "column": 6 1603 | }, 1604 | "end": { 1605 | "line": 187, 1606 | "column": 7 1607 | } 1608 | }, 1609 | "metadata": {}, 1610 | "type": "string | null | undefined" 1611 | }, 1612 | { 1613 | "name": "sort-order", 1614 | "description": "Sets the sort order for the inbox list. Updated automatically when the\nuser clicks the arrow button to toggle the sort order. Choose from one\nof the following values to set through data binding:\n\"ascending\" | \"descending\"", 1615 | "sourceRange": { 1616 | "start": { 1617 | "line": 194, 1618 | "column": 6 1619 | }, 1620 | "end": { 1621 | "line": 198, 1622 | "column": 7 1623 | } 1624 | }, 1625 | "metadata": {}, 1626 | "type": "string | null | undefined" 1627 | }, 1628 | { 1629 | "name": "disable-auto-select", 1630 | "description": "By default, the first item in `listItems` will be selected when the\n`listItems` property is changed. Set this flag to `true` to disable\nthe auto select behavior. This property must be set before `listItems`\nis first set, or the first item may be selected anyway. Its recommended\nto set this as a static attribute on the px-inbox tag to ensure it\nis set before the `listItems` are first set.", 1631 | "sourceRange": { 1632 | "start": { 1633 | "line": 207, 1634 | "column": 6 1635 | }, 1636 | "end": { 1637 | "line": 210, 1638 | "column": 7 1639 | } 1640 | }, 1641 | "metadata": {}, 1642 | "type": "boolean | null | undefined" 1643 | } 1644 | ], 1645 | "events": [ 1646 | { 1647 | "type": "CustomEvent", 1648 | "name": "app-localize-resources-error", 1649 | "description": "Fired when the resources cannot be loaded due to an error.", 1650 | "metadata": {}, 1651 | "inheritedFrom": "Polymer.AppLocalizeBehavior" 1652 | }, 1653 | { 1654 | "type": "CustomEvent", 1655 | "name": "app-localize-resources-loaded", 1656 | "description": "Fired after the resources have been loaded.", 1657 | "metadata": {}, 1658 | "inheritedFrom": "Polymer.AppLocalizeBehavior" 1659 | }, 1660 | { 1661 | "type": "CustomEvent", 1662 | "name": "selected-item-changed", 1663 | "description": "Fired when the `selectedItem` property changes.", 1664 | "metadata": {} 1665 | }, 1666 | { 1667 | "type": "CustomEvent", 1668 | "name": "selected-item-ref-changed", 1669 | "description": "Fired when the `selectedItemRef` property changes.", 1670 | "metadata": {} 1671 | }, 1672 | { 1673 | "type": "CustomEvent", 1674 | "name": "sort-by-changed", 1675 | "description": "Fired when the `sortBy` property changes.", 1676 | "metadata": {} 1677 | }, 1678 | { 1679 | "type": "CustomEvent", 1680 | "name": "sort-order-changed", 1681 | "description": "Fired when the `sortOrder` property changes.", 1682 | "metadata": {} 1683 | } 1684 | ], 1685 | "styling": { 1686 | "cssVariables": [], 1687 | "selectors": [] 1688 | }, 1689 | "slots": [ 1690 | { 1691 | "description": "", 1692 | "name": "", 1693 | "range": { 1694 | "start": { 1695 | "line": 110, 1696 | "column": 8 1697 | }, 1698 | "end": { 1699 | "line": 110, 1700 | "column": 21 1701 | } 1702 | } 1703 | } 1704 | ], 1705 | "tagname": "px-inbox" 1706 | } 1707 | ] 1708 | } 1709 | -------------------------------------------------------------------------------- /px-inbox.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 58 | 59 | 60 | 115 | 116 | 117 | 507 | -------------------------------------------------------------------------------- /sass/px-inbox.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018, General Electric 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | // Settings 18 | @import "px-defaults-design/_settings.defaults.scss"; 19 | 20 | // Generic 21 | @import "px-normalize-design/_generic.normalize.scss"; 22 | @import "px-box-sizing-design/_generic.box-sizing.scss"; 23 | @import "px-helpers-design/_generic.helpers.scss"; 24 | 25 | // Base 26 | @import "px-flexbox-design/_base.flexbox.scss"; 27 | $inuit-enable-input--search: true; 28 | @import "px-forms-design/_base.forms.scss"; 29 | $inuit-enable-list-ui--small: true; 30 | $inuit-list-ui-border-color: transparent; 31 | @import "px-list-ui-design/_objects.list-ui.scss"; 32 | @import "px-shadows-design/_objects.shadows.scss"; 33 | @import "px-actionable-design/_objects.actionable.scss"; 34 | 35 | 36 | // Component 37 | :host { 38 | overflow-y: auto; 39 | display: flex; 40 | height: var(--px-inbox-height, 100vh); 41 | --px-alert-label-border-color: var(--px-inbox-li-text-color--selected, white); 42 | } 43 | .inbox-container { 44 | display: flex; 45 | flex: 1 1 auto; 46 | } 47 | .list { 48 | height: 100%; 49 | flex: 0 0 var(--px-inbox-list-width, calculateRem(320px)); 50 | border-right: 1px solid var(--px-inbox-border-color, transparent); 51 | background-color: var(--px-inbox-li-background-color, white); 52 | } 53 | .collapsed > .list { 54 | flex-basis: 100%; 55 | } 56 | .collapsed--detail-active > .list { 57 | display: none; 58 | } 59 | .list__header { 60 | flex: 0 0 auto; 61 | } 62 | .search { 63 | position: relative; 64 | display: block; 65 | } 66 | .search__icon { 67 | position: absolute; 68 | top: 0; 69 | right: calculateRem(5px); 70 | width: 1.5rem; 71 | height: 2rem; 72 | display: block; 73 | padding: 4px; 74 | color: var(--px-inbox-secondary-text-color, gray); 75 | --iron-icon-width: calc(100%-5px); 76 | --iron-icon-height: calc(100%-5px); 77 | } 78 | .list-ui--small { 79 | overflow-y: auto; 80 | } 81 | .list-ui--small .list-ui__item { 82 | height: calculateRem(80px); 83 | padding-left: $inuit-base-spacing-unit; 84 | padding-right: $inuit-base-spacing-unit; 85 | border-bottom-color: var(--px-inbox-border-color, gray); 86 | &:hover { 87 | background-color: var(--px-inbox-li-background-color--hover, lightgray); 88 | } 89 | &.selected { 90 | background-color: var(--px-inbox-li-background-color--selected, blue); 91 | color: var(--px-inbox-li-text-color--selected, white); 92 | .subtitle, .info { 93 | color: var(--px-inbox-li-text-color--selected, white); 94 | } 95 | } 96 | } 97 | .title { 98 | display: -webkit-box; 99 | font-weight: bold; 100 | overflow: hidden; 101 | text-overflow: ellipsis; 102 | -webkit-line-clamp: 2; 103 | -webkit-box-orient: vertical; 104 | word-break: break-word; 105 | line-height: $inuit-base-spacing-unit--large; 106 | max-height: 2 * $inuit-base-spacing-unit--large; 107 | } 108 | .subtitle { 109 | display: -webkit-box; 110 | overflow: hidden; 111 | text-overflow: ellipsis; 112 | -webkit-line-clamp: 1; 113 | -webkit-box-orient: vertical; 114 | word-break: break-word; 115 | line-height: $inuit-base-spacing-unit--large; 116 | max-height: $inuit-base-spacing-unit--large; 117 | color: var(--px-inbox-secondary-text-color, darkgray); 118 | } 119 | .info { 120 | text-align: right; 121 | font-size: calculateRem(12px); 122 | margin-left: 2rem; 123 | flex: 0 0 auto; 124 | color: var(--px-inbox-secondary-text-color, darkgray); 125 | } 126 | px-dropdown { 127 | margin-top: -2px; 128 | } 129 | .detail { 130 | height: 100%; 131 | overflow-y: auto; 132 | flex: 1 1 auto; 133 | // &.list-active { 134 | // display: none; 135 | // } 136 | &.constrained .back-link { 137 | // display: block; 138 | } 139 | } 140 | .collapsed > .detail .back-link { 141 | display: block; 142 | } 143 | .collapsed--list-active > .detail { 144 | display: none; 145 | } 146 | .label { 147 | color: var(--px-inbox-secondary-text-color, darkgray); 148 | } 149 | .svg-canvas { 150 | display: none; 151 | } 152 | .sort-dropdown { 153 | min-width: 5rem; 154 | } 155 | px-alert-label { 156 | margin-right: 0.6666rem; 157 | } 158 | px-icon#sortIcon { 159 | width: 1rem; 160 | height: 1rem; 161 | } 162 | .back-link { 163 | display: none; 164 | } 165 | 166 | // Trumps 167 | $inuit-enable-margins: true; 168 | $inuit-enable-margins--tiny: true; 169 | $inuit-enable-margins--small: true; 170 | $inuit-enable-paddings: true; 171 | @import "px-spacing-design/_trumps.spacing.scss"; 172 | -------------------------------------------------------------------------------- /scripts/ghp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Exit with nonzero exit code if anything fails 4 | set -e 5 | 6 | # ------------------------------------------------------------------------------ 7 | # CONFIGURE SCRIPT 8 | # ------------------------------------------------------------------------------ 9 | 10 | # Set our source branch (where we'll build from) and our target branch (where we 11 | # want to send the build page to) 12 | SOURCE_BRANCH="master" 13 | TARGET_BRANCH="gh-pages" 14 | REPO=`git config remote.origin.url` 15 | 16 | # Prep git credentials 17 | GIT_USER_NAME="Travis CI" 18 | GIT_USER_EMAIL="PredixtravisCI@ge.com" 19 | GIT_COMMIT_MESSAGE="[Travis] Rebuild documentation for Github Pages" 20 | 21 | # Check if we should run a deploy, or if we should skip it. Only commits to master 22 | # should trigger a build. Pull requests and commits to features branches should not. 23 | if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_BRANCH" != "$SOURCE_BRANCH" ]; then 24 | echo "Skipping deploy; just doing a build." 25 | exit 0 26 | fi 27 | 28 | # ------------------------------------------------------------------------------ 29 | # PREPARE FILESYSTEM 30 | # ------------------------------------------------------------------------------ 31 | 32 | cd $TRAVIS_BUILD_DIR 33 | 34 | # Find out our repo name from the bower file 35 | REPO_NAME=$(grep "name" bower.json | sed 's/"name": "//' | sed 's/",//') 36 | echo "repo name is ${REPO_NAME}" 37 | 38 | #delete all the files! 39 | rm -rf node_modules 40 | rm -rf bower_components 41 | rm -rf css 42 | rm -rf sass 43 | rm -rf scripts 44 | rm -rf test 45 | rm -f *.html 46 | rm -f *.json 47 | rm -f *.enc 48 | rm -f *.js 49 | rm -f *.png 50 | rm -f *.lock 51 | rm -f *.ico 52 | rm -f *.md 53 | rm -f *.pdf 54 | yes | rm .travis.yml 55 | rm -f .bowerrc 56 | rm -f .editorconfig 57 | rm -rf .github 58 | rm -f .gitignore 59 | rm -f .jshintrc 60 | 61 | # force installation of bower packages at the root 62 | echo "{ \"directory\": \".\" }" > .bowerrc 63 | 64 | #make sure the deploy key isn't saved into the git repo 65 | echo "deploy_key" > .gitignore 66 | 67 | # add the redirect. 68 | # Note: We are not overwriting the component's documentation `index.html` file 69 | # here, we are making sure that http://url/px-something/ redirects to 70 | # http://url/px-something/px-something/, where the demo page is installed 71 | meta_temp='' 72 | echo ${meta_temp/'COMPONENT_NAME'/$REPO_NAME} > index.html 73 | 74 | # ------------------------------------------------------------------------------ 75 | # BOWER 76 | # ------------------------------------------------------------------------------ 77 | # 78 | #for some reason, bower isn't available here, so, install it globally, so it doesn't end up as another folder. 79 | npm install bower -g 80 | bower cache clean 81 | # Install the repo and the dark-theme. 82 | bower install ${REPO_NAME} px-dark-theme px-dark-demo-theme --force-latest 83 | 84 | #copy the bower file into our root 85 | yes | cp ${REPO_NAME}/bower.json bower.json 86 | 87 | #and run install 88 | bower install 89 | 90 | # ------------------------------------------------------------------------------ 91 | # BUILD PROJECT 92 | # ------------------------------------------------------------------------------ 93 | 94 | # Go into the component folder we've just installed from bower 95 | # cd ${REPO_NAME} 96 | 97 | # ------------------------------------------------------------------------------ 98 | # SW-PRECACHE 99 | # ------------------------------------------------------------------------------ 100 | 101 | # npm install sw-precache 102 | # sw-precache --root='.' --static-file-globs='**/*.{js,html,css,png,jpg,gif,svg,eot,ttf,woff}' 103 | 104 | # ------------------------------------------------------------------------------ 105 | # GIT PUSH TO REMOTES 106 | # ------------------------------------------------------------------------------ 107 | 108 | # Remember to exit out of the component before we do any git stuff 109 | # cd ../ 110 | 111 | # Do the git stuff 112 | 113 | # checkout a new orphan 114 | git checkout --orphan $TARGET_BRANCH 115 | 116 | git add -A . > /dev/null 117 | echo "git add done" 118 | git commit -m "${GIT_COMMIT_MESSAGE}" --quiet 119 | echo "git commit done" 120 | 121 | # Set git credentials (defined in settings above) 122 | git config user.name ${GIT_USER_NAME} 123 | git config user.email ${GIT_USER_EMAIL} 124 | 125 | 126 | # We get the URL in this format: "https://github.com/PredixDev/px-something" 127 | # First, we need to replace https-style remote URL with a SSH-style remote 128 | # URL we can push to below 129 | SSH_GIT=${REPO/https:\/\/github.com\//git@github.com:} 130 | 131 | # Now, the URL is in this format: "git@github.com:PredixDev/px-something" 132 | # Next, replace `PredixDev` Github organization with `predix-ui` so configure 133 | # the correct remote to push to. 134 | # The resulting URL will be: "git@github.com:predix-ui/px-something" 135 | SSH_GIT_PREDIXUI=${SSH_GIT/:PredixDev\//:predix-ui\/} 136 | 137 | # Prepare ssh key, which we'll use to authenticate for SSH-push deploy 138 | eval `ssh-agent -s` 139 | # ... and change permissions for deploy key 140 | chmod 0400 $TRAVIS_BUILD_DIR/deploy_key 141 | 142 | # Push to predix-ui/repo `gh-pages` branch (force to override out-of-date refs) 143 | ssh-add $TRAVIS_BUILD_DIR/deploy_key 144 | git push $SSH_GIT_PREDIXUI $TARGET_BRANCH --force 145 | 146 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /test/index.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /test/px-inbox-fixture.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Web Component Test : Fixture for px-inbox 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 |

Web Component Test : Fixture for px-inbox

43 | 44 | 49 | 50 | 51 | 57 | 58 | 59 | 65 | 66 | 67 | 73 | 74 | 75 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /test/px-inbox-tests.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright (c) 2018, General Electric 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | describe('px-inbox', () => { 19 | let inboxEl; 20 | 21 | beforeEach((done) => { 22 | inboxEl = fixture('InboxFixture'); 23 | flush(done); 24 | }); 25 | 26 | it('renders all the list items', () => { 27 | const listItemEls = Polymer.dom(inboxEl.root).querySelectorAll('li'); 28 | assert.equal(listItemEls.length, 6); 29 | }); 30 | 31 | it('filters items when the search input changes', (done) => { 32 | const searchInput = Polymer.dom(inboxEl.root).querySelector('input'); 33 | searchInput.value = 'CMS'; 34 | searchInput.dispatchEvent(new Event('input')); /* manually trigger input event to simulate user input */ 35 | flush(() => { 36 | const listItemEls = Polymer.dom(inboxEl.root).querySelectorAll('li'); 37 | assert.equal(inboxEl._query, 'CMS'); 38 | assert.equal(listItemEls.length, 2); 39 | done(); 40 | }); 41 | }); 42 | 43 | it('sorts items when the sort by direction is changed', (done) => { 44 | const sortDropdown = Polymer.dom(inboxEl.root).querySelector('px-dropdown'); 45 | sortDropdown.selected = 'Title'; 46 | flush(() => { 47 | const listItemEls = Polymer.dom(inboxEl.root).querySelectorAll('li'); 48 | assert.equal(inboxEl.sortBy, 'Title'); 49 | assert.equal(listItemEls[0].id, '1'); 50 | assert.equal(listItemEls[1].id, '6'); 51 | assert.equal(listItemEls[2].id, '2'); 52 | assert.equal(listItemEls[3].id, '4'); 53 | assert.equal(listItemEls[4].id, '5'); 54 | assert.equal(listItemEls[5].id, '3'); 55 | done(); 56 | }); 57 | }); 58 | 59 | it('updates the selected item when an inbox item is tapped', () => { 60 | const listItemEls = Polymer.dom(inboxEl.root).querySelectorAll('li'); 61 | listItemEls[3].click(); 62 | assert.isTrue(listItemEls[3].classList.contains('selected')); 63 | assert.equal(inboxEl.selectedItem, listItemEls[3].id); 64 | assert.equal(inboxEl.selectedItemRef, inboxEl.listItems[3]); 65 | }); 66 | 67 | it('selects the first list item by default', () => { 68 | assert.equal(inboxEl.selectedItem, inboxEl.listItems[0].id); 69 | assert.equal(inboxEl.selectedItemRef, inboxEl.listItems[0]); 70 | }); 71 | 72 | it('does not select the first list item if `disable-auto-select` attribute is defined first', (done) => { 73 | const inboxDisableAutoSelectEl = fixture('InboxDisableAutoSelectFixture'); 74 | flush(() => { 75 | assert.isUndefined(inboxDisableAutoSelectEl.selectedItem); 76 | assert.isUndefined(inboxDisableAutoSelectEl.selectedItemRef); 77 | done(); 78 | }); 79 | }); 80 | 81 | it('does not render search if `disable-search` attribute is defined', (done) => { 82 | const inboxSearchDisabledFixture = fixture('InboxSearchDisabledFixture'); 83 | flush(() => { 84 | assert.isNull(Polymer.dom(inboxSearchDisabledFixture.root).querySelector('.search-container')); 85 | done(); 86 | }); 87 | }); 88 | 89 | it('does not render sort if `disable-sort` attribute is defined', (done) => { 90 | const inboxSortDisabledFixture = fixture('InboxSortDisabledFixture'); 91 | flush(() => { 92 | assert.isNull(Polymer.dom(inboxSortDisabledFixture.root).querySelector('.sort-container')); 93 | done(); 94 | }); 95 | }); 96 | 97 | it('does not render sort or search if `disable-search` and `disable-sort` attributes are defined', (done) => { 98 | const inboxSearchAndSortDisabledFixture = fixture('InboxSearchAndSortDisabledFixture'); 99 | flush(() => { 100 | assert.isNull(Polymer.dom(inboxSearchAndSortDisabledFixture.root).querySelector('.search-container')); 101 | assert.isNull(Polymer.dom(inboxSearchAndSortDisabledFixture.root).querySelector('.sort-container')); 102 | done(); 103 | }); 104 | }); 105 | }); 106 | 107 | describe('px-inbox date formatting', () => { 108 | let inboxEl; 109 | const localizeStub = str => str; 110 | 111 | beforeEach((done) => { 112 | inboxEl = fixture('InboxFixture'); 113 | flush(done); 114 | }); 115 | 116 | it('does not format dates that are not valid ISO-8601 strings', () => { 117 | assert.equal(inboxEl._getFormattedDate('a long time ago', ()=>null), 'a long time ago'); 118 | }); 119 | 120 | it('correctly formats time a few seconds ago', () => { 121 | const nowDate = new Date('2016-10-05T08:00:00'); 122 | const pastDate = new Date('2016-10-05T07:59:16'); // 44 seconds before nowDate 123 | assert.equal(inboxEl._formatDateFromNow(pastDate, nowDate, localizeStub), 'a few seconds ago'); 124 | }); 125 | 126 | it('correctly formats time a minute ago', () => { 127 | const nowDate = new Date('2016-10-05T08:00:00'); 128 | const pastDate = new Date('2016-10-05T07:59:15'); // 45 seconds before nowDate 129 | assert.equal(inboxEl._formatDateFromNow(pastDate, nowDate, localizeStub), 'a minute ago'); 130 | }); 131 | 132 | it('correctly formats time [n] minutes ago', () => { 133 | const nowDate = new Date('2016-10-05T08:00:00'); 134 | const pastDate = new Date('2016-10-05T07:16:00'); // 44 minutes before nowDate 135 | assert.equal(inboxEl._formatDateFromNow(pastDate, nowDate, localizeStub), '44 minutes ago'); 136 | }); 137 | 138 | it('correctly formats time an hour ago', () => { 139 | const nowDate = new Date('2016-10-05T08:00:00'); 140 | const pastDate = new Date('2016-10-05T07:15:00'); // 45 minutes before nowDate 141 | assert.equal(inboxEl._formatDateFromNow(pastDate, nowDate, localizeStub), 'an hour ago'); 142 | }); 143 | 144 | it('correctly formats time [n] hours ago', () => { 145 | const nowDate = new Date('2016-10-05T23:00:00'); 146 | const pastDate = new Date('2016-10-05T02:00:00'); // 21 hours before nowDate 147 | assert.equal(inboxEl._formatDateFromNow(pastDate, nowDate, localizeStub), '21 hours ago'); 148 | }); 149 | 150 | it('correctly formats time a day ago', () => { 151 | const nowDate = new Date('2016-10-05T23:00:00'); 152 | const pastDate = new Date('2016-10-05T01:00:00'); // 22 hours before nowDate 153 | assert.equal(inboxEl._formatDateFromNow(pastDate, nowDate, localizeStub), 'a day ago'); 154 | }); 155 | 156 | it('correctly formats time [n] days ago', () => { 157 | const nowDate = new Date('2016-10-28T23:00:00'); 158 | const pastDate = new Date('2016-10-03T23:00:00'); // 25 days before nowDate 159 | assert.equal(inboxEl._formatDateFromNow(pastDate, nowDate, localizeStub), '25 days ago'); 160 | }); 161 | 162 | it('correctly formats time a month ago', () => { 163 | const nowDate = new Date('2016-10-28T23:00:00'); 164 | const pastDate = new Date('2016-10-02T23:00:00'); // 26 days before nowDate 165 | assert.equal(inboxEl._formatDateFromNow(pastDate, nowDate, localizeStub), 'a month ago'); 166 | }); 167 | 168 | it('correctly formats time [n] months ago', () => { 169 | const nowDate = new Date('2016-12-10T23:00:00'); 170 | const pastDate = new Date('2016-02-10T23:00:00'); // 10 months before nowDate 171 | assert.equal(inboxEl._formatDateFromNow(pastDate, nowDate, localizeStub), '10 months ago'); 172 | }); 173 | 174 | it('correctly formats time a year ago', () => { 175 | const nowDate = new Date('2016-12-10T23:00:00'); 176 | const pastDate = new Date('2016-01-10T23:00:00'); // 11 months before nowDate 177 | assert.equal(inboxEl._formatDateFromNow(pastDate, nowDate, localizeStub), 'a year ago'); 178 | }); 179 | 180 | it('correctly formats time [n] years ago', () => { 181 | const nowDate = new Date('2016-12-10T23:00:00'); 182 | const pastDate = new Date('2013-12-10T23:00:00'); // 3 years before nowDate 183 | assert.equal(inboxEl._formatDateFromNow(pastDate, nowDate, localizeStub), '3 years ago'); 184 | }); 185 | 186 | it('handles date objects correctly', () => { 187 | const item = [{"id":"1","title":"test","subtitle":"test","date":new Date(),"severity":"important"}]; 188 | inboxEl.set('listItems', item); 189 | flush(function() { 190 | assert.equal(Polymer.dom(inboxEl.root).querySelector('.info').textContent.trim(), 'a few seconds ago'); 191 | }); 192 | }); 193 | }); 194 | -------------------------------------------------------------------------------- /wct.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "verbose": false, 3 | "plugins": { 4 | "local": { 5 | "browsers": [ 6 | "chrome", 7 | "firefox" 8 | ] 9 | }, 10 | "sauce": { 11 | "disabled": true, 12 | "browsers": [ 13 | { 14 | "browserName": "microsoftedge", 15 | "platform": "Windows 10", 16 | "version": "" 17 | }, 18 | { 19 | "browserName": "internet explorer", 20 | "platform": "Windows 8.1", 21 | "version": "11" 22 | }, 23 | { 24 | "browserName": "safari", 25 | "platform": "OS X 10.12", 26 | "version": "10" 27 | }, 28 | { 29 | "browserName": "safari", 30 | "platform": "OS X 10.12", 31 | "version": "11" 32 | } 33 | ] 34 | } 35 | }, 36 | "suites": [ 37 | "test/index.html" 38 | ] 39 | } 40 | --------------------------------------------------------------------------------