aloha-vue 1.0.87 → 1.0.89

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 (28) hide show
  1. package/docs/package.json +1 -0
  2. package/docs/src/components/TheMenu/TheMenu.js +8 -0
  3. package/docs/src/router/index.js +5 -0
  4. package/docs/src/views/PageDatepicker/PageDatepicker.js +15 -0
  5. package/docs/src/views/PageDatepicker/PageDatepicker.pug +11 -0
  6. package/docs/src/views/PageDatepicker/PageDatepicker.vue +2 -0
  7. package/docs/src/views/PageTable/PageTable.js +7 -0
  8. package/package.json +2 -1
  9. package/src/ATable/ATableTdActionItem/ATableTdActionItem.js +1 -1
  10. package/src/const/AKeysCode.js +3 -1
  11. package/src/styles/components/ui/ADatepicker.scss +345 -0
  12. package/src/styles/components/ui/ui.scss +1 -0
  13. package/src/ui/ADatepicker/ADatepicker.js +874 -0
  14. package/src/ui/ADatepicker/ADatepickerCalendarPanel/ADatepickerCalendarPanel.js +800 -0
  15. package/src/ui/ADatepicker/ADatepickerIcon/ADatepickerIcon.js +28 -0
  16. package/src/ui/ADatepicker/locale/languages.js +174 -0
  17. package/src/ui/ADatepicker/mixins/PanelMixin.js +73 -0
  18. package/src/ui/ADatepicker/panel/APanelDate/APanelDate.js +354 -0
  19. package/src/ui/ADatepicker/panel/APanelMonth/APanelMonth.js +187 -0
  20. package/src/ui/ADatepicker/panel/APanelTime/APanelTime.js +303 -0
  21. package/src/ui/ADatepicker/panel/APanelYear/APanelYear.js +162 -0
  22. package/src/ui/ADatepicker/panel/APanelYearItem/APanelYearItem.js +84 -0
  23. package/src/ui/ADatepicker/utils/index.js +96 -0
  24. package/src/ui/ADatepicker/utils/scroll-into-view.js +23 -0
  25. package/src/ui/ADatepicker/utils/transform.js +14 -0
  26. package/src/ui/AInput/AInput.js +4 -29
  27. package/src/ui/AUiComponents.js +3 -0
  28. package/src/ui/compositionApi/UiInputAutofillAPI.js +41 -0
package/docs/package.json CHANGED
@@ -13,6 +13,7 @@
13
13
  "dependencies": {
14
14
  "@popperjs/core": "2.11.6",
15
15
  "aloha-css": "1.0.51",
16
+ "fecha": "^4.2.3",
16
17
  "lodash-es": "^4.17.21",
17
18
  "tiny-emitter": "2.1.0",
18
19
  "vue": "3.2.31",
@@ -137,6 +137,14 @@ export default {
137
137
  },
138
138
  parent: "ui",
139
139
  },
