aloha-vue 1.2.118 → 1.2.120
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/package.json +1 -1
- package/src/AFilters/AFiltersHorizontal/AFiltersHorizontalFilterUi/AFiltersHorizontalFilterUi.js +2 -2
- package/src/AFilters/AFiltersHorizontal/AFiltersHorizontalFilterUi/compositionAPI/{DataAPI.js → UpdateDataAPI.js} +3 -3
- package/src/AFilters/AFiltersHorizontal/compositionAPI/FormAPI.js +29 -6
- package/src/plugins/ATinymcePlugin.js +1 -1
- package/src/ui/ATinymce/compositionAPI/ATinymceAPI.js +13 -11
package/package.json
CHANGED
package/src/AFilters/AFiltersHorizontal/AFiltersHorizontalFilterUi/AFiltersHorizontalFilterUi.js
CHANGED
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
|
|
5
5
|
import ComponentTypesAPI from "./compositionAPI/ComponentTypesAPI";
|
|
6
6
|
import ContainerAPI from "./compositionAPI/ContainerAPI";
|
|
7
|
-
import DataAPI from "./compositionAPI/DataAPI";
|
|
8
7
|
import FilterSpecificTypeAPI from "./compositionAPI/FilterSpecificTypeAPI";
|
|
9
8
|
import IdAPI from "./compositionAPI/IdAPI";
|
|
10
9
|
import ModelAPI from "./compositionAPI/ModelAPI";
|
|
10
|
+
import UpdateDataAPI from "./compositionAPI/UpdateDataAPI";
|
|
11
11
|
|
|
12
12
|
export default {
|
|
13
13
|
name: "AFiltersHorizontalFilterUi",
|
|
@@ -51,7 +51,7 @@ export default {
|
|
|
51
51
|
|
|
52
52
|
const {
|
|
53
53
|
emitForComponentsWithData,
|
|
54
|
-
} =
|
|
54
|
+
} = UpdateDataAPI(props);
|
|
55
55
|
|
|
56
56
|
const {
|
|
57
57
|
idPrefix,
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
toRef,
|
|
4
4
|
} from "vue";
|
|
5
5
|
|
|
6
|
-
export default function
|
|
6
|
+
export default function UpdateDataAPI(props) {
|
|
7
7
|
const filter = toRef(props, "filter");
|
|
8
8
|
const updateDataKeyByIdFromFilter = toRef(props, "updateDataKeyByIdFromFilter");
|
|
9
9
|
|
|
10
|
-
const
|
|
10
|
+
const TYPES_WITH_DATA = ["select", "multiselect", "radio", "checkbox", "group", "fieldset"];
|
|
11
11
|
|
|
12
12
|
const updateDataLocal = ({ dataKeyByKeyId, item }) => {
|
|
13
13
|
let filterId = filter.value.id;
|
|
@@ -22,7 +22,7 @@ export default function DataAPI(props) {
|
|
|
22
22
|
|
|
23
23
|
const emitForComponentsWithData = computed(() => {
|
|
24
24
|
const EMITS = {};
|
|
25
|
-
if (
|
|
25
|
+
if (TYPES_WITH_DATA.indexOf(filter.value.type) !== -1) {
|
|
26
26
|
EMITS.onUpdateData = updateDataLocal;
|
|
27
27
|
}
|
|
28
28
|
return EMITS;
|
|
@@ -11,18 +11,38 @@ import {
|
|
|
11
11
|
export default function FormAPI(props) {
|
|
12
12
|
const filtersGroup = toRef(props, "filtersGroup");
|
|
13
13
|
const filtersVisible = toRef(props, "filtersVisible");
|
|
14
|
+
const updateDataKeyByIdFromFilter = toRef(props, "updateDataKeyByIdFromFilter");
|
|
15
|
+
|
|
16
|
+
const LABEL_CLASS = "a_column a_column_12_touch a_column_3_fullhd a_column_3_widescreen a_column_3_desktop";
|
|
17
|
+
const CLASS_COLUMNS = "a_columns a_columns_count_12 a_columns_gab_x_2 a_columns_gab_y_2 a_columns_gab_y_1_touch";
|
|
18
|
+
const CLASS_COLUMN_DEFAULT = "a_filters__form_element a_column a_column_12_touch a_column_9_fullhd a_column_9_widescreen a_column_9_desktop";
|
|
19
|
+
const TYPES_WITH_DATA = ["select", "multiselect", "radio", "checkbox", "group", "fieldset"];
|
|
20
|
+
|
|
21
|
+
const updateDataLocal = ({ dataKeyByKeyId, item, filter }) => {
|
|
22
|
+
let filterId = filter.id;
|
|
23
|
+
if (item) {
|
|
24
|
+
filterId = item.id;
|
|
25
|
+
}
|
|
26
|
+
updateDataKeyByIdFromFilter.value({
|
|
27
|
+
filterId: filterId,
|
|
28
|
+
dataKeyByKeyId,
|
|
29
|
+
});
|
|
30
|
+
};
|
|
14
31
|
|
|
15
32
|
const dataForForm = computed(() => {
|
|
16
33
|
const DATA = [];
|
|
17
34
|
forEach(filtersGroup.value.alwaysVisible, filter => {
|
|
18
35
|
const FILTER = cloneDeep(filter);
|
|
19
|
-
FILTER.labelClass =
|
|
20
|
-
FILTER.classColumn =
|
|
36
|
+
FILTER.labelClass = LABEL_CLASS;
|
|
37
|
+
FILTER.classColumn = CLASS_COLUMN_DEFAULT;
|
|
38
|
+
if (TYPES_WITH_DATA.indexOf(filter.type) !== -1) {
|
|
39
|
+
FILTER.onUpdateData = ({ dataKeyByKeyId, item }) => updateDataLocal({ dataKeyByKeyId, item, filter });
|
|
40
|
+
}
|
|
21
41
|
|
|
22
42
|
DATA.push({
|
|
23
43
|
type: "group",
|
|
24
44
|
id: `group_${ filter.id }`,
|
|
25
|
-
classColumns:
|
|
45
|
+
classColumns: CLASS_COLUMNS,
|
|
26
46
|
children: [
|
|
27
47
|
FILTER
|
|
28
48
|
],
|
|
@@ -31,15 +51,18 @@ export default function FormAPI(props) {
|
|
|
31
51
|
|
|
32
52
|
forEach(filtersVisible.value, filter => {
|
|
33
53
|
const FILTER = cloneDeep(filter);
|
|
34
|
-
FILTER.labelClass =
|
|
35
|
-
FILTER.classColumn =
|
|
54
|
+
FILTER.labelClass = LABEL_CLASS;
|
|
55
|
+
FILTER.classColumn = `${ CLASS_COLUMN_DEFAULT } a_d_flex a_align_items_center`;
|
|
36
56
|
FILTER.slotAppend = "groupAppend";
|
|
37
57
|
FILTER.class = "a_width_100";
|
|
58
|
+
if (TYPES_WITH_DATA.indexOf(filter.type) !== -1) {
|
|
59
|
+
FILTER.onUpdateData = ({ dataKeyByKeyId, item }) => updateDataLocal({ dataKeyByKeyId, item, filter });
|
|
60
|
+
}
|
|
38
61
|
|
|
39
62
|
DATA.push({
|
|
40
63
|
type: "group",
|
|
41
64
|
id: `group_${ filter.id }`,
|
|
42
|
-
classColumns:
|
|
65
|
+
classColumns: CLASS_COLUMNS,
|
|
43
66
|
children: [
|
|
44
67
|
FILTER
|
|
45
68
|
],
|
|
@@ -18,7 +18,7 @@ export const tinymcePluginOptions = ref({
|
|
|
18
18
|
maxlength: undefined,
|
|
19
19
|
menu: undefined,
|
|
20
20
|
menubar: false,
|
|
21
|
-
plugins: "advlist code emoticons link lists table help example",
|
|
21
|
+
plugins: "advlist autoresize code emoticons link lists table help example",
|
|
22
22
|
promotion: false,
|
|
23
23
|
rows: undefined,
|
|
24
24
|
toolbar: [
|
|
@@ -23,6 +23,7 @@ import "tinymce/skins/ui/oxide/skin.css";
|
|
|
23
23
|
|
|
24
24
|
/* Import plugins */
|
|
25
25
|
import "tinymce/plugins/advlist";
|
|
26
|
+
import "tinymce/plugins/autoresize";
|
|
26
27
|
import "tinymce/plugins/code";
|
|
27
28
|
import "tinymce/plugins/emoticons";
|
|
28
29
|
import "tinymce/plugins/emoticons/js/emojis";
|
|
@@ -77,25 +78,26 @@ export default function ATinymceAPI(props, context, {
|
|
|
77
78
|
const render = () => {
|
|
78
79
|
modelValueLocal = modelValue.value;
|
|
79
80
|
tinymce.init({
|
|
80
|
-
|
|
81
|
-
plugins: plugins.value,
|
|
82
|
-
toolbar: toolbar.value,
|
|
83
|
-
toolbar_mode: toolbarMode.value,
|
|
84
|
-
skin: false,
|
|
81
|
+
branding: branding.value,
|
|
85
82
|
content_css: false,
|
|
86
|
-
|
|
83
|
+
content_langs: contentLangs.value,
|
|
87
84
|
content_style: contentStyle.value,
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
contextmenu: "copy paste",
|
|
86
|
+
entity_encoding: "raw",
|
|
87
|
+
force_br_newlines: true,
|
|
88
|
+
indent: false,
|
|
90
89
|
language: languageDefault.value,
|
|
91
|
-
content_langs: contentLangs.value,
|
|
92
90
|
menu: menu.value,
|
|
93
91
|
menubar: menubar.value,
|
|
92
|
+
plugins: plugins.value,
|
|
93
|
+
promotion: promotion.value,
|
|
94
94
|
readonly: !!disabled.value,
|
|
95
|
+
selector: `#${ htmlIdLocal.value }`,
|
|
96
|
+
skin: false,
|
|
97
|
+
toolbar: toolbar.value,
|
|
98
|
+
toolbar_mode: toolbarMode.value,
|
|
95
99
|
valid_elements: validElements.value,
|
|
96
100
|
valid_styles: validStyles.value,
|
|
97
|
-
force_br_newlines: true,
|
|
98
|
-
indent: false,
|
|
99
101
|
|
|
100
102
|
setup: editor => {
|
|
101
103
|
vueEditor = editor;
|