Browse Source

添加typings文件夹

ZXW 7 years ago
parent
commit
bf479c8ee6

File diff suppressed because it is too large
+ 17903 - 0
typings/globals/arcgis-js-api/index.d.ts


+ 8 - 0
typings/globals/arcgis-js-api/typings.json

@@ -0,0 +1,8 @@
+{
+  "resolution": "main",
+  "tree": {
+    "src": "https://raw.githubusercontent.com/Esri/jsapi-resources/64abeb4/3.x/typescript/arcgis-js-api.d.ts",
+    "raw": "github:Esri/jsapi-resources/3.x/typescript/arcgis-js-api.d.ts#64abeb4",
+    "typings": "https://raw.githubusercontent.com/Esri/jsapi-resources/64abeb4/3.x/typescript/arcgis-js-api.d.ts"
+  }
+}

File diff suppressed because it is too large
+ 28366 - 0
typings/globals/dojo/index.d.ts


+ 8 - 0
typings/globals/dojo/typings.json

@@ -0,0 +1,8 @@
+{
+  "resolution": "main",
+  "tree": {
+    "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/14c74ee373501a19c60253ab4aff0f9e2575516e/dojo/dojo.d.ts",
+    "raw": "registry:dt/dojo#1.9.0+20160907111543",
+    "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/14c74ee373501a19c60253ab4aff0f9e2575516e/dojo/dojo.d.ts"
+  }
+}

File diff suppressed because it is too large
+ 1921 - 0
typings/globals/jquery.dataTables/index.d.ts


+ 8 - 0
typings/globals/jquery.dataTables/typings.json

@@ -0,0 +1,8 @@
+{
+  "resolution": "main",
+  "tree": {
+    "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/912bbfc/jquery.dataTables/jquery.dataTables.d.ts",
+    "raw": "github:DefinitelyTyped/DefinitelyTyped/jquery.dataTables/jquery.dataTables.d.ts#912bbfc",
+    "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/912bbfc/jquery.dataTables/jquery.dataTables.d.ts"
+  }
+}

File diff suppressed because it is too large
+ 3220 - 0
typings/globals/jquery/index.d.ts


+ 8 - 0
typings/globals/jquery/typings.json

@@ -0,0 +1,8 @@
+{
+  "resolution": "main",
+  "tree": {
+    "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/5c7d1fcbea9b14df54fc4554d94cb67dfabffd9a/jquery/jquery.d.ts",
+    "raw": "registry:dt/jquery#1.10.0+20160908203239",
+    "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/5c7d1fcbea9b14df54fc4554d94cb67dfabffd9a/jquery/jquery.d.ts"
+  }
+}

File diff suppressed because it is too large
+ 20791 - 0
typings/globals/lodash/index.d.ts


+ 8 - 0
typings/globals/lodash/typings.json

@@ -0,0 +1,8 @@
+{
+  "resolution": "main",
+  "tree": {
+    "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/bb5916e6451594dbc565c8877dfcbfebde1c8976/lodash/lodash.d.ts",
+    "raw": "registry:dt/lodash#4.14.0+20160919145112",
+    "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/bb5916e6451594dbc565c8877dfcbfebde1c8976/lodash/lodash.d.ts"
+  }
+}

+ 8 - 0
typings/index.d.ts

@@ -0,0 +1,8 @@
+/// <reference path="globals/arcgis-js-api/index.d.ts" />
+/// <reference path="globals/dojo/index.d.ts" />
+/// <reference path="globals/jquery.dataTables/index.d.ts" />
+/// <reference path="globals/jquery/index.d.ts" />
+/// <reference path="globals/lodash/index.d.ts" />
+/// <reference path="locals/appx/index.d.ts" />
+/// <reference path="locals/jquery-ui/index.d.ts" />
+/// <reference path="locals/jquery-addon/index.d.ts" />

+ 190 - 0
typings/locals/appx/index.d.ts

