init component

This commit is contained in:
Robin COuret
2026-02-16 17:28:37 +01:00
parent 460c7a25e0
commit e0e50af706
4557 changed files with 666911 additions and 8 deletions

1
node_modules/buetify/lib/composables/disable/index.d.ts generated vendored Executable file
View File

@@ -0,0 +1 @@
export * from './useDisable';

2
node_modules/buetify/lib/composables/disable/index.js generated vendored Executable file
View File

@@ -0,0 +1,2 @@
export * from './useDisable';
//# sourceMappingURL=index.js.map

1
node_modules/buetify/lib/composables/disable/index.js.map generated vendored Executable file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/disable/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAd","sourcesContent":["export * from './useDisable';\n"],"sourceRoot":"","file":"index.js"}

20
node_modules/buetify/lib/composables/disable/useDisable.d.ts generated vendored Executable file
View File

@@ -0,0 +1,20 @@
import { Ref, PropType, ExtractPropTypes } from 'vue';
export declare const UseDisablePropsDefinition: {
isDisabled: {
type: PropType<boolean>;
required: boolean;
default: boolean;
};
isReadonly: {
type: PropType<boolean>;
required: boolean;
default: boolean;
};
disableIfReadonly: {
type: PropType<boolean>;
required: boolean;
default: boolean;
};
};
export declare type UseDisableProps = ExtractPropTypes<typeof UseDisablePropsDefinition>;
export declare function useDisable(props: UseDisableProps): Ref<boolean>;

22
node_modules/buetify/lib/composables/disable/useDisable.js generated vendored Executable file
View File

@@ -0,0 +1,22 @@
import { computed } from 'vue';
export const UseDisablePropsDefinition = {
isDisabled: {
type: Boolean,
required: false,
default: false
},
isReadonly: {
type: Boolean,
required: false,
default: false
},
disableIfReadonly: {
type: Boolean,
required: false,
default: false
}
};
export function useDisable(props) {
return computed(() => props.isDisabled || props.isReadonly && props.disableIfReadonly);
}
//# sourceMappingURL=useDisable.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/disable/useDisable.ts"],"names":[],"mappings":"AAAA,SAAc,QAAd,QAA0D,KAA1D;AAEA,OAAO,MAAM,yBAAyB,GAAG;AACvC,EAAA,UAAU,EAAE;AACV,IAAA,IAAI,EAAE,OADI;AAEV,IAAA,QAAQ,EAAE,KAFA;AAGV,IAAA,OAAO,EAAE;AAHC,GAD2B;AAMvC,EAAA,UAAU,EAAE;AACV,IAAA,IAAI,EAAE,OADI;AAEV,IAAA,QAAQ,EAAE,KAFA;AAGV,IAAA,OAAO,EAAE;AAHC,GAN2B;AAWvC,EAAA,iBAAiB,EAAE;AACjB,IAAA,IAAI,EAAE,OADW;AAEjB,IAAA,QAAQ,EAAE,KAFO;AAGjB,IAAA,OAAO,EAAE;AAHQ;AAXoB,CAAlC;AAoBP,OAAM,SAAU,UAAV,CAAqB,KAArB,EAA2C;AAC/C,SAAO,QAAQ,CAAC,MAAM,KAAK,CAAC,UAAN,IAAqB,KAAK,CAAC,UAAN,IAAoB,KAAK,CAAC,iBAAtD,CAAf;AACD","sourcesContent":["import { Ref, computed, PropType, ExtractPropTypes } from 'vue';\n\nexport const UseDisablePropsDefinition = {\n isDisabled: {\n type: Boolean as PropType<boolean>,\n required: false,\n default: false\n },\n isReadonly: {\n type: Boolean as PropType<boolean>,\n required: false,\n default: false\n },\n disableIfReadonly: {\n type: Boolean as PropType<boolean>,\n required: false,\n default: false\n }\n};\n\nexport type UseDisableProps = ExtractPropTypes<typeof UseDisablePropsDefinition>;\n\nexport function useDisable(props: UseDisableProps): Ref<boolean> {\n return computed(() => props.isDisabled || (props.isReadonly && props.disableIfReadonly));\n}\n"],"sourceRoot":"","file":"useDisable.js"}

3
node_modules/buetify/lib/composables/eqRef/index.d.ts generated vendored Executable file
View File

@@ -0,0 +1,3 @@
import { Eq } from 'fp-ts/lib/Eq';
import { Ref } from 'vue';
export declare function useEqRef<A>(eq: Eq<A>): (v: A) => Ref<A>;

21
node_modules/buetify/lib/composables/eqRef/index.js generated vendored Executable file
View File

@@ -0,0 +1,21 @@
import { customRef } from 'vue';
export function useEqRef(eq) {
return v => customRef((track, trigger) => {
let value = v;
return {
get() {
track();
return value;
},
set(newValue) {
if (!eq.equals(newValue, value)) {
value = newValue;
trigger();
}
}
};
});
}
//# sourceMappingURL=index.js.map

1
node_modules/buetify/lib/composables/eqRef/index.js.map generated vendored Executable file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/eqRef/index.ts"],"names":[],"mappings":"AACA,SAAc,SAAd,QAA+B,KAA/B;AAEA,OAAM,SAAU,QAAV,CAAsB,EAAtB,EAA+B;AACnC,SAAQ,CAAD,IACL,SAAS,CAAC,CAAC,KAAD,EAAQ,OAAR,KAAmB;AAC3B,QAAI,KAAK,GAAG,CAAZ;AACA,WAAO;AACL,MAAA,GAAG,GAAA;AACD,QAAA,KAAK;AACL,eAAO,KAAP;AACD,OAJI;;AAKL,MAAA,GAAG,CAAC,QAAD,EAAY;AACb,YAAI,CAAC,EAAE,CAAC,MAAH,CAAU,QAAV,EAAoB,KAApB,CAAL,EAAiC;AAC/B,UAAA,KAAK,GAAG,QAAR;AACA,UAAA,OAAO;AACR;AACF;;AAVI,KAAP;AAYD,GAdQ,CADX;AAgBD","sourcesContent":["import { Eq } from 'fp-ts/lib/Eq';\r\nimport { Ref, customRef } from 'vue';\r\n\r\nexport function useEqRef<A>(eq: Eq<A>) {\r\n return (v: A): Ref<A> =>\r\n customRef((track, trigger) => {\r\n let value = v;\r\n return {\r\n get(): A {\r\n track();\r\n return value;\r\n },\r\n set(newValue: A) {\r\n if (!eq.equals(newValue, value)) {\r\n value = newValue;\r\n trigger();\r\n }\r\n }\r\n };\r\n });\r\n}\r\n"],"sourceRoot":"","file":"index.js"}

2
node_modules/buetify/lib/composables/fieldData/index.d.ts generated vendored Executable file
View File

@@ -0,0 +1,2 @@
export * from './provideFieldData';
export * from './useFieldData';

3
node_modules/buetify/lib/composables/fieldData/index.js generated vendored Executable file
View File

@@ -0,0 +1,3 @@
export * from './provideFieldData';
export * from './useFieldData';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/fieldData/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAd;AACA,cAAc,gBAAd","sourcesContent":["export * from './provideFieldData';\nexport * from './useFieldData';\n"],"sourceRoot":"","file":"index.js"}

View File

@@ -0,0 +1,56 @@
import { FunctionN } from 'fp-ts/lib/function';
import { PropType, ExtractPropTypes, Ref } from 'vue';
import { AllColorsVariant } from '../../types/ColorVariants';
export declare const PROVIDE_FIELD_DATA_INJECTION_SYMBOL: unique symbol;
export declare const ProvideFieldDataPropsDefinition: {
variant: {
type: PropType<AllColorsVariant>;
required: boolean;
};
message: {
type: PropType<string | {
[K: string]: boolean;
} | (string | {
[K: string]: boolean;
})[]>;
required: boolean;
};
isExpanded: {
type: PropType<boolean>;
default: boolean;
};
labelFor: PropType<string>;
label: {
type: PropType<string>;
default: string;
};
};
export declare type ProvideFieldDataProps = ExtractPropTypes<typeof ProvideFieldDataPropsDefinition>;
export declare function formatMessage(message: string | {
[K: string]: boolean;
} | Array<string | {
[K: string]: boolean;
}> | undefined): string;
export interface FieldDataAttrs {
label: Ref<string>;
isFullwidth: Ref<boolean>;
isExpanded: Ref<boolean>;
message: Ref<string>;
messageVariant: Ref<undefined | AllColorsVariant>;
id: Ref<string | undefined>;
labelId: Ref<string | undefined>;
}
export interface FieldDataListeners {
onNewMessage: FunctionN<[string | {
[K: string]: boolean;
} | Array<string | {
[K: string]: boolean;
}>], void>;
onNewVariant: FunctionN<[AllColorsVariant], void>;
}
export interface FieldDataInjection {
attrs: FieldDataAttrs;
setters: FieldDataListeners;
}
export declare const DEFAULT_FIELD_DATA_INJECTION: FieldDataInjection;
export declare function provideFieldData(props: ProvideFieldDataProps): FieldDataInjection;

View File

@@ -0,0 +1,100 @@
import { constVoid, not } from 'fp-ts/lib/function';
import { provide, shallowRef, computed, watch, toRef } from 'vue';
import { isEmptyString, isString } from '../../utils/helpers';
import { useLabelId, UseLabelIdPropsDefinition } from '../labelId';
export const PROVIDE_FIELD_DATA_INJECTION_SYMBOL = Symbol('use-field-data');
export const ProvideFieldDataPropsDefinition = { ...UseLabelIdPropsDefinition,
variant: {
type: [String, Object],
required: false
},
message: {
type: [String, Array, Object],
required: false
},
isExpanded: {
type: Boolean,
default: false
}
};
export function formatMessage(message) {
if (isString(message)) {
return message;
} else {
const messages = [];
if (Array.isArray(message)) {
message.forEach(m => {
if (isString(m)) {
messages.push(m);
} else {
for (const key in m) {
if (m[key]) {
messages.push(key);
}
}
}
});
} else {
for (const key in message) {
if (message[key]) {
messages.push(key);
}
}
}
return messages.filter(not(isEmptyString)).join(' <br> ');
}
}
export const DEFAULT_FIELD_DATA_INJECTION = {
attrs: {
label: shallowRef(''),
isFullwidth: shallowRef(false),
isExpanded: shallowRef(false),
message: shallowRef(''),
messageVariant: shallowRef(),
id: shallowRef(),
labelId: shallowRef()
},
setters: {
onNewMessage: constVoid,
onNewVariant: constVoid
}
};
export function provideFieldData(props) {
const label = useLabelId(props, 'field');
const variant = shallowRef(props.variant);
watch(toRef(props, 'variant'), newVariant => {
variant.value = newVariant;
});
const message = shallowRef(props.message);
watch(toRef(props, 'message'), newMessage => {
message.value = newMessage;
});
const formattedMessage = computed(() => formatMessage(message.value));
const isExpanded = toRef(props, 'isExpanded');
const attrs = {
label: toRef(props, 'label'),
isFullwidth: isExpanded,
isExpanded: isExpanded,
message: formattedMessage,
messageVariant: variant,
id: label.id,
labelId: label.labelId
};
const setters = {
onNewMessage: newMessage => {
message.value = newMessage;
},
onNewVariant: newVariant => {
variant.value = newVariant;
}
};
const injection = {
attrs,
setters
};
provide(PROVIDE_FIELD_DATA_INJECTION_SYMBOL, injection);
return injection;
}
//# sourceMappingURL=provideFieldData.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
export declare function useFieldData(): import("./provideFieldData").FieldDataInjection;

View File

@@ -0,0 +1,6 @@
import { inject } from 'vue';
import { DEFAULT_FIELD_DATA_INJECTION, PROVIDE_FIELD_DATA_INJECTION_SYMBOL } from './provideFieldData';
export function useFieldData() {
return inject(PROVIDE_FIELD_DATA_INJECTION_SYMBOL, DEFAULT_FIELD_DATA_INJECTION);
}
//# sourceMappingURL=useFieldData.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/fieldData/useFieldData.ts"],"names":[],"mappings":"AAAA,SAAS,MAAT,QAAuB,KAAvB;AACA,SAAS,4BAAT,EAAuC,mCAAvC,QAAkF,oBAAlF;AAEA,OAAM,SAAU,YAAV,GAAsB;AAC1B,SAAO,MAAM,CAAC,mCAAD,EAAsC,4BAAtC,CAAb;AACD","sourcesContent":["import { inject } from 'vue';\nimport { DEFAULT_FIELD_DATA_INJECTION, PROVIDE_FIELD_DATA_INJECTION_SYMBOL } from './provideFieldData';\n\nexport function useFieldData() {\n return inject(PROVIDE_FIELD_DATA_INJECTION_SYMBOL, DEFAULT_FIELD_DATA_INJECTION);\n}\n"],"sourceRoot":"","file":"useFieldData.js"}

1
node_modules/buetify/lib/composables/focus/index.d.ts generated vendored Executable file
View File

@@ -0,0 +1 @@
export * from './useFocus';

2
node_modules/buetify/lib/composables/focus/index.js generated vendored Executable file
View File

@@ -0,0 +1,2 @@
export * from './useFocus';
//# sourceMappingURL=index.js.map

1
node_modules/buetify/lib/composables/focus/index.js.map generated vendored Executable file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/focus/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAd","sourcesContent":["export * from './useFocus';\n"],"sourceRoot":"","file":"index.js"}

26
node_modules/buetify/lib/composables/focus/useFocus.d.ts generated vendored Executable file
View File

@@ -0,0 +1,26 @@
import { Ref, VNode, PropType, ExtractPropTypes } from 'vue';
export declare const UseFocusPropsDefinition: {
isFocused: {
type: PropType<boolean>;
default: boolean;
};
onFocus: {
type: PropType<(e?: Event | undefined) => void>;
required: false;
};
onBlur: {
type: PropType<(e?: Event | undefined) => void>;
required: false;
};
focusOnMount: {
type: PropType<boolean>;
default: boolean;
};
};
export declare type UseFocusProps = ExtractPropTypes<typeof UseFocusPropsDefinition>;
export declare function useFocus(props: UseFocusProps, ref: Ref<HTMLElement | VNode>): {
isFocused: Ref<boolean>;
focus: (e?: Event | undefined) => void;
onFocus: (e?: Event | undefined) => void;
onBlur: (e?: Event | undefined) => void;
};

69
node_modules/buetify/lib/composables/focus/useFocus.js generated vendored Executable file
View File

