aloha-vue 2.74.0 → 2.75.1
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/CHANGELOG.md +12 -0
- package/LICENSE +22 -21
- package/dist/aloha-vue.css +105 -105
- package/dist/aloha-vue.css.map +1 -1
- package/dist/aloha-vue.es.js +59267 -64918
- package/dist/aloha-vue.umd.js +338 -211
- package/package.json +27 -34
- package/scss/components/ATable.scss +2 -2
- package/scss/utils/button.scss +362 -362
- package/scss/utils/funktions.scss +162 -162
- package/src/AAccordion/AAccordionItem/AAccordionItem.js +235 -230
- package/src/ACarousel/ACarousel.js +7 -2
- package/src/ADropdown/ADropdown.js +4 -1
- package/src/AFilters/AFilterCenter/AFilterCenter.js +5 -1
- package/src/AFilters/AFilterCenter/AFilterCenterItem/AFilterCenterItem.js +7 -2
- package/src/AFilters/AFiltersHorizontal/AFiltersHorizontal.js +412 -396
- package/src/AFilters/AFiltersHorizontal/AFiltersHorizontalFilter/AFiltersHorizontalFilter.js +102 -99
- package/src/AFilters/AFiltersHorizontal/compositionAPI/FiltersSavedDeleteAPI.js +108 -108
- package/src/AFilters/AFiltersMain/AFiltersMain.js +114 -111
- package/src/AFilters/AFiltersSaveModal/compositionAPI/SaveAPI.js +65 -65
- package/src/ALinkCopy/ALinkCopy.js +98 -95
- package/src/ALinkCopy/compositionAPI/CopyAPI.js +48 -48
- package/src/AList/__tests__/AList.test.js +33 -33
- package/src/AList/compositionAPI/__tests__/TagAPI.test.js +43 -43
- package/src/AMenu/AMenu.js +4 -1
- package/src/AMenu/AMenuBreadcrumbs/AMenuBreadcrumbs.js +240 -237
- package/src/AMenu/AMenuPanelLink/AMenuPanelLink.js +4 -1
- package/src/AMenu/AMenuSearchPanelBreadcrumbs/AMenuSearchPanelBreadcrumbs.js +122 -119
- package/src/AModalWizard/AModalWizard.js +58 -53
- package/src/AModalWizard/compositionAPI/__tests__/ScrollAPI.test.js +46 -46
- package/src/APagination/APaginationPages/APaginationPages.js +15 -4
- package/src/ARate/ARate.js +254 -249
- package/src/ARate/ARateIcon/ADecimalIcon/ADecimalIcon.js +53 -50
- package/src/ARate/ARateIcon/ARateIcon.js +109 -104
- package/src/AResizer/AResizer.js +167 -162
- package/src/ATable/ATableHeaderTh/compositionAPI/SortAPI.js +172 -167
- package/src/ATable/ATableHeaderThAction/ATableHeaderThAction.js +14 -4
- package/src/ATable/ATableHeaderThAction/ATableHeaderThActionItem/ATableHeaderThActionItem.js +191 -184
- package/src/ATable/ATablePreviewDown/ATablePreviewDown.js +72 -69
- package/src/ATable/ATablePreviewRight/ATablePreviewRight.js +265 -258
- package/src/ATable/ATableSortingAdditional/ATableSortingAdditional.js +224 -219
- package/src/ATable/ATableSortingAdditional/__tests__/ATableSortingAdditional.AttributesAPI.test.js +39 -39
- package/src/ATable/ATableSortingAdditional/__tests__/ATableSortingAdditional.ColumnsAPI.test.js +68 -68
- package/src/ATable/ATableSortingAdditional/__tests__/ATableSortingAdditional.DropdownAPI.test.js +45 -45
- package/src/ATable/ATableSortingAdditional/__tests__/ATableSortingAdditional.FormAPI.test.js +95 -95
- package/src/ATable/ATableSortingAdditional/__tests__/ATableSortingAdditional.ModelAPI.test.js +1 -1
- package/src/ATable/ATableTd/ATableTd.js +4 -1
- package/src/ATable/ATableTdAction/ATableTdAction.js +19 -12
- package/src/ATable/ATableTopPanel/ATableTopPanel.js +11 -3
- package/src/ATable/ATableTr/ATableTr.js +408 -405
- package/src/ATable/__tests__/ATable.HeaderSlot.test.js +102 -97
- package/src/ATable/__tests__/ATable.RowIdsAPI.test.js +66 -66
- package/src/ATableForm/ATableForm.js +88 -85
- package/src/ATableForm/ATableFormCellAction/ATableFormCellAction.js +14 -4
- package/src/ATableForm/ATableFormCellDnd/ATableFormCellDnd.js +196 -187
- package/src/ATableForm/ATableFormRow/compositionAPI/EditAPI.js +104 -104
- package/src/ATableForm/__tests__/ATableForm.DragAndDropAPI.test.js +200 -212
- package/src/ATableForm/__tests__/ATableForm.ListView.test.js +134 -174
- package/src/ATableForm/compositionAPI/IconsAPI.js +24 -21
- package/src/AVerticalScroll/AVerticalScroll.js +182 -177
- package/src/AWizard/AWizard.js +26 -21
- package/src/AWizard/AWizardStep/AWizardStep.js +275 -270
- package/src/AWizard/compositionAPI/__tests__/ChangeStepAPI.test.js +32 -32
- package/src/AWizard/compositionAPI/__tests__/LocalAPI.test.js +55 -55
- package/src/PuxDatepicker/PuxDatepickerCalendarPanel/PuxDatepickerCalendarPanel.js +646 -648
- package/src/PuxDatepicker/panel/PanelDate/PanelDate.js +300 -301
- package/src/PuxDatepicker/panel/PanelMonth/PanelMonth.js +148 -149
- package/src/PuxDatepicker/panel/PanelTime/PanelTime.js +256 -257
- package/src/PuxDatepicker/panel/PanelYear/PanelYear.js +136 -137
- package/src/PuxDatepicker/utils/index.js +100 -100
- package/src/compositionAPI/AHttpAPI.js +593 -593
- package/src/compositionAPI/__tests__/AHttpAPI.test.js +42 -42
- package/src/filters/__tests__/filterBoolean.test.js +38 -38
- package/src/filters/__tests__/filterCapitalize.test.js +38 -38
- package/src/filters/__tests__/filterCurrency.test.js +21 -21
- package/src/filters/__tests__/filterDate.test.js +42 -42
- package/src/filters/__tests__/filterDefaultForEmpty.test.js +24 -24
- package/src/filters/__tests__/filterEmail.test.js +42 -42
- package/src/filters/__tests__/filterEscapeHtml.test.js +45 -45
- package/src/filters/__tests__/filterFileSize.test.js +45 -45
- package/src/filters/__tests__/filterFloat.test.js +74 -74
- package/src/filters/__tests__/filterJson.test.js +74 -74
- package/src/filters/__tests__/filterKeyValue.test.js +50 -50
- package/src/filters/__tests__/filterLimitTo.test.js +39 -39
- package/src/filters/__tests__/filterLink.test.js +41 -41
- package/src/filters/__tests__/filterList.test.js +149 -149
- package/src/filters/__tests__/filterLowerCase.test.js +38 -38
- package/src/filters/__tests__/filterMask.test.js +80 -80
- package/src/filters/__tests__/filterPropertyByValue.test.js +27 -27
- package/src/filters/__tests__/filterSearchHighlight.test.js +129 -129
- package/src/filters/__tests__/filterUpperCase.test.js +38 -38
- package/src/filters/__tests__/filterValueByCondition.test.js +3 -3
- package/src/filters/filterJson.js +39 -39
- package/src/filters/filterValueByCondition.js +2 -2
- package/src/plugins/AAlertPlugin.js +16 -5
- package/src/plugins/AMultiselectOrderedPlugin.js +88 -81
- package/src/plugins/ASelectPlugin.js +12 -10
- package/src/ui/ACheckbox/ACheckbox.js +82 -79
- package/src/ui/ADatepicker/ADatepicker.js +6 -5
- package/src/ui/ADatepicker/compositionAPI/EventsAPI.js +297 -297
- package/src/ui/ADatepicker/utils/index.js +76 -76
- package/src/ui/ADatepickerAlt/ADatepicker.js +912 -912
- package/src/ui/ADatepickerAlt/utils/index.js +98 -98
- package/src/ui/AFieldset/__tests__/AFieldset.ClassColumn.test.js +113 -114
- package/src/ui/AFormElementBtnClear/AFormElementBtnClear.js +4 -1
- package/src/ui/AInputCurrency/AInputCurrency.js +20 -15
- package/src/ui/AInputCurrency/__tests__/AInputCurrency.ModelAPI.test.js +73 -73
- package/src/ui/AInputNumber/AInputNumber.js +17 -12
- package/src/ui/AJson/AJson.js +12 -3
- package/src/ui/AJson/compositionAPI/JsonAPI.js +116 -116
- package/src/ui/ALabel/__tests__/ALabel.IdAPI.test.js +42 -42
- package/src/ui/ALabel/__tests__/ALabel.LabelAPI.test.js +33 -33
- package/src/ui/ARadio/ARadio.js +80 -77
- package/src/ui/ASelect/ASelect.js +390 -383
- package/src/ui/ASelect/ASelectElement/ASelectElement.js +179 -176
- package/src/ui/ASelect/ASelectValueCloseable/ASelectValueCloseable.js +143 -141
- package/src/ui/ASelect/__tests__/SelectedFirstAPI.test.js +101 -101
- package/src/ui/ASelect/__tests__/SelectedVisibleAPI.test.js +98 -98
- package/src/ui/ASlider/compositionAPI/SliderAPI.js +23 -23
- package/src/ui/AValidatedJson/AValidatedJson.js +4 -1
- package/src/ui/AValidatedJson/AValidatedJsonItem/AValidatedJsonItem.js +308 -298
- package/src/ui/compositionApi/UiCollapseAPI.js +68 -63
- package/src/ui/compositionApi/UiInputAutofillAPI.js +41 -41
- package/src/ui/compositionApi/__tests__/UIDataGroupAPI.test.js +106 -106
- package/src/ui/compositionApi/__tests__/UIExcludeRenderAttributesAPI.test.js +39 -39
- package/src/ui/compositionApi/__tests__/UiDataWithKeyIdAndLabelAPI.test.js +128 -128
- package/src/ui/compositionApi/__tests__/UiSearchAPI.test.js +71 -71
- package/src/utils/EventBus.js +51 -8
- package/src/utils/__tests__/EventBus.test.js +138 -0
- package/src/utils/__tests__/utils.aOrderBy.test.js +1 -1
- package/src/utils/__tests__/utils.aSortBy.test.js +1 -1
- package/src/utils/__tests__/utils.getTotalNestedCount.test.js +56 -56
- package/src/utils/__tests__/utils.isArrayOfArrays.test.js +44 -44
- package/src/utils/__tests__/utils.isArrayOfStrings.test.js +36 -36
- package/src/utils/__tests__/utilsArray.aFirst.test.js +1 -1
- package/src/utils/__tests__/utilsArray.aLast.test.js +1 -1
- package/src/utils/__tests__/utilsLang.isArguments.test.js +1 -1
- package/src/utils/__tests__/utilsLang.isArray.test.js +1 -1
- package/src/utils/__tests__/utilsLang.isArrayBuffer.test.js +1 -1
- package/src/utils/__tests__/utilsLang.isBoolean.test.js +1 -1
- package/src/utils/__tests__/utilsLang.isBuffer.test.js +1 -1
- package/src/utils/__tests__/utilsLang.isDate.test.js +1 -1
- package/src/utils/__tests__/utilsLang.isElement.test.js +5 -3
- package/src/utils/__tests__/utilsLang.isError.test.js +1 -1
- package/src/utils/__tests__/utilsLang.isFinite.test.js +1 -1
- package/src/utils/__tests__/utilsLang.isFunction.test.js +1 -1
- package/src/utils/__tests__/utilsLang.isInteger.test.js +1 -1
- package/src/utils/__tests__/utilsLang.isMap.test.js +1 -1
- package/src/utils/__tests__/utilsLang.isNaN.test.js +1 -1
- package/src/utils/__tests__/utilsLang.isNil.test.js +1 -1
- package/src/utils/__tests__/utilsLang.isNull.test.js +1 -1
- package/src/utils/__tests__/utilsLang.isNumber.test.js +1 -1
- package/src/utils/__tests__/utilsLang.isObject.test.js +1 -1
- package/src/utils/__tests__/utilsLang.isObjectLike.test.js +5 -3
- package/src/utils/__tests__/utilsLang.isPlainObject.test.js +3 -2
- package/src/utils/__tests__/utilsLang.isPromise.test.js +5 -2
- package/src/utils/__tests__/utilsLang.isRegExp.test.js +1 -1
- package/src/utils/__tests__/utilsLang.isSet.test.js +1 -1
- package/src/utils/__tests__/utilsLang.isString.test.js +1 -1
- package/src/utils/__tests__/utilsLang.isSymbol.test.js +5 -3
- package/src/utils/__tests__/utilsLang.isUndefined.test.js +1 -1
- package/src/utils/__tests__/utilsLang.isWeakMap.test.js +1 -1
- package/src/utils/__tests__/utilsLang.isWeakSet.test.js +1 -1
- package/src/utils/__tests__/utilsMath.isEven.test.js +43 -43
- package/src/utils/__tests__/utilsMath.isOdd.test.js +43 -43
- package/src/utils/__tests__/utilsUi.isModelForFilterNotEmpty.test.js +65 -65
- package/src/utils/autosize.js +1 -1
|
@@ -1,298 +1,308 @@
|
|
|
1
|
-
import {
|
|
2
|
-
h,
|
|
3
|
-
} from "vue";
|
|
4
|
-
import {
|
|
5
|
-
AElement,
|
|
6
|
-
AFieldset,
|
|
7
|
-
} from "../../../index";
|
|
8
|
-
|
|
9
|
-
import AValidatedJsonModalCreateOrUpdate from "../AValidatedJsonModalCreateOrUpdate/AValidatedJsonModalCreateOrUpdate";
|
|
10
|
-
|
|
11
|
-
import DeleteAPI from "./compositionAPI/DeleteAPI";
|
|
12
|
-
import DetailsAPI from "./compositionAPI/DetailsAPI";
|
|
13
|
-
import IdAPI from "./compositionAPI/IdAPI";
|
|
14
|
-
import LabelAPI from "./compositionAPI/LabelAPI";
|
|
15
|
-
import MoveAPI from "./compositionAPI/MoveAPI";
|
|
16
|
-
import UpdateAPI from "./compositionAPI/UpdateAPI";
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
type:
|
|
55
|
-
required: false,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
type:
|
|
73
|
-
required:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
type:
|
|
103
|
-
required: false,
|
|
104
|
-
default:
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
type:
|
|
108
|
-
required: false,
|
|
109
|
-
default:
|
|
110
|
-
},
|
|
111
|
-
|
|
112
|
-
type:
|
|
113
|
-
required: false,
|
|
114
|
-
default:
|
|
115
|
-
},
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
} =
|
|
140
|
-
|
|
141
|
-
const {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
"
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
1
|
+
import {
|
|
2
|
+
h,
|
|
3
|
+
} from "vue";
|
|
4
|
+
import {
|
|
5
|
+
AElement,
|
|
6
|
+
AFieldset,
|
|
7
|
+
} from "../../../index";
|
|
8
|
+
|
|
9
|
+
import AValidatedJsonModalCreateOrUpdate from "../AValidatedJsonModalCreateOrUpdate/AValidatedJsonModalCreateOrUpdate";
|
|
10
|
+
|
|
11
|
+
import DeleteAPI from "./compositionAPI/DeleteAPI";
|
|
12
|
+
import DetailsAPI from "./compositionAPI/DetailsAPI";
|
|
13
|
+
import IdAPI from "./compositionAPI/IdAPI";
|
|
14
|
+
import LabelAPI from "./compositionAPI/LabelAPI";
|
|
15
|
+
import MoveAPI from "./compositionAPI/MoveAPI";
|
|
16
|
+
import UpdateAPI from "./compositionAPI/UpdateAPI";
|
|
17
|
+
|
|
18
|
+
const ChevronDown = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16">
|
|
19
|
+
<path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708"/>
|
|
20
|
+
</svg>`;
|
|
21
|
+
const ChevronUp = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-up" viewBox="0 0 16 16">
|
|
22
|
+
<path fill-rule="evenodd" d="M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708z"/>
|
|
23
|
+
</svg>`;
|
|
24
|
+
const PencilFill = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pencil-fill" viewBox="0 0 16 16">
|
|
25
|
+
<path d="M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.5.5 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11z"/>
|
|
26
|
+
</svg>`;
|
|
27
|
+
const Trash = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-trash" viewBox="0 0 16 16">
|
|
28
|
+
<path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z"/>
|
|
29
|
+
<path d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z"/>
|
|
30
|
+
</svg>`;
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
// @vue/component
|
|
34
|
+
export default {
|
|
35
|
+
name: "AValidatedJsonItem",
|
|
36
|
+
props: {
|
|
37
|
+
children: {
|
|
38
|
+
type: Array,
|
|
39
|
+
required: true,
|
|
40
|
+
},
|
|
41
|
+
deactivateOrdering: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
required: false,
|
|
44
|
+
},
|
|
45
|
+
deactivatePreview: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
required: false,
|
|
48
|
+
},
|
|
49
|
+
elementLabel: {
|
|
50
|
+
type: String,
|
|
51
|
+
required: true,
|
|
52
|
+
},
|
|
53
|
+
elementTemplate: {
|
|
54
|
+
type: String,
|
|
55
|
+
required: false,
|
|
56
|
+
default: "{{ elementLabel }}",
|
|
57
|
+
},
|
|
58
|
+
errors: {
|
|
59
|
+
type: [Array, Object],
|
|
60
|
+
required: false,
|
|
61
|
+
default: undefined,
|
|
62
|
+
},
|
|
63
|
+
hidePosition: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
required: false,
|
|
66
|
+
},
|
|
67
|
+
isLast: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
required: false,
|
|
70
|
+
},
|
|
71
|
+
keyId: {
|
|
72
|
+
type: String,
|
|
73
|
+
required: false,
|
|
74
|
+
default: undefined,
|
|
75
|
+
},
|
|
76
|
+
mode: {
|
|
77
|
+
type: String,
|
|
78
|
+
required: true,
|
|
79
|
+
validator: value => ["list", "json"].includes(value),
|
|
80
|
+
},
|
|
81
|
+
modelAll: {
|
|
82
|
+
type: Array,
|
|
83
|
+
required: true,
|
|
84
|
+
},
|
|
85
|
+
modelIndex: {
|
|
86
|
+
type: Number,
|
|
87
|
+
required: true,
|
|
88
|
+
},
|
|
89
|
+
modelItem: {
|
|
90
|
+
type: Object,
|
|
91
|
+
required: true,
|
|
92
|
+
},
|
|
93
|
+
parentHtmlId: {
|
|
94
|
+
type: String,
|
|
95
|
+
required: true,
|
|
96
|
+
},
|
|
97
|
+
parentId: {
|
|
98
|
+
type: String,
|
|
99
|
+
required: true,
|
|
100
|
+
},
|
|
101
|
+
readonly: {
|
|
102
|
+
type: Boolean,
|
|
103
|
+
required: false,
|
|
104
|
+
default: undefined,
|
|
105
|
+
},
|
|
106
|
+
typedBaseId: {
|
|
107
|
+
type: String,
|
|
108
|
+
required: false,
|
|
109
|
+
default: undefined,
|
|
110
|
+
},
|
|
111
|
+
typedChildren: {
|
|
112
|
+
type: Object,
|
|
113
|
+
required: false,
|
|
114
|
+
default: () => ({}),
|
|
115
|
+
},
|
|
116
|
+
uniqueChildrenIds: {
|
|
117
|
+
type: Array,
|
|
118
|
+
required: false,
|
|
119
|
+
default: () => [],
|
|
120
|
+
},
|
|
121
|
+
useFlatModel: {
|
|
122
|
+
type: Boolean,
|
|
123
|
+
required: false,
|
|
124
|
+
default: false,
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
emits: [
|
|
128
|
+
"delete",
|
|
129
|
+
"move",
|
|
130
|
+
"update",
|
|
131
|
+
],
|
|
132
|
+
setup(props, context) {
|
|
133
|
+
const {
|
|
134
|
+
idLocal,
|
|
135
|
+
} = IdAPI(props);
|
|
136
|
+
|
|
137
|
+
const {
|
|
138
|
+
label,
|
|
139
|
+
} = LabelAPI(props);
|
|
140
|
+
|
|
141
|
+
const {
|
|
142
|
+
btnMoveDownId,
|
|
143
|
+
btnMoveUpId,
|
|
144
|
+
canMove,
|
|
145
|
+
disabledMoveDown,
|
|
146
|
+
disabledMoveUp,
|
|
147
|
+
moveDown,
|
|
148
|
+
moveUp,
|
|
149
|
+
} = MoveAPI(props, context);
|
|
150
|
+
|
|
151
|
+
const {
|
|
152
|
+
btnDeleteId,
|
|
153
|
+
openDeleteConfirm,
|
|
154
|
+
} = DeleteAPI(props, context);
|
|
155
|
+
|
|
156
|
+
const {
|
|
157
|
+
btnOpenModalUpdateId,
|
|
158
|
+
closeModalUpdate,
|
|
159
|
+
isModalUpdateVisible,
|
|
160
|
+
openModalUpdate,
|
|
161
|
+
} = UpdateAPI(props, context);
|
|
162
|
+
|
|
163
|
+
const {
|
|
164
|
+
btnToggleDetailsId,
|
|
165
|
+
detailsId,
|
|
166
|
+
iconBtnToggleDetails,
|
|
167
|
+
isDetailsVisible,
|
|
168
|
+
titleBtnToggleDetails,
|
|
169
|
+
toggleDetails,
|
|
170
|
+
} = DetailsAPI(props);
|
|
171
|
+
|
|
172
|
+
return {
|
|
173
|
+
btnDeleteId,
|
|
174
|
+
btnMoveDownId,
|
|
175
|
+
btnMoveUpId,
|
|
176
|
+
btnOpenModalUpdateId,
|
|
177
|
+
btnToggleDetailsId,
|
|
178
|
+
canMove,
|
|
179
|
+
closeModalUpdate,
|
|
180
|
+
detailsId,
|
|
181
|
+
disabledMoveDown,
|
|
182
|
+
disabledMoveUp,
|
|
183
|
+
iconBtnToggleDetails,
|
|
184
|
+
idLocal,
|
|
185
|
+
isDetailsVisible,
|
|
186
|
+
isModalUpdateVisible,
|
|
187
|
+
label,
|
|
188
|
+
moveDown,
|
|
189
|
+
moveUp,
|
|
190
|
+
openDeleteConfirm,
|
|
191
|
+
openModalUpdate,
|
|
192
|
+
titleBtnToggleDetails,
|
|
193
|
+
toggleDetails,
|
|
194
|
+
};
|
|
195
|
+
},
|
|
196
|
+
render() {
|
|
197
|
+
return h("li", {
|
|
198
|
+
id: this.idLocal,
|
|
199
|
+
class: "a_list_group__item",
|
|
200
|
+
}, [
|
|
201
|
+
h("div", {
|
|
202
|
+
class: "a_d_flex a_justify_content_between a_align_items_center",
|
|
203
|
+
}, [
|
|
204
|
+
!this.deactivatePreview ?
|
|
205
|
+
h(AElement, {
|
|
206
|
+
id: this.btnToggleDetailsId,
|
|
207
|
+
class: "a_btn a_btn_secondary a_mr_4 test_toggle_details",
|
|
208
|
+
iconLeft: this.iconBtnToggleDetails,
|
|
209
|
+
title: this.titleBtnToggleDetails,
|
|
210
|
+
textScreenReader: this.titleBtnToggleDetails,
|
|
211
|
+
type: "button",
|
|
212
|
+
onClick: this.toggleDetails,
|
|
213
|
+
}) :
|
|
214
|
+
"",
|
|
215
|
+
h("strong", {
|
|
216
|
+
class: [
|
|
217
|
+
"a_validated_json_list__item__label",
|
|
218
|
+
{
|
|
219
|
+
a_validated_json_list__item__label_error: this.errors,
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
}, this.label),
|
|
223
|
+
!this.readonly ?
|
|
224
|
+
h("div", {
|
|
225
|
+
class: "a_btn_group a_ml_4",
|
|
226
|
+
role: "group",
|
|
227
|
+
}, [
|
|
228
|
+
this.canMove ?
|
|
229
|
+
h(AElement, {
|
|
230
|
+
id: this.btnMoveUpId,
|
|
231
|
+
ariaDisabled: this.disabledMoveUp,
|
|
232
|
+
class: "a_btn a_btn_secondary test_move_up",
|
|
233
|
+
iconLeft: ChevronUp,
|
|
234
|
+
title: "_A_VALIDATED_JSON_MOVE_UP_",
|
|
235
|
+
textScreenReader: "_A_VALIDATED_JSON_MOVE_UP_",
|
|
236
|
+
type: "button",
|
|
237
|
+
onClick: this.moveUp,
|
|
238
|
+
}) :
|
|
239
|
+
"",
|
|
240
|
+
this.canMove ?
|
|
241
|
+
h(AElement, {
|
|
242
|
+
id: this.btnMoveDownId,
|
|
243
|
+
ariaDisabled: this.disabledMoveDown,
|
|
244
|
+
class: "a_btn a_btn_secondary test_move_down",
|
|
245
|
+
iconLeft: ChevronDown,
|
|
246
|
+
title: "_A_VALIDATED_JSON_MOVE_DOWN_",
|
|
247
|
+
textScreenReader: "_A_VALIDATED_JSON_MOVE_DOWN_",
|
|
248
|
+
type: "button",
|
|
249
|
+
onClick: this.moveDown,
|
|
250
|
+
}) :
|
|
251
|
+
"",
|
|
252
|
+
h(AElement, {
|
|
253
|
+
id: this.btnOpenModalUpdateId,
|
|
254
|
+
class: "a_btn a_btn_secondary test_edit",
|
|
255
|
+
iconLeft: PencilFill,
|
|
256
|
+
title: "_A_VALIDATED_JSON_ELEMENT_UPDATE_",
|
|
257
|
+
textScreenReader: "_A_VALIDATED_JSON_ELEMENT_UPDATE_",
|
|
258
|
+
type: "button",
|
|
259
|
+
onClick: this.openModalUpdate,
|
|
260
|
+
}),
|
|
261
|
+
h(AElement, {
|
|
262
|
+
id: this.btnDeleteId,
|
|
263
|
+
class: "a_btn a_btn_danger test_remove",
|
|
264
|
+
iconLeft: Trash,
|
|
265
|
+
title: "_A_VALIDATED_JSON_ELEMENT_REMOVE_",
|
|
266
|
+
textScreenReader: "_A_VALIDATED_JSON_ELEMENT_REMOVE_",
|
|
267
|
+
type: "button",
|
|
268
|
+
onClick: this.openDeleteConfirm,
|
|
269
|
+
}),
|
|
270
|
+
]) :
|
|
271
|
+
"",
|
|
272
|
+
]),
|
|
273
|
+
this.isDetailsVisible ?
|
|
274
|
+
h("div", {
|
|
275
|
+
class: "a_ml_6 a_mt_2 a_px_4",
|
|
276
|
+
}, [
|
|
277
|
+
h(AFieldset, {
|
|
278
|
+
children: this.children,
|
|
279
|
+
idPrefix: this.parentHtmlId,
|
|
280
|
+
modelValue: this.modelItem,
|
|
281
|
+
readonly: true,
|
|
282
|
+
skipOwnIdInModelPath: true,
|
|
283
|
+
slotNamePrepend: "singlePrepend",
|
|
284
|
+
useFlatModel: this.useFlatModel,
|
|
285
|
+
}, this.$slots),
|
|
286
|
+
]) :
|
|
287
|
+
"",
|
|
288
|
+
this.isModalUpdateVisible ?
|
|
289
|
+
h(AValidatedJsonModalCreateOrUpdate, {
|
|
290
|
+
children: this.children,
|
|
291
|
+
close: this.closeModalUpdate,
|
|
292
|
+
currentIndex: this.modelIndex,
|
|
293
|
+
currentModel: this.modelItem,
|
|
294
|
+
elementLabelTranslated: this.elementLabel,
|
|
295
|
+
errors: this.errors,
|
|
296
|
+
isCreate: false,
|
|
297
|
+
keyId: this.keyId,
|
|
298
|
+
mode: this.mode,
|
|
299
|
+
modelAll: this.modelAll,
|
|
300
|
+
selectorCloseIds: this.btnOpenModalUpdateId,
|
|
301
|
+
typedBaseId: this.typedBaseId,
|
|
302
|
+
typedChildren: this.typedChildren,
|
|
303
|
+
uniqueChildrenIds: this.uniqueChildrenIds,
|
|
304
|
+
}) :
|
|
305
|
+
"",
|
|
306
|
+
]);
|
|
307
|
+
},
|
|
308
|
+
};
|