@intellias/menu 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 (174) hide show
  1. package/Menu.ts +625 -0
  2. package/README.md +121 -0
  3. package/assets/icons/arrow-down.svg +13 -0
  4. package/assets/icons/arrow-left.svg +3 -0
  5. package/assets/icons/arrow-submenu.svg +8 -0
  6. package/assets/icons/close.svg +3 -0
  7. package/assets/icons/delete.svg +13 -0
  8. package/assets/icons/faq-new.svg +4 -0
  9. package/assets/icons/kudos.svg +14 -0
  10. package/assets/icons/loading-spinner.svg +40 -0
  11. package/assets/icons/notification.svg +11 -0
  12. package/assets/icons/notifications/assessment.svg +10 -0
  13. package/assets/icons/notifications/buddy_program.svg +8 -0
  14. package/assets/icons/notifications/compensation_packages.svg +10 -0
  15. package/assets/icons/notifications/dsat.svg +8 -0
  16. package/assets/icons/notifications/feedback.svg +7 -0
  17. package/assets/icons/notifications/kudos.svg +4 -0
  18. package/assets/icons/notifications/overtime_requests.svg +15 -0
  19. package/assets/icons/notifications/pdu_program.svg +4 -0
  20. package/assets/icons/notifications/profile_update.svg +6 -0
  21. package/assets/icons/notifications/recommendation_program.svg +7 -0
  22. package/assets/icons/notifications/reminders.svg +4 -0
  23. package/assets/icons/notifications/sick_leaves.svg +5 -0
  24. package/assets/icons/notifications/smarts.svg +4 -0
  25. package/assets/icons/notifications/survey.svg +8 -0
  26. package/assets/icons/notifications/unpaid_leave.svg +4 -0
  27. package/assets/icons/notifications/vacations.svg +4 -0
  28. package/assets/icons/pause.svg +13 -0
  29. package/assets/icons/play.svg +13 -0
  30. package/assets/icons/smart.svg +14 -0
  31. package/assets/icons/smarts-kudos.svg +11 -0
  32. package/assets/icons/spinner-solid.svg +1 -0
  33. package/assets/icons/vacation.svg +14 -0
  34. package/assets/icons/visibility.svg +1 -0
  35. package/assets/intems-logo.svg +3 -0
  36. package/babel.config.js +6 -0
  37. package/buses/eventBus.ts +19 -0
  38. package/buses/events/GiveKudosEvent.ts +7 -0
  39. package/components/buttons/action-button/ActionButton.scss +133 -0
  40. package/components/buttons/action-button/ActionButton.ts +57 -0
  41. package/components/buttons/action-button/ActionButton.vue +50 -0
  42. package/components/buttons/secondary-button/SecondaryButton.scss +48 -0
  43. package/components/buttons/secondary-button/SecondaryButton.ts +28 -0
  44. package/components/buttons/secondary-button/SecondaryButton.vue +27 -0
  45. package/components/confirm/Confirm.scss +44 -0
  46. package/components/confirm/Confirm.ts +82 -0
  47. package/components/confirm/Confirm.vue +64 -0
  48. package/components/give-kudos-form/GiveKudosForm.scss +114 -0
  49. package/components/give-kudos-form/GiveKudosForm.ts +159 -0
  50. package/components/give-kudos-form/GiveKudosForm.vue +131 -0
  51. package/components/give-kudos-form/mixins/UserSelectMixin.ts +57 -0
  52. package/components/give-kudos-form/models/KudosShareModel.ts +6 -0
  53. package/components/give-kudos-form/models/UserListModel.ts +5 -0
  54. package/components/give-kudos-form/validators/InEnglishValidatorRegex.ts +17 -0
  55. package/components/give-kudos-form/validators/KudosBalance.ts +10 -0
  56. package/components/modal/Modal.scss +53 -0
  57. package/components/modal/Modal.ts +70 -0
  58. package/components/modal/Modal.vue +28 -0
  59. package/components/notifications-sidebar/NotificationsSidebar.scss +665 -0
  60. package/components/notifications-sidebar/NotificationsSidebar.ts +203 -0
  61. package/components/notifications-sidebar/NotificationsSidebar.vue +171 -0
  62. package/components/notifications-sidebar/models/BroadcastNotificationPayload.ts +8 -0
  63. package/components/notifications-sidebar/models/TotalCounter.ts +50 -0
  64. package/components/notifications-sidebar/notification/Notification.ts +17 -0
  65. package/components/notifications-sidebar/notification/Notification.vue +87 -0
  66. package/components/play-pause/PlayPause.scss +33 -0
  67. package/components/play-pause/PlayPause.ts +156 -0
  68. package/components/play-pause/PlayPause.vue +36 -0
  69. package/components/play-pause/PlayPauseStatus.ts +4 -0
  70. package/components/play-pause/helpers/LatestTrackedTimeDurationHelper.ts +55 -0
  71. package/components/play-pause/helpers/PauseHelper.ts +55 -0
  72. package/components/play-pause/helpers/TrackedTimeHelper.ts +80 -0
  73. package/components/preloader/Preloader.vue +34 -0
  74. package/components/request-loader/RequestLoader.scss +20 -0
  75. package/components/request-loader/RequestLoader.ts +80 -0
  76. package/components/request-loader/RequestLoader.vue +15 -0
  77. package/components/sub-menu/SubMenu.scss +33 -0
  78. package/components/sub-menu/SubMenu.ts +38 -0
  79. package/components/sub-menu/SubMenu.vue +21 -0
  80. package/components/time-ago/TimeAgo.ts +34 -0
  81. package/components/time-ago/TimeAgo.vue +9 -0
  82. package/components/user-picture/UserPicture.scss +62 -0
  83. package/components/user-picture/UserPicture.ts +105 -0
  84. package/components/user-picture/UserPicture.vue +23 -0
  85. package/components/v-select-intems/VSelectIntems.ts +112 -0
  86. package/components/v-select-intems/VSelectIntems.vue +68 -0
  87. package/components/v-select-intems/open-indicator/OpenIndicator.vue +3 -0
  88. package/dist/css/1.css +85 -0
  89. package/dist/css/2.css +34 -0
  90. package/dist/css/3.css +34 -0
  91. package/dist/css/4.css +34 -0
  92. package/dist/css/5.css +34 -0
  93. package/dist/css/main.css +1564 -0
  94. package/dist/html/app.html +19 -0
  95. package/dist/html/styles.html +1 -0
  96. package/dist/images/intems-logo.svg +3 -0
  97. package/dist/js/0.js +315 -0
  98. package/dist/js/1.js +313 -0
  99. package/dist/js/2.js +217 -0
  100. package/dist/js/3.js +181 -0
  101. package/dist/js/4.js +181 -0
  102. package/dist/js/5.js +181 -0
  103. package/dist/js/6.js +47 -0
  104. package/dist/js/main.js +7465 -0
  105. package/dist/js/vue.js +15 -0
  106. package/helpers/GeneralHelper.ts +61 -0
  107. package/helpers/PublisherSubscriber.ts +34 -0
  108. package/helpers/QueryFilter.ts +204 -0
  109. package/helpers/TimeHelper.ts +54 -0
  110. package/helpers/Validations.ts +7 -0
  111. package/helpers/model/ModelHelper.ts +155 -0
  112. package/helpers/model/decorators/AsCollection.ts +26 -0
  113. package/helpers/model/decorators/AsModel.ts +25 -0
  114. package/helpers/model/decorators/DateTime.ts +26 -0
  115. package/helpers/model/decorators/TimeDuration.ts +33 -0
  116. package/helpers/moment/Duration.ts +64 -0
  117. package/helpers/moment/Moment.ts +17 -0
  118. package/helpers/moment/index.d.ts +20 -0
  119. package/helpers/response/AxiosProxy.ts +72 -0
  120. package/helpers/response/ErrorsToToastHelper.ts +42 -0
  121. package/helpers/response/ResponseCode.ts +16 -0
  122. package/helpers/response/ResponseHelper.ts +42 -0
  123. package/helpers/response/ResponseInterface.ts +34 -0
  124. package/helpers/response/ResponseState.ts +6 -0
  125. package/jsconfig.json +19 -0
  126. package/mixins/IntemsMath.ts +29 -0
  127. package/mixins/notifications/ActionProcessing.ts +134 -0
  128. package/mixins/notifications/confirms/AssetRejectionConfirm.vue +59 -0
  129. package/mixins/notifications/confirms/SickLeaveRejectionConfirm.vue +31 -0
  130. package/mixins/notifications/confirms/UnpaidLeaveRejectionConfirm.vue +31 -0
  131. package/mixins/notifications/confirms/VacationRejectionConfirm.vue +31 -0
  132. package/models/AssetModel.ts +80 -0
  133. package/models/AssetRequestModel.ts +25 -0
  134. package/models/ConfigModel.ts +20 -0
  135. package/models/EmployeeStartEndDateModel.ts +16 -0
  136. package/models/EmploymentTypeModel.ts +95 -0
  137. package/models/LogoutModel.ts +3 -0
  138. package/models/Model.ts +12 -0
  139. package/models/ModuleOptions.ts +24 -0
  140. package/models/PublicInfoModel.ts +38 -0
  141. package/models/PublicLocationModel.ts +36 -0
  142. package/models/StatusModel.ts +8 -0
  143. package/models/TrackedTimeModel.ts +32 -0
  144. package/models/location/PublicLocationModel.ts +36 -0
  145. package/models/timezones/LocalTimezoneHistoryModel.ts +8 -0
  146. package/models/timezones/TimezoneModel.ts +9 -0
  147. package/models/user/ExtendedInfoModel.ts +37 -0
  148. package/models/user/NotificationActionModel.ts +53 -0
  149. package/models/user/NotificationModel.ts +84 -0
  150. package/models/user/PublicInfoModel.ts +38 -0
  151. package/models/user/WelcomeProgram.ts +4 -0
  152. package/package.json +117 -0
  153. package/repositories/BaseRepository.ts +42 -0
  154. package/repositories/BaseUrl.ts +107 -0
  155. package/repositories/Repository.ts +291 -0
  156. package/repositories/ResourceRepository.ts +99 -0
  157. package/repositories/TrackedTimeRepository.ts +43 -0
  158. package/repositories/UserRepository.ts +75 -0
  159. package/repositories/subscribers/CreateSubscribers.ts +28 -0
  160. package/repositories/subscribers/DefaultSubscribers.ts +82 -0
  161. package/repositories/subscribers/DeleteSubscribers.ts +28 -0
  162. package/repositories/subscribers/DownloadSubscribers.ts +28 -0
  163. package/repositories/subscribers/Subscribers.ts +13 -0
  164. package/repositories/subscribers/UpdateSubscribers.ts +32 -0
  165. package/scss/components/_global.scss +66 -0
  166. package/scss/components/_mixins.scss +31 -0
  167. package/scss/components/_tooltip.scss +45 -0
  168. package/scss/components/_utils.scss +26 -0
  169. package/scss/components/_variables.scss +103 -0
  170. package/scss/main.scss +7 -0
  171. package/shims-vue.d.ts +9 -0
  172. package/tsconfig.json +31 -0
  173. package/webpack.config.js +126 -0
  174. package/wrapper.ts +51 -0
