aloha-vue 2.74.0 → 2.75.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 (166) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE +22 -21
  3. package/dist/aloha-vue.css +13594 -13594
  4. package/dist/aloha-vue.css.map +1 -1
  5. package/dist/aloha-vue.es.js +59266 -64918
  6. package/dist/aloha-vue.umd.js +338 -211
  7. package/package.json +27 -34
  8. package/scss/components/ATable.scss +2 -2
  9. package/scss/utils/button.scss +362 -362
  10. package/scss/utils/funktions.scss +162 -162
  11. package/src/AAccordion/AAccordionItem/AAccordionItem.js +235 -230
  12. package/src/ACarousel/ACarousel.js +7 -2
  13. package/src/ADropdown/ADropdown.js +4 -1
  14. package/src/AFilters/AFilterCenter/AFilterCenter.js +5 -1
  15. package/src/AFilters/AFilterCenter/AFilterCenterItem/AFilterCenterItem.js +7 -2
  16. package/src/AFilters/AFiltersHorizontal/AFiltersHorizontal.js +412 -396
  17. package/src/AFilters/AFiltersHorizontal/AFiltersHorizontalFilter/AFiltersHorizontalFilter.js +102 -99
  18. package/src/AFilters/AFiltersHorizontal/compositionAPI/FiltersSavedDeleteAPI.js +108 -108
  19. package/src/AFilters/AFiltersMain/AFiltersMain.js +114 -111
  20. package/src/AFilters/AFiltersSaveModal/compositionAPI/SaveAPI.js +65 -65
  21. package/src/ALinkCopy/ALinkCopy.js +98 -95
  22. package/src/ALinkCopy/compositionAPI/CopyAPI.js +48 -48
  23. package/src/AList/__tests__/AList.test.js +33 -33
  24. package/src/AList/compositionAPI/__tests__/TagAPI.test.js +43 -43
  25. package/src/AMenu/AMenu.js +4 -1
  26. package/src/AMenu/AMenuBreadcrumbs/AMenuBreadcrumbs.js +240 -237
  27. package/src/AMenu/AMenuPanelLink/AMenuPanelLink.js +4 -1
  28. package/src/AMenu/AMenuSearchPanelBreadcrumbs/AMenuSearchPanelBreadcrumbs.js +122 -119
  29. package/src/AModalWizard/AModalWizard.js +58 -53
  30. package/src/AModalWizard/compositionAPI/__tests__/ScrollAPI.test.js +46 -46
  31. package/src/APagination/APaginationPages/APaginationPages.js +15 -4
  32. package/src/ARate/ARate.js +254 -249
  33. package/src/ARate/ARateIcon/ADecimalIcon/ADecimalIcon.js +53 -50
  34. package/src/ARate/ARateIcon/ARateIcon.js +109 -104
  35. package/src/AResizer/AResizer.js +167 -162
  36. package/src/ATable/ATableHeaderTh/compositionAPI/SortAPI.js +172 -167
  37. package/src/ATable/ATableHeaderThAction/ATableHeaderThAction.js +14 -4
  38. package/src/ATable/ATableHeaderThAction/ATableHeaderThActionItem/ATableHeaderThActionItem.js +191 -184
  39. package/src/ATable/ATablePreviewDown/ATablePreviewDown.js +72 -69
  40. package/src/ATable/ATablePreviewRight/ATablePreviewRight.js +265 -258
  41. package/src/ATable/ATableSortingAdditional/ATableSortingAdditional.js +224 -219
  42. package/src/ATable/ATableSortingAdditional/__tests__/ATableSortingAdditional.AttributesAPI.test.js +39 -39
  43. package/src/ATable/ATableSortingAdditional/__tests__/ATableSortingAdditional.ColumnsAPI.test.js +68 -68
  44. package/src/ATable/ATableSortingAdditional/__tests__/ATableSortingAdditional.DropdownAPI.test.js +45 -45
  45. package/src/ATable/ATableSortingAdditional/__tests__/ATableSortingAdditional.FormAPI.test.js +95 -95
  46. package/src/ATable/ATableSortingAdditional/__tests__/ATableSortingAdditional.ModelAPI.test.js +1 -1
  47. package/src/ATable/ATableTd/ATableTd.js +4 -1
  48. package/src/ATable/ATableTdAction/ATableTdAction.js +19 -12
  49. package/src/ATable/ATableTopPanel/ATableTopPanel.js +11 -3
  50. package/src/ATable/ATableTr/ATableTr.js +408 -405
  51. package/src/ATable/__tests__/ATable.HeaderSlot.test.js +102 -97
  52. package/src/ATable/__tests__/ATable.RowIdsAPI.test.js +66 -66
  53. package/src/ATableForm/ATableForm.js +88 -85
  54. package/src/ATableForm/ATableFormCellAction/ATableFormCellAction.js +14 -4
  55. package/src/ATableForm/ATableFormCellDnd/ATableFormCellDnd.js +196 -187
  56. package/src/ATableForm/ATableFormRow/compositionAPI/EditAPI.js +104 -104
  57. package/src/ATableForm/__tests__/ATableForm.DragAndDropAPI.test.js +200 -212
  58. package/src/ATableForm/__tests__/ATableForm.ListView.test.js +134 -174
  59. package/src/ATableForm/compositionAPI/IconsAPI.js +24 -21
  60. package/src/AVerticalScroll/AVerticalScroll.js +182 -177
  61. package/src/AWizard/AWizard.js +26 -21
  62. package/src/AWizard/AWizardStep/AWizardStep.js +275 -270
  63. package/src/AWizard/compositionAPI/__tests__/ChangeStepAPI.test.js +32 -32
  64. package/src/AWizard/compositionAPI/__tests__/LocalAPI.test.js +55 -55
  65. package/src/PuxDatepicker/PuxDatepickerCalendarPanel/PuxDatepickerCalendarPanel.js +646 -648
  66. package/src/PuxDatepicker/panel/PanelDate/PanelDate.js +300 -301
  67. package/src/PuxDatepicker/panel/PanelMonth/PanelMonth.js +148 -149
  68. package/src/PuxDatepicker/panel/PanelTime/PanelTime.js +256 -257
  69. package/src/PuxDatepicker/panel/PanelYear/PanelYear.js +136 -137
  70. package/src/PuxDatepicker/utils/index.js +100 -100
  71. package/src/compositionAPI/AHttpAPI.js +593 -593
  72. package/src/compositionAPI/__tests__/AHttpAPI.test.js +42 -42
  73. package/src/filters/__tests__/filterBoolean.test.js +38 -38
  74. package/src/filters/__tests__/filterCapitalize.test.js +38 -38
  75. package/src/filters/__tests__/filterCurrency.test.js +21 -21
  76. package/src/filters/__tests__/filterDate.test.js +42 -42
  77. package/src/filters/__tests__/filterDefaultForEmpty.test.js +24 -24
  78. package/src/filters/__tests__/filterEmail.test.js +42 -42
  79. package/src/filters/__tests__/filterEscapeHtml.test.js +45 -45
  80. package/src/filters/__tests__/filterFileSize.test.js +45 -45
  81. package/src/filters/__tests__/filterFloat.test.js +74 -74
  82. package/src/filters/__tests__/filterJson.test.js +74 -74
  83. package/src/filters/__tests__/filterKeyValue.test.js +50 -50
  84. package/src/filters/__tests__/filterLimitTo.test.js +39 -39
  85. package/src/filters/__tests__/filterLink.test.js +41 -41
  86. package/src/filters/__tests__/filterList.test.js +149 -149
  87. package/src/filters/__tests__/filterLowerCase.test.js +38 -38
  88. package/src/filters/__tests__/filterMask.test.js +80 -80
  89. package/src/filters/__tests__/filterPropertyByValue.test.js +27 -27
  90. package/src/filters/__tests__/filterSearchHighlight.test.js +129 -129
  91. package/src/filters/__tests__/filterUpperCase.test.js +38 -38
  92. package/src/filters/__tests__/filterValueByCondition.test.js +3 -3
  93. package/src/filters/filterJson.js +39 -39
  94. package/src/filters/filterValueByCondition.js +2 -2
  95. package/src/plugins/AAlertPlugin.js +16 -5
  96. package/src/plugins/AMultiselectOrderedPlugin.js +88 -81
  97. package/src/plugins/ASelectPlugin.js +12 -10
  98. package/src/ui/ACheckbox/ACheckbox.js +82 -79
  99. package/src/ui/ADatepicker/compositionAPI/EventsAPI.js +297 -297
  100. package/src/ui/ADatepicker/utils/index.js +76 -76
  101. package/src/ui/ADatepickerAlt/ADatepicker.js +912 -912
  102. package/src/ui/ADatepickerAlt/utils/index.js +98 -98
  103. package/src/ui/AFieldset/__tests__/AFieldset.ClassColumn.test.js +113 -114
  104. package/src/ui/AFormElementBtnClear/AFormElementBtnClear.js +4 -1
  105. package/src/ui/AInputCurrency/AInputCurrency.js +20 -15
  106. package/src/ui/AInputCurrency/__tests__/AInputCurrency.ModelAPI.test.js +73 -73
  107. package/src/ui/AInputNumber/AInputNumber.js +17 -12
  108. package/src/ui/AJson/AJson.js +12 -3
  109. package/src/ui/AJson/compositionAPI/JsonAPI.js +116 -116
  110. package/src/ui/ALabel/__tests__/ALabel.IdAPI.test.js +42 -42
  111. package/src/ui/ALabel/__tests__/ALabel.LabelAPI.test.js +33 -33
  112. package/src/ui/ARadio/ARadio.js +80 -77
  113. package/src/ui/ASelect/ASelect.js +390 -383
  114. package/src/ui/ASelect/ASelectElement/ASelectElement.js +179 -176
  115. package/src/ui/ASelect/ASelectValueCloseable/ASelectValueCloseable.js +143 -141
  116. package/src/ui/ASelect/__tests__/SelectedFirstAPI.test.js +101 -101
  117. package/src/ui/ASelect/__tests__/SelectedVisibleAPI.test.js +98 -98
  118. package/src/ui/ASlider/compositionAPI/SliderAPI.js +23 -23
  119. package/src/ui/AValidatedJson/AValidatedJson.js +4 -1
  120. package/src/ui/AValidatedJson/AValidatedJsonItem/AValidatedJsonItem.js +308 -298
  121. package/src/ui/compositionApi/UiCollapseAPI.js +68 -63
  122. package/src/ui/compositionApi/UiInputAutofillAPI.js +41 -41
  123. package/src/ui/compositionApi/__tests__/UIDataGroupAPI.test.js +106 -106
  124. package/src/ui/compositionApi/__tests__/UIExcludeRenderAttributesAPI.test.js +39 -39
  125. package/src/ui/compositionApi/__tests__/UiDataWithKeyIdAndLabelAPI.test.js +128 -128
  126. package/src/ui/compositionApi/__tests__/UiSearchAPI.test.js +71 -71
  127. package/src/utils/EventBus.js +51 -8
  128. package/src/utils/__tests__/EventBus.test.js +138 -0
  129. package/src/utils/__tests__/utils.aOrderBy.test.js +1 -1
  130. package/src/utils/__tests__/utils.aSortBy.test.js +1 -1
  131. package/src/utils/__tests__/utils.getTotalNestedCount.test.js +56 -56
  132. package/src/utils/__tests__/utils.isArrayOfArrays.test.js +44 -44
  133. package/src/utils/__tests__/utils.isArrayOfStrings.test.js +36 -36
  134. package/src/utils/__tests__/utilsArray.aFirst.test.js +1 -1
  135. package/src/utils/__tests__/utilsArray.aLast.test.js +1 -1
  136. package/src/utils/__tests__/utilsLang.isArguments.test.js +1 -1
  137. package/src/utils/__tests__/utilsLang.isArray.test.js +1 -1
  138. package/src/utils/__tests__/utilsLang.isArrayBuffer.test.js +1 -1
  139. package/src/utils/__tests__/utilsLang.isBoolean.test.js +1 -1
  140. package/src/utils/__tests__/utilsLang.isBuffer.test.js +1 -1
  141. package/src/utils/__tests__/utilsLang.isDate.test.js +1 -1
  142. package/src/utils/__tests__/utilsLang.isElement.test.js +5 -3
  143. package/src/utils/__tests__/utilsLang.isError.test.js +1 -1
  144. package/src/utils/__tests__/utilsLang.isFinite.test.js +1 -1
  145. package/src/utils/__tests__/utilsLang.isFunction.test.js +1 -1
  146. package/src/utils/__tests__/utilsLang.isInteger.test.js +1 -1
  147. package/src/utils/__tests__/utilsLang.isMap.test.js +1 -1
  148. package/src/utils/__tests__/utilsLang.isNaN.test.js +1 -1
  149. package/src/utils/__tests__/utilsLang.isNil.test.js +1 -1
  150. package/src/utils/__tests__/utilsLang.isNull.test.js +1 -1
  151. package/src/utils/__tests__/utilsLang.isNumber.test.js +1 -1
  152. package/src/utils/__tests__/utilsLang.isObject.test.js +1 -1
  153. package/src/utils/__tests__/utilsLang.isObjectLike.test.js +5 -3
  154. package/src/utils/__tests__/utilsLang.isPlainObject.test.js +3 -2
  155. package/src/utils/__tests__/utilsLang.isPromise.test.js +5 -2
  156. package/src/utils/__tests__/utilsLang.isRegExp.test.js +1 -1
  157. package/src/utils/__tests__/utilsLang.isSet.test.js +1 -1
  158. package/src/utils/__tests__/utilsLang.isString.test.js +1 -1
  159. package/src/utils/__tests__/utilsLang.isSymbol.test.js +5 -3
  160. package/src/utils/__tests__/utilsLang.isUndefined.test.js +1 -1
  161. package/src/utils/__tests__/utilsLang.isWeakMap.test.js +1 -1
  162. package/src/utils/__tests__/utilsLang.isWeakSet.test.js +1 -1
  163. package/src/utils/__tests__/utilsMath.isEven.test.js +43 -43
  164. package/src/utils/__tests__/utilsMath.isOdd.test.js +43 -43
  165. package/src/utils/__tests__/utilsUi.isModelForFilterNotEmpty.test.js +65 -65
  166. package/src/utils/autosize.js +1 -1