@@ -0,0 +1,69 @@
import { shallowRef, onMounted, watchEffect } from 'vue';
import { isHTMLElement } from '../../utils/helpers';
export const UseFocusPropsDefinition = {
isFocused: {
type: Boolean,
default: false
},
onFocus: {
type: Function,
required: false
},
onBlur: {
type: Function,
required: false
},
focusOnMount: {
type: Boolean,
default: false
}
};
export function useFocus(props, ref) {
const isFocused = shallowRef(false);
function onFocus(e) {
isFocused.value = true;
if (props.onFocus) props.onFocus(e);
}
function focus(e) {
if (isFocused.value) {
return;
}
if (isHTMLElement(ref.value)) {
ref.value.focus();
isFocused.value = true;
if (props.onFocus) props.onFocus(e);
} else {
if (ref.value && isHTMLElement(ref.value.el)) {
ref.value.el.focus();
isFocused.value = true;
if (props.onFocus) props.onFocus(e);
}
}
}
watchEffect(() => {
if (props.isFocused && isFocused.value === false) {
focus();
}
});
if (props.focusOnMount) {
onMounted(focus);
}
function onBlur(e) {
isFocused.value = false;
if (props.onBlur) props.onBlur(e);
}
return {
isFocused,
focus,
onFocus,
onBlur
};
}
//# sourceMappingURL=useFocus.js.map

1
node_modules/buetify/lib/composables/focus/useFocus.js.map generated vendored Executable file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/focus/useFocus.ts"],"names":[],"mappings":"AAAA,SAAqB,UAArB,EAA6D,SAA7D,EAAwE,WAAxE,QAA2F,KAA3F;AACA,SAAS,aAAT,QAA8B,qBAA9B;AAEA,OAAO,MAAM,uBAAuB,GAAG;AACrC,EAAA,SAAS,EAAE;AACT,IAAA,IAAI,EAAE,OADG;AAET,IAAA,OAAO,EAAE;AAFA,GAD0B;AAKrC,EAAA,OAAO,EAAE;AACP,IAAA,IAAI,EAAE,QADC;AAEP,IAAA,QAAQ,EAAE;AAFH,GAL4B;AASrC,EAAA,MAAM,EAAE;AACN,IAAA,IAAI,EAAE,QADA;AAEN,IAAA,QAAQ,EAAE;AAFJ,GAT6B;AAarC,EAAA,YAAY,EAAE;AACZ,IAAA,IAAI,EAAE,OADM;AAEZ,IAAA,OAAO,EAAE;AAFG;AAbuB,CAAhC;AAqBP,OAAM,SAAU,QAAV,CAAmB,KAAnB,EAAyC,GAAzC,EAAsE;AAC1E,QAAM,SAAS,GAAiB,UAAU,CAAC,KAAD,CAA1C;;AACA,WAAS,OAAT,CAAiB,CAAjB,EAA0B;AACxB,IAAA,SAAS,CAAC,KAAV,GAAkB,IAAlB;AACA,QAAI,KAAK,CAAC,OAAV,EAAmB,KAAK,CAAC,OAAN,CAAc,CAAd;AACpB;;AACD,WAAS,KAAT,CAAe,CAAf,EAAwB;AACtB,QAAI,SAAS,CAAC,KAAd,EAAqB;AACnB;AACD;;AACD,QAAI,aAAa,CAAC,GAAG,CAAC,KAAL,CAAjB,EAA8B;AAC5B,MAAA,GAAG,CAAC,KAAJ,CAAU,KAAV;AACA,MAAA,SAAS,CAAC,KAAV,GAAkB,IAAlB;AACA,UAAI,KAAK,CAAC,OAAV,EAAmB,KAAK,CAAC,OAAN,CAAc,CAAd;AACpB,KAJD,MAIO;AACL,UAAI,GAAG,CAAC,KAAJ,IAAa,aAAa,CAAC,GAAG,CAAC,KAAJ,CAAU,EAAX,CAA9B,EAA8C;AAC5C,QAAA,GAAG,CAAC,KAAJ,CAAU,EAAV,CAAa,KAAb;AACA,QAAA,SAAS,CAAC,KAAV,GAAkB,IAAlB;AACA,YAAI,KAAK,CAAC,OAAV,EAAmB,KAAK,CAAC,OAAN,CAAc,CAAd;AACpB;AACF;AACF;;AACD,EAAA,WAAW,CAAC,MAAK;AACf,QAAI,KAAK,CAAC,SAAN,IAAmB,SAAS,CAAC,KAAV,KAAoB,KAA3C,EAAkD;AAChD,MAAA,KAAK;AACN;AACF,GAJU,CAAX;;AAMA,MAAI,KAAK,CAAC,YAAV,EAAwB;AACtB,IAAA,SAAS,CAAC,KAAD,CAAT;AACD;;AAED,WAAS,MAAT,CAAgB,CAAhB,EAAyB;AACvB,IAAA,SAAS,CAAC,KAAV,GAAkB,KAAlB;AACA,QAAI,KAAK,CAAC,MAAV,EAAkB,KAAK,CAAC,MAAN,CAAa,CAAb;AACnB;;AACD,SAAO;AACL,IAAA,SADK;AAEL,IAAA,KAFK;AAGL,IAAA,OAHK;AAIL,IAAA;AAJK,GAAP;AAMD","sourcesContent":["import { Ref, VNode, shallowRef, PropType, ExtractPropTypes, onMounted, watchEffect } from 'vue';\nimport { isHTMLElement } from '../../utils/helpers';\n\nexport const UseFocusPropsDefinition = {\n isFocused: {\n type: Boolean as PropType<boolean>,\n default: false\n },\n onFocus: {\n type: Function as PropType<(e?: Event) => void>,\n required: false as const\n },\n onBlur: {\n type: Function as PropType<(e?: Event) => void>,\n required: false as const\n },\n focusOnMount: {\n type: Boolean as PropType<boolean>,\n default: false\n }\n};\n\nexport type UseFocusProps = ExtractPropTypes<typeof UseFocusPropsDefinition>;\n\nexport function useFocus(props: UseFocusProps, ref: Ref<HTMLElement | VNode>) {\n const isFocused: Ref<boolean> = shallowRef(false);\n function onFocus(e?: Event) {\n isFocused.value = true;\n if (props.onFocus) props.onFocus(e);\n }\n function focus(e?: Event) {\n if (isFocused.value) {\n return;\n }\n if (isHTMLElement(ref.value)) {\n ref.value.focus();\n isFocused.value = true;\n if (props.onFocus) props.onFocus(e);\n } else {\n if (ref.value && isHTMLElement(ref.value.el)) {\n ref.value.el.focus();\n isFocused.value = true;\n if (props.onFocus) props.onFocus(e);\n }\n }\n }\n watchEffect(() => {\n if (props.isFocused && isFocused.value === false) {\n focus();\n }\n });\n\n if (props.focusOnMount) {\n onMounted(focus);\n }\n\n function onBlur(e?: Event) {\n isFocused.value = false;\n if (props.onBlur) props.onBlur(e);\n }\n return {\n isFocused,\n focus,\n onFocus,\n onBlur\n };\n}\n"],"sourceRoot":"","file":"useFocus.js"}

18
node_modules/buetify/lib/composables/index.d.ts generated vendored Executable file
View File

@@ -0,0 +1,18 @@
export * from './disable';
export * from './fieldData';
export * from './focus';
export * from './labelId';
export * from './message';
export * from './model';
export * from './noticeController';
export * from './pagination';
export * from './popupController';
export * from './proxy';
export * from './selectionControl';
export * from './snackbar';
export * from './theme';
export * from './toast';
export * from './toggle';
export * from './transition';
export * from './validation';
export * from './windowSize';

19
node_modules/buetify/lib/composables/index.js generated vendored Executable file
View File

@@ -0,0 +1,19 @@
export * from './disable';
export * from './fieldData';
export * from './focus';
export * from './labelId';
export * from './message';
export * from './model';
export * from './noticeController';
export * from './pagination';
export * from './popupController';
export * from './proxy';
export * from './selectionControl';
export * from './snackbar';
export * from './theme';
export * from './toast';
export * from './toggle';
export * from './transition';
export * from './validation';
export * from './windowSize';
//# sourceMappingURL=index.js.map

1
node_modules/buetify/lib/composables/index.js.map generated vendored Executable file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/composables/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAd;AACA,cAAc,aAAd;AACA,cAAc,SAAd;AACA,cAAc,WAAd;AACA,cAAc,WAAd;AACA,cAAc,SAAd;AACA,cAAc,oBAAd;AACA,cAAc,cAAd;AACA,cAAc,mBAAd;AACA,cAAc,SAAd;AACA,cAAc,oBAAd;AACA,cAAc,YAAd;AACA,cAAc,SAAd;AACA,cAAc,SAAd;AACA,cAAc,UAAd;AACA,cAAc,cAAd;AACA,cAAc,cAAd;AACA,cAAc,cAAd","sourcesContent":["export * from './disable';\nexport * from './fieldData';\nexport * from './focus';\nexport * from './labelId';\nexport * from './message';\nexport * from './model';\nexport * from './noticeController';\nexport * from './pagination';\nexport * from './popupController';\nexport * from './proxy';\nexport * from './selectionControl';\nexport * from './snackbar';\nexport * from './theme';\nexport * from './toast';\nexport * from './toggle';\nexport * from './transition';\nexport * from './validation';\nexport * from './windowSize';\n"],"sourceRoot":"","file":"index.js"}

261
node_modules/buetify/lib/composables/input/useInput.d.ts generated vendored Executable file
View File

@@ -0,0 +1,261 @@
import { AllColorsVariant, ColorVariant } from '../../types/ColorVariants';
import { SizeVariant } from '../../types/SizeVariants';
import { PropType, ExtractPropTypes, Ref } from 'vue';
import { UseModelProps } from '../model';
export declare const StaticUseInputProps: {
isFocused: {
type: PropType<boolean>;
default: boolean;
};
onFocus: {
type: PropType<(e?: Event | undefined) => void>;
required: false;
};
onBlur: {
type: PropType<(e?: Event | undefined) => void>;
required: false;
};
focusOnMount: {
type: PropType<boolean>;
default: boolean;
};
isDisabled: {
type: PropType<boolean>;
required: boolean;
default: boolean;
};
isReadonly: {
type: PropType<boolean>;
required: boolean;
default: boolean;
};
disableIfReadonly: {
type: PropType<boolean>;
required: boolean;
default: boolean;
};
useNativeValidation: {
type: PropType<boolean>;
default: boolean;
};
isValid: {
type: PropType<boolean>;
default: boolean;
};
'onUpdate:isValid': {
type: PropType<import("fp-ts/lib/function").FunctionN<[boolean], void>>;
default: import("fp-ts/lib/function").Lazy<() => void>;
};
variant: {
type: PropType<ColorVariant>;
default: "";
};
type: {
type: PropType<string>;
};
autocomplete: {
type: PropType<string>;
};
placeholder: {
type: PropType<string>;
};
size: {
type: PropType<SizeVariant>;
default: SizeVariant;
};
isRequired: {
type: BooleanConstructor;
default: boolean;
};
isExpanded: {
type: PropType<boolean>;
default: boolean;
};
isLoading: {
type: PropType<boolean>;
default: boolean;
};
isRounded: {
type: PropType<boolean>;
default: boolean;
};
maxlength: {
type: PropType<string | number>;
};
icon: null;
usePasswordReveal: {
type: PropType<boolean>;
default: undefined;
};
};
declare type StaticInputProps = ExtractPropTypes<typeof StaticUseInputProps>;
export declare function getUseInputPropsDefinition<T>(): {
isFocused: {
type: PropType<boolean>;
default: boolean;
};
onFocus: {
type: PropType<(e?: Event | undefined) => void>;
required: false;
};
onBlur: {
type: PropType<(e?: Event | undefined) => void>;
required: false;
};
focusOnMount: {
type: PropType<boolean>;
default: boolean;
};
isDisabled: {
type: PropType<boolean>;
required: boolean;
default: boolean;
};
isReadonly: {
type: PropType<boolean>;
required: boolean;
default: boolean;
};
disableIfReadonly: {
type: PropType<boolean>;
required: boolean;
default: boolean;
};
useNativeValidation: {
type: PropType<boolean>;
default: boolean;
};
isValid: {
type: PropType<boolean>;
default: boolean;
};
'onUpdate:isValid': {
type: PropType<import("fp-ts/lib/function").FunctionN<[boolean], void>>;
default: import("fp-ts/lib/function").Lazy<() => void>;
};
variant: {
type: PropType<ColorVariant>;
default: "";
};
type: {
type: PropType<string>;
};
autocomplete: {
type: PropType<string>;
};
placeholder: {
type: PropType<string>;
};
size: {
type: PropType<SizeVariant>;
default: SizeVariant;
};
isRequired: {
type: BooleanConstructor;
default: boolean;
};
isExpanded: {
type: PropType<boolean>;
default: boolean;
};
isLoading: {
type: PropType<boolean>;
default: boolean;
};
isRounded: {
type: PropType<boolean>;
default: boolean;
};
maxlength: {
type: PropType<string | number>;
};
icon: null;
usePasswordReveal: {
type: PropType<boolean>;
default: undefined;
};
modelValue: {
type: PropType<T>;
required: false;
};
'onUpdate:modelValue': {
type: PropType<import("fp-ts/lib/function").FunctionN<[T], void>>;
default: import("fp-ts/lib/function").Lazy<import("fp-ts/lib/function").FunctionN<[T], void>>;
};
};
export declare type UseInputProps<T> = UseModelProps<T> & StaticInputProps;
export declare function useInput<T>(props: UseInputProps<T>, ref: Ref<HTMLElement>): {
iconSize: import("vue").ComputedRef<"" | "is-small">;
type: Ref<string | undefined>;
passwordToggle: {
isOn: import("vue").WritableComputedRef<boolean>;
isOff: import("vue").ComputedRef<boolean>;
attrs: import("vue").ComputedRef<{
'aria-haspopup'?: boolean;
tabindex: number;
role: string;
type: string;
'aria-pressed': boolean;
'aria-expanded': boolean;
}>;
listeners: {
onClick: import("fp-ts/lib/IO").IO<void>;
onKeydown: (e: KeyboardEvent) => void;
};
props: import("vue").ComputedRef<{
onClick: import("fp-ts/lib/IO").IO<void>;
onKeydown: (e: KeyboardEvent) => void;
'aria-haspopup'?: boolean;
tabindex: number;
role: string;
type: string;
'aria-pressed': boolean;
'aria-expanded': boolean;
}>;
setOn: (e?: Event | undefined) => void;
setOff: (e?: Event | undefined) => void;
toggle: (e?: Event | undefined) => void;
};
usePasswordReveal: import("vue").ComputedRef<boolean>;
isDisabled: Ref<boolean>;
isValid: Ref<boolean>;
validate: () => void;
isFocused: Ref<boolean>;
focus: (e?: Event | undefined) => void;
onFocus: (e?: Event | undefined) => void;
onBlur: (e?: Event | undefined) => void;
set: import("fp-ts/lib/function").FunctionN<[T], void>;
modelValue: Ref<T | undefined>;
onNativeInput: import("fp-ts/lib/function").FunctionN<[Event], void>;
isExpanded: import("vue").ComputedRef<boolean>;
isFullwidth: import("vue").ComputedRef<boolean>;
messageVariant: import("vue").ComputedRef<any>;
setters: import("../fieldData").FieldDataListeners;
onNewMessage: import("fp-ts/lib/function").FunctionN<[string | {
[K: string]: boolean;
} | (string | {
[K: string]: boolean;
})[]], void>;
onNewVariant: import("fp-ts/lib/function").FunctionN<[AllColorsVariant], void>;
label: Ref<string>;
message: Ref<string>;
id: Ref<string | undefined>;
labelId: Ref<string | undefined>;
"onUpdate:modelValue": Ref<import("fp-ts/lib/function").FunctionN<[T], void>>;
variant: Ref<ColorVariant>;
size: Ref<SizeVariant>;
isRounded: Ref<boolean>;
isLoading: Ref<boolean>;
focusOnMount: Ref<boolean>;
isReadonly: Ref<boolean>;
disableIfReadonly: Ref<boolean>;
useNativeValidation: Ref<boolean>;
"onUpdate:isValid": Ref<import("fp-ts/lib/function").FunctionN<[boolean], void>>;
isRequired: Ref<boolean>;
icon?: Ref<any> | undefined;
autocomplete?: Ref<string | undefined> | undefined;
placeholder?: Ref<string | undefined> | undefined;
maxlength?: Ref<string | number | undefined> | undefined;
};
export declare type Input = ReturnType<typeof useInput>;
export {};

