duoyun-ui 2.2.2 → 2.2.8
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/elements/badge.d.ts +2 -16
- package/elements/badge.d.ts.map +1 -1
- package/elements/badge.js +4 -158
- package/elements/badge.js.map +1 -1
- package/elements/banner.d.ts +2 -17
- package/elements/banner.d.ts.map +1 -1
- package/elements/banner.js +4 -127
- package/elements/banner.js.map +1 -1
- package/elements/base/chart.d.ts +2 -2
- package/elements/base/resize.d.ts +1 -22
- package/elements/base/resize.d.ts.map +1 -1
- package/elements/base/resize.js +1 -95
- package/elements/base/resize.js.map +1 -1
- package/elements/base/scroll.d.ts +1 -8
- package/elements/base/scroll.d.ts.map +1 -1
- package/elements/base/scroll.js +1 -158
- package/elements/base/scroll.js.map +1 -1
- package/elements/base/visible.d.ts +1 -18
- package/elements/base/visible.d.ts.map +1 -1
- package/elements/base/visible.js +1 -112
- package/elements/base/visible.js.map +1 -1
- package/elements/button.d.ts +2 -24
- package/elements/button.d.ts.map +1 -1
- package/elements/button.js +7 -287
- package/elements/button.js.map +1 -1
- package/elements/checkbox.d.ts +3 -21
- package/elements/checkbox.d.ts.map +1 -1
- package/elements/checkbox.js +6 -180
- package/elements/checkbox.js.map +1 -1
- package/elements/code-block.d.ts +2 -7
- package/elements/code-block.d.ts.map +1 -1
- package/elements/code-block.js +4 -432
- package/elements/code-block.js.map +1 -1
- package/elements/collapse.d.ts +3 -29
- package/elements/collapse.d.ts.map +1 -1
- package/elements/collapse.js +6 -197
- package/elements/collapse.js.map +1 -1
- package/elements/compartment.d.ts +2 -5
- package/elements/compartment.d.ts.map +1 -1
- package/elements/compartment.js +4 -23
- package/elements/compartment.js.map +1 -1
- package/elements/contextmenu.d.ts +5 -42
- package/elements/contextmenu.d.ts.map +1 -1
- package/elements/contextmenu.js +8 -285
- package/elements/contextmenu.js.map +1 -1
- package/elements/countdown.d.ts +2 -12
- package/elements/countdown.d.ts.map +1 -1
- package/elements/countdown.js +4 -94
- package/elements/countdown.js.map +1 -1
- package/elements/divider.d.ts +2 -8
- package/elements/divider.d.ts.map +1 -1
- package/elements/divider.js +4 -129
- package/elements/divider.js.map +1 -1
- package/elements/empty.d.ts +2 -8
- package/elements/empty.d.ts.map +1 -1
- package/elements/empty.js +4 -59
- package/elements/empty.js.map +1 -1
- package/elements/grouped-picker.d.ts +29 -0
- package/elements/grouped-picker.d.ts.map +1 -0
- package/elements/grouped-picker.js +199 -0
- package/elements/grouped-picker.js.map +1 -0
- package/elements/input.d.ts +4 -36
- package/elements/input.d.ts.map +1 -1
- package/elements/input.js +6 -489
- package/elements/input.js.map +1 -1
- package/elements/letters.d.ts +4 -0
- package/elements/letters.d.ts.map +1 -0
- package/elements/letters.js +56 -0
- package/elements/letters.js.map +1 -0
- package/elements/link.d.ts +3 -5
- package/elements/link.d.ts.map +1 -1
- package/elements/link.js +6 -38
- package/elements/link.js.map +1 -1
- package/elements/list.d.ts +5 -58
- package/elements/list.d.ts.map +1 -1
- package/elements/list.js +19 -664
- package/elements/list.js.map +1 -1
- package/elements/modal.d.ts +5 -63
- package/elements/modal.d.ts.map +1 -1
- package/elements/modal.js +13 -411
- package/elements/modal.js.map +1 -1
- package/elements/options.d.ts +4 -32
- package/elements/options.d.ts.map +1 -1
- package/elements/options.js +5 -254
- package/elements/options.js.map +1 -1
- package/elements/page-loadbar.js +1 -1
- package/elements/paragraph.d.ts +2 -2
- package/elements/paragraph.d.ts.map +1 -1
- package/elements/paragraph.js +4 -45
- package/elements/paragraph.js.map +1 -1
- package/elements/placeholder.d.ts +2 -14
- package/elements/placeholder.d.ts.map +1 -1
- package/elements/placeholder.js +4 -114
- package/elements/placeholder.js.map +1 -1
- package/elements/radio.d.ts +5 -24
- package/elements/radio.d.ts.map +1 -1
- package/elements/radio.js +7 -165
- package/elements/radio.js.map +1 -1
- package/elements/rate.d.ts +2 -12
- package/elements/rate.d.ts.map +1 -1
- package/elements/rate.js +4 -142
- package/elements/rate.js.map +1 -1
- package/elements/rolling-number.d.ts +4 -0
- package/elements/rolling-number.d.ts.map +1 -0
- package/elements/rolling-number.js +56 -0
- package/elements/rolling-number.js.map +1 -0
- package/elements/scroll-box.d.ts +2 -2
- package/elements/scroll-box.d.ts.map +1 -1
- package/elements/scroll-box.js +4 -5
- package/elements/scroll-box.js.map +1 -1
- package/elements/segmented.d.ts +3 -20
- package/elements/segmented.d.ts.map +1 -1
- package/elements/segmented.js +4 -191
- package/elements/segmented.js.map +1 -1
- package/elements/slider.d.ts +2 -20
- package/elements/slider.d.ts.map +1 -1
- package/elements/slider.js +4 -261
- package/elements/slider.js.map +1 -1
- package/elements/sort-box.d.ts +1 -2
- package/elements/sort-box.d.ts.map +1 -1
- package/elements/sort-box.js +4 -15
- package/elements/sort-box.js.map +1 -1
- package/elements/space.d.ts +2 -4
- package/elements/space.d.ts.map +1 -1
- package/elements/space.js +4 -37
- package/elements/space.js.map +1 -1
- package/elements/switch.d.ts +2 -11
- package/elements/switch.d.ts.map +1 -1
- package/elements/switch.js +5 -134
- package/elements/switch.js.map +1 -1
- package/elements/tag.d.ts +3 -16
- package/elements/tag.d.ts.map +1 -1
- package/elements/tag.js +4 -133
- package/elements/tag.js.map +1 -1
- package/elements/timeline.d.ts.map +1 -1
- package/elements/timeline.js +0 -1
- package/elements/timeline.js.map +1 -1
- package/elements/toast.js +1 -1
- package/elements/wait.js +1 -1
- package/helper/error.js +2 -39
- package/helper/error.js.map +1 -1
- package/helper/webapp.d.ts +4 -5
- package/helper/webapp.d.ts.map +1 -1
- package/helper/webapp.js +5 -11
- package/helper/webapp.js.map +1 -1
- package/lib/animations.d.ts +1 -10
- package/lib/animations.d.ts.map +1 -1
- package/lib/animations.js +1 -29
- package/lib/animations.js.map +1 -1
- package/lib/cache.d.ts +1 -18
- package/lib/cache.d.ts.map +1 -1
- package/lib/cache.js +1 -62
- package/lib/cache.js.map +1 -1
- package/lib/color.d.ts +1 -37
- package/lib/color.d.ts.map +1 -1
- package/lib/color.js +1 -98
- package/lib/color.js.map +1 -1
- package/lib/decorators.d.ts +2 -0
- package/lib/decorators.d.ts.map +1 -0
- package/lib/decorators.js +2 -0
- package/lib/decorators.js.map +1 -0
- package/lib/easing.d.ts +2 -0
- package/lib/easing.d.ts.map +1 -0
- package/lib/easing.js +2 -0
- package/lib/easing.js.map +1 -0
- package/lib/element.d.ts +1 -18
- package/lib/element.d.ts.map +1 -1
- package/lib/element.js +1 -131
- package/lib/element.js.map +1 -1
- package/lib/encode.d.ts +1 -10
- package/lib/encode.d.ts.map +1 -1
- package/lib/encode.js +1 -48
- package/lib/encode.js.map +1 -1
- package/lib/hotkeys.d.ts +1 -43
- package/lib/hotkeys.d.ts.map +1 -1
- package/lib/hotkeys.js +1 -247
- package/lib/hotkeys.js.map +1 -1
- package/lib/icons.d.ts +1 -114
- package/lib/icons.d.ts.map +1 -1
- package/lib/icons.js +1 -90
- package/lib/icons.js.map +1 -1
- package/lib/image.d.ts +1 -39
- package/lib/image.d.ts.map +1 -1
- package/lib/image.js +1 -140
- package/lib/image.js.map +1 -1
- package/lib/locale.d.ts +1 -87
- package/lib/locale.d.ts.map +1 -1
- package/lib/locale.js +1 -8
- package/lib/locale.js.map +1 -1
- package/lib/map.d.ts +1 -8
- package/lib/map.d.ts.map +1 -1
- package/lib/map.js +1 -31
- package/lib/map.js.map +1 -1
- package/lib/number.d.ts +1 -94
- package/lib/number.d.ts.map +1 -1
- package/lib/number.js +1 -169
- package/lib/number.js.map +1 -1
- package/lib/patterns.d.ts +1 -9
- package/lib/patterns.d.ts.map +1 -1
- package/lib/patterns.js +1 -11
- package/lib/patterns.js.map +1 -1
- package/lib/styles.d.ts +1 -4
- package/lib/styles.d.ts.map +1 -1
- package/lib/styles.js +1 -28
- package/lib/styles.js.map +1 -1
- package/lib/theme.d.ts +1 -85
- package/lib/theme.d.ts.map +1 -1
- package/lib/theme.js +6 -70
- package/lib/theme.js.map +1 -1
- package/lib/time.d.ts +1 -81
- package/lib/time.d.ts.map +1 -1
- package/lib/time.js +1 -255
- package/lib/time.js.map +1 -1
- package/lib/timer.d.ts +1 -25
- package/lib/timer.d.ts.map +1 -1
- package/lib/timer.js +1 -106
- package/lib/timer.js.map +1 -1
- package/lib/types.d.ts +1 -13
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js +1 -16
- package/lib/types.js.map +1 -1
- package/lib/utils.d.ts +1 -79
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +1 -240
- package/lib/utils.js.map +1 -1
- package/locales/en.d.ts +1 -37
- package/locales/en.d.ts.map +1 -1
- package/locales/en.js +1 -36
- package/locales/en.js.map +1 -1
- package/locales/zh.d.ts +1 -3
- package/locales/zh.d.ts.map +1 -1
- package/locales/zh.js +1 -37
- package/locales/zh.js.map +1 -1
- package/package.json +4 -6
- package/patterns/console.d.ts +1 -1
- package/patterns/form.d.ts +5 -3
- package/patterns/form.d.ts.map +1 -1
- package/patterns/form.js +18 -5
- package/patterns/form.js.map +1 -1
- package/react/DyBadge.d.ts +1 -9
- package/react/DyBadge.js +1 -1
- package/react/DyBanner.d.ts +1 -6
- package/react/DyBanner.js +1 -1
- package/react/DyButton.d.ts +1 -15
- package/react/DyButton.js +1 -1
- package/react/DyCheckbox.d.ts +1 -7
- package/react/DyCheckbox.js +1 -1
- package/react/DyCheckboxGroup.d.ts +1 -7
- package/react/DyCheckboxGroup.js +1 -1
- package/react/DyCoachMark.d.ts +0 -5
- package/react/DyCoachMark.js +1 -1
- package/react/DyCodeBlock.d.ts +1 -5
- package/react/DyCodeBlock.js +1 -1
- package/react/DyCollapse.d.ts +1 -5
- package/react/DyCollapse.js +1 -1
- package/react/DyCollapsePanel.d.ts +1 -6
- package/react/DyCollapsePanel.js +1 -1
- package/react/DyCompartment.d.ts +1 -3
- package/react/DyCompartment.js +1 -1
- package/react/DyCountdown.d.ts +1 -5
- package/react/DyCountdown.js +1 -1
- package/react/DyDivider.d.ts +1 -6
- package/react/DyDivider.js +1 -1
- package/react/DyDrawer.d.ts +1 -21
- package/react/DyDrawer.js +1 -1
- package/react/DyEmpty.d.ts +1 -5
- package/react/DyEmpty.js +1 -1
- package/react/DyGroupedPicker.d.ts +27 -0
- package/react/DyGroupedPicker.js +22 -0
- package/react/DyInput.d.ts +1 -22
- package/react/DyInput.js +1 -1
- package/react/DyLegend.d.ts +0 -4
- package/react/DyLegend.js +1 -1
- package/react/DyLetters.d.ts +15 -0
- package/react/{DyListOutside.js → DyLetters.js} +4 -4
- package/react/DyList.d.ts +0 -13
- package/react/DyList.js +1 -1
- package/react/DyOptions.d.ts +1 -5
- package/react/DyOptions.js +1 -1
- package/react/DyPatForm.d.ts +1 -0
- package/react/DyPlaceholder.d.ts +1 -10
- package/react/DyPlaceholder.js +1 -1
- package/react/DyRadio.d.ts +1 -6
- package/react/DyRadio.js +1 -1
- package/react/DyRadioGroup.d.ts +1 -7
- package/react/DyRadioGroup.js +1 -1
- package/react/DyRate.d.ts +1 -7
- package/react/DyRate.js +1 -1
- package/react/DyRollingNumber.d.ts +15 -0
- package/react/{DyListItem.js → DyRollingNumber.js} +5 -5
- package/react/DySegmented.d.ts +1 -8
- package/react/DySegmented.js +1 -1
- package/react/DySlider.d.ts +1 -12
- package/react/DySlider.js +1 -1
- package/react/DySortItem.d.ts +1 -3
- package/react/DySortItem.js +1 -1
- package/react/DySpace.d.ts +1 -4
- package/react/DySpace.js +1 -1
- package/react/DySwitch.d.ts +1 -7
- package/react/DySwitch.js +1 -1
- package/react/DyTag.d.ts +1 -9
- package/react/DyTag.js +1 -1
- package/svelte/badge.d.ts +0 -8
- package/svelte/banner.d.ts +0 -5
- package/svelte/button.d.ts +0 -14
- package/svelte/checkbox.d.ts +0 -6
- package/svelte/coach-mark.d.ts +0 -5
- package/svelte/code-block.d.ts +0 -4
- package/svelte/collapse.d.ts +0 -4
- package/svelte/compartment.d.ts +0 -2
- package/svelte/countdown.d.ts +0 -4
- package/svelte/divider.d.ts +0 -5
- package/svelte/drawer.d.ts +0 -20
- package/svelte/empty.d.ts +0 -4
- package/svelte/grouped-picker.d.ts +19 -0
- package/svelte/grouped-picker.js +2 -0
- package/svelte/legend.d.ts +0 -4
- package/svelte/letters.d.ts +9 -0
- package/svelte/letters.js +2 -0
- package/svelte/list.d.ts +4 -11
- package/svelte/options.d.ts +0 -4
- package/svelte/pat-form.d.ts +1 -0
- package/svelte/placeholder.d.ts +0 -9
- package/svelte/radio.d.ts +0 -6
- package/svelte/rate.d.ts +0 -6
- package/svelte/rolling-number.d.ts +9 -0
- package/svelte/rolling-number.js +2 -0
- package/svelte/segmented.d.ts +0 -7
- package/svelte/slider.d.ts +0 -11
- package/svelte/space.d.ts +0 -3
- package/svelte/switch.d.ts +0 -6
- package/svelte/tag.d.ts +0 -8
- package/vue/DyBadge.vue +2 -8
- package/vue/DyBanner.vue +4 -6
- package/vue/DyButton.vue +2 -14
- package/vue/DyCheckbox.vue +4 -7
- package/vue/DyCheckboxGroup.vue +4 -7
- package/vue/DyCoachMark.vue +4 -8
- package/vue/DyCodeBlock.vue +2 -4
- package/vue/DyCollapse.vue +2 -4
- package/vue/DyCollapsePanel.vue +4 -6
- package/vue/DyCompartment.vue +2 -2
- package/vue/DyCountdown.vue +4 -5
- package/vue/DyDivider.vue +2 -5
- package/vue/DyDrawer.vue +4 -21
- package/vue/DyEmpty.vue +2 -4
- package/vue/DyGroupedPicker.vue +53 -0
- package/vue/DyInput.vue +4 -22
- package/vue/DyLegend.vue +2 -6
- package/vue/{DyListOutside.vue → DyLetters.vue} +8 -8
- package/vue/DyList.vue +4 -16
- package/vue/DyOptions.vue +2 -4
- package/vue/DyPatForm.vue +2 -2
- package/vue/DyPlaceholder.vue +2 -9
- package/vue/DyRadio.vue +4 -6
- package/vue/DyRadioGroup.vue +4 -7
- package/vue/DyRate.vue +4 -7
- package/vue/DyRollingNumber.vue +42 -0
- package/vue/DySegmented.vue +4 -8
- package/vue/DySlider.vue +4 -12
- package/vue/DySortItem.vue +2 -2
- package/vue/DySpace.vue +2 -3
- package/vue/DySwitch.vue +4 -7
- package/vue/DyTag.vue +4 -9
- package/elements/flow.d.ts +0 -52
- package/elements/flow.d.ts.map +0 -1
- package/elements/flow.js +0 -703
- package/elements/flow.js.map +0 -1
- package/elements/map.d.ts +0 -48
- package/elements/map.d.ts.map +0 -1
- package/elements/map.js +0 -396
- package/elements/map.js.map +0 -1
- package/react/DyFlow.d.ts +0 -24
- package/react/DyFlow.js +0 -18
- package/react/DyFlowCanvas.d.ts +0 -29
- package/react/DyFlowCanvas.js +0 -18
- package/react/DyListItem.d.ts +0 -24
- package/react/DyListOutside.d.ts +0 -15
- package/react/DyMap.d.ts +0 -32
- package/react/DyMap.js +0 -18
- package/svelte/flow.d.ts +0 -18
- package/svelte/flow.js +0 -2
- package/svelte/map.d.ts +0 -26
- package/svelte/map.js +0 -2
- package/vue/DyFlow.vue +0 -49
- package/vue/DyFlowCanvas.vue +0 -53
- package/vue/DyListItem.vue +0 -48
- package/vue/DyMap.vue +0 -56
package/lib/timer.js
CHANGED
|
@@ -1,107 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
const setTimeout = globalThis.setTimeout;
|
|
3
|
-
/**Until the callback function resolve */
|
|
4
|
-
export async function forever(fn, interval = 1000) {
|
|
5
|
-
try {
|
|
6
|
-
return await fn();
|
|
7
|
-
}
|
|
8
|
-
catch (err) {
|
|
9
|
-
logger.error(err);
|
|
10
|
-
await sleep(interval);
|
|
11
|
-
return forever(fn, interval);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
/**Polling calls until cancel */
|
|
15
|
-
export function polling(fn, delay) {
|
|
16
|
-
let timer = 0;
|
|
17
|
-
let hasExit = false;
|
|
18
|
-
const poll = async () => {
|
|
19
|
-
try {
|
|
20
|
-
await fn();
|
|
21
|
-
}
|
|
22
|
-
catch {
|
|
23
|
-
}
|
|
24
|
-
finally {
|
|
25
|
-
if (!hasExit) {
|
|
26
|
-
timer = setTimeout(poll, delay);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
poll();
|
|
31
|
-
return (haveNext = false) => {
|
|
32
|
-
hasExit = true;
|
|
33
|
-
haveNext ? setTimeout(() => clearTimeout(timer), delay) : clearTimeout(timer);
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
export function sleep(ms = 3000) {
|
|
37
|
-
return new Promise((res) => setTimeout(res, ms));
|
|
38
|
-
}
|
|
39
|
-
export function nextFrame() {
|
|
40
|
-
return new Promise((resolve) => requestAnimationFrame(() => resolve(null)));
|
|
41
|
-
}
|
|
42
|
-
export function throttle(fn, wait = 500, { leading = false, maxWait = Infinity } = {}) {
|
|
43
|
-
let timer = 0;
|
|
44
|
-
let first = 0;
|
|
45
|
-
const exec = (...rest) => {
|
|
46
|
-
timer = setTimeout(() => (timer = 0), wait);
|
|
47
|
-
fn(...rest);
|
|
48
|
-
};
|
|
49
|
-
return (...rest) => {
|
|
50
|
-
const now = Date.now();
|
|
51
|
-
if (!timer)
|
|
52
|
-
first = now;
|
|
53
|
-
if (now - first > maxWait) {
|
|
54
|
-
first = now;
|
|
55
|
-
clearTimeout(timer);
|
|
56
|
-
exec(...rest);
|
|
57
|
-
}
|
|
58
|
-
else if (leading && !timer) {
|
|
59
|
-
exec(...rest);
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
clearTimeout(timer);
|
|
63
|
-
timer = setTimeout(() => exec(...rest), wait);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
export function debounce(fn, wait = 500, { leading = false } = {}) {
|
|
68
|
-
let timer = 0;
|
|
69
|
-
return (...args) => new Promise((resolve, reject) => {
|
|
70
|
-
clearTimeout(timer);
|
|
71
|
-
timer = setTimeout(() => {
|
|
72
|
-
timer = setTimeout(() => (timer = 0), wait);
|
|
73
|
-
Promise.resolve(fn(...args))
|
|
74
|
-
.then(resolve)
|
|
75
|
-
.catch(reject);
|
|
76
|
-
}, leading && !timer ? 0 : wait);
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
/**Invoke the function by condition */
|
|
80
|
-
export function invoke(fn, condition) {
|
|
81
|
-
let result;
|
|
82
|
-
let count = 0;
|
|
83
|
-
let invokeCount = 0;
|
|
84
|
-
let timestamp = 0;
|
|
85
|
-
let prevTimestamp = 0;
|
|
86
|
-
let invokeTimestamp = 0;
|
|
87
|
-
return (...rest) => {
|
|
88
|
-
prevTimestamp = timestamp;
|
|
89
|
-
timestamp = performance.now();
|
|
90
|
-
count++;
|
|
91
|
-
if (condition({ count, invokeCount, timestamp, prevTimestamp, invokeTimestamp })) {
|
|
92
|
-
invokeTimestamp = timestamp;
|
|
93
|
-
invokeCount++;
|
|
94
|
-
result = fn(...rest);
|
|
95
|
-
}
|
|
96
|
-
return result;
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
/**Only invoke first */
|
|
100
|
-
export function once(fn) {
|
|
101
|
-
return invoke(fn, ({ count }) => count === 1);
|
|
102
|
-
}
|
|
103
|
-
/**Ignore the first invoke */
|
|
104
|
-
export function omitOnce(fn) {
|
|
105
|
-
return invoke(fn, ({ count }) => count !== 1);
|
|
106
|
-
}
|
|
1
|
+
export * from '@mantou/tap-ui/lib/timer';
|
|
107
2
|
//# sourceMappingURL=timer.js.map
|
package/lib/timer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timer.js","sourceRoot":"","sources":["../src/lib/timer.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"timer.js","sourceRoot":"","sources":["../src/lib/timer.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
package/lib/types.d.ts
CHANGED
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export type StringList<T> = T | (string & NonNullable<unknown>);
|
|
3
|
-
export type ElementOf<T> = T extends (infer E)[] ? E : never;
|
|
4
|
-
export type ValueOf<T> = T[keyof T];
|
|
5
|
-
export type Modify<T, R> = Omit<T, keyof R> & R;
|
|
6
|
-
export type DeepPartial<T> = {
|
|
7
|
-
[P in keyof T]?: DeepPartial<T[P]>;
|
|
8
|
-
};
|
|
9
|
-
export declare function isNullish<T>(v: T | undefined | null): v is null | undefined;
|
|
10
|
-
export declare function isNotNullish<T>(v: T | undefined | null): v is T;
|
|
11
|
-
export declare function isNotString<T>(v: T | string): v is T;
|
|
12
|
-
export declare function isNotBoolean<T>(v: T | boolean): v is T;
|
|
13
|
-
export declare function isNotNumber<T>(v: T | number): v is T;
|
|
1
|
+
export * from '@mantou/tap-ui/lib/types';
|
|
14
2
|
//# sourceMappingURL=types.d.ts.map
|
package/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/lib/types.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/lib/types.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
package/lib/types.js
CHANGED
|
@@ -1,17 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
return v === null || v === undefined;
|
|
3
|
-
}
|
|
4
|
-
// Array.filter type support
|
|
5
|
-
export function isNotNullish(v) {
|
|
6
|
-
return !isNullish(v);
|
|
7
|
-
}
|
|
8
|
-
export function isNotString(v) {
|
|
9
|
-
return typeof v !== 'string';
|
|
10
|
-
}
|
|
11
|
-
export function isNotBoolean(v) {
|
|
12
|
-
return typeof v !== 'boolean';
|
|
13
|
-
}
|
|
14
|
-
export function isNotNumber(v) {
|
|
15
|
-
return typeof v !== 'number';
|
|
16
|
-
}
|
|
1
|
+
export * from '@mantou/tap-ui/lib/types';
|
|
17
2
|
//# sourceMappingURL=types.js.map
|
package/lib/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/lib/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/lib/types.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
package/lib/utils.d.ts
CHANGED
|
@@ -1,80 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import type { Store } from '@mantou/gem/lib/store';
|
|
3
|
-
import type { NonPrimitive } from '@mantou/gem/lib/utils';
|
|
4
|
-
/**Similar `lodash.keyBy` */
|
|
5
|
-
export declare function convertToMap<T extends Record<string, any>, V = T>(list: (T | null)[], key: keyof T): Record<string, V>;
|
|
6
|
-
export declare function convertToMap<T extends Record<string, any>, V = string>(list: (T | null)[], key: keyof T, value: keyof T, fallback?: any): Record<string, V>;
|
|
7
|
-
/**Get Cascader/Tree max deep*/
|
|
8
|
-
export declare function getCascaderDeep<T>(list: T[], cascaderKey: keyof T): number;
|
|
9
|
-
/**
|
|
10
|
-
* Get the value from the bottom layer,
|
|
11
|
-
* compare the new value of the upper layer to choose a new value, bubbling to the top layer
|
|
12
|
-
*/
|
|
13
|
-
export declare function getCascaderBubbleWeakMap<T extends Record<string, any>, F extends (_: T) => any, K = Exclude<ReturnType<F>, undefined | null>>(list: T[] | undefined, cascaderKey: keyof T, getValue: F, comparerFn?: (bottomValue: K, topValue: K) => K, setValueCallback?: (item: T, bubbleValue: K) => void): WeakMap<T, K>;
|
|
14
|
-
/**Simple proxy object, use prop name as a fallback when reading prop */
|
|
15
|
-
export declare function proxyObject(object: Record<string | symbol | number, any>): Record<string | number | symbol, any>;
|
|
16
|
-
type ReadPropOptions = {
|
|
17
|
-
fill?: boolean;
|
|
18
|
-
onlyFillIntermediate?: boolean;
|
|
19
|
-
};
|
|
20
|
-
/**Deep read prop */
|
|
21
|
-
export declare function readProp(obj: Record<string, any>, paths: string | number | symbol | string[], options?: ReadPropOptions): any;
|
|
22
|
-
/**Only let the last add Promise take effect, don’t care about the order of Resolve */
|
|
23
|
-
export declare class OrderlyPromisePool {
|
|
24
|
-
pool: any[];
|
|
25
|
-
add<T>(promise: Promise<T>, callback: (r: T) => void): void;
|
|
26
|
-
}
|
|
27
|
-
export declare enum ComparerType {
|
|
28
|
-
Eq = "eq",
|
|
29
|
-
Gte = "gte",
|
|
30
|
-
Lte = "lte",
|
|
31
|
-
Lt = "lt",
|
|
32
|
-
Gt = "gt",
|
|
33
|
-
Ne = "ne",
|
|
34
|
-
Miss = "miss",
|
|
35
|
-
Have = "have"
|
|
36
|
-
}
|
|
37
|
-
/**Serialize comparer */
|
|
38
|
-
export declare function comparer(a: any, comparerType: ComparerType, b: any): boolean;
|
|
39
|
-
export declare function getStringFromTemplate(input: TemplateResult | string): string;
|
|
40
|
-
/**Segmentation search word */
|
|
41
|
-
export declare function splitString(s: string): string[];
|
|
42
|
-
/**Search */
|
|
43
|
-
export declare function isIncludesString(origin: string | TemplateResult, search: string, caseSensitive?: boolean): boolean;
|
|
44
|
-
export type UseCacheStoreOptions<T> = {
|
|
45
|
-
cacheExcludeKeys?: (keyof T)[];
|
|
46
|
-
prefix?: string | (() => string | undefined);
|
|
47
|
-
depStore?: Store<NonPrimitive>;
|
|
48
|
-
};
|
|
49
|
-
/**Create auto cache(localStorage) Store */
|
|
50
|
-
export declare function createCacheStore<T extends Record<string, any>>(storageKey: string, initStore: T, options?: UseCacheStoreOptions<T>): {
|
|
51
|
-
store: ((value?: Partial<T> | undefined) => void) & Omit<{
|
|
52
|
-
name: never;
|
|
53
|
-
apply: never;
|
|
54
|
-
call: never;
|
|
55
|
-
bind: never;
|
|
56
|
-
toString: never;
|
|
57
|
-
prototype: never;
|
|
58
|
-
length: never;
|
|
59
|
-
arguments: never;
|
|
60
|
-
caller: never;
|
|
61
|
-
[Symbol.hasInstance]: never;
|
|
62
|
-
[Symbol.metadata]: never;
|
|
63
|
-
}, keyof T> & T;
|
|
64
|
-
saveStore: () => void;
|
|
65
|
-
};
|
|
66
|
-
export declare function isRemoteIcon(icon: string | Element | DocumentFragment): icon is string;
|
|
67
|
-
/**
|
|
68
|
-
* Pass additional fields
|
|
69
|
-
*
|
|
70
|
-
* not support async function
|
|
71
|
-
*/
|
|
72
|
-
export declare class DyPromise<T, E extends Record<string, unknown>> extends Promise<T> {
|
|
73
|
-
static new<V, U extends Record<string, unknown>>(executor: (resolve: (value: V | PromiseLike<V>) => void, reject: (reason?: any) => void) => void, props: U): DyPromise<V, U> & U;
|
|
74
|
-
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): DyPromise<TResult1 | TResult2, E> & E;
|
|
75
|
-
catch<TResult>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): DyPromise<TResult | T, E> & E;
|
|
76
|
-
finally(onfinally?: (() => void) | null | undefined): DyPromise<T, E> & E;
|
|
77
|
-
}
|
|
78
|
-
export declare const ignoredPromiseReasonSet: WeakSet<WeakKey>;
|
|
79
|
-
export {};
|
|
1
|
+
export * from '@mantou/tap-ui/lib/utils';
|
|
80
2
|
//# sourceMappingURL=utils.d.ts.map
|
package/lib/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/lib/utils.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/lib/utils.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
package/lib/utils.js
CHANGED
|
@@ -1,241 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { connect, createStore } from '@mantou/gem/lib/store';
|
|
3
|
-
import { cleanObject } from '@mantou/gem/lib/utils';
|
|
4
|
-
import { isNullish } from '../lib/types';
|
|
5
|
-
export function convertToMap(...rest) {
|
|
6
|
-
const [list, key, value, fallback] = rest;
|
|
7
|
-
const argLength = rest.length;
|
|
8
|
-
const isSelf = argLength === 2;
|
|
9
|
-
const hasFallback = argLength === 4;
|
|
10
|
-
const result = {};
|
|
11
|
-
list.forEach((item) => {
|
|
12
|
-
if (item) {
|
|
13
|
-
// missing `value` is self
|
|
14
|
-
result[item[key]] = value ? item[value] : item;
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
return new Proxy(result, {
|
|
18
|
-
get: (target, prop) => {
|
|
19
|
-
return prop in target || isSelf ? target[prop] : hasFallback ? fallback : prop;
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
/**Get Cascader/Tree max deep*/
|
|
24
|
-
export function getCascaderDeep(list, cascaderKey) {
|
|
25
|
-
const getChildren = (t) => {
|
|
26
|
-
const children = t[cascaderKey];
|
|
27
|
-
if (Array.isArray(children)) {
|
|
28
|
-
let l = 0;
|
|
29
|
-
children.forEach((e) => {
|
|
30
|
-
const ll = getChildren(e);
|
|
31
|
-
if (ll > l)
|
|
32
|
-
l = ll;
|
|
33
|
-
});
|
|
34
|
-
return 1 + l;
|
|
35
|
-
}
|
|
36
|
-
return 0;
|
|
37
|
-
};
|
|
38
|
-
let l = 0;
|
|
39
|
-
list.forEach((e) => {
|
|
40
|
-
const ll = getChildren(e);
|
|
41
|
-
if (ll > l)
|
|
42
|
-
l = ll;
|
|
43
|
-
});
|
|
44
|
-
return 1 + l;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Get the value from the bottom layer,
|
|
48
|
-
* compare the new value of the upper layer to choose a new value, bubbling to the top layer
|
|
49
|
-
*/
|
|
50
|
-
export function getCascaderBubbleWeakMap(list, cascaderKey, getValue, comparerFn = (a) => a, setValueCallback) {
|
|
51
|
-
const map = new WeakMap();
|
|
52
|
-
const getItemValue = (e) => {
|
|
53
|
-
const v = map.get(e) ?? getValue(e);
|
|
54
|
-
if (isNullish(v))
|
|
55
|
-
return;
|
|
56
|
-
return v;
|
|
57
|
-
};
|
|
58
|
-
const check = (l) => l?.forEach((e) => {
|
|
59
|
-
check(e[cascaderKey]);
|
|
60
|
-
let value = getItemValue(e);
|
|
61
|
-
e[cascaderKey]?.forEach((i) => {
|
|
62
|
-
const v = getItemValue(i);
|
|
63
|
-
value = isNullish(value) ? v : comparerFn(v, value);
|
|
64
|
-
});
|
|
65
|
-
if (!isNullish(value)) {
|
|
66
|
-
map.set(e, value);
|
|
67
|
-
setValueCallback?.(e, value);
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
check(list);
|
|
71
|
-
return map;
|
|
72
|
-
}
|
|
73
|
-
/**Simple proxy object, use prop name as a fallback when reading prop */
|
|
74
|
-
export function proxyObject(object) {
|
|
75
|
-
return new Proxy(object, {
|
|
76
|
-
get: (target, prop) => {
|
|
77
|
-
return prop in target ? target[prop] : prop;
|
|
78
|
-
},
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
/**Deep read prop */
|
|
82
|
-
export function readProp(obj, paths, options = {}) {
|
|
83
|
-
if (!Array.isArray(paths))
|
|
84
|
-
return obj[paths];
|
|
85
|
-
const len = paths.length;
|
|
86
|
-
return paths.reduce((p, c, i) => {
|
|
87
|
-
if (!options.fill)
|
|
88
|
-
return p?.[c];
|
|
89
|
-
if (options.onlyFillIntermediate && i === len - 1)
|
|
90
|
-
return p[c];
|
|
91
|
-
return (p[c] ||= {});
|
|
92
|
-
}, obj);
|
|
93
|
-
}
|
|
94
|
-
/**Only let the last add Promise take effect, don’t care about the order of Resolve */
|
|
95
|
-
export class OrderlyPromisePool {
|
|
96
|
-
pool = [];
|
|
97
|
-
add(promise, callback) {
|
|
98
|
-
const newIndex = this.pool.length;
|
|
99
|
-
const removeCallback = () => this.pool.splice(newIndex, 1, null);
|
|
100
|
-
this.pool.push(callback);
|
|
101
|
-
promise
|
|
102
|
-
.then((r) => {
|
|
103
|
-
if (this.pool[this.pool.length - 1] === callback) {
|
|
104
|
-
callback(r);
|
|
105
|
-
this.pool.length = 0;
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
removeCallback();
|
|
109
|
-
}
|
|
110
|
-
})
|
|
111
|
-
.catch((err) => {
|
|
112
|
-
removeCallback();
|
|
113
|
-
throw err;
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
export var ComparerType;
|
|
118
|
-
(function (ComparerType) {
|
|
119
|
-
ComparerType["Eq"] = "eq";
|
|
120
|
-
ComparerType["Gte"] = "gte";
|
|
121
|
-
ComparerType["Lte"] = "lte";
|
|
122
|
-
ComparerType["Lt"] = "lt";
|
|
123
|
-
ComparerType["Gt"] = "gt";
|
|
124
|
-
ComparerType["Ne"] = "ne";
|
|
125
|
-
ComparerType["Miss"] = "miss";
|
|
126
|
-
ComparerType["Have"] = "have";
|
|
127
|
-
})(ComparerType || (ComparerType = {}));
|
|
128
|
-
/**Serialize comparer */
|
|
129
|
-
export function comparer(a, comparerType, b) {
|
|
130
|
-
const aNum = Number(a);
|
|
131
|
-
const bNum = Number(b);
|
|
132
|
-
const isNumber = !Number.isNaN(aNum) && !Number.isNaN(aNum);
|
|
133
|
-
switch (comparerType) {
|
|
134
|
-
case ComparerType.Eq:
|
|
135
|
-
// biome-ignore lint/suspicious/noDoubleEquals: auto convert
|
|
136
|
-
return a == b;
|
|
137
|
-
case ComparerType.Ne:
|
|
138
|
-
// biome-ignore lint/suspicious/noDoubleEquals: auto convert
|
|
139
|
-
return a != b;
|
|
140
|
-
case ComparerType.Gt:
|
|
141
|
-
return isNumber ? aNum > bNum : a > b;
|
|
142
|
-
case ComparerType.Gte:
|
|
143
|
-
return isNumber ? aNum >= bNum : a >= b;
|
|
144
|
-
case ComparerType.Lt:
|
|
145
|
-
return isNumber ? aNum < bNum : a < b;
|
|
146
|
-
case ComparerType.Lte:
|
|
147
|
-
return isNumber ? aNum <= bNum : a <= b;
|
|
148
|
-
case ComparerType.Have:
|
|
149
|
-
return a?.includes?.(b);
|
|
150
|
-
case ComparerType.Miss:
|
|
151
|
-
return !a?.includes?.(b);
|
|
152
|
-
default:
|
|
153
|
-
return false;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
/**Serialized `TemplateResult` */
|
|
157
|
-
const div = document.createElement('div');
|
|
158
|
-
export function getStringFromTemplate(input) {
|
|
159
|
-
if (input instanceof TemplateResult) {
|
|
160
|
-
render(input, div);
|
|
161
|
-
return div.textContent || '';
|
|
162
|
-
}
|
|
163
|
-
return String(input);
|
|
164
|
-
}
|
|
165
|
-
/**Segmentation search word */
|
|
166
|
-
export function splitString(s) {
|
|
167
|
-
return s.split(/(?:\s|\/)+/);
|
|
168
|
-
}
|
|
169
|
-
/**Search */
|
|
170
|
-
export function isIncludesString(origin, search, caseSensitive = false) {
|
|
171
|
-
const getStr = (s) => (caseSensitive ? s : s.toLowerCase()).trim();
|
|
172
|
-
const oString = getStr(getStringFromTemplate(origin));
|
|
173
|
-
const sString = getStr(search);
|
|
174
|
-
return splitString(sString).some((s) => oString.includes(s));
|
|
175
|
-
}
|
|
176
|
-
/**Create auto cache(localStorage) Store */
|
|
177
|
-
export function createCacheStore(storageKey, initStore, options) {
|
|
178
|
-
const getKey = () => {
|
|
179
|
-
const prefix = typeof options?.prefix === 'function' ? options.prefix() : options?.prefix;
|
|
180
|
-
return prefix ? `${prefix}@${storageKey}` : storageKey;
|
|
181
|
-
};
|
|
182
|
-
const getStoreStore = (key) => {
|
|
183
|
-
let storeCache;
|
|
184
|
-
try {
|
|
185
|
-
storeCache = JSON.parse(localStorage.getItem(key) || '{}');
|
|
186
|
-
}
|
|
187
|
-
catch {
|
|
188
|
-
//
|
|
189
|
-
}
|
|
190
|
-
return storeCache ? { ...initStore, ...storeCache } : initStore;
|
|
191
|
-
};
|
|
192
|
-
const cacheExcludeKeys = new Set(options?.cacheExcludeKeys || []);
|
|
193
|
-
let key = getKey();
|
|
194
|
-
const store = createStore(getStoreStore(key));
|
|
195
|
-
if (options?.depStore) {
|
|
196
|
-
connect(options.depStore, () => {
|
|
197
|
-
const newKey = getKey();
|
|
198
|
-
if (newKey !== key) {
|
|
199
|
-
key = newKey;
|
|
200
|
-
cleanObject(store)(getStoreStore(newKey));
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
const saveStore = () => {
|
|
205
|
-
localStorage.setItem(key, JSON.stringify(Object.fromEntries(Object.entries(store).filter(([k]) => !cacheExcludeKeys.has(k)))));
|
|
206
|
-
};
|
|
207
|
-
addEventListener('pagehide', saveStore);
|
|
208
|
-
return { store, saveStore };
|
|
209
|
-
}
|
|
210
|
-
// 是链接需要使用 img 渲染
|
|
211
|
-
export function isRemoteIcon(icon) {
|
|
212
|
-
return typeof icon === 'string' && !!icon.trim().match(/^(http|[./])/);
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* Pass additional fields
|
|
216
|
-
*
|
|
217
|
-
* not support async function
|
|
218
|
-
*/
|
|
219
|
-
export class DyPromise extends Promise {
|
|
220
|
-
static new(executor, props) {
|
|
221
|
-
const instance = new DyPromise(executor);
|
|
222
|
-
return Object.assign(instance, props);
|
|
223
|
-
}
|
|
224
|
-
// biome-ignore lint/suspicious/noThenProperty: extends
|
|
225
|
-
then(onfulfilled, onrejected) {
|
|
226
|
-
const result = super.then(onfulfilled, onrejected);
|
|
227
|
-
return Object.assign(result, this);
|
|
228
|
-
}
|
|
229
|
-
catch(onrejected) {
|
|
230
|
-
const result = super.catch(onrejected);
|
|
231
|
-
return Object.assign(result, this);
|
|
232
|
-
}
|
|
233
|
-
finally(onfinally) {
|
|
234
|
-
const result = super.finally(onfinally);
|
|
235
|
-
return Object.assign(result, this);
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
// 不应该以发生错误的方式来处理拒绝的 Promise
|
|
239
|
-
// 缺点:同时有个相同原因的 Promise 需要用错误处理时会被忽略
|
|
240
|
-
export const ignoredPromiseReasonSet = new WeakSet();
|
|
1
|
+
export * from '@mantou/tap-ui/lib/utils';
|
|
241
2
|
//# sourceMappingURL=utils.js.map
|
package/lib/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/lib/utils.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/lib/utils.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
package/locales/en.d.ts
CHANGED
|
@@ -1,38 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
localeCode: string;
|
|
3
|
-
year: string;
|
|
4
|
-
month: string;
|
|
5
|
-
week: string;
|
|
6
|
-
day: string;
|
|
7
|
-
hour: string;
|
|
8
|
-
minute: string;
|
|
9
|
-
second: string;
|
|
10
|
-
millisecond: string;
|
|
11
|
-
thousand: string;
|
|
12
|
-
million: string;
|
|
13
|
-
billion: string;
|
|
14
|
-
trillion: string;
|
|
15
|
-
copySuccess: string;
|
|
16
|
-
copyFail: string;
|
|
17
|
-
add: string;
|
|
18
|
-
remove: string;
|
|
19
|
-
search: string;
|
|
20
|
-
filter: string;
|
|
21
|
-
loading: string;
|
|
22
|
-
ok: string;
|
|
23
|
-
cancel: string;
|
|
24
|
-
prevPage: string;
|
|
25
|
-
nextPage: string;
|
|
26
|
-
perPage: string;
|
|
27
|
-
noData: string;
|
|
28
|
-
more: string;
|
|
29
|
-
less: string;
|
|
30
|
-
nextTour: string;
|
|
31
|
-
skipTour: string;
|
|
32
|
-
finishTour: string;
|
|
33
|
-
currentOfTotal: string;
|
|
34
|
-
requiredMeg: string;
|
|
35
|
-
patternMsg: string;
|
|
36
|
-
};
|
|
37
|
-
export default _default;
|
|
1
|
+
export { default } from '@mantou/tap-ui/locales/en';
|
|
38
2
|
//# sourceMappingURL=en.d.ts.map
|
package/locales/en.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../src/locales/en.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../src/locales/en.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC"}
|
package/locales/en.js
CHANGED
|
@@ -1,37 +1,2 @@
|
|
|
1
|
-
export default
|
|
2
|
-
localeCode: 'en',
|
|
3
|
-
year: 'Year',
|
|
4
|
-
month: 'Month',
|
|
5
|
-
week: 'Week',
|
|
6
|
-
day: 'Day',
|
|
7
|
-
hour: 'Hour',
|
|
8
|
-
minute: 'Minute',
|
|
9
|
-
second: 'Second',
|
|
10
|
-
millisecond: 'Millisecond',
|
|
11
|
-
thousand: 'K',
|
|
12
|
-
million: 'Million',
|
|
13
|
-
billion: 'Billion',
|
|
14
|
-
trillion: 'Trillion',
|
|
15
|
-
copySuccess: 'Copy success',
|
|
16
|
-
copyFail: 'Copy fail',
|
|
17
|
-
add: 'Add',
|
|
18
|
-
remove: 'Remove',
|
|
19
|
-
search: 'Search',
|
|
20
|
-
filter: 'Filter',
|
|
21
|
-
loading: 'Loading',
|
|
22
|
-
ok: 'OK',
|
|
23
|
-
cancel: 'Cancel',
|
|
24
|
-
prevPage: 'Prev',
|
|
25
|
-
nextPage: 'Next',
|
|
26
|
-
perPage: '$1 / Page',
|
|
27
|
-
noData: 'No Data',
|
|
28
|
-
more: 'More',
|
|
29
|
-
less: 'Less',
|
|
30
|
-
nextTour: 'Next',
|
|
31
|
-
skipTour: 'Skip',
|
|
32
|
-
finishTour: 'Finish',
|
|
33
|
-
currentOfTotal: '$1 of $2',
|
|
34
|
-
requiredMeg: 'Please fill in the necessary field',
|
|
35
|
-
patternMsg: 'Pattern does not match',
|
|
36
|
-
};
|
|
1
|
+
export { default } from '@mantou/tap-ui/locales/en';
|
|
37
2
|
//# sourceMappingURL=en.js.map
|
package/locales/en.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.js","sourceRoot":"","sources":["../src/locales/en.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"en.js","sourceRoot":"","sources":["../src/locales/en.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC"}
|
package/locales/zh.d.ts
CHANGED
package/locales/zh.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zh.d.ts","sourceRoot":"","sources":["../src/locales/zh.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"zh.d.ts","sourceRoot":"","sources":["../src/locales/zh.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC"}
|
package/locales/zh.js
CHANGED
|
@@ -1,38 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
localeCode: 'zh',
|
|
3
|
-
year: '年',
|
|
4
|
-
month: '月',
|
|
5
|
-
week: '周',
|
|
6
|
-
day: '天',
|
|
7
|
-
hour: '小时',
|
|
8
|
-
minute: '分钟',
|
|
9
|
-
second: '秒',
|
|
10
|
-
millisecond: '毫秒',
|
|
11
|
-
thousand: '千',
|
|
12
|
-
million: '百万',
|
|
13
|
-
billion: '十亿',
|
|
14
|
-
trillion: '万亿',
|
|
15
|
-
copySuccess: '复制成功',
|
|
16
|
-
copyFail: '复制失败',
|
|
17
|
-
add: '新增',
|
|
18
|
-
remove: '移除',
|
|
19
|
-
search: '搜索',
|
|
20
|
-
filter: '过滤',
|
|
21
|
-
loading: '加载中',
|
|
22
|
-
ok: '确认',
|
|
23
|
-
cancel: '取消',
|
|
24
|
-
prevPage: '上一页',
|
|
25
|
-
nextPage: '下一页',
|
|
26
|
-
perPage: '$1 / 页',
|
|
27
|
-
noData: '暂无数据',
|
|
28
|
-
more: '展开',
|
|
29
|
-
less: '收起',
|
|
30
|
-
nextTour: '下一步',
|
|
31
|
-
skipTour: '跳过',
|
|
32
|
-
finishTour: '完成',
|
|
33
|
-
currentOfTotal: '$1 / $2',
|
|
34
|
-
requiredMeg: '请填写必要字段',
|
|
35
|
-
patternMsg: '格式不正确',
|
|
36
|
-
};
|
|
37
|
-
export default lang;
|
|
1
|
+
export { default } from '@mantou/tap-ui/locales/zh';
|
|
38
2
|
//# sourceMappingURL=zh.js.map
|