clickgo 6.4.2 → 6.5.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.
@@ -59,6 +59,10 @@ export declare abstract class AbstractControl {
59
59
  get formFocus(): boolean;
60
60
  /** --- 获取当前语言名 --- */
61
61
  get locale(): string;
62
+ /** --- 当前语言的标准 HTML lang 标签 --- */
63
+ get localeTag(): string;
64
+ /** --- 当前语言的书写方向 --- */
65
+ get localeDirection(): 'ltr' | 'rtl';
62
66
  /**
63
67
  * --- 获取语言内容 ---
64
68
  */
package/dist/lib/dom.d.ts CHANGED
@@ -27,6 +27,36 @@ export declare const hues: string[];
27
27
  * @param el 要判断的元素
28
28
  */
29
29
  export declare function inPage(el: HTMLElement): boolean;
30
+ /**
31
+ * --- 判断元素的 inline 方向是否为 RTL ---
32
+ * @param el 要判断的元素;控件首次渲染时可能尚未生成实际元素
33
+ * @returns 是否 RTL
34
+ */
35
+ export declare function isRtl(el: Element | null | undefined): boolean;
36
+ /**
37
+ * --- 获取标准化后的物理横向滚动位置(距内容物理左侧) ---
38
+ * @param el 滚动元素
39
+ * @returns 物理横向滚动位置
40
+ */
41
+ export declare function getScrollLeft(el: HTMLElement): number;
42
+ /**
43
+ * --- 设置标准化后的物理横向滚动位置(距内容物理左侧) ---
44
+ * @param el 滚动元素
45
+ * @param value 物理横向滚动位置
46
+ */
47
+ export declare function setScrollLeft(el: HTMLElement, value: number): void;
48
+ /**
49
+ * --- 获取标准化后的逻辑 inline 横向滚动位置(距 inline-start) ---
50
+ * @param el 滚动元素
51
+ * @returns 逻辑横向滚动位置
52
+ */
53
+ export declare function getScrollInlineOffset(el: HTMLElement): number;
54
+ /**
55
+ * --- 设置标准化后的逻辑 inline 横向滚动位置(距 inline-start) ---
56
+ * @param el 滚动元素
57
+ * @param value 逻辑横向滚动位置
58
+ */
59
+ export declare function setScrollInlineOffset(el: HTMLElement, value: number): void;
30
60
  export declare const dpi: number;
31
61
  /**
32
62
  * --- 设置全局鼠标样式 ---
@@ -26,6 +26,10 @@ declare abstract class AbstractCommon {
26
26
  get prep(): string;
27
27
  /** --- 当前的语言 --- */
28
28
  get locale(): string;
29
+ /** --- 当前语言的标准 HTML lang 标签 --- */
30
+ get localeTag(): string;
31
+ /** --- 当前语言的书写方向 --- */
32
+ get localeDirection(): 'ltr' | 'rtl';
29
33
  /**
30
34
  * --- 获取语言内容 ---
31
35
  */
@@ -311,6 +315,11 @@ export declare const elements: {
311
315
  'confirm': HTMLDivElement;
312
316
  'init': () => void;
313
317
  };
318
+ /**
319
+ * --- 刷新系统根节点及任务窗体的语言方向 ---
320
+ * @param taskId 仅刷新指定任务,省略时刷新全部任务
321
+ */
322
+ export declare function refreshLocaleDirection(taskId?: string): void;
314
323
  /** --- 显示系统级询问框 --- */
315
324
  export declare function superConfirm(current: string, html: string): Promise<boolean>;
316
325
  /** --- 显示系统级虚拟键盘 --- */
@@ -508,11 +508,23 @@ export declare const lang: {
508
508
  'names': string[];
509
509
  /** --- 浏览器常用映射为本语言 --- */
510
510
  'map': Record<string, string>;
511
+ /** --- 语言代号对应的标准 HTML lang 标签 --- */
512
+ 'tags': Record<string, string>;
511
513
  /**
512
514
  * --- 根据常用语言字符串获取语言 code ---
513
515
  * @param accept 常用字符串,如 zh-cn,或包含 zh-cn 的字符串,默认取浏览器的语言
514
516
  */
515
517
  getCodeByAccept: (accept?: string) => string;
518
+ /**
519
+ * --- 获取标准 HTML lang 标签 ---
520
+ * @param locale ClickGo 语言代号或浏览器语言字符串
521
+ */
522
+ getTag: (locale: string) => string;
523
+ /**
524
+ * --- 获取语言书写方向 ---
525
+ * @param locale ClickGo 语言代号或浏览器语言字符串
526
+ */
527
+ getDirection: (locale: string) => 'ltr' | 'rtl';
516
528
  };
517
529
  /** --- 网址对象 --- */
518
530
  export interface IUrl {
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file