yc-design-vue 1.9.0 → 1.9.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/es/Alert/index.vue.js +1 -1
- package/es/Calendar/Calendar.vue.js +1 -1
- package/es/Cascader/CascaderIcon.vue.js +1 -1
- package/es/Checkbox/Checkbox.vue.js +1 -1
- package/es/Collapse/CollapseItem.vue.js +2 -2
- package/es/Drawer/Drawer.vue.js +1 -1
- package/es/Input/Input.vue.js +1 -1
- package/es/Input/InputSuffix.vue.js +1 -1
- package/es/InputTag/index.vue.js +1 -1
- package/es/Menu/SubMenu.vue.js +2 -2
- package/es/Message/Message.vue.js +1 -1
- package/es/Modal/Modal.vue.js +1 -1
- package/es/Notification/Notification.vue.js +1 -1
- package/es/PageHeader/index.vue.js +1 -1
- package/es/Progress/ProgressCircle.vue.js +1 -1
- package/es/Radio/Radio.vue.js +1 -1
- package/es/Select/SelectIcon.vue.js +1 -1
- package/es/Tabs/TabButton.vue.js +1 -1
- package/es/Tag/index.vue.js +1 -1
- package/es/Textarea/index.vue.js +1 -1
- package/es/TimePicker/TimePicker.vue.js +1 -1
- package/es/Transfer/TransferPanel.vue.js +3 -3
- package/es/Trigger/index.vue.js +1 -1
- package/es/Typography/TypographyBase.vue.js +2 -2
- package/es/_shared/components/ExpandTransition.vue3.js +2 -2
- package/es/_shared/icons/IconCopy.vue.js +17 -1
- package/es/_shared/icons/IconCopy.vue2.js +1 -17
- package/es/_shared/icons/IconDelete.vue.js +17 -1
- package/es/_shared/icons/IconDelete.vue2.js +1 -17
- package/es/_shared/icons/IconEdit.vue.js +17 -1
- package/es/_shared/icons/IconEdit.vue2.js +1 -17
- package/es/_shared/icons/IconExclamation.vue.js +28 -1
- package/es/_shared/icons/IconExclamation.vue2.js +1 -28
- package/es/_shared/icons/IconSearch.vue.js +17 -1
- package/es/_shared/icons/IconSearch.vue2.js +1 -17
- package/es/_shared/lang/ar-eg.js +154 -0
- package/es/_shared/lang/de-de.js +154 -0
- package/es/_shared/lang/en-us.js +159 -0
- package/es/_shared/lang/es-es.js +154 -0
- package/es/_shared/lang/fr-fr.js +154 -0
- package/es/_shared/lang/id-id.js +154 -0
- package/es/_shared/lang/it-it.js +154 -0
- package/es/_shared/lang/ja-jp.js +202 -0
- package/es/_shared/lang/km-kh.js +154 -0
- package/es/_shared/lang/ko-kr.js +154 -0
- package/es/_shared/lang/ms-my.js +154 -0
- package/es/_shared/lang/nl-nl.js +202 -0
- package/es/_shared/lang/pt-pt.js +154 -0
- package/es/_shared/lang/ru-ru.js +202 -0
- package/es/_shared/lang/th-th.js +154 -0
- package/es/_shared/lang/vi-vn.js +154 -0
- package/es/_shared/lang/zh-tw.js +202 -0
- package/es/_shared/utils/locale.d.ts +1 -13
- package/es/_shared/utils/locale.js +4 -0
- package/es/node_modules/b-validate/es/is.js +27 -0
- package/es/node_modules/b-validate/es/locale/en-US.js +50 -0
- package/es/node_modules/b-validate/es/rules/base.js +86 -0
- package/es/node_modules/b-validate/es/util.js +25 -0
- package/lib/Alert/index.vue.js +1 -1
- package/lib/Calendar/Calendar.vue.js +1 -1
- package/lib/Cascader/CascaderIcon.vue.js +1 -1
- package/lib/Checkbox/Checkbox.vue.js +1 -1
- package/lib/Collapse/CollapseItem.vue.js +1 -1
- package/lib/Drawer/Drawer.vue.js +1 -1
- package/lib/Input/Input.vue.js +1 -1
- package/lib/Input/InputSuffix.vue.js +1 -1
- package/lib/InputTag/index.vue.js +1 -1
- package/lib/Menu/SubMenu.vue.js +1 -1
- package/lib/Message/Message.vue.js +1 -1
- package/lib/Modal/Modal.vue.js +1 -1
- package/lib/Notification/Notification.vue.js +1 -1
- package/lib/PageHeader/index.vue.js +1 -1
- package/lib/Progress/ProgressCircle.vue.js +1 -1
- package/lib/Radio/Radio.vue.js +1 -1
- package/lib/Select/SelectIcon.vue.js +1 -1
- package/lib/Tabs/TabButton.vue.js +1 -1
- package/lib/Tag/index.vue.js +1 -1
- package/lib/Textarea/index.vue.js +1 -1
- package/lib/TimePicker/TimePicker.vue.js +1 -1
- package/lib/Transfer/TransferPanel.vue.js +1 -1
- package/lib/Trigger/index.vue.js +1 -1
- package/lib/Typography/TypographyBase.vue.js +1 -1
- package/lib/_shared/components/ExpandTransition.vue3.js +1 -1
- package/lib/_shared/icons/IconCopy.vue.js +1 -1
- package/lib/_shared/icons/IconCopy.vue2.js +1 -1
- package/lib/_shared/icons/IconDelete.vue.js +1 -1
- package/lib/_shared/icons/IconDelete.vue2.js +1 -1
- package/lib/_shared/icons/IconEdit.vue.js +1 -1
- package/lib/_shared/icons/IconEdit.vue2.js +1 -1
- package/lib/_shared/icons/IconExclamation.vue.js +1 -1
- package/lib/_shared/icons/IconExclamation.vue2.js +1 -1
- package/lib/_shared/icons/IconSearch.vue.js +1 -1
- package/lib/_shared/icons/IconSearch.vue2.js +1 -1
- package/lib/_shared/lang/ar-eg.js +1 -0
- package/lib/_shared/lang/de-de.js +1 -0
- package/lib/_shared/lang/en-us.js +1 -0
- package/lib/_shared/lang/es-es.js +1 -0
- package/lib/_shared/lang/fr-fr.js +1 -0
- package/lib/_shared/lang/id-id.js +1 -0
- package/lib/_shared/lang/it-it.js +1 -0
- package/lib/_shared/lang/ja-jp.js +1 -0
- package/lib/_shared/lang/km-kh.js +1 -0
- package/lib/_shared/lang/ko-kr.js +1 -0
- package/lib/_shared/lang/ms-my.js +1 -0
- package/lib/_shared/lang/nl-nl.js +1 -0
- package/lib/_shared/lang/pt-pt.js +1 -0
- package/lib/_shared/lang/ru-ru.js +1 -0
- package/lib/_shared/lang/th-th.js +1 -0
- package/lib/_shared/lang/vi-vn.js +1 -0
- package/lib/_shared/lang/zh-tw.js +1 -0
- package/lib/_shared/utils/locale.d.ts +1 -13
- package/lib/_shared/utils/locale.js +1 -1
- package/lib/node_modules/b-validate/es/is.js +1 -0
- package/lib/node_modules/b-validate/es/locale/en-US.js +1 -0
- package/lib/node_modules/b-validate/es/rules/base.js +1 -0
- package/lib/node_modules/b-validate/es/util.js +1 -0
- package/package.json +3 -3
- package/es/_shared/lang/interface.d.ts +0 -151
- package/lib/_shared/lang/interface.d.ts +0 -151
- /package/es/_shared/components/{ExpandTransition.vue.js → ExpandTransition.vue2.js} +0 -0
- /package/lib/_shared/components/{ExpandTransition.vue.js → ExpandTransition.vue2.js} +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e={formatYear:"YYYY",formatMonth:"MMM YYYY",today:"วันนี้",view:{month:"เดือน",year:"ปี",week:"สัปดาห์",day:"วัน"},month:{long:{January:"มกราคม",February:"กุมภาพันธ์",March:"มีนาคม",April:"เมษายน",May:"อาจ",June:"มิถุนายน",July:"กรกฎาคม",August:"สิงหาคม",September:"กันยายน",October:"ตุลาคม",November:"พฤศจิกายน",December:"ธันวาคม"},short:{January:"Jan",February:"Feb",March:"Mar",April:"Apr",May:"May",June:"Jun",July:"Jul",August:"Aug",September:"Sept",October:"Oct",November:"Nov",December:"Dec"}},week:{long:{self:"สัปดาห์",monday:"วันจันทร์",tuesday:"วันอังคาร",wednesday:"วันพุธ",thursday:"วันพฤหัสบดี",friday:"วันศุกร์",saturday:"วันเสาร์",sunday:"วันอาทิตย์"},short:{self:"สัปดาห์",monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat",sunday:"Sun"}}},t={locale:"th-TH",empty:{description:"ไม่มีข้อมูล"},drawer:{okText:"ตกลง",cancelText:"ยกเลิก"},popconfirm:{okText:"ตกลง",cancelText:"ยกเลิก"},modal:{okText:"ตกลง",cancelText:"ยกเลิก"},pagination:{goto:"ไปที่",page:"หน้า",countPerPage:" / หน้า",total:"รวม: {0}"},table:{okText:"ตกลง",resetText:"รีเซ็ต"},upload:{start:"เริ่ม",cancel:"ยกเลิก",delete:"ลบ",retry:"คลิกเพื่อลองอีกครั้ง",buttonText:"ที่อัพโหลด",preview:"ดูตัวอย่าง",drag:"คลิกหรือลากไฟล์ไปยังพื้นที่นี้เพื่ออัปโหลด",dragHover:"ปล่อยเพื่ออัปโหลด",error:"ข้อผิดพลาดในการอัปโหลด"},calendar:e,datePicker:{view:e.view,month:e.month,week:e.week,placeholder:{date:"โปรดเลือกวันที่",week:"โปรดเลือกสัปดาห์",month:"โปรดเลือกเดือน",year:"โปรดเลือกปี",quarter:"โปรดเลือกไตรมาส",time:"เลือกเวลา"},rangePlaceholder:{date:["วันที่เริ่มต้น","วันที่สิ้นสุด"],week:["เริ่มต้นสัปดาห์","สิ้นสุดสัปดาห์"],month:["เริ่มเดือน","สิ้นเดือน"],year:["เริ่มต้นปี","สิ้นปี"],quarter:["เริ่มไตรมาส","สิ้นไตรมาส"],time:["เวลาเริ่มต้น","เวลาสิ้นสุด"]},selectTime:"เลือกเวลา",today:"วันนี้",now:"ตอนนี้",ok:"ตกลง"},image:{loading:"กำลังโหลด"},imagePreview:{fullScreen:"เต็มจอ",rotateRight:"หมุนไปทางขวา",rotateLeft:"หมุนซ้าย",zoomIn:"ขยายเข้า",zoomOut:"ซูมออก",originalSize:"ขนาดต้นฉบับ"},typography:{copy:"สำเนา",copied:"คัดลอกแล้ว",edit:"แก้ไข",collapse:"พับ",expand:"แฉ"},colorPicker:{history:"สีที่ใช้ล่าสุด",preset:"สี ที่ตั้งไว้สำหรับระบบ",empty:"ไม่มีข้อมูล"}};module.exports=t;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const t={formatYear:"YYYY",formatMonth:"MMMM YYYY",today:"Hôm nay",view:{month:"Tháng",year:"Năm",week:"Tuần",day:"Ngày"},month:{long:{January:"Tháng Một",February:"Tháng Hai",March:"Tháng Ba",April:"Tháng Tư",May:"Tháng Năm",June:"Tháng Sáu",July:"Tháng Bảy",August:"Tháng Tám",September:"Tháng Chín",October:"Tháng Mười",November:"Tháng Mười Một",December:"Tháng Mười Hai"},short:{January:"Thg1",February:"Thg2",March:"Thg3",April:"Thg4",May:"Thg5",June:"Thg6",July:"Thg7",August:"Thg8",September:"Thg9",October:"Thg10",November:"Thg11",December:"Thg12"}},week:{long:{self:"Tuần",monday:"Thứ Hai",tuesday:"Thứ Ba",wednesday:"Thứ Tư",thursday:"Thứ Năm",friday:"Thứ Sáu",saturday:"Thứ Bảy",sunday:"Chủ Nhật"},short:{self:"Tuần",monday:"T2",tuesday:"T3",wednesday:"Tư",thursday:"Năm",friday:"Sáu",saturday:"Bảy",sunday:"CN"}}},e={locale:"vi-VN",empty:{description:"Không có dữ liệu"},drawer:{okText:"Đồng ý",cancelText:"Hủy bỏ"},popconfirm:{okText:"Đồng ý",cancelText:"Hủy bỏ"},modal:{okText:"Đồng ý",cancelText:"Hủy bỏ"},pagination:{goto:"Đi tới",page:"Trang",countPerPage:"sản phẩm/trang",total:"Tổng số {0}"},table:{okText:"Đồng ý",resetText:"Thiết lập lại"},upload:{start:"Bắt đầu",cancel:"Hủy bỏ",delete:"Xóa bỏ",retry:"Nhấp để thử lại",buttonText:"Nhấp để tải lên",preview:"Xem trước",drag:"Nhấp hoặc kéo thả tập tin vào đây để tải lên",dragHover:"Thả tập tin và bắt đầu tải lên",error:"Lỗi tải lên"},calendar:t,datePicker:{view:t.view,month:t.month,week:t.week,placeholder:{date:"Vui lòng chọn một ngày",week:"Vui lòng chọn một tuần",month:"Vui lòng chọn một tháng",year:"Vui lòng chọn một năm",quarter:"Vui lòng chọn một phần tư",time:"Vui lòng chọn một"},rangePlaceholder:{date:["Ngày bắt đầu","Ngày kết thúc"],week:["Tuần bắt đầu","Tuần kết thúc"],month:["Tháng bắt đầu","Tháng kết thúc"],year:["Năm bắt đầu","Năm kết thúc"],quarter:["Quý bắt đầu","Quý kết thúc"],time:["Giờ bắt đầu","Giờ kết thúc"]},selectTime:"Vui lòng chọn thời gian",today:"Hôm nay",now:"Bây giờ",ok:"Đồng ý"},image:{loading:"Đang tải"},imagePreview:{fullScreen:"Toàn màn hình",rotateRight:"Xoay sang phải",rotateLeft:"Xoay sang trái",zoomIn:"Phóng to",zoomOut:"Thu nhỏ",originalSize:"Kích thước gốc"},typography:{copied:"Đã sao chép",copy:"Sao chép",expand:"Mở rộng",collapse:"Thu gọn",edit:"Chỉnh sửa"},colorPicker:{history:"Màu sắc được sử dụng gần đây",preset:"Màu mặc định của hệ thống",empty:"Không có dữ liệu"}};module.exports=e;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e={formatYear:"YYYY 年",formatMonth:"YYYY 年 MM 月",today:"今天",view:{month:"月",year:"年",week:"周",day:"日"},month:{long:{January:"一月",February:"二月",March:"三月",April:"四月",May:"五月",June:"六月",July:"七月",August:"八月",September:"九月",October:"十月",November:"十一月",December:"十二月"},short:{January:"一月",February:"二月",March:"三月",April:"四月",May:"五月",June:"六月",July:"七月",August:"八月",September:"九月",October:"十月",November:"十一月",December:"十二月"}},week:{long:{self:"周",monday:"周一",tuesday:"周二",wednesday:"周三",thursday:"周四",friday:"周五",saturday:"周六",sunday:"周日"},short:{self:"周",monday:"一",tuesday:"二",wednesday:"三",thursday:"四",friday:"五",saturday:"六",sunday:"日"}}},a={locale:"zh-TW",empty:{description:"無資料"},drawer:{okText:"確認",cancelText:"取消"},popconfirm:{okText:"確認",cancelText:"取消"},modal:{okText:"確認",cancelText:"取消"},pagination:{goto:"前往",page:"頁",countPerPage:"項/頁",total:"共 {0} 項"},table:{okText:"確認",resetText:"重置"},upload:{start:"開始",cancel:"取消",delete:"删除",retry:"點擊重試",buttonText:"點擊上傳",preview:"預覽",drag:"點擊或拖拽文件到此處上傳",dragHover:"釋放文件並開始上傳",error:"上傳失敗"},calendar:e,datePicker:{view:e.view,month:e.month,week:e.week,placeholder:{date:"請選擇日期",week:"請選擇周",month:"請選擇月份",year:"請選擇年份",quarter:"請選擇季度",time:"請選擇時間"},rangePlaceholder:{date:["開始日期","結束日期"],week:["開始周","結束周"],month:["開始月份","結束月份"],year:["開始年份","結束年份"],quarter:["開始季度","結束季度"],time:["開始時間","結束時間"]},selectTime:"選擇時間",today:"今天",now:"此刻",ok:"確認"},image:{loading:"載入中"},imagePreview:{fullScreen:"全屏",rotateRight:"向右旋轉",rotateLeft:"向左旋轉",zoomIn:"放大",zoomOut:"縮小",originalSize:"原始尺寸"},typography:{copied:"已複製",copy:"複製",expand:"展開",collapse:"折疊",edit:"編輯"},form:{validateMessages:{required:"#{field} 是必填項",type:{string:"#{value} 不是合法的文本類型",number:"#{value} 不是合法的數字類型",boolean:"#{value} 不是合法的布爾類型",array:"#{value} 不是合法的數組類型",object:"#{value} 不是合法的對像類型",url:"#{value} 不是合法的 url 地址",email:"#{value} 不是合法的郵箱地址",ip:"#{value} 不是合法的 IP 地址"},number:{min:"`#{value}` 小於最小值 `#{min}`",max:"`#{value}` 大於最大值 `#{max}`",equal:"`#{value}` 不等於 `#{equal}`",range:"`#{value}` 不在 `#{min} ~ #{max}` 範圍內",positive:"`#{value}` 不是正數",negative:"`#{value}` 不是負數"},array:{length:"`#{value}` 個數不等於 #{length}",minLength:"`#{value}` 個數最少為 #{minLength}",maxLength:"`#{value}` 個數最多為 #{maxLength}",includes:"#{value} 不包含 #{includes}",deepEqual:"#{value} 不等於 #{deepEqual}",empty:"`#{value}` 不是空數組"},string:{minLength:"字符數最少為 #{minLength}",maxLength:"字符數最多為 #{maxLength}",length:"`#{value}` 字符數不等於 #{length}",match:"`#{value}` 不符合模式 #{pattern}",uppercase:"`#{value}` 不是全大寫",lowercase:"`#{value}` 不是全小寫"},object:{deepEqual:"`#{value}` 不等於 #{deepEqual}",hasKeys:"`#{value}` 不包含字段 #{keys}",empty:"`#{value}` 不是對象"},boolean:{true:"期望是 `true`",false:"期望是 `false`"}}},colorPicker:{history:"最近使用顏色",preset:"系統預設顏色",empty:"暫無"}};module.exports=a;
|
@@ -1,20 +1,8 @@
|
|
1
|
-
/**
|
2
|
-
* 添加地区语言包。添加过后的语言包可以通过 `useLocale` 使用
|
3
|
-
* @param messages 需要添加的地区语言数据
|
4
|
-
* @param options
|
5
|
-
*/
|
6
1
|
export declare const addI18nMessages: (messages: Record<string, any>, options?: {
|
7
2
|
overwrite?: boolean;
|
8
3
|
}) => void;
|
9
|
-
/**
|
10
|
-
* 切换地区语言。仅在未提供ConfigProvider时生效。
|
11
|
-
* @param locale
|
12
|
-
*/
|
13
|
-
export declare const useLocale: (locale: string) => void;
|
14
|
-
/**
|
15
|
-
* 获取当前的地区语言
|
16
|
-
*/
|
17
4
|
export declare const getLocale: () => string;
|
5
|
+
export declare const useLocale: (locale: string) => void;
|
18
6
|
export declare const useI18n: () => {
|
19
7
|
i18nMessage: import('vue').ComputedRef<Record<string, any>>;
|
20
8
|
locale: import('vue').ComputedRef<any>;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./is.js"),
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./is.js"),s=require("./global-config.js"),l=require("../lang/zh-cn.js"),n=e=>Object.freeze(Object.defineProperty({__proto__:null,default:e},Symbol.toStringTag,{value:"Module"})),t=e.ref("zh-CN"),i=e.reactive({"zh-CN":l});Object.assign({"../lang/ar-eg.ts":()=>Promise.resolve().then(()=>n(require("../lang/ar-eg.js"))),"../lang/de-de.ts":()=>Promise.resolve().then(()=>n(require("../lang/de-de.js"))),"../lang/en-us.ts":()=>Promise.resolve().then(()=>n(require("../lang/en-us.js"))),"../lang/es-es.ts":()=>Promise.resolve().then(()=>n(require("../lang/es-es.js"))),"../lang/fr-fr.ts":()=>Promise.resolve().then(()=>n(require("../lang/fr-fr.js"))),"../lang/id-id.ts":()=>Promise.resolve().then(()=>n(require("../lang/id-id.js"))),"../lang/it-it.ts":()=>Promise.resolve().then(()=>n(require("../lang/it-it.js"))),"../lang/ja-jp.ts":()=>Promise.resolve().then(()=>n(require("../lang/ja-jp.js"))),"../lang/km-kh.ts":()=>Promise.resolve().then(()=>n(require("../lang/km-kh.js"))),"../lang/ko-kr.ts":()=>Promise.resolve().then(()=>n(require("../lang/ko-kr.js"))),"../lang/ms-my.ts":()=>Promise.resolve().then(()=>n(require("../lang/ms-my.js"))),"../lang/nl-nl.ts":()=>Promise.resolve().then(()=>n(require("../lang/nl-nl.js"))),"../lang/pt-pt.ts":()=>Promise.resolve().then(()=>n(require("../lang/pt-pt.js"))),"../lang/ru-ru.ts":()=>Promise.resolve().then(()=>n(require("../lang/ru-ru.js"))),"../lang/th-th.ts":()=>Promise.resolve().then(()=>n(require("../lang/th-th.js"))),"../lang/vi-vn.ts":()=>Promise.resolve().then(()=>n(require("../lang/vi-vn.js"))),"../lang/zh-cn.ts":()=>Promise.resolve().then(()=>n(require("../lang/zh-cn.js"))),"../lang/zh-tw.ts":()=>Promise.resolve().then(()=>n(require("../lang/zh-tw.js")))})["../lang/zh-cn.ts"]().then(e=>{i["zh-CN"]=e.default});exports.useI18n=()=>{const{locale:l}=s.getGlobalConfig(),n=e.computed(()=>l.value??i[t.value]);return{i18nMessage:n,locale:e.computed(()=>n.value.locale),t:(e,...s)=>{const l=e.split(".");let t=n.value;for(const r of l){if(!t[r])return e;t=t[r]}return r.isString(t)&&s.length>0?t.replace(/{(\d+)}/g,(e,r)=>s[r]??e):t}}};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var t=Object.prototype.toString;function r(r){return"[object Array]"===t.call(r)}exports.isArray=r,exports.isEmptyArray=function(t){return r(t)&&!t.length},exports.isEmptyValue=function(t){return null==t||""===t},exports.isFunction=function(r){return"[object Function]"===t.call(r)},exports.isObject=function(r){return"[object Object]"===t.call(r)},exports.isString=function(r){return"[object String]"===t.call(r)};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";var e="#{field} is not a #{type} type",t={required:"#{field} is required",type:{ip:e,email:e,url:e,string:e,number:e,array:e,object:e,boolean:e},number:{min:"`#{value}` is not greater than `#{min}`",max:"`#{value}` is not less than `#{max}`",equal:"`#{value}` is not equal to `#{equal}`",range:"`#{value}` is not in range `#{min} ~ #{max}`",positive:"`#{value}` is not a positive number",negative:"`#{value}` is not a negative number"},string:{maxLength:"#{field} cannot be longer than #{maxLength} characters",minLength:"#{field} must be at least #{minLength} characters",length:"#{field} must be exactly #{length} characters",match:"`#{value}` does not match pattern #{pattern}",uppercase:"`#{value}` must be all uppercase",lowercase:"`#{value}` must be all lowercased"},array:{length:"#{field} must be exactly #{length} in length",minLength:"#{field} cannot be less than #{minLength} in length",maxLength:"#{field} cannot be greater than #{maxLength} in length",includes:"#{field} is not includes #{includes}",deepEqual:"#{field} is not deep equal with #{deepEqual}",empty:"#{field} is not an empty array"},object:{deepEqual:"#{field} is not deep equal to expected value",hasKeys:"#{field} does not contain required fields",empty:"#{field} is not an empty object"},boolean:{true:"Expect true but got `#{value}`",false:"Expect false but got `#{value}`"}};module.exports=t;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const t=require("../is.js"),e=require("../util.js"),i=require("../locale/en-US.js");var r=function(r,s){var n=this;this.getValidateMsg=function(i,r){void 0===r&&(r={});var s=Object.assign(Object.assign({},r),{value:n.obj,field:n.field,type:n.type}),o=e.getTemplate(n.validateMessages,i);return t.isFunction(o)?o(s):t.isString(o)?o.replace(/\#\{.+?\}/g,function(e){var i=e.slice(2,-1);if(i in s){if(t.isObject(s[i])||t.isArray(s[i]))try{return JSON.stringify(s[i])}catch(r){return s[i]}return String(s[i])}return e}):o},t.isObject(s)&&t.isString(r)&&s.trim?this.obj=r.trim():t.isObject(s)&&s.ignoreEmptyString&&""===r?this.obj=void 0:this.obj=r,this.message=s.message,this.type=s.type,this.error=null,this.field=s.field||s.type,this.validateMessages=e.mergeTemplate(i,s.validateMessages)},s={not:{configurable:!0},isRequired:{configurable:!0},end:{configurable:!0}};s.not.get=function(){return this._not=!this._not,this},s.isRequired.get=function(){if(t.isEmptyValue(this.obj)||t.isEmptyArray(this.obj)){var e=this.getValidateMsg("required");this.error={value:this.obj,type:this.type,requiredError:!0,message:this.message||(t.isObject(e)?e:(this._not?"[NOT MODE]:":"")+e)}}return this},s.end.get=function(){return this.error},r.prototype.addError=function(e){!this.error&&e&&(this.error={value:this.obj,type:this.type,message:this.message||(t.isObject(e)?e:(this._not?"[NOT MODE]:":"")+e)})},r.prototype.validate=function(t,e){return(this._not?t:!t)&&this.addError(e),this},r.prototype.collect=function(t){t&&t(this.error)},Object.defineProperties(r.prototype,s),module.exports=r;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./is.js");exports.getTemplate=function(e,t){for(var r=t.split("."),n=e,s=0;s<r.length;s++)if(void 0===(n=n&&n[r[s]]))return n;return n},exports.mergeTemplate=function(t,r){var n=Object.assign({},t);return Object.keys(r||{}).forEach(function(t){var s=n[t],i=null==r?void 0:r[t];n[t]=e.isObject(s)?Object.assign(Object.assign({},s),i):i||s}),n};
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "yc-design-vue",
|
3
3
|
"private": false,
|
4
|
-
"version": "1.9.
|
4
|
+
"version": "1.9.1",
|
5
5
|
"type": "module",
|
6
6
|
"description": "A Vue 3 component library.",
|
7
7
|
"keywords": [
|
@@ -38,13 +38,13 @@
|
|
38
38
|
"import": "./es/index.js",
|
39
39
|
"require": "./lib/index.js"
|
40
40
|
},
|
41
|
-
"./es/style.css": "./es/style.css",
|
42
|
-
"./es/shared.css": "./es/shared.css",
|
43
41
|
"./lang/*": {
|
44
42
|
"types": "./es/_shared/lang/*.d.ts",
|
45
43
|
"import": "./es/_shared/lang/*.js",
|
46
44
|
"require": "./lib/_shared/lang/*.js"
|
47
45
|
},
|
46
|
+
"./es/style.css": "./es/style.css",
|
47
|
+
"./es/shared.css": "./es/shared.css",
|
48
48
|
"./es/*": {
|
49
49
|
"types": "./es/*/index.d.ts",
|
50
50
|
"import": "./es/*/index.js"
|
@@ -1,151 +0,0 @@
|
|
1
|
-
export interface ArcoCalendarLang {
|
2
|
-
formatYear: string;
|
3
|
-
formatMonth: string;
|
4
|
-
today: string;
|
5
|
-
view: {
|
6
|
-
month: string;
|
7
|
-
year: string;
|
8
|
-
week: string;
|
9
|
-
day: string;
|
10
|
-
};
|
11
|
-
month: {
|
12
|
-
long: {
|
13
|
-
January: string;
|
14
|
-
February: string;
|
15
|
-
March: string;
|
16
|
-
April: string;
|
17
|
-
May: string;
|
18
|
-
June: string;
|
19
|
-
July: string;
|
20
|
-
August: string;
|
21
|
-
September: string;
|
22
|
-
October: string;
|
23
|
-
November: string;
|
24
|
-
December: string;
|
25
|
-
};
|
26
|
-
short: {
|
27
|
-
January: string;
|
28
|
-
February: string;
|
29
|
-
March: string;
|
30
|
-
April: string;
|
31
|
-
May: string;
|
32
|
-
June: string;
|
33
|
-
July: string;
|
34
|
-
August: string;
|
35
|
-
September: string;
|
36
|
-
October: string;
|
37
|
-
November: string;
|
38
|
-
December: string;
|
39
|
-
};
|
40
|
-
};
|
41
|
-
week: {
|
42
|
-
long: {
|
43
|
-
self: string;
|
44
|
-
monday: string;
|
45
|
-
tuesday: string;
|
46
|
-
wednesday: string;
|
47
|
-
thursday: string;
|
48
|
-
friday: string;
|
49
|
-
saturday: string;
|
50
|
-
sunday: string;
|
51
|
-
};
|
52
|
-
short: {
|
53
|
-
self: string;
|
54
|
-
monday: string;
|
55
|
-
tuesday: string;
|
56
|
-
wednesday: string;
|
57
|
-
thursday: string;
|
58
|
-
friday: string;
|
59
|
-
saturday: string;
|
60
|
-
sunday: string;
|
61
|
-
};
|
62
|
-
};
|
63
|
-
}
|
64
|
-
export interface ValidateMessage {
|
65
|
-
required: string;
|
66
|
-
type: {
|
67
|
-
string: string;
|
68
|
-
number: string;
|
69
|
-
boolean: string;
|
70
|
-
array: string;
|
71
|
-
object: string;
|
72
|
-
url: string;
|
73
|
-
email: string;
|
74
|
-
ip: string;
|
75
|
-
};
|
76
|
-
number: {
|
77
|
-
min: string;
|
78
|
-
max: string;
|
79
|
-
equal: string;
|
80
|
-
range: string;
|
81
|
-
positive: string;
|
82
|
-
negative: string;
|
83
|
-
};
|
84
|
-
array: {
|
85
|
-
length: string;
|
86
|
-
minLength: string;
|
87
|
-
maxLength: string;
|
88
|
-
includes: string;
|
89
|
-
deepEqual: string;
|
90
|
-
empty: string;
|
91
|
-
};
|
92
|
-
string: {
|
93
|
-
minLength: string;
|
94
|
-
maxLength: string;
|
95
|
-
length: string;
|
96
|
-
match: string;
|
97
|
-
uppercase: string;
|
98
|
-
lowercase: string;
|
99
|
-
};
|
100
|
-
object: {
|
101
|
-
deepEqual: string;
|
102
|
-
hasKeys: string;
|
103
|
-
empty: string;
|
104
|
-
};
|
105
|
-
boolean: {
|
106
|
-
true: string;
|
107
|
-
false: string;
|
108
|
-
};
|
109
|
-
}
|
110
|
-
export interface ArcoLang {
|
111
|
-
locale: string;
|
112
|
-
empty: {
|
113
|
-
description: string;
|
114
|
-
};
|
115
|
-
calendar: any;
|
116
|
-
drawer: {
|
117
|
-
okText: string;
|
118
|
-
cancelText: string;
|
119
|
-
};
|
120
|
-
popconfirm: {
|
121
|
-
okText: string;
|
122
|
-
cancelText: string;
|
123
|
-
};
|
124
|
-
modal: {
|
125
|
-
okText: string;
|
126
|
-
cancelText: string;
|
127
|
-
};
|
128
|
-
pagination: {
|
129
|
-
goto: string;
|
130
|
-
page: string;
|
131
|
-
countPerPage: string;
|
132
|
-
total: string;
|
133
|
-
};
|
134
|
-
table: {
|
135
|
-
okText: string;
|
136
|
-
resetText: string;
|
137
|
-
};
|
138
|
-
upload: {
|
139
|
-
start: string;
|
140
|
-
cancel: string;
|
141
|
-
delete: string;
|
142
|
-
retry: string;
|
143
|
-
buttonText: string;
|
144
|
-
preview: string;
|
145
|
-
drag: string;
|
146
|
-
dragHover: string;
|
147
|
-
error: string;
|
148
|
-
};
|
149
|
-
datePicker: {};
|
150
|
-
}
|
151
|
-
export type ArcoI18nMessages = Record<string, ArcoLang>;
|
@@ -1,151 +0,0 @@
|
|
1
|
-
export interface ArcoCalendarLang {
|
2
|
-
formatYear: string;
|
3
|
-
formatMonth: string;
|
4
|
-
today: string;
|
5
|
-
view: {
|
6
|
-
month: string;
|
7
|
-
year: string;
|
8
|
-
week: string;
|
9
|
-
day: string;
|
10
|
-
};
|
11
|
-
month: {
|
12
|
-
long: {
|
13
|
-
January: string;
|
14
|
-
February: string;
|
15
|
-
March: string;
|
16
|
-
April: string;
|
17
|
-
May: string;
|
18
|
-
June: string;
|
19
|
-
July: string;
|
20
|
-
August: string;
|
21
|
-
September: string;
|
22
|
-
October: string;
|
23
|
-
November: string;
|
24
|
-
December: string;
|
25
|
-
};
|
26
|
-
short: {
|
27
|
-
January: string;
|
28
|
-
February: string;
|
29
|
-
March: string;
|
30
|
-
April: string;
|
31
|
-
May: string;
|
32
|
-
June: string;
|
33
|
-
July: string;
|
34
|
-
August: string;
|
35
|
-
September: string;
|
36
|
-
October: string;
|
37
|
-
November: string;
|
38
|
-
December: string;
|
39
|
-
};
|
40
|
-
};
|
41
|
-
week: {
|
42
|
-
long: {
|
43
|
-
self: string;
|
44
|
-
monday: string;
|
45
|
-
tuesday: string;
|
46
|
-
wednesday: string;
|
47
|
-
thursday: string;
|
48
|
-
friday: string;
|
49
|
-
saturday: string;
|
50
|
-
sunday: string;
|
51
|
-
};
|
52
|
-
short: {
|
53
|
-
self: string;
|
54
|
-
monday: string;
|
55
|
-
tuesday: string;
|
56
|
-
wednesday: string;
|
57
|
-
thursday: string;
|
58
|
-
friday: string;
|
59
|
-
saturday: string;
|
60
|
-
sunday: string;
|
61
|
-
};
|
62
|
-
};
|
63
|
-
}
|
64
|
-
export interface ValidateMessage {
|
65
|
-
required: string;
|
66
|
-
type: {
|
67
|
-
string: string;
|
68
|
-
number: string;
|
69
|
-
boolean: string;
|
70
|
-
array: string;
|
71
|
-
object: string;
|
72
|
-
url: string;
|
73
|
-
email: string;
|
74
|
-
ip: string;
|
75
|
-
};
|
76
|
-
number: {
|
77
|
-
min: string;
|
78
|
-
max: string;
|
79
|
-
equal: string;
|
80
|
-
range: string;
|
81
|
-
positive: string;
|
82
|
-
negative: string;
|
83
|
-
};
|
84
|
-
array: {
|
85
|
-
length: string;
|
86
|
-
minLength: string;
|
87
|
-
maxLength: string;
|
88
|
-
includes: string;
|
89
|
-
deepEqual: string;
|
90
|
-
empty: string;
|
91
|
-
};
|
92
|
-
string: {
|
93
|
-
minLength: string;
|
94
|
-
maxLength: string;
|
95
|
-
length: string;
|
96
|
-
match: string;
|
97
|
-
uppercase: string;
|
98
|
-
lowercase: string;
|
99
|
-
};
|
100
|
-
object: {
|
101
|
-
deepEqual: string;
|
102
|
-
hasKeys: string;
|
103
|
-
empty: string;
|
104
|
-
};
|
105
|
-
boolean: {
|
106
|
-
true: string;
|
107
|
-
false: string;
|
108
|
-
};
|
109
|
-
}
|
110
|
-
export interface ArcoLang {
|
111
|
-
locale: string;
|
112
|
-
empty: {
|
113
|
-
description: string;
|
114
|
-
};
|
115
|
-
calendar: any;
|
116
|
-
drawer: {
|
117
|
-
okText: string;
|
118
|
-
cancelText: string;
|
119
|
-
};
|
120
|
-
popconfirm: {
|
121
|
-
okText: string;
|
122
|
-
cancelText: string;
|
123
|
-
};
|
124
|
-
modal: {
|
125
|
-
okText: string;
|
126
|
-
cancelText: string;
|
127
|
-
};
|
128
|
-
pagination: {
|
129
|
-
goto: string;
|
130
|
-
page: string;
|
131
|
-
countPerPage: string;
|
132
|
-
total: string;
|
133
|
-
};
|
134
|
-
table: {
|
135
|
-
okText: string;
|
136
|
-
resetText: string;
|
137
|
-
};
|
138
|
-
upload: {
|
139
|
-
start: string;
|
140
|
-
cancel: string;
|
141
|
-
delete: string;
|
142
|
-
retry: string;
|
143
|
-
buttonText: string;
|
144
|
-
preview: string;
|
145
|
-
drag: string;
|
146
|
-
dragHover: string;
|
147
|
-
error: string;
|
148
|
-
};
|
149
|
-
datePicker: {};
|
150
|
-
}
|
151
|
-
export type ArcoI18nMessages = Record<string, ArcoLang>;
|
File without changes
|
File without changes
|