@onereach/ui-components 4.1.2 → 4.1.3-beta.2558.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.
- package/dist/bundled/v2/components/OrCheckboxGroupV3/OrCheckboxGroup.js +140 -0
- package/dist/bundled/v2/components/OrCheckboxGroupV3/OrCheckboxGroup.vue.d.ts +115 -0
- package/dist/bundled/v2/components/OrCheckboxGroupV3/index.d.ts +1 -0
- package/dist/bundled/v2/components/OrCheckboxGroupV3/index.js +25 -0
- package/dist/bundled/v2/components/OrCheckboxTreeV3/OrCheckboxTree.js +203 -0
- package/dist/bundled/v2/components/OrCheckboxTreeV3/OrCheckboxTree.vue.d.ts +76 -0
- package/dist/bundled/v2/components/OrCheckboxTreeV3/index.d.ts +1 -0
- package/dist/bundled/v2/components/OrCheckboxTreeV3/index.js +17 -0
- package/dist/bundled/v2/components/OrCheckboxTreeV3/styles.d.ts +2 -0
- package/dist/bundled/v2/components/OrCheckboxTreeV3/styles.js +10 -0
- package/dist/bundled/v2/components/OrCheckboxTreeV3/types.d.ts +7 -0
- package/dist/bundled/v2/components/OrCheckboxTreeV3/types.js +1 -0
- package/dist/bundled/v2/components/OrCheckboxV3/OrCheckbox.js +34 -39
- package/dist/bundled/v2/components/OrCheckboxV3/OrCheckbox.vue.d.ts +18 -16
- package/dist/bundled/v2/components/OrCheckboxV3/index.js +1 -0
- package/dist/bundled/v2/components/OrFormGroupV3/OrFormGroup.js +123 -0
- package/dist/bundled/v2/components/OrFormGroupV3/OrFormGroup.vue.d.ts +85 -0
- package/dist/bundled/v2/components/OrFormGroupV3/index.d.ts +2 -0
- package/dist/bundled/v2/components/OrFormGroupV3/index.js +12 -0
- package/dist/bundled/v2/components/OrFormGroupV3/props.d.ts +4 -0
- package/dist/bundled/v2/components/OrFormGroupV3/props.js +7 -0
- package/dist/bundled/v2/components/OrFormGroupV3/styles.d.ts +6 -0
- package/dist/bundled/v2/components/OrFormGroupV3/styles.js +20 -0
- package/dist/bundled/v2/components/OrRadioGroupV3/OrRadioGroup.js +132 -0
- package/dist/bundled/v2/components/OrRadioGroupV3/OrRadioGroup.vue.d.ts +110 -0
- package/dist/bundled/v2/components/OrRadioGroupV3/index.d.ts +1 -0
- package/dist/bundled/v2/components/OrRadioGroupV3/index.js +19 -0
- package/dist/bundled/v2/components/OrSelectV3/OrSelect.js +1 -1
- package/dist/bundled/v2/components/OrSelectV3/index.js +1 -1
- package/dist/bundled/v2/index.d.ts +1 -0
- package/dist/bundled/v2/index.js +4 -3
- package/dist/bundled/v2/utils/functions/flattenDeep.d.ts +2 -0
- package/dist/bundled/v2/utils/functions/flattenDeep.js +5 -0
- package/dist/bundled/v3/{OrCheckbox.vue_vue_type_script_lang-60cefcbd.js → OrCheckbox.vue_vue_type_script_lang-51a4f8d3.js} +26 -10
- package/dist/bundled/v3/OrCheckboxTree.vue_vue_type_script_lang-ffa313a0.js +102 -0
- package/dist/bundled/v3/OrFormGroup.vue_vue_type_script_lang-360b258b.js +60 -0
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-f7601423.js → OrSelect.vue_vue_type_script_lang-c0612348.js} +1 -1
- package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.js +112 -0
- package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.vue.d.ts +115 -0
- package/dist/bundled/v3/components/OrCheckboxGroupV3/index.d.ts +1 -0
- package/dist/bundled/v3/components/OrCheckboxGroupV3/index.js +32 -0
- package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.js +74 -0
- package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.vue.d.ts +76 -0
- package/dist/bundled/v3/components/OrCheckboxTreeV3/index.d.ts +1 -0
- package/dist/bundled/v3/components/OrCheckboxTreeV3/index.js +20 -0
- package/dist/bundled/v3/components/OrCheckboxTreeV3/styles.d.ts +2 -0
- package/dist/bundled/v3/components/OrCheckboxTreeV3/styles.js +10 -0
- package/dist/bundled/v3/components/OrCheckboxTreeV3/types.d.ts +7 -0
- package/dist/bundled/v3/components/OrCheckboxTreeV3/types.js +1 -0
- package/dist/bundled/v3/components/OrCheckboxV3/OrCheckbox.js +9 -7
- package/dist/bundled/v3/components/OrCheckboxV3/OrCheckbox.vue.d.ts +18 -16
- package/dist/bundled/v3/components/OrCheckboxV3/index.js +2 -1
- package/dist/bundled/v3/components/OrFormGroupV3/OrFormGroup.js +58 -0
- package/dist/bundled/v3/components/OrFormGroupV3/OrFormGroup.vue.d.ts +85 -0
- package/dist/bundled/v3/components/OrFormGroupV3/index.d.ts +2 -0
- package/dist/bundled/v3/components/OrFormGroupV3/index.js +15 -0
- package/dist/bundled/v3/components/OrFormGroupV3/props.d.ts +4 -0
- package/dist/bundled/v3/components/OrFormGroupV3/props.js +7 -0
- package/dist/bundled/v3/components/OrFormGroupV3/styles.d.ts +6 -0
- package/dist/bundled/v3/components/OrFormGroupV3/styles.js +20 -0
- package/dist/bundled/v3/components/OrRadioGroupV3/OrRadioGroup.js +104 -0
- package/dist/bundled/v3/components/OrRadioGroupV3/OrRadioGroup.vue.d.ts +110 -0
- package/dist/bundled/v3/components/OrRadioGroupV3/index.d.ts +1 -0
- package/dist/bundled/v3/components/OrRadioGroupV3/index.js +24 -0
- package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +4 -4
- package/dist/bundled/v3/components/OrSelectV3/index.js +3 -3
- package/dist/bundled/v3/components/index.js +2 -2
- package/dist/bundled/v3/index.d.ts +1 -0
- package/dist/bundled/v3/index.js +7 -7
- package/dist/bundled/v3/utils/functions/flattenDeep.d.ts +2 -0
- package/dist/bundled/v3/utils/functions/flattenDeep.js +5 -0
- package/dist/esm/v2/{OrCheckbox-dc587ec9.js → OrCheckbox-e55228e5.js} +34 -40
- package/dist/esm/v2/OrCheckboxTree-00fd6cf9.js +202 -0
- package/dist/esm/v2/OrFormGroup-7a883bce.js +140 -0
- package/dist/esm/v2/{OrSelect-40183874.js → OrSelect-4031334e.js} +1 -1
- package/dist/esm/v2/components/index.js +2 -2
- package/dist/esm/v2/components/or-checkbox-group-v3/OrCheckboxGroup.vue.d.ts +115 -0
- package/dist/esm/v2/components/or-checkbox-group-v3/index.d.ts +1 -0
- package/dist/esm/v2/components/or-checkbox-group-v3/index.js +129 -0
- package/dist/esm/v2/components/or-checkbox-tree-v3/OrCheckboxTree.vue.d.ts +76 -0
- package/dist/esm/v2/components/or-checkbox-tree-v3/index.d.ts +1 -0
- package/dist/esm/v2/components/or-checkbox-tree-v3/index.js +10 -0
- package/dist/esm/v2/components/or-checkbox-tree-v3/styles.d.ts +2 -0
- package/dist/esm/v2/components/or-checkbox-tree-v3/types.d.ts +7 -0
- package/dist/esm/v2/components/or-checkbox-v3/OrCheckbox.vue.d.ts +18 -16
- package/dist/esm/v2/components/or-checkbox-v3/index.js +2 -2
- package/dist/esm/v2/components/or-form-group-v3/OrFormGroup.vue.d.ts +85 -0
- package/dist/esm/v2/components/or-form-group-v3/index.d.ts +2 -0
- package/dist/esm/v2/components/or-form-group-v3/index.js +6 -0
- package/dist/esm/v2/components/or-form-group-v3/props.d.ts +4 -0
- package/dist/esm/v2/components/or-form-group-v3/styles.d.ts +6 -0
- package/dist/esm/v2/components/or-radio-group-v3/OrRadioGroup.vue.d.ts +110 -0
- package/dist/esm/v2/components/or-radio-group-v3/index.d.ts +1 -0
- package/dist/esm/v2/components/or-radio-group-v3/index.js +124 -0
- package/dist/esm/v2/components/or-select-v3/index.js +2 -2
- package/dist/esm/v2/flattenDeep-e7a8b995.js +5 -0
- package/dist/esm/v2/index.d.ts +1 -0
- package/dist/esm/v2/index.js +3 -2
- package/dist/esm/v2/utils/functions/flattenDeep.d.ts +2 -0
- package/dist/esm/v3/{OrCheckbox-56f849f7.js → OrCheckbox-eab735d0.js} +32 -16
- package/dist/esm/v3/OrCheckboxTree-8ead5a31.js +162 -0
- package/dist/esm/v3/OrFormGroup-d9255559.js +121 -0
- package/dist/esm/v3/{OrSelect-5502d82d.js → OrSelect-ebdab996.js} +1 -1
- package/dist/esm/v3/components/index.js +2 -2
- package/dist/esm/v3/components/or-checkbox-group-v3/OrCheckboxGroup.vue.d.ts +115 -0
- package/dist/esm/v3/components/or-checkbox-group-v3/index.d.ts +1 -0
- package/dist/esm/v3/components/or-checkbox-group-v3/index.js +94 -0
- package/dist/esm/v3/components/or-checkbox-tree-v3/OrCheckboxTree.vue.d.ts +76 -0
- package/dist/esm/v3/components/or-checkbox-tree-v3/index.d.ts +1 -0
- package/dist/esm/v3/components/or-checkbox-tree-v3/index.js +10 -0
- package/dist/esm/v3/components/or-checkbox-tree-v3/styles.d.ts +2 -0
- package/dist/esm/v3/components/or-checkbox-tree-v3/types.d.ts +7 -0
- package/dist/esm/v3/components/or-checkbox-v3/OrCheckbox.vue.d.ts +18 -16
- package/dist/esm/v3/components/or-checkbox-v3/index.js +2 -2
- package/dist/esm/v3/components/or-form-group-v3/OrFormGroup.vue.d.ts +85 -0
- package/dist/esm/v3/components/or-form-group-v3/index.d.ts +2 -0
- package/dist/esm/v3/components/or-form-group-v3/index.js +6 -0
- package/dist/esm/v3/components/or-form-group-v3/props.d.ts +4 -0
- package/dist/esm/v3/components/or-form-group-v3/styles.d.ts +6 -0
- package/dist/esm/v3/components/or-radio-group-v3/OrRadioGroup.vue.d.ts +110 -0
- package/dist/esm/v3/components/or-radio-group-v3/index.d.ts +1 -0
- package/dist/esm/v3/components/or-radio-group-v3/index.js +91 -0
- package/dist/esm/v3/components/or-select-v3/index.js +2 -2
- package/dist/esm/v3/flattenDeep-e7a8b995.js +5 -0
- package/dist/esm/v3/index.d.ts +1 -0
- package/dist/esm/v3/index.js +3 -2
- package/dist/esm/v3/utils/functions/flattenDeep.d.ts +2 -0
- package/package.json +2 -3
- package/src/components/or-checkbox-group-v3/OrCheckboxGroup.docs.mdx +7 -0
- package/src/components/or-checkbox-group-v3/OrCheckboxGroup.stories3.ts +263 -0
- package/src/components/or-checkbox-group-v3/OrCheckboxGroup.vue +82 -0
- package/src/components/or-checkbox-group-v3/index.ts +1 -0
- package/src/components/or-checkbox-tree-v3/OrCheckboxTree.docs.mdx +7 -0
- package/src/components/or-checkbox-tree-v3/OrCheckboxTree.stories3.ts +112 -0
- package/src/components/or-checkbox-tree-v3/OrCheckboxTree.vue +168 -0
- package/src/components/or-checkbox-tree-v3/index.ts +1 -0
- package/src/components/or-checkbox-tree-v3/styles.ts +15 -0
- package/src/components/or-checkbox-tree-v3/types.ts +7 -0
- package/src/components/or-checkbox-v3/OrCheckbox.vue +30 -12
- package/src/components/or-form-group-v3/OrFormGroup.stories3.ts +114 -0
- package/src/components/or-form-group-v3/OrFormGroup.vue +114 -0
- package/src/components/or-form-group-v3/index.ts +2 -0
- package/src/components/or-form-group-v3/props.ts +4 -0
- package/src/components/or-form-group-v3/styles.ts +36 -0
- package/src/components/or-radio-group-v3/OrRadioGroup.stories3.ts +81 -0
- package/src/components/or-radio-group-v3/OrRadioGroup.vue +80 -0
- package/src/components/or-radio-group-v3/index.ts +1 -0
- package/src/components/or-radio-v3/OrRadio.stories3.ts +1 -1
- package/src/index.ts +1 -0
- package/src/utils/functions/flattenDeep.ts +5 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { defineComponent } from 'vue-demi';
|
|
2
|
+
import { useVModel } from '@vueuse/core';
|
|
3
|
+
import __vue_component__$1 from '../OrCheckboxTreeV3/OrCheckboxTree.js';
|
|
4
|
+
import __vue_component__$2 from '../OrFormGroupV3/OrFormGroup.js';
|
|
5
|
+
import { FormGroupDirection } from '../OrFormGroupV3/props.js';
|
|
6
|
+
import { s as styleInject } from '../../style-inject.es-4c6f2515.js';
|
|
7
|
+
import { n as normalizeComponent } from '../../normalize-component-6e8e3d80.js';
|
|
8
|
+
import '../OrCheckboxTreeV3/styles.js';
|
|
9
|
+
import '../../utils/functions/flattenDeep.js';
|
|
10
|
+
import '../OrIconV3/OrIcon.js';
|
|
11
|
+
import '../OrIconV3/props.js';
|
|
12
|
+
import '../OrIconV3/styles.js';
|
|
13
|
+
import '../OrCheckboxV3/OrCheckbox.js';
|
|
14
|
+
import '../OrCheckboxV3/styles.js';
|
|
15
|
+
import '../OrLabelV3/OrLabel.js';
|
|
16
|
+
import '../OrLabelV3/props.js';
|
|
17
|
+
import '../OrLabelV3/styles.js';
|
|
18
|
+
import '../../hooks/useIdAttribute.js';
|
|
19
|
+
import '../../hooks/useControlAttributes.js';
|
|
20
|
+
import '../OrFormGroupV3/styles.js';
|
|
21
|
+
import '../OrErrorV3/OrError.js';
|
|
22
|
+
import '../OrErrorV3/styles.js';
|
|
23
|
+
import '../OrHintV3/OrHint.js';
|
|
24
|
+
import '../OrHintV3/styles.js';
|
|
25
|
+
|
|
26
|
+
var script = defineComponent({
|
|
27
|
+
name: 'OrCheckboxGroup',
|
|
28
|
+
components: {
|
|
29
|
+
OrCheckboxTree: __vue_component__$1,
|
|
30
|
+
OrFormGroup: __vue_component__$2
|
|
31
|
+
},
|
|
32
|
+
model: {
|
|
33
|
+
prop: 'modelValue',
|
|
34
|
+
event: 'update:modelValue'
|
|
35
|
+
},
|
|
36
|
+
props: {
|
|
37
|
+
modelValue: {
|
|
38
|
+
type: Array,
|
|
39
|
+
default: () => []
|
|
40
|
+
},
|
|
41
|
+
label: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: ''
|
|
44
|
+
},
|
|
45
|
+
error: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: ''
|
|
48
|
+
},
|
|
49
|
+
hint: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: ''
|
|
52
|
+
},
|
|
53
|
+
direction: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: FormGroupDirection.Vertical
|
|
56
|
+
},
|
|
57
|
+
options: {
|
|
58
|
+
type: Array,
|
|
59
|
+
default: () => []
|
|
60
|
+
},
|
|
61
|
+
disabled: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: false
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
setup(props, {
|
|
67
|
+
emit
|
|
68
|
+
}) {
|
|
69
|
+
const proxyModelValue = useVModel(props, 'modelValue', emit);
|
|
70
|
+
return {
|
|
71
|
+
proxyModelValue
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
var css_248z = "";
|
|
77
|
+
styleInject(css_248z);
|
|
78
|
+
|
|
79
|
+
/* script */
|
|
80
|
+
const __vue_script__ = script;
|
|
81
|
+
/* template */
|
|
82
|
+
var __vue_render__ = function () {
|
|
83
|
+
var _vm = this;
|
|
84
|
+
var _h = _vm.$createElement;
|
|
85
|
+
var _c = _vm._self._c || _h;
|
|
86
|
+
return _c('OrFormGroup', {
|
|
87
|
+
attrs: {
|
|
88
|
+
"label": _vm.label,
|
|
89
|
+
"error": _vm.error,
|
|
90
|
+
"hint": _vm.hint,
|
|
91
|
+
"disabled": _vm.disabled,
|
|
92
|
+
"direction": _vm.direction
|
|
93
|
+
},
|
|
94
|
+
scopedSlots: _vm._u([{
|
|
95
|
+
key: "addon",
|
|
96
|
+
fn: function () {
|
|
97
|
+
return [_vm._t("addon")];
|
|
98
|
+
},
|
|
99
|
+
proxy: true
|
|
100
|
+
}], null, true)
|
|
101
|
+
}, [_vm._v(" "), _vm._l(_vm.options, function (option) {
|
|
102
|
+
return _c('OrCheckboxTree', {
|
|
103
|
+
key: option.value,
|
|
104
|
+
attrs: {
|
|
105
|
+
"item": option,
|
|
106
|
+
"disabled": _vm.disabled || option.disabled,
|
|
107
|
+
"collapsible": option.collapsible
|
|
108
|
+
},
|
|
109
|
+
model: {
|
|
110
|
+
value: _vm.proxyModelValue,
|
|
111
|
+
callback: function ($$v) {
|
|
112
|
+
_vm.proxyModelValue = $$v;
|
|
113
|
+
},
|
|
114
|
+
expression: "proxyModelValue"
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
})], 2);
|
|
118
|
+
};
|
|
119
|
+
var __vue_staticRenderFns__ = [];
|
|
120
|
+
|
|
121
|
+
/* style */
|
|
122
|
+
const __vue_inject_styles__ = undefined;
|
|
123
|
+
/* scoped */
|
|
124
|
+
const __vue_scope_id__ = "data-v-3e45cf11";
|
|
125
|
+
/* module identifier */
|
|
126
|
+
const __vue_module_identifier__ = undefined;
|
|
127
|
+
/* functional template */
|
|
128
|
+
const __vue_is_functional_template__ = false;
|
|
129
|
+
/* style inject */
|
|
130
|
+
|
|
131
|
+
/* style inject SSR */
|
|
132
|
+
|
|
133
|
+
/* style inject shadow dom */
|
|
134
|
+
|
|
135
|
+
const __vue_component__ = /*#__PURE__*/normalizeComponent({
|
|
136
|
+
render: __vue_render__,
|
|
137
|
+
staticRenderFns: __vue_staticRenderFns__
|
|
138
|
+
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
|
|
139
|
+
|
|
140
|
+
export { __vue_component__ as default };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { PropType } from 'vue-demi';
|
|
2
|
+
import { FormGroupDirection } from '../or-form-group-v3';
|
|
3
|
+
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
4
|
+
proxyModelValue: import("@vue/composition-api").Ref<string[]> | import("@vue/composition-api").WritableComputedRef<string[]>;
|
|
5
|
+
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
6
|
+
modelValue: {
|
|
7
|
+
type: PropType<string[]>;
|
|
8
|
+
default: () => never[];
|
|
9
|
+
};
|
|
10
|
+
label: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
error: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
hint: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
direction: {
|
|
23
|
+
type: PropType<FormGroupDirection>;
|
|
24
|
+
default: FormGroupDirection;
|
|
25
|
+
};
|
|
26
|
+
options: {
|
|
27
|
+
type: PropType<{
|
|
28
|
+
label: string;
|
|
29
|
+
value: any;
|
|
30
|
+
disabled?: boolean | undefined;
|
|
31
|
+
collapsible: boolean;
|
|
32
|
+
}[]>;
|
|
33
|
+
default: () => never[];
|
|
34
|
+
};
|
|
35
|
+
disabled: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
}, import("@vue/composition-api").ExtractPropTypes<{
|
|
40
|
+
modelValue: {
|
|
41
|
+
type: PropType<string[]>;
|
|
42
|
+
default: () => never[];
|
|
43
|
+
};
|
|
44
|
+
label: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
48
|
+
error: {
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
hint: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
default: string;
|
|
55
|
+
};
|
|
56
|
+
direction: {
|
|
57
|
+
type: PropType<FormGroupDirection>;
|
|
58
|
+
default: FormGroupDirection;
|
|
59
|
+
};
|
|
60
|
+
options: {
|
|
61
|
+
type: PropType<{
|
|
62
|
+
label: string;
|
|
63
|
+
value: any;
|
|
64
|
+
disabled?: boolean | undefined;
|
|
65
|
+
collapsible: boolean;
|
|
66
|
+
}[]>;
|
|
67
|
+
default: () => never[];
|
|
68
|
+
};
|
|
69
|
+
disabled: {
|
|
70
|
+
type: BooleanConstructor;
|
|
71
|
+
default: boolean;
|
|
72
|
+
};
|
|
73
|
+
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
74
|
+
modelValue: string[];
|
|
75
|
+
label: string;
|
|
76
|
+
error: string;
|
|
77
|
+
hint: string;
|
|
78
|
+
direction: FormGroupDirection;
|
|
79
|
+
options: {
|
|
80
|
+
label: string;
|
|
81
|
+
value: any;
|
|
82
|
+
disabled?: boolean | undefined;
|
|
83
|
+
collapsible: boolean;
|
|
84
|
+
}[];
|
|
85
|
+
disabled: boolean;
|
|
86
|
+
} & {}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
87
|
+
proxyModelValue: import("@vue/composition-api").Ref<string[]> | import("@vue/composition-api").WritableComputedRef<string[]>;
|
|
88
|
+
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
|
|
89
|
+
modelValue: string[];
|
|
90
|
+
label: string;
|
|
91
|
+
error: string;
|
|
92
|
+
hint: string;
|
|
93
|
+
direction: FormGroupDirection;
|
|
94
|
+
options: {
|
|
95
|
+
label: string;
|
|
96
|
+
value: any;
|
|
97
|
+
disabled?: boolean | undefined;
|
|
98
|
+
collapsible: boolean;
|
|
99
|
+
}[];
|
|
100
|
+
disabled: boolean;
|
|
101
|
+
} & {}, {
|
|
102
|
+
modelValue: string[];
|
|
103
|
+
label: string;
|
|
104
|
+
error: string;
|
|
105
|
+
hint: string;
|
|
106
|
+
direction: FormGroupDirection;
|
|
107
|
+
options: {
|
|
108
|
+
label: string;
|
|
109
|
+
value: any;
|
|
110
|
+
disabled?: boolean | undefined;
|
|
111
|
+
collapsible: boolean;
|
|
112
|
+
}[];
|
|
113
|
+
disabled: boolean;
|
|
114
|
+
}, true>);
|
|
115
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as OrCheckboxGroupV3 } from './OrCheckboxGroup.vue';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export { default as OrCheckboxGroupV3 } from './OrCheckboxGroup.js';
|
|
2
|
+
import 'vue-demi';
|
|
3
|
+
import '@vueuse/core';
|
|
4
|
+
import '../OrCheckboxTreeV3/OrCheckboxTree.js';
|
|
5
|
+
import '../OrCheckboxTreeV3/styles.js';
|
|
6
|
+
import '../../utils/functions/flattenDeep.js';
|
|
7
|
+
import '../OrIconV3/OrIcon.js';
|
|
8
|
+
import '../OrIconV3/props.js';
|
|
9
|
+
import '../OrIconV3/styles.js';
|
|
10
|
+
import '../../normalize-component-6e8e3d80.js';
|
|
11
|
+
import '../OrCheckboxV3/OrCheckbox.js';
|
|
12
|
+
import '../OrCheckboxV3/styles.js';
|
|
13
|
+
import '../OrLabelV3/OrLabel.js';
|
|
14
|
+
import '../OrLabelV3/props.js';
|
|
15
|
+
import '../OrLabelV3/styles.js';
|
|
16
|
+
import '../../hooks/useIdAttribute.js';
|
|
17
|
+
import '../../hooks/useControlAttributes.js';
|
|
18
|
+
import '../../style-inject.es-4c6f2515.js';
|
|
19
|
+
import '../OrFormGroupV3/OrFormGroup.js';
|
|
20
|
+
import '../OrFormGroupV3/props.js';
|
|
21
|
+
import '../OrFormGroupV3/styles.js';
|
|
22
|
+
import '../OrErrorV3/OrError.js';
|
|
23
|
+
import '../OrErrorV3/styles.js';
|
|
24
|
+
import '../OrHintV3/OrHint.js';
|
|
25
|
+
import '../OrHintV3/styles.js';
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { defineComponent, computed } from 'vue-demi';
|
|
2
|
+
import { useVModel, useToggle } from '@vueuse/core';
|
|
3
|
+
import { CheckboxTreeRoot, CheckboxTreeRootParent } from './styles.js';
|
|
4
|
+
import flattenDeep from '../../utils/functions/flattenDeep.js';
|
|
5
|
+
import __vue_component__$1 from '../OrIconV3/OrIcon.js';
|
|
6
|
+
import __vue_component__$2 from '../OrCheckboxV3/OrCheckbox.js';
|
|
7
|
+
import { n as normalizeComponent } from '../../normalize-component-6e8e3d80.js';
|
|
8
|
+
import '../OrIconV3/props.js';
|
|
9
|
+
import '../OrIconV3/styles.js';
|
|
10
|
+
import '../OrCheckboxV3/styles.js';
|
|
11
|
+
import '../OrLabelV3/OrLabel.js';
|
|
12
|
+
import '../OrLabelV3/props.js';
|
|
13
|
+
import '../OrLabelV3/styles.js';
|
|
14
|
+
import '../../hooks/useIdAttribute.js';
|
|
15
|
+
import '../../hooks/useControlAttributes.js';
|
|
16
|
+
import '../../style-inject.es-4c6f2515.js';
|
|
17
|
+
|
|
18
|
+
var script = defineComponent({
|
|
19
|
+
name: 'OrCheckboxTree',
|
|
20
|
+
components: {
|
|
21
|
+
OrIcon: __vue_component__$1,
|
|
22
|
+
OrCheckbox: __vue_component__$2
|
|
23
|
+
},
|
|
24
|
+
model: {
|
|
25
|
+
prop: 'modelValue',
|
|
26
|
+
event: 'update:modelValue'
|
|
27
|
+
},
|
|
28
|
+
props: {
|
|
29
|
+
modelValue: {
|
|
30
|
+
type: Array,
|
|
31
|
+
default: () => []
|
|
32
|
+
},
|
|
33
|
+
item: {
|
|
34
|
+
type: Object,
|
|
35
|
+
required: true
|
|
36
|
+
},
|
|
37
|
+
collapsible: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: false
|
|
40
|
+
},
|
|
41
|
+
disabled: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: false
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
setup(props, {
|
|
47
|
+
emit
|
|
48
|
+
}) {
|
|
49
|
+
// State
|
|
50
|
+
const hasChildren = computed(() => props.item.children && props.item.children.length > 0);
|
|
51
|
+
const childrenValues = computed(() => {
|
|
52
|
+
const getChildValues = children => {
|
|
53
|
+
return children === null || children === void 0 ? void 0 : children.map(child => {
|
|
54
|
+
if (child.children) {
|
|
55
|
+
return getChildValues(child.children);
|
|
56
|
+
} else {
|
|
57
|
+
return child.value;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
return flattenDeep(getChildValues(props.item.children));
|
|
62
|
+
});
|
|
63
|
+
const proxyModelValue = useVModel(props, 'modelValue', emit);
|
|
64
|
+
const isAnyChildrenSelected = computed(() => {
|
|
65
|
+
var _a;
|
|
66
|
+
return (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.some(value => {
|
|
67
|
+
var _a;
|
|
68
|
+
return (_a = childrenValues.value) === null || _a === void 0 ? void 0 : _a.includes(value);
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
const isAllChildrenSelected = computed(() => {
|
|
72
|
+
var _a;
|
|
73
|
+
return (_a = childrenValues.value) === null || _a === void 0 ? void 0 : _a.every(value => {
|
|
74
|
+
var _a;
|
|
75
|
+
return (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.includes(value);
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
const isIntermediate = computed(() => {
|
|
79
|
+
return isAnyChildrenSelected.value && !isAllChildrenSelected.value;
|
|
80
|
+
});
|
|
81
|
+
const [isOpen, setIsOpen] = useToggle(true);
|
|
82
|
+
// Styles
|
|
83
|
+
const rootStyles = computed(() => ['or-checkbox-tree-v3', ...CheckboxTreeRoot]);
|
|
84
|
+
// Styles
|
|
85
|
+
const parentStyles = computed(() => [...CheckboxTreeRootParent]);
|
|
86
|
+
// Methods
|
|
87
|
+
const handleParentClick = () => {
|
|
88
|
+
if (isAllChildrenSelected.value) {
|
|
89
|
+
proxyModelValue.value = proxyModelValue.value.filter(value => !childrenValues.value.includes(value));
|
|
90
|
+
} else {
|
|
91
|
+
proxyModelValue.value = [...proxyModelValue.value, ...childrenValues.value];
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
return {
|
|
95
|
+
rootStyles,
|
|
96
|
+
parentStyles,
|
|
97
|
+
hasChildren,
|
|
98
|
+
proxyModelValue,
|
|
99
|
+
isOpen,
|
|
100
|
+
setIsOpen,
|
|
101
|
+
isIntermediate,
|
|
102
|
+
isAllChildrenSelected,
|
|
103
|
+
isAnyChildrenSelected,
|
|
104
|
+
childrenValues,
|
|
105
|
+
handleParentClick
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
/* script */
|
|
111
|
+
const __vue_script__ = script;
|
|
112
|
+
|
|
113
|
+
/* template */
|
|
114
|
+
var __vue_render__ = function () {
|
|
115
|
+
var _vm = this;
|
|
116
|
+
var _h = _vm.$createElement;
|
|
117
|
+
var _c = _vm._self._c || _h;
|
|
118
|
+
return _c('div', {
|
|
119
|
+
ref: "root",
|
|
120
|
+
class: _vm.rootStyles
|
|
121
|
+
}, [_vm.hasChildren ? [_c('div', {
|
|
122
|
+
class: _vm.parentStyles
|
|
123
|
+
}, [_vm.collapsible ? [_c('OrIcon', {
|
|
124
|
+
class: [_vm.isOpen ? 'rotate-[180deg]' : 'rotate-0'],
|
|
125
|
+
attrs: {
|
|
126
|
+
"icon": "arrow_drop_down",
|
|
127
|
+
"size": "l"
|
|
128
|
+
},
|
|
129
|
+
on: {
|
|
130
|
+
"click": function () {
|
|
131
|
+
return _vm.setIsOpen(!_vm.isOpen);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
})] : _vm._e(), _vm._v(" "), _c('OrCheckbox', {
|
|
135
|
+
attrs: {
|
|
136
|
+
"value": "true",
|
|
137
|
+
"model-value": _vm.isAllChildrenSelected,
|
|
138
|
+
"indeterminate": _vm.isIntermediate,
|
|
139
|
+
"label": _vm.item.label,
|
|
140
|
+
"disabled": _vm.disabled
|
|
141
|
+
},
|
|
142
|
+
on: {
|
|
143
|
+
"click": _vm.handleParentClick
|
|
144
|
+
}
|
|
145
|
+
})], 2), _vm._v(" "), _vm.hasChildren && _vm.isOpen ? _c('div', {
|
|
146
|
+
class: {
|
|
147
|
+
'ml-2xl': _vm.collapsible,
|
|
148
|
+
'ml-lg': !_vm.collapsible
|
|
149
|
+
}
|
|
150
|
+
}, _vm._l(_vm.item.children, function (child) {
|
|
151
|
+
return _c('OrCheckboxTree', {
|
|
152
|
+
key: child.value,
|
|
153
|
+
staticClass: "mt-xs",
|
|
154
|
+
attrs: {
|
|
155
|
+
"item": child,
|
|
156
|
+
"collapsible": _vm.collapsible || child.collapsible,
|
|
157
|
+
"disabled": _vm.disabled || child.disabled
|
|
158
|
+
},
|
|
159
|
+
model: {
|
|
160
|
+
value: _vm.proxyModelValue,
|
|
161
|
+
callback: function ($$v) {
|
|
162
|
+
_vm.proxyModelValue = $$v;
|
|
163
|
+
},
|
|
164
|
+
expression: "proxyModelValue"
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
}), 1) : _vm._e()] : [_c('OrCheckbox', {
|
|
168
|
+
attrs: {
|
|
169
|
+
"disabled": _vm.disabled || _vm.item.disabled,
|
|
170
|
+
"label": _vm.item.label,
|
|
171
|
+
"value": _vm.item.value
|
|
172
|
+
},
|
|
173
|
+
model: {
|
|
174
|
+
value: _vm.proxyModelValue,
|
|
175
|
+
callback: function ($$v) {
|
|
176
|
+
_vm.proxyModelValue = $$v;
|
|
177
|
+
},
|
|
178
|
+
expression: "proxyModelValue"
|
|
179
|
+
}
|
|
180
|
+
})]], 2);
|
|
181
|
+
};
|
|
182
|
+
var __vue_staticRenderFns__ = [];
|
|
183
|
+
|
|
184
|
+
/* style */
|
|
185
|
+
const __vue_inject_styles__ = undefined;
|
|
186
|
+
/* scoped */
|
|
187
|
+
const __vue_scope_id__ = undefined;
|
|
188
|
+
/* module identifier */
|
|
189
|
+
const __vue_module_identifier__ = undefined;
|
|
190
|
+
/* functional template */
|
|
191
|
+
const __vue_is_functional_template__ = false;
|
|
192
|
+
/* style inject */
|
|
193
|
+
|
|
194
|
+
/* style inject SSR */
|
|
195
|
+
|
|
196
|
+
/* style inject shadow dom */
|
|
197
|
+
|
|
198
|
+
const __vue_component__ = /*#__PURE__*/normalizeComponent({
|
|
199
|
+
render: __vue_render__,
|
|
200
|
+
staticRenderFns: __vue_staticRenderFns__
|
|
201
|
+
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
|
|
202
|
+
|
|
203
|
+
export { __vue_component__ as default };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { PropType } from 'vue-demi';
|
|
2
|
+
import { CheckboxNode } from './types';
|
|
3
|
+
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
4
|
+
rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
5
|
+
parentStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
6
|
+
hasChildren: import("@vue/composition-api").ComputedRef<boolean | undefined>;
|
|
7
|
+
proxyModelValue: import("@vue/composition-api").WritableComputedRef<string[]> | import("@vue/composition-api").Ref<string[]>;
|
|
8
|
+
isOpen: import("@vue/composition-api").Ref<boolean>;
|
|
9
|
+
setIsOpen: (value?: boolean | undefined) => boolean;
|
|
10
|
+
isIntermediate: import("@vue/composition-api").ComputedRef<boolean>;
|
|
11
|
+
isAllChildrenSelected: import("@vue/composition-api").ComputedRef<boolean>;
|
|
12
|
+
isAnyChildrenSelected: import("@vue/composition-api").ComputedRef<boolean>;
|
|
13
|
+
childrenValues: import("@vue/composition-api").ComputedRef<any[]>;
|
|
14
|
+
handleParentClick: () => void;
|
|
15
|
+
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
16
|
+
modelValue: {
|
|
17
|
+
type: PropType<string[]>;
|
|
18
|
+
default: () => never[];
|
|
19
|
+
};
|
|
20
|
+
item: {
|
|
21
|
+
type: PropType<CheckboxNode>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
collapsible: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
disabled: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
}, import("@vue/composition-api").ExtractPropTypes<{
|
|
33
|
+
modelValue: {
|
|
34
|
+
type: PropType<string[]>;
|
|
35
|
+
default: () => never[];
|
|
36
|
+
};
|
|
37
|
+
item: {
|
|
38
|
+
type: PropType<CheckboxNode>;
|
|
39
|
+
required: true;
|
|
40
|
+
};
|
|
41
|
+
collapsible: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
45
|
+
disabled: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
49
|
+
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
50
|
+
modelValue: string[];
|
|
51
|
+
item: CheckboxNode;
|
|
52
|
+
collapsible: boolean;
|
|
53
|
+
disabled: boolean;
|
|
54
|
+
} & {}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
55
|
+
rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
56
|
+
parentStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
57
|
+
hasChildren: import("@vue/composition-api").ComputedRef<boolean | undefined>;
|
|
58
|
+
proxyModelValue: import("@vue/composition-api").WritableComputedRef<string[]> | import("@vue/composition-api").Ref<string[]>;
|
|
59
|
+
isOpen: import("@vue/composition-api").Ref<boolean>;
|
|
60
|
+
setIsOpen: (value?: boolean | undefined) => boolean;
|
|
61
|
+
isIntermediate: import("@vue/composition-api").ComputedRef<boolean>;
|
|
62
|
+
isAllChildrenSelected: import("@vue/composition-api").ComputedRef<boolean>;
|
|
63
|
+
isAnyChildrenSelected: import("@vue/composition-api").ComputedRef<boolean>;
|
|
64
|
+
childrenValues: import("@vue/composition-api").ComputedRef<any[]>;
|
|
65
|
+
handleParentClick: () => void;
|
|
66
|
+
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
|
|
67
|
+
modelValue: string[];
|
|
68
|
+
item: CheckboxNode;
|
|
69
|
+
collapsible: boolean;
|
|
70
|
+
disabled: boolean;
|
|
71
|
+
} & {}, {
|
|
72
|
+
modelValue: string[];
|
|
73
|
+
collapsible: boolean;
|
|
74
|
+
disabled: boolean;
|
|
75
|
+
}, true>);
|
|
76
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as OrCheckboxTreeV3 } from './OrCheckboxTree.vue';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { default as OrCheckboxTreeV3 } from './OrCheckboxTree.js';
|
|
2
|
+
import 'vue-demi';
|
|
3
|
+
import '@vueuse/core';
|
|
4
|
+
import './styles.js';
|
|
5
|
+
import '../../utils/functions/flattenDeep.js';
|
|
6
|
+
import '../OrIconV3/OrIcon.js';
|
|
7
|
+
import '../OrIconV3/props.js';
|
|
8
|
+
import '../OrIconV3/styles.js';
|
|
9
|
+
import '../../normalize-component-6e8e3d80.js';
|
|
10
|
+
import '../OrCheckboxV3/OrCheckbox.js';
|
|
11
|
+
import '../OrCheckboxV3/styles.js';
|
|
12
|
+
import '../OrLabelV3/OrLabel.js';
|
|
13
|
+
import '../OrLabelV3/props.js';
|
|
14
|
+
import '../OrLabelV3/styles.js';
|
|
15
|
+
import '../../hooks/useIdAttribute.js';
|
|
16
|
+
import '../../hooks/useControlAttributes.js';
|
|
17
|
+
import '../../style-inject.es-4c6f2515.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|