aloha-vue 1.2.30 → 1.2.32

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/dist/aloha-vue.js CHANGED
@@ -68,6 +68,7 @@ export { default as AGroupButtonDropdownPlugin } from "../src/plugins/AGroupButt
68
68
  export { default as AHttpPlugin } from "../src/plugins/AHttpPlugin";
69
69
  export { default as AI18nPlugin } from "../src/plugins/AI18nPlugin";
70
70
  export { default as AIconPlugin } from "../src/plugins/AIconPlugin";
71
+ export { default as AInputNumberPlugin } from "../src/plugins/AInputNumberPlugin";
71
72
  export { default as AMobilePlugin } from "../src/plugins/AMobilePlugin";
72
73
  export { default as AModalPlugin } from "../src/plugins/AModalPlugin";
73
74
  export { default as APageTabTitlePlugin } from "../src/plugins/APageTabTitlePlugin";
package/dist/index.js CHANGED
@@ -68,6 +68,7 @@ export { default as AGroupButtonDropdownPlugin } from "../src/plugins/AGroupButt
68
68
  export { default as AHttpPlugin } from "../src/plugins/AHttpPlugin";
69
69
  export { default as AI18nPlugin } from "../src/plugins/AI18nPlugin";
70
70
  export { default as AIconPlugin } from "../src/plugins/AIconPlugin";
71
+ export { default as AInputNumberPlugin } from "../src/plugins/AInputNumberPlugin";
71
72
  export { default as AMobilePlugin } from "../src/plugins/AMobilePlugin";
72
73
  export { default as AModalPlugin } from "../src/plugins/AModalPlugin";
73
74
  export { default as APageTabTitlePlugin } from "../src/plugins/APageTabTitlePlugin";
@@ -1,5 +1,6 @@
1
1
  import AIcon from "../../../../../../src/AIcon/AIcon";
2
2
  import AlohaExample from "../../../../global/components/AlohaExample/AlohaExample.vue";
3
+ import ASwitch from "../../../../../../src/ui/ASwitch/ASwitch";
3
4
  import ATable from "../../../../../../src/ATable/ATable";
4
5
 
5
6
  import HtmlAPI from "./compositionAPI/HtmlAPI";
