@cloudbase/cals 0.5.12-alpha.0 → 0.5.12-aplph.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/utils/dts/auto-generated.d.ts +1 -1
- package/lib/utils/dts/auto-generated.d.ts.map +1 -1
- package/lib/utils/dts/auto-generated.js +17 -17
- package/lib/utils/dts/build.js +11 -11
- package/package.json +1 -1
- package/lib/utils/dts/auto-generated copy.d.ts +0 -2
- package/lib/utils/dts/auto-generated copy.d.ts.map +0 -1
- package/lib/utils/dts/auto-generated copy.js +0 -392
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const wedaDTS = "declare class UserWidget {\n // FIXME: \u6682\u65F6\u4E0D\u5BF9\u5916\u66B4\u9732\n // \u5185\u7F6E\u547D\u540D\u7A7A\u95F4\n // get sys(): {\n // readonly id: string;\n // readonly module: string;\n // readonly component: string;\n // readonly parent: UserWidget;\n // readonly children: UserWidget[];\n\n // closest(filter?: (parentWidget: UserWidget) => boolean): UserWidget | null;\n // };\n\n // FIXME: \u6682\u65F6\u4E0D\u5BF9\u5916\u66B4\u9732\n // \u81EA\u5B9A\u4E49\u547D\u540D\u7A7A\u95F4\n // get custom(): { [key: string]: any };\n\n // ========== \u5FEB\u6377\u8BBF\u95EE\u65B9\u5F0F ========== //\n\n /**\n * \u7EC4\u4EF6 id\n */\n readonly id: string;\n /**\n * \u7EC4\u4EF6\u5E93\u540D\u79F0\n */\n readonly module: string;\n /**\n * \u7EC4\u4EF6\u540D\u79F0\n */\n readonly component: string;\n // FIXME: \u6682\u65F6\u4E0D\u5BF9\u5916\u66B4\u9732\n // readonly parent: UserWidget;\n // readonly children: UserWidget[];\n\n // closest(filter?: (parentWidget: UserWidget) => boolean): UserWidget | null;\n}\n\n// Used Components Inner Begin\n// Used Components - Don't touch me\n// Used Components Inner End\n\ndeclare namespace $app {\n namespace dataset {\n\n const state: {\n // Global State Inner Begin\n // Global State \u5168\u5C40\u53D8\u91CF - Don't touch me\n // Global State Inner End\n }\n\n }\n\n namespace utils {\n function ABS(num: number): number;\n function Min(...args: number[]): number;\n function Max(...args: number[]): number;\n function Average(...args: number[]): number;\n function Floor(num: number): number;\n function Ceiling(num: number): number;\n function Round(num: number): number;\n function Sum(...args: number[]): number;\n function Rand(num: number): number;\n\n function If(condition: boolean, val1: any, val2: any): any;\n function IsEmpty(text: string | string[]): boolean;\n function NotNull(val: any): boolean;\n function And(...args: boolean[]): boolean;\n function Or(...args: boolean[]): boolean;\n\n function Len(text: string): number;\n function Contains(text1: string, text2: string): boolean;\n function Split(text1: string, text2: string): string[];\n function Trim(text: string): string;\n function Upper(text: string): string;\n function Lower(text: string): string;\n function Concat(...text: string[]): string;\n\n function Now(): number;\n function Timestamp(arg: number | string | Date): number;\n function Second(arg: number | string | Date): number;\n function Minute(arg: number | string | Date): number;\n function Hour(arg: number | string | Date): number;\n function Day(arg: number | string | Date): number;\n function DayOfWeek(arg: number | string | Date): number;\n function Month(arg: number | string | Date): number;\n function Year(arg: number | string | Date): number;\n function GetDate(year: number, month: number, day: number): number;\n function DateTimeValue(arg: string, val: string): number;\n function Age(arg: number | string | Date, val: number | string | Date): number;\n function AgeOfNow(arg: number | string | Date): number;\n function DateAdd(arg: number | string | Date, day: number): number;\n function MonthAdd(arg: number | string | Date, month: number): number;\n function YearAdd(arg: number | string | Date, year: number): number;\n function DateDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function HourDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function MinuteDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function SecondDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function MonthDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function YearDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function DateText(createdTime: number | string | Date, text: string): string;\n function IsToday(date: number | string | Date): boolean;\n\n }\n\n namespace common {\n // Global Common Inner Begin\n // Global Common \u5168\u5C40\u65B9\u6CD5 - Don't touch me\n // Global Common Inner End\n }\n\n namespace auth {\n \ninterface CurrentUserInfo {\n userId?: string;\n phone?: string;\n type?: number;\n relatedRoles?: {\n id?: string;\n envId?: string;\n name?: string;\n roleIdentity?: string;\n }[];\n openId?: string;\n name?: string;\n nickName?: string;\n email?: string;\n mainOrg?: {\n id?: string;\n name?: string;\n };\n orgs?: {\n id?: string;\n name?: string;\n }[];\n}\n\nconst currentUser: CurrentUserInfo;\n\n\n }\n\n // \u8BBE\u7F6E\u72B6\u6001\n function setState(userSetState: Record<string, any>): void\n\n \n interface navigatorOptions {\n packageName: string;\n pageId: string;\n data?: Record<string, any>;\n params?: Record<string, any>;\n events?: Record<string, (data: any) => void>;\n success(res: any);\n fail(res: any);\n complete(res: any);\n }\n\n interface navigateBackOptions {\n delta: number;\n }\n\n // \u663E\u793A\u63D0\u793A\n function showToast(options);\n\n // \u663E\u793A loading \u63D0\u793A\n function showLoading(options);\n\n // \u9690\u85CF loading \u63D0\u793A\n function hideLoading(options);\n\n // \u663E\u793A\u6A21\u6001\u63D0\u793A\n function showModal(options);\n\n // \u62E8\u6253\u7535\u8BDD\n function callPhone(options);\n\n // sacnCode\n function scanCode(options: {\n onlyFromCamera?: boolean;\n enableDefaultBehavior?: boolean;\n scanType?: ('barCode' | 'qrCode')[];\n success?: (res: { result: string; scanType: string }) => void;\n fail?: (err: Error) => void;\n complete?: () => void;\n }): Promise<ScanCodeResult> | ScanCodeResult;\n\n // \u7279\u5236\u8DEF\u7531\n function navigateTo(options: navigatorOptions);\n\n function redirectTo(options: navigatorOptions);\n\n function reLaunch(options: navigatorOptions);\n\n function relaunchHome();\n\n function navigateBack(options: navigateBackOptions);\n\n \n}\n\ndeclare const app = $app\n\n\ndeclare namespace $w {\n function ABS(num: number): number;\n function Min(...args: number[]): number;\n function Max(...args: number[]): number;\n function Average(...args: number[]): number;\n function Floor(num: number): number;\n function Ceiling(num: number): number;\n function Round(num: number): number;\n function Sum(...args: number[]): number;\n function Rand(num: number): number;\n\n function If(condition: boolean, val1: any, val2: any): any;\n function IsEmpty(text: string | string[]): boolean;\n function NotNull(val: any): boolean;\n function And(...args: boolean[]): boolean;\n function Or(...args: boolean[]): boolean;\n\n function Len(text: string): number;\n function Contains(text1: string, text2: string): boolean;\n function Split(text1: string, text2: string): string[];\n function Trim(text: string): string;\n function Upper(text: string): string;\n function Lower(text: string): string;\n function Concat(...text: string[]): string;\n\n function Now(): number;\n function Timestamp(arg: number | string | Date): number;\n function Second(arg: number | string | Date): number;\n function Minute(arg: number | string | Date): number;\n function Hour(arg: number | string | Date): number;\n function Day(arg: number | string | Date): number;\n function DayOfWeek(arg: number | string | Date): number;\n function Month(arg: number | string | Date): number;\n function Year(arg: number | string | Date): number;\n function GetDate(year: number, month: number, day: number): number;\n function DateTimeValue(arg: string, val: string): number;\n function Age(arg: number | string | Date, val: number | string | Date): number;\n function AgeOfNow(arg: number | string | Date): number;\n function DateAdd(arg: number | string | Date, day: number): number;\n function MonthAdd(arg: number | string | Date, month: number): number;\n function YearAdd(arg: number | string | Date, year: number): number;\n function DateDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function HourDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function MinuteDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function SecondDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function MonthDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function YearDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function DateText(createdTime: number | string | Date, text: string): string;\n function IsToday(date: number | string | Date): boolean;\n\n\n // used widgets Inner Begin\n // used widgets - Don't touch me\n // used widgets Inner End\n\n // repeater scope Inner Begin\n // repeater scope - Don't touch me\n // repeater scope Inner End\n\n // $w.app\n namespace app {\n namespace dataset {\n const state: {\n // wGlobal State Inner Begin\n // Global State \u5168\u5C40\u53D8\u91CF - Don't touch me\n // wGlobal State Inner End\n };\n }\n\n namespace common {\n // wGlobal Common Inner Begin\n // Global Common \u5168\u5C40\u65B9\u6CD5 - Don't touch me\n // wGlobal Common Inner End\n }\n\n function setState(data: Object): void;\n}\n\n\n // $w.page\n namespace page {\n const id: string;\n\n namespace dataset {\n const state: {\n // wPage State Inner Begin\n // Page State \u9875\u9762\u53D8\u91CF - Don't touch me\n // wPage State Inner End\n }\n const params: {\n // wPage Param Inner Begin\n // Page Param \u9875\u9762\u53C2\u6570 - Don't touch me\n // wPage Param Inner End\n }\n }\n namespace handler {\n // wPage Handler Inner Begin\n // Page Handler \u9875\u9762\u65B9\u6CD5 - Don't touch me\n // wPage Handler Inner End\n }\n function setState(userSetState: Record<string, any>): void;\n}\n\n\n // $w.auth\n // ============ auth.currentUser Inner Begin ============\ninterface CurrentUserInfo {\n userId?: string;\n phone?: string;\n type?: number;\n relatedRoles?: {\n id?: string;\n envId?: string;\n name?: string;\n roleIdentity?: string;\n }[];\n openId?: string;\n name?: string;\n nickName?: string;\n email?: string;\n mainOrg?: {\n id?: string;\n name?: string;\n };\n orgs?: {\n id?: string;\n name?: string;\n }[];\n}\n\nconst currentUser: CurrentUserInfo;\n\n// ============ auth.currentUser Inner End ============\n\n namespace auth {\n function getUserInfo(): CurrentUserInfo;\n const currentUser: CurrentUserInfo;\n}\n\n\n // $w.cloud\n interface ICallDataSourceParams {\n dataSourceName: string;\n methodName: string;\n params: Object;\n}\ninterface ICallFunctionParams {\n name: string;\n data?: any;\n}\ninterface IParseOptions {\n unwrapResult?: boolean;\n parseBusinessInfo?: boolean;\n}\ninterface ICallWorkflowParams {\n action: string;\n data?: Record<string, any>;\n capitalizeDataKey?: boolean;\n}\n namespace cloud {\n function callDataSource(params: ICallDataSourceParams): any;\n function getTempFileURL(params: string | string[]): Promise<string | string[]>;\n function callWorkflow(action: ICallWorkflowParams): Promise<any>;\n function callFunction(params: ICallFunctionParams, parseOptions?: IParseOptions): Promise<any>;\n function getCloudInstance(): Promise<CloudInstance>;\n}\n\n\n // $w.utils\n namespace utils {\n // ============ app API Inner Begin ============\n interface navigatorOptions {\n packageName: string;\n pageId: string;\n data?: Record<string, any>;\n params?: Record<string, any>;\n events?: Record<string, (data: any) => void>;\n success(res: any);\n fail(res: any);\n complete(res: any);\n }\n\n interface navigateBackOptions {\n delta: number;\n }\n\n // \u663E\u793A\u63D0\u793A\n function showToast(options);\n\n // \u663E\u793A loading \u63D0\u793A\n function showLoading(options);\n\n // \u9690\u85CF loading \u63D0\u793A\n function hideLoading(options);\n\n // \u663E\u793A\u6A21\u6001\u63D0\u793A\n function showModal(options);\n\n // \u62E8\u6253\u7535\u8BDD\n function callPhone(options);\n\n // sacnCode\n function scanCode(options: {\n onlyFromCamera?: boolean;\n enableDefaultBehavior?: boolean;\n scanType?: ('barCode' | 'qrCode')[];\n success?: (res: { result: string; scanType: string }) => void;\n fail?: (err: Error) => void;\n complete?: () => void;\n }): Promise<ScanCodeResult> | ScanCodeResult;\n\n // \u7279\u5236\u8DEF\u7531\n function navigateTo(options: navigatorOptions);\n\n function redirectTo(options: navigatorOptions);\n\n function reLaunch(options: navigatorOptions);\n\n function relaunchHome();\n\n function navigateBack(options: navigateBackOptions);\n\n // ============ app API Inner Begin ============\n}\n\n\n}\n\n// Global For Begin\ndeclare const $for: {\n // Global For Inner Begin\n // For \u5FAA\u73AF\u53D8\u91CF - Don't touch me\n // Global For Inner End\n}\ndeclare const forItems = $for\n// Global For End\n\n// $page Begin\ndeclare namespace $page {\n namespace dataset {\n\n const state: {\n // Page State Inner Begin\n // Page State \u9875\u9762\u53D8\u91CF - Don't touch me\n // Page State Inner End\n }\n\n const params: {\n // Page Param Inner Begin\n // Page Param \u9875\u9762\u53C2\u6570 - Don't touch me\n // Page Param Inner End\n }\n\n }\n\n namespace handler {\n // Page Handler Inner Begin\n // Page Handler \u9875\u9762\u65B9\u6CD5 - Don't touch me\n // Page Handler Inner End\n }\n\n // \u8BBE\u7F6E\u72B6\u6001\n function setState(userSetState: Record<string, any>): void;\n}\n// $page End\n\n// $comp Begin\ndeclare namespace $comp {\n\n namespace props {\n\n const data: {\n // Comp Prop Data Inner Begin\n // Comp Prop Data \u7EC4\u4EF6\u5C5E\u6027 - Don't touch me\n // Comp Prop Data Inner End\n }\n\n namespace events {\n // Comp Prop Events Inner Begin\n // Comp Prop Events \u7EC4\u4EF6\u4E8B\u4EF6 - Don't touch me\n // Comp Prop Events Inner End\n }\n\n }\n\n namespace dataset {\n\n const state: {\n // Comp State Inner Begin\n // Comp State \u7EC4\u4EF6\u53D8\u91CF - Don't touch me\n // Comp State Inner End\n }\n\n }\n\n namespace handler {\n // Comp Handler Inner Begin\n // Comp Handler \u7EC4\u4EF6\u65B9\u6CD5 - Don't touch me\n // Comp Handler Inner End\n }\n\n}\n// $comp End\n\n// Global Formula Begin\n\ndeclare function ABS(num: number): number;\ndeclare function Min(...args: number[]): number;\ndeclare function Max(...args: number[]): number;\ndeclare function Average(...args: number[]): number;\ndeclare function Floor(num: number): number;\ndeclare function Ceiling(num: number): number;\ndeclare function Round(num: number): number;\ndeclare function Sum(...args: number[]): number;\ndeclare function Rand(num: number): number;\n\ndeclare function If(condition: boolean, val1: any, val2: any): any;\ndeclare function IsEmpty(text: string | string[]): boolean;\ndeclare function NotNull(val: any): boolean;\ndeclare function And(...args: boolean[]): boolean;\ndeclare function Or(...args: boolean[]): boolean;\n\ndeclare function Len(text: string): number;\ndeclare function Contains(text1: string, text2: string): boolean;\ndeclare function Split(text1: string, text2: string): string[];\ndeclare function Trim(text: string): string;\ndeclare function Upper(text: string): string;\ndeclare function Lower(text: string): string;\ndeclare function Concat(...text: string[]): string;\n\ndeclare function Now(): number;\ndeclare function Timestamp(arg: number | string | Date): number;\ndeclare function Second(arg: number | string | Date): number;\ndeclare function Minute(arg: number | string | Date): number;\ndeclare function Hour(arg: number | string | Date): number;\ndeclare function Day(arg: number | string | Date): number;\ndeclare function DayOfWeek(arg: number | string | Date): number;\ndeclare function Month(arg: number | string | Date): number;\ndeclare function Year(arg: number | string | Date): number;\ndeclare function GetDate(year: number, month: number, day: number): number;\ndeclare function DateTimeValue(arg: string, val: string): number;\ndeclare function Age(arg: number | string | Date, val: number | string | Date): number;\ndeclare function AgeOfNow(arg: number | string | Date): number;\ndeclare function DateAdd(arg: number | string | Date, day: number): number;\ndeclare function MonthAdd(arg: number | string | Date, month: number): number;\ndeclare function YearAdd(arg: number | string | Date, year: number): number;\ndeclare function DateDiff(startDay: number | string | Date, endDay: number | string | Date): number;\ndeclare function HourDiff(startDay: number | string | Date, endDay: number | string | Date): number;\ndeclare function MinuteDiff(startDay: number | string | Date, endDay: number | string | Date): number;\ndeclare function SecondDiff(startDay: number | string | Date, endDay: number | string | Date): number;\ndeclare function MonthDiff(startDay: number | string | Date, endDay: number | string | Date): number;\ndeclare function YearDiff(startDay: number | string | Date, endDay: number | string | Date): number;\ndeclare function DateText(createdTime: number | string | Date, text: string): string;\ndeclare function IsToday(date: number | string | Date): boolean;\n\n\n// Global Formula End\n";
|
|
1
|
+
export declare const wedaDTS = "declare class UserWidget {\n // FIXME: \u6682\u65F6\u4E0D\u5BF9\u5916\u66B4\u9732\n // \u5185\u7F6E\u547D\u540D\u7A7A\u95F4\n // get sys(): {\n // readonly id: string;\n // readonly module: string;\n // readonly component: string;\n // readonly parent: UserWidget;\n // readonly children: UserWidget[];\n\n // closest(filter?: (parentWidget: UserWidget) => boolean): UserWidget | null;\n // };\n\n // FIXME: \u6682\u65F6\u4E0D\u5BF9\u5916\u66B4\u9732\n // \u81EA\u5B9A\u4E49\u547D\u540D\u7A7A\u95F4\n // get custom(): { [key: string]: any };\n\n // ========== \u5FEB\u6377\u8BBF\u95EE\u65B9\u5F0F ========== //\n\n /**\n * \u7EC4\u4EF6 id\n */\n readonly id: string;\n /**\n * \u7EC4\u4EF6\u5E93\u540D\u79F0\n */\n readonly module: string;\n /**\n * \u7EC4\u4EF6\u540D\u79F0\n */\n readonly component: string;\n // FIXME: \u6682\u65F6\u4E0D\u5BF9\u5916\u66B4\u9732\n // readonly parent: UserWidget;\n // readonly children: UserWidget[];\n\n // closest(filter?: (parentWidget: UserWidget) => boolean): UserWidget | null;\n}\n\n// Used Components Inner Begin\n// Used Components - Don't touch me\n// Used Components Inner End\n\ndeclare namespace $app {\n namespace dataset {\n\n const state: {\n // Global State Inner Begin\n // Global State \u5168\u5C40\u53D8\u91CF - Don't touch me\n // Global State Inner End\n }\n\n }\n\n namespace utils {\n function ABS(num: number): number;\n function Min(...args: number[]): number;\n function Max(...args: number[]): number;\n function Average(...args: number[]): number;\n function Floor(num: number): number;\n function Ceiling(num: number): number;\n function Round(num: number): number;\n function Sum(...args: number[]): number;\n function Rand(num: number): number;\n\n function If(condition: boolean, val1: any, val2: any): any;\n function IsEmpty(text: string | string[]): boolean;\n function NotNull(val: any): boolean;\n function And(...args: boolean[]): boolean;\n function Or(...args: boolean[]): boolean;\n\n function Len(text: string): number;\n function Contains(text1: string, text2: string): boolean;\n function Split(text1: string, text2: string): string[];\n function Trim(text: string): string;\n function Upper(text: string): string;\n function Lower(text: string): string;\n function Concat(...text: string[]): string;\n\n function Now(): number;\n function Timestamp(arg: number | string | Date): number;\n function Second(arg: number | string | Date): number;\n function Minute(arg: number | string | Date): number;\n function Hour(arg: number | string | Date): number;\n function Day(arg: number | string | Date): number;\n function DayOfWeek(arg: number | string | Date): number;\n function Month(arg: number | string | Date): number;\n function Year(arg: number | string | Date): number;\n function GetDate(year: number, month: number, day: number): number;\n function DateTimeValue(arg: string, val: string): number;\n function Age(arg: number | string | Date, val: number | string | Date): number;\n function AgeOfNow(arg: number | string | Date): number;\n function DateAdd(arg: number | string | Date, day: number): number;\n function MonthAdd(arg: number | string | Date, month: number): number;\n function YearAdd(arg: number | string | Date, year: number): number;\n function DateDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function HourDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function MinuteDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function SecondDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function MonthDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function YearDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function DateText(createdTime: number | string | Date, text: string): string;\n function IsToday(date: number | string | Date): boolean;\n\n }\n\n namespace common {\n // Global Common Inner Begin\n // Global Common \u5168\u5C40\u65B9\u6CD5 - Don't touch me\n // Global Common Inner End\n }\n\n // $w.auth\n interface CurrentUserInfo {\n userId?: string;\n phone?: string;\n type?: number;\n relatedRoles?: {\n id?: string;\n envId?: string;\n name?: string;\n roleIdentity?: string;\n }[];\n openId?: string;\n name?: string;\n nickName?: string;\n email?: string;\n mainOrg?: {\n id?: string;\n name?: string;\n };\n orgs?: {\n id?: string;\n name?: string;\n }[];\n}\n namespace auth {\n function getUserInfo(): CurrentUserInfo;\n const currentUser: CurrentUserInfo;\n}\n\n\n // \u8BBE\u7F6E\u72B6\u6001\n \n function setState(userSetState: Record<string, any>): void;\n \n\n \n interface navigatorOptions {\n packageName: string;\n pageId: string;\n data?: Record<string, any>;\n params?: Record<string, any>;\n events?: Record<string, (data: any) => void>;\n success(res: any);\n fail(res: any);\n complete(res: any);\n }\n\n interface navigateBackOptions {\n delta: number;\n }\n\n // \u663E\u793A\u63D0\u793A\n function showToast(options);\n\n // \u663E\u793A loading \u63D0\u793A\n function showLoading(options);\n\n // \u9690\u85CF loading \u63D0\u793A\n function hideLoading(options);\n\n // \u663E\u793A\u6A21\u6001\u63D0\u793A\n function showModal(options);\n\n // \u62E8\u6253\u7535\u8BDD\n function callPhone(options);\n\n // sacnCode\n function scanCode(options: {\n onlyFromCamera?: boolean;\n enableDefaultBehavior?: boolean;\n scanType?: ('barCode' | 'qrCode')[];\n success?: (res: { result: string; scanType: string }) => void;\n fail?: (err: Error) => void;\n complete?: () => void;\n }): Promise<ScanCodeResult> | ScanCodeResult;\n\n // \u7279\u5236\u8DEF\u7531\n function navigateTo(options: navigatorOptions);\n\n function redirectTo(options: navigatorOptions);\n\n function reLaunch(options: navigatorOptions);\n\n function relaunchHome();\n\n function navigateBack(options: navigateBackOptions);\n\n \n}\n\ndeclare const app = $app\n\n\ndeclare namespace $w {\n function ABS(num: number): number;\n function Min(...args: number[]): number;\n function Max(...args: number[]): number;\n function Average(...args: number[]): number;\n function Floor(num: number): number;\n function Ceiling(num: number): number;\n function Round(num: number): number;\n function Sum(...args: number[]): number;\n function Rand(num: number): number;\n\n function If(condition: boolean, val1: any, val2: any): any;\n function IsEmpty(text: string | string[]): boolean;\n function NotNull(val: any): boolean;\n function And(...args: boolean[]): boolean;\n function Or(...args: boolean[]): boolean;\n\n function Len(text: string): number;\n function Contains(text1: string, text2: string): boolean;\n function Split(text1: string, text2: string): string[];\n function Trim(text: string): string;\n function Upper(text: string): string;\n function Lower(text: string): string;\n function Concat(...text: string[]): string;\n\n function Now(): number;\n function Timestamp(arg: number | string | Date): number;\n function Second(arg: number | string | Date): number;\n function Minute(arg: number | string | Date): number;\n function Hour(arg: number | string | Date): number;\n function Day(arg: number | string | Date): number;\n function DayOfWeek(arg: number | string | Date): number;\n function Month(arg: number | string | Date): number;\n function Year(arg: number | string | Date): number;\n function GetDate(year: number, month: number, day: number): number;\n function DateTimeValue(arg: string, val: string): number;\n function Age(arg: number | string | Date, val: number | string | Date): number;\n function AgeOfNow(arg: number | string | Date): number;\n function DateAdd(arg: number | string | Date, day: number): number;\n function MonthAdd(arg: number | string | Date, month: number): number;\n function YearAdd(arg: number | string | Date, year: number): number;\n function DateDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function HourDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function MinuteDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function SecondDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function MonthDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function YearDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function DateText(createdTime: number | string | Date, text: string): string;\n function IsToday(date: number | string | Date): boolean;\n\n\n // used widgets Inner Begin\n // used widgets - Don't touch me\n // used widgets Inner End\n\n // repeater scope Inner Begin\n // repeater scope - Don't touch me\n // repeater scope Inner End\n\n // $w.app\n namespace app {\n namespace dataset {\n const state: {\n // wGlobal State Inner Begin\n // Global State \u5168\u5C40\u53D8\u91CF - Don't touch me\n // wGlobal State Inner End\n };\n }\n\n namespace common {\n // wGlobal Common Inner Begin\n // Global Common \u5168\u5C40\u65B9\u6CD5 - Don't touch me\n // wGlobal Common Inner End\n }\n\n function setState(data: Object): void;\n}\n\n\n // $w.page\n namespace page {\n const id: string;\n\n namespace dataset {\n const state: {\n // wPage State Inner Begin\n // Page State \u9875\u9762\u53D8\u91CF - Don't touch me\n // wPage State Inner End\n }\n const params: {\n // wPage Param Inner Begin\n // Page Param \u9875\u9762\u53C2\u6570 - Don't touch me\n // wPage Param Inner End\n }\n }\n namespace handler {\n // wPage Handler Inner Begin\n // Page Handler \u9875\u9762\u65B9\u6CD5 - Don't touch me\n // wPage Handler Inner End\n }\n\n // ============ setState API Inner Begin ============\n function setState(userSetState: Record<string, any>): void;\n // ============ setState API Inner Begin ============\n}\n\n\n // $w.auth\n interface CurrentUserInfo {\n userId?: string;\n phone?: string;\n type?: number;\n relatedRoles?: {\n id?: string;\n envId?: string;\n name?: string;\n roleIdentity?: string;\n }[];\n openId?: string;\n name?: string;\n nickName?: string;\n email?: string;\n mainOrg?: {\n id?: string;\n name?: string;\n };\n orgs?: {\n id?: string;\n name?: string;\n }[];\n}\n namespace auth {\n function getUserInfo(): CurrentUserInfo;\n const currentUser: CurrentUserInfo;\n}\n\n\n // $w.cloud\n interface ICallDataSourceParams {\n dataSourceName: string;\n methodName: string;\n params: Object;\n}\ninterface ICallFunctionParams {\n name: string;\n data?: any;\n}\ninterface IParseOptions {\n unwrapResult?: boolean;\n parseBusinessInfo?: boolean;\n}\ninterface ICallWorkflowParams {\n action: string;\n data?: Record<string, any>;\n capitalizeDataKey?: boolean;\n}\n namespace cloud {\n function callDataSource(params: ICallDataSourceParams): any;\n function getTempFileURL(params: string | string[]): Promise<string | string[]>;\n function callWorkflow(action: ICallWorkflowParams): Promise<any>;\n function callFunction(params: ICallFunctionParams, parseOptions?: IParseOptions): Promise<any>;\n function getCloudInstance(): Promise<CloudInstance>;\n}\n\n\n // $w.utils\n namespace utils {\n // ============ utils API Inner Begin ============\n interface navigatorOptions {\n packageName: string;\n pageId: string;\n data?: Record<string, any>;\n params?: Record<string, any>;\n events?: Record<string, (data: any) => void>;\n success(res: any);\n fail(res: any);\n complete(res: any);\n }\n\n interface navigateBackOptions {\n delta: number;\n }\n\n // \u663E\u793A\u63D0\u793A\n function showToast(options);\n\n // \u663E\u793A loading \u63D0\u793A\n function showLoading(options);\n\n // \u9690\u85CF loading \u63D0\u793A\n function hideLoading(options);\n\n // \u663E\u793A\u6A21\u6001\u63D0\u793A\n function showModal(options);\n\n // \u62E8\u6253\u7535\u8BDD\n function callPhone(options);\n\n // sacnCode\n function scanCode(options: {\n onlyFromCamera?: boolean;\n enableDefaultBehavior?: boolean;\n scanType?: ('barCode' | 'qrCode')[];\n success?: (res: { result: string; scanType: string }) => void;\n fail?: (err: Error) => void;\n complete?: () => void;\n }): Promise<ScanCodeResult> | ScanCodeResult;\n\n // \u7279\u5236\u8DEF\u7531\n function navigateTo(options: navigatorOptions);\n\n function redirectTo(options: navigatorOptions);\n\n function reLaunch(options: navigatorOptions);\n\n function relaunchHome();\n\n function navigateBack(options: navigateBackOptions);\n\n // ============ utils API Inner Begin ============\n}\n\n\n}\n\n// Global For Begin\ndeclare const $for: {\n // Global For Inner Begin\n // For \u5FAA\u73AF\u53D8\u91CF - Don't touch me\n // Global For Inner End\n}\ndeclare const forItems = $for\n// Global For End\n\n// $page Begin\ndeclare namespace $page {\n namespace dataset {\n\n const state: {\n // Page State Inner Begin\n // Page State \u9875\u9762\u53D8\u91CF - Don't touch me\n // Page State Inner End\n }\n\n const params: {\n // Page Param Inner Begin\n // Page Param \u9875\u9762\u53C2\u6570 - Don't touch me\n // Page Param Inner End\n }\n\n }\n\n namespace handler {\n // Page Handler Inner Begin\n // Page Handler \u9875\u9762\u65B9\u6CD5 - Don't touch me\n // Page Handler Inner End\n }\n\n // \u8BBE\u7F6E\u72B6\u6001\n \n function setState(userSetState: Record<string, any>): void;\n \n}\n// $page End\n\n// $comp Begin\ndeclare namespace $comp {\n\n namespace props {\n\n const data: {\n // Comp Prop Data Inner Begin\n // Comp Prop Data \u7EC4\u4EF6\u5C5E\u6027 - Don't touch me\n // Comp Prop Data Inner End\n }\n\n namespace events {\n // Comp Prop Events Inner Begin\n // Comp Prop Events \u7EC4\u4EF6\u4E8B\u4EF6 - Don't touch me\n // Comp Prop Events Inner End\n }\n\n }\n\n namespace dataset {\n\n const state: {\n // Comp State Inner Begin\n // Comp State \u7EC4\u4EF6\u53D8\u91CF - Don't touch me\n // Comp State Inner End\n }\n\n }\n\n namespace handler {\n // Comp Handler Inner Begin\n // Comp Handler \u7EC4\u4EF6\u65B9\u6CD5 - Don't touch me\n // Comp Handler Inner End\n }\n\n}\n// $comp End\n\n// Global Formula Begin\n\ndeclare function ABS(num: number): number;\ndeclare function Min(...args: number[]): number;\ndeclare function Max(...args: number[]): number;\ndeclare function Average(...args: number[]): number;\ndeclare function Floor(num: number): number;\ndeclare function Ceiling(num: number): number;\ndeclare function Round(num: number): number;\ndeclare function Sum(...args: number[]): number;\ndeclare function Rand(num: number): number;\n\ndeclare function If(condition: boolean, val1: any, val2: any): any;\ndeclare function IsEmpty(text: string | string[]): boolean;\ndeclare function NotNull(val: any): boolean;\ndeclare function And(...args: boolean[]): boolean;\ndeclare function Or(...args: boolean[]): boolean;\n\ndeclare function Len(text: string): number;\ndeclare function Contains(text1: string, text2: string): boolean;\ndeclare function Split(text1: string, text2: string): string[];\ndeclare function Trim(text: string): string;\ndeclare function Upper(text: string): string;\ndeclare function Lower(text: string): string;\ndeclare function Concat(...text: string[]): string;\n\ndeclare function Now(): number;\ndeclare function Timestamp(arg: number | string | Date): number;\ndeclare function Second(arg: number | string | Date): number;\ndeclare function Minute(arg: number | string | Date): number;\ndeclare function Hour(arg: number | string | Date): number;\ndeclare function Day(arg: number | string | Date): number;\ndeclare function DayOfWeek(arg: number | string | Date): number;\ndeclare function Month(arg: number | string | Date): number;\ndeclare function Year(arg: number | string | Date): number;\ndeclare function GetDate(year: number, month: number, day: number): number;\ndeclare function DateTimeValue(arg: string, val: string): number;\ndeclare function Age(arg: number | string | Date, val: number | string | Date): number;\ndeclare function AgeOfNow(arg: number | string | Date): number;\ndeclare function DateAdd(arg: number | string | Date, day: number): number;\ndeclare function MonthAdd(arg: number | string | Date, month: number): number;\ndeclare function YearAdd(arg: number | string | Date, year: number): number;\ndeclare function DateDiff(startDay: number | string | Date, endDay: number | string | Date): number;\ndeclare function HourDiff(startDay: number | string | Date, endDay: number | string | Date): number;\ndeclare function MinuteDiff(startDay: number | string | Date, endDay: number | string | Date): number;\ndeclare function SecondDiff(startDay: number | string | Date, endDay: number | string | Date): number;\ndeclare function MonthDiff(startDay: number | string | Date, endDay: number | string | Date): number;\ndeclare function YearDiff(startDay: number | string | Date, endDay: number | string | Date): number;\ndeclare function DateText(createdTime: number | string | Date, text: string): string;\ndeclare function IsToday(date: number | string | Date): boolean;\n\n\n// Global Formula End\n";
|
|
2
2
|
//# sourceMappingURL=auto-generated.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-generated.d.ts","sourceRoot":"","sources":["../../../src/utils/dts/auto-generated.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"auto-generated.d.ts","sourceRoot":"","sources":["../../../src/utils/dts/auto-generated.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,muiBAgjBnB,CAAA"}
|
|
@@ -112,9 +112,8 @@ declare namespace $app {
|
|
|
112
112
|
// Global Common Inner End
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
interface CurrentUserInfo {
|
|
115
|
+
// $w.auth
|
|
116
|
+
interface CurrentUserInfo {
|
|
118
117
|
userId?: string;
|
|
119
118
|
phone?: string;
|
|
120
119
|
type?: number;
|
|
@@ -137,14 +136,16 @@ interface CurrentUserInfo {
|
|
|
137
136
|
name?: string;
|
|
138
137
|
}[];
|
|
139
138
|
}
|
|
139
|
+
namespace auth {
|
|
140
|
+
function getUserInfo(): CurrentUserInfo;
|
|
141
|
+
const currentUser: CurrentUserInfo;
|
|
142
|
+
}
|
|
140
143
|
|
|
141
|
-
const currentUser: CurrentUserInfo;
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
145
144
|
|
|
146
145
|
// 设置状态
|
|
147
|
-
|
|
146
|
+
|
|
147
|
+
function setState(userSetState: Record<string, any>): void;
|
|
148
|
+
|
|
148
149
|
|
|
149
150
|
|
|
150
151
|
interface navigatorOptions {
|
|
@@ -304,13 +305,15 @@ declare namespace $w {
|
|
|
304
305
|
// Page Handler 页面方法 - Don't touch me
|
|
305
306
|
// wPage Handler Inner End
|
|
306
307
|
}
|
|
308
|
+
|
|
309
|
+
// ============ setState API Inner Begin ============
|
|
307
310
|
function setState(userSetState: Record<string, any>): void;
|
|
311
|
+
// ============ setState API Inner Begin ============
|
|
308
312
|
}
|
|
309
313
|
|
|
310
314
|
|
|
311
315
|
// $w.auth
|
|
312
|
-
|
|
313
|
-
interface CurrentUserInfo {
|
|
316
|
+
interface CurrentUserInfo {
|
|
314
317
|
userId?: string;
|
|
315
318
|
phone?: string;
|
|
316
319
|
type?: number;
|
|
@@ -333,11 +336,6 @@ interface CurrentUserInfo {
|
|
|
333
336
|
name?: string;
|
|
334
337
|
}[];
|
|
335
338
|
}
|
|
336
|
-
|
|
337
|
-
const currentUser: CurrentUserInfo;
|
|
338
|
-
|
|
339
|
-
// ============ auth.currentUser Inner End ============
|
|
340
|
-
|
|
341
339
|
namespace auth {
|
|
342
340
|
function getUserInfo(): CurrentUserInfo;
|
|
343
341
|
const currentUser: CurrentUserInfo;
|
|
@@ -374,7 +372,7 @@ interface ICallWorkflowParams {
|
|
|
374
372
|
|
|
375
373
|
// $w.utils
|
|
376
374
|
namespace utils {
|
|
377
|
-
// ============
|
|
375
|
+
// ============ utils API Inner Begin ============
|
|
378
376
|
interface navigatorOptions {
|
|
379
377
|
packageName: string;
|
|
380
378
|
pageId: string;
|
|
@@ -426,7 +424,7 @@ interface ICallWorkflowParams {
|
|
|
426
424
|
|
|
427
425
|
function navigateBack(options: navigateBackOptions);
|
|
428
426
|
|
|
429
|
-
// ============
|
|
427
|
+
// ============ utils API Inner Begin ============
|
|
430
428
|
}
|
|
431
429
|
|
|
432
430
|
|
|
@@ -466,7 +464,9 @@ declare namespace $page {
|
|
|
466
464
|
}
|
|
467
465
|
|
|
468
466
|
// 设置状态
|
|
467
|
+
|
|
469
468
|
function setState(userSetState: Record<string, any>): void;
|
|
469
|
+
|
|
470
470
|
}
|
|
471
471
|
// $page End
|
|
472
472
|
|
package/lib/utils/dts/build.js
CHANGED
|
@@ -88,27 +88,27 @@ function genWeDaAPPDTS() {
|
|
|
88
88
|
function groupDTSs({ wedaFrameworkDTS = '', wedaAppDTS = '', wedaPageDTS = '', wedaAuthDTS = '', wedaCloudDTS = '', wedaUtilsDTS = '', formulaDTS = '', }) {
|
|
89
89
|
let resultDts = wedaFrameworkDTS;
|
|
90
90
|
// $w.app
|
|
91
|
-
resultDts = resultDts.
|
|
91
|
+
resultDts = resultDts.replaceAll("// $w.app - Don't touch me", wedaAppDTS.replace(/declare/g, ''));
|
|
92
92
|
// $w.page
|
|
93
|
-
resultDts = resultDts.
|
|
93
|
+
resultDts = resultDts.replaceAll("// $w.page - Don't touch me", wedaPageDTS.replace(/declare/g, ''));
|
|
94
94
|
// $w.auth
|
|
95
|
-
resultDts = resultDts.
|
|
95
|
+
resultDts = resultDts.replaceAll("// $w.auth - Don't touch me", wedaAuthDTS.replace(/declare/g, ''));
|
|
96
96
|
// $w.cloud
|
|
97
|
-
resultDts = resultDts.
|
|
97
|
+
resultDts = resultDts.replaceAll("// $w.cloud - Don't touch me", wedaCloudDTS.replace(/declare/g, ''));
|
|
98
98
|
// $w.utils
|
|
99
|
-
resultDts = resultDts.
|
|
99
|
+
resultDts = resultDts.replaceAll("// $w.utils - Don't touch me", wedaUtilsDTS.replace(/declare/g, ''));
|
|
100
100
|
// 函数公式:$app.utils.xxx
|
|
101
|
-
resultDts = resultDts.
|
|
101
|
+
resultDts = resultDts.replaceAll("// Formula 函数公式 - Don't touch me", formulaDTS.replace(/export/g, ''));
|
|
102
102
|
// 函数公式:全局变量提示
|
|
103
103
|
resultDts = resultDts.replace("// Global Formula 全局函数公式- Don't touch me", formulaDTS.replace(/export/g, 'declare'));
|
|
104
104
|
// 函数公式:$w.xxx
|
|
105
105
|
resultDts = resultDts.replace("// $w global APIs - Don't touch me", formulaDTS.replace(/export/g, ''));
|
|
106
|
-
// 增加 auth.currentUser
|
|
107
|
-
const currentUserDTS = wedaAuthDTS.replace(/[\s\S]*\/\/ ============ auth.currentUser Inner Begin ============([\s\S]*?)\/\/ ============ auth.currentUser Inner End ============[\s\S]*/, '$1');
|
|
108
|
-
resultDts = resultDts.replace("// auth.currentUser - Don't touch me", currentUserDTS);
|
|
109
106
|
// 添加$app.setState、$app.navigateTo等
|
|
110
|
-
const
|
|
111
|
-
resultDts = resultDts.replace("//
|
|
107
|
+
const utilsAPI = wedaUtilsDTS.replace(/[\s\S]*\/\/ ============ utils API Inner Begin ============([\s\S]*?)\/\/ ============ utils API Inner Begin ============[\s\S]*/, '$1');
|
|
108
|
+
resultDts = resultDts.replace("// utils API - Don't touch me", utilsAPI);
|
|
109
|
+
// 添加setState API
|
|
110
|
+
const setStateAPI = wedaPageDTS.replace(/[\s\S]*\/\/ ============ setState API Inner Begin ============([\s\S]*?)\/\/ ============ setState API Inner Begin ============[\s\S]*/, '$1');
|
|
111
|
+
resultDts = resultDts.replaceAll("// setState API - Don't touch me", setStateAPI);
|
|
112
112
|
return resultDts;
|
|
113
113
|
}
|
|
114
114
|
function main() {
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const wedaDTS = "\ndeclare class UserWidget {\n // FIXME: \u6682\u65F6\u4E0D\u5BF9\u5916\u66B4\u9732\n // \u5185\u7F6E\u547D\u540D\u7A7A\u95F4\n // get sys(): {\n // readonly id: string;\n // readonly module: string;\n // readonly component: string;\n // readonly parent: UserWidget;\n // readonly children: UserWidget[];\n\n // closest(filter?: (parentWidget: UserWidget) => boolean): UserWidget | null;\n // };\n\n // FIXME: \u6682\u65F6\u4E0D\u5BF9\u5916\u66B4\u9732\n // \u81EA\u5B9A\u4E49\u547D\u540D\u7A7A\u95F4\n // get custom(): { [key: string]: any };\n\n // ========== \u5FEB\u6377\u8BBF\u95EE\u65B9\u5F0F ========== //\n\n /**\n * \u7EC4\u4EF6 id\n */\n readonly id: string;\n /**\n * \u7EC4\u4EF6\u5E93\u540D\u79F0\n */\n readonly module: string;\n /**\n * \u7EC4\u4EF6\u540D\u79F0\n */\n readonly component: string;\n // FIXME: \u6682\u65F6\u4E0D\u5BF9\u5916\u66B4\u9732\n // readonly parent: UserWidget;\n // readonly children: UserWidget[];\n\n // closest(filter?: (parentWidget: UserWidget) => boolean): UserWidget | null;\n}\n\n// Used Components Inner Begin\n// Used Components - Don't touch me\n// Used Components Inner End\n\ndeclare namespace $app {\n namespace dataset {\n\n const state: {\n // Global State Inner Begin\n // Global State \u5168\u5C40\u53D8\u91CF - Don't touch me\n // Global State Inner End\n }\n\n }\n\n namespace utils {\n function ABS(num: number): number;\n function Min(...args: number[]): number;\n function Max(...args: number[]): number;\n function Average(...args: number[]): number;\n function Floor(num: number): number;\n function Ceiling(num: number): number;\n function Round(num: number): number;\n function Sum(...args: number[]): number;\n function Rand(num: number): number;\n\n function If(condition: boolean, val1: any, val2: any): any;\n function IsEmpty(text: string | string[]): boolean;\n function NotNull(val: any): boolean;\n function And(...args: boolean[]): boolean;\n function Or(...args: boolean[]): boolean;\n\n function Len(text: string): number;\n function Contains(text1: string, text2: string): boolean;\n function Split(text1: string, text2: string): string[];\n function Trim(text: string): string;\n function Upper(text: string): string;\n function Lower(text: string): string;\n function Concat(...text: string[]): string;\n\n function Now(): number;\n function Timestamp(arg: number | string | Date): number;\n function Second(arg: number | string | Date): number;\n function Minute(arg: number | string | Date): number;\n function Hour(arg: number | string | Date): number;\n function Day(arg: number | string | Date): number;\n function DayOfWeek(arg: number | string | Date): number;\n function Month(arg: number | string | Date): number;\n function Year(arg: number | string | Date): number;\n function GetDate(year: number, month: number, day: number): number;\n function DateTimeValue(arg: string, val: string): number;\n function Age(arg: number | string | Date, val: number | string | Date): number;\n function AgeOfNow(arg: number | string | Date): number;\n function DateAdd(arg: number | string | Date, day: number): number;\n function MonthAdd(arg: number | string | Date, month: number): number;\n function YearAdd(arg: number | string | Date, year: number): number;\n function DateDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function HourDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function MinuteDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function SecondDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function MonthDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function YearDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function DateText(createdTime: number | string | Date, text: string): string;\n function IsToday(date: number | string | Date): boolean;\n\n }\n\n namespace common {\n // Global Common Inner Begin\n // Global Common \u5168\u5C40\u65B9\u6CD5 - Don't touch me\n // Global Common Inner End\n }\n\n namespace auth {\n const currentUser: {\n userId?: string\n phone?: string\n type?: number\n relatedRoles?: {\n id?: string\n envId?: string\n name?: string\n roleIdentity?: string\n }[]\n openId?: string\n name?: string\n nickName?: string\n email?: string\n mainOrg?: {\n id?: string\n name?: string\n }\n orgs?: {\n id?: string\n name?: string\n }[]\n}\n\n }\n\n \n\ninterface navigatorOptions {\n packageName: string;\n pageId: string;\n data?: Record<string, any>;\n params?: Record<string, any>;\n events?: Record<string, (data: any) => void>;\n success(res: any);\n fail(res: any);\n complete(res: any);\n}\n\ninterface navigateBackOptions {\n delta: number;\n}\n\n// \u8BBE\u7F6E\u72B6\u6001\nfunction setState(userSetState: Record<string, any>): void\n\n// \u7279\u5236\u8DEF\u7531\nfunction navigateTo(options: navigatorOptions)\nfunction redirectTo(options: navigatorOptions)\nfunction reLaunch(options: navigatorOptions)\nfunction navigateBack(options: navigateBackOptions)\n\n// \u663E\u793A\u63D0\u793A\nfunction showToast(options);\n\n// \u663E\u793A\u6A21\u6001\u63D0\u793A\nfunction showModal(options);\n\n// \u663E\u793A loading \u63D0\u793A\nfunction showLoading(options);\n\n// \u9690\u85CF loading \u63D0\u793A\nfunction hideLoading(options);\n\n// \u9690\u85CF\u63D0\u793A\nfunction hideToast(options);\n\n// sacnCode\nfunction scanCode(options: {\n onlyFromCamera?: boolean;\n enableDefaultBehavior?: boolean;\n scanType?: ('barCode' | 'qrCode')[];\n success?: (res: { result: string; scanType: string }) => void;\n fail?: (err: Error) => void;\n complete?: () => void;\n}): Promise<ScanCodeResult> | ScanCodeResult;\n\n\n}\n\ndeclare const app = $app\n\ndeclare namespace $w {\n function ABS(num: number): number;\n function Min(...args: number[]): number;\n function Max(...args: number[]): number;\n function Average(...args: number[]): number;\n function Floor(num: number): number;\n function Ceiling(num: number): number;\n function Round(num: number): number;\n function Sum(...args: number[]): number;\n function Rand(num: number): number;\n\n function If(condition: boolean, val1: any, val2: any): any;\n function IsEmpty(text: string | string[]): boolean;\n function NotNull(val: any): boolean;\n function And(...args: boolean[]): boolean;\n function Or(...args: boolean[]): boolean;\n\n function Len(text: string): number;\n function Contains(text1: string, text2: string): boolean;\n function Split(text1: string, text2: string): string[];\n function Trim(text: string): string;\n function Upper(text: string): string;\n function Lower(text: string): string;\n function Concat(...text: string[]): string;\n\n function Now(): number;\n function Timestamp(arg: number | string | Date): number;\n function Second(arg: number | string | Date): number;\n function Minute(arg: number | string | Date): number;\n function Hour(arg: number | string | Date): number;\n function Day(arg: number | string | Date): number;\n function DayOfWeek(arg: number | string | Date): number;\n function Month(arg: number | string | Date): number;\n function Year(arg: number | string | Date): number;\n function GetDate(year: number, month: number, day: number): number;\n function DateTimeValue(arg: string, val: string): number;\n function Age(arg: number | string | Date, val: number | string | Date): number;\n function AgeOfNow(arg: number | string | Date): number;\n function DateAdd(arg: number | string | Date, day: number): number;\n function MonthAdd(arg: number | string | Date, month: number): number;\n function YearAdd(arg: number | string | Date, year: number): number;\n function DateDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function HourDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function MinuteDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function SecondDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function MonthDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function YearDiff(startDay: number | string | Date, endDay: number | string | Date): number;\n function DateText(createdTime: number | string | Date, text: string): string;\n function IsToday(date: number | string | Date): boolean;\n\n\n // used widgets Inner Begin\n // used widgets - Don't touch me\n // used widgets Inner End\n\n // repeater scope Inner Begin\n // repeater scope - Don't touch me\n // repeater scope Inner End\n}\n\n// Global For Begin\ndeclare const $for: {\n // Global For Inner Begin\n // For \u5FAA\u73AF\u53D8\u91CF - Don't touch me\n // Global For Inner End\n}\ndeclare const forItems = $for\n// Global For End\n\n// $page Begin\ndeclare namespace $page {\n namespace dataset {\n\n const state: {\n // Page State Inner Begin\n // Page State \u9875\u9762\u53D8\u91CF - Don't touch me\n // Page State Inner End\n }\n\n const params: {\n // Page Param Inner Begin\n // Page Param \u9875\u9762\u53C2\u6570 - Don't touch me\n // Page Param Inner End\n }\n\n }\n\n namespace handler {\n // Page Handler Inner Begin\n // Page Handler \u9875\u9762\u65B9\u6CD5 - Don't touch me\n // Page Handler Inner End\n }\n\n \n\n// \u8BBE\u7F6E\u72B6\u6001\nfunction setState(userSetState: Record<string, any>): void\n\n\n}\n// $page End\n\n// $comp Begin\ndeclare namespace $comp {\n\n namespace props {\n\n const data: {\n // Comp Prop Data Inner Begin\n // Comp Prop Data \u7EC4\u4EF6\u5C5E\u6027 - Don't touch me\n // Comp Prop Data Inner End\n }\n\n namespace events {\n // Comp Prop Events Inner Begin\n // Comp Prop Events \u7EC4\u4EF6\u4E8B\u4EF6 - Don't touch me\n // Comp Prop Events Inner End\n }\n\n }\n\n namespace dataset {\n\n const state: {\n // Comp State Inner Begin\n // Comp State \u7EC4\u4EF6\u53D8\u91CF - Don't touch me\n // Comp State Inner End\n }\n\n }\n\n namespace handler {\n // Comp Handler Inner Begin\n // Comp Handler \u7EC4\u4EF6\u65B9\u6CD5 - Don't touch me\n // Comp Handler Inner End\n }\n\n}\n// $comp End\n\n// Global Formula Begin\n\ndeclare function ABS(num: number): number;\ndeclare function Min(...args: number[]): number;\ndeclare function Max(...args: number[]): number;\ndeclare function Average(...args: number[]): number;\ndeclare function Floor(num: number): number;\ndeclare function Ceiling(num: number): number;\ndeclare function Round(num: number): number;\ndeclare function Sum(...args: number[]): number;\ndeclare function Rand(num: number): number;\n\ndeclare function If(condition: boolean, val1: any, val2: any): any;\ndeclare function IsEmpty(text: string | string[]): boolean;\ndeclare function NotNull(val: any): boolean;\ndeclare function And(...args: boolean[]): boolean;\ndeclare function Or(...args: boolean[]): boolean;\n\ndeclare function Len(text: string): number;\ndeclare function Contains(text1: string, text2: string): boolean;\ndeclare function Split(text1: string, text2: string): string[];\ndeclare function Trim(text: string): string;\ndeclare function Upper(text: string): string;\ndeclare function Lower(text: string): string;\ndeclare function Concat(...text: string[]): string;\n\ndeclare function Now(): number;\ndeclare function Timestamp(arg: number | string | Date): number;\ndeclare function Second(arg: number | string | Date): number;\ndeclare function Minute(arg: number | string | Date): number;\ndeclare function Hour(arg: number | string | Date): number;\ndeclare function Day(arg: number | string | Date): number;\ndeclare function DayOfWeek(arg: number | string | Date): number;\ndeclare function Month(arg: number | string | Date): number;\ndeclare function Year(arg: number | string | Date): number;\ndeclare function GetDate(year: number, month: number, day: number): number;\ndeclare function DateTimeValue(arg: string, val: string): number;\ndeclare function Age(arg: number | string | Date, val: number | string | Date): number;\ndeclare function AgeOfNow(arg: number | string | Date): number;\ndeclare function DateAdd(arg: number | string | Date, day: number): number;\ndeclare function MonthAdd(arg: number | string | Date, month: number): number;\ndeclare function YearAdd(arg: number | string | Date, year: number): number;\ndeclare function DateDiff(startDay: number | string | Date, endDay: number | string | Date): number;\ndeclare function HourDiff(startDay: number | string | Date, endDay: number | string | Date): number;\ndeclare function MinuteDiff(startDay: number | string | Date, endDay: number | string | Date): number;\ndeclare function SecondDiff(startDay: number | string | Date, endDay: number | string | Date): number;\ndeclare function MonthDiff(startDay: number | string | Date, endDay: number | string | Date): number;\ndeclare function YearDiff(startDay: number | string | Date, endDay: number | string | Date): number;\ndeclare function DateText(createdTime: number | string | Date, text: string): string;\ndeclare function IsToday(date: number | string | Date): boolean;\n\n\n// Global Formula End\n";
|
|
2
|
-
//# sourceMappingURL=auto-generated%20copy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auto-generated copy.d.ts","sourceRoot":"","sources":["../../../src/utils/dts/auto-generated copy.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,+maAoYnB,CAAA"}
|
|
@@ -1,392 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.wedaDTS = void 0;
|
|
4
|
-
exports.wedaDTS = `
|
|
5
|
-
declare class UserWidget {
|
|
6
|
-
// FIXME: 暂时不对外暴露
|
|
7
|
-
// 内置命名空间
|
|
8
|
-
// get sys(): {
|
|
9
|
-
// readonly id: string;
|
|
10
|
-
// readonly module: string;
|
|
11
|
-
// readonly component: string;
|
|
12
|
-
// readonly parent: UserWidget;
|
|
13
|
-
// readonly children: UserWidget[];
|
|
14
|
-
|
|
15
|
-
// closest(filter?: (parentWidget: UserWidget) => boolean): UserWidget | null;
|
|
16
|
-
// };
|
|
17
|
-
|
|
18
|
-
// FIXME: 暂时不对外暴露
|
|
19
|
-
// 自定义命名空间
|
|
20
|
-
// get custom(): { [key: string]: any };
|
|
21
|
-
|
|
22
|
-
// ========== 快捷访问方式 ========== //
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* 组件 id
|
|
26
|
-
*/
|
|
27
|
-
readonly id: string;
|
|
28
|
-
/**
|
|
29
|
-
* 组件库名称
|
|
30
|
-
*/
|
|
31
|
-
readonly module: string;
|
|
32
|
-
/**
|
|
33
|
-
* 组件名称
|
|
34
|
-
*/
|
|
35
|
-
readonly component: string;
|
|
36
|
-
// FIXME: 暂时不对外暴露
|
|
37
|
-
// readonly parent: UserWidget;
|
|
38
|
-
// readonly children: UserWidget[];
|
|
39
|
-
|
|
40
|
-
// closest(filter?: (parentWidget: UserWidget) => boolean): UserWidget | null;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// Used Components Inner Begin
|
|
44
|
-
// Used Components - Don't touch me
|
|
45
|
-
// Used Components Inner End
|
|
46
|
-
|
|
47
|
-
declare namespace $app {
|
|
48
|
-
namespace dataset {
|
|
49
|
-
|
|
50
|
-
const state: {
|
|
51
|
-
// Global State Inner Begin
|
|
52
|
-
// Global State 全局变量 - Don't touch me
|
|
53
|
-
// Global State Inner End
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
namespace utils {
|
|
59
|
-
function ABS(num: number): number;
|
|
60
|
-
function Min(...args: number[]): number;
|
|
61
|
-
function Max(...args: number[]): number;
|
|
62
|
-
function Average(...args: number[]): number;
|
|
63
|
-
function Floor(num: number): number;
|
|
64
|
-
function Ceiling(num: number): number;
|
|
65
|
-
function Round(num: number): number;
|
|
66
|
-
function Sum(...args: number[]): number;
|
|
67
|
-
function Rand(num: number): number;
|
|
68
|
-
|
|
69
|
-
function If(condition: boolean, val1: any, val2: any): any;
|
|
70
|
-
function IsEmpty(text: string | string[]): boolean;
|
|
71
|
-
function NotNull(val: any): boolean;
|
|
72
|
-
function And(...args: boolean[]): boolean;
|
|
73
|
-
function Or(...args: boolean[]): boolean;
|
|
74
|
-
|
|
75
|
-
function Len(text: string): number;
|
|
76
|
-
function Contains(text1: string, text2: string): boolean;
|
|
77
|
-
function Split(text1: string, text2: string): string[];
|
|
78
|
-
function Trim(text: string): string;
|
|
79
|
-
function Upper(text: string): string;
|
|
80
|
-
function Lower(text: string): string;
|
|
81
|
-
function Concat(...text: string[]): string;
|
|
82
|
-
|
|
83
|
-
function Now(): number;
|
|
84
|
-
function Timestamp(arg: number | string | Date): number;
|
|
85
|
-
function Second(arg: number | string | Date): number;
|
|
86
|
-
function Minute(arg: number | string | Date): number;
|
|
87
|
-
function Hour(arg: number | string | Date): number;
|
|
88
|
-
function Day(arg: number | string | Date): number;
|
|
89
|
-
function DayOfWeek(arg: number | string | Date): number;
|
|
90
|
-
function Month(arg: number | string | Date): number;
|
|
91
|
-
function Year(arg: number | string | Date): number;
|
|
92
|
-
function GetDate(year: number, month: number, day: number): number;
|
|
93
|
-
function DateTimeValue(arg: string, val: string): number;
|
|
94
|
-
function Age(arg: number | string | Date, val: number | string | Date): number;
|
|
95
|
-
function AgeOfNow(arg: number | string | Date): number;
|
|
96
|
-
function DateAdd(arg: number | string | Date, day: number): number;
|
|
97
|
-
function MonthAdd(arg: number | string | Date, month: number): number;
|
|
98
|
-
function YearAdd(arg: number | string | Date, year: number): number;
|
|
99
|
-
function DateDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
100
|
-
function HourDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
101
|
-
function MinuteDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
102
|
-
function SecondDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
103
|
-
function MonthDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
104
|
-
function YearDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
105
|
-
function DateText(createdTime: number | string | Date, text: string): string;
|
|
106
|
-
function IsToday(date: number | string | Date): boolean;
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
namespace common {
|
|
111
|
-
// Global Common Inner Begin
|
|
112
|
-
// Global Common 全局方法 - Don't touch me
|
|
113
|
-
// Global Common Inner End
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
namespace auth {
|
|
117
|
-
const currentUser: {
|
|
118
|
-
userId?: string
|
|
119
|
-
phone?: string
|
|
120
|
-
type?: number
|
|
121
|
-
relatedRoles?: {
|
|
122
|
-
id?: string
|
|
123
|
-
envId?: string
|
|
124
|
-
name?: string
|
|
125
|
-
roleIdentity?: string
|
|
126
|
-
}[]
|
|
127
|
-
openId?: string
|
|
128
|
-
name?: string
|
|
129
|
-
nickName?: string
|
|
130
|
-
email?: string
|
|
131
|
-
mainOrg?: {
|
|
132
|
-
id?: string
|
|
133
|
-
name?: string
|
|
134
|
-
}
|
|
135
|
-
orgs?: {
|
|
136
|
-
id?: string
|
|
137
|
-
name?: string
|
|
138
|
-
}[]
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
interface navigatorOptions {
|
|
146
|
-
packageName: string;
|
|
147
|
-
pageId: string;
|
|
148
|
-
data?: Record<string, any>;
|
|
149
|
-
params?: Record<string, any>;
|
|
150
|
-
events?: Record<string, (data: any) => void>;
|
|
151
|
-
success(res: any);
|
|
152
|
-
fail(res: any);
|
|
153
|
-
complete(res: any);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
interface navigateBackOptions {
|
|
157
|
-
delta: number;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
// 设置状态
|
|
161
|
-
function setState(userSetState: Record<string, any>): void
|
|
162
|
-
|
|
163
|
-
// 特制路由
|
|
164
|
-
function navigateTo(options: navigatorOptions)
|
|
165
|
-
function redirectTo(options: navigatorOptions)
|
|
166
|
-
function reLaunch(options: navigatorOptions)
|
|
167
|
-
function navigateBack(options: navigateBackOptions)
|
|
168
|
-
|
|
169
|
-
// 显示提示
|
|
170
|
-
function showToast(options);
|
|
171
|
-
|
|
172
|
-
// 显示模态提示
|
|
173
|
-
function showModal(options);
|
|
174
|
-
|
|
175
|
-
// 显示 loading 提示
|
|
176
|
-
function showLoading(options);
|
|
177
|
-
|
|
178
|
-
// 隐藏 loading 提示
|
|
179
|
-
function hideLoading(options);
|
|
180
|
-
|
|
181
|
-
// 隐藏提示
|
|
182
|
-
function hideToast(options);
|
|
183
|
-
|
|
184
|
-
// sacnCode
|
|
185
|
-
function scanCode(options: {
|
|
186
|
-
onlyFromCamera?: boolean;
|
|
187
|
-
enableDefaultBehavior?: boolean;
|
|
188
|
-
scanType?: ('barCode' | 'qrCode')[];
|
|
189
|
-
success?: (res: { result: string; scanType: string }) => void;
|
|
190
|
-
fail?: (err: Error) => void;
|
|
191
|
-
complete?: () => void;
|
|
192
|
-
}): Promise<ScanCodeResult> | ScanCodeResult;
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
declare const app = $app
|
|
198
|
-
|
|
199
|
-
declare namespace $w {
|
|
200
|
-
function ABS(num: number): number;
|
|
201
|
-
function Min(...args: number[]): number;
|
|
202
|
-
function Max(...args: number[]): number;
|
|
203
|
-
function Average(...args: number[]): number;
|
|
204
|
-
function Floor(num: number): number;
|
|
205
|
-
function Ceiling(num: number): number;
|
|
206
|
-
function Round(num: number): number;
|
|
207
|
-
function Sum(...args: number[]): number;
|
|
208
|
-
function Rand(num: number): number;
|
|
209
|
-
|
|
210
|
-
function If(condition: boolean, val1: any, val2: any): any;
|
|
211
|
-
function IsEmpty(text: string | string[]): boolean;
|
|
212
|
-
function NotNull(val: any): boolean;
|
|
213
|
-
function And(...args: boolean[]): boolean;
|
|
214
|
-
function Or(...args: boolean[]): boolean;
|
|
215
|
-
|
|
216
|
-
function Len(text: string): number;
|
|
217
|
-
function Contains(text1: string, text2: string): boolean;
|
|
218
|
-
function Split(text1: string, text2: string): string[];
|
|
219
|
-
function Trim(text: string): string;
|
|
220
|
-
function Upper(text: string): string;
|
|
221
|
-
function Lower(text: string): string;
|
|
222
|
-
function Concat(...text: string[]): string;
|
|
223
|
-
|
|
224
|
-
function Now(): number;
|
|
225
|
-
function Timestamp(arg: number | string | Date): number;
|
|
226
|
-
function Second(arg: number | string | Date): number;
|
|
227
|
-
function Minute(arg: number | string | Date): number;
|
|
228
|
-
function Hour(arg: number | string | Date): number;
|
|
229
|
-
function Day(arg: number | string | Date): number;
|
|
230
|
-
function DayOfWeek(arg: number | string | Date): number;
|
|
231
|
-
function Month(arg: number | string | Date): number;
|
|
232
|
-
function Year(arg: number | string | Date): number;
|
|
233
|
-
function GetDate(year: number, month: number, day: number): number;
|
|
234
|
-
function DateTimeValue(arg: string, val: string): number;
|
|
235
|
-
function Age(arg: number | string | Date, val: number | string | Date): number;
|
|
236
|
-
function AgeOfNow(arg: number | string | Date): number;
|
|
237
|
-
function DateAdd(arg: number | string | Date, day: number): number;
|
|
238
|
-
function MonthAdd(arg: number | string | Date, month: number): number;
|
|
239
|
-
function YearAdd(arg: number | string | Date, year: number): number;
|
|
240
|
-
function DateDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
241
|
-
function HourDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
242
|
-
function MinuteDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
243
|
-
function SecondDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
244
|
-
function MonthDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
245
|
-
function YearDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
246
|
-
function DateText(createdTime: number | string | Date, text: string): string;
|
|
247
|
-
function IsToday(date: number | string | Date): boolean;
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
// used widgets Inner Begin
|
|
251
|
-
// used widgets - Don't touch me
|
|
252
|
-
// used widgets Inner End
|
|
253
|
-
|
|
254
|
-
// repeater scope Inner Begin
|
|
255
|
-
// repeater scope - Don't touch me
|
|
256
|
-
// repeater scope Inner End
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
// Global For Begin
|
|
260
|
-
declare const $for: {
|
|
261
|
-
// Global For Inner Begin
|
|
262
|
-
// For 循环变量 - Don't touch me
|
|
263
|
-
// Global For Inner End
|
|
264
|
-
}
|
|
265
|
-
declare const forItems = $for
|
|
266
|
-
// Global For End
|
|
267
|
-
|
|
268
|
-
// $page Begin
|
|
269
|
-
declare namespace $page {
|
|
270
|
-
namespace dataset {
|
|
271
|
-
|
|
272
|
-
const state: {
|
|
273
|
-
// Page State Inner Begin
|
|
274
|
-
// Page State 页面变量 - Don't touch me
|
|
275
|
-
// Page State Inner End
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
const params: {
|
|
279
|
-
// Page Param Inner Begin
|
|
280
|
-
// Page Param 页面参数 - Don't touch me
|
|
281
|
-
// Page Param Inner End
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
namespace handler {
|
|
287
|
-
// Page Handler Inner Begin
|
|
288
|
-
// Page Handler 页面方法 - Don't touch me
|
|
289
|
-
// Page Handler Inner End
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
// 设置状态
|
|
295
|
-
function setState(userSetState: Record<string, any>): void
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}
|
|
299
|
-
// $page End
|
|
300
|
-
|
|
301
|
-
// $comp Begin
|
|
302
|
-
declare namespace $comp {
|
|
303
|
-
|
|
304
|
-
namespace props {
|
|
305
|
-
|
|
306
|
-
const data: {
|
|
307
|
-
// Comp Prop Data Inner Begin
|
|
308
|
-
// Comp Prop Data 组件属性 - Don't touch me
|
|
309
|
-
// Comp Prop Data Inner End
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
namespace events {
|
|
313
|
-
// Comp Prop Events Inner Begin
|
|
314
|
-
// Comp Prop Events 组件事件 - Don't touch me
|
|
315
|
-
// Comp Prop Events Inner End
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
namespace dataset {
|
|
321
|
-
|
|
322
|
-
const state: {
|
|
323
|
-
// Comp State Inner Begin
|
|
324
|
-
// Comp State 组件变量 - Don't touch me
|
|
325
|
-
// Comp State Inner End
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
namespace handler {
|
|
331
|
-
// Comp Handler Inner Begin
|
|
332
|
-
// Comp Handler 组件方法 - Don't touch me
|
|
333
|
-
// Comp Handler Inner End
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
}
|
|
337
|
-
// $comp End
|
|
338
|
-
|
|
339
|
-
// Global Formula Begin
|
|
340
|
-
|
|
341
|
-
declare function ABS(num: number): number;
|
|
342
|
-
declare function Min(...args: number[]): number;
|
|
343
|
-
declare function Max(...args: number[]): number;
|
|
344
|
-
declare function Average(...args: number[]): number;
|
|
345
|
-
declare function Floor(num: number): number;
|
|
346
|
-
declare function Ceiling(num: number): number;
|
|
347
|
-
declare function Round(num: number): number;
|
|
348
|
-
declare function Sum(...args: number[]): number;
|
|
349
|
-
declare function Rand(num: number): number;
|
|
350
|
-
|
|
351
|
-
declare function If(condition: boolean, val1: any, val2: any): any;
|
|
352
|
-
declare function IsEmpty(text: string | string[]): boolean;
|
|
353
|
-
declare function NotNull(val: any): boolean;
|
|
354
|
-
declare function And(...args: boolean[]): boolean;
|
|
355
|
-
declare function Or(...args: boolean[]): boolean;
|
|
356
|
-
|
|
357
|
-
declare function Len(text: string): number;
|
|
358
|
-
declare function Contains(text1: string, text2: string): boolean;
|
|
359
|
-
declare function Split(text1: string, text2: string): string[];
|
|
360
|
-
declare function Trim(text: string): string;
|
|
361
|
-
declare function Upper(text: string): string;
|
|
362
|
-
declare function Lower(text: string): string;
|
|
363
|
-
declare function Concat(...text: string[]): string;
|
|
364
|
-
|
|
365
|
-
declare function Now(): number;
|
|
366
|
-
declare function Timestamp(arg: number | string | Date): number;
|
|
367
|
-
declare function Second(arg: number | string | Date): number;
|
|
368
|
-
declare function Minute(arg: number | string | Date): number;
|
|
369
|
-
declare function Hour(arg: number | string | Date): number;
|
|
370
|
-
declare function Day(arg: number | string | Date): number;
|
|
371
|
-
declare function DayOfWeek(arg: number | string | Date): number;
|
|
372
|
-
declare function Month(arg: number | string | Date): number;
|
|
373
|
-
declare function Year(arg: number | string | Date): number;
|
|
374
|
-
declare function GetDate(year: number, month: number, day: number): number;
|
|
375
|
-
declare function DateTimeValue(arg: string, val: string): number;
|
|
376
|
-
declare function Age(arg: number | string | Date, val: number | string | Date): number;
|
|
377
|
-
declare function AgeOfNow(arg: number | string | Date): number;
|
|
378
|
-
declare function DateAdd(arg: number | string | Date, day: number): number;
|
|
379
|
-
declare function MonthAdd(arg: number | string | Date, month: number): number;
|
|
380
|
-
declare function YearAdd(arg: number | string | Date, year: number): number;
|
|
381
|
-
declare function DateDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
382
|
-
declare function HourDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
383
|
-
declare function MinuteDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
384
|
-
declare function SecondDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
385
|
-
declare function MonthDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
386
|
-
declare function YearDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
387
|
-
declare function DateText(createdTime: number | string | Date, text: string): string;
|
|
388
|
-
declare function IsToday(date: number | string | Date): boolean;
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
// Global Formula End
|
|
392
|
-
`;
|