@kalisio/kdk 1.6.0 → 1.7.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 (188) hide show
  1. package/.travis.test.sh +1 -1
  2. package/CHANGELOG.md +63 -13
  3. package/extras/tours/map/catalog-panel.js +61 -10
  4. package/extras/tours/map/create-view.js +25 -0
  5. package/extras/tours/map/fab.js +10 -1
  6. package/extras/tours/map/navigation-bar.js +7 -9
  7. package/lib/core/api/application.js +9 -1
  8. package/lib/core/api/application.js.map +1 -1
  9. package/lib/core/client/components/chart/KChart.vue +115 -0
  10. package/lib/core/client/components/chart/KStatsChart.vue +76 -0
  11. package/lib/core/client/components/chart/index.js +20 -0
  12. package/lib/core/client/components/chart/index.js.map +1 -0
  13. package/lib/core/client/components/collection/KFilter.vue +6 -0
  14. package/lib/core/client/components/collection/KHistoryEntry.vue +1 -1
  15. package/lib/core/client/components/collection/KItem.vue +4 -4
  16. package/lib/core/client/components/form/KChipsField.vue +4 -4
  17. package/lib/core/client/components/form/KView.vue +1 -1
  18. package/lib/core/client/components/frame/KAction.vue +40 -5
  19. package/lib/core/client/components/frame/KBlock.vue +7 -7
  20. package/lib/core/client/components/frame/KContent.vue +1 -1
  21. package/lib/core/client/components/frame/KOpener.vue +1 -1
  22. package/lib/core/client/components/frame/KPanel.vue +8 -7
  23. package/lib/core/client/components/frame/KPopupAction.vue +6 -0
  24. package/lib/core/client/components/frame/KScreen.vue +1 -1
  25. package/lib/core/client/components/frame/KStamp.vue +4 -2
  26. package/lib/core/client/components/frame/index.js +1 -6
  27. package/lib/core/client/components/frame/index.js.map +1 -1
  28. package/lib/core/client/components/input/KIconChooser.vue +5 -2
  29. package/lib/core/client/components/input/KPalette.vue +1 -1
  30. package/lib/core/client/components/input/index.js +14 -4
  31. package/lib/core/client/components/input/index.js.map +1 -1
  32. package/lib/core/client/components/layout/KFab.vue +1 -1
  33. package/lib/core/client/components/layout/KLayout.vue +10 -2
  34. package/lib/core/client/components/layout/KPage.vue +19 -18
  35. package/lib/core/client/components/layout/KTour.vue +5 -3
  36. package/lib/core/client/components/layout/KWindow.vue +211 -59
  37. package/lib/core/client/components/media/KMediaBrowser.vue +6 -6
  38. package/lib/core/client/components/menu/KMenu.vue +13 -5
  39. package/lib/core/client/components/menu/KRadialFab.vue +22 -24
  40. package/lib/core/client/components/menu/KRadialFabItem.vue +17 -18
  41. package/lib/core/client/components/team/KGroupsActivity.vue +1 -1
  42. package/lib/core/client/components/team/KJoinGroup.vue +2 -2
  43. package/lib/core/client/components/time/KAbsoluteTimeRange.vue +190 -0
  44. package/lib/core/client/components/time/KRelativeTimeRanges.vue +192 -0
  45. package/lib/core/client/components/time/index.js +20 -0
  46. package/lib/core/client/components/time/index.js.map +1 -0
  47. package/lib/core/client/i18n/core_en.json +35 -12
  48. package/lib/core/client/i18n/core_fr.json +36 -13
  49. package/lib/core/client/index.js +1 -1
  50. package/lib/core/client/index.js.map +1 -1
  51. package/lib/core/client/mixins/mixin.base-collection.js +11 -1
  52. package/lib/core/client/mixins/mixin.base-collection.js.map +1 -1
  53. package/lib/core/client/mixins/mixin.base-widget.js +25 -13
  54. package/lib/core/client/mixins/mixin.base-widget.js.map +1 -1
  55. package/lib/core/client/services/index.js +2 -1
  56. package/lib/core/client/services/index.js.map +1 -1
  57. package/lib/core/client/services/local-settings.service.js +4 -0
  58. package/lib/core/client/services/local-settings.service.js.map +1 -1
  59. package/lib/core/client/time.js +25 -15
  60. package/lib/core/client/time.js.map +1 -1
  61. package/lib/core/client/units.js +12 -0
  62. package/lib/core/client/units.js.map +1 -1
  63. package/lib/core/client/utils.js +11 -0
  64. package/lib/core/client/utils.js.map +1 -1
  65. package/lib/core/common/schemas/settings.update.json +14 -4
  66. package/lib/map/api/hooks/hooks.catalog.js +20 -0
  67. package/lib/map/api/hooks/hooks.catalog.js.map +1 -1
  68. package/lib/map/api/models/catalog.model.mongodb.js +6 -1
  69. package/lib/map/api/models/catalog.model.mongodb.js.map +1 -1
  70. package/lib/map/api/models/features.model.mongodb.js +5 -0
  71. package/lib/map/api/models/features.model.mongodb.js.map +1 -1
  72. package/lib/map/api/services/catalog/catalog.hooks.js +3 -1
  73. package/lib/map/api/services/catalog/catalog.hooks.js.map +1 -1
  74. package/lib/map/client/components/KColorLegend.vue +22 -21
  75. package/lib/map/client/components/KFeaturesChart.vue +81 -110
  76. package/lib/map/client/components/KLayerStyleForm.vue +119 -47
  77. package/lib/map/client/components/KLevelSlider.vue +30 -29
  78. package/lib/map/client/components/KLocationMap.vue +2 -2
  79. package/lib/map/client/components/KMeasureTool.vue +30 -6
  80. package/lib/map/client/components/KPositionIndicator.vue +4 -4
  81. package/lib/map/client/components/KTimeline.vue +25 -27
  82. package/lib/map/client/components/KTimezoneMap.vue +156 -0
  83. package/lib/map/client/components/KUrlLegend.vue +11 -10
  84. package/lib/map/client/components/catalog/KBaseLayersSelector.vue +1 -1
  85. package/lib/map/client/components/catalog/KCatalogLayersPanel.vue +56 -0
  86. package/lib/map/client/components/catalog/KCreateView.vue +91 -0
  87. package/lib/map/client/components/catalog/KLayerCategories.vue +2 -1
  88. package/lib/map/client/components/catalog/{KCatalog.vue → KLayersPanel.vue} +19 -37
  89. package/lib/map/client/components/catalog/KUserLayersPanel.vue +40 -0
  90. package/lib/map/client/components/catalog/KViewSelector.vue +46 -0
  91. package/lib/map/client/components/catalog/KViewsPanel.vue +110 -0
  92. package/lib/map/client/components/catalog/KWeatherLayersSelector.vue +4 -13
  93. package/lib/map/client/components/form/KTimezoneField.vue +135 -0
  94. package/lib/map/client/components/widget/KElevationProfile.vue +488 -0
  95. package/lib/map/client/components/widget/KInformationBox.vue +48 -23
  96. package/lib/map/client/components/widget/KMapillaryViewer.vue +26 -20
  97. package/lib/map/client/components/widget/KTimeSeries.vue +267 -347
  98. package/lib/map/client/i18n/map_en.json +63 -40
  99. package/lib/map/client/i18n/map_fr.json +65 -42
  100. package/lib/map/client/leaflet/GradientPath.js +40 -19
  101. package/lib/map/client/leaflet/GradientPath.js.map +1 -1
  102. package/lib/map/client/leaflet/TiledFeatureLayer.js +527 -93
  103. package/lib/map/client/leaflet/TiledFeatureLayer.js.map +1 -1
  104. package/lib/map/client/leaflet/TiledMeshLayer.js +58 -35
  105. package/lib/map/client/leaflet/TiledMeshLayer.js.map +1 -1
  106. package/lib/map/client/leaflet/utils.js +44 -3
  107. package/lib/map/client/leaflet/utils.js.map +1 -1
  108. package/lib/map/client/mixins/globe/mixin.base-globe.js +16 -1
  109. package/lib/map/client/mixins/globe/mixin.base-globe.js.map +1 -1
  110. package/lib/map/client/mixins/globe/mixin.file-layers.js +12 -2
  111. package/lib/map/client/mixins/globe/mixin.file-layers.js.map +1 -1
  112. package/lib/map/client/mixins/globe/mixin.geojson-layers.js +7 -6
  113. package/lib/map/client/mixins/globe/mixin.geojson-layers.js.map +1 -1
  114. package/lib/map/client/mixins/globe/mixin.popup.js +4 -2
  115. package/lib/map/client/mixins/globe/mixin.popup.js.map +1 -1
  116. package/lib/map/client/mixins/globe/mixin.style.js +8 -4
  117. package/lib/map/client/mixins/globe/mixin.style.js.map +1 -1
  118. package/lib/map/client/mixins/globe/mixin.tooltip.js +4 -2
  119. package/lib/map/client/mixins/globe/mixin.tooltip.js.map +1 -1
  120. package/lib/map/client/mixins/index.js +23 -18
  121. package/lib/map/client/mixins/index.js.map +1 -1
  122. package/lib/map/client/mixins/map/mixin.base-map.js +20 -2
  123. package/lib/map/client/mixins/map/mixin.base-map.js.map +1 -1
  124. package/lib/map/client/mixins/map/mixin.edit-layers.js +8 -4
  125. package/lib/map/client/mixins/map/mixin.edit-layers.js.map +1 -1
  126. package/lib/map/client/mixins/map/mixin.geojson-layers.js +27 -5
  127. package/lib/map/client/mixins/map/mixin.geojson-layers.js.map +1 -1
  128. package/lib/map/client/mixins/map/mixin.heatmap-layers.js +6 -1
  129. package/lib/map/client/mixins/map/mixin.heatmap-layers.js.map +1 -1
  130. package/lib/map/client/mixins/map/mixin.popup.js +1 -1
  131. package/lib/map/client/mixins/map/mixin.popup.js.map +1 -1
  132. package/lib/map/client/mixins/map/mixin.style.js +8 -4
  133. package/lib/map/client/mixins/map/mixin.style.js.map +1 -1
  134. package/lib/map/client/mixins/map/mixin.tiled-mesh-layers.js +4 -11
  135. package/lib/map/client/mixins/map/mixin.tiled-mesh-layers.js.map +1 -1
  136. package/lib/map/client/mixins/map/mixin.tiled-wind-layers.js +0 -11
  137. package/lib/map/client/mixins/map/mixin.tiled-wind-layers.js.map +1 -1
  138. package/lib/map/client/mixins/map/mixin.tooltip.js +1 -1
  139. package/lib/map/client/mixins/map/mixin.tooltip.js.map +1 -1
  140. package/lib/map/client/mixins/mixin.activity.js +150 -150
  141. package/lib/map/client/mixins/mixin.activity.js.map +1 -1
  142. package/lib/map/client/mixins/mixin.catalog-panel.js +36 -0
  143. package/lib/map/client/mixins/mixin.catalog-panel.js.map +1 -0
  144. package/lib/map/client/mixins/mixin.feature-selection.js +17 -8
  145. package/lib/map/client/mixins/mixin.feature-selection.js.map +1 -1
  146. package/lib/map/client/mixins/mixin.feature-service.js +36 -16
  147. package/lib/map/client/mixins/mixin.feature-service.js.map +1 -1
  148. package/lib/map/client/mixins/mixin.infobox.js +1 -1
  149. package/lib/map/client/mixins/mixin.infobox.js.map +1 -1
  150. package/lib/map/client/mixins/mixin.levels.js +26 -12
  151. package/lib/map/client/mixins/mixin.levels.js.map +1 -1
  152. package/lib/map/client/mixins/mixin.style.js +1 -0
  153. package/lib/map/client/mixins/mixin.style.js.map +1 -1
  154. package/lib/map/client/mixins/mixin.weacast.js +15 -23
  155. package/lib/map/client/mixins/mixin.weacast.js.map +1 -1
  156. package/lib/map/client/pixi-utils.js +8 -177
  157. package/lib/map/client/pixi-utils.js.map +1 -1
  158. package/lib/map/client/utils.js +1 -0
  159. package/lib/map/client/utils.js.map +1 -1
  160. package/lib/map/common/grid.js +131 -0
  161. package/lib/map/common/grid.js.map +1 -1
  162. package/lib/map/common/index.js +22 -11
  163. package/lib/map/common/index.js.map +1 -1
  164. package/lib/map/common/meteo-model-grid-source.js +5 -2
  165. package/lib/map/common/meteo-model-grid-source.js.map +1 -1
  166. package/lib/map/common/time-based-grid-source.js +5 -2
  167. package/lib/map/common/time-based-grid-source.js.map +1 -1
  168. package/lib/test/client/core/collection.js +31 -13
  169. package/lib/test/client/core/collection.js.map +1 -1
  170. package/lib/test/client/core/layout.js +137 -49
  171. package/lib/test/client/core/layout.js.map +1 -1
  172. package/lib/test/client/core/utils.js +89 -22
  173. package/lib/test/client/core/utils.js.map +1 -1
  174. package/lib/test/client/map/catalog.js +134 -41
  175. package/lib/test/client/map/catalog.js.map +1 -1
  176. package/lib/test/client/map/controls.js +7 -4
  177. package/lib/test/client/map/controls.js.map +1 -1
  178. package/lib/test/client/map/index.js +12 -0
  179. package/lib/test/client/map/index.js.map +1 -1
  180. package/lib/test/client/map/utils.js +67 -0
  181. package/lib/test/client/map/utils.js.map +1 -0
  182. package/package.json +5 -5
  183. package/extras/tours/map/favorite-views.js +0 -53
  184. package/lib/core/client/components/frame/KChart.vue +0 -60
  185. package/lib/core/client/components/input/KCodeInput.vue +0 -50
  186. package/lib/core/client/components/input/KTimeRangeChooser.vue +0 -109
  187. package/lib/core/client/components/time/KTimeRange.vue +0 -144
  188. package/lib/map/client/components/KFavoriteViews.vue +0 -217