@@ -1,97 +1,102 @@
1
- import {
2
- h,
3
- ref,
4
- } from "vue";
5
- import {
6
- describe,
7
- expect,
8
- it,
9
- jest,
10
- } from "@jest/globals";
11
- import {
12
- mount,
13
- } from "@vue/test-utils";
14
-
15
- import ATableHeaderTh from "../ATableHeaderTh/ATableHeaderTh";
16
-
17
- jest.mock("../../AButton/AButton", () => ({
18
- name: "AButton",
19
- render() {
20
- return jest.requireActual("vue").h("span", this.$slots.default?.());
21
- },
22
- }));
23
- jest.mock("aloha-svg/dist/js/bootstrap/CaretDownFill", () => "");
24
- jest.mock("aloha-svg/dist/js/bootstrap/CaretUpFill", () => "");
25
-
26
- const ATranslationStub = {
27
- name: "ATranslation",
28
- props: {
29
- html: {
30
- type: [String, Number, Object, Array],
31
- default: undefined,
32
- },
33
- text: {
34
- type: [String, Number, Object, Array],
35
- default: undefined,
36
- },
37
- },
38
- render() {
39
- return h("span", this.html || this.text);
40
- },
41
- };
42
-
43
- const mountHeader = ({ column, slots }) => mount(ATableHeaderTh, {
44
- props: {
45
- column,
46
- columnIndex: 2,
47
- hasMultipleActions: false,
48
- },
49
- slots,
50
- global: {
51
- provide: {
52
- changeModelSort: () => {},
53
- columnWidthDefault: ref(250),
54
- isColumnsDnd: ref(false),
55
- isLoadingOptions: ref(false),
56
- isLoadingTable: ref(false),
57
- tableId: ref("table"),
58
- useRem: ref(false),
59
- },
60
- stubs: {
61
- ATranslation: ATranslationStub,
62
- },
63
- },
64
- });
65
-
66
- describe("ATable header slot", () => {
67
- it("renders the configured header slot instead of the label", () => {
68
- const wrapper = mountHeader({
69
- column: {
70
- id: "name",
71
- label: "Name label",
72
- headerSlot: "nameHeader",
73
- },
74
- slots: {
75
- nameHeader: ({ column, columnIndex }) => h(
76
- "strong",
77
- { class: "custom-header" },
78
- `${ column.id }-${ columnIndex }`,
79
- ),
80
- },
81
- });
82
-
83
- expect(wrapper.find(".custom-header").text()).toBe("name-2");
84
- expect(wrapper.text()).not.toContain("Name label");
85
- });
86
-
87
- it("renders the label when the configured header slot is not provided", () => {
88
- const wrapper = mountHeader({
89
- column: {
90
- label: "Name label",
91
- headerSlot: "nameHeader",
92
- },
93
- });
94
-
95
- expect(wrapper.text()).toContain("Name label");
96
- });
97
- });
1
+ import {
2
+ h,
3
+ ref,
4
+ } from "vue";
5
+ import {
6
+ describe,
7
+ expect,
8
+ it,
9
+ vi,
10
+ } from "vitest";
11
+ import {
12
+ mount,
13
+ } from "@vue/test-utils";
14
+
15
+ import ATableHeaderTh from "../ATableHeaderTh/ATableHeaderTh";
16
+
17
+ vi.mock("../../AButton/AButton", async() => {
18
+ const {
19
+ h: render,
20
+ } = await vi.importActual("vue");
21
+ return {
22
+ default: {
23
+ name: "AButton",
24
+ render() {
25
+ return render("span", this.$slots.default?.());
26
+ },
27
+ },
28
+ };
29
+ });
30
+
31
+ const ATranslationStub = {
32
+ name: "ATranslation",
33
+ props: {
34
+ html: {
35
+ type: [String, Number, Object, Array],
36
+ default: undefined,
37
+ },
38
+ text: {
39
+ type: [String, Number, Object, Array],
40
+ default: undefined,
41
+ },
42
+ },
43
+ render() {
44
+ return h("span", this.html || this.text);
45
+ },
46
+ };
47
+
48
+ const mountHeader = ({ column, slots }) => mount(ATableHeaderTh, {
49
+ props: {
50
+ column,
51
+ columnIndex: 2,
52
+ hasMultipleActions: false,
53
+ },
54
+ slots,
55
+ global: {
56
+ provide: {
57
+ changeModelSort: () => {},
58
+ columnWidthDefault: ref(250),
59
+ isColumnsDnd: ref(false),
60
+ isLoadingOptions: ref(false),
61
+ isLoadingTable: ref(false),
62
+ tableId: ref("table"),
63
+ useRem: ref(false),
64
+ },
65
+ stubs: {
66
+ ATranslation: ATranslationStub,
67
+ },
68
+ },
69
+ });
70
+
71
+ describe("ATable header slot", () => {
72
+ it("renders the configured header slot instead of the label", () => {
73
+ const wrapper = mountHeader({
74
+ column: {
75
+ id: "name",
76
+ label: "Name label",
77
+ headerSlot: "nameHeader",
78
+ },
79
+ slots: {
80
+ nameHeader: ({ column, columnIndex }) => h(
81
+ "strong",
82
+ { class: "custom-header" },
83
+ `${ column.id }-${ columnIndex }`,
84
+ ),
85
+ },
86
+ });
87
+
88
+ expect(wrapper.find(".custom-header").text()).toBe("name-2");
89
+ expect(wrapper.text()).not.toContain("Name label");
90
+ });
91
+
92
+ it("renders the label when the configured header slot is not provided", () => {
93
+ const wrapper = mountHeader({
94
+ column: {
95
+ label: "Name label",
96
+ headerSlot: "nameHeader",
97
+ },
98
+ });
99
+
100
+ expect(wrapper.text()).toContain("Name label");
101
+ });
102
+ });
@@ -1,66 +1,66 @@
1
- import {
2
- beforeAll,
3
- describe,
4
- expect,
5
- it,
6
- } from "@jest/globals";
7
-
8
- import {
9
- mockVueInject,
10
- } from "../../../utilsTests/utilsTests";
11
-
12
- describe("ATable row IDs", () => {
13
- let AttributesAPI;
14
- let RowActionsAPI;
15
-
16
- beforeAll(async() => {
17
- mockVueInject({
18
- columnActionsOnePlusDropdownOptions: {},
19
- rowActions: [],
20
- tableId: "aloha",
21
- });
22
-
23
- AttributesAPI = (await import("../ATableTr/compositionAPI/AttributesAPI")).default;
24
- RowActionsAPI = (await import("../compositionAPI/RowActionsAPI")).default;
25
- });
26
-
27
- it("uses the complete tree index path for a child row ID", () => {
28
- const {
29
- rowHtmlId,
30
- } = AttributesAPI({
31
- rowIndex: 1,
32
- rowIndexPath: "0_1",
33
- }, {});
34
-
35
- expect(rowHtmlId.value).toBe("aloha_0_1");
36
- });
37
-
38
- it("uses the complete tree index path for a child actions ID", () => {
39
- const {
40
- buttonActionsId,
41
- } = RowActionsAPI({
42
- row: {},
43
- rowIndex: 1,
44
- rowIndexPath: "0_1",
45
- });
46
-
47
- expect(buttonActionsId.value).toBe("aloha_action_0_1");
48
- });
49
-
50
- it("keeps the existing ID format when no tree index path is provided", () => {
51
- const {
52
- rowHtmlId,
53
- } = AttributesAPI({
54
- rowIndex: 2,
55
- }, {});
56
- const {
57
- buttonActionsId,
58
- } = RowActionsAPI({
59
- row: {},
60
- rowIndex: 2,
61
- });
62
-
63
- expect(rowHtmlId.value).toBe("aloha_2");
64
- expect(buttonActionsId.value).toBe("aloha_action_2");
65
- });
66
- });
1
+ import {
2
+ beforeAll,
3
+ describe,
4
+ expect,
5
+ it,
6
+ } from "vitest";
7
+
8
+ import {
9
+ mockVueInject,
10
+ } from "../../../utilsTests/utilsTests";
11
+
12
+ describe("ATable row IDs", () => {
13
+ let AttributesAPI;
14
+ let RowActionsAPI;
15
+
16
+ beforeAll(async() => {
17
+ mockVueInject({
18
+ columnActionsOnePlusDropdownOptions: {},
19
+ rowActions: [],
20
+ tableId: "aloha",
21
+ });
22
+
23
+ AttributesAPI = (await import("../ATableTr/compositionAPI/AttributesAPI")).default;
24
+ RowActionsAPI = (await import("../compositionAPI/RowActionsAPI")).default;
25
+ });
26
+
27
+ it("uses the complete tree index path for a child row ID", () => {
28
+ const {
29
+ rowHtmlId,
30
+ } = AttributesAPI({
31
+ rowIndex: 1,
32
+ rowIndexPath: "0_1",
33
+ }, {});
34
+
35
+ expect(rowHtmlId.value).toBe("aloha_0_1");
36
+ });
37
+
38
+ it("uses the complete tree index path for a child actions ID", () => {
39
+ const {
40
+ buttonActionsId,
41
+ } = RowActionsAPI({
42
+ row: {},
43
+ rowIndex: 1,
44
+ rowIndexPath: "0_1",
45
+ });
46
+
47
+ expect(buttonActionsId.value).toBe("aloha_action_0_1");
48
+ });
49
+
50
+ it("keeps the existing ID format when no tree index path is provided", () => {
51
+ const {
52
+ rowHtmlId,
53
+ } = AttributesAPI({
54
+ rowIndex: 2,
55
+ }, {});
56
+ const {
57
+ buttonActionsId,
58
+ } = RowActionsAPI({
59
+ row: {},
60
+ rowIndex: 2,
61
+ });
62
+
63
+ expect(rowHtmlId.value).toBe("aloha_2");
64
+ expect(buttonActionsId.value).toBe("aloha_action_2");
65
+ });
66
+ });
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  computed,
3
3
  h,