133
node_modules/buetify/lib/composables/input/useInput.js generated vendored Executable file
View File

@@ -0,0 +1,133 @@
import { isObject, isString } from '../../utils/helpers';
import { computed, toRefs, watch, shallowRef, toRef, reactive } from 'vue';
import { useFieldData } from '../fieldData';
import { useFocus, UseFocusPropsDefinition } from '../focus';
import { getUseModelPropsDefinition, useModel } from '../model';
import { useToggle } from '../toggle';
import { useValidation, UseValidationPropsDefinition } from '../validation';
export const StaticUseInputProps = {
variant: {
type: String,
default: ''
},
type: {
type: String
},
autocomplete: {
type: String
},
placeholder: {
type: String
},
size: {
type: String,
default: ''
},
isRequired: {
type: Boolean,
default: false
},
isExpanded: {
type: Boolean,
default: false
},
isLoading: {
type: Boolean,
default: false
},
isRounded: {
type: Boolean,
default: false
},
maxlength: {
type: [Number, String]
},
icon: null,
usePasswordReveal: {
type: Boolean,
default: undefined
},
...UseValidationPropsDefinition,
...UseFocusPropsDefinition
};
export function getUseInputPropsDefinition() {
return { ...getUseModelPropsDefinition(),
...StaticUseInputProps
};
}
function getIconSize(size) {
switch (size) {
case 'is-small':
return size;
default:
return '';
}
}
function getMessageVariant(variant) {
if (isString(variant)) {
return variant;
} else if (isObject(variant)) {
return Object.values(variant)[0]; // eslint-disable-line
} else {
return undefined;
}
}
export function useInput(props, ref) {
const fieldData = useFieldData();
const isExpanded = computed(() => props.isExpanded || fieldData.attrs.isExpanded.value);
const model = useModel(props);
const validate = useValidation(props, ref);
const focus = useFocus(reactive({
isFocused: toRef(props, 'isFocused'),
onFocus: toRef(props, 'onFocus'),
focusOnMount: toRef(props, 'focusOnMount'),
onBlur: e => {
if (props.onBlur) {
props.onBlur(e);
}
validate.validate();
}
}), ref); // watch(model.modelValue, (newVal, oldVal) => {
// if (newVal !== oldVal) {
// validate.validate()
// }
// });
const iconSize = computed(() => getIconSize(props.size));
const messageVariant = computed(() => getMessageVariant(fieldData.attrs.messageVariant.value));
const passwordToggle = useToggle({
isVisible: false,
hasPopup: false
}, 'isVisible');
const type = shallowRef(props.type);
const usePasswordReveal = computed(() => {
return props.type === 'password' && (props.usePasswordReveal === undefined || props.usePasswordReveal);
});
watch(toRef(props, 'type'), newVal => {
type.value = newVal;
});
watch(passwordToggle.isOn, newVal => {
type.value = newVal ? 'text' : 'password';
});
return { ...toRefs(props),
...fieldData.attrs,
...fieldData.setters,
isExpanded,
isFullwidth: isExpanded,
messageVariant,
setters: fieldData.setters,
...model,
...focus,
...validate,
iconSize,
type,
passwordToggle,
usePasswordReveal
};
}
//# sourceMappingURL=useInput.js.map

1
node_modules/buetify/lib/composables/input/useInput.js.map generated vendored Executable file

File diff suppressed because one or more lines are too long

1
node_modules/buetify/lib/composables/labelId/index.d.ts generated vendored Executable file
View File

@@ -0,0 +1 @@
export * from './useLabelId';

2
node_modules/buetify/lib/composables/labelId/index.js generated vendored Executable file
View File

@@ -0,0 +1,2 @@
export * from './useLabelId';
//# sourceMappingURL=index.js.map

1
node_modules/buetify/lib/composables/labelId/index.js.map generated vendored Executable file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/labelId/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAd","sourcesContent":["export * from './useLabelId';\n"],"sourceRoot":"","file":"index.js"}

14
node_modules/buetify/lib/composables/labelId/useLabelId.d.ts generated vendored Executable file
View File

@@ -0,0 +1,14 @@
import { PropType, ExtractPropTypes } from 'vue';
export declare const UseLabelIdPropsDefinition: {
labelFor: PropType<string>;
label: {
type: PropType<string>;
default: string;
};
};
export declare type UseLabelIdProps = ExtractPropTypes<typeof UseLabelIdPropsDefinition>;
export declare function useLabelId(props: UseLabelIdProps, prefix: string): {
id: import("vue").ComputedRef<string>;
labelId: import("vue").ComputedRef<string>;
label: import("vue").Ref<string>;
};

20
node_modules/buetify/lib/composables/labelId/useLabelId.js generated vendored Executable file
View File

@@ -0,0 +1,20 @@
import { computed, toRef } from 'vue';
let numId = 0;
export const UseLabelIdPropsDefinition = {
labelFor: String,
label: {
type: String,
default: ''
}
};
export function useLabelId(props, prefix) {
const newId = numId++;
const id = computed(() => props.labelFor ? props.labelFor : `${prefix}-${newId}`);
const labelId = computed(() => `label-for-${id.value}`);
return {
id,
labelId,
label: toRef(props, 'label')
};
}
//# sourceMappingURL=useLabelId.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/labelId/useLabelId.ts"],"names":[],"mappings":"AAAA,SAAqC,QAArC,EAA+C,KAA/C,QAA4D,KAA5D;AAEA,IAAI,KAAK,GAAG,CAAZ;AAEA,OAAO,MAAM,yBAAyB,GAAG;AACvC,EAAA,QAAQ,EAAE,MAD6B;AAEvC,EAAA,KAAK,EAAE;AACL,IAAA,IAAI,EAAE,MADD;AAEL,IAAA,OAAO,EAAE;AAFJ;AAFgC,CAAlC;AAUP,OAAM,SAAU,UAAV,CAAqB,KAArB,EAA6C,MAA7C,EAA2D;AAC/D,QAAM,KAAK,GAAG,KAAK,EAAnB;AACA,QAAM,EAAE,GAAG,QAAQ,CAAC,MAAO,KAAK,CAAC,QAAN,GAAiB,KAAK,CAAC,QAAvB,GAAkC,GAAG,MAAM,IAAI,KAAK,EAA5D,CAAnB;AACA,QAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,aAAa,EAAE,CAAC,KAAK,EAA5B,CAAxB;AACA,SAAO;AACL,IAAA,EADK;AAEL,IAAA,OAFK;AAGL,IAAA,KAAK,EAAE,KAAK,CAAC,KAAD,EAAQ,OAAR;AAHP,GAAP;AAKD","sourcesContent":["import { PropType, ExtractPropTypes, computed, toRef } from 'vue';\n\nlet numId = 0;\n\nexport const UseLabelIdPropsDefinition = {\n labelFor: String as PropType<string>,\n label: {\n type: String as PropType<string>,\n default: ''\n }\n};\n\nexport type UseLabelIdProps = ExtractPropTypes<typeof UseLabelIdPropsDefinition>;\n\nexport function useLabelId(props: UseLabelIdProps, prefix: string) {\n const newId = numId++;\n const id = computed(() => (props.labelFor ? props.labelFor : `${prefix}-${newId}`));\n const labelId = computed(() => `label-for-${id.value}`);\n return {\n id,\n labelId,\n label: toRef(props, 'label')\n };\n}\n"],"sourceRoot":"","file":"useLabelId.js"}

1
node_modules/buetify/lib/composables/message/index.d.ts generated vendored Executable file
View File

@@ -0,0 +1 @@
export * from './useMessage';

2
node_modules/buetify/lib/composables/message/index.js generated vendored Executable file
View File

@@ -0,0 +1,2 @@
export * from './useMessage';
//# sourceMappingURL=index.js.map

1
node_modules/buetify/lib/composables/message/index.js.map generated vendored Executable file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/message/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAd","sourcesContent":["export * from './useMessage';\n"],"sourceRoot":"","file":"index.js"}

126
node_modules/buetify/lib/composables/message/useMessage.d.ts generated vendored Executable file
View File

@@ -0,0 +1,126 @@
import { PropType, ExtractPropTypes, ComponentOptions, FunctionalComponent } from 'vue';
import { AllColorsVariant } from '../../types/ColorVariants';
export declare type MessageSize = 'is-small' | 'is-medium' | 'is-large' | '';
export declare type MessageIcons = {
[K in AllColorsVariant]: ComponentOptions | FunctionalComponent;
};
export declare function getMessageIcons(icons: Partial<MessageIcons>): {
""?: FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any> | undefined;
"is-black-ter"?: FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any> | undefined;
"is-orange"?: FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any> | undefined;
"is-primary"?: FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any> | undefined;
"is-info"?: FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any> | undefined;
"is-link"?: FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any> | undefined;
"is-success"?: FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any> | undefined;
"is-warning"?: FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any> | undefined;
"is-danger"?: FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any> | undefined;
"is-white"?: FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any> | undefined;
"is-black"?: FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any> | undefined;
"is-light"?: FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any> | undefined;
"is-dark"?: FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any> | undefined;
"is-black-bis"?: FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any> | undefined;
"is-grey-darker"?: FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any> | undefined;
"is-grey-dark"?: FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any> | undefined;
"is-grey"?: FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any> | undefined;
"is-grey-light"?: FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any> | undefined;
"is-grey-lighter"?: FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any> | undefined;
"is-white-ter"?: FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any> | undefined;
"is-white-bis"?: FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any> | undefined;
};
export declare const UseMessagePropsDefinition: {
title: {
type: PropType<string>;
};
isClosable: {
type: BooleanConstructor;
default: boolean;
};
message: {
type: PropType<string>;
};
variant: {
type: PropType<AllColorsVariant>;
default: "";
};
size: {
type: PropType<import("../..").SizeVariant>;
default: "";
};
iconSize: {
type: PropType<import("../..").SizeVariant>;
default: "";
};
useAutoClose: {
type: PropType<boolean>;
default: boolean;
};
duration: {
type: PropType<number>;
default: number;
};
useIcon: {
type: PropType<boolean>;
default: boolean;
};
icons: {
type: PropType<Partial<MessageIcons>>;
default: import("fp-ts/lib/function").Lazy<Partial<MessageIcons>>;
};
icon: {
type: PropType<FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any>>;
};
onToggle: {
type: PropType<import("fp-ts/lib/function").FunctionN<[boolean], void>>;
required: false;
};
onSetOn: {
type: PropType<import("fp-ts/lib/IO").IO<void>>;
required: false;
};
onSetOff: {
type: PropType<import("fp-ts/lib/IO").IO<void>>;
required: false;
};
isActive: {
type: PropType<boolean>;
default: boolean;
};
hasPopup: {
type: PropType<boolean>;
default: boolean;
};
};
export declare type UseMessageProps = ExtractPropTypes<typeof UseMessagePropsDefinition>;
export declare function useMessage(props: UseMessageProps): {
icon: import("vue").ComputedRef<FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any> | undefined>;
iconSize: import("vue").ComputedRef<"is-small" | "is-medium" | "is-large">;
setAutoClose: () => void;
isOn: import("vue").WritableComputedRef<boolean>;
isOff: import("vue").ComputedRef<boolean>;
attrs: import("vue").ComputedRef<{
'aria-haspopup'?: boolean;
tabindex: number;
role: string;
type: string;
'aria-pressed': boolean;
'aria-expanded': boolean;
}>;
listeners: {
onClick: import("fp-ts/lib/IO").IO<void>;
onKeydown: (e: KeyboardEvent) => void;
};
props: import("vue").ComputedRef<{
onClick: import("fp-ts/lib/IO").IO<void>;
onKeydown: (e: KeyboardEvent) => void;
'aria-haspopup'?: boolean;
tabindex: number;
role: string;
type: string;
'aria-pressed': boolean;
'aria-expanded': boolean;
}>;
setOn: (e?: Event | undefined) => void;
setOff: (e?: Event | undefined) => void;
toggle: (e?: Event | undefined) => void;
};
export declare type Message = ReturnType<typeof useMessage>;

79
node_modules/buetify/lib/composables/message/useMessage.js generated vendored Executable file
View File

