@oxygen-cms/ui 1.6.3 → 1.6.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxygen-cms/ui",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "description": "Various utilities for UI-building in Vue.js",
5
5
  "main": "none",
6
6
  "repository": {
package/src/EventsApi.js CHANGED
@@ -13,4 +13,9 @@ export default class EventsApi extends CrudApi {
13
13
  return 'upcoming-events';
14
14
  }
15
15
 
16
+ async listTrybookingSessions() {
17
+ return this.request('get')
18
+ .fetch(this.constructor.getResourceRoot() + '/trybooking-sessions');
19
+ }
20
+
16
21
  }
@@ -28,4 +28,16 @@ export default class Internationalize {
28
28
  }
29
29
  return format.format(datetime);
30
30
  }
31
+
32
+ static formatDateTimeRange(from, to) {
33
+ let format = new Intl.DateTimeFormat(this.locale , {
34
+ hour: 'numeric', minute: 'numeric'
35
+ });
36
+
37
+ if(from.getDate() === to.getDate() && from.getMonth() === to.getMonth() && from.getYear() === to.getYear()) {
38
+ return this.formatDate(from) + " " + format.format(from) + " - " + format.format(to);
39
+ } else {
40
+ return this.formatDate(from) + " " + format.format(from) + " - " + this.formatDate(to) + format.format(to);
41
+ }
42
+ }
31
43
  }
package/src/icons.js CHANGED
@@ -74,7 +74,7 @@ import {
74
74
  faFolderOpen,
75
75
  faImages,
76
76
  faMinusCircle,
77
- faCalendarPlus, faPaperPlane
77
+ faCalendarPlus, faPaperPlane, faHandshakeSlash, faHandshake
78
78
  } from "@fortawesome/free-solid-svg-icons";
79
79
 
80
80
  export const addIconsToLibrary = () => {
@@ -87,5 +87,5 @@ export const addIconsToLibrary = () => {
87
87
  faFileExcel, faFileCsv, faChevronCircleDown, faChevronCircleUp, faTrash,
88
88
  faEye, faEyeSlash, faCaretDown, faCaretUp, faUpload, faUser, faFolder, faHome, faFilePdf, faSignOutAlt, faTag,
89
89
  faFolderPlus, faTimes, faQuestionCircle, faFileUpload, faLandmark,
90
- faFolderOpen, faFile, faFileAudio, faFileImage, faShare, faImages, faCalendarPlus, faPaperPlane);
90
+ faFolderOpen, faFile, faFileAudio, faFileImage, faShare, faImages, faCalendarPlus, faPaperPlane, faHandshake, faHandshakeSlash);
91
91
  };