4
- onBeforeUnmount,
5
- onMounted,
6
- ref,
7
- toRef,
4
+ onBeforeUnmount,
5
+ onMounted,
6
+ ref,
7
+ toRef,
8
8
  } from "vue";
9
9
 
10
10
  import AButton from "../AButton/AButton";
@@ -23,13 +23,16 @@ import RowsAPI from "./compositionAPI/RowsAPI";
23
23
  import TextsAPI from "./compositionAPI/TextsAPI";
24
24
  import WidthsAPI from "./compositionAPI/WidthsAPI";
25
25
 
26
- import ExclamationCircleFill from "aloha-svg/dist/js/bootstrap/ExclamationCircleFill";
27
26
  import {
28
27
  get,
29
28
  isFunction,
30
29
  uniqueId,
31
30
  } from "lodash-es";
32
31
 
32
+ const ExclamationCircleFill = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-exclamation-circle-fill" viewBox="0 0 16 16">
33
+ <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4m.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2"/>
34
+ </svg>`;
35
+
33
36
  export default {
34
37
  name: "ATableForm",
35
38
  props: {
@@ -88,16 +91,16 @@ export default {
88
91
  required: false,
89
92
  default: undefined,
90
93
  },
91
- focusAfterMove: {
92
- type: Boolean,
93
- required: false,
94
- default: true,
95
- },
96
- fullWidthRowCallback: {
97
- type: Function,
98
- required: false,
99
- default: undefined,
100
- },
94
+ focusAfterMove: {
95
+ type: Boolean,
96
+ required: false,
97
+ default: true,
98
+ },
99
+ fullWidthRowCallback: {
100
+ type: Function,
101
+ required: false,
102
+ default: undefined,
103
+ },
101
104
  icons: {
102
105
  type: Object,
103
106
  required: false,
@@ -215,18 +218,18 @@ export default {
215
218
  "moveRow",
216
219
  "updateRows",
217
220
  ],
218
- setup(props, context) {
219
- const actionsDisabledCallback = toRef(props, "actionsDisabledCallback");
220
- const actionsTitleCallback = toRef(props, "actionsTitleCallback");
221
- const isAddRowActive = ref(false);
222
-
223
- const {
224
- allColumnsLength,
225
- columnsVisible,
226
- hasActionsColumn,
227
- } = ColumnsAPI(props, {
228
- isAddRowActive,
229
- });
221
+ setup(props, context) {
222
+ const actionsDisabledCallback = toRef(props, "actionsDisabledCallback");
223
+ const actionsTitleCallback = toRef(props, "actionsTitleCallback");
224
+ const isAddRowActive = ref(false);
225
+
226
+ const {
227
+ allColumnsLength,
228
+ columnsVisible,
229
+ hasActionsColumn,
230
+ } = ColumnsAPI(props, {
231
+ isAddRowActive,
232
+ });
230
233
 
231
234
  const {
232
235
  getRowKey,
@@ -250,49 +253,49 @@ export default {
250
253
  actionsClassesLocal,
251
254
  } = ClassesAPI(props);
252
255
 
253
- const {
256
+ const {
254
257
  activeEditRowKey,
255
258
  activeEditModel,
256
259
  activeEditFocusColumnId,
257
260
  canAddRow,
258
261
  hasActiveEditRow,
259
262
  hasRequiredEditableColumns,
260
- onAddRow,
263
+ onAddRow,
261
264
  onCancelEditRow,
262
265
  onEditRow,
263
266
  } = EditAPI(props, {
264
- columnsVisible,
265
- getRowKey,
266
- isAddRowActive,
267
- });
268
-
269
- const {
270
- columnsStylesGrow,
271
- destroyColumnsGrowObserver,
272
- initColumnsGrowObserver,
273
- } = ColumnsGrowAPI(props, {
274
- columnsVisible,
275
- hasActionsColumn,
276
- hasActiveEditRow,
277
- widthsLocal,
278
- });
279
-
280
- onMounted(() => {
281
- initColumnsGrowObserver();
282
- });
283
-
284
- onBeforeUnmount(() => {
285
- destroyColumnsGrowObserver();
286
- });
267
+ columnsVisible,
268
+ getRowKey,
269
+ isAddRowActive,
270
+ });
271
+
272
+ const {
273
+ columnsStylesGrow,
274
+ destroyColumnsGrowObserver,
275
+ initColumnsGrowObserver,
276
+ } = ColumnsGrowAPI(props, {
277
+ columnsVisible,
278
+ hasActionsColumn,
279
+ hasActiveEditRow,
280
+ widthsLocal,
281
+ });
282
+
283
+ onMounted(() => {
284
+ initColumnsGrowObserver();
285
+ });
286
+
287
+ onBeforeUnmount(() => {
288
+ destroyColumnsGrowObserver();
289
+ });
287
290
 
288
291
  const {
289
292
  canMoveRowDown,
290
293
  canMoveRowUp,
291
294
  dragOverPosition,
292
295
  dragOverRowIndex,
293
- draggedRowIndex,
294
- isDndDisabledForRow,
295
- isDndLockedForRow,
296
+ draggedRowIndex,
297
+ isDndDisabledForRow,
298
+ isDndLockedForRow,
296
299
  moveRowDown,
297
300
  moveRowUp,
298
301
  onDragend,
@@ -347,8 +350,8 @@ export default {
347
350
  draggedRowIndex,
348
351
  dragOverPosition,
349
352
  dragOverRowIndex,
350
- isDndDisabledForRow,
351
- isDndLockedForRow,
353
+ isDndDisabledForRow,
354
+ isDndLockedForRow,
352
355
  getRowKey,
353
356
  hasActionsColumn,
354
357
  hasActiveEditRow,
@@ -374,23 +377,23 @@ export default {
374
377
  };
375
378
  },
376
379
  render() {
377
- return h("div", {
378
- class: "a_table_form",
379
- }, [
380
- this.$slots.label ?
381
- this.$slots.label() :
382
- this.label && h(ATranslation, {
383
- class: [
384
- "a_table_form__label",
385
- this.labelClass,
386
- ],
387
- html: this.label,
388
- tag: this.labelTag,
389
- }),
390
- this.$slots.requiredPrepend && this.$slots.requiredPrepend(),
391
- this.hasRequiredEditableColumns && h(ARequired),
392
- this.$slots.requiredAppend && this.$slots.requiredAppend(),
393
- h("div", {
380
+ return h("div", {
381
+ class: "a_table_form",
382
+ }, [
383
+ this.$slots.label ?
384
+ this.$slots.label() :
385
+ this.label && h(ATranslation, {
386
+ class: [
387
+ "a_table_form__label",
388
+ this.labelClass,
389
+ ],
390
+ html: this.label,
391
+ tag: this.labelTag,
392
+ }),
393
+ this.$slots.requiredPrepend && this.$slots.requiredPrepend(),
394
+ this.hasRequiredEditableColumns && h(ARequired),
395
+ this.$slots.requiredAppend && this.$slots.requiredAppend(),
396
+ h("div", {
394
397
  class: "a_table_form__wrapper",
395
398
  }, [
396
399
  h("table", {
@@ -422,7 +425,7 @@ export default {
422
425
  draggedRowIndex: this.draggedRowIndex,
423
426
  extra: this.extra,
424
427
  hasActionsColumn: this.hasActionsColumn,
425
- hasActiveEditRow: this.hasActiveEditRow,
428
+ hasActiveEditRow: this.hasActiveEditRow,
426
429
  isActionsSticky: this.isActionsSticky,
427
430
  isActiveEditMode: false,
428
431
  isDeletable: this.isDeletable,
@@ -475,18 +478,18 @@ export default {
475
478
  draggedRowIndex: this.draggedRowIndex,
476
479
  editModel: this.activeEditRowKey === rowKey ? this.activeEditModel : undefined,
477
480
  editFocusColumnId: this.activeEditRowKey === rowKey ? this.activeEditFocusColumnId : undefined,
478
- errorIcon: this.errorIcon,
479
- extra: this.extra,
480
- fullWidthRowCallback: this.fullWidthRowCallback,
481
- hasActionsColumn: this.hasActionsColumn,
481
+ errorIcon: this.errorIcon,
482
+ extra: this.extra,
483
+ fullWidthRowCallback: this.fullWidthRowCallback,
484
+ hasActionsColumn: this.hasActionsColumn,
482
485
  hasActiveEditRow: this.hasActiveEditRow,
483
486
  isActionsSticky: this.isActionsSticky,
484
487
  isActiveEditMode: this.activeEditRowKey === rowKey,
485
488
  isCreateMode: false,
486
489
  isDeletable: this.isDeletable,
487
490
  isDeletableConfirm: this.isDeletableConfirm,
488
- isDndDisabled: this.isDndDisabledForRow(rowIndex),
489
- isDndLocked: this.isDndLockedForRow(rowIndex),
491
+ isDndDisabled: this.isDndDisabledForRow(rowIndex),
492
+ isDndLocked: this.isDndLockedForRow(rowIndex),
490
493
  isDragAndDrop: this.isDragAndDrop,
491
494
  isEditable: this.isEditable,
492
495
  isEditOnRowClick: this.isEditOnRowClick,
@@ -546,7 +549,7 @@ export default {
546
549
  isDeletableConfirm: false,
547
550
  isDndDisabled: true,
548
551
  isDragAndDrop: this.isDragAndDrop,
549
- isEditable: true,
552
+ isEditable: true,
550
553
  isEditOnRowClick: false,
551
554
  key: "body_create",
552
555
  moveRowDown: this.moveRowDown,
@@ -599,9 +602,9 @@ export default {
599
602
  columns: this.columnsVisible,
600
603
  columnsStylesGrow: this.columnsStylesGrow,
601
604
  draggedRowIndex: this.draggedRowIndex,
602
- extra: this.extra,
603
- fullWidthRowCallback: this.fullWidthRowCallback,
604
- hasActionsColumn: this.hasActionsColumn,
605
+ extra: this.extra,
606
+ fullWidthRowCallback: this.fullWidthRowCallback,
607
+ hasActionsColumn: this.hasActionsColumn,
605
608
  hasActiveEditRow: this.hasActiveEditRow,
606
609
  isActionsSticky: this.isActionsSticky,
607
610
  isActiveEditMode: false,
@@ -12,10 +12,20 @@ import IdsAPI from "./compositionAPI/IdsAPI";
12
12
  import StylesAPI from "./compositionAPI/StylesAPI";
13
13
  import TitleAPI from "./compositionAPI/TitleAPI";
14
14
 
15
- import Floppy2Fill from "aloha-svg/dist/js/bootstrap/Floppy2Fill";
16
- import PencilFill from "aloha-svg/dist/js/bootstrap/PencilFill";
17
- import Trash from "aloha-svg/dist/js/bootstrap/Trash";
18
- import XLg from "aloha-svg/dist/js/bootstrap/XLg";
15
+ const Floppy2Fill = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-floppy2-fill" viewBox="0 0 16 16">
16
+ <path d="M12 2h-2v3h2z"/>
17
+ <path d="M1.5 0A1.5 1.5 0 0 0 0 1.5v13A1.5 1.5 0 0 0 1.5 16h13a1.5 1.5 0 0 0 1.5-1.5V2.914a1.5 1.5 0 0 0-.44-1.06L14.147.439A1.5 1.5 0 0 0 13.086 0zM4 6a1 1 0 0 1-1-1V1h10v4a1 1 0 0 1-1 1zM3 9h10a1 1 0 0 1 1 1v5H2v-5a1 1 0 0 1 1-1"/>
18
+ </svg>`;
19
+ 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">
20
+ <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"/>
21
+ </svg>`;
22
+ 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">
23
+ <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"/>
24
+ <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"/>
25
+ </svg>`;
26
+ const XLg = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">
27
+ <path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8z"/>
28
+ </svg>`;
19
29
 
20
30
 
21
31
  export default {