@@ -0,0 +1,79 @@
import { constant } from 'fp-ts/lib/function';
import { defineAsyncComponent, computed } from 'vue';
import { getUseTogglePropsDefinition, useToggle } from '../toggle';
const DEFAULT_MESSAGE_ICONS = {
'is-info': defineAsyncComponent(() => import('../../components/icons/infoCircle')),
'is-success': defineAsyncComponent(() => import('../../components/icons/checkCircle')),
'is-warning': defineAsyncComponent(() => import('../../components/icons/exclamationTriangle')),
'is-danger': defineAsyncComponent(() => import('../../components/icons/exclamationCircle'))
};
export function getMessageIcons(icons) {
return { ...DEFAULT_MESSAGE_ICONS,
...icons
};
}
export const UseMessagePropsDefinition = { ...getUseTogglePropsDefinition('isActive', true),
title: {
type: String
},
isClosable: {
type: Boolean,
default: true
},
message: {
type: String
},
variant: {
type: String,
default: ''
},
size: {
type: String,
default: ''
},
iconSize: {
type: String,
default: ''
},
useAutoClose: {
type: Boolean,
default: false
},
duration: {
type: Number,
default: 2000
},
useIcon: {
type: Boolean,
default: false
},
icons: {
type: Object,
default: constant(DEFAULT_MESSAGE_ICONS)
},
icon: {
type: [Object, Function]
}
};
export function useMessage(props) {
const toggle = useToggle(props, 'isActive');
const icon = computed(() => props.icon ?? props.icons[props.variant]);
const iconSize = computed(() => props.iconSize || props.size || 'is-large');
function setAutoClose() {
if (props.useAutoClose) {
setTimeout(() => {
if (toggle.isOn.value) {
toggle.setOff();
}
}, props.duration);
}
}
return { ...toggle,
icon,
iconSize,
setAutoClose
};
}
//# sourceMappingURL=useMessage.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/message/useMessage.ts"],"names":[],"mappings":"AAAA,SAAS,QAAT,QAAyB,oBAAzB;AACA,SAAS,oBAAT,EAAkG,QAAlG,QAAkH,KAAlH;AAEA,SAAS,2BAAT,EAAsC,SAAtC,QAAuD,WAAvD;AAQA,MAAM,qBAAqB,GAA0B;AACnD,aAAW,oBAAoB,CAAC,MAAM,OAAO,mCAAP,CAAP,CADoB;AAEnD,gBAAc,oBAAoB,CAAC,MAAM,OAAO,oCAAP,CAAP,CAFiB;AAGnD,gBAAc,oBAAoB,CAAC,MAAM,OAAO,4CAAP,CAAP,CAHiB;AAInD,eAAa,oBAAoB,CAAC,MAAM,OAAO,0CAAP,CAAP;AAJkB,CAArD;AAOA,OAAM,SAAU,eAAV,CAA0B,KAA1B,EAAsD;AAC1D,SAAO,EACL,GAAG,qBADE;AAEL,OAAG;AAFE,GAAP;AAID;AAED,OAAO,MAAM,yBAAyB,GAAG,EACvC,GAAG,2BAA2B,CAAC,UAAD,EAAa,IAAb,CADS;AAEvC,EAAA,KAAK,EAAE;AACL,IAAA,IAAI,EAAE;AADD,GAFgC;AAKvC,EAAA,UAAU,EAAE;AACV,IAAA,IAAI,EAAE,OADI;AAEV,IAAA,OAAO,EAAE;AAFC,GAL2B;AASvC,EAAA,OAAO,EAAE;AACP,IAAA,IAAI,EAAE;AADC,GAT8B;AAYvC,EAAA,OAAO,EAAE;AACP,IAAA,IAAI,EAAE,MADC;AAEP,IAAA,OAAO,EAAE;AAFF,GAZ8B;AAgBvC,EAAA,IAAI,EAAE;AACJ,IAAA,IAAI,EAAE,MADF;AAEJ,IAAA,OAAO,EAAE;AAFL,GAhBiC;AAoBvC,EAAA,QAAQ,EAAE;AACR,IAAA,IAAI,EAAE,MADE;AAER,IAAA,OAAO,EAAE;AAFD,GApB6B;AAwBvC,EAAA,YAAY,EAAE;AACZ,IAAA,IAAI,EAAE,OADM;AAEZ,IAAA,OAAO,EAAE;AAFG,GAxByB;AA4BvC,EAAA,QAAQ,EAAE;AACR,IAAA,IAAI,EAAE,MADE;AAER,IAAA,OAAO,EAAE;AAFD,GA5B6B;AAgCvC,EAAA,OAAO,EAAE;AACP,IAAA,IAAI,EAAE,OADC;AAEP,IAAA,OAAO,EAAE;AAFF,GAhC8B;AAoCvC,EAAA,KAAK,EAAE;AACL,IAAA,IAAI,EAAE,MADD;AAEL,IAAA,OAAO,EAAE,QAAQ,CAAC,qBAAD;AAFZ,GApCgC;AAwCvC,EAAA,IAAI,EAAE;AACJ,IAAA,IAAI,EAAE,CAAC,MAAD,EAAS,QAAT;AADF;AAxCiC,CAAlC;AA+CP,OAAM,SAAU,UAAV,CAAqB,KAArB,EAA2C;AAC/C,QAAM,MAAM,GAAG,SAAS,CAAC,KAAD,EAAQ,UAAR,CAAxB;AACA,QAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,KAAK,CAAC,IAAN,IAAc,KAAK,CAAC,KAAN,CAAY,KAAK,CAAC,OAAlB,CAArB,CAArB;AACA,QAAM,QAAQ,GAAG,QAAQ,CAAC,MAAM,KAAK,CAAC,QAAN,IAAkB,KAAK,CAAC,IAAxB,IAAgC,UAAvC,CAAzB;;AACA,WAAS,YAAT,GAAqB;AACnB,QAAI,KAAK,CAAC,YAAV,EAAwB;AACtB,MAAA,UAAU,CAAC,MAAK;AACd,YAAI,MAAM,CAAC,IAAP,CAAY,KAAhB,EAAuB;AACrB,UAAA,MAAM,CAAC,MAAP;AACD;AACF,OAJS,EAIP,KAAK,CAAC,QAJC,CAAV;AAKD;AACF;;AACD,SAAO,EACL,GAAG,MADE;AAEL,IAAA,IAFK;AAGL,IAAA,QAHK;AAIL,IAAA;AAJK,GAAP;AAMD","sourcesContent":["import { constant } from 'fp-ts/lib/function';\nimport { defineAsyncComponent, PropType, ExtractPropTypes, ComponentOptions, FunctionalComponent, computed } from 'vue';\nimport { AllColorsVariant } from '../../types/ColorVariants';\nimport { getUseTogglePropsDefinition, useToggle } from '../toggle';\n\nexport type MessageSize = 'is-small' | 'is-medium' | 'is-large' | '';\n\nexport type MessageIcons = {\n [K in AllColorsVariant]: ComponentOptions | FunctionalComponent;\n};\n\nconst DEFAULT_MESSAGE_ICONS: Partial<MessageIcons> = {\n 'is-info': defineAsyncComponent(() => import('../../components/icons/infoCircle')),\n 'is-success': defineAsyncComponent(() => import('../../components/icons/checkCircle')),\n 'is-warning': defineAsyncComponent(() => import('../../components/icons/exclamationTriangle')),\n 'is-danger': defineAsyncComponent(() => import('../../components/icons/exclamationCircle'))\n};\n\nexport function getMessageIcons(icons: Partial<MessageIcons>) {\n return {\n ...DEFAULT_MESSAGE_ICONS,\n ...icons\n };\n}\n\nexport const UseMessagePropsDefinition = {\n ...getUseTogglePropsDefinition('isActive', true),\n title: {\n type: String as PropType<string>\n },\n isClosable: {\n type: Boolean,\n default: true\n },\n message: {\n type: String as PropType<string>\n },\n variant: {\n type: String as PropType<AllColorsVariant>,\n default: '' as const\n },\n size: {\n type: String as PropType<MessageSize>,\n default: '' as const\n },\n iconSize: {\n type: String as PropType<MessageSize>,\n default: '' as const\n },\n useAutoClose: {\n type: Boolean as PropType<boolean>,\n default: false\n },\n duration: {\n type: Number as PropType<number>,\n default: 2000\n },\n useIcon: {\n type: Boolean as PropType<boolean>,\n default: false\n },\n icons: {\n type: Object as PropType<Partial<MessageIcons>>,\n default: constant(DEFAULT_MESSAGE_ICONS)\n },\n icon: {\n type: [Object, Function] as PropType<ComponentOptions | FunctionalComponent>\n }\n};\n\nexport type UseMessageProps = ExtractPropTypes<typeof UseMessagePropsDefinition>;\n\nexport function useMessage(props: UseMessageProps) {\n const toggle = useToggle(props, 'isActive');\n const icon = computed(() => props.icon ?? props.icons[props.variant]);\n const iconSize = computed(() => props.iconSize || props.size || 'is-large');\n function setAutoClose() {\n if (props.useAutoClose) {\n setTimeout(() => {\n if (toggle.isOn.value) {\n toggle.setOff();\n }\n }, props.duration);\n }\n }\n return {\n ...toggle,\n icon,\n iconSize,\n setAutoClose\n };\n}\n\nexport type Message = ReturnType<typeof useMessage>;\n"],"sourceRoot":"","file":"useMessage.js"}

1
node_modules/buetify/lib/composables/model/index.d.ts generated vendored Executable file
View File

@@ -0,0 +1 @@
export * from './useModel';

2
node_modules/buetify/lib/composables/model/index.js generated vendored Executable file
View File

@@ -0,0 +1,2 @@
export * from './useModel';
//# sourceMappingURL=index.js.map

1
node_modules/buetify/lib/composables/model/index.js.map generated vendored Executable file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/model/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAd","sourcesContent":["export * from './useModel';\n"],"sourceRoot":"","file":"index.js"}

35
node_modules/buetify/lib/composables/model/useModel.d.ts generated vendored Executable file
View File

@@ -0,0 +1,35 @@
import { FunctionN, Lazy } from 'fp-ts/lib/function';
import { PropType, Ref } from 'vue';
export declare function getUseModelPropsDefinition<T>(): {
modelValue: {
type: PropType<T>;
required: false;
};
'onUpdate:modelValue': {
type: PropType<FunctionN<[T], void>>;
default: Lazy<FunctionN<[T], void>>;
};
};
export declare function getUseModelPropsDefinition<T, ValueKey extends string, UpdateKey extends string>(valueKey: ValueKey, updateKey: UpdateKey): {
[K in ValueKey]: {
type: PropType<T>;
required: false;
};
} & {
[K in UpdateKey]: {
type: PropType<FunctionN<[T], void>>;
default: Lazy<FunctionN<[T], void>>;
};
};
export declare type UseModelProps<T, ValueKey extends string = 'modelValue', UpdateKey extends string = 'onUpdate:modelValue'> = {
[K in ValueKey]?: T | undefined;
} & {
[K in UpdateKey]: FunctionN<[T], void>;
};
export declare function useModel<T>(props: UseModelProps<T>): Model<T>;
export declare function useModel<T, ValueKey extends string, UpdateKey extends string>(props: UseModelProps<T, ValueKey, UpdateKey>, valueKey: ValueKey, updateKey: UpdateKey): Model<T>;
export declare type Model<T> = {
set: FunctionN<[T], void>;
modelValue: Ref<T | undefined>;
onNativeInput: FunctionN<[Event], void>;
};

53
node_modules/buetify/lib/composables/model/useModel.js generated vendored Executable file
View File

@@ -0,0 +1,53 @@
import { constant, constVoid } from 'fp-ts/lib/function';
import { shallowRef, watch, toRef, computed } from 'vue';
import { exists, isObject } from '../../utils/helpers';
export function getUseModelPropsDefinition(valueKey = 'modelValue', updateKey = 'onUpdate:modelValue') {
return {
[valueKey]: null,
[updateKey]: {
type: Function,
default: constant(constVoid)
}
};
}
export function useModel(props, valueKey = 'modelValue', updateKey = 'onUpdate:modelValue') {
const internalValue = shallowRef(props[valueKey]);
watch(toRef(props, valueKey), newVal => {
internalValue.value = newVal;
});
const value = computed({
get() {
return internalValue.value;
},
set(val) {
internalValue.value = val;
if (val !== undefined) {
props[updateKey](val);
}
}
});
function onUpdate(e) {
// eslint-disable-next-line
// @ts-ignore-next-line
if (isObject(e.target) && exists(e.target.value)) {
// eslint-disable-next-line
// @ts-ignore-next-line
value.value = e.target.value;
}
}
function set(val) {
value.value = val;
}
return {
set,
modelValue: value,
onNativeInput: onUpdate
};
}
//# sourceMappingURL=useModel.js.map