@@ -0,0 +1,190 @@
+declare var AppX;
+
+interface AppX {
+    // 当前 url 中的根目录
+    //  比如 localhost:3000/WebAppFrame
+    root?: string,
+
+    // 应用配置
+    //  此配置为应用中 [只读] 的属性项
+    //  和下面 runtimeConfig 不同的是,runtimeConfig中的内容是运行过程中逐步构建起来的
+    appConfig: AppConfig,
+
+    // 运行时配置
+    //  用于存放运行时建立的全局变量、全局对象等
+    runtimeConfig?: RuntimeConfig,
+
+    // dojo 配置
+    //  用于存放 Dojo 相关的配置项
+    dojoConfig?: DojoConfig
+}
+
+interface AppConfig {
+    title?: string,
+    subtitle?: string,
+    version?: string,
+    mainContainer?: string,
+    restService?: string,
+    initextent?: Extent,
+    apiroot?: string,
+    apirootx?: string,
+    usertoken?: string,
+    xjapiroot?: string,
+    xjxj?: string,
+    range?: string,
+    groupid?: string,
+    departmentid?: string
+    // 以下组件会第一时间加载
+    // 此类组件会带有 onstarted() 函数,
+    // 
+    loadOnStartWidgets?: Array<{
+        name?: string,
+        discription?: string,
+        url?: string,
+        main?: string,
+        configPath?: string,
+        templatePath?: string,
+        depend?: string
+    }>,
+    // 以下组件不会第一时间加载
+    // 当在menuBar 中选择对应的模块时才会自动加载
+    //
+    menuBarWidgets: Array<{
+        id: string,
+        label: string,
+        icon?: string,
+        data: Array<{
+            id: string,
+            label: string,
+            widget: string,
+            main?: string,
+            icon: string,
+            inPanel: boolean
+        }>
+    }>,
+    gisResource: {
+        raster: GISItem,
+        terrain: GISItem,
+        poi: GISItem,
+        grid: GISItem,
+        privateterrain: GISItem,
+        pipe: GISItem,
+        zhuantitu: GISItem,
+        scada: GISItem,
+        geometry: GISItem,
+        apiburstpipe: GISItem,
+        apiconnectedpipe: GISItem,
+        apipipepath: GISItem,
+        apiscada: GISItem,
+        vectorprint: GISItem,
+        rasterprint: GISItem,
+        printtemplatepath: GISItem,
+        xzqmap: GISItem,
+        fangdamap: GISItem,
+        pipedata: GISItem,
+        region_map: GISItem
+    }
+
+}
+interface GISItem {
+    name: string,
+    groupname: string,
+    type: string,
+    config: Array<GISItemConfig>
+}
+
+interface GISItemConfig {
+    name: string,
+    groupname: string,
+    url: string
+}
+interface RuntimeConfig {
+    map?: any,
+    toast?: WidgetToast,
+    popup?: WidgetPopup,
+    photowall?: WidgetPhotoWall,
+    SideMenu?: WidgetSideMenu,
+    dataPanel?: WidgetDataPanel,
+    loadMask?: WidgetLoadMask,
+    fieldConfig?: WidgetFieldConfig,
+    unit?: string,
+    loadWait?: WidgetLoadWait,
+    routeplayer: RoutePlayer
+}
+
+interface Extent {
+    xmin?: number,
+    ymin?: number,
+    xmax?: number,
+    ymax?: number
+}
+
+interface DojoConfig {
+    packages?: Array<{
+        name?: string,
+        location?: string
+    }>
+}
+
+/** Widget */
+interface WidgetFieldConfig {
+    GetLayerFields(layername: string): LayerFieldInfo,
+    Reload(),
+}
+
+interface LayerFieldInfo {
+    layerdbname?: string,
+    layername?: string,
+    objectid: boolean,
+    fields?: Array<any>,
+}
+
+interface WidgetDataPanel {
+    Fold(),
+    fold(),
+    Unfold(),
+    unfold(),
+    Close(),
+    close(),
+    Show(souceData: any),
+    show(souceData: any),
+    ShowPage(sourceData: any),
+    showPage(sourceData: any)
+}
+
+interface WidgetLoadMask {
+    Show(message?: string),
+    Hide()
+}
+
+interface WidgetLoadWait {
+    Show(message?: string, dom?: any),
+    Hide()
+}
+
+interface RoutePlayerOption {
+    userlinecolor?: string,//人巡轨迹颜色,16进制字符串
+    carlinecolor?: string,//车巡轨迹颜色
+    playpointcolor?: string,//播放轨迹点颜色
+    playlinecolor?: string,//播放轨迹线颜色
+    pointsieze?: number,//轨迹点大小
+    linezise?: number//轨迹线宽度
+}
+
+interface RoutePlayer {
+    Show(gpsdata: Array<any>, options?: RoutePlayerOption),
+    Hide()
+}
+
+interface WidgetToast {
+    Show(message?: string)
+}
+interface WidgetPopup {
+    Show(message?: string)
+}
+interface WidgetPhotoWall {
+    Show(message?: string)
+}
+interface WidgetSideMenu {
+
+}