@@ -0,0 +1,190 @@
1
+ <template>
2
+ <div class="row justify-start items-center q-pl-sm q-pr-sm no-wrap">
3
+ <div id="start-date" class="k-datetime text-body2">
4
+ {{ formattedStartDate }}
5
+ <q-tooltip>{{ $t('KAbsoluteTimeRange.PICK_START_DATE_LABEL') }}</q-tooltip>
6
+ <q-popup-proxy ref="popup" transition-show="scale" transition-hide="scale">
7
+ <q-date
8
+ id="start-date-popup"
9
+ v-model="startDate"
10
+ mask="DD/MM/YYYY"
11
+ :title="startDate"
12
+ @input="onTimeRangeChanged"
13
+ :options="checkStartDate" />
14
+ </q-popup-proxy>
15
+ </div>
16
+ <div>&nbsp;</div>
17
+ <div id="start-time" class="k-datetime text-body2">
18
+ {{ formattedStartTime }}
19
+ <q-tooltip>{{ $t('KAbsoluteTimeRange.PICK_START_TIME_LABEL') }}</q-tooltip>
20
+ <q-popup-proxy ref="popup" transition-show="scale" transition-hide="scale">
21
+ <q-time
22
+ id="start-time-popup"
23
+ v-model="startTime"
24
+ mask="HH:mm"
25
+ @input="onTimeRangeChanged"
26
+ :options="checkStartTime" />
27
+ </q-popup-proxy>
28
+ </div>
29
+ <div>&nbsp;-&nbsp;</div>
30
+ <div id="end-date" class="k-datetime text-body2">
31
+ {{ formattedEndDate }}
32
+ <q-tooltip>{{ $t('KAbsoluteTimeRange.PICK_END_DATE_LABEL') }}</q-tooltip>
33
+ <q-popup-proxy ref="popup" transition-show="scale" transition-hide="scale">
34
+ <q-date
35
+ id="end-date-popup"
36
+ v-model="endDate"
37
+ mask="DD/MM/YYYY"
38
+ :title="endDate"
39
+ @input="onTimeRangeChanged"
40
+ :options="checkEndDate" />
41
+ </q-popup-proxy>
42
+ </div>
43
+ <div>&nbsp;</div>
44
+ <div id="end-time" class="k-datetime text-body2">
45
+ {{ formattedEndTime }}
46
+ <q-tooltip>{{ $t('KAbsoluteTimeRange.PICK_END_TIME_LABEL') }}</q-tooltip>
47
+ <q-popup-proxy ref="popup" transition-show="scale" transition-hide="scale">
48
+ <q-time
49
+ id="end-time-popup"
50
+ v-model="endTime"
51
+ mask="HH:mm"
52
+ @input="onTimeRangeChanged"
53
+ :options="checkEndTime" />
54
+ </q-popup-proxy>
55
+ </div>
56
+ </div>
57
+ </template>
58
+
59
+ <script>
60
+ import moment from 'moment'
61
+ import { Time } from '../../time'
62
+
63
+ export default {
64
+ name: 'k-absolute-time-range',
65
+ props: {
66
+ dense: {
67
+ type: Boolean,
68
+ default: false
69
+ }
70
+ },
71
+ computed: {
72
+ formattedStartDate () {
73
+ return Time.format(this.range.start, 'date.short')
74
+ },
75
+ startDate: {
76
+ get: function () {
77
+ return this.range.start.format('DD/MM/YYYY')
78
+ },
79
+ set: function (value) {
80
+ const date = moment(value, 'DD/MM/YYYY')
81
+ this.range = {
82
+ start: this.range.start.set({ year: date.year(), month: date.month(), date: date.date() }),
83
+ end: this.range.end
84
+ }
85
+ }
86
+ },
87
+ formattedStartTime () {
88
+ return Time.format(this.range.start, 'time.long')
89
+ },
90
+ startTime: {
91
+ get: function () {
92
+ return this.range.start.format('HH:mm')
93
+ },
94
+ set: function (value) {
95
+ const time = moment(value, 'HH:mm')
96
+ this.range = {
97
+ start: this.range.start.set({ hour: time.hour(), minute: time.minute() }),
98
+ end: this.range.end
99
+ }
100
+ }
101
+ },
102
+ formattedEndDate () {
103
+ return Time.format(this.range.end, 'date.short')
104
+ },
105
+ endDate: {
106
+ get: function () {
107
+ return this.range.end.format('DD/MM/YYYY')
108
+ },
109
+ set: function (value) {
110
+ const date = moment(value, 'DD/MM')
111
+ this.range = {
112
+ start: this.range.start,
113
+ end: this.range.end.set({ month: date.month(), date: date.date() })
114
+ }
115
+ }
116
+ },
117
+ formattedEndTime () {
118
+ return Time.format(this.range.end, 'time.long')
119
+ },
120
+ endTime: {
121
+ get: function () {
122
+ return this.range.end.format('HH:mm')
123
+ },
124
+ set: function (value) {
125
+ const time = moment(value, 'HH:mm')
126
+ this.range = {
127
+ start: this.range.start,
128
+ end: this.range.end.set({ hour: time.hour(), minute: time.minute() })
129
+ }
130
+ }
131
+ }
132
+ },
133
+ data () {
134
+ return {
135
+ range: Time.getRange()
136
+ }
137
+ },
138
+ methods: {
139
+ checkStartDate (date) {
140
+ const dateToCheck = moment({
141
+ year: date.substring(0, 4),
142
+ month: date.substring(5, 7) - 1,
143
+ date: date.substring(8, 10),
144
+ hour: this.range.start.hour(),
145
+ minute: this.range.start.minute()
146
+ }).utc()
147
+ return dateToCheck.isBefore(this.range.end)
148
+ },
149
+ checkStartTime (hour, minute) {
150
+ const timeToCheck = moment({
151
+ year: this.range.start.year(),
152
+ month: this.range.start.month(),
153
+ date: this.range.start.date(),
154
+ hour: hour,
155
+ minute: minute
156
+ }).utc()
157
+ return timeToCheck.isBefore(this.range.end)
158
+ },
159
+ checkEndDate (date) {
160
+ const dateToCheck = moment({
161
+ year: date.substring(0, 4),
162
+ month: date.substring(5, 7) - 1,
163
+ date: date.substring(8, 10),
164
+ hour: this.range.end.hour(),
165
+ minute: this.range.end.minute()
166
+ }).utc()
167
+ return dateToCheck.isAfter(this.range.start)
168
+ },
169
+ checkEndTime (hour, minute) {
170
+ const timeToCheck = moment({
171
+ year: this.range.end.year(),
172
+ month: this.range.end.month(),
173
+ date: this.range.end.date(),
174
+ hour: hour,
175
+ minute: minute
176
+ }).utc()
177
+ return timeToCheck.isAfter(this.range.start)
178
+ },
179
+ onTimeRangeChanged () {
180
+ Time.patchRange({ start: this.range.start, end: this.range.end })
181
+ }
182
+ }
183
+ }
184
+ </script>
185
+
186
+ <style lang="scss">
187
+ .k-datetime:hover {
188
+ cursor: pointer;
189
+ }
190
+ </style>
@@ -0,0 +1,192 @@
1
+ <template>
2
+ <k-panel
3
+ id="time-ranges"
4
+ :content="content"
5
+ action-renderer="item"
6
+ :dense="dense"
7
+ direction="vertical" />
8
+ </template>
9
+
10
+ <script>
11
+ import _ from 'lodash'
12
+ import moment from 'moment'
13
+ import { Time } from '../../time'
14
+ import KPanel from '../frame/KPanel.vue'
15
+
16
+ export default {
17
+ name: 'k-relative-time-ranges',
18
+ components: {
19
+ KPanel
20
+ },
21
+ props: {
22
+ ranges: {
23
+ type: Array,
24
+ default: () => []
25
+ },
26
+ dense: {
27
+ type: Boolean,
28
+ default: false
29
+ }
30
+ },
31
+ computed: {
32
+ content () {
33
+ return _.filter(this.defaultRanges, range => {
34
+ return _.indexOf(this.ranges, range.id) > -1
35
+ })
36
+ }
37
+ },
38
+ methods: {
39
+ rangeTriggered (duration) {
40
+ const end = moment(Time.getCurrentTime())
41
+ const start = moment(Time.getCurrentTime()).add(duration)
42
+ // Revert range if duration in past
43
+ if (duration.asMilliseconds() > 0) Time.patchRange({ start: end, end: start })
44
+ else Time.patchRange({ start: start, end: end })
45
+ }
46
+ },
47
+ created () {
48
+ this.defaultRanges = [
49
+ {
50
+ id: 'last-hour',
51
+ label: 'KRelativeTimeRanges.LAST_HOUR_LABEL',
52
+ handler: () => this.rangeTriggered(moment.duration(-1, 'hours'))
53
+ },
54
+ {
55
+ id: 'next-hour',
56
+ label: 'KRelativeTimeRanges.NEXT_HOUR_LABEL',
57
+ handler: () => this.rangeTriggered(moment.duration(1, 'hours'))
58
+ },
59
+ {
60
+ id: 'last-2-hours',
61
+ label: 'KRelativeTimeRanges.LAST_2_HOURS_LABEL',
62
+ handler: () => this.rangeTriggered(moment.duration(-2, 'hours'))
63
+ },
64
+ {
65
+ id: 'next-2-hours',
66
+ label: 'KRelativeTimeRanges.NEXT_2_HOURS_LABEL',
67
+ handler: () => this.rangeTriggered(moment.duration(2, 'hours'))
68
+ },
69
+ {
70
+ id: 'last-3-hours',
71
+ label: 'KRelativeTimeRanges.LAST_3_HOURS_LABEL',
72
+ handler: () => this.rangeTriggered(moment.duration(-3, 'hours'))
73
+ },
74
+ {
75
+ id: 'next-3-hours',
76
+ label: 'KRelativeTimeRanges.NEXT_3_HOURS_LABEL',
77
+ handler: () => this.rangeTriggered(moment.duration(3, 'hours'))
78
+ },
79
+ {
80
+ id: 'last-6-hours',
81
+ label: 'KRelativeTimeRanges.LAST_6_HOURS_LABEL',
82
+ handler: () => this.rangeTriggered(moment.duration(-6, 'hours'))
83
+ },
84
+ {
85
+ id: 'next-6-hours',
86
+ label: 'KRelativeTimeRanges.NEXT_6_HOURS_LABEL',
87
+ handler: () => this.rangeTriggered(moment.duration(6, 'hours'))
88
+ },
89
+ {
90
+ id: 'last-12-hours',
91
+ label: 'KRelativeTimeRanges.LAST_12_HOURS_LABEL',
92
+ handler: () => this.rangeTriggered(moment.duration(-12, 'hours'))
93
+ },
94
+ {
95
+ id: 'next-12-hours',
96
+ label: 'KRelativeTimeRanges.NEXT_12_HOURS_LABEL',
97
+ handler: () => this.rangeTriggered(moment.duration(12, 'hours'))
98
+ },
99
+ {
100
+ id: 'last-day',
101
+ label: 'KRelativeTimeRanges.LAST_DAY_LABEL',
102
+ handler: () => this.rangeTriggered(moment.duration(-1, 'days'))
103
+ },
104
+ {
105
+ id: 'next-day',
106
+ label: 'KRelativeTimeRanges.NEXT_DAY_LABEL',
107
+ handler: () => this.rangeTriggered(moment.duration(1, 'days'))
108
+ },
109
+ {
110
+ id: 'last-2-days',
111
+ label: 'KRelativeTimeRanges.LAST_2_DAYS_LABEL',
112
+ handler: () => this.rangeTriggered(moment.duration(-2, 'days'))
113
+ },
114
+ {
115
+ id: 'next-2-days',
116
+ label: 'KRelativeTimeRanges.NEXT_2_DAYS_LABEL',
117
+ handler: () => this.rangeTriggered(moment.duration(2, 'days'))
118
+ },
119
+ {
120
+ id: 'last-3-days',
121
+ label: 'KRelativeTimeRanges.LAST_3_DAYS_LABEL',
122
+ handler: () => this.rangeTriggered(moment.duration(-3, 'days'))
123
+ },
124
+ {
125
+ id: 'next-3-days',
126
+ label: 'KRelativeTimeRanges.NEXT_3_DAYS_LABEL',
127
+ handler: () => this.rangeTriggered(moment.duration(3, 'days'))
128
+ },
129
+ {
130
+ id: 'last-week',
131
+ label: 'KRelativeTimeRanges.LAST_WEEK_LABEL',
132
+ handler: () => this.rangeTriggered(moment.duration(-1, 'weeks'))
133
+ },
134
+ {
135
+ id: 'next-week',
136
+ label: 'KRelativeTimeRanges.NEXT_WEEK_LABEL',
137
+ handler: () => this.rangeTriggered(moment.duration(1, 'weeks'))
138
+ },
139
+ {
140
+ id: 'last-2-weeks',
141
+ label: 'KRelativeTimeRanges.LAST_2_WEEKS_LABEL',
142
+ handler: () => this.rangeTriggered(moment.duration(-2, 'weeks'))
143
+ },
144
+ {
145
+ id: 'next-2-weeks',
146
+ label: 'KRelativeTimeRanges.NEXT_2_WEEKS_LABEL',
147
+ handler: () => this.rangeTriggered(moment.duration(2, 'weeks'))
148
+ },
149
+ {
150
+ id: 'last-month',
151
+ label: 'KRelativeTimeRanges.LAST_MONTH_LABEL',
152
+ handler: () => this.rangeTriggered(moment.duration(-1, 'months'))
153
+ },
154
+ {
155
+ id: 'next-month',
156
+ label: 'KRelativeTimeRanges.NEXT_MONTH_LABEL',
157
+ handler: () => this.rangeTriggered(moment.duration(1, 'months'))
158
+ },
159
+ {
160
+ id: 'last-3-months',
161
+ label: 'KRelativeTimeRanges.LAST_3_MONTHS_LABEL',
162
+ handler: () => this.rangeTriggered(moment.duration(-3, 'months'))
163
+ },
164
+ {
165
+ id: 'next-3-months',
166
+ label: 'KRelativeTimeRanges.NEXT_3_MONTHS_LABEL',
167
+ handler: () => this.rangeTriggered(moment.duration(3, 'months'))
168
+ },
169
+ {
170
+ id: 'last-6-months',
171
+ label: 'KRelativeTimeRanges.LAST_6_MONTHS_LABEL',
172
+ handler: () => this.rangeTriggered(moment.duration(-6, 'months'))
173
+ },
174
+ {
175
+ id: 'next-6-months',
176
+ label: 'KRelativeTimeRanges.NEXT_6_MONTHS_LABEL',
177
+ handler: () => this.rangeTriggered(moment.duration(6, 'months'))
178
+ },
179
+ {
180
+ id: 'last-year',
181
+ label: 'KRelativeTimeRanges.LAST_YEAR_LABEL',
182
+ handler: () => this.rangeTriggered(moment.duration(-1, 'years'))
183
+ },
184
+ {
185
+ id: 'next-year',
186
+ label: 'KRelativeTimeRanges.NEXT_YEAR_LABEL',
187
+ handler: () => this.rangeTriggered(moment.duration(1, 'years'))
188
+ }
189
+ ]
190
+ }
191
+ }
192
+ </script>
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.KRelativeTimeRanges = exports.KAbsoluteTimeRange = undefined;
7
+
8
+ var _KAbsoluteTimeRange = require('./KAbsoluteTimeRange.vue');
9
+
10
+ var _KAbsoluteTimeRange2 = _interopRequireDefault(_KAbsoluteTimeRange);
11
+
12
+ var _KRelativeTimeRanges = require('./KRelativeTimeRanges.vue');
13
+
14
+ var _KRelativeTimeRanges2 = _interopRequireDefault(_KRelativeTimeRanges);
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
+
18
+ exports.KAbsoluteTimeRange = _KAbsoluteTimeRange2.default;
19
+ exports.KRelativeTimeRanges = _KRelativeTimeRanges2.default;
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../core/client/components/time/index.js"],"names":["KAbsoluteTimeRange","KRelativeTimeRanges"],"mappings":";;;;;;;AAAA;;;;AACA;;;;;;QAGEA,kB,GAAAA,4B;QACAC,mB,GAAAA,6B","file":"index.js","sourcesContent":["import KAbsoluteTimeRange from './KAbsoluteTimeRange.vue'\r\nimport KRelativeTimeRanges from './KRelativeTimeRanges.vue'\r\n\r\nexport {\r\n KAbsoluteTimeRange,\r\n KRelativeTimeRanges\r\n}\r\n"]}
@@ -73,8 +73,9 @@
73
73
  },
