@mediafly/js-ui 50.5.0 → 51.1.0-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/.node-version +1 -1
  2. package/.semaphore/promotion-deploy-docs.yml +35 -0
  3. package/.semaphore/scripts/notify_jira.sh +115 -0
  4. package/.semaphore/semaphore.yml +91 -0
  5. package/CHANGELOG.md +25 -346
  6. package/README.md +7 -4
  7. package/archive/old-changelog.md +347 -0
  8. package/lib/checkbox/checkbox.html +2 -0
  9. package/lib/color-input/spectrum-color-picker.js +1 -2
  10. package/lib/color-input/spectrum-color-picker.js.map +1 -1
  11. package/lib/constants/constants.js +0 -1
  12. package/lib/constants/constants.js.map +1 -1
  13. package/lib/date-input/date-input.js +2 -3
  14. package/lib/date-input/date-input.js.map +1 -1
  15. package/lib/date-input/validate-date.js +1 -2
  16. package/lib/date-input/validate-date.js.map +1 -1
  17. package/lib/date-time-zone-picker/date-time-zone-picker.js +1 -2
  18. package/lib/date-time-zone-picker/date-time-zone-picker.js.map +1 -1
  19. package/lib/date-time-zone-picker/datepicker.html +17 -18
  20. package/lib/date-time-zone-picker/timepicker.html +19 -9
  21. package/lib/first-time-motivator/first-time-motivator.js +3 -4
  22. package/lib/first-time-motivator/first-time-motivator.js.map +1 -1
  23. package/lib/fonts.css +1 -1
  24. package/lib/gesture-handler/gesture-handler.js +14 -6
  25. package/lib/gesture-handler/gesture-handler.js.map +1 -1
  26. package/lib/hover-tooltip/hover-tooltip.js +7 -4
  27. package/lib/hover-tooltip/hover-tooltip.js.map +1 -1
  28. package/lib/index.d.ts +0 -5
  29. package/lib/index.js +0 -5
  30. package/lib/index.js.map +1 -1
  31. package/lib/jsui.module.css +46 -49
  32. package/lib/loading-indicator/loading-indicator.component.html +6 -6
  33. package/lib/metadata-form/metadata-form.component.d.ts +1 -0
  34. package/lib/metadata-form/metadata-form.component.js +32 -0
  35. package/lib/metadata-form/metadata-form.component.js.map +1 -1
  36. package/lib/metadata-form/metadata-form.html +1 -1
  37. package/lib/rich-text/rich-text.component.d.ts +3 -2
  38. package/lib/rich-text/rich-text.component.js +8 -0
  39. package/lib/rich-text/rich-text.component.js.map +1 -1
  40. package/lib/styles.css +176 -369
  41. package/lib/time-input/time-input.html +1 -1
  42. package/lib/time-input/time-input.js +2 -3
  43. package/lib/time-input/time-input.js.map +1 -1
  44. package/lib/time-input/validate-time.js +1 -2
  45. package/lib/time-input/validate-time.js.map +1 -1
  46. package/lib/tree/tree.js +3 -4
  47. package/lib/tree/tree.js.map +1 -1
  48. package/lib/tsconfig.deploy.tsbuildinfo +26 -155
  49. package/package.json +1 -2
  50. package/src/components/checkbox/checkbox.html +2 -0
  51. package/src/components/color-input/spectrum-color-picker.js +2 -3
  52. package/src/components/constants/constants.js +0 -1
  53. package/src/components/date-input/date-input.js +2 -3
  54. package/src/components/date-input/validate-date.js +1 -2
  55. package/src/components/date-time-zone-picker/date-time-zone-picker.less +20 -19
  56. package/src/components/date-time-zone-picker/date-time-zone-picker.ts +10 -7
  57. package/src/components/date-time-zone-picker/datepicker.html +17 -18
  58. package/src/components/date-time-zone-picker/timepicker.html +19 -9
  59. package/src/components/feedback/feedback.less +1 -1
  60. package/src/components/first-time-motivator/first-time-motivator.ts +4 -5
  61. package/src/components/font-selector/font-selector.less +2 -1
  62. package/src/components/gesture-handler/{gesture-handler.js → gesture-handler.ts} +18 -6
  63. package/src/components/hover-tooltip/hover-tooltip.ts +7 -4
  64. package/src/components/index.less +0 -1
  65. package/src/components/index.ts +0 -5
  66. package/src/components/legacy/mediafly-bootstrap.css +0 -5
  67. package/src/components/less/fonts/mfly-webfont.less +1 -1
  68. package/src/components/less/objects/buttons.less +12 -63
  69. package/src/components/less/objects/buttons.module.css +8 -2
  70. package/src/components/less/objects/containers.less +2 -2
  71. package/src/components/less/objects/forms.less +31 -245
  72. package/src/components/less/objects/labels.less +5 -1
  73. package/src/components/less/objects/radios-checkboxes.less +2 -1
  74. package/src/components/less/utilities/reset.less +1 -1
  75. package/src/components/less/utilities/utilities.less +2 -0
  76. package/src/components/less/variables/colors.less +39 -44
  77. package/src/components/less/variables/effects.less +3 -7
  78. package/src/components/less/variables.module.css +37 -46
  79. package/src/components/less/vendor/pikaday.css +12 -8
  80. package/src/components/loading-indicator/loading-indicator.component.html +6 -6
  81. package/src/components/metadata-form/metadata-form.component.ts +39 -0
  82. package/src/components/metadata-form/metadata-form.html +1 -1
  83. package/src/components/progress-bar/progress-bar.less +2 -1
  84. package/src/components/rich-text/rich-text.component.ts +8 -2
  85. package/src/components/time-input/time-input.html +1 -1
  86. package/src/components/time-input/time-input.js +3 -3
  87. package/src/components/time-input/validate-time.js +1 -2
  88. package/src/components/tree/tree.less +16 -8
  89. package/src/components/tree/tree.ts +5 -6
  90. package/src/fonts/mfly-webfont.woff +0 -0
  91. package/src/index.html +3 -2
  92. package/src/index.spec.js +0 -6
  93. package/Dockerfile +0 -42
  94. package/Jenkinsfile +0 -138
  95. package/lib/date-time-utilities/date-time-utilities.d.ts +0 -1
  96. package/lib/date-time-utilities/date-time-utilities.js +0 -79
  97. package/lib/date-time-utilities/date-time-utilities.js.map +0 -1
  98. package/lib/date-time-utilities/index.d.ts +0 -1
  99. package/lib/date-time-utilities/index.js +0 -4
  100. package/lib/date-time-utilities/index.js.map +0 -1
  101. package/lib/disable-context-menu/disable-context-menu.d.ts +0 -1
  102. package/lib/disable-context-menu/disable-context-menu.js +0 -23
  103. package/lib/disable-context-menu/disable-context-menu.js.map +0 -1
  104. package/lib/disable-context-menu/index.d.ts +0 -1
  105. package/lib/disable-context-menu/index.js +0 -4
  106. package/lib/disable-context-menu/index.js.map +0 -1
  107. package/lib/show-image-loader/index.d.ts +0 -1
  108. package/lib/show-image-loader/index.js +0 -4
  109. package/lib/show-image-loader/index.js.map +0 -1
  110. package/lib/show-image-loader/show-image-loader.d.ts +0 -1
  111. package/lib/show-image-loader/show-image-loader.js +0 -23
  112. package/lib/show-image-loader/show-image-loader.js.map +0 -1
  113. package/lib/slides/index.d.ts +0 -1
  114. package/lib/slides/index.js +0 -4
  115. package/lib/slides/index.js.map +0 -1
  116. package/lib/slides/slides.d.ts +0 -1
  117. package/lib/slides/slides.html +0 -17
  118. package/lib/slides/slides.js +0 -96
  119. package/lib/slides/slides.js.map +0 -1
  120. package/lib/time-conversion/index.d.ts +0 -1
  121. package/lib/time-conversion/index.js +0 -4
  122. package/lib/time-conversion/index.js.map +0 -1
  123. package/lib/time-conversion/time-conversion-factory.d.ts +0 -1
  124. package/lib/time-conversion/time-conversion-factory.js +0 -91
  125. package/lib/time-conversion/time-conversion-factory.js.map +0 -1
  126. package/src/components/date-time-utilities/date-time-utilities.js +0 -94
  127. package/src/components/date-time-utilities/index.ts +0 -1
  128. package/src/components/disable-context-menu/disable-context-menu.ts +0 -21
  129. package/src/components/disable-context-menu/index.ts +0 -1
  130. package/src/components/show-image-loader/index.ts +0 -1
  131. package/src/components/show-image-loader/show-image-loader.js +0 -22
  132. package/src/components/slides/index.ts +0 -1
  133. package/src/components/slides/slides.html +0 -17
  134. package/src/components/slides/slides.less +0 -155
  135. package/src/components/slides/slides.ts +0 -101
  136. package/src/components/time-conversion/index.ts +0 -1
  137. package/src/components/time-conversion/time-conversion-factory.ts +0 -114
  138. package/tsconfig.tsbuildinfo +0 -7221