1
node_modules/buetify/lib/composables/model/useModel.js.map generated vendored Executable file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/model/useModel.ts"],"names":[],"mappings":"AAAA,SAAS,QAAT,EAAmB,SAAnB,QAAqD,oBAArD;AACA,SAAmB,UAAnB,EAA+B,KAA/B,EAAsC,KAAtC,EAAkD,QAAlD,QAAkE,KAAlE;AACA,SAAS,MAAT,EAAiB,QAAjB,QAAiC,qBAAjC;AA2BA,OAAM,SAAU,0BAAV,CAKJ,QAAA,GAAqB,YALjB,EAK2C,SAAA,GAAuB,qBALlE,EAKoG;AACxG,SAAO;AACL,KAAC,QAAD,GAAY,IADP;AAEL,KAAC,SAAD,GAAa;AACX,MAAA,IAAI,EAAE,QADK;AAEX,MAAA,OAAO,EAAE,QAAQ,CAAC,SAAD;AAFN;AAFR,GAAP;AAOD;AAcD,OAAM,SAAU,QAAV,CACJ,KADI,EAEJ,QAAA,GAAqB,YAFjB,EAGJ,SAAA,GAAuB,qBAHnB,EAGqD;AAEzD,QAAM,aAAa,GAAuB,UAAU,CAAC,KAAK,CAAC,QAAD,CAAN,CAApD;AAEA,EAAA,KAAK,CAAC,KAAK,CAAC,KAAD,EAAQ,QAAR,CAAN,EAAyB,MAAM,IAAG;AACrC,IAAA,aAAa,CAAC,KAAd,GAAsB,MAAtB;AACD,GAFI,CAAL;AAIA,QAAM,KAAK,GAAG,QAAQ,CAAC;AACrB,IAAA,GAAG,GAAA;AACD,aAAO,aAAa,CAAC,KAArB;AACD,KAHoB;;AAIrB,IAAA,GAAG,CAAC,GAAD,EAAmB;AACpB,MAAA,aAAa,CAAC,KAAd,GAAsB,GAAtB;;AACA,UAAI,GAAG,KAAK,SAAZ,EAAuB;AACrB,QAAA,KAAK,CAAC,SAAD,CAAL,CAAiB,GAAjB;AACD;AACF;;AAToB,GAAD,CAAtB;;AAYA,WAAS,QAAT,CAAkB,CAAlB,EAA0B;AACxB;AACA;AACA,QAAI,QAAQ,CAAC,CAAC,CAAC,MAAH,CAAR,IAAsB,MAAM,CAAC,CAAC,CAAC,MAAF,CAAS,KAAV,CAAhC,EAAkD;AAChD;AACA;AACA,MAAA,KAAK,CAAC,KAAN,GAAc,CAAC,CAAC,MAAF,CAAS,KAAvB;AACD;AACF;;AAED,WAAS,GAAT,CAAa,GAAb,EAAmB;AACjB,IAAA,KAAK,CAAC,KAAN,GAAc,GAAd;AACD;;AAED,SAAO;AACL,IAAA,GADK;AAEL,IAAA,UAAU,EAAE,KAFP;AAGL,IAAA,aAAa,EAAE;AAHV,GAAP;AAKD","sourcesContent":["import { constant, constVoid, FunctionN, Lazy } from 'fp-ts/lib/function';\nimport { PropType, shallowRef, watch, toRef, Ref, computed } from 'vue';\nimport { exists, isObject } from '../../utils/helpers';\n\nexport function getUseModelPropsDefinition<T>(): {\n modelValue: {\n type: PropType<T>;\n required: false;\n };\n 'onUpdate:modelValue': {\n type: PropType<FunctionN<[T], void>>;\n default: Lazy<FunctionN<[T], void>>;\n };\n};\nexport function getUseModelPropsDefinition<T, ValueKey extends string, UpdateKey extends string>(\n valueKey: ValueKey,\n updateKey: UpdateKey\n): {\n [K in ValueKey]: {\n type: PropType<T>;\n required: false;\n };\n} &\n {\n [K in UpdateKey]: {\n type: PropType<FunctionN<[T], void>>;\n default: Lazy<FunctionN<[T], void>>;\n };\n };\nexport function getUseModelPropsDefinition<\n T,\n ValueKey extends string = 'modelValue',\n UpdateKey extends string = 'onUpdate:modelValue'\n // eslint-disable-next-line\n>(valueKey: ValueKey = 'modelValue' as ValueKey, updateKey: UpdateKey = 'onUpdate:modelValue' as UpdateKey): any {\n return {\n [valueKey]: null,\n [updateKey]: {\n type: Function,\n default: constant(constVoid)\n }\n };\n}\n\nexport type UseModelProps<\n T,\n ValueKey extends string = 'modelValue',\n UpdateKey extends string = 'onUpdate:modelValue'\n> = { [K in ValueKey]?: T | undefined } & { [K in UpdateKey]: FunctionN<[T], void> };\n\nexport function useModel<T>(props: UseModelProps<T>): Model<T>;\nexport function useModel<T, ValueKey extends string, UpdateKey extends string>(\n props: UseModelProps<T, ValueKey, UpdateKey>,\n valueKey: ValueKey,\n updateKey: UpdateKey\n): Model<T>;\nexport function useModel<T, ValueKey extends string = 'modelValue', UpdateKey extends string = 'onUpdate:modelValue'>(\n props: UseModelProps<T, ValueKey, UpdateKey>,\n valueKey: ValueKey = 'modelValue' as ValueKey,\n updateKey: UpdateKey = 'onUpdate:modelValue' as UpdateKey\n): Model<T> {\n const internalValue: Ref<T | undefined> = shallowRef(props[valueKey]);\n\n watch(toRef(props, valueKey), newVal => {\n internalValue.value = newVal;\n });\n\n const value = computed({\n get() {\n return internalValue.value;\n },\n set(val: T | undefined) {\n internalValue.value = val;\n if (val !== undefined) {\n props[updateKey](val);\n }\n }\n });\n\n function onUpdate(e: Event) {\n // eslint-disable-next-line\n // @ts-ignore-next-line\n if (isObject(e.target) && exists(e.target.value)) {\n // eslint-disable-next-line\n // @ts-ignore-next-line\n value.value = e.target.value;\n }\n }\n\n function set(val: T) {\n value.value = val;\n }\n\n return {\n set,\n modelValue: value,\n onNativeInput: onUpdate\n };\n}\n\nexport type Model<T> = {\n set: FunctionN<[T], void>;\n modelValue: Ref<T | undefined>;\n onNativeInput: FunctionN<[Event], void>;\n};\n"],"sourceRoot":"","file":"useModel.js"}

View File

@@ -0,0 +1,2 @@
export * from './provideNoticeController';
export * from './useNoticeController';

View File

@@ -0,0 +1,3 @@
export * from './provideNoticeController';
export * from './useNoticeController';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/noticeController/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAAd;AACA,cAAc,uBAAd","sourcesContent":["export * from './provideNoticeController';\nexport * from './useNoticeController';\n"],"sourceRoot":"","file":"index.js"}

View File

@@ -0,0 +1,18 @@
import { IO } from 'fp-ts/lib/IO';
import { VNode } from 'vue';
import { NoticePlacement } from '../../types/NoticePlacement';
import { Transition } from '../../types/Transition';
import { Remove } from '../shared';
export declare const NOTICE_CONTROLLER_SYMBOL: unique symbol;
export interface ShowNoticeOptions {
render: IO<VNode[]>;
placement: NoticePlacement;
duration: number;
shouldQueue: boolean;
transition?: Transition;
}
export interface NoticeControllerInjection {
showNotice: (options: ShowNoticeOptions) => Remove;
}
export declare const DEFAULT_NOTICE_CONTROLLER_INJECTION: NoticeControllerInjection;
export declare function provideNoticeController(showNotice: (options: ShowNoticeOptions) => Remove): NoticeControllerInjection;

View File

@@ -0,0 +1,14 @@
import { constant, constVoid } from 'fp-ts/lib/function';
import { provide } from 'vue';
export const NOTICE_CONTROLLER_SYMBOL = Symbol('notice-controller');
export const DEFAULT_NOTICE_CONTROLLER_INJECTION = {
showNotice: constant(constVoid)
};
export function provideNoticeController(showNotice) {
const injection = {
showNotice
};
provide(NOTICE_CONTROLLER_SYMBOL, injection);
return injection;
}
//# sourceMappingURL=provideNoticeController.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/noticeController/provideNoticeController.ts"],"names":[],"mappings":"AAAA,SAAS,QAAT,EAAmB,SAAnB,QAAoC,oBAApC;AAEA,SAAS,OAAT,QAA+B,KAA/B;AAKA,OAAO,MAAM,wBAAwB,GAAG,MAAM,CAAC,mBAAD,CAAvC;AAcP,OAAO,MAAM,mCAAmC,GAA8B;AAC5E,EAAA,UAAU,EAAE,QAAQ,CAAC,SAAD;AADwD,CAAvE;AAIP,OAAM,SAAU,uBAAV,CAAkC,UAAlC,EAAoF;AACxF,QAAM,SAAS,GAA8B;AAC3C,IAAA;AAD2C,GAA7C;AAIA,EAAA,OAAO,CAAC,wBAAD,EAA2B,SAA3B,CAAP;AACA,SAAO,SAAP;AACD","sourcesContent":["import { constant, constVoid } from 'fp-ts/lib/function';\nimport { IO } from 'fp-ts/lib/IO';\nimport { provide, VNode } from 'vue';\nimport { NoticePlacement } from '../../types/NoticePlacement';\nimport { Transition } from '../../types/Transition';\nimport { Remove } from '../shared';\n\nexport const NOTICE_CONTROLLER_SYMBOL = Symbol('notice-controller');\n\nexport interface ShowNoticeOptions {\n render: IO<VNode[]>;\n placement: NoticePlacement;\n duration: number;\n shouldQueue: boolean;\n transition?: Transition;\n}\n\nexport interface NoticeControllerInjection {\n showNotice: (options: ShowNoticeOptions) => Remove;\n}\n\nexport const DEFAULT_NOTICE_CONTROLLER_INJECTION: NoticeControllerInjection = {\n showNotice: constant(constVoid)\n};\n\nexport function provideNoticeController(showNotice: (options: ShowNoticeOptions) => Remove) {\n const injection: NoticeControllerInjection = {\n showNotice\n };\n\n provide(NOTICE_CONTROLLER_SYMBOL, injection);\n return injection;\n}\n"],"sourceRoot":"","file":"provideNoticeController.js"}

View File

@@ -0,0 +1,55 @@
import { FunctionN } from 'fp-ts/lib/function';
import { IO } from 'fp-ts/lib/IO';
import { PropType, ExtractPropTypes, VNode, Ref } from 'vue';
import { AllColorsVariant, ColorVariant } from '../../types/ColorVariants';
import { PositionVariant } from '../../types/PositionVariant';
import { Transition } from '../../types/Transition';
export declare const UseNoticePropsDefinition: {
transition: {
type: PropType<Transition>;
required: boolean;
};
position: {
type: PropType<PositionVariant>;
default: "is-bottom";
};
duration: {
type: PropType<number>;
default: number;
};
message: {
type: PropType<string>;
};
shouldQueue: {
type: PropType<boolean>;
default: boolean;
};
variant: {
type: PropType<ColorVariant>;
default: "";
};
isIndefinite: {
type: PropType<boolean>;
default: boolean;
};
};
export interface UseNoticeProps extends ExtractPropTypes<typeof UseNoticePropsDefinition> {
}
export declare const DEFAULT_USE_NOTICE_PROPS: UseNoticeProps;
export interface RenderNoticeOptions {
variant?: AllColorsVariant;
message?: string;
position?: PositionVariant;
}
export interface OpenNoticeOptions extends RenderNoticeOptions {
duration?: number;
shouldQueue?: boolean;
transition?: Transition;
isIndefinite?: boolean;
onAction?: IO<void>;
}
export declare function useNoticeController(props: UseNoticeProps, render: Ref<FunctionN<[RenderNoticeOptions], IO<VNode[]>>>): {
open: (options: OpenNoticeOptions) => void;
close: () => void;
};
export declare type NoticeController = ReturnType<typeof useNoticeController>;

View File

@@ -0,0 +1,98 @@
import { constVoid } from 'fp-ts/lib/function';
import { inject, shallowRef, onUnmounted, computed } from 'vue';
import { formatTransition } from '../transition';
import { DEFAULT_NOTICE_CONTROLLER_INJECTION, NOTICE_CONTROLLER_SYMBOL } from './provideNoticeController';
export const UseNoticePropsDefinition = {
transition: {
type: [Object, String],
required: false
},
position: {
type: String,
default: 'is-bottom'
},
duration: {
type: Number,
default: 2000
},
message: {
type: String
},
shouldQueue: {
type: Boolean,
default: true
},
variant: {
type: String,
default: ''
},
isIndefinite: {
type: Boolean,
default: false
}
};
export const DEFAULT_USE_NOTICE_PROPS = {
position: UseNoticePropsDefinition.position.default,
duration: UseNoticePropsDefinition.duration.default,
shouldQueue: UseNoticePropsDefinition.shouldQueue.default,
variant: UseNoticePropsDefinition.variant.default,
isIndefinite: UseNoticePropsDefinition.isIndefinite.default
};
function useNoticeTransition(props = DEFAULT_USE_NOTICE_PROPS) {
return computed(() => {
if (props.transition) {
return formatTransition(props.transition);
} else {
switch (props.position) {
case 'is-top-right':
case 'is-top':
case 'is-top-left':
return {
'enter-active-class': 'fadeInDown',
'leave-active-class': 'fadeOutUp'
};
case 'is-bottom-right':
case 'is-bottom':
case 'is-bottom-left':
return {
'enter-active-class': 'fadeInUp',
'leave-active-class': 'fadeOutDown'
};
}
}
});
}
export function useNoticeController(props, render) {
const remove = shallowRef(constVoid);
const {
showNotice
} = inject(NOTICE_CONTROLLER_SYMBOL, DEFAULT_NOTICE_CONTROLLER_INJECTION);
const transition = useNoticeTransition(props);
onUnmounted(() => {
remove.value();
});
function open(options) {
const position = options.position ?? props.position;
remove.value();
remove.value = showNotice({
placement: position.includes('top') ? 'top' : 'bottom',
render: render.value(options),
transition: options.transition ?? transition.value,
shouldQueue: options.shouldQueue ?? props.shouldQueue,
duration: options.isIndefinite || props.isIndefinite ? 0 : options.duration ?? props.duration
});
}
return {
open: open,
close: () => {
remove.value();
remove.value = constVoid;
}
};
}
//# sourceMappingURL=useNoticeController.js.map

File diff suppressed because one or more lines are too long

1
node_modules/buetify/lib/composables/pagination/index.d.ts generated vendored Executable file
View File

@@ -0,0 +1 @@
export * from './usePagination';

2
node_modules/buetify/lib/composables/pagination/index.js generated vendored Executable file
View File

@@ -0,0 +1,2 @@
export * from './usePagination';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/pagination/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAd","sourcesContent":["export * from './usePagination';\n"],"sourceRoot":"","file":"index.js"}

View File

@@ -0,0 +1,58 @@
import { PropType, ExtractPropTypes } from 'vue';
export declare const DEFAULT_ITEMS_PER_PAGE: import("vue").Ref<number>;
export declare const UsePaginationPropsDefinition: {
modelValue: {
type: PropType<number>;
default: number;
};
total: {
type: PropType<number>;
required: boolean;
};
perPage: {
type: PropType<number>;
default: () => number;
validator: (value: number) => boolean;
};
items: {
type: PropType<unknown[]>;
default: import("fp-ts/lib/function").Lazy<never[]>;
};
'onUpdate:modelValue': {
type: PropType<import("fp-ts/lib/function").FunctionN<[number], void>>;
default: import("fp-ts/lib/function").Lazy<import("fp-ts/lib/function").FunctionN<[number], void>>;
};
};
export declare type UsePaginationProps = ExtractPropTypes<typeof UsePaginationPropsDefinition>;
export declare function usePagination<T>(props: UsePaginationProps): {
paginatedItems: import("vue").ComputedRef<T[]>;
current: import("vue").ComputedRef<number>;
numberOfPages: import("vue").ComputedRef<number>;
after: import("vue").ComputedRef<number>;
nextPage: import("vue").ComputedRef<number>;
hasNext: import("vue").ComputedRef<boolean>;
previousPage: import("vue").ComputedRef<number>;
hasPrevious: import("vue").ComputedRef<boolean>;
next: (e: Event) => void;
previous: () => void;
first: () => void;
last: () => void;
set: (num: number) => void;
};
export declare type Pagination = ReturnType<typeof usePagination>;
export declare function extractPaginationState(pagination: Pagination): {
paginatedItems: unknown[];
current: number;
numberOfPages: number;
after: number;
nextPage: number;
hasNext: boolean;
previousPage: number;
hasPrevious: boolean;
next: (e: Event) => void;
previous: () => void;
first: () => void;
last: () => void;
set: (num: number) => void;
};
export declare type ExtractedPaginationState = ReturnType<typeof extractPaginationState>;

View File