140
+ {
141
+ id: "datepicker",
142
+ label: "Datepicker",
143
+ to: {
144
+ name: "PageDatepicker",
145
+ },
146
+ parent: "ui",
147
+ },
140
148
  {
141
149
  id: "select",
142
150
  label: "Select",
@@ -114,6 +114,11 @@ const ROUTES = [
114
114
  name: "PageList",
115
115
  component: () => import(/* webpackChunkName: "PageList" */ "../views/PageList/PageList.vue"),
116
116
  },
117
+ {
118
+ path: "/datepicker",
119
+ name: "PageDatepicker",
120
+ component: () => import(/* webpackChunkName: "PageDatepicker" */ "../views/PageDatepicker/PageDatepicker.vue"),
121
+ },
117
122
  {
118
123
  // If the routing configuration '*' reports an error, replace it with '/: catchAll(. *)'
119
124
  // caught Error: Catch all routes ("*") must now be defined using a param with a custom regexp
@@ -0,0 +1,15 @@
1
+ import ADatepicker from "../../../../src/ui/ADatepicker/ADatepicker";
2
+
3
+ export default {
4
+ name: "PageDatepicker",
5
+ components: {
6
+ ADatepicker,
7
+ },
8
+ data() {
9
+ return {
10
+ model1: "",
11
+ model2: "",
12
+ model3: "",
13
+ };
14
+ },
15
+ };
@@ -0,0 +1,11 @@
1
+ div
2
+ h1 Form datepicker
3
+ h2 Input
4
+ a-datepicker(
5
+ id="input1"
6
+ v-model="model1"
7
+ type="text"
8
+ label="Input 1"
9
+ :required="true"
10
+ )
11
+ div model1: {{ model1 }}
@@ -0,0 +1,2 @@
1
+ <template lang="pug" src="./PageDatepicker.pug"></template>
2
+ <script src="./PageDatepicker.js"></script>
@@ -132,6 +132,13 @@ export default {
132
132
  disabledCallback: ({ row, rowIndex }) => !(rowIndex > 2 && row.aloha),
133
133
  callback: this.clickMe,
134
134
  },
135
+ {
136
+ icon: "Export",
137
+ type: "link",
138
+ hrefCallback: ({ row }) => `dokumente/${ row.pk }/download/`,
139
+ label: "Dokument herunterladen",
140
+ target: "_blank",
141
+ },
135
142
  ],
136
143
  multipleActions: [
137
144
  {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aloha-vue",
3
3
  "description": "Project aloha",
4
- "version": "1.0.87",
4
+ "version": "1.0.89",
5
5
  "author": "Ilia Brykin",
6
6
  "scripts": {
7
7
  "build-icons": "node scriptsNode/iconsSvgToJs.js bootstrap3 && node scriptsNode/iconsSvgToJs.js bootstrap-1-9-1"
@@ -10,6 +10,7 @@
10
10
  "@popperjs/core": "2.11.5",
11
11
  "aloha-css": "1.0.47",
12
12
  "axios": "^0.27.2",
13
+ "fecha": "^4.2.3",
13
14
  "lodash-es": "^4.17.21",
14
15
  "tiny-emitter": "2.1.0",
15
16
  "vue": "3.2.37"
@@ -133,7 +133,7 @@ export default {
133
133
  targetObject() {
134
134
  const TARGET_OBJECT = {};
135
135
  if (this.rowAction.target) {
136
- return TARGET_OBJECT.target = this.rowAction.target;
136
+ TARGET_OBJECT.target = this.rowAction.target;
137
137
  }
138
138
  return TARGET_OBJECT;
139
139
  },
@@ -1,8 +1,10 @@
1
1
  export default {
2
2
  tab: 9,
3
- space: 32,
4
3
  enter: 13,
4
+ space: 32,
5
+ arrowLeft: 37,
5
6
  arrowUp: 38,
7
+ arrowRight: 39,
6
8
  arrowDown: 40,
7
9
  escape: 27,
8
10
  };
@@ -0,0 +1,345 @@
1
+ $dp-default-color: #73879c;
2
+ $dp-primary-color: #1284e7;
3
+
4
+ .pux_datepicker {
5
+ position: relative;
6
+ display: inline-block;
7
+ width: 250px;
8
+ color: $dp-default-color;
9
+ font-size: 14px;
10
+ // font: 14px/1.5 'Helvetica Neue', Helvetica, Arial, 'Microsoft Yahei', sans-serif;
11
+ * {
12
+ box-sizing: border-box;
13
+ }
14
+ }
15
+ .pux_datepicker_range {
16
+ width: 320px;
17
+ }
18
+
19
+ .pux_datepicker__popup {
20
+ position: absolute;
21
+ margin-top: 1px;
22
+ margin-bottom: 1px;
23
+ border: 1px solid #d9d9d9;
24
+ background-color: #fff;
25
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
26
+ z-index: 1060;
27
+ }
28
+
29
+ .pux_datepicker__input_wrapper {
30
+ position: relative;
31
+ &:hover {
32
+ .pux_datepicker__input_wrapper__clear_wrapper {
33
+ display: block;
34
+ }
35
+ .pux_datepicker__input_wrapper__clear_wrapper + .pux_datepicker__input_wrapper__append {
36
+ display: none;
37
+ }
38
+ }
39
+ }
40
+ .pux_datepicker__input {
41
+ padding-right: 27px;
42
+ }
43
+ .pux_datepicker__input_wrapper__clear_wrapper {
44
+ display: none;
45
+ }
46
+
47
+ .pux_datepicker__input {
48
+ display: inline-block;
49
+ width: 100%;
50
+ height: 34px;
51
+ padding: 6px 30px;
52
+ padding-left: 10px;
53
+ font-size: 14px;
54
+ line-height: 1.4;
55
+ color: #555;
56
+ background-color: #fff;
57
+ border: 1px solid #ccc;
58
+ border-radius: 4px;
59
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
60
+ &:focus {
61
+ outline: none;
62
+ }
63
+ &::-ms-clear {
64
+ display: none;
65
+ }
66
+ }
67
+
68
+ .pux_datepicker__input_wrapper__append {
69
+ position: absolute;
70
+ top: 0;
71
+ right: 0;
72
+ width: 30px;
73
+ height: 100%;
74
+ padding: 6px;
75
+ }
76
+
77
+ .pux_datepicker__input__icon {
78
+ display: inline-block;
79
+ width: 100%;
80
+ height: 100%;
81
+ font-style: normal;
82
+ color: #555;
83
+ text-align: center;
84
+ cursor: pointer;
85
+ }
86
+
87
+ .a_datepicker__calendar_icon {
88
+ width: 100%;
89
+ height: 100%;
90
+ max-height: 25px;
91
+ color: #555;
92
+ stroke-width: 8px;
93
+ stroke: currentColor;
94
+ fill: currentColor;
95
+ }
96
+
97
+ .pux_datepicker__input__clear_icon {
98
+ &::before {
99
+ display: inline-block;
100
+ content: '\2716';
101
+ vertical-align: middle;
102
+ }
103
+ &::after {
104
+ content: '';
105
+ display: inline-block;
106
+ width: 0;
107
+ height: 100%;
108
+ vertical-align: middle;
109
+ }
110
+ }
111
+
112
+ .pux_datepicker__range_wrapper {
113
+ width: 248px * 2;
114
+ overflow: hidden;
115
+ }
116
+
117
+ .pux_datepicker__shortcuts_wrapper {
118
+ text-align: left;
119
+ padding: 0 12px;
120
+ line-height: 34px;
121
+ border-bottom: 1px solid rgba(0, 0, 0, 0.05);
122
+ .pux_datepicker__shortcuts_wrapper__shortcuts {
123
+ background: none;
124
+ outline: none;
125
+ border: 0;
126
+ color: #48576a;
127
+ margin: 0;
128
+ padding: 0;
129
+ white-space: nowrap;
130
+ cursor: pointer;
131
+ &:hover {
132
+ color: mix(#fff, $dp-primary-color, 20%);
133
+ }
134
+ &:after {
135
+ content: '|';
136
+ margin: 0 10px;
137
+ color: #48576a;
138
+ }
139
+ &:last-child::after {
140
+ display: none;
141
+ }
142
+ }
143
+ }
144
+
145
+ .pux_datepicker__footer {
146
+ padding: 4px;
147
+ clear: both;
148
+ text-align: right;
149
+ border-top: 1px solid rgba(0, 0, 0, 0.05);
150
+ }
151
+ .pux_datepicker__footer__btn {
152
+ font-size: 12px;
153
+ line-height: 1;
154
+ padding: 7px 15px;
155
+ margin: 0 5px;
156
+ cursor: pointer;
157
+ background-color: transparent;
158
+ outline: none;
159
+ border: none;
160
+ border-radius: 3px;
161
+ }
162
+ .pux_datepicker__footer__btn_confirm {
163
+ border: 1px solid rgba(0, 0, 0, 0.1);
164
+ color: #73879c;
165
+ &:hover {
166
+ color: #1284e7;
167
+ border-color: #1284e7;
168
+ }
169
+ }
170
+
171
+ .pux_datepicker__calendar {
172
+ float: left;
173
+ color: $dp-default-color;
174
+ padding: 6px 12px;
175
+ font: 14px/1.5 Helvetica Neue, Helvetica, Arial, Microsoft Yahei, sans-serif;
176
+ * {
177
+ box-sizing: border-box;
178
+ }
179
+ }
180
+
181
+ .pux_datepicker__calendar__header {
182
+ padding: 0 4px;
183
+ height: 34px;
184
+ line-height: 34px;
185
+ text-align: center;
186
+ overflow: hidden;
187
+ display: flex;
188
+ justify-content: space-between;
189
+ button {
190
+ color: inherit;
191
+ cursor: pointer;
192
+ border: none;
193
+ background-color: transparent;
194
+ &:hover {
195
+ color: mix(#fff, $dp-primary-color, 20%);
196
+ }
197
+ }
198
+ @at-root {
199
+ .pux_datepicker__icon_last_month,
200
+ .pux_datepicker__icon_next_month {
201
+ padding: 0 6px;
202
+ font-size: 20px;
203
+ line-height: 30px;
204
+ user-select: none;
205
+ }
206
+ .pux_datepicker__icon_last_year {
207
+ @extend .pux_datepicker__icon_last_month;
208
+ }
209
+ .pux_datepicker__icon_next_year {
210
+ @extend .pux_datepicker__icon_next_month;
211
+ }
212
+ }
213
+ }
214
+
215
+ .pux_datepicker__calendar__content {
216
+ width: 32px * 7;
217
+ height: 32px * 7;
218
+ .cell {
219
+ vertical-align: middle;
220
+ cursor: pointer;
221
+ &:hover {
222
+ background-color: #eaf8fe;
223
+ }
224
+ &.actived {
225
+ color: #fff;
226
+ background-color: $dp-primary-color;
227
+ }
228
+ &.inrange {
229
+ background-color: #eaf8fe;
230
+ }
231
+ &.disabled {
232
+ cursor: not-allowed;
233
+ color: #ccc;
234
+ background-color: #f3f3f3;
235
+ }
236
+ }
237
+ }
238
+
239
+ .pux_datepicker__panel {
240
+ width: 100%;
241
+ height: 100%;
242
+ text-align: center;
243
+ }
244
+
245
+ .pux_datepicker__panel_date {
246
+ table-layout: fixed;
247
+ border-collapse: collapse;
248
+ border-spacing: 0;
249
+ td,
250
+ th {
251
+ font-size: 12px;
252
+ width: 32px;
253
+ height: 32px;
254
+ padding: 0;
255
+ overflow: hidden;
256
+ text-align: center;
257
+ }
258
+ td {
259
+ &.today {
260
+ color: mix(#fff, $dp-primary-color, 10%);
261
+ }
262
+ &.last-month,
263
+ &.next-month {
264
+ color: #ddd;
265
+ }
266
+ }
267
+ }
268
+
269
+ .pux_datepicker__panel_year {
270
+ padding: 7px 0;
271
+ .cell {
272
+ display: inline-block;
273
+ width: 40%;
274
+ margin: 1px 5%;
275
+ line-height: 40px;
276
+ }
277
+ }
278
+
279
+ .pux_datepicker__panel_month {
280
+ .cell {
281
+ display: inline-block;
282
+ width: 30%;
283
+ line-height: 40px;
284
+ margin: 8px 1.5%;
285
+ }
286
+ }
287
+ .pux_datepicker__panel__list {
288
+ padding-left: 0;
289
+ list-style: none;
290
+ margin: 0;
291
+ }
292
+
293
+ .pux_datepicker__time_list {
294
+ position: relative; // offsetParent
295
+ float: left;
296
+ margin: 0;
297
+ padding: 0;
298
+ list-style: none;
299
+ width: 100%;
300
+ height: 100%;
301
+ border-top: 1px solid rgba(0, 0, 0, 0.05);
302
+ border-left: 1px solid rgba(0, 0, 0, 0.05);
303
+ overflow-y: auto;
304
+ .pux_datepicker__time_list__item {
305
+ display: block;
306
+ text-align: left;
307
+ padding-left: 10px;
308
+ }
309
+ &:first-child {
310
+ border-left: 0;
311
+ }
312
+ .cell {
313
+ width: 100%;
314
+ font-size: 12px;
315
+ height: 30px;
316
+ line-height: 30px;
317
+ }
318
+ &::-webkit-scrollbar {
319
+ width: 8px;
320
+ height: 8px;
321
+ }
322
+ &::-webkit-scrollbar-thumb {
323
+ background-color: rgba(0, 0, 0, 0.05);
324
+ border-radius: 10px;
325
+ box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
326
+ }
327
+
328
+ &:hover::-webkit-scrollbar-thumb {
329
+ background-color: rgba(0, 0, 0, 0.2);
330
+ }
331
+ }
332
+
333
+ .pux_datepicker__panel__button {
334
+ border: none;
335
+ background-color: transparent;
336
+ color: inherit;
337
+ padding: 0;
338
+ width: 100%;
339
+ height: 100%;
340
+ }
341
+
342
+ .pux_datepicker__current_month,
343
+ .pux_datepicker__current_year {
344
+ padding: 0 2px;
345
+ }
@@ -147,6 +147,7 @@
147
147
  @import "ASelect";
148
148
  @import "AErrors";
149
149
  @import "AInputFile";
150
+ @import "ADatepicker";
150
151
 
151
152
  // fix für autofill
152
153
  input:-webkit-autofill {