@@ -0,0 +1,126 @@
1
+ const path = require('path');
2
+ const VueLoaderPlugin = require('vue-loader/lib/plugin');
3
+ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4
+ const { CleanWebpackPlugin } = require('clean-webpack-plugin');
5
+ const HtmlWebpackPlugin = require('html-webpack-plugin');
6
+ const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
7
+
8
+ const isDev = true;
9
+
10
+ module.exports = {
11
+ // devtool: 'source-map',
12
+ mode: "development",
13
+ entry: './wrapper.ts',
14
+ output: {
15
+ path: path.resolve(__dirname, './dist/'),
16
+ filename: isDev ? 'js/[name].js' : 'js/[name].[hash].js',
17
+ chunkFilename: isDev ? 'js/[name].js' : 'js/[name].[hash].js',
18
+ publicPath: '/'
19
+ },
20
+ watchOptions: {
21
+ ignored: /node_modules/,
22
+ },
23
+ plugins: [
24
+ new CleanWebpackPlugin({
25
+ cleanOnceBeforeBuildPatterns: ['js/*', 'css/*', 'images/*', 'html/*']
26
+ }),
27
+ new VueLoaderPlugin(),
28
+ new ForkTsCheckerWebpackPlugin(),
29
+ new MiniCssExtractPlugin({
30
+ filename: isDev ? 'css/[name].css' : 'css/[name].[hash].css',
31
+ chunkFilename: isDev ? 'css/[id].css' : 'css/[id].[hash].css'
32
+ }),
33
+ new HtmlWebpackPlugin({
34
+ inject: false,
35
+ hash: false,
36
+ template: './app.html',
37
+ filename: 'html/app.html'
38
+ }),
39
+ new HtmlWebpackPlugin({
40
+ inject: false,
41
+ hash: false,
42
+ template: './styles.html',
43
+ filename: 'html/styles.html'
44
+ })
45
+ ],
46
+ module: {
47
+ rules: [
48
+ {
49
+ test: /\.tsx?$/,
50
+ loader: 'ts-loader',
51
+ exclude: /node_modules/,
52
+ options: {
53
+ appendTsSuffixTo: [/\.vue$/],
54
+ transpileOnly: true
55
+ }
56
+ },
57
+ {
58
+ test: /\.vue$/,
59
+ loader: 'vue-loader'
60
+ },
61
+ {
62
+ test: /\.scss$/,
63
+ use: [
64
+ 'vue-style-loader',
65
+ MiniCssExtractPlugin.loader,
66
+ {
67
+ loader: 'css-loader',
68
+ options: { sourceMap: isDev }
69
+ },
70
+ {
71
+ loader: 'postcss-loader',
72
+ options: {
73
+ plugins: [require('autoprefixer')()],
74
+ sourceMap: isDev
75
+ }
76
+ },
77
+ {
78
+ loader: 'sass-loader',
79
+ options: {
80
+ sourceMap: isDev,
81
+ implementation: require('sass'),
82
+ data: `
83
+ @import "~@/scss/components/variables";
84
+ @import "~@/scss/components/mixins";
85
+ `
86
+ }
87
+ }
88
+ ]
89
+ },
90
+ {
91
+ test: /\.jsx?$/,
92
+ exclude: /node_modules/,
93
+ loader: 'babel-loader'
94
+ },
95
+ {
96
+ test: /\.(png|jpg|gif|svg|ttf|eot|woff|woff2)$/,
97
+ loader: 'file-loader',
98
+ options: {
99
+ name: 'images/[name].[ext]?[hash]'
100
+ }
101
+ },
102
+ {
103
+ test: /\.css$/,
104
+ use: ['vue-style-loader', 'css-loader']
105
+ }
106
+ ]
107
+ },
108
+ resolve: {
109
+ extensions: ['.tsx', '.ts', '.js', '.vue', '.scss'],
110
+ alias: {
111
+ vue$: 'vue/dist/vue.esm.js',
112
+ '@': path.resolve(__dirname),
113
+ }
114
+ },
115
+ optimization: {
116
+ splitChunks: {
117
+ cacheGroups: {
118
+ vue: {
119
+ test: /[\\/]node_modules[\\/](vue)[\\/]/,
120
+ name: 'vue',
121
+ chunks: 'all'
122
+ }
123
+ }
124
+ }
125
+ }
126
+ };
package/wrapper.ts ADDED
@@ -0,0 +1,51 @@
1
+ import Menu from "./Menu.vue";
2
+ import {
3
+ MenuOptions,
4
+ ProjectName,
5
+ Helpers,
6
+ Submenus,
7
+ } from "./models/ModuleOptions";
8
+ import VueEcho from "vue-echo-laravel";
9
+ import { io } from "socket.io-client";
10
+ import { VTooltip } from "v-tooltip";
11
+ import VModal from "vue-js-modal";
12
+
13
+ let myOptions: MenuOptions;
14
+
15
+ const MenuComponent = {
16
+ install(Vue, options: MenuOptions): void {
17
+ Vue.directive("tooltip", VTooltip);
18
+
19
+ myOptions = options;
20
+ const props = {};
21
+
22
+ Object.keys(options).forEach((k) => {
23
+ props[k] = { default: () => options[k] };
24
+ });
25
+
26
+ Vue.use(VueEcho, {
27
+ broadcaster: "socket.io",
28
+ host: options.storeAdapter.Config.state.data.liteSiteUrl,
29
+ client: io,
30
+ namespace: "App.Events.Broadcast",
31
+ });
32
+
33
+ Vue.use(VModal);
34
+ Vue.component(Menu.name, { ...Menu, props });
35
+ },
36
+ };
37
+
38
+ if (typeof window !== "undefined" && window.Vue) {
39
+ window.Vue.use(MenuComponent);
40
+ }
41
+
42
+ export default MenuComponent;
43
+
44
+ export {
45
+ myOptions,
46
+ MenuOptions,
47
+ ProjectName,
48
+ Helpers,
49
+ Submenus,
50
+ Menu as MainMenu,
51
+ };