@onereach/ui-components 2.74.2-beta.2295.0 → 2.74.2-beta.2298.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.
@@ -135,7 +135,7 @@ var script = defineComponent({
135
135
  const confirmationButton = ref();
136
136
  // State
137
137
  const touched = ref(false);
138
- const isActive = ref(false);
138
+ const isActive = ref(props.isOpen || false);
139
139
  const isInputActive = ref(false);
140
140
  const confirmationValue = ref('');
141
141
  const {
@@ -150,15 +150,16 @@ var script = defineComponent({
150
150
  // Methods
151
151
  function open() {
152
152
  isActive.value = true;
153
- if (props.isOpen === undefined) {
154
- emit('open');
155
- }
153
+ emit('open');
156
154
  }
157
155
  function close() {
158
- if (props.isOpen === undefined) {
156
+ // In case if component opened by isOpen - only event can be emited, app will catch it and flip reference
157
+ if (props.isOpen === true) {
158
+ emit('close');
159
+ } else {
159
160
  isActive.value = false;
161
+ emit('close');
160
162
  }
161
- emit('close');
162
163
  }
163
164
  function confirm() {
164
165
  if (!props.disabled && !isInvalid.value) emit('confirm');
@@ -172,10 +173,9 @@ var script = defineComponent({
172
173
  }
173
174
  // Events
174
175
  watch(() => props.isOpen, value => {
175
- if (value === true) {
176
- open();
177
- } else if (value === false) {
178
- close();
176
+ // In case if component opened by isOpen - no need to emmit events, we need just sync local state
177
+ if (value != undefined) {
178
+ isActive.value = value;
179
179
  }
180
180
  }, {
181
181
  immediate: true
@@ -19,7 +19,7 @@ export { _ as OrCode, O as OrCodeLanguages } from '../OrCode-fc6876ec.js';
19
19
  export { O as OrCollapse } from '../OrCollapse-3aa9a9b7.js';
20
20
  export { _ as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from '../OrColorPicker-a1a37e83.js';
21
21
  export { _ as OrConfirm } from '../OrConfirm-55b89b17.js';
22
- export { C as ConfirmType, _ as OrConfirmV3 } from '../OrConfirm-1fe4088c.js';
22
+ export { C as ConfirmType, _ as OrConfirmV3 } from '../OrConfirm-36302f66.js';
23
23
  export { D as DEFAULT_TEXT, _ as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from '../OrDateTimePicker-e212f892.js';
24
24
  export { O as OrError } from '../OrError-31503e4c.js';
25
25
  export { _ as OrErrorTagV3 } from '../OrErrorTag-4675604d.js';
@@ -1,4 +1,4 @@
1
- export { C as ConfirmType, _ as OrConfirmV3 } from '../../OrConfirm-1fe4088c.js';
1
+ export { C as ConfirmType, _ as OrConfirmV3 } from '../../OrConfirm-36302f66.js';
2
2
  import '@vueuse/core';
3
3
  import '../../index-17f264f9.js';
4
4
  import '../../index-fa6eb4ca.js';
@@ -24,7 +24,7 @@ export { _ as OrCode, O as OrCodeLanguages } from './OrCode-fc6876ec.js';
24
24
  export { O as OrCollapse } from './OrCollapse-3aa9a9b7.js';
25
25
  export { _ as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from './OrColorPicker-a1a37e83.js';
26
26
  export { _ as OrConfirm } from './OrConfirm-55b89b17.js';
27
- export { C as ConfirmType, _ as OrConfirmV3 } from './OrConfirm-1fe4088c.js';
27
+ export { C as ConfirmType, _ as OrConfirmV3 } from './OrConfirm-36302f66.js';
28
28
  export { D as DEFAULT_TEXT, _ as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from './OrDateTimePicker-e212f892.js';
29
29
  export { O as OrError } from './OrError-31503e4c.js';
30
30
  export { _ as OrErrorTagV3 } from './OrErrorTag-4675604d.js';
@@ -136,7 +136,7 @@ var script = defineComponent({
136
136
  const confirmationButton = ref();
137
137
  // State
138
138
  const touched = ref(false);
139
- const isActive = ref(false);
139
+ const isActive = ref(props.isOpen || false);
140
140
  const isInputActive = ref(false);
141
141
  const confirmationValue = ref('');
142
142
  const {
@@ -151,15 +151,16 @@ var script = defineComponent({
151
151
  // Methods
152
152
  function open() {
153
153
  isActive.value = true;
154
- if (props.isOpen === undefined) {
155
- emit('open');
156
- }
154
+ emit('open');
157
155
  }
158
156
  function close() {
159
- if (props.isOpen === undefined) {
157
+ // In case if component opened by isOpen - only event can be emited, app will catch it and flip reference
158
+ if (props.isOpen === true) {
159
+ emit('close');
160
+ } else {
160
161
  isActive.value = false;
162
+ emit('close');
161
163
  }
162
- emit('close');
163
164
  }
164
165
  function confirm() {
165
166
  if (!props.disabled && !isInvalid.value) emit('confirm');
@@ -173,10 +174,9 @@ var script = defineComponent({
173
174
  }
174
175
  // Events
175
176
  watch(() => props.isOpen, value => {
176
- if (value === true) {
177
- open();
178
- } else if (value === false) {
179
- close();
177
+ // In case if component opened by isOpen - no need to emmit events, we need just sync local state
178
+ if (value != undefined) {
179
+ isActive.value = value;
180
180
  }
181
181
  }, {
182
182
  immediate: true
@@ -19,7 +19,7 @@ export { s as OrCode, O as OrCodeLanguages } from '../OrCode.vue_vue_type_script
19
19
  export { s as OrCollapse } from '../OrCollapse.vue_vue_type_script_lang-65cbb754.js';
20
20
  export { s as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from '../OrColorPicker.vue_vue_type_script_lang-4141378d.js';
21
21
  export { s as OrConfirm } from '../OrConfirm.vue_vue_type_script_lang-41b4d791.js';
22
- export { C as ConfirmType, s as OrConfirmV3 } from '../OrConfirm.vue_vue_type_script_lang-1bcc55ff.js';
22
+ export { C as ConfirmType, s as OrConfirmV3 } from '../OrConfirm.vue_vue_type_script_lang-4a2b7647.js';
23
23
  export { D as DEFAULT_TEXT, s as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from '../OrDateTimePicker.vue_vue_type_script_lang-7bfe5005.js';
24
24
  export { s as OrError } from '../OrError.vue_vue_type_script_lang-7c39e012.js';
25
25
  export { s as OrErrorTagV3 } from '../OrErrorTag.vue_vue_type_script_lang-bfa4c580.js';
@@ -1,4 +1,4 @@
1
- export { C as ConfirmType, s as OrConfirmV3 } from '../../OrConfirm.vue_vue_type_script_lang-1bcc55ff.js';
1
+ export { C as ConfirmType, s as OrConfirmV3 } from '../../OrConfirm.vue_vue_type_script_lang-4a2b7647.js';
2
2
  import '@vueuse/core';
3
3
  import '../../index-01519e46.js';
4
4
  import 'vue';
@@ -39,8 +39,8 @@ import { s as script$8 } from './OrColorPicker.vue_vue_type_script_lang-4141378d
39
39
  export { s as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from './OrColorPicker.vue_vue_type_script_lang-4141378d.js';
40
40
  import { s as script$9 } from './OrConfirm.vue_vue_type_script_lang-41b4d791.js';
41
41
  export { s as OrConfirm } from './OrConfirm.vue_vue_type_script_lang-41b4d791.js';
42
- import { s as script$a } from './OrConfirm.vue_vue_type_script_lang-1bcc55ff.js';
43
- export { C as ConfirmType, s as OrConfirmV3 } from './OrConfirm.vue_vue_type_script_lang-1bcc55ff.js';
42
+ import { s as script$a } from './OrConfirm.vue_vue_type_script_lang-4a2b7647.js';
43
+ export { C as ConfirmType, s as OrConfirmV3 } from './OrConfirm.vue_vue_type_script_lang-4a2b7647.js';
44
44
  import { s as script$b } from './OrDateTimePicker.vue_vue_type_script_lang-7bfe5005.js';
45
45
  export { D as DEFAULT_TEXT, s as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from './OrDateTimePicker.vue_vue_type_script_lang-7bfe5005.js';
46
46
  import { s as script$c } from './OrErrorTag.vue_vue_type_script_lang-bfa4c580.js';
@@ -134,7 +134,7 @@ var script = defineComponent({
134
134
  const confirmationButton = ref();
135
135
  // State
136
136
  const touched = ref(false);
137
- const isActive = ref(false);
137
+ const isActive = ref(props.isOpen || false);
138
138
  const isInputActive = ref(false);
139
139
  const confirmationValue = ref('');
140
140
  const {
@@ -149,15 +149,16 @@ var script = defineComponent({
149
149
  // Methods
150
150
  function open() {
151
151
  isActive.value = true;
152
- if (props.isOpen === undefined) {
153
- emit('open');
154
- }
152
+ emit('open');
155
153
  }
156
154
  function close() {
157
- if (props.isOpen === undefined) {
155
+ // In case if component opened by isOpen - only event can be emited, app will catch it and flip reference
156
+ if (props.isOpen === true) {
157
+ emit('close');
158
+ } else {
158
159
  isActive.value = false;
160
+ emit('close');
159
161
  }
160
- emit('close');
161
162
  }
162
163
  function confirm() {
163
164
  if (!props.disabled && !isInvalid.value) emit('confirm');
@@ -171,10 +172,9 @@ var script = defineComponent({
171
172
  }
172
173
  // Events
173
174
  watch(() => props.isOpen, value => {
174
- if (value === true) {
175
- open();
176
- } else if (value === false) {
177
- close();
175
+ // In case if component opened by isOpen - no need to emmit events, we need just sync local state
176
+ if (value != undefined) {
177
+ isActive.value = value;
178
178
  }
179
179
  }, {
180
180
  immediate: true
@@ -19,7 +19,7 @@ export { _ as OrCode, O as OrCodeLanguages } from '../OrCode-d4400b42.js';
19
19
  export { _ as OrCollapse } from '../OrCollapse-4d892ca3.js';
20
20
  export { _ as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from '../OrColorPicker-75abefdd.js';
21
21
  export { _ as OrConfirm } from '../OrConfirm-ede619eb.js';
22
- export { C as ConfirmType, _ as OrConfirmV3 } from '../OrConfirm-4566d105.js';
22
+ export { C as ConfirmType, _ as OrConfirmV3 } from '../OrConfirm-ea7fc8e7.js';
23
23
  export { D as DEFAULT_TEXT, _ as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from '../OrDateTimePicker-349df9b2.js';
24
24
  export { _ as OrError } from '../OrError-081130bb.js';
25
25
  export { _ as OrErrorTagV3 } from '../OrErrorTag-7cd5dc68.js';
@@ -1,4 +1,4 @@
1
- export { C as ConfirmType, _ as OrConfirmV3 } from '../../OrConfirm-4566d105.js';
1
+ export { C as ConfirmType, _ as OrConfirmV3 } from '../../OrConfirm-ea7fc8e7.js';
2
2
  import '@vueuse/core';
3
3
  import '@vueuse/math';
4
4
  import 'vue-demi';
@@ -19,7 +19,7 @@ export { _ as OrCode, O as OrCodeLanguages } from './OrCode-d4400b42.js';
19
19
  export { _ as OrCollapse } from './OrCollapse-4d892ca3.js';
20
20
  export { _ as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from './OrColorPicker-75abefdd.js';
21
21
  export { _ as OrConfirm } from './OrConfirm-ede619eb.js';
22
- export { C as ConfirmType, _ as OrConfirmV3 } from './OrConfirm-4566d105.js';
22
+ export { C as ConfirmType, _ as OrConfirmV3 } from './OrConfirm-ea7fc8e7.js';
23
23
  export { D as DEFAULT_TEXT, _ as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from './OrDateTimePicker-349df9b2.js';
24
24
  export { _ as OrError } from './OrError-081130bb.js';
25
25
  export { _ as OrErrorTagV3 } from './OrErrorTag-7cd5dc68.js';
@@ -134,7 +134,7 @@ var script = defineComponent({
134
134
  const confirmationButton = ref();
135
135
  // State
136
136
  const touched = ref(false);
137
- const isActive = ref(false);
137
+ const isActive = ref(props.isOpen || false);
138
138
  const isInputActive = ref(false);
139
139
  const confirmationValue = ref('');
140
140
  const {
@@ -149,15 +149,16 @@ var script = defineComponent({
149
149
  // Methods
150
150
  function open() {
151
151
  isActive.value = true;
152
- if (props.isOpen === undefined) {
153
- emit('open');
154
- }
152
+ emit('open');
155
153
  }
156
154
  function close() {
157
- if (props.isOpen === undefined) {
155
+ // In case if component opened by isOpen - only event can be emited, app will catch it and flip reference
156
+ if (props.isOpen === true) {
157
+ emit('close');
158
+ } else {
158
159
  isActive.value = false;
160
+ emit('close');
159
161
  }
160
- emit('close');
161
162
  }
162
163
  function confirm() {
163
164
  if (!props.disabled && !isInvalid.value) emit('confirm');
@@ -171,10 +172,9 @@ var script = defineComponent({
171
172
  }
172
173
  // Events
173
174
  watch(() => props.isOpen, value => {
174
- if (value === true) {
175
- open();
176
- } else if (value === false) {
177
- close();
175
+ // In case if component opened by isOpen - no need to emmit events, we need just sync local state
176
+ if (value != undefined) {
177
+ isActive.value = value;
178
178
  }
179
179
  }, {
180
180
  immediate: true
@@ -16,7 +16,7 @@ export { s as OrCode, O as OrCodeLanguages } from '../OrCode-5ed69c23.js';
16
16
  export { s as OrCollapse } from '../OrCollapse-445141ab.js';
17
17
  export { s as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from '../OrColorPicker-189cb097.js';
18
18
  export { s as OrConfirm } from '../OrConfirm-c11ee2ec.js';
19
- export { C as ConfirmType, s as OrConfirmV3 } from '../OrConfirm-ea316da1.js';
19
+ export { C as ConfirmType, s as OrConfirmV3 } from '../OrConfirm-75813c12.js';
20
20
  export { D as DEFAULT_TEXT, s as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from '../OrDateTimePicker-f2e08564.js';
21
21
  export { s as OrError } from '../OrError-f90296db.js';
22
22
  export { s as OrErrorTagV3 } from '../OrErrorTag-0025b17c.js';
@@ -1,4 +1,4 @@
1
- export { C as ConfirmType, s as OrConfirmV3 } from '../../OrConfirm-ea316da1.js';
1
+ export { C as ConfirmType, s as OrConfirmV3 } from '../../OrConfirm-75813c12.js';
2
2
  import '@vueuse/core';
3
3
  import '@vueuse/math';
4
4
  import 'vue-demi';
@@ -16,7 +16,7 @@ export { s as OrCode, O as OrCodeLanguages } from './OrCode-5ed69c23.js';
16
16
  export { s as OrCollapse } from './OrCollapse-445141ab.js';
17
17
  export { s as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from './OrColorPicker-189cb097.js';
18
18
  export { s as OrConfirm } from './OrConfirm-c11ee2ec.js';
19
- export { C as ConfirmType, s as OrConfirmV3 } from './OrConfirm-ea316da1.js';
19
+ export { C as ConfirmType, s as OrConfirmV3 } from './OrConfirm-75813c12.js';
20
20
  export { D as DEFAULT_TEXT, s as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from './OrDateTimePicker-f2e08564.js';
21
21
  export { s as OrError } from './OrError-f90296db.js';
22
22
  export { s as OrErrorTagV3 } from './OrErrorTag-0025b17c.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/ui-components",
3
- "version": "2.74.2-beta.2295.0",
3
+ "version": "2.74.2-beta.2298.0",
4
4
  "description": "Vue components library for v2/3",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/auto/index.js",
@@ -9,8 +9,8 @@ import { OrConfirmV3 as OrConfirm } from '@onereach/ui-components';
9
9
  ## Migration Guide from V1
10
10
  - property `denyButtonText` renamed to `cancelButtonText`
11
11
  - property `confirmButtonColor` replaced with `confirmType`
12
- - removed property `isOpen` (now `open()` and `close()` functions should be used)
13
12
  - property `isLoading` renamed to `loading`
14
13
  - property `isDisabled` renamed to `disabled`
15
14
  - removed properties `showClose`, `closeOnClickOutside` and `size`
16
15
  - added `open` event
16
+ - added `open()` and `close()` functions
@@ -174,7 +174,7 @@ export default defineComponent({
174
174
 
175
175
  // State
176
176
  const touched = ref(false);
177
- const isActive = ref(false);
177
+ const isActive = ref(props.isOpen || false);
178
178
  const isInputActive = ref(false);
179
179
  const confirmationValue = ref<string>('');
180
180
 
@@ -193,16 +193,17 @@ export default defineComponent({
193
193
  // Methods
194
194
  function open(): void {
195
195
  isActive.value = true;
196
- if (props.isOpen === undefined) {
197
- emit('open');
198
- }
196
+ emit('open');
199
197
  }
200
198
 
201
199
  function close(): void {
202
- if (props.isOpen === undefined) {
200
+ // In case if component opened by isOpen - only event can be emited, app will catch it and flip reference
201
+ if (props.isOpen === true) {
202
+ emit('close');
203
+ } else {
203
204
  isActive.value = false;
205
+ emit('close');
204
206
  }
205
- emit('close');
206
207
  }
207
208
 
208
209
  function confirm(): void {
@@ -220,10 +221,9 @@ export default defineComponent({
220
221
 
221
222
  // Events
222
223
  watch(() => props.isOpen, (value) => {
223
- if (value === true) {
224
- open();
225
- } else if (value === false) {
226
- close();
224
+ // In case if component opened by isOpen - no need to emmit events, we need just sync local state
225
+ if (value != undefined) {
226
+ isActive.value = value;
227
227
  }
228
228
  }, { immediate: true });
229
229