yuyeon 0.0.51 → 0.0.52-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/composables/communication.mjs.map +1 -1
- package/package.json +1 -1
- package/types/components/date-picker/YDateCalendar.d.ts +3 -3
- package/types/components/dialog/YDialog.d.ts +1 -1
- package/types/components/field-input/YFieldInput.d.ts +1 -1
- package/types/components/pagination/YPagination.d.ts +1 -1
- package/types/components/select/YSelect.d.ts +1 -1
- package/types/components/snackbar/YSnackbar.d.ts +1 -1
- package/types/components/table/composibles/pagination.d.ts +2 -2
- package/types/components/table/composibles/sorting.d.ts +1 -1
- package/types/composables/communication.d.ts +2 -3
- package/types/composables/focus.d.ts +1 -1
- package/types/composables/form.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"communication.mjs","names":["computed","getCurrentInstance","ref","toRaw","watch","hasOwnProperty","kebabToCamel","toKebabCase","useToggleScope","useModelDuplex","props","prop","arguments","length","undefined","defaultValue","getIn","v","setOut","vm","kebabProp","property","txValue","getProp","isDefinedProp","registeredProps","vnode","value","model","get","set","neo","current","emit","Object","defineProperty","useProvided","provided","internal"],"sources":["../../src/composables/communication.ts"],"sourcesContent":["import { WritableComputedRef } from '@vue/runtime-core';\nimport { computed, getCurrentInstance, ref, toRaw, watch } from 'vue';\nimport type { Ref } from 'vue';\n\nimport { hasOwnProperty } from '../util/common';\nimport { kebabToCamel, toKebabCase } from '../util/string';\nimport { useToggleScope } from './scope';\n\nexport function useModelDuplex(\n props: any,\n prop: string = 'modelValue',\n defaultValue?: any,\n getIn: (value?: any) => any = (v: any) => v,\n setOut: (value: any) => any = (v: any) => v,\n) {\n const vm = getCurrentInstance()!;\n const kebabProp = toKebabCase(prop);\n const property = kebabProp === prop ? kebabToCamel(prop) : prop;\n const txValue = ref(\n props[property] !== undefined ? props[property] : defaultValue,\n );\n\n function getProp() {\n return props[property];\n }\n\n const isDefinedProp = computed(() => {\n getProp();\n const registeredProps = vm.vnode.props;\n return (\n (hasOwnProperty(registeredProps, kebabProp) ||\n hasOwnProperty(registeredProps, property)) &&\n (hasOwnProperty(registeredProps, `onUpdate:${kebabProp}`) ||\n hasOwnProperty(registeredProps, `onUpdate:${property}`))\n );\n });\n\n useToggleScope(\n () => !isDefinedProp.value,\n () => {\n watch(\n () => getProp(),\n (value) => {\n txValue.value = value;\n },\n );\n },\n );\n\n const model = computed({\n get(): any {\n return getIn(isDefinedProp.value ? getProp() : txValue.value);\n },\n set(value) {\n const neo = setOut(value);\n const current = toRaw(isDefinedProp.value ? getProp() : txValue.value);\n if (current === neo || getIn(current) === value) {\n return;\n }\n txValue.value = neo;\n vm?.emit(`update:${property}`, neo);\n },\n }) as
|
|
1
|
+
{"version":3,"file":"communication.mjs","names":["computed","getCurrentInstance","ref","toRaw","watch","hasOwnProperty","kebabToCamel","toKebabCase","useToggleScope","useModelDuplex","props","prop","arguments","length","undefined","defaultValue","getIn","v","setOut","vm","kebabProp","property","txValue","getProp","isDefinedProp","registeredProps","vnode","value","model","get","set","neo","current","emit","Object","defineProperty","useProvided","provided","internal"],"sources":["../../src/composables/communication.ts"],"sourcesContent":["import { WritableComputedRef } from '@vue/runtime-core';\nimport { computed, getCurrentInstance, ref, toRaw, watch } from 'vue';\nimport type { Ref } from 'vue';\n\nimport { hasOwnProperty } from '../util/common';\nimport { kebabToCamel, toKebabCase } from '../util/string';\nimport { useToggleScope } from './scope';\n\nexport function useModelDuplex(\n props: any,\n prop: string = 'modelValue',\n defaultValue?: any,\n getIn: (value?: any) => any = (v: any) => v,\n setOut: (value: any) => any = (v: any) => v,\n) {\n const vm = getCurrentInstance()!;\n const kebabProp = toKebabCase(prop);\n const property = kebabProp === prop ? kebabToCamel(prop) : prop;\n const txValue = ref(\n props[property] !== undefined ? props[property] : defaultValue,\n );\n\n function getProp() {\n return props[property];\n }\n\n const isDefinedProp = computed(() => {\n getProp();\n const registeredProps = vm.vnode.props;\n return (\n (hasOwnProperty(registeredProps, kebabProp) ||\n hasOwnProperty(registeredProps, property)) &&\n (hasOwnProperty(registeredProps, `onUpdate:${kebabProp}`) ||\n hasOwnProperty(registeredProps, `onUpdate:${property}`))\n );\n });\n\n useToggleScope(\n () => !isDefinedProp.value,\n () => {\n watch(\n () => getProp(),\n (value) => {\n txValue.value = value;\n },\n );\n },\n );\n\n const model = computed({\n get(): any {\n return getIn(isDefinedProp.value ? getProp() : txValue.value);\n },\n set(value) {\n const neo = setOut(value);\n const current = toRaw(isDefinedProp.value ? getProp() : txValue.value);\n if (current === neo || getIn(current) === value) {\n return;\n }\n txValue.value = neo;\n vm?.emit(`update:${property}`, neo);\n },\n }) as any as Ref<any> & { readonly rxValue: any };\n\n Object.defineProperty(model, 'rxValue', {\n get: () => (isDefinedProp.value ? getProp() : txValue.value),\n });\n\n return model;\n}\n\nexport function useProvided<T>(props: any, prop: string, provided: Ref<T>) {\n const internal = useModelDuplex(props, prop, props[prop] ?? provided.value);\n\n watch(provided, (value) => {\n if (props[prop] == null) {\n internal.value = value;\n }\n });\n return internal;\n}\n"],"mappings":"AACA,SAASA,QAAQ,EAAEC,kBAAkB,EAAEC,GAAG,EAAEC,KAAK,EAAEC,KAAK,QAAQ,KAAK;AAAC,SAG7DC,cAAc;AAAA,SACdC,YAAY,EAAEC,WAAW;AAAA,SACzBC,cAAc;AAEvB,OAAO,SAASC,cAAcA,CAC5BC,KAAU,EAKV;EAAA,IAJAC,IAAY,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,YAAY;EAAA,IAC3BG,YAAkB,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAAA,IAClBE,KAA2B,GAAAJ,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAIK,CAAM,IAAKA,CAAC;EAAA,IAC3CC,MAA2B,GAAAN,SAAA,CAAAC,MAAA,QAAAD,SAA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KAAK,EAAE;MACT,MAAMI,GAAG,GAAGb,MAAM,CAACS,KAAK,CAAC;MACzB,MAAMK,OAAO,GAAG7B,KAAK,CAACqB,aAAa,CAACG,KAAK,GAAGJ,OAAO,CAAC,CAAC,GAAGD,OAAO,CAACK,KAAK,CAAC;MACtE,IAAIK,OAAO,KAAKD,GAAG,IAAIf,KAAK,CAACgB,OAAO,CAAC,KAAKL,KAAK,EAAE;QAC/C;MACF;MACAL,OAAO,CAACK,KAAK,GAAGI,GAAG;MACnBZ,EAAE,EAAEc,IAAI,CAAE,UAASZ,QAAS,EAAC,EAAEU,GAAG,CAAC;IACrC;EACF,CAAC,CAAgD;EAEjDG,MAAM,CAACC,cAAc,CAACP,KAAK,EAAE,SAAS,EAAE;IACtCC,GAAG,EAAEA,CAAA,KAAOL,aAAa,CAACG,KAAK,GAAGJ,OAAO,CAAC,CAAC,GAAGD,OAAO,CAACK;EACxD,CAAC,CAAC;EAEF,OAAOC,KAAK;AACd;AAEA,OAAO,SAASQ,WAAWA,CAAI1B,KAAU,EAAEC,IAAY,EAAE0B,QAAgB,EAAE;EACzE,MAAMC,QAAQ,GAAG7B,cAAc,CAACC,KAAK,EAAEC,IAAI,EAAED,KAAK,CAACC,IAAI,CAAC,IAAI0B,QAAQ,CAACV,KAAK,CAAC;EAE3EvB,KAAK,CAACiC,QAAQ,EAAGV,KAAK,IAAK;IACzB,IAAIjB,KAAK,CAACC,IAAI,CAAC,IAAI,IAAI,EAAE;MACvB2B,QAAQ,CAACX,KAAK,GAAGA,KAAK;IACxB;EACF,CAAC,CAAC;EACF,OAAOW,QAAQ;AACjB"}
|
package/package.json
CHANGED
|
@@ -95,15 +95,15 @@ export declare const YDateCalendar: import("vue").DefineComponent<{
|
|
|
95
95
|
container$: import("vue").Ref<any>;
|
|
96
96
|
dateUtil: import("../../composables/date/types").DateInstance<unknown>;
|
|
97
97
|
displayValue: import("vue").ComputedRef<unknown>;
|
|
98
|
-
month: import("vue").
|
|
98
|
+
month: import("vue").Ref<any> & {
|
|
99
99
|
readonly rxValue: any;
|
|
100
100
|
};
|
|
101
|
-
year: import("vue").
|
|
101
|
+
year: import("vue").Ref<any> & {
|
|
102
102
|
readonly rxValue: any;
|
|
103
103
|
};
|
|
104
104
|
rangeStart: import("vue").ComputedRef<any>;
|
|
105
105
|
rangeEnd: import("vue").ComputedRef<any>;
|
|
106
|
-
model: import("vue").
|
|
106
|
+
model: import("vue").Ref<any> & {
|
|
107
107
|
readonly rxValue: any;
|
|
108
108
|
};
|
|
109
109
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -378,7 +378,7 @@ export declare const YDialog: import("vue").DefineComponent<{
|
|
|
378
378
|
type: PropType<string>;
|
|
379
379
|
};
|
|
380
380
|
}, {
|
|
381
|
-
active: import("vue").
|
|
381
|
+
active: import("vue").Ref<any> & {
|
|
382
382
|
readonly rxValue: any;
|
|
383
383
|
};
|
|
384
384
|
layer: import("vue").Ref<import("vue").DefineComponent<{
|
|
@@ -125,7 +125,7 @@ export declare const YPagination: import("vue").DefineComponent<{
|
|
|
125
125
|
};
|
|
126
126
|
}, {
|
|
127
127
|
itemCount: import("vue").ShallowRef<number>;
|
|
128
|
-
page: import("vue").
|
|
128
|
+
page: import("vue").Ref<any> & {
|
|
129
129
|
readonly rxValue: any;
|
|
130
130
|
};
|
|
131
131
|
refs: import("vue").Ref<(ComponentPublicInstance | undefined)[]>;
|
|
@@ -1753,7 +1753,7 @@ export declare const YSelect: import("vue").DefineComponent<{
|
|
|
1753
1753
|
};
|
|
1754
1754
|
}, {
|
|
1755
1755
|
fieldInputRef: import("vue").Ref<any>;
|
|
1756
|
-
model: import("vue").
|
|
1756
|
+
model: import("vue").Ref<any> & {
|
|
1757
1757
|
readonly rxValue: any;
|
|
1758
1758
|
};
|
|
1759
1759
|
selections: import("vue").ComputedRef<ListItem<any>[]>;
|
|
@@ -33,7 +33,7 @@ export declare const YSnackbar: import("vue").DefineComponent<{
|
|
|
33
33
|
default: boolean;
|
|
34
34
|
};
|
|
35
35
|
}, {
|
|
36
|
-
active: import("vue").
|
|
36
|
+
active: import("vue").Ref<any> & {
|
|
37
37
|
readonly rxValue: any;
|
|
38
38
|
};
|
|
39
39
|
hover: import("vue").Ref<boolean>;
|
|
@@ -45,10 +45,10 @@ type PaginationProps = {
|
|
|
45
45
|
total?: number | string;
|
|
46
46
|
};
|
|
47
47
|
export declare function createPagination(props: PaginationProps): {
|
|
48
|
-
page:
|
|
48
|
+
page: Ref<any> & {
|
|
49
49
|
readonly rxValue: any;
|
|
50
50
|
};
|
|
51
|
-
pageSize:
|
|
51
|
+
pageSize: Ref<any> & {
|
|
52
52
|
readonly rxValue: any;
|
|
53
53
|
};
|
|
54
54
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { WritableComputedRef } from '@vue/runtime-core';
|
|
2
1
|
import type { Ref } from 'vue';
|
|
3
|
-
export declare function useModelDuplex(props: any, prop?: string, defaultValue?: any, getIn?: (value?: any) => any, setOut?: (value: any) => any):
|
|
2
|
+
export declare function useModelDuplex(props: any, prop?: string, defaultValue?: any, getIn?: (value?: any) => any, setOut?: (value: any) => any): Ref<any> & {
|
|
4
3
|
readonly rxValue: any;
|
|
5
4
|
};
|
|
6
|
-
export declare function useProvided<T>(props: any, prop: string, provided: Ref<T>):
|
|
5
|
+
export declare function useProvided<T>(props: any, prop: string, provided: Ref<T>): Ref<any> & {
|
|
7
6
|
readonly rxValue: any;
|
|
8
7
|
};
|
|
@@ -17,7 +17,7 @@ export declare const pressFocusPropsOptions: <Defaults extends {
|
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
19
|
export declare function useFocus(props: ExtractPropTypes<typeof focusPropsOptions>, className: string): {
|
|
20
|
-
focused: import("vue").
|
|
20
|
+
focused: import("vue").Ref<any> & {
|
|
21
21
|
readonly rxValue: any;
|
|
22
22
|
};
|
|
23
23
|
whenFocus: () => void;
|
|
@@ -104,7 +104,7 @@ export declare function createForm(props: FormProps): {
|
|
|
104
104
|
exposed: any;
|
|
105
105
|
errors: any[];
|
|
106
106
|
}[]>;
|
|
107
|
-
isValid:
|
|
107
|
+
isValid: Ref<any> & {
|
|
108
108
|
readonly rxValue: any;
|
|
109
109
|
};
|
|
110
110
|
isDisabled: ComputedRef<boolean>;
|