74
74
  "units": {
75
75
  "METER_SYMBOL": "m",
76
+ "FEET_SYMBOL": "ft",
76
77
  "MILE_SYMBOL": "mi",
77
- "NAUTICAL_MILE_SYMBOL": "m",
78
+ "NAUTICAL_MILE_SYMBOL": "NM",
78
79
  "SQUARED_METER_SYMBOL": "m²",
79
80
  "SQUARED_KILOMETER_SYMBOL": "km²",
80
81
  "ACRE_SYMBOL": "a",
@@ -88,6 +89,7 @@
88
89
  "DEGREE_SYMBOL": "°",
89
90
  "RADIAN_SYMBOL": "rad",
90
91
  "METER_LABEL": "Meters",
92
+ "FEET_LABEL": "Feet",
91
93
  "MILE_LABEL": "Miles",
92
94
  "NAUTICAL_MILE_LABEL": "Nautical miles",
93
95
  "SQUARED_METER_LABEL": "Squared meters",
@@ -141,9 +143,10 @@
141
143
  "TIME_FORMAT_SHORT_YEAR_FIELD_HELPER": "<a target='_blank' href='https://momentjs.com/docs/#/displaying/format/'>&#x1F6C8;</a>",
142
144
  "TIME_FORMAT_LONG_YEAR_FIELD_LABEL": "Long year format",
143
145
  "TIME_FORMAT_LONG_YEAR_FIELD_HELPER": "<a target='_blank' href='https://momentjs.com/docs/#/displaying/format/'>&#x1F6C8;</a>",
144
- "TIME_FORMAT_UTC_FIELD_LABEL": "UTC time display mode",
146
+ "TIME_FORMAT_TIMEZONE_FIELD_LABEL": "Target timezone to use",
145
147
  "UNITS_SETTINGS": "Units settings",
146
148
  "LENGTH_FIELD_LABEL": "Default length unit",
149
+ "ALTITUDE_FIELD_LABEL": "Default altitude unit",
147
150
  "AREA_FIELD_LABEL": "Default area unit",
148
151
  "VELOCITY_FIELD_LABEL": "Default velocity unit",
149
152
  "TEMPERATURE_FIELD_LABEL": "Default temperature unit",
@@ -530,11 +533,6 @@
530
533
  "writing": "writing"
531
534
  }