@@ -15,6 +16,7 @@ export default {
15
16
  components: {
16
17
  AIcon,
17
18
  AlohaExample,
19
+ ASwitch,
18
20
  ATable,
19
21
  },
20
22
  setup() {
@@ -34,6 +36,7 @@ export default {
34
36
  data() {
35
37
  return {
36
38
  modelView: undefined,
39
+ modelLoading: false,
37
40
  modelColumnsVisible: {
38
41
  aloha: true,
39
42
  },
@@ -5,7 +5,10 @@ aloha-example(
5
5
  description="_A_TABLE_GROUP_COMPLEX_DESCRIPTION_"
6
6
  )
7
7
  div
8
- div#alohaTest Kolokol
8
+ div
9
+ a-switch(
10
+ v-model="modelLoading"
11
+ )
9
12
  a-table(
10
13
  ref="aloha"
11
14
  :columns="columns"
@@ -23,7 +26,7 @@ aloha-example(
23
26
  :is-pagination="true"
24
27
  :filter="{ filters }"
25
28
  :rows-footer="rowsFooter"
26
- :is-loading-table="false"
29
+ :is-loading-table="modelLoading"
27
30
  :is-loading-multiple-actions="false"
28
31
  :views="views"
29
32
  :model-view="modelView"
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "Vue.js"
15
15
  ],
16
16
  "homepage": "https://github.com/ilia-brykin/aloha/#README.md",
17
- "version": "1.2.30",
17
+ "version": "1.2.32",
18
18
  "author": {
19
19
  "name": "Ilia Brykin",
20
20
  "email": "brykin.ilia@gmail.com"
@@ -839,6 +839,7 @@ export default {
839
839
  }),
840
840
  this.isPreviewRightOpen && h(ATablePreviewRight, {
841
841
  countAllRows: this.countAllRowsLocal,
842
+ isLoadingTable: this.isLoadingTable,
842
843
  limitPagination: this.limit,
843
844
  offsetPagination: this.offset,
844
845
  previewHeaderTag: this.previewHeaderTag,
@@ -5,6 +5,7 @@ import {
5
5
  } from "vue";
6
6
 
7
7
  import AButton from "../../AButton/AButton";
8
+ import ACloak from "../../ACloak/ACloak";
8
9
  import AResizer from "../../AResizer/AResizer";
9
10
  import ATranslation from "../../ATranslation/ATranslation";
10
11
 
@@ -20,6 +21,10 @@ export default {
20
21
  type: Number,
21
22
  required: true,
22
23
  },
24
+ isLoadingTable: {
25
+ type: Boolean,
26
+ required: false,
27
+ },
23
28
  limitPagination: {
24
29
  type: Number,
25
30
  required: false,
@@ -140,39 +145,41 @@ export default {
140
145
  h(this.previewHeaderTag, {
141
146
  class: "a_table__preview_right__header",
142
147
  }, [
143
- h("div", {}, [
144
- h(ATranslation, {
145
- class: "a_table__preview_right__header__text",
146
- tag: "span",
147
- text: "_A_TABLE_PREVIEW_RIGHT_HEADER_{{rowNumber}}_{{rowNumberFormatted}}_{{countAllRows}}_{{countAllRowsFormatted}}_",
148
- extra: {
149
- rowNumber: this.rowNumber,
150
- rowNumberFormatted: this.rowNumberFormatted,
151
- countAllRows: this.countAllRows,
152
- countAllRowsFormatted: this.countAllRowsFormatted,
153
- },
154
- }),
155
- h("div", {
156
- class: "a_table__preview_right__header__icons",
157
- }, [
158
- h(AButton, {
159
- class: "a_btn a_btn_transparent_dark a_btn_small",
160
- disabled: this.disabledBtnArrowLeft,
161
- iconLeft: "ArrowLeft",
162
- title: "_A_TABLE_PREVIEW_RIGHT_PREVIOUS_ROW_",
163
- textScreenReader: "_A_TABLE_PREVIEW_RIGHT_PREVIOUS_ROW_",
164
- onClick: this.toLastRow,
165
- }),
166
- h(AButton, {
167
- class: "a_btn a_btn_transparent_dark a_btn_small",
168
- disabled: this.disabledBtnArrowRight,
169
- iconLeft: "ArrowRight",
170
- title: "_A_TABLE_PREVIEW_RIGHT_NEXT_ROW_",
171
- textScreenReader: "_A_TABLE_PREVIEW_RIGHT_NEXT_ROW_",
172
- onClick: this.toNextRow,
148
+ this.isLoadingTable ?
149
+ h(ACloak) :
150
+ h("div", {}, [
151
+ h(ATranslation, {
152
+ class: "a_table__preview_right__header__text",
153
+ tag: "span",
154
+ text: "_A_TABLE_PREVIEW_RIGHT_HEADER_{{rowNumber}}_{{rowNumberFormatted}}_{{countAllRows}}_{{countAllRowsFormatted}}_",
155
+ extra: {
156
+ rowNumber: this.rowNumber,
157
+ rowNumberFormatted: this.rowNumberFormatted,
158
+ countAllRows: this.countAllRows,
159
+ countAllRowsFormatted: this.countAllRowsFormatted,
160
+ },
173
161
  }),
162
+ h("div", {
163
+ class: "a_table__preview_right__header__icons",
164
+ }, [
165
+ h(AButton, {
166
+ class: "a_btn a_btn_transparent_dark a_btn_small",
167
+ disabled: this.disabledBtnArrowLeft,
168
+ iconLeft: "ArrowLeft",
169
+ title: "_A_TABLE_PREVIEW_RIGHT_PREVIOUS_ROW_",
170
+ textScreenReader: "_A_TABLE_PREVIEW_RIGHT_PREVIOUS_ROW_",
171
+ onClick: this.toLastRow,
172
+ }),
173
+ h(AButton, {
174
+ class: "a_btn a_btn_transparent_dark a_btn_small",
175
+ disabled: this.disabledBtnArrowRight,
176
+ iconLeft: "ArrowRight",
177
+ title: "_A_TABLE_PREVIEW_RIGHT_NEXT_ROW_",
178
+ textScreenReader: "_A_TABLE_PREVIEW_RIGHT_NEXT_ROW_",
179
+ onClick: this.toNextRow,
180
+ }),
181
+ ]),
174
182
  ]),
175
- ]),
176
183
  h(AButton, {
177
184
  class: "a_btn a_btn_transparent_dark a_table__preview_right__btn_close",
178
185
  iconLeft: "Close",
@@ -185,14 +192,15 @@ export default {
185
192
  h("div", {
186
193
  class: "a_table__preview_right__body",
187
194
  }, [
188
- this.$slots.previewRight ?
189
- this.$slots.previewRight({
190
- row: this.currentRow,
191
- rowIndex: this.rowIndex,
192
- }) :
193
- h(ATranslation, {
194
- text: "_A_TABLE_PREVIEW_RIGHT_HAS_NOT_SLOT_",
195
- }),
195
+ this.isLoadingTable ? h(ACloak) :
196
+ this.$slots.previewRight ?
197
+ this.$slots.previewRight({
198
+ row: this.currentRow,
199
+ rowIndex: this.rowIndex,
200
+ }) :
201
+ h(ATranslation, {
202
+ text: "_A_TABLE_PREVIEW_RIGHT_HAS_NOT_SLOT_",
203
+ }),
196
204
  ]),
197
205
  ]);
198
206
  },
@@ -0,0 +1,34 @@
1
+ import {
2
+ ref,
3
+ } from "vue";
4
+
5
+ export const inputNumberPluginOptions = ref({
6
+ propsDefault: {
7
+ controlsType: "plus-minus",
8
+ eAllowed: false,
9
+ iconPrepend: undefined,
10
+ inputWidth: 200,
11
+ isLabelFloat: false,
12
+ max: undefined,
13
+ min: undefined,
14
+ modelUndefined: undefined,
15
+ placeholder: undefined,
16
+ precision: undefined,
17
+ readonly: undefined,
18
+ step: 1,
19
+ stepStrictly: undefined,
20
+ type: "number",
21
+ },
22
+ });
23
+
24
+
25
+ export default {
26
+ install: (app, {
27
+ propsDefault = {},
28
+ } = {}) => {
29
+ inputNumberPluginOptions.value.propsDefault = {
30
+ ...inputNumberPluginOptions.value.propsDefault,
31
+ ...propsDefault,
32
+ };
33
+ },
34
+ };
@@ -6,8 +6,8 @@
6
6
  --a_table_cell_padding_x: .5rem;
7
7
  --a_table_cell_padding_y: .5rem;
8
8
  --a_table_row_hover_bg: #e1f2ff;
9
- --a_table_row_preview_focus_bg: rgba(192, 209, 117, 0.75);
10
- --a_table_row_preview_focus_was_bg: rgba(192, 209, 117, 0.3);
9
+ --a_table_row_preview_focus_bg: #D0DD98;
10
+ --a_table_row_preview_focus_was_bg: #ECF1D5;
11
11
  --a_table_quick_search_width: 250px;
12
12
  --a_table_between_actions_margin: .5rem;
13
13
  --a_table_preview_right_padding: .25rem .8rem;
@@ -72,17 +72,15 @@
72
72
  hyphens: auto;
73
73
  }
74
74
  .a_table__grandparent:not(.a_table_mobile) {
75
- .a_table__cell {
76
- .a_table__row_hover:hover &,
77
- .a_table__row_hover:focus-within & {
78
- background-color: var(--a_table_row_hover_bg);
79
- }
80
- .a_table__row.a_table__row_focus > & {
81
- background-color: var(--a_table_row_preview_focus_bg);
82
- }
83
- .a_table__row.a_table__row_focus_was > & {
84
- background-color: var(--a_table_row_preview_focus_was_bg);
85
- }
75
+ .a_table__row_hover:hover > *,
76
+ .a_table__row_hover:focus-within > * {
77
+ background-color: var(--a_table_row_hover_bg);
78
+ }
79
+ .a_table__row.a_table__row_focus > * {
80
+ background-color: var(--a_table_row_preview_focus_bg);
81
+ }
82
+ .a_table__row.a_table__row_focus_was > * {
83
+ background-color: var(--a_table_row_preview_focus_was_bg);
86
84
  }
87
85
  }
88
86
  .a_table__cell__child {
@@ -27,6 +27,9 @@ import UiInputAutofillAPI from "../compositionApi/UiInputAutofillAPI";
27
27
  import UiStyleHideAPI from "../compositionApi/UiStyleHideAPI";
28
28
  import VerifyAPI from "./compositionAPI/VerifyAPI";
29
29
 
30
+ import {
31
+ inputNumberPluginOptions,
32
+ } from "../../plugins/AInputNumberPlugin";
30
33
  import {
31
34
  isNumber,
32
35
  } from "lodash-es";
@@ -41,69 +44,73 @@ export default {
41
44
  controlsType: {
42
45
  type: String,
43
46
  required: false,
44
- default: "plus-minus",
47
+ default: inputNumberPluginOptions.value.propsDefault.controlsType,
45
48
  validator: value => ["plus-minus", "arrows"].indexOf(value) !== -1,
46
49
  // TODO: "arrows",
47
50
  },
48
51
  eAllowed: {
49
52
  type: Boolean,
50
53
  required: false,
54
+ default: inputNumberPluginOptions.value.propsDefault.eAllowed,
51
55
  },
52
56
  iconPrepend: {
53
57
  type: String,
54
58
  required: false,
55
- default: undefined,
59
+ default: inputNumberPluginOptions.value.propsDefault.iconPrepend,
56
60
  },
57
61
  inputWidth: {
58
62
  type: [String, Number],
59
63
  required: false,
60
- default: 200,
64
+ default: inputNumberPluginOptions.value.propsDefault.inputWidth,
61
65
  },
62
66
  isLabelFloat: {
63
67
  type: Boolean,
64
68
  required: false,
65
- default: false,
69
+ default: inputNumberPluginOptions.value.propsDefault.isLabelFloat,
66
70
  },
67
71
  max: {
68
72
  type: Number,
69
73
  required: false,
70
- default: undefined,
74
+ default: inputNumberPluginOptions.value.propsDefault.max,
71
75
  },
72
76
  min: {
73
77
  type: Number,
74
78
  required: false,
75
- default: undefined,
79
+ default: inputNumberPluginOptions.value.propsDefault.min,
76
80
  },
77
81
  modelUndefined: {
78
82
  required: false,
79
- default: undefined,
83
+ default: inputNumberPluginOptions.value.propsDefault.modelUndefined,
80
84
  },
81
85
  placeholder: {
82
86
  type: [String, Number],
83
87
  required: false,
84
- default: undefined,
88
+ default: inputNumberPluginOptions.value.propsDefault.placeholder,
85
89
  },
86
90
  precision: {
87
91
  type: Number,
88
92
  validator: value => value >= 0 && value === Number.parseInt(`${ value }`, 10),
93
+ default: inputNumberPluginOptions.value.propsDefault.placeholder,
89
94
  },
90
95
  readonly: {
91
96
  type: Boolean,
92
97
  required: false,
98
+ default: inputNumberPluginOptions.value.propsDefault.readonly,
93
99
  },
94
100
  step: {
95
101
  type: Number,
96
102
  required: false,
97
- default: 1,
103
+ default: inputNumberPluginOptions.value.propsDefault.step,
98
104
  },
99
105
  stepStrictly: {
100
106
  type: Boolean,
101
107
  required: false,
108
+ default: inputNumberPluginOptions.value.propsDefault.stepStrictly,
102
109
  },
103
110
  type: {
104
111
  type: String,
105
112
  required: false,
106
- default: "number",
113
+ default: inputNumberPluginOptions.value.propsDefault.type,
107
114
  validator: value => ["number", "integerNonNegative", "integerPositive", "integer"].indexOf(value) !== -1,
108
115
  // TODO: "float", "floatPositiv", "floatNonNegative"
109
116
  },