aloha-vue 1.0.38 → 1.0.41
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 +1 -1
- package/docs/src/views/PageConfirm/PageConfirm.js +1 -0
- package/docs/src/views/PageConfirm/PageConfirm.pug +2 -1
- package/package.json +1 -1
- package/src/AAccordion/AAccordion.js +18 -330
- package/src/AAccordion/AAccordionItem/AAccordionItem.js +64 -47
- package/src/AModal/AModal.js +4 -3
- package/src/compositionAPI/AConfirmAPI.js +3 -1
- package/src/styles/components/ui/ASelect.scss +13 -3
- package/src/ui/ASelect/ASelect.js +79 -76
package/docs/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
import AAccordionItem from "./AAccordionItem/AAccordionItem.vue";
|
|
2
|
-
|
|
3
1
|
import {
|
|
4
2
|
computed,
|
|
5
|
-
|
|
6
|
-
toRefs,
|
|
3
|
+
h,
|
|
7
4
|
} from "vue";
|
|
8
5
|
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
frameworksApi,
|
|
12
|
-
} from "../API/frameworksApi";
|
|
13
|
-
import {
|
|
14
|
-
replaceTextTemplateToASlot,
|
|
15
|
-
} from "../utils/utils";
|
|
6
|
+
import AAccordionItem from "./AAccordionItem/AAccordionItem";
|
|
7
|
+
|
|
16
8
|
import {
|
|
17
9
|
cloneDeep,
|
|
18
10
|
filter,
|
|
@@ -20,198 +12,8 @@ import {
|
|
|
20
12
|
uniqueId,
|
|
21
13
|
} from "lodash-es";
|
|
22
14
|
|
|
23
|
-
const FRAMEWORKS_PARAMETERS = {
|
|
24
|
-
bootstrap: {
|
|
25
|
-
main: {
|
|
26
|
-
tag: "div",
|
|
27
|
-
class: classProps => [
|
|
28
|
-
classProps,
|
|
29
|
-
"accordion",
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
item: {
|
|
33
|
-
tag: "div",
|
|
34
|
-
class: classProps => [
|
|
35
|
-
classProps,
|
|
36
|
-
"accordion-item",
|
|
37
|
-
],
|
|
38
|
-
},
|
|
39
|
-
itemHeader: {
|
|
40
|
-
tag: "div",
|
|
41
|
-
class: classProps => [
|
|
42
|
-
classProps,
|
|
43
|
-
"accordion-header",
|
|
44
|
-
],
|
|
45
|
-
},
|
|
46
|
-
itemHeaderButton: {
|
|
47
|
-
tag: "button",
|
|
48
|
-
class: (classProps, isOpen) => [
|
|
49
|
-
classProps,
|
|
50
|
-
"accordion-button",
|
|
51
|
-
{
|
|
52
|
-
collapsed: !isOpen,
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
},
|
|
56
|
-
boxCollapse: {
|
|
57
|
-
tag: "div",
|
|
58
|
-
class: (classProps, isOpen) => [
|
|
59
|
-
classProps,
|
|
60
|
-
"accordion-collapse collapse",
|
|
61
|
-
{
|
|
62
|
-
show: isOpen,
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
},
|
|
66
|
-
boxCollapseBody: {
|
|
67
|
-
tag: "div",
|
|
68
|
-
class: classProps => [
|
|
69
|
-
classProps,
|
|
70
|
-
"accordion-body",
|
|
71
|
-
],
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
foundation: {
|
|
75
|
-
main: {
|
|
76
|
-
tag: "ul",
|
|
77
|
-
class: classProps => [
|
|
78
|
-
classProps,
|
|
79
|
-
"accordion",
|
|
80
|
-
],
|
|
81
|
-
},
|
|
82
|
-
item: {
|
|
83
|
-
tag: "li",
|
|
84
|
-
class: (classProps, isOpen) => [
|
|
85
|
-
classProps,
|
|
86
|
-
"accordion-item",
|
|
87
|
-
{
|
|
88
|
-
"is-active": isOpen,
|
|
89
|
-
},
|
|
90
|
-
],
|
|
91
|
-
},
|
|
92
|
-
itemHeader: {
|
|
93
|
-
tag: "template",
|
|
94
|
-
class: () => [],
|
|
95
|
-
},
|
|
96
|
-
itemHeaderButton: {
|
|
97
|
-
tag: "a",
|
|
98
|
-
class: classProps => [
|
|
99
|
-
classProps,
|
|
100
|
-
"accordion-title",
|
|
101
|
-
],
|
|
102
|
-
},
|
|
103
|
-
boxCollapse: {
|
|
104
|
-
tag: "div",
|
|
105
|
-
class: classProps => [
|
|
106
|
-
classProps,
|
|
107
|
-
"accordion-content",
|
|
108
|
-
],
|
|
109
|
-
},
|
|
110
|
-
boxCollapseBody: {
|
|
111
|
-
tag: "template",
|
|
112
|
-
class: () => [],
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
uikit: {
|
|
116
|
-
main: {
|
|
117
|
-
tag: "ul",
|
|
118
|
-
class: classProps => [
|
|
119
|
-
classProps,
|
|
120
|
-
"uk-accordion",
|
|
121
|
-
],
|
|
122
|
-
},
|
|
123
|
-
item: {
|
|
124
|
-
tag: "li",
|
|
125
|
-
class: (classProps, isOpen) => [
|
|
126
|
-
classProps,
|
|
127
|
-
{
|
|
128
|
-
"uk-open": isOpen
|
|
129
|
-
},
|
|
130
|
-
],
|
|
131
|
-
},
|
|
132
|
-
itemHeader: {
|
|
133
|
-
tag: "template",
|
|
134
|
-
class: () => [],
|
|
135
|
-
},
|
|
136
|
-
itemHeaderButton: {
|
|
137
|
-
tag: "a",
|
|
138
|
-
class: classProps => [
|
|
139
|
-
classProps,
|
|
140
|
-
"uk-accordion-title",
|
|
141
|
-
],
|
|
142
|
-
},
|
|
143
|
-
boxCollapse: {
|
|
144
|
-
tag: "div",
|
|
145
|
-
class: (classProps, isOpen) => [
|
|
146
|
-
classProps,
|
|
147
|
-
"uk-accordion-content",
|
|
148
|
-
{
|
|
149
|
-
"uk-hidden": !isOpen,
|
|
150
|
-
},
|
|
151
|
-
],
|
|
152
|
-
},
|
|
153
|
-
boxCollapseBody: {
|
|
154
|
-
tag: "template",
|
|
155
|
-
class: () => [],
|
|
156
|
-
},
|
|
157
|
-
},
|
|
158
|
-
bulma: {
|
|
159
|
-
main: {
|
|
160
|
-
tag: "div",
|
|
161
|
-
class: classProps => [
|
|
162
|
-
classProps,
|
|
163
|
-
"",
|
|
164
|
-
],
|
|
165
|
-
},
|
|
166
|
-
item: {
|
|
167
|
-
tag: "div",
|
|
168
|
-
class: classProps => [
|
|
169
|
-
classProps,
|
|
170
|
-
"card",
|
|
171
|
-
],
|
|
172
|
-
},
|
|
173
|
-
itemHeader: {
|
|
174
|
-
tag: "header",
|
|
175
|
-
class: classProps => [
|
|
176
|
-
classProps,
|
|
177
|
-
"card-header",
|
|
178
|
-
],
|
|
179
|
-
},
|
|
180
|
-
itemHeaderButton: {
|
|
181
|
-
tag: "div",
|
|
182
|
-
class: (classProps, isOpen) => [
|
|
183
|
-
classProps,
|
|
184
|
-
"card-header-title is-clickable",
|
|
185
|
-
{
|
|
186
|
-
collapsed: !isOpen,
|
|
187
|
-
},
|
|
188
|
-
],
|
|
189
|
-
},
|
|
190
|
-
boxCollapse: {
|
|
191
|
-
tag: "div",
|
|
192
|
-
class: (classProps, isOpen) => [
|
|
193
|
-
classProps,
|
|
194
|
-
"card-content",
|
|
195
|
-
{
|
|
196
|
-
"is-hidden": !isOpen,
|
|
197
|
-
},
|
|
198
|
-
],
|
|
199
|
-
},
|
|
200
|
-
boxCollapseBody: {
|
|
201
|
-
tag: "div",
|
|
202
|
-
class: classProps => [
|
|
203
|
-
classProps,
|
|
204
|
-
"content",
|
|
205
|
-
],
|
|
206
|
-
},
|
|
207
|
-
},
|
|
208
|
-
};
|
|
209
|
-
|
|
210
15
|
export default {
|
|
211
16
|
name: "AAccordion",
|
|
212
|
-
components: {
|
|
213
|
-
AAccordionItem,
|
|
214
|
-
},
|
|
215
17
|
provide() {
|
|
216
18
|
return {
|
|
217
19
|
id: computed(() => this.id),
|
|
@@ -219,7 +21,6 @@ export default {
|
|
|
219
21
|
keyList: computed(() => this.keyList),
|
|
220
22
|
keyLabel: computed(() => this.keyLabel),
|
|
221
23
|
keyContent: computed(() => this.keyContent),
|
|
222
|
-
classBoxCollapseBodyContent: computed(() => this.classBoxCollapseBodyContent),
|
|
223
24
|
};
|
|
224
25
|
},
|
|
225
26
|
props: {
|
|
@@ -255,70 +56,6 @@ export default {
|
|
|
255
56
|
required: false,
|
|
256
57
|
default: "content",
|
|
257
58
|
},
|
|
258
|
-
classMain: {
|
|
259
|
-
type: String,
|
|
260
|
-
required: false,
|
|
261
|
-
default: "",
|
|
262
|
-
},
|
|
263
|
-
classItem: {
|
|
264
|
-
type: String,
|
|
265
|
-
required: false,
|
|
266
|
-
default: "",
|
|
267
|
-
},
|
|
268
|
-
classItemHeader: {
|
|
269
|
-
type: String,
|
|
270
|
-
required: false,
|
|
271
|
-
default: "",
|
|
272
|
-
},
|
|
273
|
-
classItemHeaderButton: {
|
|
274
|
-
type: String,
|
|
275
|
-
required: false,
|
|
276
|
-
default: "",
|
|
277
|
-
},
|
|
278
|
-
classBoxCollapse: {
|
|
279
|
-
type: String,
|
|
280
|
-
required: false,
|
|
281
|
-
default: "",
|
|
282
|
-
},
|
|
283
|
-
classBoxCollapseBody: {
|
|
284
|
-
type: String,
|
|
285
|
-
required: false,
|
|
286
|
-
default: "",
|
|
287
|
-
},
|
|
288
|
-
classBoxCollapseBodyContent: {
|
|
289
|
-
type: String,
|
|
290
|
-
required: false,
|
|
291
|
-
default: "",
|
|
292
|
-
},
|
|
293
|
-
tag: {
|
|
294
|
-
type: String,
|
|
295
|
-
required: false,
|
|
296
|
-
},
|
|
297
|
-
tagItem: {
|
|
298
|
-
type: String,
|
|
299
|
-
required: false,
|
|
300
|
-
},
|
|
301
|
-
tagItemHeader: {
|
|
302
|
-
type: String,
|
|
303
|
-
required: false,
|
|
304
|
-
},
|
|
305
|
-
tagItemHeaderButton: {
|
|
306
|
-
type: String,
|
|
307
|
-
required: false,
|
|
308
|
-
},
|
|
309
|
-
tagBoxCollapse: {
|
|
310
|
-
type: String,
|
|
311
|
-
required: false,
|
|
312
|
-
},
|
|
313
|
-
tagBoxCollapseBody: {
|
|
314
|
-
type: String,
|
|
315
|
-
required: false,
|
|
316
|
-
},
|
|
317
|
-
tagBoxCollapseBodyContent: {
|
|
318
|
-
type: String,
|
|
319
|
-
required: false,
|
|
320
|
-
default: "div",
|
|
321
|
-
},
|
|
322
59
|
stop: {
|
|
323
60
|
type: Boolean,
|
|
324
61
|
required: false,
|
|
@@ -327,72 +64,8 @@ export default {
|
|
|
327
64
|
type: Boolean,
|
|
328
65
|
required: false,
|
|
329
66
|
},
|
|
330
|
-
framework: {
|
|
331
|
-
type: String,
|
|
332
|
-
required: false,
|
|
333
|
-
validator: framework => frameworks.indexOf(framework) !== -1,
|
|
334
|
-
},
|
|
335
67
|
},
|
|
336
68
|
emits: ["toggle"],
|
|
337
|
-
setup(props) {
|
|
338
|
-
const {
|
|
339
|
-
classMain,
|
|
340
|
-
classItem,
|
|
341
|
-
classItemHeader,
|
|
342
|
-
classItemHeaderButton,
|
|
343
|
-
classBoxCollapse,
|
|
344
|
-
classBoxCollapseBody,
|
|
345
|
-
tag,
|
|
346
|
-
tagItem,
|
|
347
|
-
tagItemHeader,
|
|
348
|
-
tagItemHeaderButton,
|
|
349
|
-
tagBoxCollapse,
|
|
350
|
-
tagBoxCollapseBody,
|
|
351
|
-
tagBoxCollapseBodyContent,
|
|
352
|
-
} = toRefs(props);
|
|
353
|
-
const {
|
|
354
|
-
frameworkLocal,
|
|
355
|
-
isBootstrap,
|
|
356
|
-
isFoundation,
|
|
357
|
-
} = frameworksApi(props);
|
|
358
|
-
|
|
359
|
-
provide("isBootstrap", isBootstrap);
|
|
360
|
-
provide("isFoundation", isFoundation);
|
|
361
|
-
|
|
362
|
-
const currentFrameworkOptions = computed(() => {
|
|
363
|
-
return FRAMEWORKS_PARAMETERS[frameworkLocal.value];
|
|
364
|
-
});
|
|
365
|
-
|
|
366
|
-
const tagsLocal = computed(() => {
|
|
367
|
-
return {
|
|
368
|
-
main: replaceTextTemplateToASlot(tag.value || currentFrameworkOptions.value.main.tag),
|
|
369
|
-
item: replaceTextTemplateToASlot(tagItem.value || currentFrameworkOptions.value.item.tag),
|
|
370
|
-
itemHeader: replaceTextTemplateToASlot(tagItemHeader.value || currentFrameworkOptions.value.itemHeader.tag),
|
|
371
|
-
itemHeaderButton: replaceTextTemplateToASlot(tagItemHeaderButton.value || currentFrameworkOptions.value.itemHeaderButton.tag),
|
|
372
|
-
boxCollapse: replaceTextTemplateToASlot(tagBoxCollapse.value || currentFrameworkOptions.value.boxCollapse.tag),
|
|
373
|
-
boxCollapseBody: replaceTextTemplateToASlot(tagBoxCollapseBody.value || currentFrameworkOptions.value.boxCollapseBody.tag),
|
|
374
|
-
boxCollapseBodyContent: replaceTextTemplateToASlot(tagBoxCollapseBodyContent.value),
|
|
375
|
-
};
|
|
376
|
-
});
|
|
377
|
-
provide("currentFrameworkOptions", currentFrameworkOptions);
|
|
378
|
-
provide("tagsLocal", tagsLocal);
|
|
379
|
-
|
|
380
|
-
const classMainLocal = computed(() => {
|
|
381
|
-
return currentFrameworkOptions.value.main.class(classMain.value);
|
|
382
|
-
});
|
|
383
|
-
provide("classMainLocal", classMainLocal);
|
|
384
|
-
provide("classItem", classItem);
|
|
385
|
-
provide("classItemHeader", classItemHeader);
|
|
386
|
-
provide("classItemHeaderButton", classItemHeaderButton);
|
|
387
|
-
provide("classBoxCollapse", classBoxCollapse);
|
|
388
|
-
provide("classBoxCollapseBody", classBoxCollapseBody);
|
|
389
|
-
return {
|
|
390
|
-
classMainLocal,
|
|
391
|
-
isBootstrap,
|
|
392
|
-
isFoundation,
|
|
393
|
-
tagsLocal,
|
|
394
|
-
};
|
|
395
|
-
},
|
|
396
69
|
data() {
|
|
397
70
|
return {
|
|
398
71
|
indexesForOpen: [],
|
|
@@ -439,4 +112,19 @@ export default {
|
|
|
439
112
|
}
|
|
440
113
|
},
|
|
441
114
|
},
|
|
115
|
+
render() {
|
|
116
|
+
return h("div", {
|
|
117
|
+
class: "a_accordion",
|
|
118
|
+
}, [
|
|
119
|
+
this.items.map((item, itemIndex) => {
|
|
120
|
+
return h(AAccordionItem, {
|
|
121
|
+
key: itemIndex,
|
|
122
|
+
item,
|
|
123
|
+
itemIndex,
|
|
124
|
+
isParentOpen: true,
|
|
125
|
+
onToggle: this.toggle,
|
|
126
|
+
}, this.$slots);
|
|
127
|
+
}),
|
|
128
|
+
]);
|
|
129
|
+
},
|
|
442
130
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import ASlot from "../../ASlot/ASlot.vue";
|
|
2
|
-
|
|
3
1
|
import {
|
|
4
2
|
computed,
|
|
3
|
+
h,
|
|
5
4
|
inject,
|
|
5
|
+
resolveComponent,
|
|
6
6
|
toRefs,
|
|
7
7
|
} from "vue";
|
|
8
|
+
|
|
8
9
|
import {
|
|
9
10
|
cloneDeep,
|
|
10
11
|
get,
|
|
@@ -12,9 +13,6 @@ import {
|
|
|
12
13
|
|
|
13
14
|
export default {
|
|
14
15
|
name: "AAccordionItem",
|
|
15
|
-
components: {
|
|
16
|
-
ASlot,
|
|
17
|
-
},
|
|
18
16
|
props: {
|
|
19
17
|
item: {
|
|
20
18
|
type: Object,
|
|
@@ -36,14 +34,11 @@ export default {
|
|
|
36
34
|
},
|
|
37
35
|
emits: ["toggle"],
|
|
38
36
|
inject: [
|
|
39
|
-
"classBoxCollapseBodyContent",
|
|
40
37
|
"id",
|
|
41
38
|
"indexesForOpen",
|
|
42
|
-
"isFoundation",
|
|
43
39
|
"keyList",
|
|
44
40
|
"keyLabel",
|
|
45
41
|
"keyContent",
|
|
46
|
-
"tagsLocal",
|
|
47
42
|
],
|
|
48
43
|
setup(props) {
|
|
49
44
|
const {
|
|
@@ -51,13 +46,6 @@ export default {
|
|
|
51
46
|
itemIndex,
|
|
52
47
|
parentIndexes,
|
|
53
48
|
} = toRefs(props);
|
|
54
|
-
const classMainLocal = inject("classMainLocal");
|
|
55
|
-
const currentFrameworkOptions = inject("currentFrameworkOptions");
|
|
56
|
-
const classItem = inject("classItem");
|
|
57
|
-
const classItemHeader = inject("classItemHeader");
|
|
58
|
-
const classItemHeaderButton = inject("classItemHeaderButton");
|
|
59
|
-
const classBoxCollapse = inject("classBoxCollapse");
|
|
60
|
-
const classBoxCollapseBody = inject("classBoxCollapseBody");
|
|
61
49
|
|
|
62
50
|
const indexesForOpen = inject("indexesForOpen");
|
|
63
51
|
const parentIndexesString = computed(() => {
|
|
@@ -78,29 +66,7 @@ export default {
|
|
|
78
66
|
return indexesForOpen.value.indexOf(currentIndex.value) !== -1;
|
|
79
67
|
});
|
|
80
68
|
|
|
81
|
-
const classItemLocal = computed(() => {
|
|
82
|
-
return currentFrameworkOptions.value.item.class(classItem.value, isOpen.value);
|
|
83
|
-
});
|
|
84
|
-
const classItemHeaderLocal = computed(() => {
|
|
85
|
-
return currentFrameworkOptions.value.itemHeader.class(classItemHeader.value, isOpen.value);
|
|
86
|
-
});
|
|
87
|
-
const classItemHeaderButtonLocal = computed(() => {
|
|
88
|
-
return currentFrameworkOptions.value.itemHeaderButton.class(classItemHeaderButton.value, isOpen.value);
|
|
89
|
-
});
|
|
90
|
-
const classBoxCollapseLocal = computed(() => {
|
|
91
|
-
return currentFrameworkOptions.value.boxCollapse.class(classBoxCollapse.value, isOpen.value);
|
|
92
|
-
});
|
|
93
|
-
const classBoxCollapseBodyLocal = computed(() => {
|
|
94
|
-
return currentFrameworkOptions.value.boxCollapseBody.class(classBoxCollapseBody.value, isOpen.value);
|
|
95
|
-
});
|
|
96
|
-
|
|
97
69
|
return {
|
|
98
|
-
classMainLocal,
|
|
99
|
-
classItemLocal,
|
|
100
|
-
classItemHeaderLocal,
|
|
101
|
-
classItemHeaderButtonLocal,
|
|
102
|
-
classBoxCollapseLocal,
|
|
103
|
-
classBoxCollapseBodyLocal,
|
|
104
70
|
currentIndex,
|
|
105
71
|
isOpen,
|
|
106
72
|
};
|
|
@@ -120,10 +86,6 @@ export default {
|
|
|
120
86
|
return PARENT_INDEXES;
|
|
121
87
|
},
|
|
122
88
|
|
|
123
|
-
ariaExpanded() {
|
|
124
|
-
return `${ this.isOpen }`;
|
|
125
|
-
},
|
|
126
|
-
|
|
127
89
|
idForCollapse() {
|
|
128
90
|
return `${ this.id }_${ this.currentIndex.replace(/\./g, "_") }`;
|
|
129
91
|
},
|
|
@@ -139,12 +101,6 @@ export default {
|
|
|
139
101
|
return get(this.item, this.keyContent);
|
|
140
102
|
}
|
|
141
103
|
},
|
|
142
|
-
|
|
143
|
-
styleBoxCollapse() {
|
|
144
|
-
if (this.isFoundation && this.isOpen) {
|
|
145
|
-
return "display: block;";
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
104
|
},
|
|
149
105
|
methods: {
|
|
150
106
|
toggle($event) {
|
|
@@ -159,4 +115,65 @@ export default {
|
|
|
159
115
|
this.$emit("toggle", arg);
|
|
160
116
|
},
|
|
161
117
|
},
|
|
118
|
+
render() {
|
|
119
|
+
return h("div", {
|
|
120
|
+
class: "a_accordion__item",
|
|
121
|
+
}, [
|
|
122
|
+
h("div", {
|
|
123
|
+
class: "a_accordion__header",
|
|
124
|
+
}, [
|
|
125
|
+
h("button", {
|
|
126
|
+
class: ["a_accordion__button", {
|
|
127
|
+
a_accordion__button_collapsed: !this.isOpen,
|
|
128
|
+
}],
|
|
129
|
+
ariaExpanded: this.isOpen,
|
|
130
|
+
"aria-controls": this.idForCollapse,
|
|
131
|
+
type: "button",
|
|
132
|
+
onClick: this.toggle,
|
|
133
|
+
}, [
|
|
134
|
+
this.$slots.button && this.$slots.button({
|
|
135
|
+
item: this.item,
|
|
136
|
+
itemIndex: this.itemIndex,
|
|
137
|
+
parentIndexes: this.parentIndexes,
|
|
138
|
+
}),
|
|
139
|
+
this.labelLocal && h("span", {
|
|
140
|
+
innerHTML: this.labelLocal,
|
|
141
|
+
}),
|
|
142
|
+
]),
|
|
143
|
+
]),
|
|
144
|
+
h("div", {
|
|
145
|
+
id: this.idForCollapse,
|
|
146
|
+
class: ["a_accordion__collapse_box", {
|
|
147
|
+
a_accordion__collapse_box_show: this.isOpen,
|
|
148
|
+
}],
|
|
149
|
+
}, [
|
|
150
|
+
h("div", {
|
|
151
|
+
class: "a_accordion__body",
|
|
152
|
+
}, [
|
|
153
|
+
this.$slots.content && this.$slots.content({
|
|
154
|
+
item: this.item,
|
|
155
|
+
itemIndex: this.itemIndex,
|
|
156
|
+
parentIndexes: this.parentIndexes,
|
|
157
|
+
}),
|
|
158
|
+
this.contentLocal && h("div", {
|
|
159
|
+
innerHTML: this.contentLocal,
|
|
160
|
+
}),
|
|
161
|
+
this.hasChildren && h("div", {
|
|
162
|
+
class: "a_accordion",
|
|
163
|
+
}, [
|
|
164
|
+
this.children.map((itemChild, itemChildIndex) => {
|
|
165
|
+
return h(resolveComponent("AAccordionItem"), {
|
|
166
|
+
key: itemChildIndex,
|
|
167
|
+
item: itemChild,
|
|
168
|
+
itemIndex: itemChildIndex,
|
|
169
|
+
isParentOpen: this.isOpen,
|
|
170
|
+
parentIndexes: this.parentIndexesForChild,
|
|
171
|
+
onToggle: this.toggleFromChild,
|
|
172
|
+
}, this.$slots);
|
|
173
|
+
}),
|
|
174
|
+
]),
|
|
175
|
+
]),
|
|
176
|
+
])
|
|
177
|
+
]);
|
|
178
|
+
},
|
|
162
179
|
};
|
package/src/AModal/AModal.js
CHANGED
|
@@ -355,11 +355,12 @@ export default {
|
|
|
355
355
|
if (!this.selectorClose) {
|
|
356
356
|
return;
|
|
357
357
|
}
|
|
358
|
+
const SELECTOR_CLOSE = this.selectorClose;
|
|
358
359
|
setTimeout(() => {
|
|
359
|
-
if (isString(
|
|
360
|
-
this.onFocusByDestroyForSelector({ selector:
|
|
360
|
+
if (isString(SELECTOR_CLOSE)) {
|
|
361
|
+
this.onFocusByDestroyForSelector({ selector: SELECTOR_CLOSE });
|
|
361
362
|
} else {
|
|
362
|
-
forEach(
|
|
363
|
+
forEach(SELECTOR_CLOSE, selector => {
|
|
363
364
|
const STATUS_SUCCESS = this.onFocusByDestroyForSelector({ selector });
|
|
364
365
|
if (STATUS_SUCCESS) {
|
|
365
366
|
return false;
|
|
@@ -38,8 +38,10 @@ export default function AConfirmAPI() {
|
|
|
38
38
|
if (isFunction(confirmOptions.value.close)) {
|
|
39
39
|
confirmOptions.value.close();
|
|
40
40
|
}
|
|
41
|
-
confirmOptions.value = {};
|
|
42
41
|
isModalHidden.value = true;
|
|
42
|
+
setTimeout(() => {
|
|
43
|
+
confirmOptions.value = {};
|
|
44
|
+
});
|
|
43
45
|
};
|
|
44
46
|
|
|
45
47
|
return {
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
--a_select_divider_margin_y: 0.5rem;
|
|
35
35
|
--a_select_divider_bg: var(--a_color_gray_300);
|
|
36
36
|
--a_select_border_radius: var(--a_border_radius);
|
|
37
|
+
--a_select_menu_max_height: 250px;
|
|
37
38
|
--a_select_menu_link_color: var(--a_color_text);
|
|
38
39
|
--a_select_menu_link_hover_color: var(--a_color_text);
|
|
39
40
|
--a_select_menu_link_hover_bg: var(--a_color_gray_200);
|
|
@@ -47,7 +48,6 @@
|
|
|
47
48
|
background-color: #fff;
|
|
48
49
|
border: 1px solid grey;
|
|
49
50
|
padding: 10px;
|
|
50
|
-
overflow: auto;
|
|
51
51
|
border-radius: var(--a_select_border_radius);
|
|
52
52
|
&[data-popper-reference-hidden] {
|
|
53
53
|
visibility: hidden !important;
|
|
@@ -58,6 +58,10 @@
|
|
|
58
58
|
right: 0;
|
|
59
59
|
left: auto;
|
|
60
60
|
}
|
|
61
|
+
.a_select_menu__child {
|
|
62
|
+
max-height: var(--a_select_menu_max_height);
|
|
63
|
+
overflow: auto;
|
|
64
|
+
}
|
|
61
65
|
|
|
62
66
|
.a_select_list {
|
|
63
67
|
overflow: auto;
|
|
@@ -80,10 +84,12 @@
|
|
|
80
84
|
text-align: left;
|
|
81
85
|
padding: 2px 4px 2px 25px;
|
|
82
86
|
border: none;
|
|
83
|
-
white-space: nowrap;
|
|
84
87
|
cursor: pointer;
|
|
85
88
|
background-color: transparent;
|
|
86
89
|
color: var(--a_select_menu_link_color);
|
|
90
|
+
word-wrap: break-word;
|
|
91
|
+
word-break: break-word;
|
|
92
|
+
hyphens: auto;
|
|
87
93
|
&:hover {
|
|
88
94
|
background-color: var(--a_select_menu_link_hover_bg);
|
|
89
95
|
color: var(--a_select_menu_link_hover_color);
|
|
@@ -101,7 +107,8 @@
|
|
|
101
107
|
display: block;
|
|
102
108
|
background-color: inherit;
|
|
103
109
|
position: absolute;
|
|
104
|
-
top:
|
|
110
|
+
top: 50%;
|
|
111
|
+
transform: translateY(-50%);
|
|
105
112
|
left: 5px;
|
|
106
113
|
> .a_icon {
|
|
107
114
|
vertical-align: inherit;
|
|
@@ -136,6 +143,9 @@
|
|
|
136
143
|
padding-left: .5rem;
|
|
137
144
|
padding-right: .5rem;
|
|
138
145
|
border-radius: var(--a_select_border_radius);
|
|
146
|
+
word-wrap: break-word;
|
|
147
|
+
word-break: break-word;
|
|
148
|
+
hyphens: auto;
|
|
139
149
|
}
|
|
140
150
|
|
|
141
151
|
.a_select__ul_closeable__item__btn {
|
|
@@ -501,89 +501,92 @@ export default {
|
|
|
501
501
|
class: "a_select__divider",
|
|
502
502
|
ariaHidden: true,
|
|
503
503
|
}),
|
|
504
|
-
|
|
505
|
-
class: "
|
|
506
|
-
role: "option",
|
|
507
|
-
tabindex: "-1",
|
|
508
|
-
onClick: this.onSelectAll,
|
|
509
|
-
onKeydown: this.onKeydownSelectAll,
|
|
504
|
+
h("div", {
|
|
505
|
+
class: "a_select_menu__child",
|
|
510
506
|
}, [
|
|
511
|
-
h("
|
|
512
|
-
class: "
|
|
507
|
+
(this.isMultiselect && this.isSelectAll) && h("div", {
|
|
508
|
+
class: "a_select__menu__link a_select__menu__link_selected a_select__element_clickable",
|
|
509
|
+
role: "option",
|
|
510
|
+
tabindex: "-1",
|
|
511
|
+
onClick: this.onSelectAll,
|
|
512
|
+
onKeydown: this.onKeydownSelectAll,
|
|
513
513
|
}, [
|
|
514
|
-
h(
|
|
515
|
-
|
|
516
|
-
}
|
|
514
|
+
h("span", {
|
|
515
|
+
class: "a_select__menu__link__icon_box",
|
|
516
|
+
}, [
|
|
517
|
+
h(AIcon, {
|
|
518
|
+
icon: "Ok",
|
|
519
|
+
}),
|
|
520
|
+
]),
|
|
521
|
+
h("span", null, this.textSelectAll),
|
|
517
522
|
]),
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
onClick: this.onDeselectAll,
|
|
525
|
-
onKeydown: this.onKeydownDeselectAll,
|
|
526
|
-
}, [
|
|
527
|
-
h("span", {
|
|
528
|
-
class: "a_select__menu__link__icon_box",
|
|
523
|
+
(this.isMultiselect && this.isDeselectAll) && h("div", {
|
|
524
|
+
class: "a_select__menu__link a_select__menu__link_selected a_select__element_clickable",
|
|
525
|
+
role: "option",
|
|
526
|
+
tabindex: "-1",
|
|
527
|
+
onClick: this.onDeselectAll,
|
|
528
|
+
onKeydown: this.onKeydownDeselectAll,
|
|
529
529
|
}, [
|
|
530
|
-
h(
|
|
531
|
-
|
|
532
|
-
}
|
|
530
|
+
h("span", {
|
|
531
|
+
class: "a_select__menu__link__icon_box",
|
|
532
|
+
}, [
|
|
533
|
+
h(AIcon, {
|
|
534
|
+
icon: "Close",
|
|
535
|
+
}),
|
|
536
|
+
]),
|
|
537
|
+
h("span", null, this.textDeselectAll),
|
|
533
538
|
]),
|
|
534
|
-
h("
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
class: "a_select__divider",
|
|
538
|
-
ariaHidden: true,
|
|
539
|
-
}),
|
|
540
|
-
|
|
541
|
-
this.keyGroup && h(ASlot, null, () => [
|
|
542
|
-
...this.dataGrouped.dataKeyByGroup._not_grouped.map(item => {
|
|
543
|
-
return h(ASelectElement, {
|
|
544
|
-
data: item,
|
|
545
|
-
modelValue: this.modelValue,
|
|
546
|
-
modelSearch: this.modelSearch,
|
|
547
|
-
isElementHiddenWithSearch: this.elementsHiddenWithSearch[item[AKeyId]],
|
|
548
|
-
isSelected: false,
|
|
549
|
-
isMultiselect: this.isMultiselect,
|
|
550
|
-
disabled: this.disabled,
|
|
551
|
-
onChangeModelValue: this.onChangeModelValue,
|
|
552
|
-
});
|
|
553
|
-
}),
|
|
554
|
-
...this.dataGrouped.groups.map((groupItem, groupIndex) => {
|
|
555
|
-
return h(ASelectGroup, {
|
|
556
|
-
id: this.htmlIdLocal,
|
|
557
|
-
groupElements: this.dataGrouped.dataKeyByGroup[groupItem.groupKey],
|
|
558
|
-
groupLabel: groupItem.groupLabel,
|
|
559
|
-
groupIndex: groupIndex,
|
|
560
|
-
modelValue: this.modelValue,
|
|
561
|
-
modelSearch: this.modelSearch,
|
|
562
|
-
elementsHiddenWithSearch: this.elementsHiddenWithSearch,
|
|
563
|
-
isSelected: false,
|
|
564
|
-
isMultiselect: this.isMultiselect,
|
|
565
|
-
disabled: this.disabled,
|
|
566
|
-
onChangeModelValue: this.onChangeModelValue,
|
|
567
|
-
});
|
|
568
|
-
}),
|
|
569
|
-
]),
|
|
570
|
-
!this.keyGroup && h(ASlot, null, () => [
|
|
571
|
-
...this.dataFiltered.map(item => {
|
|
572
|
-
return h(ASelectElement, {
|
|
573
|
-
data: item,
|
|
574
|
-
modelValue: this.modelValue,
|
|
575
|
-
modelSearch: this.modelSearch,
|
|
576
|
-
isElementHiddenWithSearch: this.elementsHiddenWithSearch[item[AKeyId]],
|
|
577
|
-
isSelected: false,
|
|
578
|
-
isMultiselect: this.isMultiselect,
|
|
579
|
-
disabled: this.disabled,
|
|
580
|
-
onChangeModelValue: this.onChangeModelValue,
|
|
581
|
-
});
|
|
539
|
+
(this.isDividerSelectDeselectVisible) && h("div", {
|
|
540
|
+
class: "a_select__divider",
|
|
541
|
+
ariaHidden: true,
|
|
582
542
|
}),
|
|
543
|
+
this.keyGroup && h(ASlot, null, () => [
|
|
544
|
+
...this.dataGrouped.dataKeyByGroup._not_grouped.map(item => {
|
|
545
|
+
return h(ASelectElement, {
|
|
546
|
+
data: item,
|
|
547
|
+
modelValue: this.modelValue,
|
|
548
|
+
modelSearch: this.modelSearch,
|
|
549
|
+
isElementHiddenWithSearch: this.elementsHiddenWithSearch[item[AKeyId]],
|
|
550
|
+
isSelected: false,
|
|
551
|
+
isMultiselect: this.isMultiselect,
|
|
552
|
+
disabled: this.disabled,
|
|
553
|
+
onChangeModelValue: this.onChangeModelValue,
|
|
554
|
+
});
|
|
555
|
+
}),
|
|
556
|
+
...this.dataGrouped.groups.map((groupItem, groupIndex) => {
|
|
557
|
+
return h(ASelectGroup, {
|
|
558
|
+
id: this.htmlIdLocal,
|
|
559
|
+
groupElements: this.dataGrouped.dataKeyByGroup[groupItem.groupKey],
|
|
560
|
+
groupLabel: groupItem.groupLabel,
|
|
561
|
+
groupIndex: groupIndex,
|
|
562
|
+
modelValue: this.modelValue,
|
|
563
|
+
modelSearch: this.modelSearch,
|
|
564
|
+
elementsHiddenWithSearch: this.elementsHiddenWithSearch,
|
|
565
|
+
isSelected: false,
|
|
566
|
+
isMultiselect: this.isMultiselect,
|
|
567
|
+
disabled: this.disabled,
|
|
568
|
+
onChangeModelValue: this.onChangeModelValue,
|
|
569
|
+
});
|
|
570
|
+
}),
|
|
571
|
+
]),
|
|
572
|
+
!this.keyGroup && h(ASlot, null, () => [
|
|
573
|
+
...this.dataFiltered.map(item => {
|
|
574
|
+
return h(ASelectElement, {
|
|
575
|
+
data: item,
|
|
576
|
+
modelValue: this.modelValue,
|
|
577
|
+
modelSearch: this.modelSearch,
|
|
578
|
+
isElementHiddenWithSearch: this.elementsHiddenWithSearch[item[AKeyId]],
|
|
579
|
+
isSelected: false,
|
|
580
|
+
isMultiselect: this.isMultiselect,
|
|
581
|
+
disabled: this.disabled,
|
|
582
|
+
onChangeModelValue: this.onChangeModelValue,
|
|
583
|
+
});
|
|
584
|
+
}),
|
|
585
|
+
]),
|
|
586
|
+
this.isAllElementsHidden && h("span", {
|
|
587
|
+
class: "a_select_not_items",
|
|
588
|
+
}, "[Keine Auswahl]"),
|
|
583
589
|
]),
|
|
584
|
-
this.isAllElementsHidden && h("span", {
|
|
585
|
-
class: "a_select_not_items",
|
|
586
|
-
}, "[Keine Auswahl]"),
|
|
587
590
|
]),
|
|
588
591
|
]),
|
|
589
592
|
]),
|