532
535
  },
533
- "KTimeRangeChooser": {
534
- "TIME_RANGE": "From {{- min}} to {{- max}}",
535
- "FROM_DATE": "From",
536
- "TO_DATE": "To"
537
- },
538
536
  "KTagField": {
539
537
  "CREATE_TAG": "Create <b>c</b>"
540
538
  },
@@ -558,7 +556,8 @@
558
556
  },
559
557
  "KWindow": {
560
558
  "CLOSE_ACTION": "$t(CLOSE)",
561
- "MINIMIZE_ACTION": "Minimize",
559
+ "PIN_ACTION": "Pin",
560
+ "RESTORE_ACTION": "Restore",
562
561
  "MAXIMIZE_ACTION": "Maximize"
563
562
  },
564
563
  "KAbout": {
@@ -784,11 +783,18 @@
784
783
  "KSorter": {
785
784
  "SORT": "Sort"
786
785
  },
787
- "KTimeRange": {
788
- "START_LABEL": "From",
786
+ "KAbsoluteTimeRange": {
789
787
  "PICK_START_DATE_LABEL": "Update start date",
790
- "END_LABEL": "to",
788
+ "PICK_START_TIME_LABEL": "Update start time",
791
789
  "PICK_END_DATE_LABEL": "Update end date",
790
+ "PICK_END_TIME_LABEL": "Update end time"
791
+ },
792
+ "KRelativeTimeRanges": {
793
+ "LAST_HOUR": "Last hour",
794
+ "LAST_2_HOURS": "Last 2 hours",
795
+ "LAST_3_HOURS": "Last 3 hours",
796
+ "LAST_6_HOURS": "Last 6 hours",
797
+ "LAST_12_HOURS": "Last 12 hours",
792
798
  "LAST_DAY_LABEL": "Last day",
793
799
  "LAST_2_DAYS_LABEL": "Last 2 days",
794
800
  "LAST_3_DAYS_LABEL": "Last 3 days",
@@ -797,6 +803,23 @@
797
803
  "LAST_MONTH_LABEL": "Last month",
798
804
  "LAST_3_MONTHS_LABEL": "Last 3 months",
799
805
  "LAST_6_MONTHS_LABEL": "Last 6 months",
800
- "LAST_YEAR_LABEL": "Last year"
806
+ "LAST_YEAR_LABEL": "Last year",
807
+ "NEXT_HOUR": "Next hour",
808
+ "NEXT_2_HOURS": "Next 2 hours",
809
+ "NEXT_3_HOURS": "Next 3 hours",
810
+ "NEXT_6_HOURS": "Next 6 hours",
811
+ "NEXT_12_HOURS": "Next 12 hours",
812
+ "NEXT_DAY_LABEL": "Next day",
813
+ "NEXT_2_DAYS_LABEL": "Next 2 days",
814
+ "NEXT_3_DAYS_LABEL": "Next 3 days",
815
+ "NEXT_WEEK_LABEL": "Next week",
816
+ "NEXT_2_WEEKS_LABEL": "Next 2 weeks",
817
+ "NEXT_MONTH_LABEL": "Next month",
818
+ "NEXT_3_MONTHS_LABEL": "Next 3 months",
819
+ "NEXT_6_MONTHS_LABEL": "Next 6 months",
820
+ "NEXT_YEAR_LABEL": "Next year"
821
+ },
822
+ "KChart": {
823
+ "NO_DATA_AVAILABLE": "No data available"
801
824
  }
802
825
  }
@@ -73,8 +73,9 @@
73
73
  },
