vuetify 3.7.0 → 3.7.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/json/attributes.json +172 -172
- package/dist/json/importMap-labs.json +8 -8
- package/dist/json/importMap.json +160 -160
- package/dist/json/web-types.json +230 -219
- package/dist/vuetify-labs.css +1941 -1926
- package/dist/vuetify-labs.d.ts +4266 -2397
- package/dist/vuetify-labs.esm.js +107 -111
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +107 -111
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +1521 -1506
- package/dist/vuetify.d.ts +1282 -901
- package/dist/vuetify.esm.js +79 -54
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +79 -54
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +1087 -1086
- package/dist/vuetify.min.js.map +1 -1
- package/lib/blueprints/index.d.mts +4 -1
- package/lib/blueprints/md1.d.mts +4 -1
- package/lib/blueprints/md2.d.mts +4 -1
- package/lib/blueprints/md3.d.mts +4 -1
- package/lib/components/VAlert/index.d.mts +14 -11
- package/lib/components/VAppBar/index.d.mts +22 -19
- package/lib/components/VAutocomplete/index.d.mts +158 -110
- package/lib/components/VAvatar/VAvatar.css +1 -1
- package/lib/components/VAvatar/_variables.scss +1 -1
- package/lib/components/VAvatar/index.d.mts +8 -5
- package/lib/components/VBadge/index.d.mts +8 -5
- package/lib/components/VBanner/index.d.mts +18 -15
- package/lib/components/VBottomNavigation/index.d.mts +4 -4
- package/lib/components/VBottomSheet/index.d.mts +11 -11
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs +3 -5
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/index.d.mts +8 -5
- package/lib/components/VBtn/VBtn.mjs +3 -4
- package/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/lib/components/VBtn/index.d.mts +18 -15
- package/lib/components/VBtnGroup/index.d.mts +4 -4
- package/lib/components/VBtnToggle/index.d.mts +4 -4
- package/lib/components/VCard/VCard.mjs +3 -4
- package/lib/components/VCard/VCard.mjs.map +1 -1
- package/lib/components/VCard/index.d.mts +18 -15
- package/lib/components/VCarousel/index.d.mts +17 -14
- package/lib/components/VCheckbox/index.d.mts +8 -5
- package/lib/components/VChip/VChip.mjs +2 -3
- package/lib/components/VChip/VChip.mjs.map +1 -1
- package/lib/components/VChip/index.d.mts +12 -9
- package/lib/components/VChipGroup/index.d.mts +8 -5
- package/lib/components/VColorPicker/index.d.mts +22 -22
- package/lib/components/VCombobox/index.d.mts +158 -110
- package/lib/components/VDataTable/index.d.mts +18 -15
- package/lib/components/VDatePicker/index.d.mts +16 -13
- package/lib/components/VDialog/VDialog.css +4 -1
- package/lib/components/VDialog/VDialog.mjs +3 -2
- package/lib/components/VDialog/VDialog.mjs.map +1 -1
- package/lib/components/VDialog/VDialog.sass +2 -1
- package/lib/components/VDialog/index.d.mts +89 -50
- package/lib/components/VEmptyState/index.d.mts +12 -9
- package/lib/components/VExpansionPanel/index.d.mts +8 -5
- package/lib/components/VFab/index.d.mts +22 -19
- package/lib/components/VField/index.d.mts +4 -1
- package/lib/components/VFileInput/index.d.mts +34 -7
- package/lib/components/VFooter/index.d.mts +4 -4
- package/lib/components/VForm/index.d.mts +96 -3
- package/lib/components/VIcon/index.d.mts +8 -5
- package/lib/components/VInfiniteScroll/VInfiniteScroll.css +13 -1
- package/lib/components/VInfiniteScroll/VInfiniteScroll.mjs +6 -8
- package/lib/components/VInfiniteScroll/VInfiniteScroll.mjs.map +1 -1
- package/lib/components/VInfiniteScroll/VInfiniteScroll.sass +10 -1
- package/lib/components/VInput/index.d.mts +6 -3
- package/lib/components/VItemGroup/index.d.mts +4 -4
- package/lib/components/VLabel/index.d.mts +4 -4
- package/lib/components/VList/VList.mjs +4 -2
- package/lib/components/VList/VList.mjs.map +1 -1
- package/lib/components/VList/VListItem.mjs +8 -6
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/index.d.mts +84 -24
- package/lib/components/VMenu/index.d.mts +92 -50
- package/lib/components/VMessages/index.d.mts +8 -8
- package/lib/components/VNavigationDrawer/index.d.mts +18 -18
- package/lib/components/VOtpInput/index.d.mts +4 -4
- package/lib/components/VOverlay/index.d.mts +11 -11
- package/lib/components/VPagination/index.d.mts +8 -5
- package/lib/components/VProgressCircular/index.d.mts +4 -4
- package/lib/components/VRadio/index.d.mts +4 -1
- package/lib/components/VRadioGroup/index.d.mts +6 -3
- package/lib/components/VRangeSlider/index.d.mts +12 -9
- package/lib/components/VRating/index.d.mts +4 -1
- package/lib/components/VSelect/index.d.mts +158 -110
- package/lib/components/VSelectionControl/index.d.mts +4 -1
- package/lib/components/VSelectionControlGroup/index.d.mts +4 -1
- package/lib/components/VSheet/index.d.mts +10 -10
- package/lib/components/VSkeletonLoader/index.d.mts +4 -4
- package/lib/components/VSlideGroup/index.d.mts +4 -1
- package/lib/components/VSlider/index.d.mts +12 -9
- package/lib/components/VSnackbar/index.d.mts +95 -62
- package/lib/components/VSpeedDial/index.d.mts +11 -11
- package/lib/components/VStepper/index.d.mts +12 -12
- package/lib/components/VSwitch/index.d.mts +6 -3
- package/lib/components/VSystemBar/index.d.mts +4 -4
- package/lib/components/VTabs/index.d.mts +69 -54
- package/lib/components/VTextField/index.d.mts +47 -14
- package/lib/components/VTextarea/index.d.mts +38 -11
- package/lib/components/VTimeline/index.d.mts +8 -5
- package/lib/components/VToolbar/index.d.mts +4 -4
- package/lib/components/VTooltip/index.d.mts +78 -45
- package/lib/components/VWindow/index.d.mts +10 -7
- package/lib/components/index.d.mts +1204 -814
- package/lib/components/index.mjs +1 -1
- package/lib/components/index.mjs.map +1 -1
- package/lib/composables/directiveComponent.mjs +1 -1
- package/lib/composables/directiveComponent.mjs.map +1 -1
- package/lib/composables/forwardRefs.mjs +2 -0
- package/lib/composables/forwardRefs.mjs.map +1 -1
- package/lib/composables/icons.mjs.map +1 -1
- package/lib/composables/index.mjs.map +1 -1
- package/lib/composables/nested/nested.mjs +18 -6
- package/lib/composables/nested/nested.mjs.map +1 -1
- package/lib/composables/nested/openStrategies.mjs +2 -4
- package/lib/composables/nested/openStrategies.mjs.map +1 -1
- package/lib/composables/router.mjs +19 -9
- package/lib/composables/router.mjs.map +1 -1
- package/lib/directives/tooltip/index.mjs +1 -1
- package/lib/directives/tooltip/index.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/iconsets/fa-svg.d.mts +4 -1
- package/lib/iconsets/fa.d.mts +4 -1
- package/lib/iconsets/fa4.d.mts +4 -1
- package/lib/iconsets/md.d.mts +4 -1
- package/lib/iconsets/mdi-svg.d.mts +4 -1
- package/lib/iconsets/mdi.d.mts +4 -1
- package/lib/index.d.mts +82 -88
- package/lib/labs/VDateInput/index.d.mts +16 -13
- package/lib/labs/VNumberInput/VNumberInput.mjs +7 -1
- package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
- package/lib/labs/VNumberInput/index.d.mts +2212 -730
- package/lib/labs/VPicker/index.d.mts +10 -10
- package/lib/labs/VSnackbarQueue/index.d.mts +128 -95
- package/lib/labs/VStepperVertical/index.d.mts +10 -7
- package/lib/labs/VTimePicker/VTimePicker.mjs +1 -1
- package/lib/labs/VTimePicker/VTimePicker.mjs.map +1 -1
- package/lib/labs/VTimePicker/VTimePickerControls.mjs +2 -2
- package/lib/labs/VTimePicker/VTimePickerControls.mjs.map +1 -1
- package/lib/labs/VTimePicker/index.d.mts +26 -26
- package/lib/labs/VTimePicker/util.mjs +5 -0
- package/lib/labs/VTimePicker/util.mjs.map +1 -0
- package/lib/labs/VTreeview/VTreeview.mjs +3 -12
- package/lib/labs/VTreeview/VTreeview.mjs.map +1 -1
- package/lib/labs/VTreeview/VTreeviewChildren.mjs +1 -1
- package/lib/labs/VTreeview/VTreeviewChildren.mjs.map +1 -1
- package/lib/labs/VTreeview/VTreeviewItem.mjs +9 -20
- package/lib/labs/VTreeview/VTreeviewItem.mjs.map +1 -1
- package/lib/labs/VTreeview/index.d.mts +44 -41
- package/lib/labs/components.d.mts +2515 -1000
- package/lib/util/helpers.mjs +7 -3
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +7 -13
- package/lib/components/VDatePicker/util/createNativeLocaleFormatter.mjs +0 -21
- package/lib/components/VDatePicker/util/createNativeLocaleFormatter.mjs.map +0 -1
- package/lib/components/VDatePicker/util/eventHelpers.mjs +0 -22
- package/lib/components/VDatePicker/util/eventHelpers.mjs.map +0 -1
- package/lib/components/VDatePicker/util/index.mjs +0 -9
- package/lib/components/VDatePicker/util/index.mjs.map +0 -1
- package/lib/components/VDatePicker/util/isDateAllowed.mjs +0 -7
- package/lib/components/VDatePicker/util/isDateAllowed.mjs.map +0 -1
- package/lib/components/VDatePicker/util/monthChange.mjs +0 -18
- package/lib/components/VDatePicker/util/monthChange.mjs.map +0 -1
- package/lib/components/VDatePicker/util/pad.mjs +0 -21
- package/lib/components/VDatePicker/util/pad.mjs.map +0 -1
- package/lib/components/VDatePicker/util/sanitizeDateString.mjs +0 -12
- package/lib/components/VDatePicker/util/sanitizeDateString.mjs.map +0 -1
- package/lib/components/VTreeview/VTreeview.mjs +0 -350
- package/lib/components/VTreeview/VTreeview.mjs.map +0 -1
- package/lib/components/VTreeview/VTreeview.sass +0 -128
- package/lib/components/VTreeview/VTreeviewNode.mjs +0 -321
- package/lib/components/VTreeview/VTreeviewNode.mjs.map +0 -1
- package/lib/components/VTreeview/_mixins.sass +0 -18
- package/lib/components/VTreeview/_variables.scss +0 -10
- package/lib/components/VTreeview/index.mjs +0 -10
- package/lib/components/VTreeview/index.mjs.map +0 -1
- package/lib/components/VTreeview/util/filterTreeItems.mjs +0 -25
- package/lib/components/VTreeview/util/filterTreeItems.mjs.map +0 -1
- package/lib/services/goto/easing-patterns.mjs +0 -27
- package/lib/services/goto/easing-patterns.mjs.map +0 -1
- package/lib/services/goto/index.mjs +0 -73
- package/lib/services/goto/index.mjs.map +0 -1
- package/lib/services/goto/util.mjs +0 -39
- package/lib/services/goto/util.mjs.map +0 -1
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
// Components
|
|
4
|
-
import { VExpandTransition } from "../transitions/index.mjs";
|
|
5
|
-
import { VIcon } from "../VIcon/index.mjs";
|
|
6
|
-
// Mixins
|
|
7
|
-
import { inject as RegistrableInject } from "../../mixins/registrable.mjs";
|
|
8
|
-
import Colorable from "../../mixins/colorable.mjs"; // Utils
|
|
9
|
-
import mixins from "../../util/mixins.mjs";
|
|
10
|
-
import { getObjectValueByPath, createRange } from "../../util/helpers.mjs"; // Types
|
|
11
|
-
const baseMixins = mixins(Colorable, RegistrableInject('treeview'));
|
|
12
|
-
export const VTreeviewNodeProps = {
|
|
13
|
-
activatable: Boolean,
|
|
14
|
-
activeClass: {
|
|
15
|
-
type: String,
|
|
16
|
-
default: 'v-treeview-node--active'
|
|
17
|
-
},
|
|
18
|
-
color: {
|
|
19
|
-
type: String,
|
|
20
|
-
default: 'primary'
|
|
21
|
-
},
|
|
22
|
-
disablePerNode: Boolean,
|
|
23
|
-
expandIcon: {
|
|
24
|
-
type: String,
|
|
25
|
-
default: '$subgroup'
|
|
26
|
-
},
|
|
27
|
-
indeterminateIcon: {
|
|
28
|
-
type: String,
|
|
29
|
-
default: '$checkboxIndeterminate'
|
|
30
|
-
},
|
|
31
|
-
itemChildren: {
|
|
32
|
-
type: String,
|
|
33
|
-
default: 'children'
|
|
34
|
-
},
|
|
35
|
-
itemDisabled: {
|
|
36
|
-
type: String,
|
|
37
|
-
default: 'disabled'
|
|
38
|
-
},
|
|
39
|
-
itemKey: {
|
|
40
|
-
type: String,
|
|
41
|
-
default: 'id'
|
|
42
|
-
},
|
|
43
|
-
itemText: {
|
|
44
|
-
type: String,
|
|
45
|
-
default: 'name'
|
|
46
|
-
},
|
|
47
|
-
loadChildren: Function,
|
|
48
|
-
loadingIcon: {
|
|
49
|
-
type: String,
|
|
50
|
-
default: '$loading'
|
|
51
|
-
},
|
|
52
|
-
offIcon: {
|
|
53
|
-
type: String,
|
|
54
|
-
default: '$checkboxOff'
|
|
55
|
-
},
|
|
56
|
-
onIcon: {
|
|
57
|
-
type: String,
|
|
58
|
-
default: '$checkboxOn'
|
|
59
|
-
},
|
|
60
|
-
openOnClick: Boolean,
|
|
61
|
-
rounded: Boolean,
|
|
62
|
-
selectable: Boolean,
|
|
63
|
-
selectedColor: {
|
|
64
|
-
type: String,
|
|
65
|
-
default: 'accent'
|
|
66
|
-
},
|
|
67
|
-
shaped: Boolean,
|
|
68
|
-
transition: Boolean,
|
|
69
|
-
selectionType: {
|
|
70
|
-
type: String,
|
|
71
|
-
default: 'leaf',
|
|
72
|
-
validator: v => ['leaf', 'independent'].includes(v)
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
/* @vue/component */
|
|
77
|
-
const VTreeviewNode = baseMixins.extend().extend({
|
|
78
|
-
name: 'v-treeview-node',
|
|
79
|
-
inject: {
|
|
80
|
-
treeview: {
|
|
81
|
-
default: null
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
props: {
|
|
85
|
-
level: Number,
|
|
86
|
-
item: {
|
|
87
|
-
type: Object,
|
|
88
|
-
default: () => null
|
|
89
|
-
},
|
|
90
|
-
parentIsDisabled: Boolean,
|
|
91
|
-
...VTreeviewNodeProps
|
|
92
|
-
},
|
|
93
|
-
data: () => ({
|
|
94
|
-
hasLoaded: false,
|
|
95
|
-
isActive: false,
|
|
96
|
-
// Node is selected (row)
|
|
97
|
-
isIndeterminate: false,
|
|
98
|
-
// Node has at least one selected child
|
|
99
|
-
isLoading: false,
|
|
100
|
-
isOpen: false,
|
|
101
|
-
// Node is open/expanded
|
|
102
|
-
isSelected: false // Node is selected (checkbox)
|
|
103
|
-
}),
|
|
104
|
-
computed: {
|
|
105
|
-
disabled() {
|
|
106
|
-
return getObjectValueByPath(this.item, this.itemDisabled) || !this.disablePerNode && this.parentIsDisabled && this.selectionType === 'leaf';
|
|
107
|
-
},
|
|
108
|
-
key() {
|
|
109
|
-
return getObjectValueByPath(this.item, this.itemKey);
|
|
110
|
-
},
|
|
111
|
-
children() {
|
|
112
|
-
const children = getObjectValueByPath(this.item, this.itemChildren);
|
|
113
|
-
return children && children.filter(child => !this.treeview.isExcluded(getObjectValueByPath(child, this.itemKey)));
|
|
114
|
-
},
|
|
115
|
-
text() {
|
|
116
|
-
return getObjectValueByPath(this.item, this.itemText);
|
|
117
|
-
},
|
|
118
|
-
scopedProps() {
|
|
119
|
-
return {
|
|
120
|
-
item: this.item,
|
|
121
|
-
leaf: !this.children,
|
|
122
|
-
selected: this.isSelected,
|
|
123
|
-
indeterminate: this.isIndeterminate,
|
|
124
|
-
active: this.isActive,
|
|
125
|
-
open: this.isOpen
|
|
126
|
-
};
|
|
127
|
-
},
|
|
128
|
-
computedIcon() {
|
|
129
|
-
if (this.isIndeterminate) return this.indeterminateIcon;else if (this.isSelected) return this.onIcon;else return this.offIcon;
|
|
130
|
-
},
|
|
131
|
-
hasChildren() {
|
|
132
|
-
return !!this.children && (!!this.children.length || !!this.loadChildren);
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
created() {
|
|
136
|
-
this.treeview.register(this);
|
|
137
|
-
},
|
|
138
|
-
beforeDestroy() {
|
|
139
|
-
this.treeview.unregister(this);
|
|
140
|
-
},
|
|
141
|
-
methods: {
|
|
142
|
-
checkChildren() {
|
|
143
|
-
return new Promise(resolve => {
|
|
144
|
-
// TODO: Potential issue with always trying
|
|
145
|
-
// to load children if response is empty?
|
|
146
|
-
if (!this.children || this.children.length || !this.loadChildren || this.hasLoaded) return resolve();
|
|
147
|
-
this.isLoading = true;
|
|
148
|
-
resolve(this.loadChildren(this.item));
|
|
149
|
-
}).then(() => {
|
|
150
|
-
this.isLoading = false;
|
|
151
|
-
this.hasLoaded = true;
|
|
152
|
-
});
|
|
153
|
-
},
|
|
154
|
-
open() {
|
|
155
|
-
this.isOpen = !this.isOpen;
|
|
156
|
-
this.treeview.updateOpen(this.key, this.isOpen);
|
|
157
|
-
this.treeview.emitOpen();
|
|
158
|
-
},
|
|
159
|
-
genLabel() {
|
|
160
|
-
const children = [];
|
|
161
|
-
if (this.$scopedSlots.label) children.push(this.$scopedSlots.label(this.scopedProps));else children.push(this.text);
|
|
162
|
-
return this.$createElement('div', {
|
|
163
|
-
slot: 'label',
|
|
164
|
-
staticClass: 'v-treeview-node__label'
|
|
165
|
-
}, children);
|
|
166
|
-
},
|
|
167
|
-
genPrependSlot() {
|
|
168
|
-
if (!this.$scopedSlots.prepend) return null;
|
|
169
|
-
return this.$createElement('div', {
|
|
170
|
-
staticClass: 'v-treeview-node__prepend'
|
|
171
|
-
}, this.$scopedSlots.prepend(this.scopedProps));
|
|
172
|
-
},
|
|
173
|
-
genAppendSlot() {
|
|
174
|
-
if (!this.$scopedSlots.append) return null;
|
|
175
|
-
return this.$createElement('div', {
|
|
176
|
-
staticClass: 'v-treeview-node__append'
|
|
177
|
-
}, this.$scopedSlots.append(this.scopedProps));
|
|
178
|
-
},
|
|
179
|
-
genContent() {
|
|
180
|
-
const children = [this.genPrependSlot(), this.genLabel(), this.genAppendSlot()];
|
|
181
|
-
return this.$createElement('div', {
|
|
182
|
-
staticClass: 'v-treeview-node__content'
|
|
183
|
-
}, children);
|
|
184
|
-
},
|
|
185
|
-
genToggle() {
|
|
186
|
-
return this.$createElement(VIcon, {
|
|
187
|
-
staticClass: 'v-treeview-node__toggle',
|
|
188
|
-
class: {
|
|
189
|
-
'v-treeview-node__toggle--open': this.isOpen,
|
|
190
|
-
'v-treeview-node__toggle--loading': this.isLoading
|
|
191
|
-
},
|
|
192
|
-
slot: 'prepend',
|
|
193
|
-
on: {
|
|
194
|
-
click: e => {
|
|
195
|
-
e.stopPropagation();
|
|
196
|
-
if (this.isLoading) return;
|
|
197
|
-
this.checkChildren().then(() => this.open());
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}, [this.isLoading ? this.loadingIcon : this.expandIcon]);
|
|
201
|
-
},
|
|
202
|
-
genCheckbox() {
|
|
203
|
-
return this.$createElement(VIcon, {
|
|
204
|
-
staticClass: 'v-treeview-node__checkbox',
|
|
205
|
-
props: {
|
|
206
|
-
color: this.isSelected || this.isIndeterminate ? this.selectedColor : undefined,
|
|
207
|
-
disabled: this.disabled
|
|
208
|
-
},
|
|
209
|
-
on: {
|
|
210
|
-
click: e => {
|
|
211
|
-
e.stopPropagation();
|
|
212
|
-
if (this.isLoading) return;
|
|
213
|
-
this.checkChildren().then(() => {
|
|
214
|
-
// We nextTick here so that items watch in VTreeview has a chance to run first
|
|
215
|
-
this.$nextTick(() => {
|
|
216
|
-
this.isSelected = !this.isSelected;
|
|
217
|
-
this.isIndeterminate = false;
|
|
218
|
-
this.treeview.updateSelected(this.key, this.isSelected);
|
|
219
|
-
this.treeview.emitSelected();
|
|
220
|
-
});
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
}, [this.computedIcon]);
|
|
225
|
-
},
|
|
226
|
-
genLevel(level) {
|
|
227
|
-
return createRange(level).map(() => this.$createElement('div', {
|
|
228
|
-
staticClass: 'v-treeview-node__level'
|
|
229
|
-
}));
|
|
230
|
-
},
|
|
231
|
-
genNode() {
|
|
232
|
-
const children = [this.genContent()];
|
|
233
|
-
if (this.selectable) children.unshift(this.genCheckbox());
|
|
234
|
-
if (this.hasChildren) {
|
|
235
|
-
children.unshift(this.genToggle());
|
|
236
|
-
} else {
|
|
237
|
-
children.unshift(...this.genLevel(1));
|
|
238
|
-
}
|
|
239
|
-
children.unshift(...this.genLevel(this.level));
|
|
240
|
-
return this.$createElement('div', this.setTextColor(this.isActive && this.color, {
|
|
241
|
-
staticClass: 'v-treeview-node__root',
|
|
242
|
-
class: {
|
|
243
|
-
[this.activeClass]: this.isActive
|
|
244
|
-
},
|
|
245
|
-
on: {
|
|
246
|
-
click: () => {
|
|
247
|
-
if (this.openOnClick && this.hasChildren) {
|
|
248
|
-
this.checkChildren().then(this.open);
|
|
249
|
-
} else if (this.activatable && !this.disabled) {
|
|
250
|
-
this.isActive = !this.isActive;
|
|
251
|
-
this.treeview.updateActive(this.key, this.isActive);
|
|
252
|
-
this.treeview.emitActive();
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
}), children);
|
|
257
|
-
},
|
|
258
|
-
genChild(item, parentIsDisabled) {
|
|
259
|
-
return this.$createElement(VTreeviewNode, {
|
|
260
|
-
key: getObjectValueByPath(item, this.itemKey),
|
|
261
|
-
props: {
|
|
262
|
-
activatable: this.activatable,
|
|
263
|
-
activeClass: this.activeClass,
|
|
264
|
-
item,
|
|
265
|
-
selectable: this.selectable,
|
|
266
|
-
selectedColor: this.selectedColor,
|
|
267
|
-
color: this.color,
|
|
268
|
-
disablePerNode: this.disablePerNode,
|
|
269
|
-
expandIcon: this.expandIcon,
|
|
270
|
-
indeterminateIcon: this.indeterminateIcon,
|
|
271
|
-
offIcon: this.offIcon,
|
|
272
|
-
onIcon: this.onIcon,
|
|
273
|
-
loadingIcon: this.loadingIcon,
|
|
274
|
-
itemKey: this.itemKey,
|
|
275
|
-
itemText: this.itemText,
|
|
276
|
-
itemDisabled: this.itemDisabled,
|
|
277
|
-
itemChildren: this.itemChildren,
|
|
278
|
-
loadChildren: this.loadChildren,
|
|
279
|
-
transition: this.transition,
|
|
280
|
-
openOnClick: this.openOnClick,
|
|
281
|
-
rounded: this.rounded,
|
|
282
|
-
shaped: this.shaped,
|
|
283
|
-
level: this.level + 1,
|
|
284
|
-
selectionType: this.selectionType,
|
|
285
|
-
parentIsDisabled
|
|
286
|
-
},
|
|
287
|
-
scopedSlots: this.$scopedSlots
|
|
288
|
-
});
|
|
289
|
-
},
|
|
290
|
-
genChildrenWrapper() {
|
|
291
|
-
if (!this.isOpen || !this.children) return null;
|
|
292
|
-
const children = [this.children.map(c => this.genChild(c, this.disabled))];
|
|
293
|
-
return this.$createElement('div', {
|
|
294
|
-
staticClass: 'v-treeview-node__children'
|
|
295
|
-
}, children);
|
|
296
|
-
},
|
|
297
|
-
genTransition() {
|
|
298
|
-
return this.$createElement(VExpandTransition, [this.genChildrenWrapper()]);
|
|
299
|
-
}
|
|
300
|
-
},
|
|
301
|
-
render(h) {
|
|
302
|
-
const children = [this.genNode()];
|
|
303
|
-
if (this.transition) children.push(this.genTransition());else children.push(this.genChildrenWrapper());
|
|
304
|
-
return h('div', {
|
|
305
|
-
staticClass: 'v-treeview-node',
|
|
306
|
-
class: {
|
|
307
|
-
'v-treeview-node--leaf': !this.hasChildren,
|
|
308
|
-
'v-treeview-node--click': this.openOnClick,
|
|
309
|
-
'v-treeview-node--disabled': this.disabled,
|
|
310
|
-
'v-treeview-node--rounded': this.rounded,
|
|
311
|
-
'v-treeview-node--shaped': this.shaped,
|
|
312
|
-
'v-treeview-node--selected': this.isSelected
|
|
313
|
-
},
|
|
314
|
-
attrs: {
|
|
315
|
-
'aria-expanded': String(this.isOpen)
|
|
316
|
-
}
|
|
317
|
-
}, children);
|
|
318
|
-
}
|
|
319
|
-
});
|
|
320
|
-
export default VTreeviewNode;
|
|
321
|
-
//# sourceMappingURL=VTreeviewNode.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VTreeviewNode.mjs","names":["VExpandTransition","VIcon","inject","RegistrableInject","Colorable","mixins","getObjectValueByPath","createRange","baseMixins","VTreeviewNodeProps","activatable","Boolean","activeClass","type","String","default","color","disablePerNode","expandIcon","indeterminateIcon","itemChildren","itemDisabled","itemKey","itemText","loadChildren","Function","loadingIcon","offIcon","onIcon","openOnClick","rounded","selectable","selectedColor","shaped","transition","selectionType","validator","v","includes","VTreeviewNode","extend","name","treeview","props","level","Number","item","Object","parentIsDisabled","data","hasLoaded","isActive","isIndeterminate","isLoading","isOpen","isSelected","computed","disabled","key","children","filter","child","isExcluded","text","scopedProps","leaf","selected","indeterminate","active","open","computedIcon","hasChildren","length","created","register","beforeDestroy","unregister","methods","checkChildren","Promise","resolve","then","updateOpen","emitOpen","genLabel","$scopedSlots","label","push","$createElement","slot","staticClass","genPrependSlot","prepend","genAppendSlot","append","genContent","genToggle","class","on","click","e","stopPropagation","genCheckbox","undefined","$nextTick","updateSelected","emitSelected","genLevel","map","genNode","unshift","setTextColor","updateActive","emitActive","genChild","scopedSlots","genChildrenWrapper","c","genTransition","render","h","attrs"],"sources":["../../../src/components/VTreeview/VTreeviewNode.ts"],"sourcesContent":["// @ts-nocheck\n/* eslint-disable */\n\n// Components\nimport { VExpandTransition } from '../transitions'\nimport { VIcon } from '../VIcon'\nimport VTreeview from './VTreeview'\n\n// Mixins\nimport { inject as RegistrableInject } from '../../mixins/registrable'\nimport Colorable from '../../mixins/colorable'\n\n// Utils\nimport mixins, { ExtractVue } from '../../util/mixins'\nimport { getObjectValueByPath, createRange } from '../../util/helpers'\n\n// Types\nimport { VNode, VNodeChildren, PropType } from 'vue'\nimport { PropValidator } from 'vue/types/options'\n\ntype VTreeViewInstance = InstanceType<typeof VTreeview>\n\nconst baseMixins = mixins(\n Colorable,\n RegistrableInject('treeview')\n)\n\ninterface options extends ExtractVue<typeof baseMixins> {\n treeview: VTreeViewInstance\n}\n\nexport const VTreeviewNodeProps = {\n activatable: Boolean,\n activeClass: {\n type: String,\n default: 'v-treeview-node--active',\n },\n color: {\n type: String,\n default: 'primary',\n },\n disablePerNode: Boolean,\n expandIcon: {\n type: String,\n default: '$subgroup',\n },\n indeterminateIcon: {\n type: String,\n default: '$checkboxIndeterminate',\n },\n itemChildren: {\n type: String,\n default: 'children',\n },\n itemDisabled: {\n type: String,\n default: 'disabled',\n },\n itemKey: {\n type: String,\n default: 'id',\n },\n itemText: {\n type: String,\n default: 'name',\n },\n loadChildren: Function as PropType<(item: any) => Promise<void>>,\n loadingIcon: {\n type: String,\n default: '$loading',\n },\n offIcon: {\n type: String,\n default: '$checkboxOff',\n },\n onIcon: {\n type: String,\n default: '$checkboxOn',\n },\n openOnClick: Boolean,\n rounded: Boolean,\n selectable: Boolean,\n selectedColor: {\n type: String,\n default: 'accent',\n },\n shaped: Boolean,\n transition: Boolean,\n selectionType: {\n type: String as PropType<'leaf' | 'independent'>,\n default: 'leaf',\n validator: (v: string) => ['leaf', 'independent'].includes(v),\n },\n}\n\n/* @vue/component */\nconst VTreeviewNode = baseMixins.extend<options>().extend({\n name: 'v-treeview-node',\n\n inject: {\n treeview: {\n default: null,\n },\n },\n\n props: {\n level: Number,\n item: {\n type: Object,\n default: () => null,\n } as PropValidator<Record<string, unknown> | null>,\n parentIsDisabled: Boolean,\n ...VTreeviewNodeProps,\n },\n\n data: () => ({\n hasLoaded: false,\n isActive: false, // Node is selected (row)\n isIndeterminate: false, // Node has at least one selected child\n isLoading: false,\n isOpen: false, // Node is open/expanded\n isSelected: false, // Node is selected (checkbox)\n }),\n\n computed: {\n disabled (): boolean {\n return (\n getObjectValueByPath(this.item, this.itemDisabled) ||\n (!this.disablePerNode && (this.parentIsDisabled && this.selectionType === 'leaf'))\n )\n },\n key (): string {\n return getObjectValueByPath(this.item, this.itemKey)\n },\n children (): any[] | null {\n const children = getObjectValueByPath(this.item, this.itemChildren)\n return children && children.filter((child: any) => !this.treeview.isExcluded(getObjectValueByPath(child, this.itemKey)))\n },\n text (): string {\n return getObjectValueByPath(this.item, this.itemText)\n },\n scopedProps (): object {\n return {\n item: this.item,\n leaf: !this.children,\n selected: this.isSelected,\n indeterminate: this.isIndeterminate,\n active: this.isActive,\n open: this.isOpen,\n }\n },\n computedIcon (): string {\n if (this.isIndeterminate) return this.indeterminateIcon\n else if (this.isSelected) return this.onIcon\n else return this.offIcon\n },\n hasChildren (): boolean {\n return !!this.children && (!!this.children.length || !!this.loadChildren)\n },\n },\n\n created () {\n this.treeview.register(this)\n },\n\n beforeDestroy () {\n this.treeview.unregister(this)\n },\n\n methods: {\n checkChildren (): Promise<void> {\n return new Promise<void>(resolve => {\n // TODO: Potential issue with always trying\n // to load children if response is empty?\n if (!this.children || this.children.length || !this.loadChildren || this.hasLoaded) return resolve()\n\n this.isLoading = true\n resolve(this.loadChildren(this.item))\n }).then(() => {\n this.isLoading = false\n this.hasLoaded = true\n })\n },\n open () {\n this.isOpen = !this.isOpen\n this.treeview.updateOpen(this.key, this.isOpen)\n this.treeview.emitOpen()\n },\n genLabel () {\n const children = []\n\n if (this.$scopedSlots.label) children.push(this.$scopedSlots.label(this.scopedProps))\n else children.push(this.text)\n\n return this.$createElement('div', {\n slot: 'label',\n staticClass: 'v-treeview-node__label',\n }, children)\n },\n genPrependSlot () {\n if (!this.$scopedSlots.prepend) return null\n\n return this.$createElement('div', {\n staticClass: 'v-treeview-node__prepend',\n }, this.$scopedSlots.prepend(this.scopedProps))\n },\n genAppendSlot () {\n if (!this.$scopedSlots.append) return null\n\n return this.$createElement('div', {\n staticClass: 'v-treeview-node__append',\n }, this.$scopedSlots.append(this.scopedProps))\n },\n genContent () {\n const children = [\n this.genPrependSlot(),\n this.genLabel(),\n this.genAppendSlot(),\n ]\n\n return this.$createElement('div', {\n staticClass: 'v-treeview-node__content',\n }, children)\n },\n genToggle () {\n return this.$createElement(VIcon, {\n staticClass: 'v-treeview-node__toggle',\n class: {\n 'v-treeview-node__toggle--open': this.isOpen,\n 'v-treeview-node__toggle--loading': this.isLoading,\n },\n slot: 'prepend',\n on: {\n click: (e: MouseEvent) => {\n e.stopPropagation()\n\n if (this.isLoading) return\n\n this.checkChildren().then(() => this.open())\n },\n },\n }, [this.isLoading ? this.loadingIcon : this.expandIcon])\n },\n genCheckbox () {\n return this.$createElement(VIcon, {\n staticClass: 'v-treeview-node__checkbox',\n props: {\n color: this.isSelected || this.isIndeterminate ? this.selectedColor : undefined,\n disabled: this.disabled,\n },\n on: {\n click: (e: MouseEvent) => {\n e.stopPropagation()\n\n if (this.isLoading) return\n\n this.checkChildren().then(() => {\n // We nextTick here so that items watch in VTreeview has a chance to run first\n this.$nextTick(() => {\n this.isSelected = !this.isSelected\n this.isIndeterminate = false\n\n this.treeview.updateSelected(this.key, this.isSelected)\n this.treeview.emitSelected()\n })\n })\n },\n },\n }, [this.computedIcon])\n },\n genLevel (level: number) {\n return createRange(level).map(() => this.$createElement('div', {\n staticClass: 'v-treeview-node__level',\n }))\n },\n genNode () {\n const children = [this.genContent()]\n\n if (this.selectable) children.unshift(this.genCheckbox())\n\n if (this.hasChildren) {\n children.unshift(this.genToggle())\n } else {\n children.unshift(...this.genLevel(1))\n }\n\n children.unshift(...this.genLevel(this.level))\n\n return this.$createElement('div', this.setTextColor(this.isActive && this.color, {\n staticClass: 'v-treeview-node__root',\n class: {\n [this.activeClass]: this.isActive,\n },\n on: {\n click: () => {\n if (this.openOnClick && this.hasChildren) {\n this.checkChildren().then(this.open)\n } else if (this.activatable && !this.disabled) {\n this.isActive = !this.isActive\n this.treeview.updateActive(this.key, this.isActive)\n this.treeview.emitActive()\n }\n },\n },\n }), children)\n },\n genChild (item: any, parentIsDisabled: boolean) {\n return this.$createElement(VTreeviewNode, {\n key: getObjectValueByPath(item, this.itemKey),\n props: {\n activatable: this.activatable,\n activeClass: this.activeClass,\n item,\n selectable: this.selectable,\n selectedColor: this.selectedColor,\n color: this.color,\n disablePerNode: this.disablePerNode,\n expandIcon: this.expandIcon,\n indeterminateIcon: this.indeterminateIcon,\n offIcon: this.offIcon,\n onIcon: this.onIcon,\n loadingIcon: this.loadingIcon,\n itemKey: this.itemKey,\n itemText: this.itemText,\n itemDisabled: this.itemDisabled,\n itemChildren: this.itemChildren,\n loadChildren: this.loadChildren,\n transition: this.transition,\n openOnClick: this.openOnClick,\n rounded: this.rounded,\n shaped: this.shaped,\n level: this.level + 1,\n selectionType: this.selectionType,\n parentIsDisabled,\n },\n scopedSlots: this.$scopedSlots,\n })\n },\n genChildrenWrapper () {\n if (!this.isOpen || !this.children) return null\n\n const children = [this.children.map(c => this.genChild(c, this.disabled))]\n\n return this.$createElement('div', {\n staticClass: 'v-treeview-node__children',\n }, children)\n },\n genTransition () {\n return this.$createElement(VExpandTransition, [this.genChildrenWrapper()])\n },\n },\n\n render (h): VNode {\n const children: VNodeChildren = [this.genNode()]\n\n if (this.transition) children.push(this.genTransition())\n else children.push(this.genChildrenWrapper())\n\n return h('div', {\n staticClass: 'v-treeview-node',\n class: {\n 'v-treeview-node--leaf': !this.hasChildren,\n 'v-treeview-node--click': this.openOnClick,\n 'v-treeview-node--disabled': this.disabled,\n 'v-treeview-node--rounded': this.rounded,\n 'v-treeview-node--shaped': this.shaped,\n 'v-treeview-node--selected': this.isSelected,\n },\n attrs: {\n 'aria-expanded': String(this.isOpen),\n },\n }, children)\n },\n})\n\nexport default VTreeviewNode\n"],"mappings":"AAAA;AACA;AAEA;AAAA,SACSA,iBAAiB;AAAA,SACjBC,KAAK;AAGd;AAAA,SACSC,MAAM,IAAIC,iBAAiB;AAAA,OAC7BC,SAAS,oCAEhB;AAAA,OACOC,MAAM;AAAA,SACJC,oBAAoB,EAAEC,WAAW,kCAE1C;AAMA,MAAMC,UAAU,GAAGH,MAAM,CACvBD,SAAS,EACTD,iBAAiB,CAAC,UAAU,CAC9B,CAAC;AAMD,OAAO,MAAMM,kBAAkB,GAAG;EAChCC,WAAW,EAAEC,OAAO;EACpBC,WAAW,EAAE;IACXC,IAAI,EAAEC,MAAM;IACZC,OAAO,EAAE;EACX,CAAC;EACDC,KAAK,EAAE;IACLH,IAAI,EAAEC,MAAM;IACZC,OAAO,EAAE;EACX,CAAC;EACDE,cAAc,EAAEN,OAAO;EACvBO,UAAU,EAAE;IACVL,IAAI,EAAEC,MAAM;IACZC,OAAO,EAAE;EACX,CAAC;EACDI,iBAAiB,EAAE;IACjBN,IAAI,EAAEC,MAAM;IACZC,OAAO,EAAE;EACX,CAAC;EACDK,YAAY,EAAE;IACZP,IAAI,EAAEC,MAAM;IACZC,OAAO,EAAE;EACX,CAAC;EACDM,YAAY,EAAE;IACZR,IAAI,EAAEC,MAAM;IACZC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CAAC+B,aAAa,CAAC,CAAC,CAAC,MACnD3D,QAAQ,CAAC4B,IAAI,CAAC,IAAI,CAAC6B,kBAAkB,CAAC,CAAC,CAAC;IAE7C,OAAOI,CAAC,CAAC,KAAK,EAAE;MACd9B,WAAW,EAAE,iBAAiB;MAC9BO,KAAK,EAAE;QACL,uBAAuB,EAAE,CAAC,IAAI,CAAC1B,WAAW;QAC1C,wBAAwB,EAAE,IAAI,CAAC1C,WAAW;QAC1C,2BAA2B,EAAE,IAAI,CAAC4B,QAAQ;QAC1C,0BAA0B,EAAE,IAAI,CAAC3B,OAAO;QACxC,yBAAyB,EAAE,IAAI,CAACG,MAAM;QACtC,2BAA2B,EAAE,IAAI,CAACsB;MACpC,CAAC;MACDkE,KAAK,EAAE;QACL,eAAe,EAAE3G,MAAM,CAAC,IAAI,CAACwC,MAAM;MACrC;IACF,CAAC,EAAEK,QAAQ,CAAC;EACd;AACF,CAAC,CAAC;AAEF,eAAepB,aAAa","ignoreList":[]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
@mixin treeview-shaped($size, $margin)
|
|
2
|
-
.v-treeview-node__root,
|
|
3
|
-
.v-treeview-node__root:before
|
|
4
|
-
border-bottom-right-radius: #{$size * .5} !important
|
|
5
|
-
border-top-right-radius: #{$size * .5} !important
|
|
6
|
-
|
|
7
|
-
.v-treeview-node__root
|
|
8
|
-
margin-top: $margin
|
|
9
|
-
margin-bottom: $margin
|
|
10
|
-
|
|
11
|
-
@mixin treeview-rounded($size, $margin)
|
|
12
|
-
.v-treeview-node__root,
|
|
13
|
-
.v-treeview-node__root:before
|
|
14
|
-
border-radius: #{$size * .5} !important
|
|
15
|
-
|
|
16
|
-
.v-treeview-node__root
|
|
17
|
-
margin-top: $margin
|
|
18
|
-
margin-bottom: $margin
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
@import '../../styles/styles.sass';
|
|
2
|
-
|
|
3
|
-
$treeview-transition: .2s map-get($transition, 'linear-out-slow-in') !default;
|
|
4
|
-
$treeview-label-font-size: inherit !default;
|
|
5
|
-
$treeview-node-height: 48px !default;
|
|
6
|
-
$treeview-node-height-dense: 40px !default;
|
|
7
|
-
$treeview-node-shaped-margin: 8px !default;
|
|
8
|
-
$treeview-node-padding: 8px !default;
|
|
9
|
-
$treeview-node-margin: 6px !default;
|
|
10
|
-
$treeview-node-level-width: 24px !default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["VTreeview","VTreeviewNode","$_vuetify_subcomponents"],"sources":["../../../src/components/VTreeview/index.ts"],"sourcesContent":["import VTreeview from './VTreeview'\nimport VTreeviewNode from './VTreeviewNode'\n\nexport { VTreeview, VTreeviewNode }\n\nexport default {\n $_vuetify_subcomponents: {\n VTreeview,\n VTreeviewNode,\n },\n}\n"],"mappings":"OAAOA,SAAS;AAAA,OACTC,aAAa;AAEpB,SAASD,SAAS,EAAEC,aAAa;AAEjC,eAAe;EACbC,uBAAuB,EAAE;IACvBF,SAAS;IACTC;EACF;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
import { getObjectValueByPath } from "../../../util/helpers.mjs";
|
|
4
|
-
export function filterTreeItem(item, search, textKey) {
|
|
5
|
-
const text = getObjectValueByPath(item, textKey);
|
|
6
|
-
return text.toLocaleLowerCase().indexOf(search.toLocaleLowerCase()) > -1;
|
|
7
|
-
}
|
|
8
|
-
export function filterTreeItems(filter, item, search, idKey, textKey, childrenKey, excluded) {
|
|
9
|
-
if (filter(item, search, textKey)) {
|
|
10
|
-
return true;
|
|
11
|
-
}
|
|
12
|
-
const children = getObjectValueByPath(item, childrenKey);
|
|
13
|
-
if (children) {
|
|
14
|
-
let match = false;
|
|
15
|
-
for (let i = 0; i < children.length; i++) {
|
|
16
|
-
if (filterTreeItems(filter, children[i], search, idKey, textKey, childrenKey, excluded)) {
|
|
17
|
-
match = true;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
if (match) return true;
|
|
21
|
-
}
|
|
22
|
-
excluded.add(getObjectValueByPath(item, idKey));
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=filterTreeItems.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filterTreeItems.mjs","names":["getObjectValueByPath","filterTreeItem","item","search","textKey","text","toLocaleLowerCase","indexOf","filterTreeItems","filter","idKey","childrenKey","excluded","children","match","i","length","add"],"sources":["../../../../src/components/VTreeview/util/filterTreeItems.ts"],"sourcesContent":["// @ts-nocheck\n/* eslint-disable */\n\nimport { getObjectValueByPath } from '../../../util/helpers'\nimport { TreeviewItemFunction } from 'vuetify/types'\n\nexport function filterTreeItem (item: object, search: string, textKey: string): boolean {\n const text = getObjectValueByPath(item, textKey)\n\n return text.toLocaleLowerCase().indexOf(search.toLocaleLowerCase()) > -1\n}\n\nexport function filterTreeItems (\n filter: TreeviewItemFunction,\n item: any,\n search: string,\n idKey: string,\n textKey: string,\n childrenKey: string,\n excluded: Set<string | number>\n): boolean {\n if (filter(item, search, textKey)) {\n return true\n }\n\n const children = getObjectValueByPath(item, childrenKey)\n\n if (children) {\n let match = false\n for (let i = 0; i < children.length; i++) {\n if (filterTreeItems(filter, children[i], search, idKey, textKey, childrenKey, excluded)) {\n match = true\n }\n }\n\n if (match) return true\n }\n\n excluded.add(getObjectValueByPath(item, idKey))\n\n return false\n}\n"],"mappings":"AAAA;AACA;AAAA,SAESA,oBAAoB;AAG7B,OAAO,SAASC,cAAcA,CAAEC,IAAY,EAAEC,MAAc,EAAEC,OAAe,EAAW;EACtF,MAAMC,IAAI,GAAGL,oBAAoB,CAACE,IAAI,EAAEE,OAAO,CAAC;EAEhD,OAAOC,IAAI,CAACC,iBAAiB,CAAC,CAAC,CAACC,OAAO,CAACJ,MAAM,CAACG,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAC1E;AAEA,OAAO,SAASE,eAAeA,CAC7BC,MAA4B,EAC5BP,IAAS,EACTC,MAAc,EACdO,KAAa,EACbN,OAAe,EACfO,WAAmB,EACnBC,QAA8B,EACrB;EACT,IAAIH,MAAM,CAACP,IAAI,EAAEC,MAAM,EAAEC,OAAO,CAAC,EAAE;IACjC,OAAO,IAAI;EACb;EAEA,MAAMS,QAAQ,GAAGb,oBAAoB,CAACE,IAAI,EAAES,WAAW,CAAC;EAExD,IAAIE,QAAQ,EAAE;IACZ,IAAIC,KAAK,GAAG,KAAK;IACjB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,QAAQ,CAACG,MAAM,EAAED,CAAC,EAAE,EAAE;MACxC,IAAIP,eAAe,CAACC,MAAM,EAAEI,QAAQ,CAACE,CAAC,CAAC,EAAEZ,MAAM,EAAEO,KAAK,EAAEN,OAAO,EAAEO,WAAW,EAAEC,QAAQ,CAAC,EAAE;QACvFE,KAAK,GAAG,IAAI;MACd;IACF;IAEA,IAAIA,KAAK,EAAE,OAAO,IAAI;EACxB;EAEAF,QAAQ,CAACK,GAAG,CAACjB,oBAAoB,CAACE,IAAI,EAAEQ,KAAK,CAAC,CAAC;EAE/C,OAAO,KAAK;AACd","ignoreList":[]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
// linear
|
|
2
|
-
export const linear = t => t;
|
|
3
|
-
// accelerating from zero velocity
|
|
4
|
-
export const easeInQuad = t => t ** 2;
|
|
5
|
-
// decelerating to zero velocity
|
|
6
|
-
export const easeOutQuad = t => t * (2 - t);
|
|
7
|
-
// acceleration until halfway, then deceleration
|
|
8
|
-
export const easeInOutQuad = t => t < 0.5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t;
|
|
9
|
-
// accelerating from zero velocity
|
|
10
|
-
export const easeInCubic = t => t ** 3;
|
|
11
|
-
// decelerating to zero velocity
|
|
12
|
-
export const easeOutCubic = t => --t ** 3 + 1;
|
|
13
|
-
// acceleration until halfway, then deceleration
|
|
14
|
-
export const easeInOutCubic = t => t < 0.5 ? 4 * t ** 3 : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;
|
|
15
|
-
// accelerating from zero velocity
|
|
16
|
-
export const easeInQuart = t => t ** 4;
|
|
17
|
-
// decelerating to zero velocity
|
|
18
|
-
export const easeOutQuart = t => 1 - --t ** 4;
|
|
19
|
-
// acceleration until halfway, then deceleration
|
|
20
|
-
export const easeInOutQuart = t => t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t;
|
|
21
|
-
// accelerating from zero velocity
|
|
22
|
-
export const easeInQuint = t => t ** 5;
|
|
23
|
-
// decelerating to zero velocity
|
|
24
|
-
export const easeOutQuint = t => 1 + --t ** 5;
|
|
25
|
-
// acceleration until halfway, then deceleration
|
|
26
|
-
export const easeInOutQuint = t => t < 0.5 ? 16 * t ** 5 : 1 + 16 * --t ** 5;
|
|
27
|
-
//# sourceMappingURL=easing-patterns.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"easing-patterns.mjs","names":["linear","t","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint"],"sources":["../../../src/services/goto/easing-patterns.ts"],"sourcesContent":["export type EasingFunction = (t: number) => number\n\n// linear\nexport const linear = (t: number) => t\n// accelerating from zero velocity\nexport const easeInQuad = (t: number) => t ** 2\n// decelerating to zero velocity\nexport const easeOutQuad = (t: number) => t * (2 - t)\n// acceleration until halfway, then deceleration\nexport const easeInOutQuad = (t: number) => (t < 0.5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t)\n// accelerating from zero velocity\nexport const easeInCubic = (t: number) => t ** 3\n// decelerating to zero velocity\nexport const easeOutCubic = (t: number) => --t ** 3 + 1\n// acceleration until halfway, then deceleration\nexport const easeInOutCubic = (t: number) => t < 0.5 ? 4 * t ** 3 : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1\n// accelerating from zero velocity\nexport const easeInQuart = (t: number) => t ** 4\n// decelerating to zero velocity\nexport const easeOutQuart = (t: number) => 1 - --t ** 4\n// acceleration until halfway, then deceleration\nexport const easeInOutQuart = (t: number) => (t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t)\n// accelerating from zero velocity\nexport const easeInQuint = (t: number) => t ** 5\n// decelerating to zero velocity\nexport const easeOutQuint = (t: number) => 1 + --t ** 5\n// acceleration until halfway, then deceleration\nexport const easeInOutQuint = (t: number) => t < 0.5 ? 16 * t ** 5 : 1 + 16 * --t ** 5\n"],"mappings":"AAEA;AACA,OAAO,MAAMA,MAAM,GAAIC,CAAS,IAAKA,CAAC;AACtC;AACA,OAAO,MAAMC,UAAU,GAAID,CAAS,IAAKA,CAAC,IAAI,CAAC;AAC/C;AACA,OAAO,MAAME,WAAW,GAAIF,CAAS,IAAKA,CAAC,IAAI,CAAC,GAAGA,CAAC,CAAC;AACrD;AACA,OAAO,MAAMG,aAAa,GAAIH,CAAS,IAAMA,CAAC,GAAG,GAAG,GAAG,CAAC,GAAGA,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAGA,CAAC,IAAIA,CAAE;AACzF;AACA,OAAO,MAAMI,WAAW,GAAIJ,CAAS,IAAKA,CAAC,IAAI,CAAC;AAChD;AACA,OAAO,MAAMK,YAAY,GAAIL,CAAS,IAAK,EAAEA,CAAC,IAAI,CAAC,GAAG,CAAC;AACvD;AACA,OAAO,MAAMM,cAAc,GAAIN,CAAS,IAAKA,CAAC,GAAG,GAAG,GAAG,CAAC,GAAGA,CAAC,IAAI,CAAC,GAAG,CAACA,CAAC,GAAG,CAAC,KAAK,CAAC,GAAGA,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAGA,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC;AAC3G;AACA,OAAO,MAAMO,WAAW,GAAIP,CAAS,IAAKA,CAAC,IAAI,CAAC;AAChD;AACA,OAAO,MAAMQ,YAAY,GAAIR,CAAS,IAAK,CAAC,GAAG,EAAEA,CAAC,IAAI,CAAC;AACvD;AACA,OAAO,MAAMS,cAAc,GAAIT,CAAS,IAAMA,CAAC,GAAG,GAAG,GAAG,CAAC,GAAGA,CAAC,GAAGA,CAAC,GAAGA,CAAC,GAAGA,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAEA,CAAC,GAAGA,CAAC,GAAGA,CAAC,GAAGA,CAAE;AACpG;AACA,OAAO,MAAMU,WAAW,GAAIV,CAAS,IAAKA,CAAC,IAAI,CAAC;AAChD;AACA,OAAO,MAAMW,YAAY,GAAIX,CAAS,IAAK,CAAC,GAAG,EAAEA,CAAC,IAAI,CAAC;AACvD;AACA,OAAO,MAAMY,cAAc,GAAIZ,CAAS,IAAKA,CAAC,GAAG,GAAG,GAAG,EAAE,GAAGA,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAEA,CAAC,IAAI,CAAC","ignoreList":[]}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
// Extensions
|
|
4
|
-
// import { Service } from '../service'
|
|
5
|
-
// Utilities
|
|
6
|
-
import * as easingPatterns from "./easing-patterns.mjs";
|
|
7
|
-
import { getContainer, getOffset } from "./util.mjs"; // Types
|
|
8
|
-
function goTo(_target) {
|
|
9
|
-
let _settings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
10
|
-
const settings = {
|
|
11
|
-
container: document.scrollingElement || document.body || document.documentElement,
|
|
12
|
-
duration: 500,
|
|
13
|
-
offset: 0,
|
|
14
|
-
easing: 'easeInOutCubic',
|
|
15
|
-
appOffset: true,
|
|
16
|
-
..._settings
|
|
17
|
-
};
|
|
18
|
-
const container = getContainer(settings.container);
|
|
19
|
-
|
|
20
|
-
/* istanbul ignore else */
|
|
21
|
-
if (settings.appOffset && goTo.framework.application) {
|
|
22
|
-
const isDrawer = container.classList.contains('v-navigation-drawer');
|
|
23
|
-
const isClipped = container.classList.contains('v-navigation-drawer--clipped');
|
|
24
|
-
const {
|
|
25
|
-
bar,
|
|
26
|
-
top
|
|
27
|
-
} = goTo.framework.application;
|
|
28
|
-
settings.offset += bar;
|
|
29
|
-
/* istanbul ignore else */
|
|
30
|
-
if (!isDrawer || isClipped) settings.offset += top;
|
|
31
|
-
}
|
|
32
|
-
const startTime = performance.now();
|
|
33
|
-
let targetLocation;
|
|
34
|
-
if (typeof _target === 'number') {
|
|
35
|
-
targetLocation = getOffset(_target) - settings.offset;
|
|
36
|
-
} else {
|
|
37
|
-
targetLocation = getOffset(_target) - getOffset(container) - settings.offset;
|
|
38
|
-
}
|
|
39
|
-
const startLocation = container.scrollTop;
|
|
40
|
-
if (targetLocation === startLocation) return Promise.resolve(targetLocation);
|
|
41
|
-
const ease = typeof settings.easing === 'function' ? settings.easing : easingPatterns[settings.easing];
|
|
42
|
-
/* istanbul ignore else */
|
|
43
|
-
if (!ease) throw new TypeError(`Easing function "${settings.easing}" not found.`);
|
|
44
|
-
|
|
45
|
-
// Cannot be tested properly in jsdom
|
|
46
|
-
/* istanbul ignore next */
|
|
47
|
-
return new Promise(resolve => requestAnimationFrame(function step(currentTime) {
|
|
48
|
-
const timeElapsed = currentTime - startTime;
|
|
49
|
-
const progress = Math.abs(settings.duration ? Math.min(timeElapsed / settings.duration, 1) : 1);
|
|
50
|
-
container.scrollTop = Math.floor(startLocation + (targetLocation - startLocation) * ease(progress));
|
|
51
|
-
const clientHeight = container === document.body ? document.documentElement.clientHeight : container.clientHeight;
|
|
52
|
-
const reachBottom = clientHeight + container.scrollTop >= container.scrollHeight;
|
|
53
|
-
if (progress === 1 ||
|
|
54
|
-
// Need to go lower but reach bottom
|
|
55
|
-
targetLocation > container.scrollTop && reachBottom) {
|
|
56
|
-
return resolve(targetLocation);
|
|
57
|
-
}
|
|
58
|
-
requestAnimationFrame(step);
|
|
59
|
-
}));
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// goTo.framework = {} as Record<string, VuetifyServiceContract>
|
|
63
|
-
|
|
64
|
-
// export class Goto extends Service {
|
|
65
|
-
// public static property: 'goTo' = 'goTo'
|
|
66
|
-
|
|
67
|
-
// constructor () {
|
|
68
|
-
// super()
|
|
69
|
-
|
|
70
|
-
// return goTo
|
|
71
|
-
// }
|
|
72
|
-
// }
|
|
73
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["easingPatterns","getContainer","getOffset","goTo","_target","_settings","arguments","length","undefined","settings","container","document","scrollingElement","body","documentElement","duration","offset","easing","appOffset","framework","application","isDrawer","classList","contains","isClipped","bar","top","startTime","performance","now","targetLocation","startLocation","scrollTop","Promise","resolve","ease","TypeError","requestAnimationFrame","step","currentTime","timeElapsed","progress","Math","abs","min","floor","clientHeight","reachBottom","scrollHeight"],"sources":["../../../src/services/goto/index.ts"],"sourcesContent":["// @ts-nocheck\n/* eslint-disable */\n\n// Extensions\n// import { Service } from '../service'\n\n// Utilities\nimport * as easingPatterns from './easing-patterns'\nimport {\n getContainer,\n getOffset,\n} from './util'\n\n// Types\nimport { GoToOptions, VuetifyGoToTarget } from 'vuetify/types/services/goto'\n\nimport { VuetifyServiceContract } from 'vuetify/types/services'\n\nfunction goTo (\n _target: VuetifyGoToTarget,\n _settings: GoToOptions = {}\n): Promise<number> {\n const settings: GoToOptions = {\n container: (document.scrollingElement as HTMLElement | null) || document.body || document.documentElement,\n duration: 500,\n offset: 0,\n easing: 'easeInOutCubic',\n appOffset: true,\n ..._settings,\n }\n const container = getContainer(settings.container)\n\n /* istanbul ignore else */\n if (settings.appOffset && goTo.framework.application) {\n const isDrawer = container.classList.contains('v-navigation-drawer')\n const isClipped = container.classList.contains('v-navigation-drawer--clipped')\n const { bar, top } = goTo.framework.application as any\n\n settings.offset += bar\n /* istanbul ignore else */\n if (!isDrawer || isClipped) settings.offset += top\n }\n\n const startTime = performance.now()\n\n let targetLocation: number\n if (typeof _target === 'number') {\n targetLocation = getOffset(_target) - settings.offset!\n } else {\n targetLocation = getOffset(_target) - getOffset(container) - settings.offset!\n }\n\n const startLocation = container.scrollTop\n if (targetLocation === startLocation) return Promise.resolve(targetLocation)\n\n const ease = typeof settings.easing === 'function'\n ? settings.easing\n : easingPatterns[settings.easing!]\n /* istanbul ignore else */\n if (!ease) throw new TypeError(`Easing function \"${settings.easing}\" not found.`)\n\n // Cannot be tested properly in jsdom\n /* istanbul ignore next */\n return new Promise(resolve => requestAnimationFrame(function step (currentTime: number) {\n const timeElapsed = currentTime - startTime\n const progress = Math.abs(settings.duration ? Math.min(timeElapsed / settings.duration, 1) : 1)\n\n container.scrollTop = Math.floor(startLocation + (targetLocation - startLocation) * ease(progress))\n\n const clientHeight = container === document.body ? document.documentElement.clientHeight : container.clientHeight\n const reachBottom = clientHeight + container.scrollTop >= container.scrollHeight\n if (\n progress === 1 ||\n // Need to go lower but reach bottom\n (targetLocation > container.scrollTop && reachBottom)\n ) {\n return resolve(targetLocation)\n }\n\n requestAnimationFrame(step)\n }))\n}\n\n// goTo.framework = {} as Record<string, VuetifyServiceContract>\n\n// export class Goto extends Service {\n// public static property: 'goTo' = 'goTo'\n\n// constructor () {\n// super()\n\n// return goTo\n// }\n// }\n"],"mappings":"AAAA;AACA;AAEA;AACA;AAEA;AAAA,OACO,KAAKA,cAAc;AAAA,SAExBC,YAAY,EACZC,SAAS,sBAGX;AAKA,SAASC,IAAIA,CACXC,OAA0B,EAET;EAAA,IADjBC,SAAsB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAE3B,MAAMG,QAAqB,GAAG;IAC5BC,SAAS,EAAGC,QAAQ,CAACC,gBAAgB,IAA2BD,QAAQ,CAACE,IAAI,IAAIF,QAAQ,CAACG,eAAe;IACzGC,QAAQ,EAAE,GA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A,IAAI,CAACkB,IAAI,EAAE,MAAM,IAAIC,SAAS,CAAC,oBAAoB3B,QAAQ,CAACQ,MAAM,cAAc,CAAC;;EAEjF;EACA;EACA,OAAO,IAAIgB,OAAO,CAACC,OAAO,IAAIG,qBAAqB,CAAC,SAASC,IAAIA,CAAEC,WAAmB,EAAE;IACtF,MAAMC,WAAW,GAAGD,WAAW,GAAGZ,SAAS;IAC3C,MAAMc,QAAQ,GAAGC,IAAI,CAACC,GAAG,CAAClC,QAAQ,CAACM,QAAQ,GAAG2B,IAAI,CAACE,GAAG,CAACJ,WAAW,GAAG/B,QAAQ,CAACM,QAAQ,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;IAE/FL,SAAS,CAACsB,SAAS,GAAGU,IAAI,CAACG,KAAK,CAACd,aAAa,GAAG,CAACD,cAAc,GAAGC,aAAa,IAAII,IAAI,CAACM,QAAQ,CAAC,CAAC;IAEnG,MAAMK,YAAY,GAAGpC,SAAS,KAAKC,QAAQ,CAACE,IAAI,GAAGF,QAAQ,CAACG,eAAe,CAACgC,YAAY,GAAGpC,SAAS,CAACoC,YAAY;IACjH,MAAMC,WAAW,GAAGD,YAAY,GAAGpC,SAAS,CAACsB,SAAS,IAAItB,SAAS,CAACsC,YAAY;IAChF,IACEP,QAAQ,KAAK,CAAC;IACd;IACCX,cAAc,GAAGpB,SAAS,CAACsB,SAAS,IAAIe,WAAY,EACrD;MACA,OAAOb,OAAO,CAACJ,cAAc,CAAC;IAChC;IAEAO,qBAAqB,CAACC,IAAI,CAAC;EAC7B,CAAC,CAAC,CAAC;AACL;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA","ignoreList":[]}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
|
|
4
|
-
// Return target's cumulative offset from the top
|
|
5
|
-
export function getOffset(target) {
|
|
6
|
-
if (typeof target === 'number') {
|
|
7
|
-
return target;
|
|
8
|
-
}
|
|
9
|
-
let el = $(target);
|
|
10
|
-
if (!el) {
|
|
11
|
-
throw typeof target === 'string' ? new Error(`Target element "${target}" not found.`) : new TypeError(`Target must be a Number/Selector/HTMLElement/VueComponent, received ${type(target)} instead.`);
|
|
12
|
-
}
|
|
13
|
-
let totalOffset = 0;
|
|
14
|
-
while (el) {
|
|
15
|
-
totalOffset += el.offsetTop;
|
|
16
|
-
el = el.offsetParent;
|
|
17
|
-
}
|
|
18
|
-
return totalOffset;
|
|
19
|
-
}
|
|
20
|
-
export function getContainer(container) {
|
|
21
|
-
const el = $(container);
|
|
22
|
-
if (el) return el;
|
|
23
|
-
throw typeof container === 'string' ? new Error(`Container element "${container}" not found.`) : new TypeError(`Container must be a Selector/HTMLElement/VueComponent, received ${type(container)} instead.`);
|
|
24
|
-
}
|
|
25
|
-
function type(el) {
|
|
26
|
-
return el == null ? el : el.constructor.name;
|
|
27
|
-
}
|
|
28
|
-
function $(el) {
|
|
29
|
-
if (typeof el === 'string') {
|
|
30
|
-
return document.querySelector(el);
|
|
31
|
-
} else if (el && el.__isVue) {
|
|
32
|
-
return el.$el;
|
|
33
|
-
} else if (el instanceof HTMLElement) {
|
|
34
|
-
return el;
|
|
35
|
-
} else {
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=util.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"util.mjs","names":["getOffset","target","el","$","Error","TypeError","type","totalOffset","offsetTop","offsetParent","getContainer","container","constructor","name","document","querySelector","__isVue","$el","HTMLElement"],"sources":["../../../src/services/goto/util.ts"],"sourcesContent":["// @ts-nocheck\n/* eslint-disable */\n\nimport Vue from 'vue'\n\n// Return target's cumulative offset from the top\nexport function getOffset (target: any): number {\n if (typeof target === 'number') {\n return target\n }\n\n let el = $(target)\n if (!el) {\n throw typeof target === 'string'\n ? new Error(`Target element \"${target}\" not found.`)\n : new TypeError(`Target must be a Number/Selector/HTMLElement/VueComponent, received ${type(target)} instead.`)\n }\n\n let totalOffset = 0\n while (el) {\n totalOffset += el.offsetTop\n el = el.offsetParent as HTMLElement\n }\n\n return totalOffset\n}\n\nexport function getContainer (container: any): HTMLElement {\n const el = $(container)\n\n if (el) return el\n\n throw typeof container === 'string'\n ? new Error(`Container element \"${container}\" not found.`)\n : new TypeError(`Container must be a Selector/HTMLElement/VueComponent, received ${type(container)} instead.`)\n}\n\nfunction type (el: any) {\n return el == null ? el : el.constructor.name\n}\n\nfunction $ (el: any): HTMLElement | null {\n if (typeof el === 'string') {\n return document.querySelector<HTMLElement>(el)\n } else if (el && el.__isVue) {\n return (el as Vue).$el as HTMLElement\n } else if (el instanceof HTMLElement) {\n return el\n } else {\n return null\n }\n}\n"],"mappings":"AAAA;AACA;;AAIA;AACA,OAAO,SAASA,SAASA,CAAEC,MAAW,EAAU;EAC9C,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;IAC9B,OAAOA,MAAM;EACf;EAEA,IAAIC,EAAE,GAAGC,CAAC,CAACF,MAAM,CAAC;EAClB,IAAI,CAACC,EAAE,EAAE;IACP,MAAM,OAAOD,MAAM,KAAK,QAAQ,GAC5B,IAAIG,KAAK,CAAC,mBAAmBH,MAAM,cAAc,CAAC,GAClD,IAAII,SAAS,CAAC,uEAAuEC,IAAI,CAACL,MAAM,CAAC,WAAW,CAAC;EACnH;EAEA,IAAIM,WAAW,GAAG,CAAC;EACnB,OAAOL,EAAE,EAAE;IACTK,WAAW,IAAIL,EAAE,CAACM,SAAS;IAC3BN,EAAE,GAAGA,EAAE,CAACO,YAA2B;EACrC;EAEA,OAAOF,WAAW;AACpB;AAEA,OAAO,SAASG,YAAYA,CAAEC,SAAc,EAAe;EACzD,MAAMT,EAAE,GAAGC,CAAC,CAACQ,SAAS,CAAC;EAEvB,IAAIT,EAAE,EAAE,OAAOA,EAAE;EAEjB,MAAM,OAAOS,SAAS,KAAK,QAAQ,GAC/B,IAAIP,KAAK,CAAC,s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