@vuetify/nightly 3.6.3-master.2024-05-07 → 3.6.4-master.2024-05-09
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/CHANGELOG.md +7 -13
- package/dist/json/attributes.json +31 -31
- package/dist/json/importMap-labs.json +8 -8
- package/dist/json/importMap.json +124 -124
- package/dist/json/web-types.json +64 -64
- package/dist/vuetify-labs.css +2434 -2363
- package/dist/vuetify-labs.d.ts +995 -966
- package/dist/vuetify-labs.esm.js +104 -70
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +103 -69
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +775 -708
- package/dist/vuetify.d.ts +965 -936
- package/dist/vuetify.esm.js +104 -70
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +103 -69
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +981 -976
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAutocomplete/index.d.mts +169 -140
- package/lib/components/VBottomSheet/index.d.mts +33 -27
- package/lib/components/VColorPicker/VColorPickerCanvas.mjs +1 -1
- package/lib/components/VColorPicker/VColorPickerCanvas.mjs.map +1 -1
- package/lib/components/VCombobox/index.d.mts +169 -140
- package/lib/components/VDataIterator/index.d.mts +1 -1
- package/lib/components/VDataTable/VDataTable.css +1 -1
- package/lib/components/VDataTable/VDataTable.sass +2 -1
- package/lib/components/VDataTable/VDataTableHeaders.mjs +1 -1
- package/lib/components/VDataTable/VDataTableHeaders.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTableVirtual.mjs.map +1 -1
- package/lib/components/VDataTable/composables/select.mjs +2 -1
- package/lib/components/VDataTable/composables/select.mjs.map +1 -1
- package/lib/components/VDataTable/index.d.mts +10 -5
- package/lib/components/VDatePicker/VDatePickerYears.mjs +4 -4
- package/lib/components/VDatePicker/VDatePickerYears.mjs.map +1 -1
- package/lib/components/VDialog/index.d.mts +99 -93
- package/lib/components/VFileInput/VFileInput.mjs +1 -1
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VInfiniteScroll/VInfiniteScroll.mjs +1 -1
- package/lib/components/VInfiniteScroll/VInfiniteScroll.mjs.map +1 -1
- package/lib/components/VList/VList.mjs.map +1 -1
- package/lib/components/VList/index.d.mts +70 -46
- package/lib/components/VMenu/index.d.mts +99 -93
- package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/lib/components/VOverlay/index.d.mts +33 -27
- package/lib/components/VOverlay/useActivator.mjs +5 -5
- package/lib/components/VOverlay/useActivator.mjs.map +1 -1
- package/lib/components/VSelect/index.d.mts +169 -140
- package/lib/components/VSheet/VSheet.css +1 -1
- package/lib/components/VSheet/_variables.scss +1 -1
- package/lib/components/VSlideGroup/VSlideGroup.mjs +25 -25
- package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
- package/lib/components/VSlider/VSliderThumb.css +5 -0
- package/lib/components/VSlider/VSliderThumb.sass +3 -0
- package/lib/components/VSlider/VSliderTrack.css +15 -0
- package/lib/components/VSlider/VSliderTrack.sass +9 -0
- package/lib/components/VSnackbar/index.d.mts +85 -79
- package/lib/components/VSpeedDial/index.d.mts +33 -27
- package/lib/components/VStepper/VStepper.mjs +12 -6
- package/lib/components/VStepper/VStepper.mjs.map +1 -1
- package/lib/components/VStepper/VStepperItem.css +47 -0
- package/lib/components/VStepper/VStepperItem.mjs +5 -3
- package/lib/components/VStepper/VStepperItem.mjs.map +1 -1
- package/lib/components/VStepper/VStepperItem.sass +18 -0
- package/lib/components/VStepper/VStepperWindow.mjs +2 -1
- package/lib/components/VStepper/VStepperWindow.mjs.map +1 -1
- package/lib/components/VStepper/VStepperWindowItem.mjs +2 -1
- package/lib/components/VStepper/VStepperWindowItem.mjs.map +1 -1
- package/lib/components/VTabs/VTabsWindow.mjs +2 -1
- package/lib/components/VTabs/VTabsWindow.mjs.map +1 -1
- package/lib/components/VTooltip/index.d.mts +99 -93
- package/lib/components/VVirtualScroll/VVirtualScrollItem.mjs.map +1 -1
- package/lib/components/index.d.mts +926 -897
- package/lib/composables/nested/activeStrategies.mjs +16 -10
- package/lib/composables/nested/activeStrategies.mjs.map +1 -1
- package/lib/composables/nested/nested.mjs +7 -5
- package/lib/composables/nested/nested.mjs.map +1 -1
- package/lib/composables/resizeObserver.mjs +5 -5
- package/lib/composables/resizeObserver.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.mts +39 -39
- package/lib/labs/VCalendar/VCalendar.css +5 -1
- package/lib/labs/VCalendar/VCalendar.sass +3 -2
- package/lib/labs/VCalendar/_variables.scss +8 -0
- package/lib/labs/VSnackbarQueue/index.d.mts +97 -91
- package/lib/labs/VTreeview/VTreeview.mjs.map +1 -1
- package/lib/labs/VTreeview/index.d.mts +82 -58
- package/lib/labs/components.d.mts +178 -149
- package/lib/util/helpers.mjs +16 -0
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +1 -1
@@ -1,6 +1,7 @@
|
|
1
1
|
/* eslint-disable sonarjs/no-identical-functions */
|
2
2
|
// Utilities
|
3
3
|
import { toRaw } from 'vue';
|
4
|
+
import { wrapInArray } from "../../util/index.mjs";
|
4
5
|
export const independentActiveStrategy = mandatory => {
|
5
6
|
const strategy = {
|
6
7
|
activate: _ref => {
|
@@ -23,14 +24,16 @@ export const independentActiveStrategy = mandatory => {
|
|
23
24
|
},
|
24
25
|
in: (v, children, parents) => {
|
25
26
|
let set = new Set();
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
27
|
+
if (v != null) {
|
28
|
+
for (const id of wrapInArray(v)) {
|
29
|
+
set = strategy.activate({
|
30
|
+
id,
|
31
|
+
value: true,
|
32
|
+
activated: new Set(set),
|
33
|
+
children,
|
34
|
+
parents
|
35
|
+
});
|
36
|
+
}
|
34
37
|
}
|
35
38
|
return set;
|
36
39
|
},
|
@@ -59,8 +62,11 @@ export const independentSingleActiveStrategy = mandatory => {
|
|
59
62
|
},
|
60
63
|
in: (v, children, parents) => {
|
61
64
|
let set = new Set();
|
62
|
-
if (v
|
63
|
-
|
65
|
+
if (v != null) {
|
66
|
+
const arr = wrapInArray(v);
|
67
|
+
if (arr.length) {
|
68
|
+
set = parentStrategy.in(arr.slice(0, 1), children, parents);
|
69
|
+
}
|
64
70
|
}
|
65
71
|
return set;
|
66
72
|
},
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"activeStrategies.mjs","names":["toRaw","independentActiveStrategy","mandatory","strategy","activate","_ref","id","value","activated","size","has","add","delete","in","v","children","parents","set","Set","out","Array","from","independentSingleActiveStrategy","parentStrategy","_ref2","rest","singleSelected","length","slice","leafActiveStrategy","_ref3","leafSingleActiveStrategy","_ref4"],"sources":["../../../src/composables/nested/activeStrategies.ts"],"sourcesContent":["/* eslint-disable sonarjs/no-identical-functions */\n// Utilities\nimport { toRaw } from 'vue'\n\nexport type ActiveStrategyFn = (data: {\n id: unknown\n value: boolean\n activated: Set<unknown>\n children: Map<unknown, unknown[]>\n parents: Map<unknown, unknown>\n event?: Event\n}) => Set<unknown>\n\nexport type ActiveStrategyTransformInFn = (\n v:
|
1
|
+
{"version":3,"file":"activeStrategies.mjs","names":["toRaw","wrapInArray","independentActiveStrategy","mandatory","strategy","activate","_ref","id","value","activated","size","has","add","delete","in","v","children","parents","set","Set","out","Array","from","independentSingleActiveStrategy","parentStrategy","_ref2","rest","singleSelected","arr","length","slice","leafActiveStrategy","_ref3","leafSingleActiveStrategy","_ref4"],"sources":["../../../src/composables/nested/activeStrategies.ts"],"sourcesContent":["/* eslint-disable sonarjs/no-identical-functions */\n// Utilities\nimport { toRaw } from 'vue'\nimport { wrapInArray } from '@/util'\n\nexport type ActiveStrategyFn = (data: {\n id: unknown\n value: boolean\n activated: Set<unknown>\n children: Map<unknown, unknown[]>\n parents: Map<unknown, unknown>\n event?: Event\n}) => Set<unknown>\n\nexport type ActiveStrategyTransformInFn = (\n v: unknown | undefined,\n children: Map<unknown, unknown[]>,\n parents: Map<unknown, unknown>,\n) => Set<unknown>\n\nexport type ActiveStrategyTransformOutFn = (\n v: Set<unknown>,\n children: Map<unknown, unknown[]>,\n parents: Map<unknown, unknown>,\n) => unknown\n\nexport type ActiveStrategy = {\n activate: ActiveStrategyFn\n in: ActiveStrategyTransformInFn\n out: ActiveStrategyTransformOutFn\n}\n\nexport const independentActiveStrategy = (mandatory?: boolean): ActiveStrategy => {\n const strategy: ActiveStrategy = {\n activate: ({ id, value, activated }) => {\n id = toRaw(id)\n\n // When mandatory and we're trying to deselect when id\n // is the only currently selected item then do nothing\n if (mandatory && !value && activated.size === 1 && activated.has(id)) return activated\n\n if (value) {\n activated.add(id)\n } else {\n activated.delete(id)\n }\n\n return activated\n },\n in: (v, children, parents) => {\n let set = new Set()\n\n if (v != null) {\n for (const id of wrapInArray(v)) {\n set = strategy.activate({\n id,\n value: true,\n activated: new Set(set),\n children,\n parents,\n })\n }\n }\n\n return set\n },\n out: v => {\n return Array.from(v)\n },\n }\n\n return strategy\n}\n\nexport const independentSingleActiveStrategy = (mandatory?: boolean): ActiveStrategy => {\n const parentStrategy = independentActiveStrategy(mandatory)\n\n const strategy: ActiveStrategy = {\n activate: ({ activated, id, ...rest }) => {\n id = toRaw(id)\n const singleSelected = activated.has(id) ? new Set([id]) : new Set()\n return parentStrategy.activate({ ...rest, id, activated: singleSelected })\n },\n in: (v, children, parents) => {\n let set = new Set()\n\n if (v != null) {\n const arr = wrapInArray(v)\n if (arr.length) {\n set = parentStrategy.in(arr.slice(0, 1), children, parents)\n }\n }\n\n return set\n },\n out: (v, children, parents) => {\n return parentStrategy.out(v, children, parents)\n },\n }\n\n return strategy\n}\n\nexport const leafActiveStrategy = (mandatory?: boolean): ActiveStrategy => {\n const parentStrategy = independentActiveStrategy(mandatory)\n\n const strategy: ActiveStrategy = {\n activate: ({ id, activated, children, ...rest }) => {\n id = toRaw(id)\n if (children.has(id)) return activated\n\n return parentStrategy.activate({ id, activated, children, ...rest })\n },\n in: parentStrategy.in,\n out: parentStrategy.out,\n }\n\n return strategy\n}\n\nexport const leafSingleActiveStrategy = (mandatory?: boolean): ActiveStrategy => {\n const parentStrategy = independentSingleActiveStrategy(mandatory)\n\n const strategy: ActiveStrategy = {\n activate: ({ id, activated, children, ...rest }) => {\n id = toRaw(id)\n if (children.has(id)) return activated\n\n return parentStrategy.activate({ id, activated, children, ...rest })\n },\n in: parentStrategy.in,\n out: parentStrategy.out,\n }\n\n return strategy\n}\n"],"mappings":"AAAA;AACA;AACA,SAASA,KAAK,QAAQ,KAAK;AAAA,SAClBC,WAAW;AA6BpB,OAAO,MAAMC,yBAAyB,GAAIC,SAAmB,IAAqB;EAChF,MAAMC,QAAwB,GAAG;IAC/BC,QAAQ,EAAEC,IAAA,IAA8B;MAAA,IAA7B;QAAEC,EAAE;QAAEC,KAAK;QAAEC;MAAU,CAAC,GAAAH,IAAA;MACjCC,EAAE,GAAGP,KAAK,CAACO,EAAE,CAAC;;MAEd;MACA;MACA,IAAIJ,SAAS,IAAI,CAACK,KAAK,IAAIC,SAAS,CAACC,IAAI,KAAK,CAAC,IAAID,SAAS,CAACE,GAAG,CAACJ,EAAE,CAAC,EAAE,OAAOE,SAAS;MAEtF,IAAID,KAAK,EAAE;QACTC,SAAS,CAACG,GAAG,CAACL,EAAE,CAAC;MACnB,CAAC,MAAM;QACLE,SAAS,CAACI,MAAM,CAACN,EAAE,CAAC;MACtB;MAEA,OAAOE,SAAS;IAClB,CAAC;IACDK,EAAE,EAAEA,CAACC,CAAC,EAAEC,QAAQ,EAAEC,OAAO,KAAK;MAC5B,IAAIC,GAAG,GAAG,IAAIC,GAAG,CAAC,CAAC;MAEnB,IAAIJ,CAAC,IAAI,IAAI,EAAE;QACb,KAAK,MAAMR,EAAE,IAAIN,WAAW,CAACc,CAAC,CAAC,EAAE;UAC/BG,GAAG,GA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GAAG,CAACJ,EAAE,CAAC,EAAE,OAAOE,SAAS;MAEtC,OAAOe,cAAc,CAACnB,QAAQ,CAAC;QAAEE,EAAE;QAAEE,SAAS;QAAEO,QAAQ;QAAE,GAAGU;MAAK,CAAC,CAAC;IACtE,CAAC;IACDZ,EAAE,EAAEU,cAAc,CAACV,EAAE;IACrBM,GAAG,EAAEI,cAAc,CAACJ;EACtB,CAAC;EAED,OAAOhB,QAAQ;AACjB,CAAC","ignoreList":[]}
|
@@ -28,12 +28,12 @@ export const emptyNested = {
|
|
28
28
|
export const makeNestedProps = propsFactory({
|
29
29
|
activatable: Boolean,
|
30
30
|
selectable: Boolean,
|
31
|
-
activeStrategy: [String, Function],
|
32
|
-
selectStrategy: [String, Function],
|
31
|
+
activeStrategy: [String, Function, Object],
|
32
|
+
selectStrategy: [String, Function, Object],
|
33
33
|
openStrategy: [String, Object],
|
34
|
-
opened:
|
35
|
-
activated:
|
36
|
-
selected:
|
34
|
+
opened: null,
|
35
|
+
activated: null,
|
36
|
+
selected: null,
|
37
37
|
mandatory: Boolean
|
38
38
|
}, 'nested');
|
39
39
|
export const useNested = props => {
|
@@ -43,6 +43,7 @@ export const useNested = props => {
|
|
43
43
|
const opened = useProxiedModel(props, 'opened', props.opened, v => new Set(v), v => [...v.values()]);
|
44
44
|
const activeStrategy = computed(() => {
|
45
45
|
if (typeof props.activeStrategy === 'object') return props.activeStrategy;
|
46
|
+
if (typeof props.activeStrategy === 'function') return props.activeStrategy(props.mandatory);
|
46
47
|
switch (props.activeStrategy) {
|
47
48
|
case 'leaf':
|
48
49
|
return leafActiveStrategy(props.mandatory);
|
@@ -57,6 +58,7 @@ export const useNested = props => {
|
|
57
58
|
});
|
58
59
|
const selectStrategy = computed(() => {
|
59
60
|
if (typeof props.selectStrategy === 'object') return props.selectStrategy;
|
61
|
+
if (typeof props.selectStrategy === 'function') return props.selectStrategy(props.mandatory);
|
60
62
|
switch (props.selectStrategy) {
|
61
63
|
case 'single-leaf':
|
62
64
|
return leafSingleSelectStrategy(props.mandatory);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nested.mjs","names":["useProxiedModel","computed","inject","onBeforeUnmount","provide","ref","shallowRef","toRaw","toRef","independentActiveStrategy","independentSingleActiveStrategy","leafActiveStrategy","leafSingleActiveStrategy","listOpenStrategy","multipleOpenStrategy","singleOpenStrategy","classicSelectStrategy","independentSelectStrategy","independentSingleSelectStrategy","leafSelectStrategy","leafSingleSelectStrategy","getCurrentInstance","getUid","propsFactory","VNestedSymbol","Symbol","for","emptyNested","id","root","register","unregister","parents","Map","children","open","openOnSelect","activate","select","activatable","selectable","opened","Set","activated","selected","selectedValues","makeNestedProps","Boolean","activeStrategy","String","Function","selectStrategy","openStrategy","Object","Array","mandatory","useNested","props","isUnmounted","v","values","value","in","out","getPath","path","parent","unshift","get","vm","nested","arr","key","entries","push","parentId","isGroup","set","delete","list","filter","child","event","emit","newOpened","newSelected","newActivated","useNestedItem","uidSymbol","computedId","undefined","item","e","isOpen","has","isActivated","isSelected","isIndeterminate","isLeaf","isGroupActivator","useNestedGroupActivator"],"sources":["../../../src/composables/nested/nested.ts"],"sourcesContent":["// Composables\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, inject, onBeforeUnmount, provide, ref, shallowRef, toRaw, toRef } from 'vue'\nimport {\n independentActiveStrategy,\n independentSingleActiveStrategy, leafActiveStrategy,\n leafSingleActiveStrategy,\n} from './activeStrategies'\nimport { listOpenStrategy, multipleOpenStrategy, singleOpenStrategy } from './openStrategies'\nimport {\n classicSelectStrategy,\n independentSelectStrategy,\n independentSingleSelectStrategy,\n leafSelectStrategy,\n leafSingleSelectStrategy,\n} from './selectStrategies'\nimport { getCurrentInstance, getUid, propsFactory } from '@/util'\n\n// Types\nimport type { InjectionKey, PropType, Ref } from 'vue'\nimport type { OpenStrategy } from './openStrategies'\nimport type { SelectStrategyFn } from './selectStrategies'\nimport type { EventProp } from '@/util'\n\nexport type SelectStrategy = 'single-leaf' | 'leaf' | 'independent' | 'single-independent' | 'classic' | SelectStrategyFn\nexport type OpenStrategyProp = 'single' | 'multiple' | 'list' | OpenStrategy\n\nexport interface NestedProps {\n activatable: boolean\n selectable: boolean\n activeStrategy: SelectStrategy | undefined\n selectStrategy: SelectStrategy | undefined\n openStrategy: OpenStrategyProp | undefined\n activated: readonly unknown[] | undefined\n selected: readonly unknown[] | undefined\n opened: readonly unknown[] | undefined\n mandatory: boolean\n 'onUpdate:activated': EventProp<[unknown[]]> | undefined\n 'onUpdate:selected': EventProp<[unknown[]]> | undefined\n 'onUpdate:opened': EventProp<[unknown[]]> | undefined\n}\n\ntype NestedProvide = {\n id: Ref<unknown>\n isGroupActivator?: boolean\n root: {\n children: Ref<Map<unknown, unknown[]>>\n parents: Ref<Map<unknown, unknown>>\n activatable: Ref<boolean>\n selectable: Ref<boolean>\n opened: Ref<Set<unknown>>\n activated: Ref<Set<unknown>>\n selected: Ref<Map<unknown, 'on' | 'off' | 'indeterminate'>>\n selectedValues: Ref<unknown[]>\n register: (id: unknown, parentId: unknown, isGroup?: boolean) => void\n unregister: (id: unknown) => void\n open: (id: unknown, value: boolean, event?: Event) => void\n activate: (id: unknown, value: boolean, event?: Event) => void\n select: (id: unknown, value: boolean, event?: Event) => void\n openOnSelect: (id: unknown, value: boolean, event?: Event) => void\n }\n}\n\nexport const VNestedSymbol: InjectionKey<NestedProvide> = Symbol.for('vuetify:nested')\n\nexport const emptyNested: NestedProvide = {\n id: shallowRef(),\n root: {\n register: () => null,\n unregister: () => null,\n parents: ref(new Map()),\n children: ref(new Map()),\n open: () => null,\n openOnSelect: () => null,\n activate: () => null,\n select: () => null,\n activatable: ref(false),\n selectable: ref(false),\n opened: ref(new Set()),\n activated: ref(new Set()),\n selected: ref(new Map()),\n selectedValues: ref([]),\n },\n}\n\nexport const makeNestedProps = propsFactory({\n activatable: Boolean,\n selectable: Boolean,\n activeStrategy: [String, Function] as PropType<SelectStrategy>,\n selectStrategy: [String, Function] as PropType<SelectStrategy>,\n openStrategy: [String, Object] as PropType<OpenStrategyProp>,\n opened: Array as PropType<readonly unknown[]>,\n activated: Array as PropType<readonly unknown[]>,\n selected: Array as PropType<readonly unknown[]>,\n mandatory: Boolean,\n}, 'nested')\n\nexport const useNested = (props: NestedProps) => {\n let isUnmounted = false\n const children = ref(new Map<unknown, unknown[]>())\n const parents = ref(new Map<unknown, unknown>())\n\n const opened = useProxiedModel(props, 'opened', props.opened, v => new Set(v), v => [...v.values()])\n\n const activeStrategy = computed(() => {\n if (typeof props.activeStrategy === 'object') return props.activeStrategy\n\n switch (props.activeStrategy) {\n case 'leaf': return leafActiveStrategy(props.mandatory)\n case 'single-leaf': return leafSingleActiveStrategy(props.mandatory)\n case 'independent': return independentActiveStrategy(props.mandatory)\n case 'single-independent':\n default: return independentSingleActiveStrategy(props.mandatory)\n }\n })\n\n const selectStrategy = computed(() => {\n if (typeof props.selectStrategy === 'object') return props.selectStrategy\n\n switch (props.selectStrategy) {\n case 'single-leaf': return leafSingleSelectStrategy(props.mandatory)\n case 'leaf': return leafSelectStrategy(props.mandatory)\n case 'independent': return independentSelectStrategy(props.mandatory)\n case 'single-independent': return independentSingleSelectStrategy(props.mandatory)\n case 'classic':\n default: return classicSelectStrategy(props.mandatory)\n }\n })\n\n const openStrategy = computed(() => {\n if (typeof props.openStrategy === 'object') return props.openStrategy\n\n switch (props.openStrategy) {\n case 'list': return listOpenStrategy\n case 'single': return singleOpenStrategy\n case 'multiple':\n default: return multipleOpenStrategy\n }\n })\n\n const activated = useProxiedModel(\n props,\n 'activated',\n props.activated,\n v => activeStrategy.value.in(v, children.value, parents.value),\n v => activeStrategy.value.out(v, children.value, parents.value),\n )\n const selected = useProxiedModel(\n props,\n 'selected',\n props.selected,\n v => selectStrategy.value.in(v, children.value, parents.value),\n v => selectStrategy.value.out(v, children.value, parents.value),\n )\n\n onBeforeUnmount(() => {\n isUnmounted = true\n })\n\n function getPath (id: unknown) {\n const path: unknown[] = []\n let parent: unknown = id\n\n while (parent != null) {\n path.unshift(parent)\n parent = parents.value.get(parent)\n }\n\n return path\n }\n\n const vm = getCurrentInstance('nested')\n\n const nested: NestedProvide = {\n id: shallowRef(),\n root: {\n opened,\n activatable: toRef(props, 'activatable'),\n selectable: toRef(props, 'selectable'),\n activated,\n selected,\n selectedValues: computed(() => {\n const arr = []\n\n for (const [key, value] of selected.value.entries()) {\n if (value === 'on') arr.push(key)\n }\n\n return arr\n }),\n register: (id, parentId, isGroup) => {\n parentId && id !== parentId && parents.value.set(id, parentId)\n\n isGroup && children.value.set(id, [])\n\n if (parentId != null) {\n children.value.set(parentId, [...children.value.get(parentId) || [], id])\n }\n },\n unregister: id => {\n if (isUnmounted) return\n\n children.value.delete(id)\n const parent = parents.value.get(id)\n if (parent) {\n const list = children.value.get(parent) ?? []\n children.value.set(parent, list.filter(child => child !== id))\n }\n parents.value.delete(id)\n opened.value.delete(id)\n },\n open: (id, value, event) => {\n vm.emit('click:open', { id, value, path: getPath(id), event })\n\n const newOpened = openStrategy.value.open({\n id,\n value,\n opened: new Set(opened.value),\n children: children.value,\n parents: parents.value,\n event,\n })\n\n newOpened && (opened.value = newOpened)\n },\n openOnSelect: (id, value, event) => {\n const newOpened = openStrategy.value.select({\n id,\n value,\n selected: new Map(selected.value),\n opened: new Set(opened.value),\n children: children.value,\n parents: parents.value,\n event,\n })\n newOpened && (opened.value = newOpened)\n },\n select: (id, value, event) => {\n vm.emit('click:select', { id, value, path: getPath(id), event })\n\n const newSelected = selectStrategy.value.select({\n id,\n value,\n selected: new Map(selected.value),\n children: children.value,\n parents: parents.value,\n event,\n })\n newSelected && (selected.value = newSelected)\n\n nested.root.openOnSelect(id, value, event)\n },\n activate: (id, value, event) => {\n if (!props.activatable) {\n return nested.root.select(id, true, event)\n }\n\n vm.emit('click:activate', { id, value, path: getPath(id), event })\n\n const newActivated = activeStrategy.value.activate({\n id,\n value,\n activated: new Set(activated.value),\n children: children.value,\n parents: parents.value,\n event,\n })\n\n newActivated && (activated.value = newActivated)\n },\n children,\n parents,\n },\n }\n\n provide(VNestedSymbol, nested)\n\n return nested.root\n}\n\nexport const useNestedItem = (id: Ref<unknown>, isGroup: boolean) => {\n const parent = inject(VNestedSymbol, emptyNested)\n\n const uidSymbol = Symbol(getUid())\n const computedId = computed(() => id.value !== undefined ? id.value : uidSymbol)\n\n const item = {\n ...parent,\n id: computedId,\n open: (open: boolean, e: Event) => parent.root.open(computedId.value, open, e),\n openOnSelect: (open: boolean, e?: Event) => parent.root.openOnSelect(computedId.value, open, e),\n isOpen: computed(() => parent.root.opened.value.has(computedId.value)),\n parent: computed(() => parent.root.parents.value.get(computedId.value)),\n activate: (activated: boolean, e?: Event) => parent.root.activate(computedId.value, activated, e),\n isActivated: computed(() => parent.root.activated.value.has(toRaw(computedId.value))),\n select: (selected: boolean, e?: Event) => parent.root.select(computedId.value, selected, e),\n isSelected: computed(() => parent.root.selected.value.get(toRaw(computedId.value)) === 'on'),\n isIndeterminate: computed(() => parent.root.selected.value.get(computedId.value) === 'indeterminate'),\n isLeaf: computed(() => !parent.root.children.value.get(computedId.value)),\n isGroupActivator: parent.isGroupActivator,\n }\n\n !parent.isGroupActivator && parent.root.register(computedId.value, parent.id.value, isGroup)\n\n onBeforeUnmount(() => {\n !parent.isGroupActivator && parent.root.unregister(computedId.value)\n })\n\n isGroup && provide(VNestedSymbol, item)\n\n return item\n}\n\nexport const useNestedGroupActivator = () => {\n const parent = inject(VNestedSymbol, emptyNested)\n\n provide(VNestedSymbol, { ...parent, isGroupActivator: true })\n}\n"],"mappings":"AAAA;AAAA,SACSA,eAAe,+BAExB;AACA,SAASC,QAAQ,EAAEC,MAAM,EAAEC,eAAe,EAAEC,OAAO,EAAEC,GAAG,EAAEC,UAAU,EAAEC,KAAK,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAE7FC,yBAAyB,EACzBC,+BAA+B,EAAEC,kBAAkB,EACnDC,wBAAwB;AAAA,SAEjBC,gBAAgB,EAAEC,oBAAoB,EAA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E;EAAK,CAAC,CAAC;AAC/D,CAAC","ignoreList":[]}
|
1
|
+
{"version":3,"file":"nested.mjs","names":["useProxiedModel","computed","inject","onBeforeUnmount","provide","ref","shallowRef","toRaw","toRef","independentActiveStrategy","independentSingleActiveStrategy","leafActiveStrategy","leafSingleActiveStrategy","listOpenStrategy","multipleOpenStrategy","singleOpenStrategy","classicSelectStrategy","independentSelectStrategy","independentSingleSelectStrategy","leafSelectStrategy","leafSingleSelectStrategy","getCurrentInstance","getUid","propsFactory","VNestedSymbol","Symbol","for","emptyNested","id","root","register","unregister","parents","Map","children","open","openOnSelect","activate","select","activatable","selectable","opened","Set","activated","selected","selectedValues","makeNestedProps","Boolean","activeStrategy","String","Function","Object","selectStrategy","openStrategy","mandatory","useNested","props","isUnmounted","v","values","value","in","out","getPath","path","parent","unshift","get","vm","nested","arr","key","entries","push","parentId","isGroup","set","delete","list","filter","child","event","emit","newOpened","newSelected","newActivated","useNestedItem","uidSymbol","computedId","undefined","item","e","isOpen","has","isActivated","isSelected","isIndeterminate","isLeaf","isGroupActivator","useNestedGroupActivator"],"sources":["../../../src/composables/nested/nested.ts"],"sourcesContent":["// Composables\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, inject, onBeforeUnmount, provide, ref, shallowRef, toRaw, toRef } from 'vue'\nimport {\n independentActiveStrategy,\n independentSingleActiveStrategy,\n leafActiveStrategy,\n leafSingleActiveStrategy,\n} from './activeStrategies'\nimport { listOpenStrategy, multipleOpenStrategy, singleOpenStrategy } from './openStrategies'\nimport {\n classicSelectStrategy,\n independentSelectStrategy,\n independentSingleSelectStrategy,\n leafSelectStrategy,\n leafSingleSelectStrategy,\n} from './selectStrategies'\nimport { getCurrentInstance, getUid, propsFactory } from '@/util'\n\n// Types\nimport type { InjectionKey, PropType, Ref } from 'vue'\nimport type { ActiveStrategy } from './activeStrategies'\nimport type { OpenStrategy } from './openStrategies'\nimport type { SelectStrategy } from './selectStrategies'\nimport type { EventProp } from '@/util'\n\nexport type ActiveStrategyProp =\n | 'single-leaf'\n | 'leaf'\n | 'independent'\n | 'single-independent'\n | ActiveStrategy\n | ((mandatory: boolean) => ActiveStrategy)\nexport type SelectStrategyProp =\n | 'single-leaf'\n | 'leaf'\n | 'independent'\n | 'single-independent'\n | 'classic'\n | SelectStrategy\n | ((mandatory: boolean) => SelectStrategy)\nexport type OpenStrategyProp = 'single' | 'multiple' | 'list' | OpenStrategy\n\nexport interface NestedProps {\n activatable: boolean\n selectable: boolean\n activeStrategy: ActiveStrategyProp | undefined\n selectStrategy: SelectStrategyProp | undefined\n openStrategy: OpenStrategyProp | undefined\n activated: any\n selected: any\n opened: any\n mandatory: boolean\n 'onUpdate:activated': EventProp<[any]> | undefined\n 'onUpdate:selected': EventProp<[any]> | undefined\n 'onUpdate:opened': EventProp<[any]> | undefined\n}\n\ntype NestedProvide = {\n id: Ref<unknown>\n isGroupActivator?: boolean\n root: {\n children: Ref<Map<unknown, unknown[]>>\n parents: Ref<Map<unknown, unknown>>\n activatable: Ref<boolean>\n selectable: Ref<boolean>\n opened: Ref<Set<unknown>>\n activated: Ref<Set<unknown>>\n selected: Ref<Map<unknown, 'on' | 'off' | 'indeterminate'>>\n selectedValues: Ref<unknown[]>\n register: (id: unknown, parentId: unknown, isGroup?: boolean) => void\n unregister: (id: unknown) => void\n open: (id: unknown, value: boolean, event?: Event) => void\n activate: (id: unknown, value: boolean, event?: Event) => void\n select: (id: unknown, value: boolean, event?: Event) => void\n openOnSelect: (id: unknown, value: boolean, event?: Event) => void\n }\n}\n\nexport const VNestedSymbol: InjectionKey<NestedProvide> = Symbol.for('vuetify:nested')\n\nexport const emptyNested: NestedProvide = {\n id: shallowRef(),\n root: {\n register: () => null,\n unregister: () => null,\n parents: ref(new Map()),\n children: ref(new Map()),\n open: () => null,\n openOnSelect: () => null,\n activate: () => null,\n select: () => null,\n activatable: ref(false),\n selectable: ref(false),\n opened: ref(new Set()),\n activated: ref(new Set()),\n selected: ref(new Map()),\n selectedValues: ref([]),\n },\n}\n\nexport const makeNestedProps = propsFactory({\n activatable: Boolean,\n selectable: Boolean,\n activeStrategy: [String, Function, Object] as PropType<ActiveStrategyProp>,\n selectStrategy: [String, Function, Object] as PropType<SelectStrategyProp>,\n openStrategy: [String, Object] as PropType<OpenStrategyProp>,\n opened: null,\n activated: null,\n selected: null,\n mandatory: Boolean,\n}, 'nested')\n\nexport const useNested = (props: NestedProps) => {\n let isUnmounted = false\n const children = ref(new Map<unknown, unknown[]>())\n const parents = ref(new Map<unknown, unknown>())\n\n const opened = useProxiedModel(props, 'opened', props.opened, v => new Set(v), v => [...v.values()])\n\n const activeStrategy = computed(() => {\n if (typeof props.activeStrategy === 'object') return props.activeStrategy\n if (typeof props.activeStrategy === 'function') return props.activeStrategy(props.mandatory)\n\n switch (props.activeStrategy) {\n case 'leaf': return leafActiveStrategy(props.mandatory)\n case 'single-leaf': return leafSingleActiveStrategy(props.mandatory)\n case 'independent': return independentActiveStrategy(props.mandatory)\n case 'single-independent':\n default: return independentSingleActiveStrategy(props.mandatory)\n }\n })\n\n const selectStrategy = computed(() => {\n if (typeof props.selectStrategy === 'object') return props.selectStrategy\n if (typeof props.selectStrategy === 'function') return props.selectStrategy(props.mandatory)\n\n switch (props.selectStrategy) {\n case 'single-leaf': return leafSingleSelectStrategy(props.mandatory)\n case 'leaf': return leafSelectStrategy(props.mandatory)\n case 'independent': return independentSelectStrategy(props.mandatory)\n case 'single-independent': return independentSingleSelectStrategy(props.mandatory)\n case 'classic':\n default: return classicSelectStrategy(props.mandatory)\n }\n })\n\n const openStrategy = computed(() => {\n if (typeof props.openStrategy === 'object') return props.openStrategy\n\n switch (props.openStrategy) {\n case 'list': return listOpenStrategy\n case 'single': return singleOpenStrategy\n case 'multiple':\n default: return multipleOpenStrategy\n }\n })\n\n const activated = useProxiedModel(\n props,\n 'activated',\n props.activated,\n v => activeStrategy.value.in(v, children.value, parents.value),\n v => activeStrategy.value.out(v, children.value, parents.value),\n )\n const selected = useProxiedModel(\n props,\n 'selected',\n props.selected,\n v => selectStrategy.value.in(v, children.value, parents.value),\n v => selectStrategy.value.out(v, children.value, parents.value),\n )\n\n onBeforeUnmount(() => {\n isUnmounted = true\n })\n\n function getPath (id: unknown) {\n const path: unknown[] = []\n let parent: unknown = id\n\n while (parent != null) {\n path.unshift(parent)\n parent = parents.value.get(parent)\n }\n\n return path\n }\n\n const vm = getCurrentInstance('nested')\n\n const nested: NestedProvide = {\n id: shallowRef(),\n root: {\n opened,\n activatable: toRef(props, 'activatable'),\n selectable: toRef(props, 'selectable'),\n activated,\n selected,\n selectedValues: computed(() => {\n const arr = []\n\n for (const [key, value] of selected.value.entries()) {\n if (value === 'on') arr.push(key)\n }\n\n return arr\n }),\n register: (id, parentId, isGroup) => {\n parentId && id !== parentId && parents.value.set(id, parentId)\n\n isGroup && children.value.set(id, [])\n\n if (parentId != null) {\n children.value.set(parentId, [...children.value.get(parentId) || [], id])\n }\n },\n unregister: id => {\n if (isUnmounted) return\n\n children.value.delete(id)\n const parent = parents.value.get(id)\n if (parent) {\n const list = children.value.get(parent) ?? []\n children.value.set(parent, list.filter(child => child !== id))\n }\n parents.value.delete(id)\n opened.value.delete(id)\n },\n open: (id, value, event) => {\n vm.emit('click:open', { id, value, path: getPath(id), event })\n\n const newOpened = openStrategy.value.open({\n id,\n value,\n opened: new Set(opened.value),\n children: children.value,\n parents: parents.value,\n event,\n })\n\n newOpened && (opened.value = newOpened)\n },\n openOnSelect: (id, value, event) => {\n const newOpened = openStrategy.value.select({\n id,\n value,\n selected: new Map(selected.value),\n opened: new Set(opened.value),\n children: children.value,\n parents: parents.value,\n event,\n })\n newOpened && (opened.value = newOpened)\n },\n select: (id, value, event) => {\n vm.emit('click:select', { id, value, path: getPath(id), event })\n\n const newSelected = selectStrategy.value.select({\n id,\n value,\n selected: new Map(selected.value),\n children: children.value,\n parents: parents.value,\n event,\n })\n newSelected && (selected.value = newSelected)\n\n nested.root.openOnSelect(id, value, event)\n },\n activate: (id, value, event) => {\n if (!props.activatable) {\n return nested.root.select(id, true, event)\n }\n\n vm.emit('click:activate', { id, value, path: getPath(id), event })\n\n const newActivated = activeStrategy.value.activate({\n id,\n value,\n activated: new Set(activated.value),\n children: children.value,\n parents: parents.value,\n event,\n })\n\n newActivated && (activated.value = newActivated)\n },\n children,\n parents,\n },\n }\n\n provide(VNestedSymbol, nested)\n\n return nested.root\n}\n\nexport const useNestedItem = (id: Ref<unknown>, isGroup: boolean) => {\n const parent = inject(VNestedSymbol, emptyNested)\n\n const uidSymbol = Symbol(getUid())\n const computedId = computed(() => id.value !== undefined ? id.value : uidSymbol)\n\n const item = {\n ...parent,\n id: computedId,\n open: (open: boolean, e: Event) => parent.root.open(computedId.value, open, e),\n openOnSelect: (open: boolean, e?: Event) => parent.root.openOnSelect(computedId.value, open, e),\n isOpen: computed(() => parent.root.opened.value.has(computedId.value)),\n parent: computed(() => parent.root.parents.value.get(computedId.value)),\n activate: (activated: boolean, e?: Event) => parent.root.activate(computedId.value, activated, e),\n isActivated: computed(() => parent.root.activated.value.has(toRaw(computedId.value))),\n select: (selected: boolean, e?: Event) => parent.root.select(computedId.value, selected, e),\n isSelected: computed(() => parent.root.selected.value.get(toRaw(computedId.value)) === 'on'),\n isIndeterminate: computed(() => parent.root.selected.value.get(computedId.value) === 'indeterminate'),\n isLeaf: computed(() => !parent.root.children.value.get(computedId.value)),\n isGroupActivator: parent.isGroupActivator,\n }\n\n !parent.isGroupActivator && parent.root.register(computedId.value, parent.id.value, isGroup)\n\n onBeforeUnmount(() => {\n !parent.isGroupActivator && parent.root.unregister(computedId.value)\n })\n\n isGroup && provide(VNestedSymbol, item)\n\n return item\n}\n\nexport const useNestedGroupActivator = () => {\n const parent = inject(VNestedSymbol, emptyNested)\n\n provide(VNestedSymbol, { ...parent, isGroupActivator: true })\n}\n"],"mappings":"AAAA;AAAA,SACSA,eAAe,+BAExB;AACA,SAASC,QAAQ,EAAEC,MAAM,EAAEC,eAAe,EAAEC,OAAO,EAAE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AC,MAAM;IACpB,CAAC8D,MAAM,CAACiC,gBAAgB,IAAIjC,MAAM,CAACpC,IAAI,CAACE,UAAU,CAACyD,UAAU,CAAC5B,KAAK,CAAC;EACtE,CAAC,CAAC;EAEFe,OAAO,IAAIvE,OAAO,CAACoB,aAAa,EAAEkE,IAAI,CAAC;EAEvC,OAAOA,IAAI;AACb,CAAC;AAED,OAAO,MAAMS,uBAAuB,GAAGA,CAAA,KAAM;EAC3C,MAAMlC,MAAM,GAAG/D,MAAM,CAACsB,aAAa,EAAEG,WAAW,CAAC;EAEjDvB,OAAO,CAACoB,aAAa,EAAE;IAAE,GAAGyC,MAAM;IAAEiC,gBAAgB,EAAE;EAAK,CAAC,CAAC;AAC/D,CAAC","ignoreList":[]}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
// Utilities
|
2
2
|
import { onBeforeUnmount, readonly, ref, watch } from 'vue';
|
3
|
-
import {
|
3
|
+
import { templateRef } from "../util/index.mjs";
|
4
4
|
import { IN_BROWSER } from "../util/globals.mjs"; // Types
|
5
5
|
export function useResizeObserver(callback) {
|
6
6
|
let box = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'content';
|
7
|
-
const resizeRef =
|
7
|
+
const resizeRef = templateRef();
|
8
8
|
const contentRect = ref();
|
9
9
|
if (IN_BROWSER) {
|
10
10
|
const observer = new ResizeObserver(entries => {
|
@@ -19,12 +19,12 @@ export function useResizeObserver(callback) {
|
|
19
19
|
onBeforeUnmount(() => {
|
20
20
|
observer.disconnect();
|
21
21
|
});
|
22
|
-
watch(resizeRef, (newValue, oldValue) => {
|
22
|
+
watch(() => resizeRef.el, (newValue, oldValue) => {
|
23
23
|
if (oldValue) {
|
24
|
-
observer.unobserve(
|
24
|
+
observer.unobserve(oldValue);
|
25
25
|
contentRect.value = undefined;
|
26
26
|
}
|
27
|
-
if (newValue) observer.observe(
|
27
|
+
if (newValue) observer.observe(newValue);
|
28
28
|
}, {
|
29
29
|
flush: 'post'
|
30
30
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"resizeObserver.mjs","names":["onBeforeUnmount","readonly","ref","watch","
|
1
|
+
{"version":3,"file":"resizeObserver.mjs","names":["onBeforeUnmount","readonly","ref","watch","templateRef","IN_BROWSER","useResizeObserver","callback","box","arguments","length","undefined","resizeRef","contentRect","observer","ResizeObserver","entries","value","target","getBoundingClientRect","disconnect","el","newValue","oldValue","unobserve","observe","flush"],"sources":["../../src/composables/resizeObserver.ts"],"sourcesContent":["// Utilities\nimport { onBeforeUnmount, readonly, ref, watch } from 'vue'\nimport { templateRef } from '@/util'\nimport { IN_BROWSER } from '@/util/globals'\n\n// Types\nimport type { DeepReadonly, Ref } from 'vue'\nimport type { TemplateRef } from '@/util'\n\ninterface ResizeState {\n resizeRef: TemplateRef\n contentRect: DeepReadonly<Ref<DOMRectReadOnly | undefined>>\n}\n\nexport function useResizeObserver (callback?: ResizeObserverCallback, box: 'content' | 'border' = 'content'): ResizeState {\n const resizeRef = templateRef()\n const contentRect = ref<DOMRectReadOnly>()\n\n if (IN_BROWSER) {\n const observer = new ResizeObserver((entries: ResizeObserverEntry[]) => {\n callback?.(entries, observer)\n\n if (!entries.length) return\n\n if (box === 'content') {\n contentRect.value = entries[0].contentRect\n } else {\n contentRect.value = entries[0].target.getBoundingClientRect()\n }\n })\n\n onBeforeUnmount(() => {\n observer.disconnect()\n })\n\n watch(() => resizeRef.el, (newValue, oldValue) => {\n if (oldValue) {\n observer.unobserve(oldValue)\n contentRect.value = undefined\n }\n\n if (newValue) observer.observe(newValue)\n }, {\n flush: 'post',\n })\n }\n\n return {\n resizeRef,\n contentRect: readonly(contentRect),\n }\n}\n"],"mappings":"AAAA;AACA,SAASA,eAAe,EAAEC,QAAQ,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAClDC,WAAW;AAAA,SACXC,UAAU,+BAEnB;AASA,OAAO,SAASC,iBAAiBA,CAAEC,QAAiC,EAAsD;EAAA,IAApDC,GAAyB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,SAAS;EACzG,MAAMG,SAAS,GAAGR,WAAW,CAAC,CAAC;EAC/B,MAAMS,WAAW,GAAGX,GAAG,CAAkB,CAAC;EAE1C,IAAIG,UAAU,EAAE;IACd,MAAMS,QAAQ,GAAG,IAAIC,cAAc,CAAEC,OAA8B,IAAK;MACtET,QAAQ,GAAGS,OAAO,EAAEF,QAAQ,CAAC;MAE7B,IAAI,CAACE,OAAO,CAACN,MAAM,EAAE;MAErB,IAAIF,GAAG,KAAK,SAAS,EAAE;QACrBK,WAAW,CAACI,KAAK,GAAGD,OAAO,CAAC,CAAC,CAAC,CAACH,WAAW;MAC5C,CAAC,MAAM;QACLA,WAAW,CAACI,KAAK,GAAGD,OAAO,CAAC,CAAC,CAAC,CAACE,MAAM,CAACC,qBAAqB,CAAC,CAAC;MAC/D;IACF,CAAC,CAAC;IAEFnB,eAAe,CAAC,MAAM;MACpBc,QAAQ,CAACM,UAAU,CAAC,CAAC;IACvB,CAAC,CAAC;IAEFjB,KAAK,CAAC,MAAMS,SAAS,CAACS,EAAE,EAAE,CAACC,QAAQ,EAAEC,QAAQ,KAAK;MAChD,IAAIA,QAAQ,EAAE;QACZT,QAAQ,CAACU,SAAS,CAACD,QAAQ,CAAC;QAC5BV,WAAW,CAACI,KAAK,GAAGN,SAAS;MAC/B;MAEA,IAAIW,QAAQ,EAAER,QAAQ,CAACW,OAAO,CAACH,QAAQ,CAAC;IAC1C,CAAC,EAAE;MACDI,KAAK,EAAE;IACT,CAAC,CAAC;EACJ;EAEA,OAAO;IACLd,SAAS;IACTC,WAAW,EAAEZ,QAAQ,CAACY,WAAW;EACnC,CAAC;AACH","ignoreList":[]}
|
package/lib/entry-bundler.mjs
CHANGED
@@ -16,7 +16,7 @@ export const createVuetify = function () {
|
|
16
16
|
...options
|
17
17
|
});
|
18
18
|
};
|
19
|
-
export const version = "3.6.
|
19
|
+
export const version = "3.6.4-master.2024-05-09";
|
20
20
|
createVuetify.version = version;
|
21
21
|
export { blueprints, components, directives };
|
22
22
|
export * from "./composables/index.mjs";
|
package/lib/framework.mjs
CHANGED
package/lib/index.d.mts
CHANGED
@@ -494,40 +494,40 @@ declare module '@vue/runtime-core' {
|
|
494
494
|
|
495
495
|
export interface GlobalComponents {
|
496
496
|
VApp: typeof import('vuetify/components')['VApp']
|
497
|
-
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
498
|
-
VBadge: typeof import('vuetify/components')['VBadge']
|
499
|
-
VAvatar: typeof import('vuetify/components')['VAvatar']
|
500
497
|
VAppBar: typeof import('vuetify/components')['VAppBar']
|
501
498
|
VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
|
502
499
|
VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
|
503
500
|
VAlert: typeof import('vuetify/components')['VAlert']
|
504
501
|
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
502
|
+
VAvatar: typeof import('vuetify/components')['VAvatar']
|
503
|
+
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
505
504
|
VBanner: typeof import('vuetify/components')['VBanner']
|
506
505
|
VBannerActions: typeof import('vuetify/components')['VBannerActions']
|
507
506
|
VBannerText: typeof import('vuetify/components')['VBannerText']
|
508
507
|
VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
|
509
508
|
VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
|
510
|
-
|
511
|
-
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
509
|
+
VBadge: typeof import('vuetify/components')['VBadge']
|
512
510
|
VBreadcrumbs: typeof import('vuetify/components')['VBreadcrumbs']
|
513
511
|
VBreadcrumbsItem: typeof import('vuetify/components')['VBreadcrumbsItem']
|
514
512
|
VBreadcrumbsDivider: typeof import('vuetify/components')['VBreadcrumbsDivider']
|
515
513
|
VBtn: typeof import('vuetify/components')['VBtn']
|
516
|
-
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
517
|
-
VChip: typeof import('vuetify/components')['VChip']
|
518
|
-
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
519
|
-
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
520
514
|
VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
|
515
|
+
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
521
516
|
VCard: typeof import('vuetify/components')['VCard']
|
522
517
|
VCardActions: typeof import('vuetify/components')['VCardActions']
|
523
518
|
VCardItem: typeof import('vuetify/components')['VCardItem']
|
524
519
|
VCardSubtitle: typeof import('vuetify/components')['VCardSubtitle']
|
525
520
|
VCardText: typeof import('vuetify/components')['VCardText']
|
526
521
|
VCardTitle: typeof import('vuetify/components')['VCardTitle']
|
522
|
+
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
523
|
+
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
524
|
+
VCarousel: typeof import('vuetify/components')['VCarousel']
|
525
|
+
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
527
526
|
VCode: typeof import('vuetify/components')['VCode']
|
528
|
-
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
529
527
|
VColorPicker: typeof import('vuetify/components')['VColorPicker']
|
528
|
+
VChip: typeof import('vuetify/components')['VChip']
|
530
529
|
VCombobox: typeof import('vuetify/components')['VCombobox']
|
530
|
+
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
531
531
|
VCounter: typeof import('vuetify/components')['VCounter']
|
532
532
|
VDataTable: typeof import('vuetify/components')['VDataTable']
|
533
533
|
VDataTableHeaders: typeof import('vuetify/components')['VDataTableHeaders']
|
@@ -544,27 +544,28 @@ declare module '@vue/runtime-core' {
|
|
544
544
|
VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
|
545
545
|
VDialog: typeof import('vuetify/components')['VDialog']
|
546
546
|
VDivider: typeof import('vuetify/components')['VDivider']
|
547
|
-
|
547
|
+
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
548
548
|
VExpansionPanels: typeof import('vuetify/components')['VExpansionPanels']
|
549
549
|
VExpansionPanel: typeof import('vuetify/components')['VExpansionPanel']
|
550
550
|
VExpansionPanelText: typeof import('vuetify/components')['VExpansionPanelText']
|
551
551
|
VExpansionPanelTitle: typeof import('vuetify/components')['VExpansionPanelTitle']
|
552
|
-
|
552
|
+
VFab: typeof import('vuetify/components')['VFab']
|
553
|
+
VFileInput: typeof import('vuetify/components')['VFileInput']
|
553
554
|
VField: typeof import('vuetify/components')['VField']
|
554
555
|
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
555
556
|
VFooter: typeof import('vuetify/components')['VFooter']
|
556
|
-
VFileInput: typeof import('vuetify/components')['VFileInput']
|
557
|
-
VInput: typeof import('vuetify/components')['VInput']
|
558
557
|
VIcon: typeof import('vuetify/components')['VIcon']
|
559
558
|
VComponentIcon: typeof import('vuetify/components')['VComponentIcon']
|
560
559
|
VSvgIcon: typeof import('vuetify/components')['VSvgIcon']
|
561
560
|
VLigatureIcon: typeof import('vuetify/components')['VLigatureIcon']
|
562
561
|
VClassIcon: typeof import('vuetify/components')['VClassIcon']
|
563
|
-
|
562
|
+
VInput: typeof import('vuetify/components')['VInput']
|
564
563
|
VImg: typeof import('vuetify/components')['VImg']
|
564
|
+
VLabel: typeof import('vuetify/components')['VLabel']
|
565
|
+
VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
|
566
|
+
VKbd: typeof import('vuetify/components')['VKbd']
|
565
567
|
VItemGroup: typeof import('vuetify/components')['VItemGroup']
|
566
568
|
VItem: typeof import('vuetify/components')['VItem']
|
567
|
-
VKbd: typeof import('vuetify/components')['VKbd']
|
568
569
|
VList: typeof import('vuetify/components')['VList']
|
569
570
|
VListGroup: typeof import('vuetify/components')['VListGroup']
|
570
571
|
VListImg: typeof import('vuetify/components')['VListImg']
|
@@ -574,50 +575,49 @@ declare module '@vue/runtime-core' {
|
|
574
575
|
VListItemSubtitle: typeof import('vuetify/components')['VListItemSubtitle']
|
575
576
|
VListItemTitle: typeof import('vuetify/components')['VListItemTitle']
|
576
577
|
VListSubheader: typeof import('vuetify/components')['VListSubheader']
|
577
|
-
VLabel: typeof import('vuetify/components')['VLabel']
|
578
|
-
VMessages: typeof import('vuetify/components')['VMessages']
|
579
578
|
VMenu: typeof import('vuetify/components')['VMenu']
|
579
|
+
VMessages: typeof import('vuetify/components')['VMessages']
|
580
580
|
VMain: typeof import('vuetify/components')['VMain']
|
581
|
+
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
581
582
|
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
582
583
|
VPagination: typeof import('vuetify/components')['VPagination']
|
583
|
-
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
584
|
-
VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
|
585
|
-
VRating: typeof import('vuetify/components')['VRating']
|
586
584
|
VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
|
587
|
-
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
588
585
|
VOverlay: typeof import('vuetify/components')['VOverlay']
|
586
|
+
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
587
|
+
VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
|
588
|
+
VRating: typeof import('vuetify/components')['VRating']
|
589
589
|
VSelect: typeof import('vuetify/components')['VSelect']
|
590
|
-
|
590
|
+
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
591
591
|
VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
|
592
|
-
|
593
|
-
VSlider: typeof import('vuetify/components')['VSlider']
|
592
|
+
VSheet: typeof import('vuetify/components')['VSheet']
|
594
593
|
VSlideGroup: typeof import('vuetify/components')['VSlideGroup']
|
595
594
|
VSlideGroupItem: typeof import('vuetify/components')['VSlideGroupItem']
|
596
|
-
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
597
|
-
VSwitch: typeof import('vuetify/components')['VSwitch']
|
598
|
-
VSnackbar: typeof import('vuetify/components')['VSnackbar']
|
599
|
-
VTextField: typeof import('vuetify/components')['VTextField']
|
600
595
|
VStepper: typeof import('vuetify/components')['VStepper']
|
601
596
|
VStepperActions: typeof import('vuetify/components')['VStepperActions']
|
602
597
|
VStepperHeader: typeof import('vuetify/components')['VStepperHeader']
|
603
598
|
VStepperItem: typeof import('vuetify/components')['VStepperItem']
|
604
599
|
VStepperWindow: typeof import('vuetify/components')['VStepperWindow']
|
605
600
|
VStepperWindowItem: typeof import('vuetify/components')['VStepperWindowItem']
|
606
|
-
|
601
|
+
VSnackbar: typeof import('vuetify/components')['VSnackbar']
|
602
|
+
VSlider: typeof import('vuetify/components')['VSlider']
|
603
|
+
VSwitch: typeof import('vuetify/components')['VSwitch']
|
604
|
+
VSystemBar: typeof import('vuetify/components')['VSystemBar']
|
607
605
|
VTab: typeof import('vuetify/components')['VTab']
|
608
606
|
VTabs: typeof import('vuetify/components')['VTabs']
|
609
607
|
VTabsWindow: typeof import('vuetify/components')['VTabsWindow']
|
610
608
|
VTabsWindowItem: typeof import('vuetify/components')['VTabsWindowItem']
|
611
|
-
|
612
|
-
VToolbar: typeof import('vuetify/components')['VToolbar']
|
613
|
-
VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
|
614
|
-
VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
|
609
|
+
VTable: typeof import('vuetify/components')['VTable']
|
615
610
|
VTextarea: typeof import('vuetify/components')['VTextarea']
|
616
611
|
VTimeline: typeof import('vuetify/components')['VTimeline']
|
617
612
|
VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
|
613
|
+
VTextField: typeof import('vuetify/components')['VTextField']
|
614
|
+
VToolbar: typeof import('vuetify/components')['VToolbar']
|
615
|
+
VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
|
616
|
+
VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
|
617
|
+
VSelectionControl: typeof import('vuetify/components')['VSelectionControl']
|
618
|
+
VTooltip: typeof import('vuetify/components')['VTooltip']
|
618
619
|
VWindow: typeof import('vuetify/components')['VWindow']
|
619
620
|
VWindowItem: typeof import('vuetify/components')['VWindowItem']
|
620
|
-
VTooltip: typeof import('vuetify/components')['VTooltip']
|
621
621
|
VConfirmEdit: typeof import('vuetify/components')['VConfirmEdit']
|
622
622
|
VDataIterator: typeof import('vuetify/components')['VDataIterator']
|
623
623
|
VDefaultsProvider: typeof import('vuetify/components')['VDefaultsProvider']
|
@@ -627,10 +627,10 @@ declare module '@vue/runtime-core' {
|
|
627
627
|
VRow: typeof import('vuetify/components')['VRow']
|
628
628
|
VSpacer: typeof import('vuetify/components')['VSpacer']
|
629
629
|
VHover: typeof import('vuetify/components')['VHover']
|
630
|
+
VLocaleProvider: typeof import('vuetify/components')['VLocaleProvider']
|
630
631
|
VLayout: typeof import('vuetify/components')['VLayout']
|
631
632
|
VLayoutItem: typeof import('vuetify/components')['VLayoutItem']
|
632
633
|
VLazy: typeof import('vuetify/components')['VLazy']
|
633
|
-
VLocaleProvider: typeof import('vuetify/components')['VLocaleProvider']
|
634
634
|
VNoSsr: typeof import('vuetify/components')['VNoSsr']
|
635
635
|
VParallax: typeof import('vuetify/components')['VParallax']
|
636
636
|
VRadio: typeof import('vuetify/components')['VRadio']
|
@@ -638,8 +638,8 @@ declare module '@vue/runtime-core' {
|
|
638
638
|
VResponsive: typeof import('vuetify/components')['VResponsive']
|
639
639
|
VSparkline: typeof import('vuetify/components')['VSparkline']
|
640
640
|
VSpeedDial: typeof import('vuetify/components')['VSpeedDial']
|
641
|
-
VThemeProvider: typeof import('vuetify/components')['VThemeProvider']
|
642
641
|
VVirtualScroll: typeof import('vuetify/components')['VVirtualScroll']
|
642
|
+
VThemeProvider: typeof import('vuetify/components')['VThemeProvider']
|
643
643
|
VValidation: typeof import('vuetify/components')['VValidation']
|
644
644
|
VFabTransition: typeof import('vuetify/components')['VFabTransition']
|
645
645
|
VDialogBottomTransition: typeof import('vuetify/components')['VDialogBottomTransition']
|
@@ -663,17 +663,17 @@ declare module '@vue/runtime-core' {
|
|
663
663
|
VCalendarInterval: typeof import('vuetify/labs/components')['VCalendarInterval']
|
664
664
|
VCalendarIntervalEvent: typeof import('vuetify/labs/components')['VCalendarIntervalEvent']
|
665
665
|
VCalendarMonthDay: typeof import('vuetify/labs/components')['VCalendarMonthDay']
|
666
|
-
VNumberInput: typeof import('vuetify/labs/components')['VNumberInput']
|
667
666
|
VPicker: typeof import('vuetify/labs/components')['VPicker']
|
668
667
|
VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
|
668
|
+
VNumberInput: typeof import('vuetify/labs/components')['VNumberInput']
|
669
669
|
VTreeview: typeof import('vuetify/labs/components')['VTreeview']
|
670
670
|
VTreeviewItem: typeof import('vuetify/labs/components')['VTreeviewItem']
|
671
671
|
VTreeviewGroup: typeof import('vuetify/labs/components')['VTreeviewGroup']
|
672
672
|
VTimePicker: typeof import('vuetify/labs/components')['VTimePicker']
|
673
673
|
VTimePickerClock: typeof import('vuetify/labs/components')['VTimePickerClock']
|
674
674
|
VTimePickerControls: typeof import('vuetify/labs/components')['VTimePickerControls']
|
675
|
+
VSnackbarQueue: typeof import('vuetify/labs/components')['VSnackbarQueue']
|
675
676
|
VDateInput: typeof import('vuetify/labs/components')['VDateInput']
|
676
677
|
VPullToRefresh: typeof import('vuetify/labs/components')['VPullToRefresh']
|
677
|
-
VSnackbarQueue: typeof import('vuetify/labs/components')['VSnackbarQueue']
|
678
678
|
}
|
679
679
|
}
|
@@ -1,10 +1,14 @@
|
|
1
|
+
.v-calendar {
|
2
|
+
background: rgb(var(--v-theme-background));
|
3
|
+
color: rgba(var(--v-theme-on-background), var(--v-high-emphasis-opacity));
|
4
|
+
}
|
5
|
+
|
1
6
|
.v-calendar-weekly {
|
2
7
|
width: 100%;
|
3
8
|
height: 100%;
|
4
9
|
display: flex;
|
5
10
|
flex-direction: column;
|
6
11
|
min-height: 0;
|
7
|
-
background-color: #fff;
|
8
12
|
}
|
9
13
|
|
10
14
|
.v-calendar__container {
|
@@ -2,6 +2,9 @@
|
|
2
2
|
@use './variables' as *
|
3
3
|
|
4
4
|
@include tools.layer('components')
|
5
|
+
.v-calendar
|
6
|
+
@include tools.theme($calendar-theme...)
|
7
|
+
|
5
8
|
.v-calendar-weekly
|
6
9
|
width: 100%
|
7
10
|
height: 100%
|
@@ -9,8 +12,6 @@
|
|
9
12
|
flex-direction: column
|
10
13
|
// https://github.com/vuetifyjs/vuetify/issues/8319
|
11
14
|
min-height: 0
|
12
|
-
// Themed
|
13
|
-
background-color: #fff
|
14
15
|
|
15
16
|
.v-calendar__container
|
16
17
|
border-top: $calendar-line-width solid $calendar-line-color
|
@@ -1,3 +1,6 @@
|
|
1
|
+
$calendar-color: rgba(var(--v-theme-on-background), var(--v-high-emphasis-opacity)) !default;
|
2
|
+
$calendar-background: rgb(var(--v-theme-background)) !default;
|
3
|
+
|
1
4
|
$calendar-line-width: thin !default;
|
2
5
|
$calendar-line-color: #e0e0e0 !default;
|
3
6
|
|
@@ -45,3 +48,8 @@ $calendar-event-border-width: 1px !default;
|
|
45
48
|
$calendar-event-font-size: 12px !default;
|
46
49
|
$calendar-event-line-height: 20px !default;
|
47
50
|
$calendar-event-right-empty: 10px !default;
|
51
|
+
|
52
|
+
$calendar-theme: (
|
53
|
+
$calendar-background,
|
54
|
+
$calendar-color
|
55
|
+
) !default;
|