74
74
  "units": {
75
75
  "METER_SYMBOL": "m",
76
+ "FEET_SYMBOL": "ft",
76
77
  "MILE_SYMBOL": "mi",
77
- "NAUTICAL_MILE_SYMBOL": "nm",
78
+ "NAUTICAL_MILE_SYMBOL": "NM",
78
79
  "SQUARED_METER_SYMBOL": "m²",
79
80
  "SQUARED_KILOMETER_SYMBOL": "km²",
80
81
  "ACRE_SYMBOL": "a",
@@ -88,6 +89,7 @@
88
89
  "DEGREE_SYMBOL": "°",
89
90
  "RADIAN_SYMBOL": "rad",
90
91
  "METER_LABEL": "Mètres",
92
+ "FEET_LABEL": "Pieds",
91
93
  "MILE_LABEL": "Milles",
92
94
  "NAUTICAL_MILE_LABEL": "Milles nautique",
93
95
  "SQUARED_METER_LABEL": "Mètres carrés",
@@ -141,9 +143,10 @@
141
143
  "TIME_FORMAT_SHORT_YEAR_FIELD_HELPER": "<a target='_blank' href='https://momentjs.com/docs/#/displaying/format/'>&#x1F6C8;</a>",
142
144
  "TIME_FORMAT_LONG_YEAR_FIELD_LABEL": "Format d'année complet",
143
145
  "TIME_FORMAT_LONG_YEAR_FIELD_HELPER": "<a target='_blank' href='https://momentjs.com/docs/#/displaying/format/'>&#x1F6C8;</a>",
144
- "TIME_FORMAT_UTC_FIELD_LABEL": "Mode d'affichage temporel UTC",
146
+ "TIME_FORMAT_TIMEZONE_FIELD_LABEL": "Fuseau horaire cible",
145
147
  "UNITS_SETTINGS": "Paramétrage des unités",
146
148
  "LENGTH_FIELD_LABEL": "Unité de longueur par défaut",
149
+ "ALTITUDE_FIELD_LABEL": "Unité d'altitude par défaut",
147
150
  "AREA_FIELD_LABEL": "Unité d'aire par défaut",
148
151
  "VELOCITY_FIELD_LABEL": "Unité de vitesse par défaut",
149
152
  "TEMPERATURE_FIELD_LABEL": "Unité de température par défaut",
@@ -530,11 +533,6 @@
530
533
  "writing" : "écriture"
531
534
  }