@@ -0,0 +1,100 @@
import { computed, shallowRef } from 'vue';
import { constEmptyArray, isNumber } from '../../utils/helpers';
import { getUseModelPropsDefinition, useModel } from '../model';
export const DEFAULT_ITEMS_PER_PAGE = shallowRef(25);
export const UsePaginationPropsDefinition = { ...getUseModelPropsDefinition(),
modelValue: {
type: Number,
default: 0
},
total: {
type: Number,
required: true
},
perPage: {
type: Number,
default: () => DEFAULT_ITEMS_PER_PAGE.value,
validator: value => isNumber(value) && value > 0
},
items: {
type: Array,
default: constEmptyArray
}
};
export function usePagination(props) {
const model = useModel(props);
const total = computed(() => props.total ?? props.items.length);
const current = computed(() => Math.max(model.modelValue.value, 1));
const itemsPerPage = computed(() => props.perPage <= 0 ? DEFAULT_ITEMS_PER_PAGE.value : props.perPage);
const numberOfPages = computed(() => Math.ceil(total.value / itemsPerPage.value));
const after = computed(() => Math.max((current.value - 1) * itemsPerPage.value, 0));
const nextPage = computed(() => Math.min(numberOfPages.value, current.value + 1));
const hasNext = computed(() => {
return itemsPerPage.value + after.value < total.value;
});
const previousPage = computed(() => Math.max(0, current.value - 1));
const hasPrevious = computed(() => after.value > 0 && total.value > 0);
const paginatedItems = computed(() => (props.items ?? []).slice(after.value, after.value + itemsPerPage.value));
function next(e) {
console.log('here', e, current.value, hasNext.value);
if (hasNext.value) {
model.modelValue.value = nextPage.value;
}
}
function previous() {
if (hasPrevious.value) {
model.modelValue.value = previousPage.value;
}
}
function first() {
model.modelValue.value = 1;
}
function last() {
model.modelValue.value = numberOfPages.value;
}
function set(num) {
if (num >= 1 && num <= numberOfPages.value) {
model.modelValue.value = num;
}
}
return {
paginatedItems,
current,
numberOfPages,
after,
nextPage,
hasNext,
previousPage,
hasPrevious,
next,
previous,
first,
last,
set
};
}
export function extractPaginationState(pagination) {
return {
paginatedItems: pagination.paginatedItems.value,
current: pagination.current.value,
numberOfPages: pagination.numberOfPages.value,
after: pagination.after.value,
nextPage: pagination.nextPage.value,
hasNext: pagination.hasNext.value,
previousPage: pagination.previousPage.value,
hasPrevious: pagination.hasPrevious.value,
next: pagination.next,
previous: pagination.previous,
first: pagination.first,
last: pagination.last,
set: pagination.set
};
}
//# sourceMappingURL=usePagination.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
export * from './providePopupController';
export * from './usePopupController';

View File

@@ -0,0 +1,3 @@
export * from './providePopupController';
export * from './usePopupController';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/popupController/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAAd;AACA,cAAc,sBAAd","sourcesContent":["export * from './providePopupController';\nexport * from './usePopupController';\n"],"sourceRoot":"","file":"index.js"}

View File

@@ -0,0 +1,14 @@
import { IO } from 'fp-ts/lib/IO';
import { VNode } from 'vue';
import { Transition } from '../../types/Transition';
import { Remove } from '../shared';
export declare const POPUP_CONTROLLER_SYMBOL: unique symbol;
export interface ShowPopupOptions {
render: IO<VNode[]>;
transition?: Transition;
}
export interface PopupControllerInjection {
showPopup: (options: ShowPopupOptions) => Remove;
}
export declare const DEFAULT_POPUP_CONTROLLER_INJECTION: PopupControllerInjection;
export declare function providePopupController(showPopup: (options: ShowPopupOptions) => Remove): PopupControllerInjection;

View File

@@ -0,0 +1,14 @@
import { constant, constVoid } from 'fp-ts/lib/function';
import { provide } from 'vue';
export const POPUP_CONTROLLER_SYMBOL = Symbol('popup-controller');
export const DEFAULT_POPUP_CONTROLLER_INJECTION = {
showPopup: constant(constVoid)
};
export function providePopupController(showPopup) {
const injection = {
showPopup
};
provide(POPUP_CONTROLLER_SYMBOL, injection);
return injection;
}
//# sourceMappingURL=providePopupController.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/popupController/providePopupController.ts"],"names":[],"mappings":"AAAA,SAAS,QAAT,EAAmB,SAAnB,QAAoC,oBAApC;AAEA,SAAS,OAAT,QAA+B,KAA/B;AAIA,OAAO,MAAM,uBAAuB,GAAG,MAAM,CAAC,kBAAD,CAAtC;AAWP,OAAO,MAAM,kCAAkC,GAA6B;AAC1E,EAAA,SAAS,EAAE,QAAQ,CAAC,SAAD;AADuD,CAArE;AAIP,OAAM,SAAU,sBAAV,CAAiC,SAAjC,EAAiF;AACrF,QAAM,SAAS,GAA6B;AAC1C,IAAA;AAD0C,GAA5C;AAIA,EAAA,OAAO,CAAC,uBAAD,EAA0B,SAA1B,CAAP;AACA,SAAO,SAAP;AACD","sourcesContent":["import { constant, constVoid } from 'fp-ts/lib/function';\nimport { IO } from 'fp-ts/lib/IO';\nimport { provide, VNode } from 'vue';\nimport { Transition } from '../../types/Transition';\nimport { Remove } from '../shared';\n\nexport const POPUP_CONTROLLER_SYMBOL = Symbol('popup-controller');\n\nexport interface ShowPopupOptions {\n render: IO<VNode[]>;\n transition?: Transition;\n}\n\nexport interface PopupControllerInjection {\n showPopup: (options: ShowPopupOptions) => Remove;\n}\n\nexport const DEFAULT_POPUP_CONTROLLER_INJECTION: PopupControllerInjection = {\n showPopup: constant(constVoid)\n};\n\nexport function providePopupController(showPopup: (options: ShowPopupOptions) => Remove) {\n const injection: PopupControllerInjection = {\n showPopup\n };\n\n provide(POPUP_CONTROLLER_SYMBOL, injection);\n return injection;\n}\n"],"sourceRoot":"","file":"providePopupController.js"}

View File

@@ -0,0 +1,58 @@
import { IO } from 'fp-ts/lib/IO';
import { VNode, ExtractPropTypes, Ref } from 'vue';
export declare const UsePopupControllerPropsDefinition: {
onToggle: {
type: import("vue").PropType<import("fp-ts/lib/function").FunctionN<[boolean], void>>;
required: false;
};
onSetOn: {
type: import("vue").PropType<IO<void>>;
required: false;
};
onSetOff: {
type: import("vue").PropType<IO<void>>;
required: false;
};
isActive: {
type: import("vue").PropType<boolean>;
default: boolean;
};
hasPopup: {
type: import("vue").PropType<boolean>;
default: boolean;
};
transition: {
type: import("vue").PropType<import("../..").Transition>;
default: import("fp-ts/lib/function").Lazy<import("../..").Transition>;
};
};
export declare type UsePopupProps = ExtractPropTypes<typeof UsePopupControllerPropsDefinition>;
export declare function usePopupController(props: UsePopupProps, render: Ref<IO<VNode[]>>): {
isOpen: import("vue").ComputedRef<boolean>;
attrs: import("vue").ComputedRef<{
'aria-haspopup'?: boolean;
tabindex: number;
role: string;
type: string;
'aria-pressed': boolean;
'aria-expanded': boolean;
}>;
listeners: {
onClick: IO<void>;
onKeydown: (e: KeyboardEvent) => void;
};
props: import("vue").ComputedRef<{
onClick: IO<void>;
onKeydown: (e: KeyboardEvent) => void;
'aria-haspopup'?: boolean;
tabindex: number;
role: string;
type: string;
'aria-pressed': boolean;
'aria-expanded': boolean;
}>;
open: (e?: Event | undefined) => void;
close: (e?: Event | undefined) => void;
toggle: (e?: Event | undefined) => void;
};
export declare type PopupController = ReturnType<typeof usePopupController>;

View File

@@ -0,0 +1,58 @@
import { constVoid } from 'fp-ts/lib/function';
import { inject, shallowRef, onMounted, computed, watchEffect, toRef, onUnmounted } from 'vue';
import { getToggleAttrs, getUseTogglePropsDefinition, useToggle } from '../toggle';
import { FadeTransitionPropsDefinition } from '../transition';
import { DEFAULT_POPUP_CONTROLLER_INJECTION, POPUP_CONTROLLER_SYMBOL } from './providePopupController';
export const UsePopupControllerPropsDefinition = { ...FadeTransitionPropsDefinition,
...getUseTogglePropsDefinition('isActive')
};
export function usePopupController(props, render) {
const hasMounted = shallowRef(false);
onMounted(() => {
hasMounted.value = true;
});
let remove = constVoid;
const {
isOn,
setOn,
setOff,
toggle,
listeners
} = useToggle(props, 'isActive');
const {
showPopup
} = inject(POPUP_CONTROLLER_SYMBOL, DEFAULT_POPUP_CONTROLLER_INJECTION);
const isOpen = computed(() => {
return hasMounted.value && isOn.value;
});
const attrs = getToggleAttrs(isOpen, toRef(props, 'hasPopup'));
watchEffect(() => {
if (isOpen.value) {
remove();
remove = showPopup({
render: render.value,
transition: props.transition
});
} else {
remove();
remove = constVoid;
}
}, {
flush: 'sync'
});
onUnmounted(() => {
remove();
});
return {
isOpen,
attrs,
listeners,
props: computed(() => ({ ...attrs.value,
...listeners
})),
open: setOn,
close: setOff,
toggle: toggle
};
}
//# sourceMappingURL=usePopupController.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/popupController/usePopupController.ts"],"names":[],"mappings":"AAAA,SAAS,SAAT,QAA0B,oBAA1B;AAEA,SACE,MADF,EAIE,UAJF,EAKE,SALF,EAME,QANF,EAOE,WAPF,EAQE,KARF,EASE,WATF,QAWO,KAXP;AAYA,SAAS,cAAT,EAAyB,2BAAzB,EAAsD,SAAtD,QAAuE,WAAvE;AACA,SAAS,6BAAT,QAA8C,eAA9C;AACA,SAAS,kCAAT,EAA6C,uBAA7C,QAA4E,0BAA5E;AAEA,OAAO,MAAM,iCAAiC,GAAG,EAC/C,GAAG,6BAD4C;AAE/C,KAAG,2BAA2B,CAAC,UAAD;AAFiB,CAA1C;AAOP,OAAM,SAAU,kBAAV,CAA6B,KAA7B,EAAmD,MAAnD,EAA2E;AAC/E,QAAM,UAAU,GAAG,UAAU,CAAC,KAAD,CAA7B;AACA,EAAA,SAAS,CAAC,MAAK;AACb,IAAA,UAAU,CAAC,KAAX,GAAmB,IAAnB;AACD,GAFQ,CAAT;AAGA,MAAI,MAAM,GAAG,SAAb;AACA,QAAM;AAAE,IAAA,IAAF;AAAQ,IAAA,KAAR;AAAe,IAAA,MAAf;AAAuB,IAAA,MAAvB;AAA+B,IAAA;AAA/B,MAA6C,SAAS,CAAC,KAAD,EAAQ,UAAR,CAA5D;AACA,QAAM;AAAE,IAAA;AAAF,MAAgB,MAAM,CAAC,uBAAD,EAA0B,kCAA1B,CAA5B;AACA,QAAM,MAAM,GAAG,QAAQ,CAAC,MAAK;AAC3B,WAAO,UAAU,CAAC,KAAX,IAAoB,IAAI,CAAC,KAAhC;AACD,GAFsB,CAAvB;AAGA,QAAM,KAAK,GAAG,cAAc,CAAC,MAAD,EAAS,KAAK,CAAC,KAAD,EAAQ,UAAR,CAAd,CAA5B;AACA,EAAA,WAAW,CACT,MAAK;AACH,QAAI,MAAM,CAAC,KAAX,EAAkB;AAChB,MAAA,MAAM;AACN,MAAA,MAAM,GAAG,SAAS,CAAC;AACjB,QAAA,MAAM,EAAE,MAAM,CAAC,KADE;AAEjB,QAAA,UAAU,EAAE,KAAK,CAAC;AAFD,OAAD,CAAlB;AAID,KAND,MAMO;AACL,MAAA,MAAM;AACN,MAAA,MAAM,GAAG,SAAT;AACD;AACF,GAZQ,EAaT;AACE,IAAA,KAAK,EAAE;AADT,GAbS,CAAX;AAkBA,EAAA,WAAW,CAAC,MAAK;AACf,IAAA,MAAM;AACP,GAFU,CAAX;AAIA,SAAO;AACL,IAAA,MADK;AAEL,IAAA,KAFK;AAGL,IAAA,SAHK;AAIL,IAAA,KAAK,EAAE,QAAQ,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,KAAX;AAAkB,SAAG;AAArB,KAAP,CAAD,CAJV;AAKL,IAAA,IAAI,EAAE,KALD;AAML,IAAA,KAAK,EAAE,MANF;AAOL,IAAA,MAAM,EAAE;AAPH,GAAP;AASD","sourcesContent":["import { constVoid } from 'fp-ts/lib/function';\nimport { IO } from 'fp-ts/lib/IO';\nimport {\n inject,\n VNode,\n ExtractPropTypes,\n shallowRef,\n onMounted,\n computed,\n watchEffect,\n toRef,\n onUnmounted,\n Ref\n} from 'vue';\nimport { getToggleAttrs, getUseTogglePropsDefinition, useToggle } from '../toggle';\nimport { FadeTransitionPropsDefinition } from '../transition';\nimport { DEFAULT_POPUP_CONTROLLER_INJECTION, POPUP_CONTROLLER_SYMBOL } from './providePopupController';\n\nexport const UsePopupControllerPropsDefinition = {\n ...FadeTransitionPropsDefinition,\n ...getUseTogglePropsDefinition('isActive')\n};\n\nexport type UsePopupProps = ExtractPropTypes<typeof UsePopupControllerPropsDefinition>;\n\nexport function usePopupController(props: UsePopupProps, render: Ref<IO<VNode[]>>) {\n const hasMounted = shallowRef(false);\n onMounted(() => {\n hasMounted.value = true;\n });\n let remove = constVoid;\n const { isOn, setOn, setOff, toggle, listeners } = useToggle(props, 'isActive');\n const { showPopup } = inject(POPUP_CONTROLLER_SYMBOL, DEFAULT_POPUP_CONTROLLER_INJECTION);\n const isOpen = computed(() => {\n return hasMounted.value && isOn.value;\n });\n const attrs = getToggleAttrs(isOpen, toRef(props, 'hasPopup'));\n watchEffect(\n () => {\n if (isOpen.value) {\n remove();\n remove = showPopup({\n render: render.value,\n transition: props.transition\n });\n } else {\n remove();\n remove = constVoid;\n }\n },\n {\n flush: 'sync'\n }\n );\n\n onUnmounted(() => {\n remove();\n });\n\n return {\n isOpen,\n attrs,\n listeners,\n props: computed(() => ({ ...attrs.value, ...listeners })),\n open: setOn,\n close: setOff,\n toggle: toggle\n };\n}\n\nexport type PopupController = ReturnType<typeof usePopupController>;\n"],"sourceRoot":"","file":"usePopupController.js"}

