@onereach/ui-components-vue2 26.15.2-beta.6070.0 → 26.15.2
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/esm/components/or-checkbox-group-v3/index.js +1 -1
- package/dist/esm/components/or-checkbox-tree-v3/index.js +12 -19
- package/dist/esm/components/or-checkbox-tree-v3/types.d.ts +0 -2
- package/dist/esm/components/or-checkbox-tree-v3/utils/extractChildrenValues.d.ts +1 -1
- package/dist/esm/components/or-checkbox-v3/index.js +3 -29
- package/dist/esm/components/or-checkbox-v3/styles.d.ts +0 -1
- package/dist/esm/components/or-data-grid-v3/index.js +1 -1
- package/package.json +6 -4
|
@@ -11,10 +11,10 @@ import '../../utils-72d9c2bb.js';
|
|
|
11
11
|
import '../or-icon-v3/index.js';
|
|
12
12
|
import '../or-checkbox-v3/index.js';
|
|
13
13
|
import '../or-label-v3/index.js';
|
|
14
|
-
import '../or-loader-v3/index.js';
|
|
15
14
|
import '../or-button-v3/index.js';
|
|
16
15
|
import '../../constants-2e3ea701.js';
|
|
17
16
|
import '../../props-bba3dca8.js';
|
|
17
|
+
import '../or-loader-v3/index.js';
|
|
18
18
|
import '../or-error-v3/index.js';
|
|
19
19
|
import '../or-hint-v3/index.js';
|
|
20
20
|
|
|
@@ -10,9 +10,9 @@ import '../../dom-qGGG2YCX-4d4cca6e.js';
|
|
|
10
10
|
import '@onereach/styles/screens.json';
|
|
11
11
|
import '@onereach/styles/tailwind.config.json';
|
|
12
12
|
import '../or-label-v3/index.js';
|
|
13
|
-
import '../or-loader-v3/index.js';
|
|
14
13
|
import '../../constants-2e3ea701.js';
|
|
15
14
|
import '../../props-bba3dca8.js';
|
|
15
|
+
import '../or-loader-v3/index.js';
|
|
16
16
|
|
|
17
17
|
const CheckboxTreeRoot = [
|
|
18
18
|
// Layout
|
|
@@ -74,10 +74,6 @@ var script = defineComponent({
|
|
|
74
74
|
expanded: {
|
|
75
75
|
type: Boolean,
|
|
76
76
|
default: true
|
|
77
|
-
},
|
|
78
|
-
loading: {
|
|
79
|
-
type: Boolean,
|
|
80
|
-
default: false
|
|
81
77
|
}
|
|
82
78
|
},
|
|
83
79
|
emits: ['update:modelValue'],
|
|
@@ -94,16 +90,19 @@ var script = defineComponent({
|
|
|
94
90
|
return hasChildren.value ? extractChildrenValues(children.value) : [];
|
|
95
91
|
});
|
|
96
92
|
const proxyModelValue = ne(modelValue, context.emit);
|
|
97
|
-
const localLoading = computed(() => Boolean(props.loading || item.value.loading));
|
|
98
93
|
const isAnyChildrenSelected = computed(() => {
|
|
99
94
|
var _a;
|
|
100
|
-
return (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.some(value =>
|
|
95
|
+
return (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.some(value => {
|
|
96
|
+
var _a;
|
|
97
|
+
return (_a = childrenValues.value) === null || _a === void 0 ? void 0 : _a.includes(value);
|
|
98
|
+
});
|
|
101
99
|
});
|
|
102
100
|
const isAllChildrenSelected = computed(() => {
|
|
103
|
-
|
|
101
|
+
var _a;
|
|
102
|
+
return childrenValues.value.length > 0 && ((_a = childrenValues.value) === null || _a === void 0 ? void 0 : _a.every(value => {
|
|
104
103
|
var _a;
|
|
105
104
|
return (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.includes(value);
|
|
106
|
-
});
|
|
105
|
+
}));
|
|
107
106
|
});
|
|
108
107
|
const isIntermediate = computed(() => {
|
|
109
108
|
return isAnyChildrenSelected.value && !isAllChildrenSelected.value;
|
|
@@ -121,9 +120,7 @@ var script = defineComponent({
|
|
|
121
120
|
// Methods
|
|
122
121
|
const handleParentClick = () => {
|
|
123
122
|
if (isAllChildrenSelected.value) {
|
|
124
|
-
proxyModelValue.value = proxyModelValue.value.filter(value =>
|
|
125
|
-
return !childrenValues.value.includes(value);
|
|
126
|
-
});
|
|
123
|
+
proxyModelValue.value = proxyModelValue.value.filter(value => !childrenValues.value.includes(value));
|
|
127
124
|
} else {
|
|
128
125
|
proxyModelValue.value = [...new Set([...proxyModelValue.value, ...childrenValues.value])];
|
|
129
126
|
}
|
|
@@ -133,7 +130,6 @@ var script = defineComponent({
|
|
|
133
130
|
parentStyles,
|
|
134
131
|
hasChildren,
|
|
135
132
|
proxyModelValue,
|
|
136
|
-
localLoading,
|
|
137
133
|
isOpen,
|
|
138
134
|
setIsOpen,
|
|
139
135
|
isIntermediate,
|
|
@@ -179,7 +175,6 @@ var __vue_render__ = function () {
|
|
|
179
175
|
"model-value": _vm.isAllChildrenSelected,
|
|
180
176
|
"value": true,
|
|
181
177
|
"indeterminate": _vm.isIntermediate,
|
|
182
|
-
"loading": _vm.localLoading,
|
|
183
178
|
"disabled": _vm.disabled,
|
|
184
179
|
"readonly": _vm.readonly
|
|
185
180
|
},
|
|
@@ -200,18 +195,17 @@ var __vue_render__ = function () {
|
|
|
200
195
|
"item": child,
|
|
201
196
|
"collapsible": child.collapsible,
|
|
202
197
|
"expanded": child.expanded,
|
|
203
|
-
"loading": _vm.localLoading,
|
|
204
198
|
"disabled": _vm.disabled || child.disabled,
|
|
205
199
|
"readonly": _vm.readonly || child.readonly
|
|
206
200
|
},
|
|
207
201
|
scopedSlots: _vm._u([{
|
|
208
202
|
key: "checkboxLabel",
|
|
209
203
|
fn: function (ref) {
|
|
210
|
-
var
|
|
204
|
+
var item = ref.item;
|
|
211
205
|
return [_vm._t("checkboxLabel", function () {
|
|
212
|
-
return [_vm._v("\n " + _vm._s(
|
|
206
|
+
return [_vm._v("\n " + _vm._s(item.label) + "\n ")];
|
|
213
207
|
}, {
|
|
214
|
-
"item":
|
|
208
|
+
"item": item
|
|
215
209
|
})];
|
|
216
210
|
}
|
|
217
211
|
}], null, true),
|
|
@@ -226,7 +220,6 @@ var __vue_render__ = function () {
|
|
|
226
220
|
}), 1) : _vm._e()] : [_c('OrCheckbox', {
|
|
227
221
|
attrs: {
|
|
228
222
|
"value": _vm.item.value,
|
|
229
|
-
"loading": _vm.localLoading,
|
|
230
223
|
"disabled": _vm.disabled || _vm.item.disabled,
|
|
231
224
|
"readonly": _vm.readonly || _vm.item.readonly
|
|
232
225
|
},
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CheckboxTreeNode } from '../types';
|
|
2
|
-
export declare function extractChildrenValues(children: CheckboxTreeNode[]):
|
|
2
|
+
export declare function extractChildrenValues(children: CheckboxTreeNode[]): any[];
|
|
@@ -2,7 +2,6 @@ import { J, V, n as ne } from '../../useValidationAttributes-Da9U8-T7-fd6d5d7d.j
|
|
|
2
2
|
import { aa as c, aj as i, a8 as Ht, P as Pt } from '../../utils-72d9c2bb.js';
|
|
3
3
|
import { defineComponent, reactive, ref, computed, toRef } from 'vue-demi';
|
|
4
4
|
import { OrLabelV3 as OrLabel, LabelVariant } from '../or-label-v3/index.js';
|
|
5
|
-
import { OrLoaderV3 as OrLoader } from '../or-loader-v3/index.js';
|
|
6
5
|
import { n as normalizeComponent } from '../../normalize-component-cf2db48b.js';
|
|
7
6
|
import '../../dom-qGGG2YCX-4d4cca6e.js';
|
|
8
7
|
import '@vueuse/core';
|
|
@@ -44,19 +43,11 @@ const CheckboxControlHandle = [
|
|
|
44
43
|
'after:checked:content-checkbox-checked',
|
|
45
44
|
// Content (indeterminate / children)
|
|
46
45
|
'after:indeterminate:content-checkbox-indeterminate'];
|
|
47
|
-
const CheckboxLoader = [
|
|
48
|
-
// Layout
|
|
49
|
-
'layout-inline-row justify-center',
|
|
50
|
-
// Shape
|
|
51
|
-
'rounded-sm',
|
|
52
|
-
// Box
|
|
53
|
-
'w-md+ md:w-md', 'h-md+ md:h-md', 'm-[10px] md:m-none'];
|
|
54
46
|
|
|
55
47
|
var script = defineComponent({
|
|
56
48
|
name: 'OrCheckbox',
|
|
57
49
|
components: {
|
|
58
|
-
OrLabel
|
|
59
|
-
OrLoader
|
|
50
|
+
OrLabel
|
|
60
51
|
},
|
|
61
52
|
model: {
|
|
62
53
|
prop: 'modelValue',
|
|
@@ -83,10 +74,6 @@ var script = defineComponent({
|
|
|
83
74
|
type: Boolean,
|
|
84
75
|
default: false
|
|
85
76
|
},
|
|
86
|
-
loading: {
|
|
87
|
-
type: Boolean,
|
|
88
|
-
default: false
|
|
89
|
-
},
|
|
90
77
|
required: {
|
|
91
78
|
type: Boolean,
|
|
92
79
|
default: false
|
|
@@ -112,7 +99,6 @@ var script = defineComponent({
|
|
|
112
99
|
const rootStyles = computed(() => ['or-checkbox-v3', ...Checkbox]);
|
|
113
100
|
const control = ref();
|
|
114
101
|
const controlStyles = computed(() => [...CheckboxControl, ...CheckboxControlHandle]);
|
|
115
|
-
const loaderStyles = computed(() => [...CheckboxLoader]);
|
|
116
102
|
// State
|
|
117
103
|
const model = ne(toRef(props, 'modelValue'), context.emit);
|
|
118
104
|
const checked = computed(() => {
|
|
@@ -154,7 +140,6 @@ var script = defineComponent({
|
|
|
154
140
|
rootStyles,
|
|
155
141
|
control,
|
|
156
142
|
controlStyles,
|
|
157
|
-
loaderStyles,
|
|
158
143
|
checked,
|
|
159
144
|
onChange,
|
|
160
145
|
focus,
|
|
@@ -174,7 +159,7 @@ var __vue_render__ = function () {
|
|
|
174
159
|
return _c('div', {
|
|
175
160
|
ref: 'root',
|
|
176
161
|
class: _vm.rootStyles
|
|
177
|
-
}, [
|
|
162
|
+
}, [_c('input', _vm._b({
|
|
178
163
|
ref: 'control',
|
|
179
164
|
class: _vm.controlStyles,
|
|
180
165
|
attrs: {
|
|
@@ -202,18 +187,7 @@ var __vue_render__ = function () {
|
|
|
202
187
|
return _vm.$emit('blur', $event);
|
|
203
188
|
}
|
|
204
189
|
}
|
|
205
|
-
}, 'input', _vm.attributes, false))
|
|
206
|
-
class: _vm.loaderStyles,
|
|
207
|
-
attrs: {
|
|
208
|
-
"aria-busy": 'true'
|
|
209
|
-
}
|
|
210
|
-
}, [_c('OrLoader', {
|
|
211
|
-
attrs: {
|
|
212
|
-
"variant": 'circular',
|
|
213
|
-
"color": 'primary',
|
|
214
|
-
"size": 's'
|
|
215
|
-
}
|
|
216
|
-
})], 1)], _vm._v(" "), _vm.$slots.default || _vm.label ? [_c('OrLabel', {
|
|
190
|
+
}, 'input', _vm.attributes, false)), _vm._v(" "), _vm.$slots.default || _vm.label ? [_c('OrLabel', {
|
|
217
191
|
attrs: {
|
|
218
192
|
"control-id": _vm.attributes.id,
|
|
219
193
|
"variant": _vm.labelVariant,
|
|
@@ -23,13 +23,13 @@ import '../../useValidationAttributes-Da9U8-T7-fd6d5d7d.js';
|
|
|
23
23
|
import '@onereach/styles/screens.json';
|
|
24
24
|
import '@onereach/styles/tailwind.config.json';
|
|
25
25
|
import '../or-label-v3/index.js';
|
|
26
|
-
import '../or-loader-v3/index.js';
|
|
27
26
|
import '../../directives-0869d2a4.js';
|
|
28
27
|
import '../../OrDateTimePickerMonthSelect-1bf6ca3b.js';
|
|
29
28
|
import '../../formatDate-0536a8d5.js';
|
|
30
29
|
import '../or-button-v3/index.js';
|
|
31
30
|
import '../../constants-2e3ea701.js';
|
|
32
31
|
import '../../props-bba3dca8.js';
|
|
32
|
+
import '../or-loader-v3/index.js';
|
|
33
33
|
import '../or-menu-v3/index.js';
|
|
34
34
|
import '../or-popover-v3/index.js';
|
|
35
35
|
import '@floating-ui/dom';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/ui-components-vue2",
|
|
3
|
-
"version": "26.15.2
|
|
3
|
+
"version": "26.15.2",
|
|
4
4
|
"description": "Vue components library for v2",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -39,9 +39,10 @@
|
|
|
39
39
|
"@codemirror/state": "^6",
|
|
40
40
|
"@codemirror/view": "^6",
|
|
41
41
|
"@floating-ui/dom": "1.7.6",
|
|
42
|
+
"@lezer/common": "1.5.2",
|
|
42
43
|
"@lezer/highlight": "*",
|
|
43
|
-
"@onereach/styles": "^26.15.2
|
|
44
|
-
"@onereach/ui-components-common": "^26.15.2
|
|
44
|
+
"@onereach/styles": "^26.15.2",
|
|
45
|
+
"@onereach/ui-components-common": "^26.15.2",
|
|
45
46
|
"@splidejs/splide": "4.0.6",
|
|
46
47
|
"@tiptap/core": "2.27.1",
|
|
47
48
|
"@tiptap/extension-blockquote": "2.27.1",
|
|
@@ -102,5 +103,6 @@
|
|
|
102
103
|
"publishConfig": {
|
|
103
104
|
"access": "public"
|
|
104
105
|
},
|
|
105
|
-
"npmUnpacked": "4.15.2"
|
|
106
|
+
"npmUnpacked": "4.15.2",
|
|
107
|
+
"gitHead": "a1c2b7598c6ad5ba49a44e3d7bd845c709b1adde"
|
|
106
108
|
}
|