532
535
  },
533
- "KTimeRangeChooser": {
534
- "TIME_RANGE": "Du {{- min}} au {{- max}}",
535
- "FROM_DATE": "Depuis le",
536
- "TO_DATE": "Jusqu'au"
537
- },
538
536
  "KTagField": {
539
537
  "CREATE_TAG": "Créer <b>{{tag}}</b>"
540
538
  },
@@ -558,8 +556,9 @@
558
556
  },
559
557
  "KWindow": {
560
558
  "CLOSE_ACTION": "$t(CLOSE)",
561
- "MINIMIZE_ACTION": "Réduire",
562
- "MAXIMIZE_ACTION": "Agrandir"
559
+ "PIN_ACTION": "Epingler",
560
+ "RESTORE_ACTION": "Restaurer",
561
+ "MAXIMIZE_ACTION": "Maximiser"
563
562
  },
564
563
  "KAbout": {
565
564
  "SIDENAV": "A propos",
@@ -785,11 +784,18 @@
785
784
  "KSorter": {
786
785
  "SORT": "Trier"
787
786
  },
788
- "KTimeRange": {
789
- "START_LABEL": "Du",
787
+ "KAbsoluteTimeRange": {
790
788
  "PICK_START_DATE_LABEL": "Modifier la date de début",
791
- "END_LABEL": "au",
789
+ "PICK_START_TIME_LABEL": "Modifier l'heure de début",
792
790
  "PICK_END_DATE_LABEL": "Modifier la date de fin",
791
+ "PICK_END_TIME_LABEL": "Modifier l'heure de fin"
792
+ },
793
+ "KRelativeTimeRanges": {
794
+ "LAST_HOUR_LABEL": "Dernière heure",
795
+ "LAST_2_HOURS_LABEL": "Dernières 2 heures",
796
+ "LAST_3_HOURS_LABEL": "Dernières 3 heures",
797
+ "LAST_6_HOURS_LABEL": "Dernières 6 heures",
798
+ "LAST_12_HOURS_LABEL": "Dernières 12 heures",
793
799
  "LAST_DAY_LABEL": "Dernier jour",
794
800
  "LAST_2_DAYS_LABEL": "2 derniers jours",
795
801
  "LAST_3_DAYS_LABEL": "3 derniers jours",
@@ -798,7 +804,24 @@
798
804
  "LAST_MONTH_LABEL": "Dernier mois",
799
805
  "LAST_3_MONTHS_LABEL": "3 derniers mois",
800
806
  "LAST_6_MONTHS_LABEL": "6 derniers mois",
801
- "LAST_YEAR_LABEL": "Dernière année"
807
+ "LAST_YEAR_LABEL": "Dernière année",
808
+ "NEXT_HOUR_LABEL": "Prochaine heure",
809
+ "NEXT_2_HOURS_LABEL": "Prochaines 2 heures",
810
+ "NEXT_3_HOURS_LABEL": "Prochaines 3 heures",
811
+ "NEXT_6_HOURS_LABEL": "Prochaines 6 heures",
812
+ "NEXT_12_HOURS_LABEL": "Prochaines 12 heures",
813
+ "NEXT_DAY_LABEL": "Prochain jour",
814
+ "NEXT_2_DAYS_LABEL": "2 prochains jours",
815
+ "NEXT_3_DAYS_LABEL": "3 prochains jours",
816
+ "NEXT_WEEK_LABEL": "Derniere semaine",
817
+ "NEXT_2_WEEKS_LABEL": "2 dernières semaines",
818
+ "NEXT_MONTH_LABEL": "Prochain mois",
819
+ "NEXT_3_MONTHS_LABEL": "3 prochains mois",
820
+ "NEXT_6_MONTHS_LABEL": "6 prochains mois",
821
+ "NEXT_YEAR_LABEL": "Prochaine année"
822
+ },
823
+ "KChart": {
824
+ "NO_DATA_AVAILABLE": "Aucune donnée disponible"
802
825
  }
803
826
  }
804
827
 
@@ -233,7 +233,7 @@ function init() {
233
233
  _store.Store.set('rightPane', { content: null, mode: undefined, filter: {}, visible: false });
234
234
  _store.Store.set('bottomPane', { content: null, mode: undefined, filter: {}, visible: false });
235
235
  _store.Store.set('page', { content: null, mode: undefined, filter: {} });
236
- _store.Store.set('window', { current: '', widgets: [], filter: {} });
236
+ _store.Store.set('window', { widgets: [], filter: {}, position: [0, 0], size: [0, 0], current: '', widgetActions: [] });
237
237
  _store.Store.set('fab', { actions: [], filter: {} });
238
238
 
239
239
  // Listen to the 'patched' event on the users
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../core/client/index.js"],"names":["init","utils","mixins","hooks","api","logger","debug","Time","initialize","Units","configure","services","Layout","Filter","Sorter","Search","Store","set","content","mode","undefined","filter","visible","current","widgets","actions","users","getService","on","user","_id","get","patch","Reader","register","JSONReader","CSVReader","Platform","is","cordova","document","addEventListener","_","window","device","error","notifier","PushNotification","android","vibrate","sound","forceShow","ios","alert","badge","windows","data","registrationId","devicesService","update","uuid","toast","message","timeout","response"],"mappings":";;;;;;;;;AAuBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAdA;;AAeA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAvBA;;AAwBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAvBA;;AAwBA;AAAA;AAAA;AAAA;AAAA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,CAAO,eAAP;AAAA,oCAAwB,WAAMoC,QAAN,EAAkB;AACxC,cAAMN,iBAAiBtD,IAAIuB,UAAJ,CAAe,SAAf,CAAvB;AACA;AACA,YAAIgB,OAAOC,MAAP,IAAiBD,OAAOC,MAAP,CAAca,cAAnC,EAAmD;AACjD,gBAAMb,SAAS,MAAMc,eAAeC,MAAf,CAAsBhB,OAAOC,MAAP,CAAca,cAApC,EAAoDd,OAAOC,MAA3D,CAArB;AACAvC,6BAAOC,KAAP,CAAc,UAASsC,OAAOgB,IAAK,2BAA0BhB,OAAOa,cAAe,EAAnF;AACD;AACF,OAPD;;AAAA;AAAA;AAAA;AAAA;AAQD,GAjDD,EAiDG,KAjDH;AAkDD","file":"index.js","sourcesContent":["import logger from 'loglevel'\r\nimport { Platform } from 'quasar'\r\nimport { Store } from './store'\r\nimport { Layout } from './layout'\r\nimport { Time } from './time'\r\nimport { Units } from './units'\r\nimport { Reader } from './reader'\r\nimport { Filter } from './filter'\r\nimport { Sorter } from './sorter'\r\nimport { Search } from './search'\r\nimport services from './services'\r\nimport * as utils from './utils'\r\nimport * as mixins from './mixins'\r\nimport * as hooks from './hooks'\r\nimport { CSVReader, JSONReader } from './readers'\r\n\r\n// We faced a bug in babel so that transform-runtime with export * from 'x' generates import statements in transpiled code\r\n// Tracked here : https://github.com/babel/babel/issues/2877\r\n// We tested the workaround given here https://github.com/babel/babel/issues/2877#issuecomment-270700000 with success so far\r\n\r\n// FIXME: we don't build vue component anymore, they are processed by webpack in the application template\r\n// export * from './components'\r\n\r\nexport * from './events'\r\nexport * from './api'\r\nexport * from './services'\r\nexport * from './store'\r\nexport * from './layout'\r\nexport * from './theme'\r\nexport * from './time'\r\nexport * from './units'\r\nexport * from './filter'\r\nexport * from './reader'\r\nexport * from './sorter'\r\nexport * from './search'\r\nexport * from './guards'\r\nexport * from '../common'\r\nexport { utils }\r\nexport { mixins }\r\nexport { hooks }\r\n\r\nexport default function init () {\r\n const api = this\r\n\r\n logger.debug('Initializing core')\r\n // Initialize singletons that might be used globally first\r\n Time.initialize()\r\n Units.initialize()\r\n // Then services\r\n api.configure(services)\r\n // Last, create the models listened by the main layout/pages components\r\n // You must use the patch method on the store to update those models\r\n // It is generally done by activity based componentq or through a local settings service\r\n Layout.initialize()\r\n Filter.initialize(api)\r\n Sorter.initialize()\r\n Search.initialize(api)\r\n Store.set('topPane', { content: null, mode: undefined, filter: {}, visible: false })\r\n Store.set('leftPane', { content: null, mode: undefined, filter: {}, visible: false })\r\n Store.set('rightPane', { content: null, mode: undefined, filter: {}, visible: false })\r\n Store.set('bottomPane', { content: null, mode: undefined, filter: {}, visible: false })\r\n Store.set('page', { content: null, mode: undefined, filter: {} })\r\n Store.set('window', { current: '', widgets: [], filter: {} })\r\n Store.set('fab', { actions: [], filter: {} })\r\n\r\n // Listen to the 'patched' event on the users\r\n const users = api.getService('users')\r\n users.on('patched', user => {\r\n // Check whether we need to update the current user\r\n if (user._id === Store.get('user._id')) {\r\n Store.patch('user', user)\r\n }\r\n })\r\n\r\n // Register default readers\r\n Reader.register('.json', JSONReader)\r\n Reader.register('.csv', CSVReader)\r\n\r\n // -----------------------------------------------------------------------\r\n // | After this we should only have specific cordova initialisation code |\r\n // -----------------------------------------------------------------------\r\n if (!Platform.is.cordova) return\r\n\r\n /* NOT SURE IF THIS IS REQUIRED\r\n let permissionsPlugin = cordova.plugins.permissions\r\n const notificationPermissions = [\r\n permissionsPlugin.INTERNET,\r\n permissionsPlugin.ACCESS_NETWORK_STATE,\r\n permissionsPlugin.WAKE_LOCK,\r\n permissionsPlugin.VIBRATE\r\n ]\r\n\r\n function permissionsError() {\r\n const message = 'Required permissions for push notifications are missing or have been rejected, the application will not work as expected'\r\n logger.error(message)\r\n utils.toast({\r\n message,\r\n timeout: 10000\r\n })\r\n }\r\n function permissionsCheckSuccess(status) {\r\n // Request again if not given\r\n if (!status.hasPermission) {\r\n permissionsPlugin.requestPermissions(notificationPermissions, status => { if (!status.hasPermission) permissionsError() }, permissionsError)\r\n }\r\n }\r\n */\r\n\r\n document.addEventListener('deviceready', _ => {\r\n // Check for permissions, will launch permission request on failure\r\n // NOT SURE IF THIS IS REQUIRED\r\n // permissionsPlugin.hasPermission(notificationPermissions, permissionsCheckSuccess, null)\r\n if (!window.device) {\r\n logger.error('Unable to reach device information')\r\n return\r\n }\r\n\r\n const notifier = window.PushNotification.init({\r\n android: { vibrate: true, sound: true, forceShow: true },\r\n ios: { alert: true, badge: true, sound: true },\r\n windows: { }\r\n })\r\n notifier.on('registration', async (data) => {\r\n logger.debug('Push registrationID changed: ' + data.registrationId)\r\n // Store the registrationId\r\n window.device.registrationId = data.registrationId\r\n // update the user device\r\n const user = Store.get('user')\r\n if (user && window.device && window.device.registrationId) {\r\n const devicesService = api.getService('devices')\r\n const device = await devicesService.update(window.device.registrationId, window.device)\r\n logger.debug(`device ${device.uuid} updated with the id ${device.registrationId}`)\r\n }\r\n })\r\n notifier.on('notification', (data) => {\r\n // data.message,\r\n // data.title,\r\n // data.count,\r\n // data.sound,\r\n // data.image,\r\n // data.additionalData\r\n })\r\n notifier.on('error', (error) => {\r\n logger.error(error)\r\n utils.toast({\r\n message: error.message,\r\n timeout: 10000\r\n })\r\n })\r\n api.on('authenticated', async response => {\r\n const devicesService = api.getService('devices')\r\n // Only possible if registration ID already retrieved\r\n if (window.device && window.device.registrationId) {\r\n const device = await devicesService.update(window.device.registrationId, window.device)\r\n logger.debug(`device ${device.uuid} registered with the id ${device.registrationId}`)\r\n }\r\n })\r\n }, false)\r\n}\r\n"]}
1
+ {"version":3,"sources":["../../../core/client/index.js"],"names":["init","utils","mixins","hooks","api","logger","debug","Time","initialize","Units","configure","services","Layout","Filter","Sorter","Search","Store","set","content","mode","undefined","filter","visible","widgets","position","size","current","widgetActions","actions","users","getService","on","user","_id","get","patch","Reader","register","JSONReader","CSVReader","Platform","is","cordova","document","addEventListener","_","window","device","error","notifier","PushNotification","android","vibrate","sound","forceShow","ios","alert","badge","windows","data","registrationId","devicesService","update","uuid","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;AACA1C,6BAAOC,KAAP,CAAc,UAASyC,OAAOgB,IAAK,wBAAuBhB,OAAOa,cAAe,EAAhF;AACD;AACF,OAXD;;AAAA;AAAA;AAAA;AAAA;AAYAX,aAASlB,EAAT,CAAY,cAAZ,EAA6B4B,IAAD,IAAU;AACpC;AACA;AACA;AACA;AACA;AACA;AACD,KAPD;AAQAV,aAASlB,EAAT,CAAY,OAAZ,EAAsBiB,KAAD,IAAW;AAC9B3C,yBAAO2C,KAAP,CAAaA,KAAb;AACA/C,YAAM+D,KAAN,CAAY;AACVC,iBAASjB,MAAMiB,OADL;AAEVC,iBAAS;AAFC,OAAZ;AAID,KAND;AAOA9D,QAAI2B,EAAJ,CAAO,eAAP;AAAA,oCAAwB,WAAMoC,QAAN,EAAkB;AACxC,cAAMN,iBAAiBzD,IAAI0B,UAAJ,CAAe,SAAf,CAAvB;AACA;AACA,YAAIgB,OAAOC,MAAP,IAAiBD,OAAOC,MAAP,CAAca,cAAnC,EAAmD;AACjD,gBAAMb,SAAS,MAAMc,eAAeC,MAAf,CAAsBhB,OAAOC,MAAP,CAAca,cAApC,EAAoDd,OAAOC,MAA3D,CAArB;AACA1C,6BAAOC,KAAP,CAAc,UAASyC,OAAOgB,IAAK,2BAA0BhB,OAAOa,cAAe,EAAnF;AACD;AACF,OAPD;;AAAA;AAAA;AAAA;AAAA;AAQD,GAjDD,EAiDG,KAjDH;AAkDD","file":"index.js","sourcesContent":["import logger from 'loglevel'\r\nimport { Platform } from 'quasar'\r\nimport { Store } from './store'\r\nimport { Layout } from './layout'\r\nimport { Time } from './time'\r\nimport { Units } from './units'\r\nimport { Reader } from './reader'\r\nimport { Filter } from './filter'\r\nimport { Sorter } from './sorter'\r\nimport { Search } from './search'\r\nimport services from './services'\r\nimport * as utils from './utils'\r\nimport * as mixins from './mixins'\r\nimport * as hooks from './hooks'\r\nimport { CSVReader, JSONReader } from './readers'\r\n\r\n// We faced a bug in babel so that transform-runtime with export * from 'x' generates import statements in transpiled code\r\n// Tracked here : https://github.com/babel/babel/issues/2877\r\n// We tested the workaround given here https://github.com/babel/babel/issues/2877#issuecomment-270700000 with success so far\r\n\r\n// FIXME: we don't build vue component anymore, they are processed by webpack in the application template\r\n// export * from './components'\r\n\r\nexport * from './events'\r\nexport * from './api'\r\nexport * from './services'\r\nexport * from './store'\r\nexport * from './layout'\r\nexport * from './theme'\r\nexport * from './time'\r\nexport * from './units'\r\nexport * from './filter'\r\nexport * from './reader'\r\nexport * from './sorter'\r\nexport * from './search'\r\nexport * from './guards'\r\nexport * from '../common'\r\nexport { utils }\r\nexport { mixins }\r\nexport { hooks }\r\n\r\nexport default function init () {\r\n const api = this\r\n\r\n logger.debug('Initializing core')\r\n // Initialize singletons that might be used globally first\r\n Time.initialize()\r\n Units.initialize()\r\n // Then services\r\n api.configure(services)\r\n // Last, create the models listened by the main layout/pages components\r\n // You must use the patch method on the store to update those models\r\n // It is generally done by activity based componentq or through a local settings service\r\n Layout.initialize()\r\n Filter.initialize(api)\r\n Sorter.initialize()\r\n Search.initialize(api)\r\n Store.set('topPane', { content: null, mode: undefined, filter: {}, visible: false })\r\n Store.set('leftPane', { content: null, mode: undefined, filter: {}, visible: false })\r\n Store.set('rightPane', { content: null, mode: undefined, filter: {}, visible: false })\r\n Store.set('bottomPane', { content: null, mode: undefined, filter: {}, visible: false })\r\n Store.set('page', { content: null, mode: undefined, filter: {} })\r\n Store.set('window', { widgets: [], filter: {}, position: [0, 0], size: [0, 0], current: '', widgetActions: [] })\r\n Store.set('fab', { actions: [], filter: {} })\r\n\r\n // Listen to the 'patched' event on the users\r\n const users = api.getService('users')\r\n users.on('patched', user => {\r\n // Check whether we need to update the current user\r\n if (user._id === Store.get('user._id')) {\r\n Store.patch('user', user)\r\n }\r\n })\r\n\r\n // Register default readers\r\n Reader.register('.json', JSONReader)\r\n Reader.register('.csv', CSVReader)\r\n\r\n // -----------------------------------------------------------------------\r\n // | After this we should only have specific cordova initialisation code |\r\n // -----------------------------------------------------------------------\r\n if (!Platform.is.cordova) return\r\n\r\n /* NOT SURE IF THIS IS REQUIRED\r\n let permissionsPlugin = cordova.plugins.permissions\r\n const notificationPermissions = [\r\n permissionsPlugin.INTERNET,\r\n permissionsPlugin.ACCESS_NETWORK_STATE,\r\n permissionsPlugin.WAKE_LOCK,\r\n permissionsPlugin.VIBRATE\r\n ]\r\n\r\n function permissionsError() {\r\n const message = 'Required permissions for push notifications are missing or have been rejected, the application will not work as expected'\r\n logger.error(message)\r\n utils.toast({\r\n message,\r\n timeout: 10000\r\n })\r\n }\r\n function permissionsCheckSuccess(status) {\r\n // Request again if not given\r\n if (!status.hasPermission) {\r\n permissionsPlugin.requestPermissions(notificationPermissions, status => { if (!status.hasPermission) permissionsError() }, permissionsError)\r\n }\r\n }\r\n */\r\n\r\n document.addEventListener('deviceready', _ => {\r\n // Check for permissions, will launch permission request on failure\r\n // NOT SURE IF THIS IS REQUIRED\r\n // permissionsPlugin.hasPermission(notificationPermissions, permissionsCheckSuccess, null)\r\n if (!window.device) {\r\n logger.error('Unable to reach device information')\r\n return\r\n }\r\n\r\n const notifier = window.PushNotification.init({\r\n android: { vibrate: true, sound: true, forceShow: true },\r\n ios: { alert: true, badge: true, sound: true },\r\n windows: { }\r\n })\r\n notifier.on('registration', async (data) => {\r\n logger.debug('Push registrationID changed: ' + data.registrationId)\r\n // Store the registrationId\r\n window.device.registrationId = data.registrationId\r\n // update the user device\r\n const user = Store.get('user')\r\n if (user && window.device && window.device.registrationId) {\r\n const devicesService = api.getService('devices')\r\n const device = await devicesService.update(window.device.registrationId, window.device)\r\n logger.debug(`device ${device.uuid} updated with the id ${device.registrationId}`)\r\n }\r\n })\r\n notifier.on('notification', (data) => {\r\n // data.message,\r\n // data.title,\r\n // data.count,\r\n // data.sound,\r\n // data.image,\r\n // data.additionalData\r\n })\r\n notifier.on('error', (error) => {\r\n logger.error(error)\r\n utils.toast({\r\n message: error.message,\r\n timeout: 10000\r\n })\r\n })\r\n api.on('authenticated', async response => {\r\n const devicesService = api.getService('devices')\r\n // Only possible if registration ID already retrieved\r\n if (window.device && window.device.registrationId) {\r\n const device = await devicesService.update(window.device.registrationId, window.device)\r\n logger.debug(`device ${device.uuid} registered with the id ${device.registrationId}`)\r\n }\r\n })\r\n }, false)\r\n}\r\n"]}