1
node_modules/buetify/lib/composables/proxy/index.d.ts generated vendored Executable file
View File

@@ -0,0 +1 @@
export * from './useProxy';

2
node_modules/buetify/lib/composables/proxy/index.js generated vendored Executable file
View File

@@ -0,0 +1,2 @@
export * from './useProxy';
//# sourceMappingURL=index.js.map

1
node_modules/buetify/lib/composables/proxy/index.js.map generated vendored Executable file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/proxy/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAd","sourcesContent":["export * from './useProxy';\n"],"sourceRoot":"","file":"index.js"}

6
node_modules/buetify/lib/composables/proxy/useProxy.d.ts generated vendored Executable file
View File

@@ -0,0 +1,6 @@
import { FunctionN } from 'fp-ts/lib/function';
import { Ref } from 'vue';
export declare function useProxy<T>(ref: Ref<T>, onUpdate?: Ref<FunctionN<[T], void> | undefined> | FunctionN<[T], void>): Proxy<T>;
export interface Proxy<T> {
value: Ref<T>;
}

26
node_modules/buetify/lib/composables/proxy/useProxy.js generated vendored Executable file
View File

@@ -0,0 +1,26 @@
import { shallowRef, watch, computed, unref } from 'vue';
export function useProxy(ref, onUpdate) {
const internalValue = shallowRef(ref.value);
watch(ref, newValue => {
internalValue.value = newValue;
});
const value = computed({
get() {
return internalValue.value;
},
set(val) {
internalValue.value = val;
const update = unref(onUpdate);
if (update) {
update(val);
}
}
});
return {
value
};
}
//# sourceMappingURL=useProxy.js.map

1
node_modules/buetify/lib/composables/proxy/useProxy.js.map generated vendored Executable file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/proxy/useProxy.ts"],"names":[],"mappings":"AACA,SAAc,UAAd,EAA0B,KAA1B,EAAiC,QAAjC,EAA2C,KAA3C,QAAwD,KAAxD;AAEA,OAAM,SAAU,QAAV,CACJ,GADI,EAEJ,QAFI,EAEmE;AAEvE,QAAM,aAAa,GAAG,UAAU,CAAC,GAAG,CAAC,KAAL,CAAhC;AACA,EAAA,KAAK,CAAC,GAAD,EAAM,QAAQ,IAAG;AACpB,IAAA,aAAa,CAAC,KAAd,GAAsB,QAAtB;AACD,GAFI,CAAL;AAIA,QAAM,KAAK,GAAG,QAAQ,CAAC;AACrB,IAAA,GAAG,GAAA;AACD,aAAO,aAAa,CAAC,KAArB;AACD,KAHoB;;AAIrB,IAAA,GAAG,CAAC,GAAD,EAAO;AACR,MAAA,aAAa,CAAC,KAAd,GAAsB,GAAtB;AACA,YAAM,MAAM,GAAG,KAAK,CAAC,QAAD,CAApB;;AACA,UAAI,MAAJ,EAAY;AACV,QAAA,MAAM,CAAC,GAAD,CAAN;AACD;AACF;;AAVoB,GAAD,CAAtB;AAaA,SAAO;AACL,IAAA;AADK,GAAP;AAGD","sourcesContent":["import { FunctionN } from 'fp-ts/lib/function';\nimport { Ref, shallowRef, watch, computed, unref } from 'vue';\n\nexport function useProxy<T>(\n ref: Ref<T>,\n onUpdate?: Ref<FunctionN<[T], void> | undefined> | FunctionN<[T], void>\n): Proxy<T> {\n const internalValue = shallowRef(ref.value);\n watch(ref, newValue => {\n internalValue.value = newValue;\n });\n\n const value = computed({\n get() {\n return internalValue.value;\n },\n set(val: T) {\n internalValue.value = val;\n const update = unref(onUpdate);\n if (update) {\n update(val);\n }\n }\n });\n\n return {\n value\n };\n}\n\nexport interface Proxy<T> {\n value: Ref<T>;\n}\n"],"sourceRoot":"","file":"useProxy.js"}

View File

@@ -0,0 +1 @@
export * from './useSelectionControl';

View File

@@ -0,0 +1,2 @@
export * from './useSelectionControl';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/selectionControl/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAd","sourcesContent":["export * from './useSelectionControl';\n"],"sourceRoot":"","file":"index.js"}

View File

@@ -0,0 +1,144 @@
import { Eq } from 'fp-ts/lib/Eq';
import { PropType, Ref, ComputedRef } from 'vue';
import { ColorVariant } from '../../types/ColorVariants';
import { SizeVariant } from '../../types/SizeVariants';
import { UseDisableProps } from '../disable';
import { UseLabelIdProps } from '../labelId';
import { UseModelProps } from '../model';
import { EqProps } from '../shared';
export declare function getUseSelectablePropsDefinition<T>(): {
isFocused: {
type: PropType<boolean>;
default: boolean;
};
onFocus: {
type: PropType<(e?: Event | undefined) => void>;
required: false;
};
onBlur: {
type: PropType<(e?: Event | undefined) => void>;
required: false;
};
focusOnMount: {
type: PropType<boolean>;
default: boolean;
};
labelFor: PropType<string>;
label: {
type: PropType<string>;
default: string;
};
isDisabled: {
type: PropType<boolean>;
required: boolean;
default: boolean;
};
isReadonly: {
type: PropType<boolean>;
required: boolean;
default: boolean;
};
disableIfReadonly: {
type: PropType<boolean>;
required: boolean;
default: boolean;
};
modelValue: {
type: PropType<T>;
required: false;
};
'onUpdate:modelValue': {
type: PropType<import("fp-ts/lib/function").FunctionN<[T], void>>;
default: import("fp-ts/lib/function").Lazy<import("fp-ts/lib/function").FunctionN<[T], void>>;
};
eq: {
type: PropType<Eq<T>>;
default: import("fp-ts/lib/function").Lazy<Eq<T>>;
};
nativeValue: {
type: PropType<unknown>;
required: boolean;
default: null;
};
trueValue: {
type: PropType<T>;
default: T;
};
falseValue: {
type: PropType<T>;
default: T;
};
isIndeterminate: {
type: PropType<boolean>;
default: boolean;
};
isMultiple: {
type: PropType<boolean>;
default: boolean;
};
variant: {
type: PropType<ColorVariant>;
default: ColorVariant;
};
size: {
type: PropType<SizeVariant>;
default: SizeVariant;
};
isRequired: {
type: PropType<boolean>;
default: boolean;
};
name: {
type: PropType<string>;
required: boolean;
};
};
export declare type UseSelectableProps<T> = {
nativeValue: unknown;
trueValue: T;
falseValue: T;
indeterminateValue?: T;
isMultiple: boolean;
variant: ColorVariant;
size: SizeVariant;
isRequired: boolean;
isIndeterminate: boolean;
name?: string;
} & EqProps<T> & UseModelProps<T> & UseDisableProps & UseLabelIdProps;
export declare function useSelectionControl<T>(props: UseSelectableProps<T>, ref: Ref<HTMLElement>, role: string, type: string): {
isDisabled: Ref<boolean>;
isMultiple: ComputedRef<boolean>;
isActive: ComputedRef<boolean>;
attrs: ComputedRef<{
role: string;
type: string;
id: string;
name: string | undefined;
checked: boolean;
'aria-checked': boolean;
'aria-disabled': boolean;
'aria-labelledby': string;
tabindex: number;
readonly: boolean;
disabled: boolean;
required: boolean;
indeterminate: boolean | undefined;
value: string;
'true-value': string;
'false-value': string;
}>;
onChange: () => void;
onKeydown: (e: KeyboardEvent) => void;
onClick: () => void;
label: {
id: ComputedRef<string>;
labelId: ComputedRef<string>;
label: Ref<string>;
};
isFocused: Ref<boolean>;
focus: (e?: Event | undefined) => void;
onFocus: (e?: Event | undefined) => void;
onBlur: (e?: Event | undefined) => void;
modelValue: Ref<T | undefined>;
};
export declare type SelectionControl = ReturnType<typeof useSelectionControl>;

View File

@@ -0,0 +1,150 @@
import { computed, toRef } from 'vue';
import { isEnterEvent, isSpaceEvent } from '../../utils/eventHelpers';
import { toggleListItem } from '../../utils/helpers';
import { useDisable, UseDisablePropsDefinition } from '../disable';
import { useFocus, UseFocusPropsDefinition } from '../focus';
import { useLabelId, UseLabelIdPropsDefinition } from '../labelId';
import { getUseModelPropsDefinition, useModel } from '../model';
import { getEqPropsDefinition } from '../shared';
export function getUseSelectablePropsDefinition() {
return {
nativeValue: {
type: null,
required: false,
default: null
},
trueValue: {
type: null,
default: true
},
falseValue: {
type: null,
default: false
},
isIndeterminate: {
type: Boolean,
default: false
},
isMultiple: {
type: Boolean,
default: false
},
variant: {
type: String,
default: 'is-primary'
},
size: {
type: String,
default: ''
},
isRequired: {
type: Boolean,
default: false
},
name: {
type: String,
required: false
},
...getEqPropsDefinition(),
...getUseModelPropsDefinition(),
...UseDisablePropsDefinition,
...UseLabelIdPropsDefinition,
...UseFocusPropsDefinition
};
}
function getIsActive(value, trueValue, isMultiple, eq) {
if (isMultiple) {
if (!Array.isArray(value)) return false;
return trueValue !== undefined && value.some(item => eq.equals(item, trueValue));
}
if (!Array.isArray(value) && trueValue !== undefined) {
return value !== undefined && eq.equals(value, trueValue);
}
return false;
}
function getOnChange(value, trueValue, falseValue, isDisabled, isMultiple, eq) {
return function onChange() {
if (isDisabled.value) return;
if (trueValue.value === undefined) return;
const currentValue = value.value;
const tValue = trueValue.value;
const fValue = falseValue.value;
if (isMultiple.value) {
if (!Array.isArray(currentValue)) {
value.value = [];
} else {
value.value = toggleListItem(eq.value)(tValue, currentValue);
}
} else if (!Array.isArray(currentValue)) {
if (currentValue === undefined || currentValue !== undefined && !eq.value.equals(currentValue, tValue)) {
value.value = tValue;
} else {
value.value = fValue;
}
}
};
}
function getInputAttrs(role, type, id, labelId, isActive, isDisabled, isReadonly, isRequired, trueValue, falseValue, nativeValue, isIndeterminate, name) {
return {
role,
type,
id,
name,
checked: isActive,
'aria-checked': isActive,
'aria-disabled': isDisabled,
'aria-labelledby': labelId,
tabindex: -1,
readonly: isReadonly,
disabled: isDisabled,
required: isRequired,
indeterminate: isIndeterminate,
value: JSON.stringify(nativeValue),
'true-value': JSON.stringify(trueValue),
'false-value': JSON.stringify(falseValue)
};
}
export function useSelectionControl(props, ref, role, type) {
const {
modelValue
} = useModel(props);
const focus = useFocus(props, ref);
const trueValue = computed(() => props.nativeValue || props.trueValue);
const label = useLabelId(props, role);
const isMultiple = computed(() => props.isMultiple || Array.isArray(modelValue.value));
const isActive = computed(() => getIsActive(modelValue.value, trueValue.value, isMultiple.value, props.eq));
const isDisabled = useDisable(props);
const onChange = getOnChange(modelValue, trueValue, toRef(props, 'falseValue'), isDisabled, isMultiple, toRef(props, 'eq'));
const attrs = computed(() => getInputAttrs(role, type, label.id.value, label.labelId.value, isActive.value, isDisabled.value, props.isReadonly, props.isRequired, props.trueValue, props.falseValue, props.nativeValue, props.isIndeterminate, props.name));
function onKeydown(e) {
if (isEnterEvent(e) || isSpaceEvent(e)) {
ref.value?.click();
}
}
function onClick() {
focus.focus();
}
return {
modelValue,
...focus,
isDisabled,
isMultiple,
isActive,
attrs,
onChange,
onKeydown,
onClick,
label
};
}
//# sourceMappingURL=useSelectionControl.js.map

File diff suppressed because one or more lines are too long

13
node_modules/buetify/lib/composables/shared/index.d.ts generated vendored Executable file
View File

@@ -0,0 +1,13 @@
import { PropType } from 'vue';
import { Eq } from 'fp-ts/lib/Eq';
import { IO } from 'fp-ts/lib/IO';
export declare type Remove = IO<void>;
export declare function getEqPropsDefinition<T>(eq?: Eq<T>): {
eq: {
type: PropType<Eq<T>>;
default: import("fp-ts/lib/function").Lazy<Eq<T>>;
};
};
export interface EqProps<T> {
eq: Eq<T>;
}

13
node_modules/buetify/lib/composables/shared/index.js generated vendored Executable file
View File

@@ -0,0 +1,13 @@
import { constant } from 'fp-ts/lib/function';
import { fromEquals } from 'fp-ts/lib/Eq';
import { deepEqual } from '../../utils/helpers';
const eqDeep = fromEquals(deepEqual);
export function getEqPropsDefinition(eq = eqDeep) {
return {
eq: {
type: Object,
default: constant(eq)
}
};
}
//# sourceMappingURL=index.js.map

1
node_modules/buetify/lib/composables/shared/index.js.map generated vendored Executable file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/shared/index.ts"],"names":[],"mappings":"AAAA,SAAS,QAAT,QAAyB,oBAAzB;AAEA,SAAa,UAAb,QAA+B,cAA/B;AAEA,SAAS,SAAT,QAA0B,qBAA1B;AAIA,MAAM,MAAM,GAAgB,UAAU,CAAC,SAAD,CAAtC;AAEA,OAAM,SAAU,oBAAV,CAAkC,EAAA,GAAY,MAA9C,EAAoD;AACxD,SAAO;AACL,IAAA,EAAE,EAAE;AACF,MAAA,IAAI,EAAE,MADJ;AAEF,MAAA,OAAO,EAAE,QAAQ,CAAC,EAAD;AAFf;AADC,GAAP;AAMD","sourcesContent":["import { constant } from 'fp-ts/lib/function';\nimport { PropType } from 'vue';\nimport { Eq, fromEquals } from 'fp-ts/lib/Eq';\nimport { IO } from 'fp-ts/lib/IO';\nimport { deepEqual } from '../../utils/helpers';\n\nexport type Remove = IO<void>;\n\nconst eqDeep: Eq<unknown> = fromEquals(deepEqual);\n\nexport function getEqPropsDefinition<T>(eq: Eq<T> = eqDeep) {\n return {\n eq: {\n type: Object as PropType<Eq<T>>,\n default: constant(eq)\n }\n };\n}\n\nexport interface EqProps<T> {\n eq: Eq<T>;\n}\n"],"sourceRoot":"","file":"index.js"}

1
node_modules/buetify/lib/composables/snackbar/index.d.ts generated vendored Executable file
View File

