aloha-vue 1.0.286 → 1.0.288

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aloha-vue",
3
3
  "description": "Project aloha",
4
- "version": "1.0.286",
4
+ "version": "1.0.288",
5
5
  "author": "Ilia Brykin",
6
6
  "scripts": {
7
7
  "build-icons": "node scriptsNode/iconsSvgToJs.js bootstrap3 && node scriptsNode/iconsSvgToJs.js bootstrap-1-9-1"
@@ -1,23 +1,3 @@
1
- export default `<svg
2
- xmlns="http://www.w3.org/2000/svg"
3
- viewBox="0 0 18 18"
4
- height="18"
5
- width="18"
6
- >
7
- <g
8
- transform="matrix(0.79646021,-0.79646021,0.79646021,0.79646021,-5.3362832,9.0000003)"
9
- >
10
- <rect
11
- width="4.599999"
12
- height="18"
13
- x="6.7000003"
14
- y="-5e-07"
15
- />
16
- <rect
17
- width="17.999996"
18
- height="4.5999999"
19
- x="5e-07"
20
- y="6.6999998"
21
- />
22
- </g>
1
+ export default `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">
2
+ <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 8 2.146 2.854Z"/>
23
3
  </svg>`;
@@ -1,14 +1,3 @@
1
- export default `<svg
2
- xmlns="http://www.w3.org/2000/svg"
3
- width="18"
4
- height="18"
5
- viewBox="0 0 18 18"
6
- >
7
- <g
8
- transform="matrix(0.01757812,0,0,0.01757812,-1.7577055e-5,7.5671054e-6)"
9
- >
10
- <path
11
- d="m 56.889,341.333 h 910.224 q 23.893,0 40.391,16.497 16.498,16.497 16.497,40.391 v 227.556 q 0,23.893 -16.497,40.391 -16.497,16.498 -40.391,16.497 H 56.889 q -23.893,0 -40.391,-16.497 Q 0,649.671 0.001,625.777 V 398.221 q 0,-23.893 16.497,-40.391 16.497,-16.498 40.391,-16.497 z"
12
- />
13
- </g>
1
+ export default `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-dash-lg" viewBox="0 0 16 16">
2
+ <path fill-rule="evenodd" d="M2 8a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11A.5.5 0 0 1 2 8Z"/>
14
3
  </svg>`;
@@ -1,14 +1,3 @@
1
- export default `<svg
2
- xmlns="http://www.w3.org/2000/svg"
3
- width="18"
4
- height="18"
5
- viewBox="0 0 18 18"
6
- >
7
- <g
8
- transform="matrix(0.01757811,0,0,0.01757811,0,-1.757811e-5)"
9
- >
10
- <path
11
- d="m 418.909,0.001 h 186.183 q 19.549,0 33.047,13.498 13.498,13.498 13.498,33.047 v 325.819 h 325.819 q 19.549,0 33.047,13.498 13.498,13.498 13.498,33.047 v 186.183 q 0,19.549 -13.498,33.047 -13.498,13.498 -33.047,13.498 H 651.637 v 325.819 q 0,19.549 -13.498,33.047 -13.498,13.498 -33.047,13.498 H 418.909 q -19.549,0 -33.047,-13.498 -13.498,-13.498 -13.498,-33.047 V 651.638 H 46.545 q -19.549,0 -33.047,-13.498 Q 0,624.642 0,605.093 V 418.91 Q 0,399.361 13.498,385.863 26.996,372.365 46.545,372.365 H 372.364 V 46.546 q 0,-19.549 13.498,-33.047 Q 399.36,0.001 418.909,0.001 Z"
12
- />
13
- </g>
1
+ export default `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-plus-lg" viewBox="0 0 16 16">
2
+ <path fill-rule="evenodd" d="M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2Z"/>
14
3
  </svg>`;
@@ -1,6 +1,10 @@
1
1
  .a_form_element_number_controls {
2
- display: inline-flex;
2
+ display: flex;
3
3
  align-items: stretch;
4
+ .a_form_element {
5
+ width: 100%;
6
+ max-width: 100%;
7
+ }
4
8
  .a_btn_group {
5
9
  border-top-left-radius: 0;
6
10
  border-bottom-left-radius: 0;
@@ -86,6 +86,11 @@ export default {
86
86
  type: Boolean,
87
87
  required: false,
88
88
  },
89
+ inputWidth: {
90
+ type: Number,
91
+ required: false,
92
+ default: 250,
93
+ },
89
94
  },
90
95
  setup(props, context) {
91
96
  const {
@@ -238,6 +243,9 @@ export default {
238
243
  }, [
239
244
  h("div", {
240
245
  class: "a_form_element",
246
+ style: {
247
+ width: this.inputWidth ? `${ this.inputWidth }px` : undefined,
248
+ },
241
249
  }, [
242
250
  this.iconPrepend && h(AIcon, {
243
251
  icon: this.iconPrepend,
@@ -16,6 +16,7 @@ export default function InputEventsAPI(props, {
16
16
  onBlur = () => {},
17
17
  setCurrentValue = () => {},
18
18
  userInput = ref(null),
19
+ currentValue = ref(undefined),
19
20
  displayValue = computed(() => ""),
20
21
  }) {
21
22
  const eAllowed = toRef(props, "eAllowed");
@@ -58,7 +59,6 @@ export default function InputEventsAPI(props, {
58
59
 
59
60
  const handleInput = $event => {
60
61
  const value = $event.target.value;
61
- console.log("value", value);
62
62
  userInput.value = value;
63
63
  const newVal = value === "" ? null : Number(value);
64
64
  setCurrentValue(newVal, false);
@@ -102,8 +102,10 @@ export default function InputEventsAPI(props, {
102
102
  };
103
103
 
104
104
  const onBlurNumber = $event => {
105
- console.log("onBlurNumber");
106
- if (!modelValue.value && modelValue.value !== 0) {
105
+ if (userInput.value !== null ||
106
+ (!modelValue.value && modelValue.value !== 0)) {
107
+ userInput.value = null;
108
+ currentValue.value = modelValue.value;
107
109
  inputRef.value.value = displayValue.value;
108
110
  }
109
111
  onBlur($event);