aloha-vue 1.0.153 → 1.0.154

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/docs/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "@popperjs/core": "2.11.6",
15
- "aloha-css": "1.0.61",
15
+ "aloha-css": "1.0.64",
16
16
  "fecha": "^4.2.3",
17
17
  "lodash-es": "^4.17.21",
18
18
  "tiny-emitter": "2.1.0",
@@ -1,10 +1,35 @@
1
1
  import AModal from "../../../../src/AModal/AModal";
2
2
 
3
+ import AConfirmAPI from "../../../../src/compositionAPI/AConfirmAPI";
4
+
3
5
  export default {
4
6
  name: "PageModal",
5
7
  components: {
6
8
  AModal,
7
9
  },
10
+ setup() {
11
+ const {
12
+ closeConfirm,
13
+ openConfirm,
14
+ } = AConfirmAPI();
15
+
16
+ const save = () => {
17
+ closeConfirm();
18
+ };
19
+
20
+ const openConfirmLocal = () => {
21
+ openConfirm({
22
+ headerText: "Aloha",
23
+ bodyHtml: "<div>Aloha <strong>Hola</strong></div>",
24
+ save: save,
25
+ selectorClose: "#btn_confirm",
26
+ });
27
+ };
28
+
29
+ return {
30
+ openConfirmLocal,
31
+ };
32
+ },
8
33
  data() {
9
34
  return {
10
35
  isModalOpen: false,
@@ -7,5 +7,13 @@ div
7
7
 
8
8
  a-modal(
9
9
  v-if="isModalOpen"
10
+ size="xxl"
10
11
  :close="closeModal"
11
- )
12
+ )
13
+ template(
14
+ v-slot:modalBodyPrepend
15
+ )
16
+ button.a_btn.a_btn_secondary(
17
+ type="button"
18
+ @click="openConfirmLocal"
19
+ ) Open confirm
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "aloha-vue",
3
3
  "description": "Project aloha",
4
- "version": "1.0.153",
4
+ "version": "1.0.154",
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"
8
8
  },
9
9
  "dependencies": {
10
10
  "@popperjs/core": "2.11.5",
11
- "aloha-css": "1.0.47",
11
+ "aloha-css": "1.0.64",
12
12
  "axios": "^0.27.2",
13
13
  "fecha": "^4.2.3",
14
14
  "lodash-es": "^4.17.21",
@@ -21,6 +21,30 @@ import {
21
21
  export default {
22
22
  name: "AModal",
23
23
  props: {
24
+ bodyHtml: {
25
+ type: String,
26
+ required: false,
27
+ default: "",
28
+ },
29
+ close: {
30
+ type: Function,
31
+ required: true,
32
+ },
33
+ closeButtonClass: {
34
+ type: [String, Array, Object],
35
+ required: false,
36
+ default: "a_btn a_btn_secondary",
37
+ },
38
+ closeButtonText: {
39
+ type: String,
40
+ required: false,
41
+ default: "Abbrechen",
42
+ },
43
+ dataForm: {
44
+ type: Array,
45
+ required: false,
46
+ default: () => [],
47
+ },
24
48
  disabled: {
25
49
  type: Boolean,
26
50
  required: false,
@@ -31,119 +55,104 @@ export default {
31
55
  required: false,
32
56
  default: false,
33
57
  },
34
- loading: {
35
- type: Boolean,
58
+ errors: {
59
+ type: Object,
36
60
  required: false,
61
+ default: () => ({}),
37
62
  },
38
- selectorClose: {
39
- type: [String, Array],
63
+ headerTag: {
64
+ type: String,
40
65
  required: false,
41
- default: undefined,
66
+ default: "h2",
42
67
  },
43
- withoutEscape: {
44
- type: Boolean,
68
+ headerText: {
69
+ type: String,
45
70
  required: false,
71
+ default: undefined,
46
72
  },
47
- size: {
73
+ idPrefix: {
48
74
  type: String,
49
- validator: value => ["small", "large", "xl", "fullscreen"].indexOf(value) !== -1,
75
+ required: false,
50
76
  default: undefined,
51
77
  },
52
- isModalHidden: {
78
+ isCloseButtonHide: {
53
79
  type: Boolean,
54
80
  required: false,
55
- default: false,
56
81
  },
57
- save: {
58
- type: Function,
82
+ isConfirm: {
83
+ type: Boolean,
59
84
  required: false,
60
- default: undefined,
61
85
  },
62
- saveButtonText: {
63
- type: String,
86
+ isDataFormHide: {
87
+ type: Boolean,
64
88
  required: false,
65
- default: "Speichern",
66
89
  },
67
- saveButtonClass: {
68
- type: [String, Array, Object],
90
+ isDataFormRender: {
91
+ type: Boolean,
69
92
  required: false,
70
- default: "a_btn a_btn_primary",
93
+ default: true,
71
94
  },
72
- isSaveButtonHide: {
95
+ isModalHidden: {
73
96
  type: Boolean,
74
97
  required: false,
98
+ default: false,
75
99
  },
76
- close: {
77
- type: Function,
78
- required: true,
79
- },
80
- closeButtonText: {
81
- type: String,
100
+ isRequired: {
101
+ type: Boolean,
82
102
  required: false,
83
- default: "Abbrechen",
84
103
  },
85
- closeButtonClass: {
86
- type: [String, Array, Object],
104
+ isSaveButtonHide: {
105
+ type: Boolean,
87
106
  required: false,
88
- default: "a_btn a_btn_secondary",
89
107
  },
90
- isCloseButtonHide: {
108
+ loading: {
91
109
  type: Boolean,
92
110
  required: false,
93
111
  },
94
- headerText: {
95
- type: String,
112
+ modalClass: {
113
+ type: [String, Object],
96
114
  required: false,
97
115
  default: undefined,
98
116
  },
99
- headerTag: {
100
- type: String,
101
- required: false,
102
- default: "h2",
103
- },
104
- bodyHtml: {
105
- type: String,
117
+ modelValue: {
118
+ type: Object,
106
119
  required: false,
107
- default: "",
120
+ default: undefined,
108
121
  },
109
- dataForm: {
110
- type: Array,
122
+ save: {
123
+ type: Function,
111
124
  required: false,
112
- default: () => [],
125
+ default: undefined,
113
126
  },
114
- isDataFormHide: {
115
- type: Boolean,
127
+ saveButtonClass: {
128
+ type: [String, Array, Object],
116
129
  required: false,
130
+ default: "a_btn a_btn_primary",
117
131
  },
118
- isDataFormRender: {
119
- type: Boolean,
132
+ saveButtonText: {
133
+ type: String,
120
134
  required: false,
121
- default: true,
135
+ default: "Speichern",
122
136
  },
123
- modelValue: {
124
- type: Object,
137
+ selectorClose: {
138
+ type: [String, Array],
125
139
  required: false,
126
140
  default: undefined,
127
141
  },
128
- errors: {
129
- type: Object,
130
- required: false,
131
- default: () => ({}),
142
+ size: {
143
+ type: String,
144
+ validator: value => ["small", "large", "xl", "xxl", "fullscreen"].indexOf(value) !== -1,
145
+ default: undefined,
132
146
  },
133
147
  textRequired: {
134
148
  type: String,
135
149
  required: false,
136
150
  default: undefined,
137
151
  },
138
- isRequired: {
152
+ withoutEscape: {
139
153
  type: Boolean,
140
154
  required: false,
141
155
  },
142
- idPrefix: {
143
- type: String,
144
- required: false,
145
- default: undefined,
146
- },
147
156
  },
148
157
  emits: [
149
158
  "update:modelValue",
@@ -186,36 +195,6 @@ export default {
186
195
  return this.options.autocomplete || "on";
187
196
  },
188
197
 
189
- classSize() {
190
- return `modal-${ this.size }`;
191
- },
192
-
193
- backdropStyle() {
194
- if (this.modalInModalCount) {
195
- return `z-index: ${ 1045 + (this.modalInModalCount * 10) };`;
196
- }
197
- return "";
198
- },
199
-
200
- modalStyle() {
201
- if (this.modalInModalCount) {
202
- return `z-index: ${ 1050 + (this.modalInModalCount * 10) };`;
203
- }
204
- return "";
205
- },
206
-
207
- htmlIdModalChild() {
208
- return `modal_child_${ this.modalInModalCount }`;
209
- },
210
-
211
- htmlIdModal() {
212
- return `modal_${ this.modalInModalCount }`;
213
- },
214
-
215
- htmlIdHeader() {
216
- return `modal_header_${ this.modalInModalCount }`;
217
- },
218
-
219
198
  dependencyValues() {
220
199
  const DEPS = {};
221
200
  forEach(this.listFiltered, item => {
@@ -416,7 +395,8 @@ export default {
416
395
  }, [
417
396
  h("div", {
418
397
  ref: "modal",
419
- class: ["a_modal", {
398
+ class: ["a_modal", this.modalClass, {
399
+ a_modal_confirm: this.isConfirm,
420
400
  a_modal_show: !this.isModalHidden
421
401
  }],
422
402
  tabindex: -1,
@@ -496,7 +476,12 @@ export default {
496
476
  ]),
497
477
  ]),
498
478
  !this.isModalHidden && h("div", {
499
- class: "a_backdrop a_backdrop_fade a_backdrop_show",
479
+ class: [
480
+ "a_backdrop a_backdrop_fade a_backdrop_show",
481
+ {
482
+ a_backdrop_confirm: this.isConfirm,
483
+ },
484
+ ],
500
485
  })
501
486
  ]);
502
487
  },
@@ -21,6 +21,7 @@ export default {
21
21
  return {
22
22
  close: closeConfirm,
23
23
  isModalHidden: isModalHidden.value,
24
+ isConfirm: true,
24
25
  ...confirmOptions.value
25
26
  };
26
27
  });
@@ -3,7 +3,6 @@
3
3
  }
4
4
 
5
5
  @import "components/AIcon";
6
- @import "components/ADropdown";
7
6
  @import "components/AResizer";
8
7
  @import "components/ui/ui";
9
8
  @import "components/ATable";
@@ -1,110 +0,0 @@
1
- .a_dropdown {
2
- display: inline-block;
3
- position: relative;
4
- }
5
- .a_dropdown__caret {
6
- margin-left: .5rem;
7
- }
8
-
9
- .a_dropdown__menu {
10
- --a_dropdown_min_width: 10rem;
11
- --a_dropdown_width: 300px;
12
- --a_dropdown_padding_x: 0;
13
- --a_dropdown_padding_y: 0.5rem;
14
- --bs-dropdown-spacer: 0.125rem;
15
- --a_dropdown_font_size: 1rem;
16
- --a_dropdown_color: var(--a_color_text);
17
- --a_dropdown_bg: #fff;
18
- --a_dropdown_border_color: var(--a_border_color);
19
- --a_dropdown_border_radius: var(--a_border_radius);
20
- --a_dropdown_border_width: var(--a_border_width);
21
- --a_dropdown_divider_color: var(--a_color_gray_500);
22
- --a_dropdown_divider_margin_y: 0.5rem;
23
- --a_dropdown_link_color: var(--a_color_text);
24
- --a_dropdown_link_hover_color: #1e2125;
25
- --a_dropdown_link_hover_bg: var(--a_color_gray_200);
26
- --a_dropdown_link_active_color: #fff;
27
- --a_dropdown_link_active_bg: var(--a_color_primary);
28
- --a_dropdown_link_disabled_color: #adb5bd;
29
- --a_dropdown_item_padding_x: 1rem;
30
- --a_dropdown_item_padding_y: 0.25rem;
31
- --a_dropdown_header_color: #6c757d;
32
- --a_dropdown_header_padding_x: 1rem;
33
- --a_dropdown_header_padding_y: 0.5rem;
34
- --a_select_menu_link_focus_color: var(--a_color_focus);
35
-
36
- width: var(--a_dropdown_width);
37
- z-index: 1056;
38
- min-width: var(--a_dropdown_min_width);
39
- padding: var(--a_dropdown_padding_y) var(--a_dropdown_padding_x);
40
- margin: 0;
41
- font-size: var(--a_dropdown_font_size);
42
- color: var(--a_dropdown_color);
43
- text-align: left;
44
- list-style: none;
45
- background-color: var(--a_dropdown_bg);
46
- background-clip: padding-box;
47
- border: var(--a_dropdown_border_width) solid var(--a_dropdown_border_color);
48
- border-radius: var(--a_dropdown_border_radius);
49
- overflow-x: auto;
50
- &:not([data-popper-placement]) {
51
- display: none;
52
- }
53
- }
54
- .a_dropdown__item {
55
- display: block;
56
- width: 100%;
57
- padding: var(--a_dropdown_item_padding_y) var(--a_dropdown_item_padding_x);
58
- clear: both;
59
- font-weight: 400;
60
- color: var(--a_dropdown_link_color);
61
- text-align: inherit;
62
- text-decoration: none;
63
- white-space: nowrap;
64
- background-color: transparent;
65
- border: 0;
66
- font-size: inherit;
67
- &:hover {
68
- color: var(--a_dropdown_link_hover_color);
69
- background-color: var(--a_dropdown_link_hover_bg);
70
- text-decoration: none;
71
- }
72
- &:focus {
73
- box-shadow: inset 0 0 1px 4px var(--a_select_menu_link_focus_color);
74
- outline: none;
75
- text-decoration: none;
76
- }
77
- &.active,
78
- &:active {
79
- color: var(--a_dropdown_link_active_color);
80
- text-decoration: none;
81
- background-color: var(--a_dropdown_link_active_bg);
82
- }
83
- &.disabled,
84
- &:disabled {
85
- color: var(--a_dropdown_link_disabled_color);
86
- pointer-events: none;
87
- background-color: transparent;
88
- }
89
- }
90
- .a_dropdown__item_text {
91
- padding: var(--a_dropdown_item_padding_y) var(--a_dropdown_item_padding_x);
92
- color: var(--a_dropdown_link_color);
93
- }
94
- .a_dropdown__divider {
95
- height: 0;
96
- margin: var(--a_dropdown_divider_margin_y) 0;
97
- overflow: hidden;
98
- border-top: 1px solid var(--a_dropdown_divider_color);
99
- opacity: 1;
100
- }
101
- .a_dropdown__item_header {
102
- display: block;
103
- padding: var(--a_dropdown_header_padding_y) var(--a_dropdown_header_padding_x);
104
- margin-bottom: 0;
105
- font-size: .875rem;
106
- color: var(--a_dropdown_header_color);
107
- white-space: nowrap;
108
- }
109
-
110
-