@@ -0,0 +1 @@
export * from './useSnackbar';

2
node_modules/buetify/lib/composables/snackbar/index.js generated vendored Executable file
View File

@@ -0,0 +1,2 @@
export * from './useSnackbar';
//# sourceMappingURL=index.js.map

1
node_modules/buetify/lib/composables/snackbar/index.js.map generated vendored Executable file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/snackbar/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAd","sourcesContent":["export * from './useSnackbar';\n"],"sourceRoot":"","file":"index.js"}

View File

@@ -0,0 +1,54 @@
import { FunctionN } from 'fp-ts/lib/function';
import { IO } from 'fp-ts/lib/IO';
import { ExtractPropTypes, PropType, Slots } from 'vue';
import { ColorVariant, PositionVariant } from '../../types';
import { NoticeController, OpenNoticeOptions, RenderNoticeOptions } from '../noticeController';
export declare const SnackbarPropsDefinition: {
position: {
type: PropType<PositionVariant>;
default: "is-bottom-right";
};
actionText: {
type: PropType<string>;
default: string;
};
onAction: {
type: PropType<IO<void>>;
default: import("fp-ts/lib/function").Lazy<() => void>;
};
variant: {
type: PropType<ColorVariant>;
default: "is-success";
};
transition: {
type: PropType<import("../../types").Transition>;
required: boolean;
};
duration: {
type: PropType<number>;
default: number;
};
message: {
type: PropType<string>;
};
shouldQueue: {
type: PropType<boolean>;
default: boolean;
};
isIndefinite: {
type: PropType<boolean>;
default: boolean;
};
};
export interface SnackbarProps extends ExtractPropTypes<typeof SnackbarPropsDefinition> {
}
export interface RenderSnackbarOptions extends RenderNoticeOptions, OpenNoticeOptions {
onAction?: IO<void>;
actionText?: string;
}
export interface OpenSnackbarOptions extends RenderSnackbarOptions {
}
export interface SnackbarController extends NoticeController {
open: FunctionN<[OpenSnackbarOptions], void>;
}
export declare function useSnackbar(props?: SnackbarProps, slots?: Slots): SnackbarController;

71
node_modules/buetify/lib/composables/snackbar/useSnackbar.js generated vendored Executable file
View File

@@ -0,0 +1,71 @@
import { constant, constVoid } from 'fp-ts/lib/function';
import { h, shallowRef } from 'vue';
import { constEmptyArray } from '../../utils/helpers';
import { DEFAULT_USE_NOTICE_PROPS, useNoticeController, UseNoticePropsDefinition } from '../noticeController';
export const SnackbarPropsDefinition = { ...UseNoticePropsDefinition,
position: {
type: String,
default: 'is-bottom-right'
},
actionText: {
type: String,
default: 'OK'
},
onAction: {
type: Function,
default: constant(constVoid)
},
variant: {
type: String,
default: 'is-success'
}
};
const DEFAULT_SNACKBAR_PROPS = { ...DEFAULT_USE_NOTICE_PROPS,
variant: SnackbarPropsDefinition.variant.default,
position: SnackbarPropsDefinition.position.default,
actionText: SnackbarPropsDefinition.actionText.default,
onAction: SnackbarPropsDefinition.onAction.default()
};
function generateMessage(slots, message) {
return message ? h('p', {
class: 'text',
innerHTML: message
}) : h('p', {
class: 'text'
}, slots.message && slots.message());
}
function generateAction(props, slots, noticeController, options) {
return h('div', {
class: ['action', options.variant ?? props.variant, options.position ?? props.position]
}, [h('button', {
class: 'button',
onClick: () => {
if (options.onAction) {
options.onAction();
} else {
props.onAction();
}
noticeController.close();
}
}, slots.action ? slots.action(noticeController) : options.actionText ?? props.actionText)]);
}
function getGenerateSnackbar(props, slots, noticeController) {
return options => () => {
return [h('article', {
class: ['snackbar', options.position || props.position],
role: 'alert'
}, [generateMessage(slots, options.message ?? props.message), generateAction(props, slots, noticeController, options)])];
};
}
export function useSnackbar(props = DEFAULT_SNACKBAR_PROPS, slots = {}) {
const renderNotification = shallowRef(constant(constEmptyArray));
const controller = useNoticeController(props, renderNotification);
renderNotification.value = getGenerateSnackbar(props, slots, controller);
return controller;
}
//# sourceMappingURL=useSnackbar.js.map

File diff suppressed because one or more lines are too long

2
node_modules/buetify/lib/composables/theme/index.d.ts generated vendored Executable file
View File

@@ -0,0 +1,2 @@
export * from './provideTheme';
export * from './useTheme';

3
node_modules/buetify/lib/composables/theme/index.js generated vendored Executable file
View File

@@ -0,0 +1,3 @@
export * from './provideTheme';
export * from './useTheme';
//# sourceMappingURL=index.js.map

1
node_modules/buetify/lib/composables/theme/index.js.map generated vendored Executable file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/theme/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAd;AACA,cAAc,YAAd","sourcesContent":["export * from './provideTheme';\nexport * from './useTheme';\n"],"sourceRoot":"","file":"index.js"}

26
node_modules/buetify/lib/composables/theme/provideTheme.d.ts generated vendored Executable file
View File

@@ -0,0 +1,26 @@
import { Option } from 'fp-ts/lib/Option';
import { Ref, ExtractPropTypes, PropType } from 'vue';
export declare type ThemeVariant = 'dark' | 'light';
export interface ThemeInjection {
isThemeable: Ref<boolean>;
currentTheme: Ref<Option<ThemeVariant>>;
setTheme: (theme: ThemeVariant) => void;
}
export declare const DEFAULT_THEME_INJECTION: ThemeInjection;
export declare const THEME_INJECTION_SYMBOL: unique symbol;
export declare const ProvideThemePropDefinitions: {
isThemeable: {
type: PropType<boolean>;
default: boolean;
};
persistTheme: {
type: PropType<boolean>;
default: boolean;
};
};
export declare type ProvideThemeProps = ExtractPropTypes<typeof ProvideThemePropDefinitions>;
export declare function provideTheme(props: ProvideThemeProps): {
setTheme: (newTheme: ThemeVariant) => void;
currentTheme: Ref<import("fp-ts/lib/Option").None> | Ref<import("fp-ts/lib/Option").Some<ThemeVariant>>;
isThemeable: Ref<boolean>;
};

49
node_modules/buetify/lib/composables/theme/provideTheme.js generated vendored Executable file
View File

@@ -0,0 +1,49 @@
import { getItem, setItem } from 'fp-ts-local-storage';
import { constant, constVoid } from 'fp-ts/lib/function';
import { getOrElse, none, some } from 'fp-ts/lib/Option';
import { provide, shallowRef, watch } from 'vue';
export const DEFAULT_THEME_INJECTION = {
currentTheme: shallowRef(none),
isThemeable: shallowRef(false),
setTheme: constVoid
};
export const THEME_INJECTION_SYMBOL = Symbol('theme');
const persistentTheme = getOrElse(constant('dark'))(getItem('theme')());
export const ProvideThemePropDefinitions = {
isThemeable: {
type: Boolean,
default: true
},
persistTheme: {
type: Boolean,
default: true
}
};
export function provideTheme(props) {
const isThemeable = shallowRef(props.isThemeable);
watch(() => props.isThemeable, themeable => {
isThemeable.value = themeable;
});
const currentTheme = shallowRef(some(persistentTheme));
function setTheme(newTheme) {
currentTheme.value = some(newTheme);
if (props.persistTheme) {
setItem('theme', newTheme)();
}
}
const injection = {
isThemeable,
currentTheme,
setTheme
};
provide(THEME_INJECTION_SYMBOL, injection);
return {
setTheme,
currentTheme,
isThemeable
};
}
//# sourceMappingURL=provideTheme.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/composables/theme/provideTheme.ts"],"names":[],"mappings":"AAAA,SAAS,OAAT,EAAkB,OAAlB,QAAiC,qBAAjC;AACA,SAAS,QAAT,EAAmB,SAAnB,QAAoC,oBAApC;AACA,SAAS,SAAT,EAAoB,IAApB,EAAkC,IAAlC,QAA8C,kBAA9C;AACA,SAAS,OAAT,EAAkB,UAAlB,EAAmC,KAAnC,QAA4E,KAA5E;AAUA,OAAO,MAAM,uBAAuB,GAAmB;AACrD,EAAA,YAAY,EAAE,UAAU,CAAC,IAAD,CAD6B;AAErD,EAAA,WAAW,EAAE,UAAU,CAAC,KAAD,CAF8B;AAGrD,EAAA,QAAQ,EAAE;AAH2C,CAAhD;AAMP,OAAO,MAAM,sBAAsB,GAAG,MAAM,CAAC,OAAD,CAArC;AAEP,MAAM,eAAe,GAAG,SAAS,CAAe,QAAQ,CAAe,MAAf,CAAvB,CAAT,CACtB,OAAO,CAAC,OAAD,CAAP,EADsB,CAAxB;AAIA,OAAO,MAAM,2BAA2B,GAAG;AACzC,EAAA,WAAW,EAAE;AACX,IAAA,IAAI,EAAE,OADK;AAEX,IAAA,OAAO,EAAE;AAFE,GAD4B;AAKzC,EAAA,YAAY,EAAE;AACZ,IAAA,IAAI,EAAE,OADM;AAEZ,IAAA,OAAO,EAAE;AAFG;AAL2B,CAApC;AAaP,OAAM,SAAU,YAAV,CAAuB,KAAvB,EAA+C;AACnD,QAAM,WAAW,GAAG,UAAU,CAAC,KAAK,CAAC,WAAP,CAA9B;AACA,EAAA,KAAK,CACH,MAAM,KAAK,CAAC,WADT,EAEH,SAAS,IAAG;AACV,IAAA,WAAW,CAAC,KAAZ,GAAoB,SAApB;AACD,GAJE,CAAL;AAMA,QAAM,YAAY,GAAG,UAAU,CAAC,IAAI,CAAC,eAAD,CAAL,CAA/B;;AACA,WAAS,QAAT,CAAkB,QAAlB,EAAwC;AACtC,IAAA,YAAY,CAAC,KAAb,GAAqB,IAAI,CAAC,QAAD,CAAzB;;AACA,QAAI,KAAK,CAAC,YAAV,EAAwB;AACtB,MAAA,OAAO,CAAC,OAAD,EAAU,QAAV,CAAP;AACD;AACF;;AACD,QAAM,SAAS,GAAmB;AAChC,IAAA,WADgC;AAEhC,IAAA,YAFgC;AAGhC,IAAA;AAHgC,GAAlC;AAKA,EAAA,OAAO,CAAC,sBAAD,EAAyB,SAAzB,CAAP;AACA,SAAO;AACL,IAAA,QADK;AAEL,IAAA,YAFK;AAGL,IAAA;AAHK,GAAP;AAKD","sourcesContent":["import { getItem, setItem } from 'fp-ts-local-storage';\nimport { constant, constVoid } from 'fp-ts/lib/function';\nimport { getOrElse, none, Option, some } from 'fp-ts/lib/Option';\nimport { provide, shallowRef, Ref, watch, ExtractPropTypes, PropType } from 'vue';\n\nexport type ThemeVariant = 'dark' | 'light';\n\nexport interface ThemeInjection {\n isThemeable: Ref<boolean>;\n currentTheme: Ref<Option<ThemeVariant>>; // allows for easier defaults in injected component\n setTheme: (theme: ThemeVariant) => void;\n}\n\nexport const DEFAULT_THEME_INJECTION: ThemeInjection = {\n currentTheme: shallowRef(none),\n isThemeable: shallowRef(false),\n setTheme: constVoid\n};\n\nexport const THEME_INJECTION_SYMBOL = Symbol('theme');\n\nconst persistentTheme = getOrElse<ThemeVariant>(constant<ThemeVariant>('dark'))(\n getItem('theme')() as Option<ThemeVariant>\n);\n\nexport const ProvideThemePropDefinitions = {\n isThemeable: {\n type: Boolean as PropType<boolean>,\n default: true\n },\n persistTheme: {\n type: Boolean as PropType<boolean>,\n default: true\n }\n};\n\nexport type ProvideThemeProps = ExtractPropTypes<typeof ProvideThemePropDefinitions>;\n\nexport function provideTheme(props: ProvideThemeProps) {\n const isThemeable = shallowRef(props.isThemeable);\n watch(\n () => props.isThemeable,\n themeable => {\n isThemeable.value = themeable;\n }\n );\n const currentTheme = shallowRef(some(persistentTheme));\n function setTheme(newTheme: ThemeVariant) {\n currentTheme.value = some(newTheme);\n if (props.persistTheme) {\n setItem('theme', newTheme)();\n }\n }\n const injection: ThemeInjection = {\n isThemeable,\n currentTheme,\n setTheme\n };\n provide(THEME_INJECTION_SYMBOL, injection);\n return {\n setTheme,\n currentTheme,\n isThemeable\n };\n}\n"],"sourceRoot":"","file":"provideTheme.js"}

37
node_modules/buetify/lib/composables/theme/useTheme.d.ts generated vendored Executable file
View File

@@ -0,0 +1,37 @@
import { PropType, ExtractPropTypes } from 'vue';
import { ThemeColorMap } from '../../types/ThemeColorMap';
import { ThemeInjection } from './provideTheme';
export declare const DEFAULT_THEME_COLOR_MAP: ThemeColorMap;
export declare function useThemePropsDefinition(themeMap: ThemeColorMap, defaultIsThemeable?: boolean): {
themeMap: {
type: PropType<ThemeColorMap>;
required: boolean;
default: import("fp-ts/lib/function").Lazy<ThemeColorMap>;
};
isThemeable: {
type: PropType<boolean>;
required: boolean;
default: boolean;
};
};
export declare type ThemeProps = ExtractPropTypes<ReturnType<typeof useThemePropsDefinition>>;
export declare type FunctionalThemeProps = Partial<ThemeProps>;
export declare const DefaultThemePropsDefinition: {
themeMap: {
type: PropType<ThemeColorMap>;
required: boolean;
default: import("fp-ts/lib/function").Lazy<ThemeColorMap>;
};
isThemeable: {
type: PropType<boolean>;
required: boolean;
default: boolean;
};
};
export declare function getThemeClasses(themeMap: ThemeColorMap, themeInjection: ThemeInjection): string[];
export declare function useTheme(props?: ThemeProps): {
currentTheme: import("vue").Ref<import("fp-ts/lib/Option").Option<import("./provideTheme").ThemeVariant>>;
setTheme: (theme: import("./provideTheme").ThemeVariant) => void;
toggleTheme: () => void;
themeClasses: import("vue").ComputedRef<string[]>;
};

Some files were not shown because too many files have changed in this diff Show More