historyLabel.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /* eslint-disable
  2. max-len,
  3. */
  4. // TODO: This file was created by bulk-decaffeinate.
  5. // Fix any style issues and re-enable lint.
  6. /*
  7. * decaffeinate suggestions:
  8. * DS102: Remove unnecessary code created because of implicit returns
  9. * DS207: Consider shorter variations of null checks
  10. * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
  11. */
  12. import App from '../../../base'
  13. const historyLabelController = function ($scope, $element, $attrs, $filter) {
  14. const ctrl = this
  15. ctrl.$onInit = () => {
  16. if (ctrl.showTooltip == null) {
  17. ctrl.showTooltip = true
  18. }
  19. if (ctrl.isPseudoCurrentStateLabel == null) {
  20. ctrl.isPseudoCurrentStateLabel = false
  21. }
  22. }
  23. }
  24. export default App.component('historyLabel', {
  25. bindings: {
  26. labelText: '<',
  27. labelOwnerName: '<?',
  28. labelCreationDateTime: '<?',
  29. isOwnedByCurrentUser: '<',
  30. isPseudoCurrentStateLabel: '<',
  31. onLabelDelete: '&',
  32. showTooltip: '<?',
  33. },
  34. controller: historyLabelController,
  35. templateUrl: 'historyLabelTpl',
  36. })