@@ -1,101 +0,0 @@
1
- import angular from 'angular'
2
- import is from 'is_js'
3
- import _ from 'lodash'
4
- import template from './slides.html'
5
-
6
- angular.module('app').directive('mflySlides', ['$animate', function mflySlides($animate) {
7
-
8
- return {
9
- replace: true,
10
- restrict: 'E',
11
- scope: {
12
- canShare: '=',
13
- currentIndex: '=',
14
- nextSlide: '=',
15
- slideDirection: '=',
16
- slides: '=',
17
- zoomToFit: '=',
18
- },
19
- template,
20
- link($scope: ScopeKeyValuePair, element) {
21
-
22
- // initially no slides are active nor loaded
23
- _.each($scope.slides, (item) => {
24
- _.set(item, 'active', false)
25
- _.set(item, 'showLoader', true)
26
- })
27
-
28
- // define a function for slide animation so that we can debounce it
29
- function animateSlides(newIndex, oldIndex) {
30
- // determine the direction
31
- const currentDirection = getCurrentDirection(newIndex, oldIndex)
32
- // begin transition between the new slide and the old one
33
- animateOut(angular.element(element.children()[0]).children()[oldIndex], currentDirection)
34
- animateIn(angular.element(element.children()[0]).children()[newIndex], currentDirection)
35
- }
36
-
37
- // provide a debounced version of our animation called
38
- const debouncedAnimateSlides = _.debounce(animateSlides, 500, {leading: true, trailing: false})
39
-
40
- // watch the currentIndex to change slides
41
- $scope.$watch('currentIndex', (newVal: number, oldVal) => {
42
-
43
- // make sure we have a value
44
- if (is.existy(newVal)) {
45
- // make sure the value is within range
46
- if (newVal <= $scope.slides.length - 1) {
47
- // we don't want to rerun animations unless we are transitioning from an oldval
48
- const runAnimations = (is.not.existy(oldVal)) ? false : true
49
-
50
- if (!runAnimations) {
51
- // clear any currently active slides (if any)
52
- _.each($scope.slides, (slide) => {
53
- slide.active = false
54
- })
55
- // set the new active slide {
56
- $scope.slides[newVal].active = true
57
- } else {
58
- debouncedAnimateSlides(newVal, oldVal)
59
- // swap the new active slide
60
- $scope.slides[oldVal].active = false
61
- $scope.slides[newVal].active = true
62
- }
63
- }
64
- } else {
65
- $scope.currentIndex = 0
66
- }
67
-
68
- })
69
-
70
- function getCurrentDirection(newIndex, oldIndex) {
71
- let direction
72
- switch ($scope.slideDirection) {
73
- case 'next':
74
- direction = 'left'
75
- break
76
- case 'previous':
77
- direction = 'right'
78
- break
79
- default:
80
- direction = (newIndex > oldIndex) ? 'left' : 'right'
81
- }
82
-
83
- return direction
84
- }
85
-
86
- function animateOut(slideElement, direction) {
87
- $animate.addClass(slideElement, 'is-sliding-out-' + direction).then(() => {
88
- // this will still be called even if cancelled
89
- angular.element(slideElement).removeClass('is-sliding-out-' + direction)
90
- })
91
- }
92
-
93
- function animateIn(slideElement, direction) {
94
- $animate.addClass(slideElement, 'is-sliding-in-' + direction).then(() => {
95
- // this will still be called even if cancelled
96
- angular.element(slideElement).removeClass('is-sliding-in-' + direction)
97
- })
98
- }
99
- }
100
- }
101
- }])
@@ -1 +0,0 @@
1
- import './time-conversion-factory'
@@ -1,114 +0,0 @@
1
- import angular from 'angular'
2
- import _ from 'lodash'
3
-
4
- angular.module('app').factory('timeConversionFactory', function timeConversionFactory() {
5
-
6
- // Takes a number of seconds
7
- // Returns a string representing that time in 'h:mm:ss' format
8
- // The result is padded with zeroes and floored to nearest second
9
- const secondsToHmsString = (seconds) => {
10
-
11
- const prependZero = (str: string) => `0${str}`
12
-
13
- // Filter weird inputs
14
- if (_(seconds).isFinite() === false) {
15
- return undefined
16
- }
17
-
18
- if (seconds < 0) {
19
- return undefined
20
- }
21
-
22
- seconds = Math.floor(seconds)
23
-
24
- const hours = parseInt(`${(seconds / 3600) % 24}`, 10)
25
- const minutes = parseInt(`${(seconds / 60) % 60}`, 10)
26
- const secondsOnly = parseInt(`${(seconds % 60)}`, 10)
27
-
28
- let hoursString = ''
29
- if (hours > 0) {
30
- hoursString = hours + ':'
31
-
32
- if (hours < 10) {
33
- hoursString = prependZero(hoursString)
34
- }
35
- }
36
-
37
- let minutesString = minutes + ':'
38
- if (minutes < 10) {
39
- minutesString = prependZero(minutesString)
40
- }
41
-
42
- let secondsString = secondsOnly.toString()
43
- if (secondsOnly < 10) {
44
- secondsString = prependZero(secondsString)
45
- }
46
-
47
-
48
- return hoursString + minutesString + secondsString
49
- }
50
-
51
- // Takes a string in 'h:mm:ss' format
52
- // Returns a number of seconds representing that time
53
- // Fractional seconds are discarded
54
- const hmsStringToSeconds = (hmsString) => {
55
-
56
- // Filter weird inputs
57
- if (_(hmsString).isString() === false) {
58
- return undefined
59
- }
60
-
61
- const hmsSplit = hmsString.split(':').reverse()
62
- let seconds
63
-
64
- seconds = parseInt((hmsSplit[0]), 10)
65
-
66
- if (hmsSplit.length > 1 && hmsSplit[1].length > 0) {
67
- seconds += parseInt(hmsSplit[1], 10) * 60
68
- }
69
- if (hmsSplit.length > 2 && hmsSplit[2].length > 0) {
70
- seconds += parseInt(hmsSplit[2], 10) * 3600
71
- }
72
-
73
- return seconds
74
- }
75
-
76
-
77
-
78
- // Takes a number of seconds
79
- // Returns a string representing that time in 'h:mm:ss.sss' format
80
- // Where .sss is thousandths of a second
81
- const secondsToHmSubsecondsString = (totalSec) => {
82
-
83
- // Filter weird inputs
84
- if (_(totalSec).isFinite() === false) {
85
- return undefined
86
- }
87
-
88
- if (totalSec < 0) {
89
- return undefined
90
- }
91
-
92
- const hours = parseInt(`${totalSec / 3600}`, 10) % 24
93
- const minutes = parseInt(`${totalSec / 60}`, 10) % 60
94
- const seconds = parseInt(`${totalSec % 60}`, 10)
95
- const subSeconds = totalSec - parseInt(totalSec, 10)
96
-
97
- let subSecondsStr = parseFloat(`${subSeconds}`).toFixed(3)
98
- subSecondsStr = (subSecondsStr + '').substring(1)
99
- const result = (hours === 0 ? '' : (hours < 10 ? '0' + hours + ':' : hours + ':')) +
100
- (minutes < 10 ? '0' + minutes : minutes) + ':' + (seconds < 10 ? '0' + seconds : seconds) + subSecondsStr
101
-
102
- return result
103
- }
104
-
105
- // API
106
- // ------------------------------------------
107
- const factory = {
108
- hmsStringToSeconds,
109
- secondsToHmSubsecondsString,
110
- secondsToHmsString
111
- }
112
-
113
- return factory
114
- })