+ 7 - 0
typings/locals/jquery-addon/index.d.ts

@@ -0,0 +1,7 @@
+interface JQueryStatic {
+    jeDate(selector: string, obj: any): JQuery;
+    nowDate(params: any): any;
+}
+
+declare var jQuery: JQueryStatic;
+declare var $: JQueryStatic;

+ 231 - 0
typings/locals/jquery-ui/index.d.ts

@@ -0,0 +1,231 @@
+// Partial typing for the jQueryUI library, version 1.8.x
+
+interface DraggableEventUIParam {
+    helper: JQuery;
+    position: { top: number; left: number; };
+    offset: { top: number; left: number; };
+}
+
+interface DraggableEvent {
+    (event: Event, ui: DraggableEventUIParam): void;
+}
+
+interface Draggable {
+    // Options
+    disabled?: boolean;
+    addClasses?: boolean;
+    appendTo?: any;
+    axis?: string;
+    cancel?: string;
+    connectToSortable?: string;
+    containment?: any;
+    cursor?: string;
+    cursorAt?: any;
+    delay?: number;
+    distance?: number;
+    grid?: number[];
+    handle?: any;
+    helper?: any;
+    iframeFix?: any;
+    opacity?: number;
+    refreshPositions?: boolean;
+    revert?: any;
+    revertDuration?: number;
+    scope?: string;
+    scroll?: boolean;
+    scrollSensitivity?: number;
+    scrollSpeed?: number;
+    snap?: any;
+    snapMode?: string;
+    snapTolerance?: number;
+    stack?: string;
+    zIndex?: number;
+    // Events
+    create?: DraggableEvent;
+    start?: DraggableEvent;
+    drag?: DraggableEvent;
+    stop?: DraggableEvent;
+}
+
+interface DroppableEventUIParam {
+    draggable: JQuery;
+    helper: JQuery;
+    position: { top: number; left: number; };
+    offset: { top: number; left: number; };
+}
+
+interface DroppableEvent {
+    (event: Event, ui: DroppableEventUIParam): void;
+}
+
+interface Droppable {
+    // Options
+    disabled?: boolean;
+    accept?: any;
+    activeClass?: string;
+    greedy?: boolean;
+    hoverClass?: string;
+    scope?: string;
+    tolerance?: string;
+    // Events
+    create?: DroppableEvent;
+    activate?: DroppableEvent;
+    deactivate?: DroppableEvent;
+    over?: DroppableEvent;
+    out?: DroppableEvent;
+    drop?: DroppableEvent;
+}
+
+interface ResizableEvent {
+    (event: Event, ui: DroppableEventUIParam): void;
+}
+
+interface Resizable {
+    // Options
+    alsoResize?: string;
+    animate?: boolean;
+    animateDuration?: number | string;
+    animateEasing?: string;
+    aspectRatio?: boolean | number;
+    autoHide?: boolean;
+    cancel?: string;
+    classes?: Object;
+    containment?: Element | string;
+    delay?: number;
+    disabled?: boolean;
+    distance?: number;
+    ghost?: boolean;
+    grid?: Array<number>;
+    handles?: string | Object;
+    helper?: string;
+    maxHeight?: number;
+    maxWidth?: number;
+    minHeight?: number;
+    minWidth?: number;
+
+    // Methods
+    destroy?(): JQuery;
+    disable?(): JQuery;
+    enable?(): JQuery;
+    instance?(): Object;
+    option?(): any;
+    option?(optionName: string): Object;
+    option?(optionName: string, value: Object): JQuery;
+    option?(options: Object): JQuery;
+    widget?(): JQuery;
+
+    // Events
+    create?: ResizableEvent;
+    activate?: ResizableEvent;
+    deactivate?: ResizableEvent;
+    over?: ResizableEvent;
+    out?: ResizableEvent;
+    drop?: ResizableEvent;
+}
+
+interface Sortable {
+    // Options
+    appendTo?: JQuery | Element | String;
+    axis?: String;
+    cancel?: String;
+    classes?: Object;
+    connectWith?: String;
+    containment?: Element | string;
+    cursor?: string;
+    cursorAt?: string;
+    delay?: number;
+    disabled?: boolean;
+    distance?: number;
+    dropOnEmpty?: boolean;
+    forceHelperSize?: boolean;
+    forcePlaceholderSize?: boolean;
+    grid?: Array<number>;
+    handle?: string | Element;
+    helper?: string;
+    items?: String;
+    opacity?: number;
+    placeholder?: String;
+    revert?: boolean | number;
+    scroll?: boolean;
+    scrollSensitivity?: number;
+    scrollSpeed?: number;
+    tolerance?: string;
+    zIndex?: number;
+
+    // Methods
+    destroy?(): JQuery;
+    disable?(): JQuery;
+    enable?(): JQuery;
+    instance?(): Object;
+    option?(): any;
+    option?(optionName: string): Object;
+    option?(optionName: string, value: Object): JQuery;
+    option?(options: Object): JQuery;
+    widget?(): JQuery;
+
+    // Events
+    create?: ResizableEvent;
+    activate?: ResizableEvent;
+    deactivate?: ResizableEvent;
+    over?: ResizableEvent;
+    out?: ResizableEvent;
+    drop?: ResizableEvent;
+}
+
+interface Accordion {
+    // Options
+    active?: Boolean | number;
+    animate?: Boolean | Number | String | Object;
+    classes?: Object;
+    collapsible?: boolean;
+    disabled?: boolean;
+    event?: string;
+    header?: String;
+    heightStyle?: String;
+    icons?: any;
+
+    // Methods
+    destroy?(): JQuery;
+    disable?(): JQuery;
+    enable?(): JQuery;
+    instance?(): Object;
+    option?(): any;
+    option?(optionName: string): Object;
+    option?(optionName: string, value: Object): JQuery;
+    option?(options: Object): JQuery;
+    refresh?(): JQuery;
+    widget?(): JQuery;
+
+    // Events
+    activate?: ResizableEvent;
+    create?: ResizableEvent;
+}
+
+interface JQuery {
+    // draggable
+    draggable(options: Draggable): JQuery;
+    draggable(optionLiteral: string, options: Draggable): JQuery;
+    draggable(optionLiteral: string, optionName: string, optionValue: any): JQuery;
+    draggable(optionLiteral: string, optionName: string): any;
+    // droppable
+    droppable(options: Droppable): JQuery;
+    droppable(optionLiteral: string, options: Draggable): JQuery;
+    droppable(optionLiteral: string, optionName: string, optionValue: any): JQuery;
+    droppable(optionLiteral: string, optionName: string): any;
+    droppable(methodName: string): any;
+    // resizable
+    resizable(options: Resizable): JQuery;
+    resizable(optionLiteral: string, options: Resizable): JQuery;
+    resizable(optionLiteral: string, optionName: string, optionValue: any): JQuery;
+    resizable(optionLiteral: string, optionName: string): any;
+    // resizable
+    sortable(options: Sortable): JQuery;
+    sortable(optionLiteral: string, options: Sortable): JQuery;
+    sortable(optionLiteral: string, optionName: string, optionValue: any): JQuery;
+    sortable(optionLiteral: string, optionName: string): any;
+    // accordion
+    accordion(options: Accordion): JQuery;
+    accordion(optionLiteral: string, options: Accordion): JQuery;
+    soraccordiontable(optionLiteral: string, optionName: string, optionValue: any): JQuery;
+    accordion(optionLiteral: string, optionName: string): any;
+}