yuyeon 0.1.1-rc.8 → 0.1.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/dist/style.css +1 -1
- package/dist/yuyeon.js +2520 -2487
- package/dist/yuyeon.umd.cjs +11 -11
- package/lib/components/divider/YDivider.mjs +1 -0
- package/lib/components/divider/YDivider.mjs.map +1 -1
- package/lib/components/field-input/YFieldInput.mjs +1 -0
- package/lib/components/field-input/YFieldInput.mjs.map +1 -1
- package/lib/components/panel/YDividePanel.mjs +1 -0
- package/lib/components/panel/YDividePanel.mjs.map +1 -1
- package/lib/components/table/YDataTable.mjs +5 -1
- package/lib/components/table/YDataTable.mjs.map +1 -1
- package/lib/components/table/composibles/sorted-items.mjs +50 -0
- package/lib/components/table/composibles/sorted-items.mjs.map +1 -0
- package/lib/components/table/composibles/sorting.mjs.map +1 -1
- package/lib/composables/icon.mjs.map +1 -1
- package/lib/composables/layer-group.mjs +3 -1
- package/lib/composables/layer-group.mjs.map +1 -1
- package/lib/composables/list-items.mjs +2 -2
- package/lib/composables/list-items.mjs.map +1 -1
- package/lib/index.mjs +1 -1
- package/lib/index.mjs.map +1 -1
- package/lib/styles/_elevation.scss +2 -3
- package/lib/types/index.mjs.map +1 -1
- package/lib/util/common.mjs +3 -0
- package/lib/util/common.mjs.map +1 -1
- package/package.json +1 -1
- package/types/components/table/YDataTable.d.ts +1 -1
- package/types/components/table/composibles/sorted-items.d.ts +7 -0
- package/types/composables/icon.d.ts +2 -1
- package/types/types/index.d.ts +2 -3
- package/types/util/common.d.ts +1 -0
package/lib/util/common.mjs
CHANGED
|
@@ -94,6 +94,9 @@ export function isObject(obj) {
|
|
|
94
94
|
const type = typeof obj;
|
|
95
95
|
return obj !== null && (type === 'object' || type === 'function');
|
|
96
96
|
}
|
|
97
|
+
export function isEmpty(target) {
|
|
98
|
+
return target == null || target?.trim() === '';
|
|
99
|
+
}
|
|
97
100
|
export function omit(obj, excludes) {
|
|
98
101
|
const ret = {
|
|
99
102
|
...obj
|
package/lib/util/common.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.mjs","names":["hasOwnProperty","object","property","Object","prototype","call","getNestedValue","obj","path","fallback","last","length","traversObj","undefined","i","mergeDeep","source","arguments","overwrite","arrayFn","ret","key","sourceValue","overwriteValue","Array","isArray","getObjectValueByPath","traversPath","replace","split","getPropertyFromItem","item","value","clamp","min","max","Math","getRangeArr","start","from","v","k","deepEqual","a","b","Date","getTime","props","keys","every","p","isObject","type","omit","excludes","forEach","prop"],"sources":["../../src/util/common.ts"],"sourcesContent":["export function hasOwnProperty(object: any, property: string) {\n if (object) {\n return Object.prototype.hasOwnProperty.call(object, property);\n }\n return false;\n}\n\nexport function getNestedValue(\n obj: any,\n path: (string | number)[],\n fallback?: any,\n): any {\n const last = path.length - 1;\n let traversObj = obj;\n\n if (last < 0) return traversObj === undefined ? fallback : traversObj;\n\n for (let i = 0; i < last; i += 1) {\n if (traversObj == null) {\n return fallback;\n }\n traversObj = traversObj[path[i]];\n }\n\n if (traversObj == null) return fallback;\n\n return traversObj[path[last]] === undefined\n ? fallback\n : traversObj[path[last]];\n}\n\nexport function mergeDeep(\n source: Record<string, any> = {},\n overwrite: Record<string, any> = {},\n arrayFn?: (source: unknown[], overwrite: unknown[]) => unknown[],\n) {\n const ret = { ...source };\n for (const key in overwrite) {\n const sourceValue = ret[key];\n const overwriteValue = overwrite[key];\n\n if (Array.isArray(sourceValue) && Array.isArray(overwriteValue)) {\n if (arrayFn) {\n ret[key] = arrayFn(sourceValue, overwriteValue);\n continue;\n }\n }\n\n if (typeof sourceValue === 'object' && typeof overwriteValue === 'object') {\n ret[key] = mergeDeep(sourceValue, overwriteValue, arrayFn);\n continue;\n }\n\n ret[key] = overwriteValue;\n }\n return ret;\n}\n\nexport function getObjectValueByPath(\n obj: any,\n path: string,\n fallback?: any,\n): any {\n // credit: http://stackoverflow.com/questions/6491463/accessing-nested-javascript-objects-with-string-key#comment55278413_6491621\n let traversPath = path;\n if (obj == null || !traversPath || typeof traversPath !== 'string') {\n return fallback;\n }\n if (obj[traversPath] !== undefined) return obj[traversPath];\n traversPath = traversPath.replace(/\\[(\\w+)\\]/g, '.$1'); // convert indexes to properties\n traversPath = traversPath.replace(/^\\./, ''); // strip a leading dot\n return getNestedValue(obj, traversPath.split('.'), fallback);\n}\n\nexport type SelectItemKey =\n | boolean // Ignored\n | string // Lookup by key, can use dot notation for nested objects\n | (string | number)[] // Nested lookup by key, each array item is a key in the next level\n | ((item: Record<string, any>, fallback?: any) => any);\n\nexport function getPropertyFromItem(\n item: any,\n property: SelectItemKey,\n fallback?: any,\n): any {\n if (property == null) return item === undefined ? fallback : item;\n\n if (item !== Object(item)) {\n if (typeof property !== 'function') return fallback;\n\n const value = property(item, fallback);\n\n return typeof value === 'undefined' ? fallback : value;\n }\n\n if (typeof property === 'string')\n return getObjectValueByPath(item, property, fallback);\n\n if (Array.isArray(property)) return getNestedValue(item, property, fallback);\n\n if (typeof property !== 'function') return fallback;\n\n const value = property(item, fallback);\n\n return typeof value === 'undefined' ? fallback : value;\n}\n\nexport function clamp(value: number, min = 0, max = 1) {\n return Math.max(min, Math.min(max, value));\n}\n\nexport function getRangeArr(length: number, start = 0) {\n return Array.from({ length }, (v, k) => start + k);\n}\n\nexport function deepEqual(a: any, b: any): boolean {\n if (a === b) return true;\n\n if (a instanceof Date && b instanceof Date && a.getTime() !== b.getTime()) {\n return false;\n }\n\n if (a !== Object(a) || b !== Object(b)) {\n return false;\n }\n const props = Object.keys(a);\n if (props.length !== Object.keys(b).length) {\n return false;\n }\n return props.every((p) => deepEqual(a[p], b[p]));\n}\n\nexport function isObject(obj: unknown) {\n const type = typeof obj;\n return obj !== null && (type === 'object' || type === 'function');\n}\n\nexport function omit<T extends object, U extends Extract<keyof T, string>>(obj: T
|
|
1
|
+
{"version":3,"file":"common.mjs","names":["hasOwnProperty","object","property","Object","prototype","call","getNestedValue","obj","path","fallback","last","length","traversObj","undefined","i","mergeDeep","source","arguments","overwrite","arrayFn","ret","key","sourceValue","overwriteValue","Array","isArray","getObjectValueByPath","traversPath","replace","split","getPropertyFromItem","item","value","clamp","min","max","Math","getRangeArr","start","from","v","k","deepEqual","a","b","Date","getTime","props","keys","every","p","isObject","type","isEmpty","target","trim","omit","excludes","forEach","prop"],"sources":["../../src/util/common.ts"],"sourcesContent":["export function hasOwnProperty(object: any, property: string) {\n if (object) {\n return Object.prototype.hasOwnProperty.call(object, property);\n }\n return false;\n}\n\nexport function getNestedValue(\n obj: any,\n path: (string | number)[],\n fallback?: any,\n): any {\n const last = path.length - 1;\n let traversObj = obj;\n\n if (last < 0) return traversObj === undefined ? fallback : traversObj;\n\n for (let i = 0; i < last; i += 1) {\n if (traversObj == null) {\n return fallback;\n }\n traversObj = traversObj[path[i]];\n }\n\n if (traversObj == null) return fallback;\n\n return traversObj[path[last]] === undefined\n ? fallback\n : traversObj[path[last]];\n}\n\nexport function mergeDeep(\n source: Record<string, any> = {},\n overwrite: Record<string, any> = {},\n arrayFn?: (source: unknown[], overwrite: unknown[]) => unknown[],\n) {\n const ret = { ...source };\n for (const key in overwrite) {\n const sourceValue = ret[key];\n const overwriteValue = overwrite[key];\n\n if (Array.isArray(sourceValue) && Array.isArray(overwriteValue)) {\n if (arrayFn) {\n ret[key] = arrayFn(sourceValue, overwriteValue);\n continue;\n }\n }\n\n if (typeof sourceValue === 'object' && typeof overwriteValue === 'object') {\n ret[key] = mergeDeep(sourceValue, overwriteValue, arrayFn);\n continue;\n }\n\n ret[key] = overwriteValue;\n }\n return ret;\n}\n\nexport function getObjectValueByPath(\n obj: any,\n path: string,\n fallback?: any,\n): any {\n // credit: http://stackoverflow.com/questions/6491463/accessing-nested-javascript-objects-with-string-key#comment55278413_6491621\n let traversPath = path;\n if (obj == null || !traversPath || typeof traversPath !== 'string') {\n return fallback;\n }\n if (obj[traversPath] !== undefined) return obj[traversPath];\n traversPath = traversPath.replace(/\\[(\\w+)\\]/g, '.$1'); // convert indexes to properties\n traversPath = traversPath.replace(/^\\./, ''); // strip a leading dot\n return getNestedValue(obj, traversPath.split('.'), fallback);\n}\n\nexport type SelectItemKey =\n | boolean // Ignored\n | string // Lookup by key, can use dot notation for nested objects\n | (string | number)[] // Nested lookup by key, each array item is a key in the next level\n | ((item: Record<string, any>, fallback?: any) => any);\n\nexport function getPropertyFromItem(\n item: any,\n property: SelectItemKey,\n fallback?: any,\n): any {\n if (property == null) return item === undefined ? fallback : item;\n\n if (item !== Object(item)) {\n if (typeof property !== 'function') return fallback;\n\n const value = property(item, fallback);\n\n return typeof value === 'undefined' ? fallback : value;\n }\n\n if (typeof property === 'string')\n return getObjectValueByPath(item, property, fallback);\n\n if (Array.isArray(property)) return getNestedValue(item, property, fallback);\n\n if (typeof property !== 'function') return fallback;\n\n const value = property(item, fallback);\n\n return typeof value === 'undefined' ? fallback : value;\n}\n\nexport function clamp(value: number, min = 0, max = 1) {\n return Math.max(min, Math.min(max, value));\n}\n\nexport function getRangeArr(length: number, start = 0) {\n return Array.from({ length }, (v, k) => start + k);\n}\n\nexport function deepEqual(a: any, b: any): boolean {\n if (a === b) return true;\n\n if (a instanceof Date && b instanceof Date && a.getTime() !== b.getTime()) {\n return false;\n }\n\n if (a !== Object(a) || b !== Object(b)) {\n return false;\n }\n const props = Object.keys(a);\n if (props.length !== Object.keys(b).length) {\n return false;\n }\n return props.every((p) => deepEqual(a[p], b[p]));\n}\n\nexport function isObject(obj: unknown) {\n const type = typeof obj;\n return obj !== null && (type === 'object' || type === 'function');\n}\n\nexport function isEmpty(target: any) {\n return target == null || target?.trim() === '';\n}\n\nexport function omit<T extends object, U extends Extract<keyof T, string>>(\n obj: T,\n excludes: U[],\n): Omit<T, U> {\n const ret = { ...obj };\n excludes.forEach((prop) => delete ret[prop]);\n return ret;\n}\n"],"mappings":"AAAA,OAAO,SAASA,cAAcA,CAACC,MAAW,EAAEC,QAAgB,EAAE;EAC5D,IAAID,MAAM,EAAE;IACV,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EA,OAAO,SAASC,IAAIA,CAClBjD,GAAM,EACNkD,QAAa,EACD;EACZ,MAAMrC,GAAG,GAAG;IAAE,GAAGb;EAAI,CAAC;EACtBkD,QAAQ,CAACC,OAAO,CAAEC,IAAI,IAAK,OAAOvC,GAAG,CAACuC,IAAI,CAAC,CAAC;EAC5C,OAAOvC,GAAG;AACZ"}
|
package/package.json
CHANGED
|
@@ -451,7 +451,7 @@ export declare const YDataTable: import('vue').DefineComponent<{
|
|
|
451
451
|
default: number;
|
|
452
452
|
};
|
|
453
453
|
}, {
|
|
454
|
-
paginatedItems: import('vue').ComputedRef<readonly
|
|
454
|
+
paginatedItems: import('vue').ComputedRef<readonly any[]>;
|
|
455
455
|
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
456
456
|
'update:modelValue': (value: any[]) => true;
|
|
457
457
|
'update:page': (page: number) => true;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { SortOption } from '../types';
|
|
3
|
+
|
|
4
|
+
export declare function useSortedItems(props: any, items: Ref<any[]>, sortBy: Ref<readonly SortOption[]>, options?: {}): {
|
|
5
|
+
sortedItems: import('vue').ComputedRef<any[]>;
|
|
6
|
+
};
|
|
7
|
+
export declare function sortItems(items: any[], sortOptions: readonly SortOption[], locale: string): any[];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { HTMLAttributes, SVGAttributes } from '@vue/runtime-dom';
|
|
1
2
|
import { InjectionKey, PropType, Ref } from 'vue';
|
|
2
3
|
import { JSXComponent } from '../types';
|
|
3
4
|
|
|
4
|
-
type IconComponent = JSXComponent<IconProps>;
|
|
5
|
+
type IconComponent = JSXComponent<IconProps> | JSXComponent<SVGAttributes | HTMLAttributes>;
|
|
5
6
|
export type IconValue = string | (string | [path: string, opacity: number])[] | IconComponent | {
|
|
6
7
|
component: JSXComponent;
|
|
7
8
|
props?: any;
|
package/types/types/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { HTMLAttributes } from '@vue/runtime-dom';
|
|
2
1
|
import { ComponentPublicInstance, FunctionalComponent } from 'vue';
|
|
3
2
|
|
|
4
3
|
export type CandidateKey = string | number;
|
|
5
|
-
export type JSXComponent<Props = any> = FunctionalComponent<Props
|
|
6
|
-
new (): ComponentPublicInstance<Props
|
|
4
|
+
export type JSXComponent<Props = any> = FunctionalComponent<Props> | {
|
|
5
|
+
new (): ComponentPublicInstance<Props>;
|
|
7
6
|
};
|
package/types/util/common.d.ts
CHANGED
|
@@ -10,4 +10,5 @@ export declare function clamp(value: number, min?: number, max?: number): number
|
|
|
10
10
|
export declare function getRangeArr(length: number, start?: number): number[];
|
|
11
11
|
export declare function deepEqual(a: any, b: any): boolean;
|
|
12
12
|
export declare function isObject(obj: unknown): boolean;
|
|
13
|
+
export declare function isEmpty(target: any): boolean;
|
|
13
14
|
export declare function omit<T extends object, U extends Extract<keyof T, string>>(obj: T, excludes: U[]): Omit<T, U>;
|