From b1b9f1a32481a7e62370b3fe7c7ffc555fe18ec3 Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Wed, 29 Aug 2018 09:38:58 -0700 Subject: [PATCH 001/160] Initial commit. Does not compile yet due to strictNullChecks and all. Need to fix those in the next transaction. --- types/@oracle/index.d.ts | 0 types/@oracle/oraclejet/index.d.ts | 0 types/@oracle/oraclejet/ojs/index.d.ts | 23 + .../oraclejet/ojs/ojaccordion/index.d.ts | 49 ++ .../oraclejet/ojs/ojanimation/index.d.ts | 19 + .../ojs/ojarraydataprovider/index.d.ts | 22 + .../ojs/ojarraytreedataprovider/index.d.ts | 18 + .../@oracle/oraclejet/ojs/ojavatar/index.d.ts | 28 + .../@oracle/oraclejet/ojs/ojbutton/index.d.ts | 144 +++ .../@oracle/oraclejet/ojs/ojchart/index.d.ts | 822 ++++++++++++++++++ .../oraclejet/ojs/ojcheckboxset/index.d.ts | 47 + .../oraclejet/ojs/ojcollapsible/index.d.ts | 52 ++ .../ojs/ojcollectiondataprovider/index.d.ts | 17 + .../@oracle/oraclejet/ojs/ojcolor/index.d.ts | 179 ++++ .../oraclejet/ojs/ojcolorpalette/index.d.ts | 56 ++ .../oraclejet/ojs/ojcolorspectrum/index.d.ts | 44 + .../oraclejet/ojs/ojcomponentcore/index.d.ts | 31 + .../oraclejet/ojs/ojcomposite/index.d.ts | 31 + .../oraclejet/ojs/ojconveyorbelt/index.d.ts | 23 + types/@oracle/oraclejet/ojs/ojcore/index.d.ts | 123 +++ .../oraclejet/ojs/ojdataprovider/index.d.ts | 254 ++++++ .../oraclejet/ojs/ojdatetimepicker/index.d.ts | 308 +++++++ .../@oracle/oraclejet/ojs/ojdefer/index.d.ts | 13 + .../ojs/ojdeferreddataprovider/index.d.ts | 17 + .../@oracle/oraclejet/ojs/ojdialog/index.d.ts | 127 +++ .../oraclejet/ojs/ojdvt-base/index.d.ts | 20 + .../oraclejet/ojs/ojeditablevalue/index.d.ts | 67 ++ .../oraclejet/ojs/ojfilepicker/index.d.ts | 44 + .../oraclejet/ojs/ojfilmstrip/index.d.ts | 42 + .../oraclejet/ojs/ojformlayout/index.d.ts | 37 + .../@oracle/oraclejet/ojs/ojgantt/index.d.ts | 286 ++++++ .../@oracle/oraclejet/ojs/ojgauge/index.d.ts | 347 ++++++++ .../oraclejet/ojs/ojindexer/index.d.ts | 13 + .../oraclejet/ojs/ojinputnumber/index.d.ts | 95 ++ .../oraclejet/ojs/ojinputtext/index.d.ts | 178 ++++ .../@oracle/oraclejet/ojs/ojkeyset/index.d.ts | 32 + .../ojs/ojknockout-keyset/index.d.ts | 9 + .../oraclejet/ojs/ojknockout-model/index.d.ts | 7 + .../oraclejet/ojs/ojknockout/index.d.ts | 14 + .../@oracle/oraclejet/ojs/ojlabel/index.d.ts | 33 + .../oraclejet/ojs/ojlabelvalue/index.d.ts | 25 + .../@oracle/oraclejet/ojs/ojlegend/index.d.ts | 230 +++++ .../ojs/ojlistdataproviderview/index.d.ts | 21 + .../oraclejet/ojs/ojlistview/index.d.ts | 167 ++++ .../oraclejet/ojs/ojmasonrylayout/index.d.ts | 85 ++ types/@oracle/oraclejet/ojs/ojmenu/index.d.ts | 87 ++ .../oraclejet/ojs/ojmenuselectmany/index.d.ts | 36 + .../oraclejet/ojs/ojmessage/index.d.ts | 51 ++ .../oraclejet/ojs/ojmessages/index.d.ts | 55 ++ .../oraclejet/ojs/ojmessaging/index.d.ts | 30 + .../@oracle/oraclejet/ojs/ojmodel/index.d.ts | 169 ++++ .../ojs/ojmodule-element-utils/index.d.ts | 3 + .../oraclejet/ojs/ojmodule-element/index.d.ts | 54 ++ .../@oracle/oraclejet/ojs/ojmodule/index.d.ts | 24 + .../ojs/ojmoduleanimations/index.d.ts | 30 + .../oraclejet/ojs/ojnavigationlist/index.d.ts | 253 ++++++ types/@oracle/oraclejet/ojs/ojnbox/index.d.ts | 251 ++++++ .../oraclejet/ojs/ojoffcanvas/index.d.ts | 13 + .../oraclejet/ojs/ojoptgroup/index.d.ts | 25 + .../@oracle/oraclejet/ojs/ojoption/index.d.ts | 25 + .../oraclejet/ojs/ojpictochart/index.d.ts | 206 +++++ .../@oracle/oraclejet/ojs/ojpopup/index.d.ts | 105 +++ .../oraclejet/ojs/ojprogress/index.d.ts | 28 + .../oraclejet/ojs/ojprogresslist/index.d.ts | 50 ++ .../oraclejet/ojs/ojpulltorefresh/index.d.ts | 7 + .../oraclejet/ojs/ojradioset/index.d.ts | 47 + .../oraclejet/ojs/ojrefresher/index.d.ts | 30 + .../@oracle/oraclejet/ojs/ojrouter/index.d.ts | 69 ++ .../oraclejet/ojs/ojselectcombobox/index.d.ts | 427 +++++++++ .../@oracle/oraclejet/ojs/ojslider/index.d.ts | 61 ++ .../oraclejet/ojs/ojsunburst/index.d.ts | 270 ++++++ .../oraclejet/ojs/ojswipeactions/index.d.ts | 24 + .../oraclejet/ojs/ojswipetoreveal/index.d.ts | 7 + .../@oracle/oraclejet/ojs/ojswitch/index.d.ts | 39 + .../oraclejet/ojs/ojswitcher/index.d.ts | 21 + .../@oracle/oraclejet/ojs/ojtable/index.d.ts | 197 +++++ .../oraclejet/ojs/ojtagcloud/index.d.ts | 139 +++ .../oraclejet/ojs/ojthematicmap/index.d.ts | 376 ++++++++ .../oraclejet/ojs/ojtime-base/index.d.ts | 15 + .../oraclejet/ojs/ojtimeaxis/index.d.ts | 40 + .../oraclejet/ojs/ojtimeutils/index.d.ts | 8 + .../oraclejet/ojs/ojtoolbar/index.d.ts | 19 + .../@oracle/oraclejet/ojs/ojtrain/index.d.ts | 58 ++ .../ojs/ojtreedataprovider/index.d.ts | 7 + .../oraclejet/ojs/ojtreemap/index.d.ts | 241 +++++ .../ojs/ojvalidation-base/index.d.ts | 188 ++++ .../ojs/ojvalidation-datetime/index.d.ts | 108 +++ .../ojs/ojvalidation-number/index.d.ts | 51 ++ .../ojs/ojvalidationgroup/index.d.ts | 22 + .../tests/oraclejet/@oraclejet-tests.ts | 26 + types/@oracle/tsconfig.json | 20 + types/@oracle/tslint.json | 1 + 92 files changed, 8212 insertions(+) create mode 100644 types/@oracle/index.d.ts create mode 100644 types/@oracle/oraclejet/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojaccordion/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojanimation/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojarraydataprovider/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojarraytreedataprovider/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojavatar/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojbutton/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojchart/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojcheckboxset/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojcollapsible/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojcollectiondataprovider/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojcolor/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojcolorpalette/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojcolorspectrum/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojcomponentcore/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojcomposite/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojconveyorbelt/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojcore/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojdataprovider/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojdatetimepicker/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojdefer/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojdeferreddataprovider/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojdialog/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojdvt-base/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojeditablevalue/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojfilepicker/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojfilmstrip/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojformlayout/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojgantt/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojgauge/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojindexer/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojinputnumber/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojinputtext/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojkeyset/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojknockout-keyset/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojknockout-model/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojknockout/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojlabel/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojlabelvalue/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojlegend/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojlistdataproviderview/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojlistview/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojmasonrylayout/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojmenu/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojmenuselectmany/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojmessage/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojmessages/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojmessaging/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojmodel/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojmodule-element-utils/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojmodule-element/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojmodule/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojmoduleanimations/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojnavigationlist/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojnbox/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojoffcanvas/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojoptgroup/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojoption/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojpictochart/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojpopup/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojprogress/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojprogresslist/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojpulltorefresh/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojradioset/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojrefresher/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojrouter/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojselectcombobox/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojslider/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojsunburst/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojswipeactions/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojswipetoreveal/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojswitch/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojswitcher/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojtable/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojtagcloud/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojthematicmap/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojtime-base/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojtimeaxis/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojtimeutils/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojtoolbar/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojtrain/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojtreedataprovider/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojtreemap/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojvalidation-base/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojvalidation-datetime/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojvalidation-number/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojvalidationgroup/index.d.ts create mode 100644 types/@oracle/tests/oraclejet/@oraclejet-tests.ts create mode 100644 types/@oracle/tsconfig.json create mode 100644 types/@oracle/tslint.json diff --git a/types/@oracle/index.d.ts b/types/@oracle/index.d.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/types/@oracle/oraclejet/index.d.ts b/types/@oracle/oraclejet/index.d.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/types/@oracle/oraclejet/ojs/index.d.ts b/types/@oracle/oraclejet/ojs/index.d.ts new file mode 100644 index 0000000000..90fb69208a --- /dev/null +++ b/types/@oracle/oraclejet/ojs/index.d.ts @@ -0,0 +1,23 @@ +/// +declare namespace oj { + + var revision: string; + var version: string; + function ajax(settings?: object): object; + function sync(method: string, model: oj.Model|oj.Collection, options?: object): object; + +} +declare namespace oj { + interface JetSettableProperties { + } + interface GenericSetter { + set(propertyName: K, propertyValue: SP[K]): void; + unset(propertyName: K): void; + } + abstract class JetElement extends HTMLElement implements GenericSetter { + set(propertyName: K, propertyValue: SP[K]): void; + unset(propertyName: K): void; + } + interface JetElementEventMap extends HTMLElementEventMap { + } +} \ No newline at end of file diff --git a/types/@oracle/oraclejet/ojs/ojaccordion/index.d.ts b/types/@oracle/oraclejet/ojs/ojaccordion/index.d.ts new file mode 100644 index 0000000000..427ee7ecaa --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojaccordion/index.d.ts @@ -0,0 +1,49 @@ +/// +/// +declare namespace oj { + class ojAccordion extends baseComponent { + expanded: Array<{id?: string, index?: number}>|null; + multiple: boolean; + onExpandedChanged: (event: CustomEvent)=> any; + onMultipleChanged: (event: CustomEvent)=> any; + onOjBeforeCollapse: (event: oj.ojAccordion.ojBeforeCollapse)=> any; + onOjBeforeExpand: (event: oj.ojAccordion.ojBeforeExpand)=> any; + onOjCollapse: (event: oj.ojAccordion.ojCollapse)=> any; + onOjExpand: (event: oj.ojAccordion.ojExpand)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojAccordionEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + } + namespace ojAccordion { + class ojBeforeCollapse extends CustomEvent<{toCollapsible: Element, fromCollapsible: Element, [propName: string]: any}> { + + } + + class ojBeforeExpand extends CustomEvent<{toCollapsible: Element, fromCollapsible: Element, [propName: string]: any}> { + + } + + class ojCollapse extends CustomEvent<{toCollapsible: Element, fromCollapsible: Element, [propName: string]: any}> { + + } + + class ojExpand extends CustomEvent<{toCollapsible: Element, fromCollapsible: Element, [propName: string]: any}> { + + } + } + interface ojAccordionEventMap extends oj.baseComponentEventMap { + 'ojBeforeCollapse': oj.ojAccordion.ojBeforeCollapse; + 'ojBeforeExpand': oj.ojAccordion.ojBeforeExpand; + 'ojCollapse': oj.ojAccordion.ojCollapse; + 'ojExpand': oj.ojAccordion.ojExpand; + 'expandedChanged': CustomEvent; + 'multipleChanged': CustomEvent; + } + interface ojAccordionSettableProperties extends baseComponentSettableProperties { + expanded: Array|Array|Array<{id?: string, index?: number}>|null; + multiple: boolean; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojanimation/index.d.ts b/types/@oracle/oraclejet/ojs/ojanimation/index.d.ts new file mode 100644 index 0000000000..bd4b77f2c6 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojanimation/index.d.ts @@ -0,0 +1,19 @@ +declare namespace oj { + namespace AnimationUtils { + function collapse(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, direction?: string, startMaxHeight?: string, endMaxHeight?: string, startMaxWidth?: string, endMaxWidth?: string}): Promise; + function expand(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, direction?: string, startMaxHeight?: string, endMaxHeight?: string, startMaxWidth?: string, endMaxWidth?: string}): Promise; + function fadeIn(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, startOpacity?: number, endOpacity?: number}): Promise; + function fadeOut(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, startOpacity?: number, endOpacity?: number}): Promise; + function flipIn(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, axis?: string, startAngle?: string, endAngle?: string, backfaceVisibility?: string, perspective?: string, transformOrigin?: string, flipTarget?: string}): Promise; + function flipOut(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, axis?: string, startAngle?: string, endAngle?: string, backfaceVisibility?: string, perspective?: string, transformOrigin?: string, flipTarget?: string}): Promise; + function ripple(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, offsetX?: string, offsetY?: string, color?: string, diameter?: string, startOpacity?: number, endOpacity?: number}): Promise; + function slideIn(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, direction?: string, offsetX?: string, offsetY?: string}): Promise; + function slideOut(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, direction?: string, offsetX?: string, offsetY?: string}): Promise; + function zoomIn(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, axis?: string, transformOrigin?: string}): Promise; + function zoomOut(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, axis?: string, transformOrigin?: string}): Promise; + } + namespace AnimationUtils { + type AnimationMethods = 'collapse'|'expand'|'fadeIn'|'fadeOut'|'flipIn'|'flipOut'|'ripple'|'slideIn'|'slideOut'|'zoomIn'|'zoomOut'; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojarraydataprovider/index.d.ts b/types/@oracle/oraclejet/ojs/ojarraydataprovider/index.d.ts new file mode 100644 index 0000000000..dddaf2290a --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojarraydataprovider/index.d.ts @@ -0,0 +1,22 @@ +/// +declare namespace oj { + class ArrayDataProvider implements DataProvider { + constructor(data: Array|(()=> Array), options?: {sortComparators?: SortComparators, implicitSort?: SortCriterion[], keys?: Array|(()=> Array), idAttribute?: string|Array, keyAttributes?: string|Array}); + addEventListener(eventType: string, listener: EventListener): void + containsKeys(params: FetchByKeysParameters): Promise> + dispatchEvent(evt: Event): boolean + fetchByKeys(params: FetchByKeysParameters): Promise> + fetchByOffset(params: FetchByOffsetParameters): Promise> + fetchFirst>(params?: FetchListParameters): AsyncIterable + getCapability(capabilityName?: string): any + getTotalSize(): Promise; + isEmpty(): 'yes'|'no'|'unknown'; + removeEventListener(eventType: string, listener: EventListener): void + } + +} +declare namespace oj { + interface SortComparators { + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojarraytreedataprovider/index.d.ts b/types/@oracle/oraclejet/ojs/ojarraytreedataprovider/index.d.ts new file mode 100644 index 0000000000..dbb445c36f --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojarraytreedataprovider/index.d.ts @@ -0,0 +1,18 @@ +/// +declare namespace oj { + class ArrayTreeDataProvider implements TreeDataProvider { + constructor(data: Array|(()=> Array), options?: {sortComparators?: SortComparators, implicitSort?: SortCriterion[], keyAttributes?: string|Array, keyAttributesScope?: 'global'|'siblings', childrenAttribute?: string}); + addEventListener(eventType: string, listener: EventListener): void + containsKeys(params: FetchByKeysParameters): Promise> + dispatchEvent(evt: Event): boolean + fetchByKeys(params: FetchByKeysParameters): Promise> + fetchByOffset(params: FetchByOffsetParameters): Promise> + fetchFirst>(params?: FetchListParameters): AsyncIterable + getCapability(capabilityName?: string): any + getChildDataProvider(any): ArrayTreeDataProvider + getTotalSize(): Promise; + isEmpty(): 'yes'|'no'|'unknown'; + removeEventListener(eventType: string, listener: EventListener): void + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojavatar/index.d.ts b/types/@oracle/oraclejet/ojs/ojavatar/index.d.ts new file mode 100644 index 0000000000..bfdda53359 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojavatar/index.d.ts @@ -0,0 +1,28 @@ +declare namespace oj { + class ojAvatar extends JetElement { + initials: string; + size: 'xxs'|'xs'|'sm'|'md'|'lg'|'xl'|'xxl'; + src: string; + onInitialsChanged: (event: CustomEvent)=> any; + onSizeChanged: (event: CustomEvent)=> any; + onSrcChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojAvatarEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getProperty(property: string): any; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + } + interface ojAvatarEventMap extends oj.JetElementEventMap { + 'initialsChanged': CustomEvent; + 'sizeChanged': CustomEvent; + 'srcChanged': CustomEvent; + } + interface ojAvatarSettableProperties extends JetSettableProperties { + initials: string; + size: 'xxs'|'xs'|'sm'|'md'|'lg'|'xl'|'xxl'; + src: string; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojbutton/index.d.ts b/types/@oracle/oraclejet/ojs/ojbutton/index.d.ts new file mode 100644 index 0000000000..22df674702 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojbutton/index.d.ts @@ -0,0 +1,144 @@ +/// +declare namespace oj { + class ojButton extends baseComponent { + chroming: 'full'|'half'|'outlined'; + disabled: boolean; + display: 'all'|'icons'; + onChromingChanged: (event: CustomEvent)=> any; + onDisabledChanged: (event: CustomEvent)=> any; + onDisplayChanged: (event: CustomEvent)=> any; + onOjAction: (event: oj.ojButton.ojAction)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojButtonEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojButton { + class ojAction extends CustomEvent<{ [propName: string]: any}> { + + } + } + interface ojButtonEventMap extends oj.baseComponentEventMap { + 'ojAction': oj.ojButton.ojAction; + 'chromingChanged': CustomEvent; + 'disabledChanged': CustomEvent; + 'displayChanged': CustomEvent; + } + interface ojButtonSettableProperties extends baseComponentSettableProperties { + chroming: 'full'|'half'|'outlined'; + disabled: boolean; + display: 'all'|'icons'; + } + +} +declare namespace oj { + abstract class ojButtonset extends baseComponent { + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojButtonsetEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojButtonsetEventMap extends oj.baseComponentEventMap { + } + interface ojButtonsetSettableProperties extends baseComponentSettableProperties { + } + +} +declare namespace oj { + class ojButtonsetMany extends ojButtonset { + chroming: 'full'|'half'|'outlined'; + disabled: boolean; + display: 'all'|'icons'; + focusManagement: 'oneTabstop'|'none'; + value: Array|null; + onChromingChanged: (event: CustomEvent)=> any; + onDisabledChanged: (event: CustomEvent)=> any; + onDisplayChanged: (event: CustomEvent)=> any; + onFocusManagementChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojButtonsetManyEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojButtonsetManyEventMap extends oj.ojButtonsetEventMap { + 'chromingChanged': CustomEvent; + 'disabledChanged': CustomEvent; + 'displayChanged': CustomEvent; + 'focusManagementChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojButtonsetManySettableProperties extends ojButtonsetSettableProperties { + chroming: 'full'|'half'|'outlined'; + disabled: boolean; + display: 'all'|'icons'; + focusManagement: 'oneTabstop'|'none'; + value: Array|null; + } + +} +declare namespace oj { + class ojButtonsetOne extends ojButtonset { + chroming: 'full'|'half'|'outlined'; + disabled: boolean; + display: 'all'|'icons'; + focusManagement: 'oneTabstop'|'none'; + value: any; + onChromingChanged: (event: CustomEvent)=> any; + onDisabledChanged: (event: CustomEvent)=> any; + onDisplayChanged: (event: CustomEvent)=> any; + onFocusManagementChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojButtonsetOneEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojButtonsetOneEventMap extends oj.ojButtonsetEventMap { + 'chromingChanged': CustomEvent; + 'disabledChanged': CustomEvent; + 'displayChanged': CustomEvent; + 'focusManagementChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojButtonsetOneSettableProperties extends ojButtonsetSettableProperties { + chroming: 'full'|'half'|'outlined'; + disabled: boolean; + display: 'all'|'icons'; + focusManagement: 'oneTabstop'|'none'; + value: any; + } + +} +declare namespace oj { + class ojMenuButton extends ojButton { + chroming: 'full'|'half'|'outlined'; + disabled: boolean; + display: 'all'|'icons'; + onChromingChanged: (event: CustomEvent)=> any; + onDisabledChanged: (event: CustomEvent)=> any; + onDisplayChanged: (event: CustomEvent)=> any; + onOjAction: (event: oj.ojMenuButton.ojAction)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojMenuButtonEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojMenuButton { + class ojAction extends CustomEvent<{ [propName: string]: any}> { + + } + } + interface ojMenuButtonEventMap extends oj.ojButtonEventMap { + 'ojAction': oj.ojMenuButton.ojAction; + 'chromingChanged': CustomEvent; + 'disabledChanged': CustomEvent; + 'displayChanged': CustomEvent; + } + interface ojMenuButtonSettableProperties extends ojButtonSettableProperties { + chroming: 'full'|'half'|'outlined'; + disabled: boolean; + display: 'all'|'icons'; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojchart/index.d.ts b/types/@oracle/oraclejet/ojs/ojchart/index.d.ts new file mode 100644 index 0000000000..f2e3354441 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojchart/index.d.ts @@ -0,0 +1,822 @@ +/// +/// +declare namespace oj { + class ojChart extends dvtBaseComponent> { + animationOnDataChange: 'auto'|'slideToLeft'|'slideToRight'|'none'; + animationOnDisplay: 'auto'|'alphaFade'|'zoom'|'none'; + as: string; + coordinateSystem: 'polar'|'cartesian'; + data: oj.DataProvider|null; + dataCursor: 'off'|'on'|'auto'; + dataCursorBehavior: 'smooth'|'snap'|'auto'; + dataCursorPosition: {x: number|string, y: number, y2: number}; + dataLabel: ((context: oj.ojChart.DataLabelContext) => ({insert: Element|string}|{preventDefault: boolean})); + dnd: {drag: {groups: {dataTypes: string|Array, drag: ((param0: Event)=> void), dragEnd: ((param0: Event)=> void), dragStart: ((param0: Event, param1: object)=> void)}, items: {dataTypes: string|Array, drag: ((param0: Event)=> void), dragEnd: ((param0: Event)=> void), dragStart: ((param0: Event, param1: object)=> void)}, series: {dataTypes: string|Array, drag: ((param0: Event)=> void), dragEnd: ((param0: Event)=> void), dragStart: ((param0: Event, param1: object)=> void)}}, drop: {legend: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, plotArea: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, xAxis: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, y2Axis: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, yAxis: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}}}; + dragMode: 'pan'|'zoom'|'select'|'off'|'user'; + drilling: 'on'|'seriesOnly'|'groupsOnly'|'off'; + groupComparator: ((param0: object, param1: Object)=> number)|null; + hiddenCategories: Array; + hideAndShowBehavior: 'withRescale'|'withoutRescale'|'none'; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + initialZooming: 'first'|'last'|'none'; + legend: {backgroundColor: string, borderColor: string, maxSize: string, position: 'start'|'end'|'bottom'|'top'|'auto', referenceObjectSection: {title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}, rendered: 'on'|'off'|'auto', scrolling: 'off'|'asNeeded', sections: Array<{items: Array<{borderColor: string, categories: Array, categoryVisibility: 'hidden'|'visible', color: string, id: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, markerColor: string, markerShape?: 'circle'|'diamond'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, pattern: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none', shortDesc: string, source: string, symbolType: 'line'|'lineWithMarker'|'image'|'marker', text: string}>, sections: Array, title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}>, seriesSection: {title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}, size: string, symbolHeight: number, symbolWidth: number, textStyle: object, title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}; + orientation: 'horizontal'|'vertical'; + otherThreshold: number; + overview: {content: object, height: string, rendered: 'on'|'off'}; + pieCenter: {converter: object, label: string, labelStyle: object, renderer: ((context: oj.ojChart.PieCenterContext) => ({insert: Element|string}|{preventDefault: boolean})), scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto'}; + plotArea: {backgroundColor: string, borderColor: string, borderWidth: number, rendered: 'off'|'on'}; + polarGridShape: 'polygon'|'circle'; + selection: Array; + selectionMode: 'single'|'multiple'|'none'; + seriesComparator: ((param0: object, param1: Object)=> number)|null; + sorting: 'ascending'|'descending'|'off'; + splitDualY: 'on'|'off'|'auto'; + splitterPosition: number; + stack: 'on'|'off'; + stackLabel: 'on'|'off'; + styleDefaults: {animationDownColor: string, animationDuration: number, animationIndicators: 'none'|'all', animationUpColor: string, barGapRatio: number, borderColor: string, borderWidth: number, boxPlot: {medianSvgClassName: string, medianSvgStyle: object, whiskerEndLength: string, whiskerEndSvgClassName: string, whiskerEndSvgStyle: object, whiskerSvgClassName: string, whiskerSvgStyle: object}, colors: Array, dataCursor: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, markerColor: string, markerDisplayed: 'off'|'on', markerSize: number}, dataItemGaps: string, dataLabelPosition: 'center'|'outsideSlice'|'aboveMarker'|'belowMarker'|'beforeMarker'|'afterMarker'|'insideBarEdge'|'outsideBarEdge'|'none'|'auto', dataLabelStyle: object|Array, funnelBackgroundColor: string, groupSeparators: {color: string, rendered: 'off'|'auto'}, hoverBehaviorDelay: number, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'straight'|'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'none'|'auto', lineWidth: number, markerColor: string, markerDisplayed: 'on'|'off'|'auto', markerShape?: 'auto'|'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'|string, markerSize: number, marqueeBorderColor: string, marqueeColor: string, maxBarWidth: number, otherColor: string, patterns: Array, pieFeelerColor: string, pieInnerRadius: number, selectionEffect: 'explode'|'highlightAndExplode'|'highlight', seriesEffect: 'color'|'pattern'|'gradient', shapes: Array, stackLabelStyle: object, stockFallingColor: string, stockRangeColor: string, stockRisingColor: string, stockVolumeColor: string, threeDEffect: 'on'|'off', tooltipLabelStyle: object, tooltipValueStyle: object}; + timeAxisType: 'enabled'|'mixedFrequency'|'skipGaps'|'disabled'|'auto'; + tooltip: {renderer: ((context: oj.ojChart.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + touchResponse: 'touchStart'|'auto'; + type: 'line'|'area'|'lineWithArea'|'stock'|'boxPlot'|'combo'|'pie'|'scatter'|'bubble'|'funnel'|'pyramid'|'bar'; + valueFormats: {close: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, group: {tooltipDisplay: 'off'|'auto', tooltipLabel: string|Array}, high: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, label: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto'}, low: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, open: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, q1: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, q2: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, q3: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, series: {tooltipDisplay: 'off'|'auto', tooltipLabel: string}, targetValue: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, value: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, volume: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, x: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, y: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, y2: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, z: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}}; + xAxis: {axisLine: {lineColor: string, lineWidth: number, rendered: 'off'|'on'}, baselineScaling: 'min'|'zero', dataMax: number, dataMin: number, majorTick: {baselineColor: 'inherit'|'auto', baselineStyle: 'dotted'|'dashed'|'solid', baselineWidth: number, lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, max: number|string, maxSize: string, min: number|string, minStep: number, minorStep: number, minorTick: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, referenceObjects: Array<{categories: Array, color: string, displayInLegend: 'on'|'off', high: number, id: string, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'straight', lineWidth: number, location: 'front'|'back', low: number, shortDesc: string, svgClassName: string, svgStyle: object, text: string, type: 'area'|'line', value: number}>, rendered: 'off'|'on', scale: 'log'|'linear', size: string, step: number, tickLabel: {converter: object, rendered: 'off'|'on', rotation: 'none'|'auto', scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style: object}, title: string, titleStyle: object, viewportEndGroup: number|string, viewportMax: number|string, viewportMin: number|string, viewportStartGroup: number|string}; + y2Axis: {alignTickMarks: 'off'|'on', axisLine: {lineColor: string, lineWidth: number, rendered: 'on'|'off'|'auto'}, baselineScaling: 'min'|'zero', dataMax: number, dataMin: number, majorTick: {baselineColor: 'inherit'|'auto', baselineStyle: 'dotted'|'dashed'|'solid', baselineWidth: number, lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, max: number, maxSize: string, min: number, minStep: number, minorStep: number, minorTick: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, position: 'start'|'end'|'top'|'bottom'|'auto', referenceObjects: Array<{categories: Array, color: string, displayInLegend: 'on'|'off', high: number, id: string, items: Array<{high: number, low: number, value: number, x: number|string}>, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'straight', lineWidth: number, location: 'front'|'back', low: number, shortDesc: string, svgClassName: string, svgStyle: object, text: string, type: 'area'|'line', value: number}>, rendered: 'off'|'on', scale: 'log'|'linear', size: string, step: number, tickLabel: {converter: object, position: 'inside'|'outside', rendered: 'off'|'on', scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style: object}, title: string, titleStyle: object}; + yAxis: {axisLine: {lineColor: string, lineWidth: number, rendered: 'on'|'off'|'auto'}, baselineScaling: 'min'|'zero', dataMax: number, dataMin: number, majorTick: {baselineColor: 'inherit'|'auto', baselineStyle: 'dotted'|'dashed'|'solid', baselineWidth: number, lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, max: number, maxSize: string, min: number, minStep: number, minorStep: number, minorTick: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, position: 'start'|'end'|'top'|'bottom'|'auto', referenceObjects: Array<{categories: Array, color: string, displayInLegend: 'on'|'off', high: number, id: string, items: Array<{high: number, low: number, value: number, x: number|string}>, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'straight', lineWidth: number, location: 'front'|'back', low: number, shortDesc: string, svgClassName: string, svgStyle: object, text: string, type: 'area'|'line', value: number}>, rendered: 'off'|'on', scale: 'log'|'linear', size: string, step: number, tickLabel: {converter: object, position: 'inside'|'outside', rendered: 'off'|'on', scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style: object}, title: string, titleStyle: object, viewportMax: number, viewportMin: number}; + zoomAndScroll: 'delayedScrollOnly'|'liveScrollOnly'|'delayed'|'live'|'off'; + zoomDirection: 'x'|'y'|'auto'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelClose?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelDate?: string, labelDefaultGroupName?: string, labelGroup?: string, labelHigh?: string, labelInvalidData?: string, labelLow?: string, labelNoData?: string, labelOpen?: string, labelOther?: string, labelPercentage?: string, labelQ1?: string, labelQ2?: string, labelQ3?: string, labelSeries?: string, labelTargetValue?: string, labelValue?: string, labelVolume?: string, labelX?: string, labelY?: string, labelZ?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, tooltipPan?: string, tooltipSelect?: string, tooltipZoom?: string}; + onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; + onAnimationOnDisplayChanged: (event: CustomEvent)=> any; + onAsChanged: (event: CustomEvent)=> any; + onCoordinateSystemChanged: (event: CustomEvent)=> any; + onDataChanged: (event: CustomEvent)=> any; + onDataCursorChanged: (event: CustomEvent)=> any; + onDataCursorBehaviorChanged: (event: CustomEvent)=> any; + onDataCursorPositionChanged: (event: CustomEvent)=> any; + onDataLabelChanged: (event: CustomEvent)=> any; + onDndChanged: (event: CustomEvent)=> any; + onDragModeChanged: (event: CustomEvent)=> any; + onDrillingChanged: (event: CustomEvent)=> any; + onGroupComparatorChanged: (event: CustomEvent)=> any; + onHiddenCategoriesChanged: (event: CustomEvent)=> any; + onHideAndShowBehaviorChanged: (event: CustomEvent)=> any; + onHighlightMatchChanged: (event: CustomEvent)=> any; + onHighlightedCategoriesChanged: (event: CustomEvent)=> any; + onHoverBehaviorChanged: (event: CustomEvent)=> any; + onInitialZoomingChanged: (event: CustomEvent)=> any; + onLegendChanged: (event: CustomEvent)=> any; + onOrientationChanged: (event: CustomEvent)=> any; + onOtherThresholdChanged: (event: CustomEvent)=> any; + onOverviewChanged: (event: CustomEvent)=> any; + onPieCenterChanged: (event: CustomEvent)=> any; + onPlotAreaChanged: (event: CustomEvent)=> any; + onPolarGridShapeChanged: (event: CustomEvent)=> any; + onSelectionChanged: (event: CustomEvent)=> any; + onSelectionModeChanged: (event: CustomEvent)=> any; + onSeriesComparatorChanged: (event: CustomEvent)=> any; + onSortingChanged: (event: CustomEvent)=> any; + onSplitDualYChanged: (event: CustomEvent)=> any; + onSplitterPositionChanged: (event: CustomEvent)=> any; + onStackChanged: (event: CustomEvent)=> any; + onStackLabelChanged: (event: CustomEvent)=> any; + onStyleDefaultsChanged: (event: CustomEvent)=> any; + onTimeAxisTypeChanged: (event: CustomEvent)=> any; + onTooltipChanged: (event: CustomEvent)=> any; + onTouchResponseChanged: (event: CustomEvent)=> any; + onTypeChanged: (event: CustomEvent)=> any; + onValueFormatsChanged: (event: CustomEvent)=> any; + onXAxisChanged: (event: CustomEvent)=> any; + onY2AxisChanged: (event: CustomEvent)=> any; + onYAxisChanged: (event: CustomEvent)=> any; + onZoomAndScrollChanged: (event: CustomEvent)=> any; + onZoomDirectionChanged: (event: CustomEvent)=> any; + onOjDrill: (event: oj.ojChart.ojDrill)=> any; + onOjSelectInput: (event: oj.ojChart.ojSelectInput)=> any; + onOjViewportChange: (event: oj.ojChart.ojViewportChange)=> any; + onOjViewportChangeInput: (event: oj.ojChart.ojViewportChangeInput)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojChartEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getContextByNode(node: Element): oj.ojChart.PieCenterLabelContext|oj.ojChart.LegendItemContext|oj.ojChart.ReferenceObject|oj.ojChart.GroupContext|oj.ojChart.AxisTitleContext|oj.ojChart.ItemContext|oj.ojChart.SeriesContext; + getDataItem(seriesIndex: number, groupIndex: number): object|null; + getGroup(groupIndex: string): string; + getGroupCount(): number; + getLegend(): object; + getPlotArea(): object; + getSeries(seriesIndex: string): string; + getSeriesCount(): number; + getValuesAt(x: number, y: number): object; + getXAxis(): object; + getY2Axis(): object; + getYAxis(): object; + } + namespace ojChart { + class ojDrill extends CustomEvent<{id: string, series: string, group: string, data: object, itemData: object, seriesData: object, groupData: Array, [propName: string]: any}> { + + } + + class ojSelectInput extends CustomEvent<{items: Array, selectionData: Array<{data: object, itemData: object, groupData: Array, seriesData: object}>, endGroup: string, startGroup: string, xMax: number, xMin: number, yMax: number, yMin: number, [propName: string]: any}> { + + } + + class ojViewportChange extends CustomEvent<{endGroup: string, startGroup: string, xMax: number, xMin: number, yMax: number, yMin: number, [propName: string]: any}> { + + } + + class ojViewportChangeInput extends CustomEvent<{endGroup: string, startGroup: string, xMax: number, xMin: number, yMax: number, yMin: number, [propName: string]: any}> { + + } + } + interface ojChartEventMap extends oj.dvtBaseComponentEventMap { + 'ojDrill': oj.ojChart.ojDrill; + 'ojSelectInput': oj.ojChart.ojSelectInput; + 'ojViewportChange': oj.ojChart.ojViewportChange; + 'ojViewportChangeInput': oj.ojChart.ojViewportChangeInput; + 'animationOnDataChangeChanged': CustomEvent; + 'animationOnDisplayChanged': CustomEvent; + 'asChanged': CustomEvent; + 'coordinateSystemChanged': CustomEvent; + 'dataChanged': CustomEvent; + 'dataCursorChanged': CustomEvent; + 'dataCursorBehaviorChanged': CustomEvent; + 'dataCursorPositionChanged': CustomEvent; + 'dataLabelChanged': CustomEvent; + 'dndChanged': CustomEvent; + 'dragModeChanged': CustomEvent; + 'drillingChanged': CustomEvent; + 'groupComparatorChanged': CustomEvent; + 'hiddenCategoriesChanged': CustomEvent; + 'hideAndShowBehaviorChanged': CustomEvent; + 'highlightMatchChanged': CustomEvent; + 'highlightedCategoriesChanged': CustomEvent; + 'hoverBehaviorChanged': CustomEvent; + 'initialZoomingChanged': CustomEvent; + 'legendChanged': CustomEvent; + 'orientationChanged': CustomEvent; + 'otherThresholdChanged': CustomEvent; + 'overviewChanged': CustomEvent; + 'pieCenterChanged': CustomEvent; + 'plotAreaChanged': CustomEvent; + 'polarGridShapeChanged': CustomEvent; + 'selectionChanged': CustomEvent; + 'selectionModeChanged': CustomEvent; + 'seriesComparatorChanged': CustomEvent; + 'sortingChanged': CustomEvent; + 'splitDualYChanged': CustomEvent; + 'splitterPositionChanged': CustomEvent; + 'stackChanged': CustomEvent; + 'stackLabelChanged': CustomEvent; + 'styleDefaultsChanged': CustomEvent; + 'timeAxisTypeChanged': CustomEvent; + 'tooltipChanged': CustomEvent; + 'touchResponseChanged': CustomEvent; + 'typeChanged': CustomEvent; + 'valueFormatsChanged': CustomEvent; + 'xAxisChanged': CustomEvent; + 'y2AxisChanged': CustomEvent; + 'yAxisChanged': CustomEvent; + 'zoomAndScrollChanged': CustomEvent; + 'zoomDirectionChanged': CustomEvent; + } + interface ojChartSettableProperties extends dvtBaseComponentSettableProperties { + animationOnDataChange: 'auto'|'slideToLeft'|'slideToRight'|'none'; + animationOnDisplay: 'auto'|'alphaFade'|'zoom'|'none'; + as: string; + coordinateSystem: 'polar'|'cartesian'; + data: oj.DataProvider|null; + dataCursor: 'off'|'on'|'auto'; + dataCursorBehavior: 'smooth'|'snap'|'auto'; + dataCursorPosition: {x: number|string, y: number, y2: number}; + dataLabel: ((context: oj.ojChart.DataLabelContext) => ({insert: Element|string}|{preventDefault: boolean})); + dnd: {drag: {groups: {dataTypes: string|Array, drag: ((param0: Event)=> void), dragEnd: ((param0: Event)=> void), dragStart: ((param0: Event, param1: object)=> void)}, items: {dataTypes: string|Array, drag: ((param0: Event)=> void), dragEnd: ((param0: Event)=> void), dragStart: ((param0: Event, param1: object)=> void)}, series: {dataTypes: string|Array, drag: ((param0: Event)=> void), dragEnd: ((param0: Event)=> void), dragStart: ((param0: Event, param1: object)=> void)}}, drop: {legend: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, plotArea: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, xAxis: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, y2Axis: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, yAxis: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}}}; + dragMode: 'pan'|'zoom'|'select'|'off'|'user'; + drilling: 'on'|'seriesOnly'|'groupsOnly'|'off'; + groupComparator: ((param0: object, param1: Object)=> number)|null; + hiddenCategories: Array; + hideAndShowBehavior: 'withRescale'|'withoutRescale'|'none'; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + initialZooming: 'first'|'last'|'none'; + legend: {backgroundColor: string, borderColor: string, maxSize: string, position: 'start'|'end'|'bottom'|'top'|'auto', referenceObjectSection: {title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}, rendered: 'on'|'off'|'auto', scrolling: 'off'|'asNeeded', sections: Array<{items: Array<{borderColor: string, categories: Array, categoryVisibility: 'hidden'|'visible', color: string, id: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, markerColor: string, markerShape?: 'circle'|'diamond'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, pattern: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none', shortDesc: string, source: string, symbolType: 'line'|'lineWithMarker'|'image'|'marker', text: string}>, sections: Array, title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}>, seriesSection: {title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}, size: string, symbolHeight: number, symbolWidth: number, textStyle: object, title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}; + orientation: 'horizontal'|'vertical'; + otherThreshold: number; + overview: {content: object, height: string, rendered: 'on'|'off'}; + pieCenter: {converter: object, label: string, labelStyle: object, renderer: ((context: oj.ojChart.PieCenterContext) => ({insert: Element|string}|{preventDefault: boolean})), scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto'}; + plotArea: {backgroundColor: string, borderColor: string, borderWidth: number, rendered: 'off'|'on'}; + polarGridShape: 'polygon'|'circle'; + selection: Array; + selectionMode: 'single'|'multiple'|'none'; + seriesComparator: ((param0: object, param1: Object)=> number)|null; + sorting: 'ascending'|'descending'|'off'; + splitDualY: 'on'|'off'|'auto'; + splitterPosition: number; + stack: 'on'|'off'; + stackLabel: 'on'|'off'; + styleDefaults: {animationDownColor: string, animationDuration: number, animationIndicators: 'none'|'all', animationUpColor: string, barGapRatio: number, borderColor: string, borderWidth: number, boxPlot: {medianSvgClassName: string, medianSvgStyle: object, whiskerEndLength: string, whiskerEndSvgClassName: string, whiskerEndSvgStyle: object, whiskerSvgClassName: string, whiskerSvgStyle: object}, colors: Array, dataCursor: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, markerColor: string, markerDisplayed: 'off'|'on', markerSize: number}, dataItemGaps: string, dataLabelPosition: 'center'|'outsideSlice'|'aboveMarker'|'belowMarker'|'beforeMarker'|'afterMarker'|'insideBarEdge'|'outsideBarEdge'|'none'|'auto', dataLabelStyle: object|Array, funnelBackgroundColor: string, groupSeparators: {color: string, rendered: 'off'|'auto'}, hoverBehaviorDelay: number, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'straight'|'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'none'|'auto', lineWidth: number, markerColor: string, markerDisplayed: 'on'|'off'|'auto', markerShape?: 'auto'|'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'|string, markerSize: number, marqueeBorderColor: string, marqueeColor: string, maxBarWidth: number, otherColor: string, patterns: Array, pieFeelerColor: string, pieInnerRadius: number, selectionEffect: 'explode'|'highlightAndExplode'|'highlight', seriesEffect: 'color'|'pattern'|'gradient', shapes: Array, stackLabelStyle: object, stockFallingColor: string, stockRangeColor: string, stockRisingColor: string, stockVolumeColor: string, threeDEffect: 'on'|'off', tooltipLabelStyle: object, tooltipValueStyle: object}; + timeAxisType: 'enabled'|'mixedFrequency'|'skipGaps'|'disabled'|'auto'; + tooltip: {renderer: ((context: oj.ojChart.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + touchResponse: 'touchStart'|'auto'; + type: 'line'|'area'|'lineWithArea'|'stock'|'boxPlot'|'combo'|'pie'|'scatter'|'bubble'|'funnel'|'pyramid'|'bar'; + valueFormats: {close: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, group: {tooltipDisplay: 'off'|'auto', tooltipLabel: string|Array}, high: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, label: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto'}, low: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, open: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, q1: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, q2: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, q3: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, series: {tooltipDisplay: 'off'|'auto', tooltipLabel: string}, targetValue: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, value: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, volume: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, x: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, y: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, y2: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, z: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}}; + xAxis: {axisLine: {lineColor: string, lineWidth: number, rendered: 'off'|'on'}, baselineScaling: 'min'|'zero', dataMax: number, dataMin: number, majorTick: {baselineColor: 'inherit'|'auto', baselineStyle: 'dotted'|'dashed'|'solid', baselineWidth: number, lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, max: number|string, maxSize: string, min: number|string, minStep: number, minorStep: number, minorTick: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, referenceObjects: Array<{categories: Array, color: string, displayInLegend: 'on'|'off', high: number, id: string, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'straight', lineWidth: number, location: 'front'|'back', low: number, shortDesc: string, svgClassName: string, svgStyle: object, text: string, type: 'area'|'line', value: number}>, rendered: 'off'|'on', scale: 'log'|'linear', size: string, step: number, tickLabel: {converter: object, rendered: 'off'|'on', rotation: 'none'|'auto', scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style: object}, title: string, titleStyle: object, viewportEndGroup: number|string, viewportMax: number|string, viewportMin: number|string, viewportStartGroup: number|string}; + y2Axis: {alignTickMarks: 'off'|'on', axisLine: {lineColor: string, lineWidth: number, rendered: 'on'|'off'|'auto'}, baselineScaling: 'min'|'zero', dataMax: number, dataMin: number, majorTick: {baselineColor: 'inherit'|'auto', baselineStyle: 'dotted'|'dashed'|'solid', baselineWidth: number, lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, max: number, maxSize: string, min: number, minStep: number, minorStep: number, minorTick: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, position: 'start'|'end'|'top'|'bottom'|'auto', referenceObjects: Array<{categories: Array, color: string, displayInLegend: 'on'|'off', high: number, id: string, items: Array<{high: number, low: number, value: number, x: number|string}>, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'straight', lineWidth: number, location: 'front'|'back', low: number, shortDesc: string, svgClassName: string, svgStyle: object, text: string, type: 'area'|'line', value: number}>, rendered: 'off'|'on', scale: 'log'|'linear', size: string, step: number, tickLabel: {converter: object, position: 'inside'|'outside', rendered: 'off'|'on', scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style: object}, title: string, titleStyle: object}; + yAxis: {axisLine: {lineColor: string, lineWidth: number, rendered: 'on'|'off'|'auto'}, baselineScaling: 'min'|'zero', dataMax: number, dataMin: number, majorTick: {baselineColor: 'inherit'|'auto', baselineStyle: 'dotted'|'dashed'|'solid', baselineWidth: number, lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, max: number, maxSize: string, min: number, minStep: number, minorStep: number, minorTick: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, position: 'start'|'end'|'top'|'bottom'|'auto', referenceObjects: Array<{categories: Array, color: string, displayInLegend: 'on'|'off', high: number, id: string, items: Array<{high: number, low: number, value: number, x: number|string}>, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'straight', lineWidth: number, location: 'front'|'back', low: number, shortDesc: string, svgClassName: string, svgStyle: object, text: string, type: 'area'|'line', value: number}>, rendered: 'off'|'on', scale: 'log'|'linear', size: string, step: number, tickLabel: {converter: object, position: 'inside'|'outside', rendered: 'off'|'on', scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style: object}, title: string, titleStyle: object, viewportMax: number, viewportMin: number}; + zoomAndScroll: 'delayedScrollOnly'|'liveScrollOnly'|'delayed'|'live'|'off'; + zoomDirection: 'x'|'y'|'auto'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelClose?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelDate?: string, labelDefaultGroupName?: string, labelGroup?: string, labelHigh?: string, labelInvalidData?: string, labelLow?: string, labelNoData?: string, labelOpen?: string, labelOther?: string, labelPercentage?: string, labelQ1?: string, labelQ2?: string, labelQ3?: string, labelSeries?: string, labelTargetValue?: string, labelValue?: string, labelVolume?: string, labelX?: string, labelY?: string, labelZ?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, tooltipPan?: string, tooltipSelect?: string, tooltipZoom?: string}; + } + namespace ojChart { + type AxisTitleContext = + { + axis: 'xAxis'|'yAxis'|'y2Axis', subId: string + } + } + namespace ojChart { + type DataLabelContext = + { + id: any, series: string, group: string|Array, value: number, targetValue: number, x: number|string, y: number, z: number, low: number, high: number, open: number, close: number, volume: number, label: string, totalValue: number, data: object|null, itemData: object|null, seriesData: object|null, groupData: object|null, componentElement: Element + } + } + namespace ojChart { + type GroupContext = + { + indexPath: Array, subId: string + } + } + namespace ojChart { + type ItemContext = + { + seriesIndex: number, itemIndex: number, subId: string + } + } + namespace ojChart { + type LegendItemContext = + { + sectionIndexPath: Array, itemIndex: number, subId: string + } + } + namespace ojChart { + type PieCenterContext = + { + outerBounds: object, innerBounds: object, label: string, componentElement: Element + } + } + namespace ojChart { + type PieCenterLabelContext = + { + subId: string + } + } + namespace ojChart { + type ReferenceObject = + { + axis: 'xAxis'|'yAxis'|'y2Axis', index: number, subId: string + } + } + namespace ojChart { + type SeriesContext = + { + itemIndex: number, subId: string + } + } + namespace ojChart { + type TooltipContext = + { + parentElement: Element, id: any, series: string, group: string|Array, label: string, value: number, x: number|string, y: number, z: number, low: number, high: number, open: number, close: number, volume: number, targetValue: number, data: object|null, itemData: object|null, seriesData: object|null, groupData: object|null, componentElement: Element, color: string + } + } + +} +declare namespace oj { + class ojChartGroup extends JetElement { + drilling?: 'on'|'off'|'inherit'; + labelStyle?: object; + name?: string; + shortDesc?: string; + onDrillingChanged: (event: CustomEvent)=> any; + onLabelStyleChanged: (event: CustomEvent)=> any; + onNameChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojChartGroupEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojChartGroupEventMap extends oj.JetElementEventMap { + 'drillingChanged': CustomEvent; + 'labelStyleChanged': CustomEvent; + 'nameChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + } + interface ojChartGroupSettableProperties extends JetSettableProperties { + drilling?: 'on'|'off'|'inherit'; + labelStyle?: object; + name?: string; + shortDesc?: string; + } + +} +declare namespace oj { + class ojChartItem extends JetElement { + borderColor?: string; + borderWidth?: number; + boxPlot?: {medianSvgClassName?: string, medianSvgStyle?: object, q2Color?: string, q2SvgClassName?: string, q2SvgStyle?: object, q3SvgClassName?: string, q3SvgStyle?: object, whiskerEndLength?: string, whiskerEndSvgClassName?: string, whiskerEndSvgStyle?: object, whiskerSvgClassName?: string, whiskerSvgStyle?: object}; + categories?: Array; + close?: number; + color?: string; + drilling?: 'on'|'off'|'inherit'; + groupId: Array; + high?: number; + items?: Array|Array; + label?: string|Array; + labelPosition?: 'center'|'outsideSlice'|'aboveMarker'|'belowMarker'|'beforeMarker'|'afterMarker'|'insideBarEdge'|'outsideBarEdge'|'none'|'auto'; + labelStyle?: object|Array; + low?: number; + markerDisplayed?: 'on'|'off'|'auto'; + markerShape?: 'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'|'auto'|string; + markerSize?: number; + open?: number; + pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'auto'; + q1?: number; + q2?: number; + q3?: number; + seriesId: string; + shortDesc?: string; + source?: string; + sourceHover?: string; + sourceHoverSelected?: string; + sourceSelected?: string; + svgClassName?: string; + svgStyle?: object; + targetValue?: number; + value?: number; + volume?: number; + x?: number|string; + y?: number; + z?: number; + onBorderColorChanged: (event: CustomEvent)=> any; + onBorderWidthChanged: (event: CustomEvent)=> any; + onBoxPlotChanged: (event: CustomEvent)=> any; + onCategoriesChanged: (event: CustomEvent)=> any; + onCloseChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onDrillingChanged: (event: CustomEvent)=> any; + onGroupIdChanged: (event: CustomEvent)=> any; + onHighChanged: (event: CustomEvent)=> any; + onItemsChanged: (event: CustomEvent)=> any; + onLabelChanged: (event: CustomEvent)=> any; + onLabelPositionChanged: (event: CustomEvent)=> any; + onLabelStyleChanged: (event: CustomEvent)=> any; + onLowChanged: (event: CustomEvent)=> any; + onMarkerDisplayedChanged: (event: CustomEvent)=> any; + onMarkerShapeChanged: (event: CustomEvent)=> any; + onMarkerSizeChanged: (event: CustomEvent)=> any; + onOpenChanged: (event: CustomEvent)=> any; + onPatternChanged: (event: CustomEvent)=> any; + onQ1Changed: (event: CustomEvent)=> any; + onQ2Changed: (event: CustomEvent)=> any; + onQ3Changed: (event: CustomEvent)=> any; + onSeriesIdChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onSourceChanged: (event: CustomEvent)=> any; + onSourceHoverChanged: (event: CustomEvent)=> any; + onSourceHoverSelectedChanged: (event: CustomEvent)=> any; + onSourceSelectedChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onTargetValueChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onVolumeChanged: (event: CustomEvent)=> any; + onXChanged: (event: CustomEvent)=> any; + onYChanged: (event: CustomEvent)=> any; + onZChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojChartItemEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojChartItemEventMap extends oj.JetElementEventMap { + 'borderColorChanged': CustomEvent; + 'borderWidthChanged': CustomEvent; + 'boxPlotChanged': CustomEvent; + 'categoriesChanged': CustomEvent; + 'closeChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'drillingChanged': CustomEvent; + 'groupIdChanged': CustomEvent; + 'highChanged': CustomEvent; + 'itemsChanged': CustomEvent; + 'labelChanged': CustomEvent; + 'labelPositionChanged': CustomEvent; + 'labelStyleChanged': CustomEvent; + 'lowChanged': CustomEvent; + 'markerDisplayedChanged': CustomEvent; + 'markerShapeChanged': CustomEvent; + 'markerSizeChanged': CustomEvent; + 'openChanged': CustomEvent; + 'patternChanged': CustomEvent; + 'q1Changed': CustomEvent; + 'q2Changed': CustomEvent; + 'q3Changed': CustomEvent; + 'seriesIdChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'sourceChanged': CustomEvent; + 'sourceHoverChanged': CustomEvent; + 'sourceHoverSelectedChanged': CustomEvent; + 'sourceSelectedChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'targetValueChanged': CustomEvent; + 'valueChanged': CustomEvent; + 'volumeChanged': CustomEvent; + 'xChanged': CustomEvent; + 'yChanged': CustomEvent; + 'zChanged': CustomEvent; + } + interface ojChartItemSettableProperties extends JetSettableProperties { + borderColor?: string; + borderWidth?: number; + boxPlot?: {medianSvgClassName?: string, medianSvgStyle?: object, q2Color?: string, q2SvgClassName?: string, q2SvgStyle?: object, q3SvgClassName?: string, q3SvgStyle?: object, whiskerEndLength?: string, whiskerEndSvgClassName?: string, whiskerEndSvgStyle?: object, whiskerSvgClassName?: string, whiskerSvgStyle?: object}; + categories?: Array; + close?: number; + color?: string; + drilling?: 'on'|'off'|'inherit'; + groupId: Array; + high?: number; + items?: Array|Array; + label?: string|Array; + labelPosition?: 'center'|'outsideSlice'|'aboveMarker'|'belowMarker'|'beforeMarker'|'afterMarker'|'insideBarEdge'|'outsideBarEdge'|'none'|'auto'; + labelStyle?: object|Array; + low?: number; + markerDisplayed?: 'on'|'off'|'auto'; + markerShape?: 'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'|'auto'|string; + markerSize?: number; + open?: number; + pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'auto'; + q1?: number; + q2?: number; + q3?: number; + seriesId: string; + shortDesc?: string; + source?: string; + sourceHover?: string; + sourceHoverSelected?: string; + sourceSelected?: string; + svgClassName?: string; + svgStyle?: object; + targetValue?: number; + value?: number; + volume?: number; + x?: number|string; + y?: number; + z?: number; + } + +} +declare namespace oj { + class ojChartSeries extends JetElement { + areaColor?: string; + areaSvgClassName?: string; + areaSvgStyle?: object; + assignedToY2?: 'on'|'off'; + borderColor?: string; + borderWidth?: number; + boxPlot?: {medianSvgClassName?: string, medianSvgStyle?: object, q2Color?: string, q2SvgClassName?: string, q2SvgStyle?: object, q3Color?: string, q3SvgClassName?: string, q3SvgStyle?: object, whiskerEndLength?: string, whiskerEndSvgClassName?: string, whiskerEndSvgStyle?: object, whiskerSvgClassName?: string, whiskerSvgStyle?: object}; + categories?: Array; + color?: string; + displayInLegend?: 'on'|'off'|'auto'; + drilling?: 'on'|'off'|'inherit'; + lineStyle?: 'dotted'|'dashed'|'solid'; + lineType?: 'straight'|'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'none'|'auto'; + lineWidth?: number; + markerColor?: string; + markerDisplayed?: 'on'|'off'|'auto'; + markerShape?: 'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'|'auto'|string; + markerSize?: number; + markerSvgClassName?: string; + markerSvgStyle?: object; + name?: string; + pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'auto'; + pieSliceExplode?: number; + shortDesc?: string; + source?: string; + sourceHover?: string; + sourceHoverSelected?: string; + sourceSelected?: string; + stackCategory?: string; + svgClassName?: string; + svgStyle?: object; + type?: 'bar'|'line'|'area'|'lineWithArea'|'candlestick'|'boxPlot'|'auto'; + onAreaColorChanged: (event: CustomEvent)=> any; + onAreaSvgClassNameChanged: (event: CustomEvent)=> any; + onAreaSvgStyleChanged: (event: CustomEvent)=> any; + onAssignedToY2Changed: (event: CustomEvent)=> any; + onBorderColorChanged: (event: CustomEvent)=> any; + onBorderWidthChanged: (event: CustomEvent)=> any; + onBoxPlotChanged: (event: CustomEvent)=> any; + onCategoriesChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onDisplayInLegendChanged: (event: CustomEvent)=> any; + onDrillingChanged: (event: CustomEvent)=> any; + onLineStyleChanged: (event: CustomEvent)=> any; + onLineTypeChanged: (event: CustomEvent)=> any; + onLineWidthChanged: (event: CustomEvent)=> any; + onMarkerColorChanged: (event: CustomEvent)=> any; + onMarkerDisplayedChanged: (event: CustomEvent)=> any; + onMarkerShapeChanged: (event: CustomEvent)=> any; + onMarkerSizeChanged: (event: CustomEvent)=> any; + onMarkerSvgClassNameChanged: (event: CustomEvent)=> any; + onMarkerSvgStyleChanged: (event: CustomEvent)=> any; + onNameChanged: (event: CustomEvent)=> any; + onPatternChanged: (event: CustomEvent)=> any; + onPieSliceExplodeChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onSourceChanged: (event: CustomEvent)=> any; + onSourceHoverChanged: (event: CustomEvent)=> any; + onSourceHoverSelectedChanged: (event: CustomEvent)=> any; + onSourceSelectedChanged: (event: CustomEvent)=> any; + onStackCategoryChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onTypeChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojChartSeriesEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojChartSeriesEventMap extends oj.JetElementEventMap { + 'areaColorChanged': CustomEvent; + 'areaSvgClassNameChanged': CustomEvent; + 'areaSvgStyleChanged': CustomEvent; + 'assignedToY2Changed': CustomEvent; + 'borderColorChanged': CustomEvent; + 'borderWidthChanged': CustomEvent; + 'boxPlotChanged': CustomEvent; + 'categoriesChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'displayInLegendChanged': CustomEvent; + 'drillingChanged': CustomEvent; + 'lineStyleChanged': CustomEvent; + 'lineTypeChanged': CustomEvent; + 'lineWidthChanged': CustomEvent; + 'markerColorChanged': CustomEvent; + 'markerDisplayedChanged': CustomEvent; + 'markerShapeChanged': CustomEvent; + 'markerSizeChanged': CustomEvent; + 'markerSvgClassNameChanged': CustomEvent; + 'markerSvgStyleChanged': CustomEvent; + 'nameChanged': CustomEvent; + 'patternChanged': CustomEvent; + 'pieSliceExplodeChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'sourceChanged': CustomEvent; + 'sourceHoverChanged': CustomEvent; + 'sourceHoverSelectedChanged': CustomEvent; + 'sourceSelectedChanged': CustomEvent; + 'stackCategoryChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'typeChanged': CustomEvent; + } + interface ojChartSeriesSettableProperties extends JetSettableProperties { + areaColor?: string; + areaSvgClassName?: string; + areaSvgStyle?: object; + assignedToY2?: 'on'|'off'; + borderColor?: string; + borderWidth?: number; + boxPlot?: {medianSvgClassName?: string, medianSvgStyle?: object, q2Color?: string, q2SvgClassName?: string, q2SvgStyle?: object, q3Color?: string, q3SvgClassName?: string, q3SvgStyle?: object, whiskerEndLength?: string, whiskerEndSvgClassName?: string, whiskerEndSvgStyle?: object, whiskerSvgClassName?: string, whiskerSvgStyle?: object}; + categories?: Array; + color?: string; + displayInLegend?: 'on'|'off'|'auto'; + drilling?: 'on'|'off'|'inherit'; + lineStyle?: 'dotted'|'dashed'|'solid'; + lineType?: 'straight'|'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'none'|'auto'; + lineWidth?: number; + markerColor?: string; + markerDisplayed?: 'on'|'off'|'auto'; + markerShape?: 'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'|'auto'|string; + markerSize?: number; + markerSvgClassName?: string; + markerSvgStyle?: object; + name?: string; + pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'auto'; + pieSliceExplode?: number; + shortDesc?: string; + source?: string; + sourceHover?: string; + sourceHoverSelected?: string; + sourceSelected?: string; + stackCategory?: string; + svgClassName?: string; + svgStyle?: object; + type?: 'bar'|'line'|'area'|'lineWithArea'|'candlestick'|'boxPlot'|'auto'; + } + +} +declare namespace oj { + class ojSparkChart extends dvtBaseComponent> { + animationDuration: number|null; + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + areaColor: string; + areaSvgClassName: string; + areaSvgStyle: object; + as: string; + barGapRatio: number; + baselineScaling: 'zero'|'min'; + color: string; + data: oj.DataProvider|null; + firstColor: string; + highColor: string; + lastColor: string; + lineStyle: 'dotted'|'dashed'|'solid'; + lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'none'|'straight'; + lineWidth: number; + lowColor: string; + markerShape: 'square'|'circle'|'diamond'|'plus'|'triangleDown'|'triangleUp'|'human'|'star'|'auto'; + markerSize: number; + referenceObjects: Array; + svgClassName: string; + svgStyle: object; + tooltip: {renderer: ((context: oj.ojSparkChart.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))|null}; + type: 'area'|'lineWithArea'|'bar'|'line'; + visualEffects: 'none'|'auto'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + onAnimationDurationChanged: (event: CustomEvent)=> any; + onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; + onAnimationOnDisplayChanged: (event: CustomEvent)=> any; + onAreaColorChanged: (event: CustomEvent)=> any; + onAreaSvgClassNameChanged: (event: CustomEvent)=> any; + onAreaSvgStyleChanged: (event: CustomEvent)=> any; + onAsChanged: (event: CustomEvent)=> any; + onBarGapRatioChanged: (event: CustomEvent)=> any; + onBaselineScalingChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onDataChanged: (event: CustomEvent)=> any; + onFirstColorChanged: (event: CustomEvent)=> any; + onHighColorChanged: (event: CustomEvent)=> any; + onLastColorChanged: (event: CustomEvent)=> any; + onLineStyleChanged: (event: CustomEvent)=> any; + onLineTypeChanged: (event: CustomEvent)=> any; + onLineWidthChanged: (event: CustomEvent)=> any; + onLowColorChanged: (event: CustomEvent)=> any; + onMarkerShapeChanged: (event: CustomEvent)=> any; + onMarkerSizeChanged: (event: CustomEvent)=> any; + onReferenceObjectsChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onTooltipChanged: (event: CustomEvent)=> any; + onTypeChanged: (event: CustomEvent)=> any; + onVisualEffectsChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSparkChartEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getDataItem(itemIndex: number): oj.ojSparkChart.ItemContext|null; + } + interface ojSparkChartEventMap extends oj.dvtBaseComponentEventMap { + 'animationDurationChanged': CustomEvent; + 'animationOnDataChangeChanged': CustomEvent; + 'animationOnDisplayChanged': CustomEvent; + 'areaColorChanged': CustomEvent; + 'areaSvgClassNameChanged': CustomEvent; + 'areaSvgStyleChanged': CustomEvent; + 'asChanged': CustomEvent; + 'barGapRatioChanged': CustomEvent; + 'baselineScalingChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'dataChanged': CustomEvent; + 'firstColorChanged': CustomEvent; + 'highColorChanged': CustomEvent; + 'lastColorChanged': CustomEvent; + 'lineStyleChanged': CustomEvent; + 'lineTypeChanged': CustomEvent; + 'lineWidthChanged': CustomEvent; + 'lowColorChanged': CustomEvent; + 'markerShapeChanged': CustomEvent; + 'markerSizeChanged': CustomEvent; + 'referenceObjectsChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'tooltipChanged': CustomEvent; + 'typeChanged': CustomEvent; + 'visualEffectsChanged': CustomEvent; + } + interface ojSparkChartSettableProperties extends dvtBaseComponentSettableProperties { + animationDuration: number|null; + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + areaColor: string; + areaSvgClassName: string; + areaSvgStyle: object; + as: string; + barGapRatio: number; + baselineScaling: 'zero'|'min'; + color: string; + data: oj.DataProvider|null; + firstColor: string; + highColor: string; + lastColor: string; + lineStyle: 'dotted'|'dashed'|'solid'; + lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'none'|'straight'; + lineWidth: number; + lowColor: string; + markerShape: 'square'|'circle'|'diamond'|'plus'|'triangleDown'|'triangleUp'|'human'|'star'|'auto'; + markerSize: number; + referenceObjects: Array; + svgClassName: string; + svgStyle: object; + tooltip: {renderer: ((context: oj.ojSparkChart.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))|null}; + type: 'area'|'lineWithArea'|'bar'|'line'; + visualEffects: 'none'|'auto'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + } + namespace ojSparkChart { + type Item = + { + borderColor: string, color: string, date: Date, high: number, low: number, markerDisplayed: 'on'|'off', markerShape: 'square'|'circle'|'diamond'|'plus'|'triangleDown'|'triangleUp'|'human'|'star'|'auto'|string, markerSize: number, svgClassName: string, svgStyle: object, value: number + } + } + namespace ojSparkChart { + type ItemContext = + { + borderColor: string, color: string, date: Date, high: number, low: number, value: number + } + } + namespace ojSparkChart { + type ReferenceObject = + { + color?: string, high?: number, lineWidth?: number, lineStyle: 'dotted'|'dashed'|'solid', location: 'front'|'back', low?: number, svgClassName?: string, svgStyle?: object, type: 'area'|'line', value?: number + } + } + namespace ojSparkChart { + type TooltipContext = + { + color: string, componentElement: Element, parentElement: Element + } + } + +} +declare namespace oj { + class ojSparkChartItem extends JetElement { + borderColor: string; + color: string; + date: string; + high: number|null; + low: number|null; + markerDisplayed: 'off'|'on'; + markerShape: 'auto'|'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'; + markerSize: number; + svgClassName: string; + svgStyle: object; + value: number|null; + onBorderColorChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onDateChanged: (event: CustomEvent)=> any; + onHighChanged: (event: CustomEvent)=> any; + onLowChanged: (event: CustomEvent)=> any; + onMarkerDisplayedChanged: (event: CustomEvent)=> any; + onMarkerShapeChanged: (event: CustomEvent)=> any; + onMarkerSizeChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSparkChartItemEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojSparkChartItemEventMap extends oj.JetElementEventMap { + 'borderColorChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'dateChanged': CustomEvent; + 'highChanged': CustomEvent; + 'lowChanged': CustomEvent; + 'markerDisplayedChanged': CustomEvent; + 'markerShapeChanged': CustomEvent; + 'markerSizeChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojSparkChartItemSettableProperties extends JetSettableProperties { + borderColor: string; + color: string; + date: string; + high: number|null; + low: number|null; + markerDisplayed: 'off'|'on'; + markerShape: 'auto'|'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'; + markerSize: number; + svgClassName: string; + svgStyle: object; + value: number|null; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojcheckboxset/index.d.ts b/types/@oracle/oraclejet/ojs/ojcheckboxset/index.d.ts new file mode 100644 index 0000000000..6972efe009 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojcheckboxset/index.d.ts @@ -0,0 +1,47 @@ +/// +declare namespace oj { + class ojCheckboxset extends editableValue, ojCheckboxsetSettableProperties> { + disabled: boolean; + labelledBy: string|null; + required: boolean; + value: Array; + translations: {required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; + onDisabledChanged: (event: CustomEvent)=> any; + onLabelledByChanged: (event: CustomEvent)=> any; + onRequiredChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojCheckboxset.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojCheckboxset.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojCheckboxsetEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + validate(): Promise; + } + namespace ojCheckboxset { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojCheckboxsetEventMap extends oj.editableValueEventMap { + 'ojAnimateEnd': oj.ojCheckboxset.ojAnimateEnd; + 'ojAnimateStart': oj.ojCheckboxset.ojAnimateStart; + 'disabledChanged': CustomEvent; + 'labelledByChanged': CustomEvent; + 'requiredChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojCheckboxsetSettableProperties extends editableValueSettableProperties> { + disabled: boolean; + labelledBy: string|null; + required: boolean; + value: Array; + translations: {required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojcollapsible/index.d.ts b/types/@oracle/oraclejet/ojs/ojcollapsible/index.d.ts new file mode 100644 index 0000000000..4784d83c1c --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojcollapsible/index.d.ts @@ -0,0 +1,52 @@ +/// +declare namespace oj { + class ojCollapsible extends baseComponent { + disabled: boolean; + expandArea: 'header'|'disclosureIcon'; + expanded: boolean; + onDisabledChanged: (event: CustomEvent)=> any; + onExpandAreaChanged: (event: CustomEvent)=> any; + onExpandedChanged: (event: CustomEvent)=> any; + onOjBeforeCollapse: (event: oj.ojCollapsible.ojBeforeCollapse)=> any; + onOjBeforeExpand: (event: oj.ojCollapsible.ojBeforeExpand)=> any; + onOjCollapse: (event: oj.ojCollapsible.ojCollapse)=> any; + onOjExpand: (event: oj.ojCollapsible.ojExpand)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojCollapsibleEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + } + namespace ojCollapsible { + class ojBeforeCollapse extends CustomEvent<{header: Element, content: Element, [propName: string]: any}> { + + } + + class ojBeforeExpand extends CustomEvent<{header: Element, content: Element, [propName: string]: any}> { + + } + + class ojCollapse extends CustomEvent<{header: Element, content: Element, [propName: string]: any}> { + + } + + class ojExpand extends CustomEvent<{header: Element, content: Element, [propName: string]: any}> { + + } + } + interface ojCollapsibleEventMap extends oj.baseComponentEventMap { + 'ojBeforeCollapse': oj.ojCollapsible.ojBeforeCollapse; + 'ojBeforeExpand': oj.ojCollapsible.ojBeforeExpand; + 'ojCollapse': oj.ojCollapsible.ojCollapse; + 'ojExpand': oj.ojCollapsible.ojExpand; + 'disabledChanged': CustomEvent; + 'expandAreaChanged': CustomEvent; + 'expandedChanged': CustomEvent; + } + interface ojCollapsibleSettableProperties extends baseComponentSettableProperties { + disabled: boolean; + expandArea: 'header'|'disclosureIcon'; + expanded: boolean; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojcollectiondataprovider/index.d.ts b/types/@oracle/oraclejet/ojs/ojcollectiondataprovider/index.d.ts new file mode 100644 index 0000000000..08bd5b25c8 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojcollectiondataprovider/index.d.ts @@ -0,0 +1,17 @@ +/// +declare namespace oj { + class CollectionDataProvider implements DataProvider { + constructor(collection: oj.Collection); + addEventListener(eventType: string, listener: EventListener): void + containsKeys(params: FetchByKeysParameters): Promise> + dispatchEvent(evt: Event): boolean + fetchByKeys(params: FetchByKeysParameters): Promise> + fetchByOffset(params: FetchByOffsetParameters): Promise> + fetchFirst>(params?: FetchListParameters): AsyncIterable + getCapability(capabilityName?: string): any + getTotalSize(): Promise; + isEmpty(): 'yes'|'no'|'unknown'; + removeEventListener(eventType: string, listener: EventListener): void + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojcolor/index.d.ts b/types/@oracle/oraclejet/ojs/ojcolor/index.d.ts new file mode 100644 index 0000000000..0c8397621c --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojcolor/index.d.ts @@ -0,0 +1,179 @@ +declare namespace oj { + class Color { + static ALICEBLUE: oj.Color; + static ANTIQUEWHITE: oj.Color; + static AQUA: oj.Color; + static AQUAMARINE: oj.Color; + static AZURE: oj.Color; + static BEIGE: oj.Color; + static BISQUE: oj.Color; + static BLACK: oj.Color; + static BLANCHEDALMOND: oj.Color; + static BLUE: oj.Color; + static BLUEVIOLET: oj.Color; + static BROWN: oj.Color; + static BURLYWOOD: oj.Color; + static CADETBLUE: oj.Color; + static CHARTREUSE: oj.Color; + static CHOCOLATE: oj.Color; + static CORAL: oj.Color; + static CORNFLOWERBLUE: oj.Color; + static CORNSILK: oj.Color; + static CRIMSON: oj.Color; + static CYAN: oj.Color; + static DARKBLUE: oj.Color; + static DARKCYAN: oj.Color; + static DARKGOLDENROD: oj.Color; + static DARKGRAY: oj.Color; + static DARKGREEN: oj.Color; + static DARKGREY: oj.Color; + static DARKKHAKI: oj.Color; + static DARKMAGENTA: oj.Color; + static DARKOLIVEGREEN: oj.Color; + static DARKORANGE: oj.Color; + static DARKORCHID: oj.Color; + static DARKRED: oj.Color; + static DARKSALMON: oj.Color; + static DARKSEAGREEN: oj.Color; + static DARKSLATEBLUE: oj.Color; + static DARKSLATEGRAY: oj.Color; + static DARKSLATEGREY: oj.Color; + static DARKTURQUOISE: oj.Color; + static DARKVIOLET: oj.Color; + static DEEPPINK: oj.Color; + static DEEPSKYBLUE: oj.Color; + static DIMGRAY: oj.Color; + static DIMGREY: oj.Color; + static DODGERBLUE: oj.Color; + static FIREBRICK: oj.Color; + static FLORALWHITE: oj.Color; + static FORESTGREEN: oj.Color; + static FUCHSIA: oj.Color; + static GAINSBORO: oj.Color; + static GHOSTWHITE: oj.Color; + static GOLD: oj.Color; + static GOLDENROD: oj.Color; + static GRAY: oj.Color; + static GREEN: oj.Color; + static GREENYELLOW: oj.Color; + static GREY: oj.Color; + static HONEYDEW: oj.Color; + static HOTPINK: oj.Color; + static INDIANRED: oj.Color; + static INDIGO: oj.Color; + static IVORY: oj.Color; + static KHAKI: oj.Color; + static LAVENDER: oj.Color; + static LAVENDERBLUSH: oj.Color; + static LAWNGREEN: oj.Color; + static LEMONCHIFFON: oj.Color; + static LIGHTBLUE: oj.Color; + static LIGHTCORAL: oj.Color; + static LIGHTCYAN: oj.Color; + static LIGHTGOLDENRODYELLOW: oj.Color; + static LIGHTGRAY: oj.Color; + static LIGHTGREEN: oj.Color; + static LIGHTGREY: oj.Color; + static LIGHTPINK: oj.Color; + static LIGHTSALMON: oj.Color; + static LIGHTSEAGREEN: oj.Color; + static LIGHTSKYBLUE: oj.Color; + static LIGHTSLATEGRAY: oj.Color; + static LIGHTSLATEGREY: oj.Color; + static LIGHTSTEELBLUE: oj.Color; + static LIGHTYELLOW: oj.Color; + static LIME: oj.Color; + static LIMEGREEN: oj.Color; + static LINEN: oj.Color; + static MAGENTA: oj.Color; + static MAROON: oj.Color; + static MEDIUMAQUAMARINE: oj.Color; + static MEDIUMBLUE: oj.Color; + static MEDIUMORCHID: oj.Color; + static MEDIUMPURPLE: oj.Color; + static MEDIUMSEAGREEN: oj.Color; + static MEDIUMSLATEBLUE: oj.Color; + static MEDIUMSPRINGGREEN: oj.Color; + static MEDIUMTURQUOISE: oj.Color; + static MEDIUMVIOLETRED: oj.Color; + static MIDNIGHTBLUE: oj.Color; + static MINTCREAM: oj.Color; + static MISTYROSE: oj.Color; + static MOCCASIN: oj.Color; + static NAVAJOWHITE: oj.Color; + static NAVY: oj.Color; + static OLDLACE: oj.Color; + static OLIVE: oj.Color; + static OLIVEDRAB: oj.Color; + static ORANGE: oj.Color; + static ORANGERED: oj.Color; + static ORCHID: oj.Color; + static PALEGOLDENROD: oj.Color; + static PALEGREEN: oj.Color; + static PALETURQUOISE: oj.Color; + static PALEVIOLETRED: oj.Color; + static PAPAYAWHIP: oj.Color; + static PEACHPUFF: oj.Color; + static PERU: oj.Color; + static PINK: oj.Color; + static PLUM: oj.Color; + static POWDERBLUE: oj.Color; + static PURPLE: oj.Color; + static REBECCAPURPLE: oj.Color; + static RED: oj.Color; + static ROSYBROWN: oj.Color; + static ROYALBLUE: oj.Color; + static SADDLEBROWN: oj.Color; + static SALMON: oj.Color; + static SANDYBROWN: oj.Color; + static SEAGREEN: oj.Color; + static SEASHELL: oj.Color; + static SIENNA: oj.Color; + static SILVER: oj.Color; + static SKYBLUE: oj.Color; + static SLATEBLUE: oj.Color; + static SLATEGRAY: oj.Color; + static SLATEGREY: oj.Color; + static SNOW: oj.Color; + static SPRINGGREEN: oj.Color; + static STEELBLUE: oj.Color; + static TAN: oj.Color; + static TEAL: oj.Color; + static THISTLE: oj.Color; + static TOMATO: oj.Color; + static TRANSPARENT: oj.Color; + static TURQUOISE: oj.Color; + static VIOLET: oj.Color; + static WHEAT: oj.Color; + static WHITE: oj.Color; + static WHITESMOKE: oj.Color; + static YELLOW: oj.Color; + static YELLOWGREEN: oj.Color; + constructor(color: string|oj.Color.RGBA|oj.Color.HSLA|oj.Color.HSVA); + getAlpha(): number; + getBlue(doNotRound?: boolean): number; + getGreen(doNotRound?: boolean): number; + getRed(doNotRound?: boolean): number; + isEqual(color: oj.Color): boolean; + toString(): string; + } + namespace Color { + type HSLA = + { + h: number, s: number, l: number, a?: number + } + } + namespace Color { + type HSVA = + { + h: number, s: number, v: number, a?: number + } + } + namespace Color { + type RGBA = + { + r: number, g: number, b: number, a?: number + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojcolorpalette/index.d.ts b/types/@oracle/oraclejet/ojs/ojcolorpalette/index.d.ts new file mode 100644 index 0000000000..34aaa0e23e --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojcolorpalette/index.d.ts @@ -0,0 +1,56 @@ +/// +declare namespace oj { + class ojColorPalette extends editableValue { + labelDisplay: 'auto'|'off'; + labelledBy: string|null; + layout: 'grid'|'list'; + palette: Array<{color: oj.Color, label?: string}>; + swatchSize: 'xs'|'sm'|'lg'; + value: oj.Color; + translations: {labelNone?: string}; + onLabelDisplayChanged: (event: CustomEvent)=> any; + onLabelledByChanged: (event: CustomEvent)=> any; + onLayoutChanged: (event: CustomEvent)=> any; + onPaletteChanged: (event: CustomEvent)=> any; + onSwatchSizeChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojColorPalette.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojColorPalette.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojColorPaletteEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getProperty(property: string): any; + setProperties(properties: object): any; + setProperty(property: string, value: any): any; + } + namespace ojColorPalette { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojColorPaletteEventMap extends oj.editableValueEventMap { + 'ojAnimateEnd': oj.ojColorPalette.ojAnimateEnd; + 'ojAnimateStart': oj.ojColorPalette.ojAnimateStart; + 'labelDisplayChanged': CustomEvent; + 'labelledByChanged': CustomEvent; + 'layoutChanged': CustomEvent; + 'paletteChanged': CustomEvent; + 'swatchSizeChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojColorPaletteSettableProperties extends editableValueSettableProperties { + labelDisplay: 'auto'|'off'; + labelledBy: string|null; + layout: 'grid'|'list'; + palette: Array<{color: oj.Color, label?: string}>; + swatchSize: 'xs'|'sm'|'lg'; + value: oj.Color; + translations: {labelNone?: string}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojcolorspectrum/index.d.ts b/types/@oracle/oraclejet/ojs/ojcolorspectrum/index.d.ts new file mode 100644 index 0000000000..f5e8308c9c --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojcolorspectrum/index.d.ts @@ -0,0 +1,44 @@ +/// +declare namespace oj { + class ojColorSpectrum extends editableValue { + labelledBy: string|null; + readonly transientValue: oj.Color; + value: oj.Color; + translations: {labelHue?: string, labelOpacity?: string, labelSatLum?: string, labelThumbDesc?: string}; + onLabelledByChanged: (event: CustomEvent)=> any; + onTransientValueChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojColorSpectrum.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojColorSpectrum.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojColorSpectrumEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getProperty(property: string): any; + setProperties(properties: object): any; + setProperty(property: string, value: any): any; + } + namespace ojColorSpectrum { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojColorSpectrumEventMap extends oj.editableValueEventMap { + 'ojAnimateEnd': oj.ojColorSpectrum.ojAnimateEnd; + 'ojAnimateStart': oj.ojColorSpectrum.ojAnimateStart; + 'labelledByChanged': CustomEvent; + 'transientValueChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojColorSpectrumSettableProperties extends editableValueSettableProperties { + labelledBy: string|null; + readonly transientValue: oj.Color; + value: oj.Color; + translations: {labelHue?: string, labelOpacity?: string, labelSatLum?: string, labelThumbDesc?: string}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojcomponentcore/index.d.ts b/types/@oracle/oraclejet/ojs/ojcomponentcore/index.d.ts new file mode 100644 index 0000000000..0bb4197939 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojcomponentcore/index.d.ts @@ -0,0 +1,31 @@ +declare namespace oj { + abstract class baseComponent extends JetElement { + translations: object|null; + + onTranslationsChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: baseComponentEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getProperty(property: string): any; + refresh(): void; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + } + interface baseComponentEventMap extends oj.JetElementEventMap { + 'translationsChanged': CustomEvent; + } + interface baseComponentSettableProperties extends JetSettableProperties { + translations: object|null; + } + +} +declare namespace oj { + class Components { + static subtreeAttached(node: Element): void; + static subtreeDetached(node: Element): void; + static subtreeHidden(node: Element): void; + static subtreeShown(node: Element, options?: {initialRender: boolean}): void; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojcomposite/index.d.ts b/types/@oracle/oraclejet/ojs/ojcomposite/index.d.ts new file mode 100644 index 0000000000..aeb13c443b --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojcomposite/index.d.ts @@ -0,0 +1,31 @@ +declare namespace oj { + namespace Composite { + function getComponentMetadata(name: string): oj.Composite.Metadata|null; + function register(name: string, descriptor: {metadata: oj.Composite.Metadata, view: string, viewModel: ((param0: oj.Composite.ViewModelContext)=> void|object), parseFunction: ((value: string, name: string, meta: Object, defaultParseFunction: (value: string)=> any)=>any)}): void; + } + namespace Composite { + type Metadata = + { + name: string, version: string, jetVersion: string, properties?: object, methods?: object, events?: object, slots?: object + } + } + namespace Composite { + type PropertyChangedContext = + { + property: string, value: any, previousValue: any, updatedFrom: 'external'|'internal', subproperty?: {path: string, value: any, previousValue: any} + } + } + namespace Composite { + type ViewModel = + { + activated: ((param0: oj.Composite.ViewModelContext)=> Promise|void), connected: ((param0: oj.Composite.ViewModelContext)=> void), bindingsApplied: ((param0: oj.Composite.ViewModelContext)=> void), propertyChanged: ((param0: oj.Composite.PropertyChangedContext)=> void), disconnected: ((param0: Element)=> void) + } + } + namespace Composite { + type ViewModelContext = + { + element: Element, properties: object, slotCounts: object, unique: string, uniqueId: string + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojconveyorbelt/index.d.ts b/types/@oracle/oraclejet/ojs/ojconveyorbelt/index.d.ts new file mode 100644 index 0000000000..f7463f449e --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojconveyorbelt/index.d.ts @@ -0,0 +1,23 @@ +/// +declare namespace oj { + class ojConveyorBelt extends baseComponent { + contentParent: string|null; + orientation: 'horizontal'|'vertical'; + onContentParentChanged: (event: CustomEvent)=> any; + onOrientationChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojConveyorBeltEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + } + interface ojConveyorBeltEventMap extends oj.baseComponentEventMap { + 'contentParentChanged': CustomEvent; + 'orientationChanged': CustomEvent; + } + interface ojConveyorBeltSettableProperties extends baseComponentSettableProperties { + contentParent: string|null; + orientation: 'horizontal'|'vertical'; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojcore/index.d.ts b/types/@oracle/oraclejet/ojs/ojcore/index.d.ts new file mode 100644 index 0000000000..2d23485157 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojcore/index.d.ts @@ -0,0 +1,123 @@ +declare namespace oj { + class BusyContext { + static applicationBootstrapComplete(): undefined; + static setDefaultTimeout(timeout: number): undefined; + addBusyState(options: {description: object|(()=> string)}): (()=> void); + clear(): undefined; + dump(message?: string): undefined; + getBusyStates(): Array<{id:string, description:string}>; + isReady(): boolean; + toString(): string; + whenReady(timeout?: number): Promise<(boolean|Error)>; + } + +} +declare namespace oj { + class Config { + static getAutomationMode(): string; + static getDeviceType(): 'phone'|'tablet'|'others'; + static getLocale(): string; + static getResourceUrl(relativePath: string): string; + static getVersionInfo(): string; + static logVersionInfo(): undefined; + static setAutomationMode(mode: string): undefined; + static setLocale(locale: string, callback?: (()=> void)): undefined; + static setResourceBaseUrl(baseUrl: string): undefined; + } + +} +declare namespace oj { + class Context { + static getContext(node: Element): oj.Context; + static getPageContext(): oj.Context; + getBusyContext(): oj.BusyContext; + } + +} +declare namespace oj { + class Logger { + static readonly LEVEL_ERROR: number; + static readonly LEVEL_INFO: number; + static readonly LEVEL_LOG: number; + static readonly LEVEL_NONE: number; + static readonly LEVEL_WARN: number; + static error(...args: (object|string|number)[]): void; + static info(...args: (object|string|number)[]): void; + static log(...args: (object|string|number)[]): void; + static option(key?: object|string, value?: any): any; + static warn(...args: (object|string|number)[]): void; + } + +} +declare namespace oj { + class Object { + constructor(); + static compareValues(obj1: any, obj2: any): boolean; + static copyPropertiesForClass(targetClass: object, source: object): void; + static createCallback(obj: object, func: object): ()=>any; + static createSubclass(extendingClass: object, baseClass: object, typeName?: string): void; + static ensureClassInitialization(clazz: object): void; + static getTypeName(): string; + static isEmpty(): boolean; + clone(): object; + equals(object: object): boolean; + getClass(otherInstance?: object): object; + getTypeName(clazz: object|null): string; + Init(): void; + toDebugString(): string; + toString(): string; + } + +} +declare namespace oj { + class ResponsiveUtils { + static compare(size1: oj.ResponsiveUtils.SCREEN_RANGE, size2: oj.ResponsiveUtils.SCREEN_RANGE): number; + static getFrameworkQuery(frameworkQueryKey: oj.ResponsiveUtils.FRAMEWORK_QUERY_KEY): string|null; + } + namespace ResponsiveUtils { + enum FRAMEWORK_QUERY_KEY { + SM_UP = "sm-up", + MD_UP = "md-up", + LG_UP = "lg-up", + XL_UP = "xl-up", + XXL_UP = "xxl-up", + SM_ONLY = "sm-only", + MD_ONLY = "md-only", + LG_ONLY = "lg-only", + XL_ONLY = "xl-only", + MD_DOWN = "md-down", + LG_DOWN = "lg-down", + XL_DOWN = "xl-down", + HIGH_RESOLUTION = "high-resolution", + } + enum SCREEN_RANGE { + SM = "sm", + MD = "md", + LG = "lg", + XL = "xl", + XXL = "xxl", + } + } + + +} +declare namespace oj { + class ThemeUtils { + constructor(); + static clearCache(): void; + static getThemeName(): string|null; + static getThemeTargetPlatform(): string|null; + static parseJSONFromFontFamily(selector: string): any; + } + +} +declare namespace oj { + class Translations { + static applyParameters(pattern: string, parameters: object|Array): string|null; + static getComponentTranslations(componentName: string): object; + static getResource(key: string): object|string|null; + static getTranslatedString(key: string, ...var_args: (string|object|Array)[]): string; + static setBundle(bundle: object): void; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojdataprovider/index.d.ts b/types/@oracle/oraclejet/ojs/ojdataprovider/index.d.ts new file mode 100644 index 0000000000..45cd10f459 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojdataprovider/index.d.ts @@ -0,0 +1,254 @@ +declare namespace oj { + interface AttributeFilterOperator { + attribute: string; + op: oj.AttributeFilterOperator.AttributeOperator; + value: any; + } + namespace AttributeFilterOperator { + enum AttributeOperator { + $co, + $eq, + $ew, + $pr, + $gt, + $ge, + $lt, + $le, + $ne, + $regex, + $sw, + } + } + + +} +declare namespace oj { + interface CompoundFilterOperator { + criteria: FilterOperator[]; + op: oj.CompoundFilterOperator.CompoundOperator; + } + namespace CompoundFilterOperator { + enum CompoundOperator { + $and, + $or, + } + } + + +} +declare namespace oj { + interface ContainsKeysResults { + containsParameters: FetchByKeysParameters; + results: Set; + } + +} +declare namespace oj { + interface DataMapping { + mapFields: (item: Item) => Item; + mapFilterCriterion?: (filterCriterion: FilterOperator[]) => FilterOperator[]; + mapSortCriteria?: (sortCriteria: SortCriterion[]) => SortCriterion[]; + unmapSortCriteria?: (sortCriteria: SortCriterion[]) => SortCriterion[]; + } + +} +declare namespace oj { + interface DataProvider extends EventTarget { + containsKeys(parameters : FetchByKeysParameters) : Promise> + fetchByKeys(parameters : FetchByKeysParameters) : Promise> + fetchByOffset(parameters: FetchByOffsetParameters): Promise> + fetchFirst(FetchListParameters?): AsyncIterable> + getCapability(capabilityName: string): any + getTotalSize(): Promise; + isEmpty(): 'yes' | 'no' | 'unknown' + } + +} +declare namespace oj { + interface DataProviderAddOperationEventDetail extends DataProviderOperationEventDetail { + afterKeys?: Set; + } + +} +declare namespace oj { + class DataProviderMutationEvent implements Event { + AT_TARGET: number; + BUBBLING_PHASE: number; + CAPTURING_PHASE: number; + NONE: number; + bubbles: boolean; + cancelBubble: boolean; + cancelable: boolean; + composed: boolean; + currentTarget: EventTarget; + deepPath: () => EventTarget[]; + defaultPrevented: boolean; + detail: DataProviderMutationEventDetail; + eventPhase: number; + initEvent: (eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean) => void; + isTrusted: boolean; + preventDefault: () => void; + returnValue: boolean; + scoped: boolean; + srcElement: Element|null; + stopImmediatePropagation: () => void; + stopPropagation: () => void; + target: EventTarget; + timeStamp: number; + type: string; + constructor(detail: DataProviderMutationEventDetail); + } + +} +declare namespace oj { + interface DataProviderMutationEventDetail { + add?: DataProviderAddOperationEventDetail; + remove?: DataProviderOperationEventDetail; + update?: DataProviderOperationEventDetail; + } + +} +declare namespace oj { + interface DataProviderOperationEventDetail { + data?: D[]; + indexes?: number[]; + keys: Set; + metadata?: ItemMetadata[]; + } + +} +declare namespace oj { + class DataProviderRefreshEvent implements Event { + AT_TARGET: number; + BUBBLING_PHASE: number; + CAPTURING_PHASE: number; + NONE: number; + bubbles: boolean; + cancelBubble: boolean; + cancelable: boolean; + composed: boolean; + currentTarget: EventTarget; + deepPath: () => EventTarget[]; + defaultPrevented: boolean; + eventPhase: number; + initEvent: (eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean) => void; + isTrusted: boolean; + preventDefault: () => void; + returnValue: boolean; + scoped: boolean; + srcElement: Element|null; + stopImmediatePropagation: () => void; + stopPropagation: () => void; + target: EventTarget; + timeStamp: number; + type: string; + constructor(); + } + +} +declare namespace oj { + interface FetchByKeysCapability { + implementation: 'iteration'|'lookup'; + } + +} +declare namespace oj { + class FetchByKeysMixin { + static applyMixin(derivedCtor: Function): any; + } + +} +declare namespace oj { + interface FetchByKeysParameters { + keys: Set; + } + +} +declare namespace oj { + interface FetchByKeysResults { + fetchParameters: FetchByKeysParameters; + results: Map>; + } + +} +declare namespace oj { + interface FetchByOffsetCapability { + implementation: 'iteration'|'randomAccess'; + } + +} +declare namespace oj { + class FetchByOffsetMixin { + static applyMixin(derivedCtor: Function): any; + } + +} +declare namespace oj { + interface FetchByOffsetParameters extends FetchListParameters { + offset: number; + } + +} +declare namespace oj { + interface FetchByOffsetResults { + done: boolean; + fetchParameters: FetchByOffsetParameters; + results: Array>; + } + +} +declare namespace oj { + interface FetchListParameters { + filterCriterion?: FilterOperator; + size: number; + sortCriteria?: SortCriterion[]; + } + +} +declare namespace oj { + interface FetchListResult { + data: D[]; + fetchParameters: FetchListParameters; + metadata: ItemMetadata[]; + } + +} +declare namespace oj { + interface FilterCapability { + operators: Array; + } + +} +declare namespace oj { + interface FilterOperator { + op: oj.AttributeFilterOperator.AttributeOperator|oj.CompoundFilterOperator.CompoundOperator; + filter(data: Array): Array; + } + +} +declare namespace oj { + interface Item { + data: D; + metadata: ItemMetadata; + } + +} +declare namespace oj { + interface ItemMetadata { + key: K; + } + +} +declare namespace oj { + interface SortCapability { + attributes: 'none'|'single'|'multiple'; + } + +} +declare namespace oj { + interface SortCriterion { + attribute: keyof D; + direction: string; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojdatetimepicker/index.d.ts b/types/@oracle/oraclejet/ojs/ojdatetimepicker/index.d.ts new file mode 100644 index 0000000000..707a963de7 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojdatetimepicker/index.d.ts @@ -0,0 +1,308 @@ +/// +/// +/// +declare namespace oj { + class ojDatePicker extends ojInputDate { + keyboardEdit: 'disabled'; + max: string|null; + min: string|null; + renderMode: 'jet'; + value: string; + onKeyboardEditChanged: (event: CustomEvent)=> any; + onMaxChanged: (event: CustomEvent)=> any; + onMinChanged: (event: CustomEvent)=> any; + onRenderModeChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojDatePicker.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojDatePicker.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojDatePickerEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojDatePicker { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojDatePickerEventMap extends oj.ojInputDateEventMap { + 'ojAnimateEnd': oj.ojDatePicker.ojAnimateEnd; + 'ojAnimateStart': oj.ojDatePicker.ojAnimateStart; + 'keyboardEditChanged': CustomEvent; + 'maxChanged': CustomEvent; + 'minChanged': CustomEvent; + 'renderModeChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojDatePickerSettableProperties extends ojInputDateSettableProperties { + keyboardEdit: 'disabled'; + max: string|null; + min: string|null; + renderMode: 'jet'; + value: string; + } + +} +declare namespace oj { + class ojDateTimePicker extends ojInputDateTime { + keyboardEdit: 'disabled'; + max: string|null; + min: string|null; + renderMode: 'jet'; + value: string; + onKeyboardEditChanged: (event: CustomEvent)=> any; + onMaxChanged: (event: CustomEvent)=> any; + onMinChanged: (event: CustomEvent)=> any; + onRenderModeChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojDateTimePicker.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojDateTimePicker.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojDateTimePickerEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojDateTimePicker { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojDateTimePickerEventMap extends oj.ojInputDateTimeEventMap { + 'ojAnimateEnd': oj.ojDateTimePicker.ojAnimateEnd; + 'ojAnimateStart': oj.ojDateTimePicker.ojAnimateStart; + 'keyboardEditChanged': CustomEvent; + 'maxChanged': CustomEvent; + 'minChanged': CustomEvent; + 'renderModeChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojDateTimePickerSettableProperties extends ojInputDateTimeSettableProperties { + keyboardEdit: 'disabled'; + max: string|null; + min: string|null; + renderMode: 'jet'; + value: string; + } + +} +declare namespace oj { + class ojInputDate extends inputBase { + converter: oj.Converter|oj.Validation.RegisteredConverter; + datePicker: {changeMonth: 'select'|'none', changeYear: 'select'|'none', currentMonthPos: number, daysOutsideMonth: 'hidden'|'visible'|'selectable', footerLayout: ''|'today', numberOfMonths: number, showOn: 'focus'|'image', stepBigMonths: number, stepMonths: 'numberOfMonths'|number, weekDisplay: 'number'|'none', yearRange: string}; + dayFormatter: (param: oj.ojInputDate.DayFormatterInput)=> (null|'all'|oj.ojInputDate.DayFormatterOutput); + dayMetaData: {[key:string]: {[key:string]: {[key:string]: {disabled?: boolean, className?: string, tooltip?: string}}}}; + keyboardEdit: 'enabled'|'disabled'; + max: string|null; + min: string|null; + pickerAttributes: {style?: string, class?: string}; + renderMode: 'jet'|'native'; + validators: Array|oj.Validation.RegisteredValidator>; + value: string; + translations: {currentText?: string, dateRestriction?: {hint?: string, messageDetail?: string, messageSummary?: string}, dateTimeRange?: {hint?: {inRange?: string, max?: string, min?: string}, messageDetail?: {rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, nextText?: string, prevText?: string, regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipCalendar?: string, tooltipCalendarDisabled?: string, tooltipCalendarTime?: string, tooltipCalendarTimeDisabled?: string, weekHeader?: string}; + onConverterChanged: (event: CustomEvent)=> any; + onDatePickerChanged: (event: CustomEvent)=> any; + onDayFormatterChanged: (event: CustomEvent)=> any; + onDayMetaDataChanged: (event: CustomEvent)=> any; + onKeyboardEditChanged: (event: CustomEvent)=> any; + onMaxChanged: (event: CustomEvent)=> any; + onMinChanged: (event: CustomEvent)=> any; + onPickerAttributesChanged: (event: CustomEvent)=> any; + onRenderModeChanged: (event: CustomEvent)=> any; + onValidatorsChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojInputDate.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojInputDate.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputDateEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + hide(): void; + refresh(): void; + show(): void; + } + namespace ojInputDate { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojInputDateEventMap extends oj.inputBaseEventMap { + 'ojAnimateEnd': oj.ojInputDate.ojAnimateEnd; + 'ojAnimateStart': oj.ojInputDate.ojAnimateStart; + 'converterChanged': CustomEvent; + 'datePickerChanged': CustomEvent; + 'dayFormatterChanged': CustomEvent; + 'dayMetaDataChanged': CustomEvent; + 'keyboardEditChanged': CustomEvent; + 'maxChanged': CustomEvent; + 'minChanged': CustomEvent; + 'pickerAttributesChanged': CustomEvent; + 'renderModeChanged': CustomEvent; + 'validatorsChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojInputDateSettableProperties extends inputBaseSettableProperties { + converter: oj.Converter|oj.Validation.RegisteredConverter; + datePicker: {changeMonth: 'select'|'none', changeYear: 'select'|'none', currentMonthPos: number, daysOutsideMonth: 'hidden'|'visible'|'selectable', footerLayout: ''|'today', numberOfMonths: number, showOn: 'focus'|'image', stepBigMonths: number, stepMonths: 'numberOfMonths'|number, weekDisplay: 'number'|'none', yearRange: string}; + dayFormatter: (param: oj.ojInputDate.DayFormatterInput)=> (null|'all'|oj.ojInputDate.DayFormatterOutput); + dayMetaData: {[key:string]: {[key:string]: {[key:string]: {disabled?: boolean, className?: string, tooltip?: string}}}}; + keyboardEdit: 'enabled'|'disabled'; + max: string|null; + min: string|null; + pickerAttributes: {style?: string, class?: string}; + renderMode: 'jet'|'native'; + validators: Array|oj.Validation.RegisteredValidator>; + value: string; + translations: {currentText?: string, dateRestriction?: {hint?: string, messageDetail?: string, messageSummary?: string}, dateTimeRange?: {hint?: {inRange?: string, max?: string, min?: string}, messageDetail?: {rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, nextText?: string, prevText?: string, regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipCalendar?: string, tooltipCalendarDisabled?: string, tooltipCalendarTime?: string, tooltipCalendarTimeDisabled?: string, weekHeader?: string}; + } + namespace ojInputDate { + type DayFormatterInput = + { + fullYear: number, month: number, date: number + } + } + namespace ojInputDate { + type DayFormatterOutput = + { + disabled?: boolean, className?: string, tooltip?: string + } + } + +} +declare namespace oj { + class ojInputDateTime extends ojInputDate { + converter: oj.Converter|oj.Validation.RegisteredConverter; + max: string|null; + min: string|null; + renderMode: 'jet'|'native'; + timePicker: {footerLayout: ''|'now', showOn: 'focus'|'image', timeIncrement: string}; + validators: Array|oj.Validation.RegisteredValidator>; + value: string; + translations: {cancel?: string, currentText?: string, dateRestriction?: {hint?: string, messageDetail?: string, messageSummary?: string}, dateTimeRange?: {hint?: {inRange?: string, max?: string, min?: string}, messageDetail?: {rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, done?: string, nextText?: string, prevText?: string, regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipCalendar?: string, tooltipCalendarDisabled?: string, tooltipCalendarTime?: string, tooltipCalendarTimeDisabled?: string, weekHeader?: string}; + onConverterChanged: (event: CustomEvent)=> any; + onMaxChanged: (event: CustomEvent)=> any; + onMinChanged: (event: CustomEvent)=> any; + onRenderModeChanged: (event: CustomEvent)=> any; + onTimePickerChanged: (event: CustomEvent)=> any; + onValidatorsChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojInputDateTime.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojInputDateTime.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputDateTimeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + hideTimePicker(): void; + show(): void; + showTimePicker(): void; + } + namespace ojInputDateTime { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojInputDateTimeEventMap extends oj.ojInputDateEventMap { + 'ojAnimateEnd': oj.ojInputDateTime.ojAnimateEnd; + 'ojAnimateStart': oj.ojInputDateTime.ojAnimateStart; + 'converterChanged': CustomEvent; + 'maxChanged': CustomEvent; + 'minChanged': CustomEvent; + 'renderModeChanged': CustomEvent; + 'timePickerChanged': CustomEvent; + 'validatorsChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojInputDateTimeSettableProperties extends ojInputDateSettableProperties { + converter: oj.Converter|oj.Validation.RegisteredConverter; + max: string|null; + min: string|null; + renderMode: 'jet'|'native'; + timePicker: {footerLayout: ''|'now', showOn: 'focus'|'image', timeIncrement: string}; + validators: Array|oj.Validation.RegisteredValidator>; + value: string; + translations: {cancel?: string, currentText?: string, dateRestriction?: {hint?: string, messageDetail?: string, messageSummary?: string}, dateTimeRange?: {hint?: {inRange?: string, max?: string, min?: string}, messageDetail?: {rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, done?: string, nextText?: string, prevText?: string, regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipCalendar?: string, tooltipCalendarDisabled?: string, tooltipCalendarTime?: string, tooltipCalendarTimeDisabled?: string, weekHeader?: string}; + } + +} +declare namespace oj { + class ojInputTime extends inputBase { + converter: oj.Converter|oj.Validation.RegisteredConverter; + keyboardEdit: 'enabled'|'disabled'; + max: string|null; + min: string|null; + pickerAttributes: {style?: string, class?: string}; + renderMode: 'jet'|'native'; + timePicker: {footerLayout: ''|'now', showOn: 'focus'|'image', timeIncrement: string}; + validators: Array|oj.Validation.RegisteredValidator>; + value: string; + translations: {ampmWheelLabel?: string, cancelText?: string, currentTimeText?: string, dateTimeRange?: {hint?: {inRange?: string, max?: string, min?: string}, messageDetail?: {rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, hourWheelLabel?: string, minuteWheelLabel?: string, okText?: string, regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipTime?: string, tooltipTimeDisabled?: string}; + onConverterChanged: (event: CustomEvent)=> any; + onKeyboardEditChanged: (event: CustomEvent)=> any; + onMaxChanged: (event: CustomEvent)=> any; + onMinChanged: (event: CustomEvent)=> any; + onPickerAttributesChanged: (event: CustomEvent)=> any; + onRenderModeChanged: (event: CustomEvent)=> any; + onTimePickerChanged: (event: CustomEvent)=> any; + onValidatorsChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojInputTime.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojInputTime.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputTimeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + hide(): void; + refresh(): void; + show(): void; + } + namespace ojInputTime { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojInputTimeEventMap extends oj.inputBaseEventMap { + 'ojAnimateEnd': oj.ojInputTime.ojAnimateEnd; + 'ojAnimateStart': oj.ojInputTime.ojAnimateStart; + 'converterChanged': CustomEvent; + 'keyboardEditChanged': CustomEvent; + 'maxChanged': CustomEvent; + 'minChanged': CustomEvent; + 'pickerAttributesChanged': CustomEvent; + 'renderModeChanged': CustomEvent; + 'timePickerChanged': CustomEvent; + 'validatorsChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojInputTimeSettableProperties extends inputBaseSettableProperties { + converter: oj.Converter|oj.Validation.RegisteredConverter; + keyboardEdit: 'enabled'|'disabled'; + max: string|null; + min: string|null; + pickerAttributes: {style?: string, class?: string}; + renderMode: 'jet'|'native'; + timePicker: {footerLayout: ''|'now', showOn: 'focus'|'image', timeIncrement: string}; + validators: Array|oj.Validation.RegisteredValidator>; + value: string; + translations: {ampmWheelLabel?: string, cancelText?: string, currentTimeText?: string, dateTimeRange?: {hint?: {inRange?: string, max?: string, min?: string}, messageDetail?: {rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, hourWheelLabel?: string, minuteWheelLabel?: string, okText?: string, regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipTime?: string, tooltipTimeDisabled?: string}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojdefer/index.d.ts b/types/@oracle/oraclejet/ojs/ojdefer/index.d.ts new file mode 100644 index 0000000000..7672ac8a35 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojdefer/index.d.ts @@ -0,0 +1,13 @@ +declare namespace oj { + class ojDefer extends JetElement { + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojDeferEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojDeferEventMap extends oj.JetElementEventMap { + } + interface ojDeferSettableProperties extends JetSettableProperties { + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojdeferreddataprovider/index.d.ts b/types/@oracle/oraclejet/ojs/ojdeferreddataprovider/index.d.ts new file mode 100644 index 0000000000..0df017ec3c --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojdeferreddataprovider/index.d.ts @@ -0,0 +1,17 @@ +/// +declare namespace oj { + class DeferredDataProvider implements DataProvider { + constructor(dataProvider: Promise>[], capabilityFunc: Function); + addEventListener(eventType: string, listener: EventListener): any; + containsKeys(params: FetchByKeysParameters): Promise> + dispatchEvent(evt: Event): boolean; + fetchByKeys(params: FetchByKeysParameters): Promise> + fetchByOffset(params: FetchByOffsetParameters): Promise> + fetchFirst>(params?: FetchListParameters): AsyncIterable + getCapability(capabilityName: string): object; + getTotalSize(): Promise; + isEmpty(): 'yes'|'no'|'unknown'; + removeEventListener(eventType: string, listener: EventListener): any; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojdialog/index.d.ts b/types/@oracle/oraclejet/ojs/ojdialog/index.d.ts new file mode 100644 index 0000000000..85ea4be39c --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojdialog/index.d.ts @@ -0,0 +1,127 @@ +/// +declare namespace oj { + class ojDialog extends baseComponent { + cancelBehavior: 'icon'|'escape'|'none'; + dragAffordance: 'title-bar'|'none'; + initialVisibility: 'hide'|'show'; + modality: 'modal'|'modeless'; + position: oj.ojDialog.Position; + resizeBehavior: 'resizable'|'none'; + role: string; + translations: {labelCloseIcon?: string}; + onCancelBehaviorChanged: (event: CustomEvent)=> any; + onDragAffordanceChanged: (event: CustomEvent)=> any; + onInitialVisibilityChanged: (event: CustomEvent)=> any; + onModalityChanged: (event: CustomEvent)=> any; + onPositionChanged: (event: CustomEvent)=> any; + onResizeBehaviorChanged: (event: CustomEvent)=> any; + onRoleChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojDialog.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojDialog.ojAnimateStart)=> any; + onOjBeforeClose: (event: oj.ojDialog.ojBeforeClose)=> any; + onOjBeforeOpen: (event: oj.ojDialog.ojBeforeOpen)=> any; + onOjClose: (event: oj.ojDialog.ojClose)=> any; + onOjFocus: (event: oj.ojDialog.ojFocus)=> any; + onOjOpen: (event: oj.ojDialog.ojOpen)=> any; + onOjResize: (event: oj.ojDialog.ojResize)=> any; + onOjResizeStart: (event: oj.ojDialog.ojResizeStart)=> any; + onOjResizeStop: (event: oj.ojDialog.ojResizeStop)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojDialogEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + close(): void; + isOpen(): boolean; + open(): void; + refresh(): void; + } + namespace ojDialog { + class ojAnimateEnd extends CustomEvent<{element: Element, action: 'open'|'close', [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: 'open'|'close', element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + + class ojBeforeClose extends CustomEvent<{event: Event, [propName: string]: any}> { + + } + + class ojBeforeOpen extends CustomEvent<{event: Event, [propName: string]: any}> { + + } + + class ojClose extends CustomEvent<{event: Event, [propName: string]: any}> { + + } + + class ojFocus extends CustomEvent<{event: Event, [propName: string]: any}> { + + } + + class ojOpen extends CustomEvent<{event: Event, [propName: string]: any}> { + + } + + class ojResize extends CustomEvent<{event: Event, [propName: string]: any}> { + + } + + class ojResizeStart extends CustomEvent<{event: Event, [propName: string]: any}> { + + } + + class ojResizeStop extends CustomEvent<{event: Event, [propName: string]: any}> { + + } + } + interface ojDialogEventMap extends oj.baseComponentEventMap { + 'ojAnimateEnd': oj.ojDialog.ojAnimateEnd; + 'ojAnimateStart': oj.ojDialog.ojAnimateStart; + 'ojBeforeClose': oj.ojDialog.ojBeforeClose; + 'ojBeforeOpen': oj.ojDialog.ojBeforeOpen; + 'ojClose': oj.ojDialog.ojClose; + 'ojFocus': oj.ojDialog.ojFocus; + 'ojOpen': oj.ojDialog.ojOpen; + 'ojResize': oj.ojDialog.ojResize; + 'ojResizeStart': oj.ojDialog.ojResizeStart; + 'ojResizeStop': oj.ojDialog.ojResizeStop; + 'cancelBehaviorChanged': CustomEvent; + 'dragAffordanceChanged': CustomEvent; + 'initialVisibilityChanged': CustomEvent; + 'modalityChanged': CustomEvent; + 'positionChanged': CustomEvent; + 'resizeBehaviorChanged': CustomEvent; + 'roleChanged': CustomEvent; + } + interface ojDialogSettableProperties extends baseComponentSettableProperties { + cancelBehavior: 'icon'|'escape'|'none'; + dragAffordance: 'title-bar'|'none'; + initialVisibility: 'hide'|'show'; + modality: 'modal'|'modeless'; + position: oj.ojDialog.Position; + resizeBehavior: 'resizable'|'none'; + role: string; + translations: {labelCloseIcon?: string}; + } + namespace ojDialog { + type Position = + { + my?: oj.ojDialog.PositionAlign, at?: oj.ojDialog.PositionAlign, offset?: oj.ojDialog.PositionPoint, of?: string|oj.ojDialog.PositionPoint, collision?: 'flip'|'fit'|'flipfit'|'none' + } + } + namespace ojDialog { + type PositionAlign = + { + vertical?: 'top'|'bottom'|'center', horizontal?: 'start'|'end'|'left'|'center'|'bottom' + } + } + namespace ojDialog { + type PositionPoint = + { + x?: number, y?: number + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojdvt-base/index.d.ts b/types/@oracle/oraclejet/ojs/ojdvt-base/index.d.ts new file mode 100644 index 0000000000..9624749ed1 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojdvt-base/index.d.ts @@ -0,0 +1,20 @@ +/// +declare namespace oj { + abstract class dvtBaseComponent extends baseComponent { + trackResize: 'on'|'off'; + translations: {labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + onTrackResizeChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: dvtBaseComponentEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface dvtBaseComponentEventMap extends oj.baseComponentEventMap { + 'trackResizeChanged': CustomEvent; + } + interface dvtBaseComponentSettableProperties extends baseComponentSettableProperties { + trackResize: 'on'|'off'; + translations: {labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojeditablevalue/index.d.ts b/types/@oracle/oraclejet/ojs/ojeditablevalue/index.d.ts new file mode 100644 index 0000000000..63176945d9 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojeditablevalue/index.d.ts @@ -0,0 +1,67 @@ +/// +/// +declare namespace oj { + abstract class editableValue, SV= V, RV= V> extends baseComponent { + describedBy: string|null; + disabled: boolean; + displayOptions: {converterHint: Array<'placeholder'|'notewindow'|'none'>|'placeholder'|'notewindow'|'none', helpInstruction: Array<'notewindow'|'none'>|'notewindow'|'none', messages: Array<'inline'|'notewindow'|'none'>|'inline'|'notewindow'|'none', validatorHint: Array<'notewindow'|'none'>|'notewindow'|'none'}; + help: {instruction?: string}; + helpHints: {definition?: string, source?: string}; + labelHint: string; + messagesCustom: Array; + readonly valid: 'valid'|'pending'|'invalidHidden'|'invalidShown'; + value: V; + onDescribedByChanged: (event: CustomEvent)=> any; + onDisabledChanged: (event: CustomEvent)=> any; + onDisplayOptionsChanged: (event: CustomEvent)=> any; + onHelpChanged: (event: CustomEvent)=> any; + onHelpHintsChanged: (event: CustomEvent)=> any; + onLabelHintChanged: (event: CustomEvent)=> any; + onMessagesCustomChanged: (event: CustomEvent)=> any; + onValidChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.editableValue.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.editableValue.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: editableValueEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + reset(): void; + showMessages(): void; + } + namespace editableValue { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface editableValueEventMap extends oj.baseComponentEventMap { + 'ojAnimateEnd': oj.editableValue.ojAnimateEnd; + 'ojAnimateStart': oj.editableValue.ojAnimateStart; + 'describedByChanged': CustomEvent; + 'disabledChanged': CustomEvent; + 'displayOptionsChanged': CustomEvent; + 'helpChanged': CustomEvent; + 'helpHintsChanged': CustomEvent; + 'labelHintChanged': CustomEvent; + 'messagesCustomChanged': CustomEvent; + 'validChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface editableValueSettableProperties extends baseComponentSettableProperties { + describedBy: string|null; + disabled: boolean; + displayOptions: {converterHint: Array<'placeholder'|'notewindow'|'none'>|'placeholder'|'notewindow'|'none', helpInstruction: Array<'notewindow'|'none'>|'notewindow'|'none', messages: Array<'inline'|'notewindow'|'none'>|'inline'|'notewindow'|'none', validatorHint: Array<'notewindow'|'none'>|'notewindow'|'none'}; + help: {instruction?: string}; + helpHints: {definition?: string, source?: string}; + labelHint: string; + messagesCustom: Array; + readonly valid: 'valid'|'pending'|'invalidHidden'|'invalidShown'; + value: SV; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojfilepicker/index.d.ts b/types/@oracle/oraclejet/ojs/ojfilepicker/index.d.ts new file mode 100644 index 0000000000..dbcfec3632 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojfilepicker/index.d.ts @@ -0,0 +1,44 @@ +/// +/// +declare namespace oj { + interface FileUploadTransport { + flush(): void; + queue(fileList: FileList): Array; + } + +} +declare namespace oj { + class ojFilePicker extends JetElement { + accept: Array|null; + selectOn: 'auto'|'click'|'drop'|'clickAndDrop'; + selectionMode: 'multiple'|'single'; + onAcceptChanged: (event: CustomEvent)=> any; + onSelectOnChanged: (event: CustomEvent)=> any; + onSelectionModeChanged: (event: CustomEvent)=> any; + onOjSelect: (event: oj.ojFilePicker.ojSelect)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojFilePickerEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getProperty(property: string): any; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + } + namespace ojFilePicker { + class ojSelect extends CustomEvent<{files: FileList, [propName: string]: any}> { + + } + } + interface ojFilePickerEventMap extends oj.JetElementEventMap { + 'ojSelect': oj.ojFilePicker.ojSelect; + 'acceptChanged': CustomEvent; + 'selectOnChanged': CustomEvent; + 'selectionModeChanged': CustomEvent; + } + interface ojFilePickerSettableProperties extends JetSettableProperties { + accept: Array|null; + selectOn: 'auto'|'click'|'drop'|'clickAndDrop'; + selectionMode: 'multiple'|'single'; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojfilmstrip/index.d.ts b/types/@oracle/oraclejet/ojs/ojfilmstrip/index.d.ts new file mode 100644 index 0000000000..5287e1be53 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojfilmstrip/index.d.ts @@ -0,0 +1,42 @@ +/// +declare namespace oj { + class ojFilmStrip extends baseComponent { + arrowPlacement: 'adjacent'|'overlay'; + arrowVisibility: 'visible'|'hidden'|'hover'|'auto'; + currentItem: {id?: string, index?: number}; + looping: 'off'|'page'; + maxItemsPerPage: number; + orientation: 'horizontal'|'vertical'; + translations: {labelAccArrowNextPage?: string, labelAccArrowPreviousPage?: string, labelAccFilmStrip?: string, tipArrowNextPage?: string, tipArrowPreviousPage?: string}; + onArrowPlacementChanged: (event: CustomEvent)=> any; + onArrowVisibilityChanged: (event: CustomEvent)=> any; + onCurrentItemChanged: (event: CustomEvent)=> any; + onLoopingChanged: (event: CustomEvent)=> any; + onMaxItemsPerPageChanged: (event: CustomEvent)=> any; + onOrientationChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojFilmStripEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getItemsPerPage(): number; + refresh(): void; + } + interface ojFilmStripEventMap extends oj.baseComponentEventMap { + 'arrowPlacementChanged': CustomEvent; + 'arrowVisibilityChanged': CustomEvent; + 'currentItemChanged': CustomEvent; + 'loopingChanged': CustomEvent; + 'maxItemsPerPageChanged': CustomEvent; + 'orientationChanged': CustomEvent; + } + interface ojFilmStripSettableProperties extends baseComponentSettableProperties { + arrowPlacement: 'adjacent'|'overlay'; + arrowVisibility: 'visible'|'hidden'|'hover'|'auto'; + currentItem: {id?: string, index?: number}; + looping: 'off'|'page'; + maxItemsPerPage: number; + orientation: 'horizontal'|'vertical'; + translations: {labelAccArrowNextPage?: string, labelAccArrowPreviousPage?: string, labelAccFilmStrip?: string, tipArrowNextPage?: string, tipArrowPreviousPage?: string}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojformlayout/index.d.ts b/types/@oracle/oraclejet/ojs/ojformlayout/index.d.ts new file mode 100644 index 0000000000..4487a1baa7 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojformlayout/index.d.ts @@ -0,0 +1,37 @@ +declare namespace oj { + class ojFormLayout extends JetElement { + direction: 'column'|'row'; + labelEdge: 'start'|'top'; + labelWidth: string; + labelWrapping: 'truncate'|'wrap'; + maxColumns: number; + onDirectionChanged: (event: CustomEvent)=> any; + onLabelEdgeChanged: (event: CustomEvent)=> any; + onLabelWidthChanged: (event: CustomEvent)=> any; + onLabelWrappingChanged: (event: CustomEvent)=> any; + onMaxColumnsChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojFormLayoutEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getProperty(property: string): any; + refresh(): void; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + } + interface ojFormLayoutEventMap extends oj.JetElementEventMap { + 'directionChanged': CustomEvent; + 'labelEdgeChanged': CustomEvent; + 'labelWidthChanged': CustomEvent; + 'labelWrappingChanged': CustomEvent; + 'maxColumnsChanged': CustomEvent; + } + interface ojFormLayoutSettableProperties extends JetSettableProperties { + direction: 'column'|'row'; + labelEdge: 'start'|'top'; + labelWidth: string; + labelWrapping: 'truncate'|'wrap'; + maxColumns: number; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojgantt/index.d.ts b/types/@oracle/oraclejet/ojs/ojgantt/index.d.ts new file mode 100644 index 0000000000..86b2f26147 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojgantt/index.d.ts @@ -0,0 +1,286 @@ +/// +/// +declare namespace oj { + class ojGantt extends dvtTimeComponent> { + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + as: string; + axisPosition: 'bottom'|'top'; + dependencyData?: (oj.DataProvider); + dnd: {move?: {tasks?: 'disabled'|'enabled'}}; + end: string; + gridlines: {horizontal?: 'hidden'|'visible'|'auto', vertical?: 'hidden'|'visible'|'auto'}; + majorAxis: {converter?: (oj.ojTimeAxis.Converter|oj.Converter), height?: number, scale: 'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'quarters'|'years', zoomOrder?: Array}; + minorAxis: {converter?: (oj.ojTimeAxis.Converter|oj.Converter), height?: number, scale: 'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'quarters'|'years', zoomOrder?: Array}; + referenceObjects: Array; + rowAxis: {label?: {renderer: ((context: oj.ojGantt.RowAxisLabelRendererContext) => ({insert: Element}))}, maxWidth?: string, rendered?: 'on'|'off', width?: string}; + rowDefaults: {height?: number}; + scrollPosition: {offsetY?: number, rowIndex?: number, y?: number}; + selection: Array; + selectionMode: 'single'|'multiple'|'none'; + start: string; + taskData?: (oj.DataProvider); + taskDefaults: {baseline?: {borderRadius?: string, height?: number, svgClassName?: string, svgStyle?: object}, borderRadius?: string, height?: number, labelPosition?: (string|Array), progress?: {borderRadius?: string, height?: string, svgClassName?: string, svgStyle?: object}, svgClassName?: string, svgStyle?: object, type?: 'normal'|'milestone'|'summary'|'auto'}; + tooltip: {renderer: ((context: oj.ojGantt.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + valueFormats: {baselineDate?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, baselineEnd?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, baselineStart?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, date?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, end?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, label?: {tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, progress?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, row?: {tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, start?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}}; + viewportEnd: string; + viewportStart: string; + translations: {accessibleDependencyInfo?: string, accessiblePredecessorInfo?: string, accessibleSuccessorInfo?: string, accessibleTaskTypeMilestone?: string, accessibleTaskTypeSummary?: string, componentName?: string, finishFinishDependencyAriaDesc?: string, finishStartDependencyAriaDesc?: string, labelAndValue?: string, labelBaselineDate?: string, labelBaselineEnd?: string, labelBaselineStart?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelDate?: string, labelEnd?: string, labelInvalidData?: string, labelLabel?: string, labelMoveBy?: string, labelNoData?: string, labelProgress?: string, labelRow?: string, labelStart?: string, startFinishDependencyAriaDesc?: string, startStartDependencyAriaDesc?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, taskMoveCancelled?: string, taskMoveFinalized?: string, taskMoveInitiated?: string, taskMoveInitiatedInstruction?: string, taskMoveSelectionInfo?: string, tooltipZoomIn?: string, tooltipZoomOut?: string}; + onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; + onAnimationOnDisplayChanged: (event: CustomEvent)=> any; + onAsChanged: (event: CustomEvent)=> any; + onAxisPositionChanged: (event: CustomEvent)=> any; + onDependencyDataChanged: (event: CustomEvent)=> any; + onDndChanged: (event: CustomEvent)=> any; + onEndChanged: (event: CustomEvent)=> any; + onGridlinesChanged: (event: CustomEvent)=> any; + onMajorAxisChanged: (event: CustomEvent)=> any; + onMinorAxisChanged: (event: CustomEvent)=> any; + onReferenceObjectsChanged: (event: CustomEvent)=> any; + onRowAxisChanged: (event: CustomEvent)=> any; + onRowDefaultsChanged: (event: CustomEvent)=> any; + onScrollPositionChanged: (event: CustomEvent)=> any; + onSelectionChanged: (event: CustomEvent)=> any; + onSelectionModeChanged: (event: CustomEvent)=> any; + onStartChanged: (event: CustomEvent)=> any; + onTaskDataChanged: (event: CustomEvent)=> any; + onTaskDefaultsChanged: (event: CustomEvent)=> any; + onTooltipChanged: (event: CustomEvent)=> any; + onValueFormatsChanged: (event: CustomEvent)=> any; + onViewportEndChanged: (event: CustomEvent)=> any; + onViewportStartChanged: (event: CustomEvent)=> any; + onOjMove: (event: oj.ojGantt.ojMove)=> any; + onOjViewportChange: (event: oj.ojGantt.ojViewportChange)=> any; + + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojGanttEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getContextByNode(node: Element): {subId: 'oj-gantt-row-label', index: number} | {subId: 'oj-gantt-taskbar', rowIndex: number, index: number} | null; + } + namespace ojGantt { + class ojMove extends CustomEvent<{taskContexts: Array<{data: oj.ojGantt.RowTask, rowData: oj.ojGantt.Row, itemData: D2|null, color: string}>, value: string, start: string, end: string, baselineStart: string, baselineEnd: string, rowContext: {rowData: oj.ojGantt.Row, componentElement: Element}, [propName: string]: any}> { + + } + + class ojViewportChange extends CustomEvent<{viewportStart: string, viewportEnd: string, majorAxisScale: string, minorAxisScale: string, [propName: string]: any}> { + + } + } + interface ojGanttEventMap extends oj.dvtTimeComponentEventMap { + 'ojMove': oj.ojGantt.ojMove; + 'ojViewportChange': oj.ojGantt.ojViewportChange; + 'animationOnDataChangeChanged': CustomEvent; + 'animationOnDisplayChanged': CustomEvent; + 'asChanged': CustomEvent; + 'axisPositionChanged': CustomEvent; + 'dependencyDataChanged': CustomEvent; + 'dndChanged': CustomEvent; + 'endChanged': CustomEvent; + 'gridlinesChanged': CustomEvent; + 'majorAxisChanged': CustomEvent; + 'minorAxisChanged': CustomEvent; + 'referenceObjectsChanged': CustomEvent; + 'rowAxisChanged': CustomEvent; + 'rowDefaultsChanged': CustomEvent; + 'scrollPositionChanged': CustomEvent; + 'selectionChanged': CustomEvent; + 'selectionModeChanged': CustomEvent; + 'startChanged': CustomEvent; + 'taskDataChanged': CustomEvent; + 'taskDefaultsChanged': CustomEvent; + 'tooltipChanged': CustomEvent; + 'valueFormatsChanged': CustomEvent; + 'viewportEndChanged': CustomEvent; + 'viewportStartChanged': CustomEvent; + } + interface ojGanttSettableProperties extends dvtTimeComponentSettableProperties { + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + as: string; + axisPosition: 'bottom'|'top'; + dependencyData?: (oj.DataProvider); + dnd: {move?: {tasks?: 'disabled'|'enabled'}}; + end: string; + gridlines: {horizontal?: 'hidden'|'visible'|'auto', vertical?: 'hidden'|'visible'|'auto'}; + majorAxis: {converter?: (oj.ojTimeAxis.Converter|oj.Converter), height?: number, scale: 'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'quarters'|'years', zoomOrder?: Array}; + minorAxis: {converter?: (oj.ojTimeAxis.Converter|oj.Converter), height?: number, scale: 'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'quarters'|'years', zoomOrder?: Array}; + referenceObjects: Array; + rowAxis: {label?: {renderer: ((context: oj.ojGantt.RowAxisLabelRendererContext) => ({insert: Element}))}, maxWidth?: string, rendered?: 'on'|'off', width?: string}; + rowDefaults: {height?: number}; + scrollPosition: {offsetY?: number, rowIndex?: number, y?: number}; + selection: Array; + selectionMode: 'single'|'multiple'|'none'; + start: string; + taskData?: (oj.DataProvider); + taskDefaults: {baseline?: {borderRadius?: string, height?: number, svgClassName?: string, svgStyle?: object}, borderRadius?: string, height?: number, labelPosition?: (string|Array), progress?: {borderRadius?: string, height?: string, svgClassName?: string, svgStyle?: object}, svgClassName?: string, svgStyle?: object, type?: 'normal'|'milestone'|'summary'|'auto'}; + tooltip: {renderer: ((context: oj.ojGantt.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + valueFormats: {baselineDate?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, baselineEnd?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, baselineStart?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, date?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, end?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, label?: {tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, progress?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, row?: {tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, start?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}}; + viewportEnd: string; + viewportStart: string; + translations: {accessibleDependencyInfo?: string, accessiblePredecessorInfo?: string, accessibleSuccessorInfo?: string, accessibleTaskTypeMilestone?: string, accessibleTaskTypeSummary?: string, componentName?: string, finishFinishDependencyAriaDesc?: string, finishStartDependencyAriaDesc?: string, labelAndValue?: string, labelBaselineDate?: string, labelBaselineEnd?: string, labelBaselineStart?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelDate?: string, labelEnd?: string, labelInvalidData?: string, labelLabel?: string, labelMoveBy?: string, labelNoData?: string, labelProgress?: string, labelRow?: string, labelStart?: string, startFinishDependencyAriaDesc?: string, startStartDependencyAriaDesc?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, taskMoveCancelled?: string, taskMoveFinalized?: string, taskMoveInitiated?: string, taskMoveInitiatedInstruction?: string, taskMoveSelectionInfo?: string, tooltipZoomIn?: string, tooltipZoomOut?: string}; + } + namespace ojGantt { + type Dependency = + { + id: K1, predecessorTaskId: K2, shortDesc?: string, successorTaskId: K2, svgClassName?: string, svgStyle?: object, type?: 'startStart'|'startFinish'|'finishFinish'|'finishStart' + } + } + namespace ojGantt { + type ReferenceObject = + { + svgClassName?: string, svgStyle?: object, value?: string + } + } + namespace ojGantt { + type Row = + { + id?: any, label?: string, labelStyle?: object, tasks?: Array> + } + } + namespace ojGantt { + type RowAxisLabelRendererContext = + { + parentElement: Element, rowData: oj.ojGantt.Row, itemData: Array, componentElement: Element, maxWidth: number, maxHeight: number + } + } + namespace ojGantt { + type RowTask = + { + borderRadius?: string, end?: string, height?: number, id: K2, label?: string, labelPosition?: string|Array, labelStyle?: object, start?: string, shortDesc?: string, svgClassName?: string, svgStyle?: object, type?: 'normal'|'milestone'|'summary'|'auto', progress?: {borderRadius?: string, height?: string, svgClassName?: string, svgStyle?: object, value?: number}, baseline?: {borderRadius?: string, end?: string, height?: number, start?: string, svgClassName?: string, svgStyle?: object} + } + } + namespace ojGantt { + type TooltipContext = + { + parentElement: Element, data: oj.ojGantt.RowTask, rowData: oj.ojGantt.Row, itemData: D2, componentElement: Element, color: string + } + } + +} +declare namespace oj { + class ojGanttDependency extends JetElement { + predecessorTaskId: any; + shortDesc: string|null; + successorTaskId: any; + svgClassName: string; + svgStyle: object; + type: 'finishStart'|'finishFinish'|'startStart'|'startFinish'; + onPredecessorTaskIdChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onSuccessorTaskIdChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onTypeChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojGanttDependencyEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojGanttDependencyEventMap extends oj.JetElementEventMap { + 'predecessorTaskIdChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'successorTaskIdChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'typeChanged': CustomEvent; + } + interface ojGanttDependencySettableProperties extends JetSettableProperties { + predecessorTaskId: any; + shortDesc: string|null; + successorTaskId: any; + svgClassName: string; + svgStyle: object; + type: 'finishStart'|'finishFinish'|'startStart'|'startFinish'; + } + +} +declare namespace oj { + class ojGanttRow extends JetElement { + label: string; + labelStyle: object; + onLabelChanged: (event: CustomEvent)=> any; + onLabelStyleChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojGanttRowEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojGanttRowEventMap extends oj.JetElementEventMap { + 'labelChanged': CustomEvent; + 'labelStyleChanged': CustomEvent; + } + interface ojGanttRowSettableProperties extends JetSettableProperties { + label: string; + labelStyle: object; + } + +} +declare namespace oj { + class ojGanttTask extends JetElement { + baseline: {borderRadius?: string, end?: string, height?: number, start?: string, svgClassName?: string, svgStyle?: object}; + borderRadius: string; + end: string; + height: number|null; + label: string; + labelPosition: 'start'|'innerCenter'|'innerStart'|'innerEnd'|'end'|'none'; + labelStyle: object; + progress: {borderRadius?: string, height?: string, svgClassName?: string, svgStyle?: object, value?: number}; + rowId?: any; + shortDesc: string|null; + start: string; + svgClassName: string; + svgStyle: object; + type: 'normal'|'milestone'|'summary'|'auto'; + onBaselineChanged: (event: CustomEvent)=> any; + onBorderRadiusChanged: (event: CustomEvent)=> any; + onEndChanged: (event: CustomEvent)=> any; + onHeightChanged: (event: CustomEvent)=> any; + onLabelChanged: (event: CustomEvent)=> any; + onLabelPositionChanged: (event: CustomEvent)=> any; + onLabelStyleChanged: (event: CustomEvent)=> any; + onProgressChanged: (event: CustomEvent)=> any; + onRowIdChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onStartChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onTypeChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojGanttTaskEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojGanttTaskEventMap extends oj.JetElementEventMap { + 'baselineChanged': CustomEvent; + 'borderRadiusChanged': CustomEvent; + 'endChanged': CustomEvent; + 'heightChanged': CustomEvent; + 'labelChanged': CustomEvent; + 'labelPositionChanged': CustomEvent; + 'labelStyleChanged': CustomEvent; + 'progressChanged': CustomEvent; + 'rowIdChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'startChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'typeChanged': CustomEvent; + } + interface ojGanttTaskSettableProperties extends JetSettableProperties { + baseline: {borderRadius?: string, end?: string, height?: number, start?: string, svgClassName?: string, svgStyle?: object}; + borderRadius: string; + end: string; + height: number|null; + label: string; + labelPosition: 'start'|'innerCenter'|'innerStart'|'innerEnd'|'end'|'none'; + labelStyle: object; + progress: {borderRadius?: string, height?: string, svgClassName?: string, svgStyle?: object, value?: number}; + rowId?: any; + shortDesc: string|null; + start: string; + svgClassName: string; + svgStyle: object; + type: 'normal'|'milestone'|'summary'|'auto'; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojgauge/index.d.ts b/types/@oracle/oraclejet/ojs/ojgauge/index.d.ts new file mode 100644 index 0000000000..0c3efab804 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojgauge/index.d.ts @@ -0,0 +1,347 @@ +/// +declare namespace oj { + abstract class dvtBaseGauge extends dvtBaseComponent { + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + + addEventListener(type: T, listener: (this: HTMLElement, ev: dvtBaseGaugeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface dvtBaseGaugeEventMap extends oj.dvtBaseComponentEventMap { + } + interface dvtBaseGaugeSettableProperties extends dvtBaseComponentSettableProperties { + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + } + +} +declare namespace oj { + class ojLedGauge extends dvtBaseGauge { + borderColor: string; + color: string; + label: {style?: object, text?: string}; + max: number; + metricLabel: {converter?: Converter, rendered?: 'on'|'off', scaling?: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style?: object, text?: string, textType?: 'percent'|'number'}; + min: number; + rotation: 90|180|270|0; + size: number; + svgClassName: string; + svgStyle: object; + thresholds: Array; + tooltip: {renderer: ((context: oj.ojLedGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + type: 'arrow'|'diamond'|'square'|'rectangle'|'triangle'|'star'|'human'|'circle'; + value: number|null; + visualEffects: 'none'|'auto'; + onBorderColorChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onLabelChanged: (event: CustomEvent)=> any; + onMaxChanged: (event: CustomEvent)=> any; + onMetricLabelChanged: (event: CustomEvent)=> any; + onMinChanged: (event: CustomEvent)=> any; + onRotationChanged: (event: CustomEvent)=> any; + onSizeChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onThresholdsChanged: (event: CustomEvent)=> any; + onTooltipChanged: (event: CustomEvent)=> any; + onTypeChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onVisualEffectsChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojLedGaugeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getMetricLabel(): string; + } + interface ojLedGaugeEventMap extends oj.dvtBaseGaugeEventMap { + 'borderColorChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'labelChanged': CustomEvent; + 'maxChanged': CustomEvent; + 'metricLabelChanged': CustomEvent; + 'minChanged': CustomEvent; + 'rotationChanged': CustomEvent; + 'sizeChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'thresholdsChanged': CustomEvent; + 'tooltipChanged': CustomEvent; + 'typeChanged': CustomEvent; + 'valueChanged': CustomEvent; + 'visualEffectsChanged': CustomEvent; + } + interface ojLedGaugeSettableProperties extends dvtBaseGaugeSettableProperties { + borderColor: string; + color: string; + label: {style?: object, text?: string}; + max: number; + metricLabel: {converter?: Converter, rendered?: 'on'|'off', scaling?: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style?: object, text?: string, textType?: 'percent'|'number'}; + min: number; + rotation: 90|180|270|0; + size: number; + svgClassName: string; + svgStyle: object; + thresholds: Array; + tooltip: {renderer: ((context: oj.ojLedGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + type: 'arrow'|'diamond'|'square'|'rectangle'|'triangle'|'star'|'human'|'circle'; + value: number|null; + visualEffects: 'none'|'auto'; + } + namespace ojLedGauge { + type Threshold = + { + borderColor?: string, color?: string, max?: number, shortDesc?: string + } + } + namespace ojLedGauge { + type TooltipContext = + { + color: string, componentElement: Element, label: string, parentElement: Element + } + } + +} +declare namespace oj { + class ojRatingGauge extends dvtBaseGauge { + changed: boolean; + changedState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; + hoverState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; + max: number; + min: number; + orientation: 'vertical'|'horizontal'; + preserveAspectRatio: 'none'|'meet'; + readonly: boolean; + selectedState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; + step: 0.5|1; + thresholds: Array; + tooltip: {renderer: ((context: oj.ojRatingGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + readonly transientValue: number|null; + unselectedState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; + value: number|null; + visualEffects: 'none'|'auto'; + onChangedChanged: (event: CustomEvent)=> any; + onChangedStateChanged: (event: CustomEvent)=> any; + onHoverStateChanged: (event: CustomEvent)=> any; + onMaxChanged: (event: CustomEvent)=> any; + onMinChanged: (event: CustomEvent)=> any; + onOrientationChanged: (event: CustomEvent)=> any; + onPreserveAspectRatioChanged: (event: CustomEvent)=> any; + onReadonlyChanged: (event: CustomEvent)=> any; + onSelectedStateChanged: (event: CustomEvent)=> any; + onStepChanged: (event: CustomEvent)=> any; + onThresholdsChanged: (event: CustomEvent)=> any; + onTooltipChanged: (event: CustomEvent)=> any; + onTransientValueChanged: (event: CustomEvent)=> any; + onUnselectedStateChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onVisualEffectsChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojRatingGaugeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojRatingGaugeEventMap extends oj.dvtBaseGaugeEventMap { + 'changedChanged': CustomEvent; + 'changedStateChanged': CustomEvent; + 'hoverStateChanged': CustomEvent; + 'maxChanged': CustomEvent; + 'minChanged': CustomEvent; + 'orientationChanged': CustomEvent; + 'preserveAspectRatioChanged': CustomEvent; + 'readonlyChanged': CustomEvent; + 'selectedStateChanged': CustomEvent; + 'stepChanged': CustomEvent; + 'thresholdsChanged': CustomEvent; + 'tooltipChanged': CustomEvent; + 'transientValueChanged': CustomEvent; + 'unselectedStateChanged': CustomEvent; + 'valueChanged': CustomEvent; + 'visualEffectsChanged': CustomEvent; + } + interface ojRatingGaugeSettableProperties extends dvtBaseGaugeSettableProperties { + changed: boolean; + changedState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; + hoverState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; + max: number; + min: number; + orientation: 'vertical'|'horizontal'; + preserveAspectRatio: 'none'|'meet'; + readonly: boolean; + selectedState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; + step: 0.5|1; + thresholds: Array; + tooltip: {renderer: ((context: oj.ojRatingGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + readonly transientValue: number|null; + unselectedState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; + value: number|null; + visualEffects: 'none'|'auto'; + } + namespace ojRatingGauge { + type Threshold = + { + borderColor?: string, color?: string, max?: number, shortDesc?: string + } + } + namespace ojRatingGauge { + type TooltipContext = + { + color: string, componentElement: Element, label: string, parentElement: Element + } + } + +} +declare namespace oj { + class ojStatusMeterGauge extends dvtBaseGauge { + angleExtent: number; + animationDuration?: number; + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + borderColor: string; + borderRadius: string; + center: {renderer: ((context: oj.ojStatusMeterGauge.CenterContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + color: string; + indicatorSize: number; + innerRadius: number; + label: {position?: 'center'|'start'|'auto', style?: object, text?: string}; + max: number; + metricLabel: {converter?: Converter, position?: 'center'|'insideIndicatorEdge'|'outsideIndicatorEdge'|'outsidePlotArea'|'withLabel'|'auto', rendered?: 'on'|'off'|'auto', scaling?: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style?: object, text?: string, textType?: 'percent'|'number'}; + min: number; + orientation: 'circular'|'vertical'|'horizontal'; + plotArea: {borderColor?: string, borderRadius?: string, color?: string, rendered?: 'on'|'off'|'auto', svgClassName?: string, svgStyle?: object}; + readonly: boolean; + referenceLines: Array; + startAngle: number; + step: number|null; + svgClassName: string; + svgStyle: object; + thresholdDisplay: 'currentOnly'|'all'|'onIndicator'; + thresholds: Array; + tooltip: {renderer: ((context: oj.ojStatusMeterGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + readonly transientValue: number|null; + value: number|null; + visualEffects: 'none'|'auto'; + onAngleExtentChanged: (event: CustomEvent)=> any; + onAnimationDurationChanged: (event: CustomEvent)=> any; + onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; + onAnimationOnDisplayChanged: (event: CustomEvent)=> any; + onBorderColorChanged: (event: CustomEvent)=> any; + onBorderRadiusChanged: (event: CustomEvent)=> any; + onCenterChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onIndicatorSizeChanged: (event: CustomEvent)=> any; + onInnerRadiusChanged: (event: CustomEvent)=> any; + onLabelChanged: (event: CustomEvent)=> any; + onMaxChanged: (event: CustomEvent)=> any; + onMetricLabelChanged: (event: CustomEvent)=> any; + onMinChanged: (event: CustomEvent)=> any; + onOrientationChanged: (event: CustomEvent)=> any; + onPlotAreaChanged: (event: CustomEvent)=> any; + onReadonlyChanged: (event: CustomEvent)=> any; + onReferenceLinesChanged: (event: CustomEvent)=> any; + onStartAngleChanged: (event: CustomEvent)=> any; + onStepChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onThresholdDisplayChanged: (event: CustomEvent)=> any; + onThresholdsChanged: (event: CustomEvent)=> any; + onTooltipChanged: (event: CustomEvent)=> any; + onTransientValueChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onVisualEffectsChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojStatusMeterGaugeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getMetricLabel(): string; + } + interface ojStatusMeterGaugeEventMap extends oj.dvtBaseGaugeEventMap { + 'angleExtentChanged': CustomEvent; + 'animationDurationChanged': CustomEvent; + 'animationOnDataChangeChanged': CustomEvent; + 'animationOnDisplayChanged': CustomEvent; + 'borderColorChanged': CustomEvent; + 'borderRadiusChanged': CustomEvent; + 'centerChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'indicatorSizeChanged': CustomEvent; + 'innerRadiusChanged': CustomEvent; + 'labelChanged': CustomEvent; + 'maxChanged': CustomEvent; + 'metricLabelChanged': CustomEvent; + 'minChanged': CustomEvent; + 'orientationChanged': CustomEvent; + 'plotAreaChanged': CustomEvent; + 'readonlyChanged': CustomEvent; + 'referenceLinesChanged': CustomEvent; + 'startAngleChanged': CustomEvent; + 'stepChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'thresholdDisplayChanged': CustomEvent; + 'thresholdsChanged': CustomEvent; + 'tooltipChanged': CustomEvent; + 'transientValueChanged': CustomEvent; + 'valueChanged': CustomEvent; + 'visualEffectsChanged': CustomEvent; + } + interface ojStatusMeterGaugeSettableProperties extends dvtBaseGaugeSettableProperties { + angleExtent: number; + animationDuration?: number; + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + borderColor: string; + borderRadius: string; + center: {renderer: ((context: oj.ojStatusMeterGauge.CenterContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + color: string; + indicatorSize: number; + innerRadius: number; + label: {position?: 'center'|'start'|'auto', style?: object, text?: string}; + max: number; + metricLabel: {converter?: Converter, position?: 'center'|'insideIndicatorEdge'|'outsideIndicatorEdge'|'outsidePlotArea'|'withLabel'|'auto', rendered?: 'on'|'off'|'auto', scaling?: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style?: object, text?: string, textType?: 'percent'|'number'}; + min: number; + orientation: 'circular'|'vertical'|'horizontal'; + plotArea: {borderColor?: string, borderRadius?: string, color?: string, rendered?: 'on'|'off'|'auto', svgClassName?: string, svgStyle?: object}; + readonly: boolean; + referenceLines: Array; + startAngle: number; + step: number|null; + svgClassName: string; + svgStyle: object; + thresholdDisplay: 'currentOnly'|'all'|'onIndicator'; + thresholds: Array; + tooltip: {renderer: ((context: oj.ojStatusMeterGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + readonly transientValue: number|null; + value: number|null; + visualEffects: 'none'|'auto'; + } + namespace ojStatusMeterGauge { + type Bounds = + { + x: number, y: number, width: number, height: number + } + } + namespace ojStatusMeterGauge { + type CenterContext = + { + componentElement: Element, innerBounds: oj.ojStatusMeterGauge.Bounds, metricLabel: string, outerBounds: oj.ojStatusMeterGauge.Bounds + } + } + namespace ojStatusMeterGauge { + type ReferenceLine = + { + color?: string, value?: number + } + } + namespace ojStatusMeterGauge { + type Threshold = + { + borderColor?: string, color?: string, max?: number, shortDesc?: string + } + } + namespace ojStatusMeterGauge { + type TooltipContext = + { + color: string, componentElement: Element, label: string, parentElement: Element + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojindexer/index.d.ts b/types/@oracle/oraclejet/ojs/ojindexer/index.d.ts new file mode 100644 index 0000000000..49b10e2bfa --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojindexer/index.d.ts @@ -0,0 +1,13 @@ +declare namespace oj { + interface IndexerModel { + getIndexableSections(): Array|Array; + getMissingSections(): Array|Array; + setSection(section: string|object): Promise|Promise; + } + var IndexerModel: { + prototype: IndexerModel; + + SECTION_OTHERS: {id: string, label: string}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojinputnumber/index.d.ts b/types/@oracle/oraclejet/ojs/ojinputnumber/index.d.ts new file mode 100644 index 0000000000..ea03d4c8d3 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojinputnumber/index.d.ts @@ -0,0 +1,95 @@ +/// +/// +/// +declare namespace oj { + class ojInputNumber extends editableValue { + asyncValidators: Array>; + autocomplete: 'on'|'off'|string; + autofocus: boolean; + converter: oj.Converter|oj.Validation.RegisteredConverter; + max: number|null; + min: number|null; + name: string; + placeholder: string|null; + readonly rawValue: string; + readonly: boolean|null; + required: boolean; + step: number|null; + validators: Array|oj.Validation.RegisteredValidator>; + value: number|null; + virtualKeyboard: 'auto'|'number'|'text'; + translations: {numberRange?: {hint?: {exact?: string, inRange?: string, max?: string, min?: string}, messageDetail?: {exact?: string, rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipDecrement?: string, tooltipIncrement?: string}; + onAsyncValidatorsChanged: (event: CustomEvent)=> any; + onAutocompleteChanged: (event: CustomEvent)=> any; + onAutofocusChanged: (event: CustomEvent)=> any; + onConverterChanged: (event: CustomEvent)=> any; + onMaxChanged: (event: CustomEvent)=> any; + onMinChanged: (event: CustomEvent)=> any; + onNameChanged: (event: CustomEvent)=> any; + onPlaceholderChanged: (event: CustomEvent)=> any; + onRawValueChanged: (event: CustomEvent)=> any; + onReadonlyChanged: (event: CustomEvent)=> any; + onRequiredChanged: (event: CustomEvent)=> any; + onStepChanged: (event: CustomEvent)=> any; + onValidatorsChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onVirtualKeyboardChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojInputNumber.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojInputNumber.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputNumberEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + stepDown(steps?: number): void; + stepUp(steps?: number): void; + validate(): Promise; + } + namespace ojInputNumber { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojInputNumberEventMap extends oj.editableValueEventMap { + 'ojAnimateEnd': oj.ojInputNumber.ojAnimateEnd; + 'ojAnimateStart': oj.ojInputNumber.ojAnimateStart; + 'asyncValidatorsChanged': CustomEvent; + 'autocompleteChanged': CustomEvent; + 'autofocusChanged': CustomEvent; + 'converterChanged': CustomEvent; + 'maxChanged': CustomEvent; + 'minChanged': CustomEvent; + 'nameChanged': CustomEvent; + 'placeholderChanged': CustomEvent; + 'rawValueChanged': CustomEvent; + 'readonlyChanged': CustomEvent; + 'requiredChanged': CustomEvent; + 'stepChanged': CustomEvent; + 'validatorsChanged': CustomEvent; + 'valueChanged': CustomEvent; + 'virtualKeyboardChanged': CustomEvent; + } + interface ojInputNumberSettableProperties extends editableValueSettableProperties { + asyncValidators: Array>; + autocomplete: 'on'|'off'|string; + autofocus: boolean; + converter: oj.Converter|oj.Validation.RegisteredConverter; + max: number|null; + min: number|null; + name: string; + placeholder: string|null; + readonly rawValue: string; + readonly: boolean|null; + required: boolean; + step: number|null; + validators: Array|oj.Validation.RegisteredValidator>; + value: number|null; + virtualKeyboard: 'auto'|'number'|'text'; + translations: {numberRange?: {hint?: {exact?: string, inRange?: string, max?: string, min?: string}, messageDetail?: {exact?: string, rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipDecrement?: string, tooltipIncrement?: string}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojinputtext/index.d.ts b/types/@oracle/oraclejet/ojs/ojinputtext/index.d.ts new file mode 100644 index 0000000000..248bf14f58 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojinputtext/index.d.ts @@ -0,0 +1,178 @@ +/// +/// +/// +/// +declare namespace oj { + abstract class inputBase, SV= V, RV= V> extends editableValue { + asyncValidators: Array>; + autocomplete: 'on'|'off'|string; + autofocus: boolean; + name: string; + placeholder: string; + readonly rawValue: RV; + readonly: boolean; + required: boolean; + validators: Array|oj.Validation.RegisteredValidator>|null; + translations: {regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; + onAsyncValidatorsChanged: (event: CustomEvent)=> any; + onAutocompleteChanged: (event: CustomEvent)=> any; + onAutofocusChanged: (event: CustomEvent)=> any; + onNameChanged: (event: CustomEvent)=> any; + onPlaceholderChanged: (event: CustomEvent)=> any; + onRawValueChanged: (event: CustomEvent)=> any; + onReadonlyChanged: (event: CustomEvent)=> any; + onRequiredChanged: (event: CustomEvent)=> any; + onValidatorsChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.inputBase.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.inputBase.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: inputBaseEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + validate(): Promise<'valid'|'invalid'>; + } + namespace inputBase { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface inputBaseEventMap extends oj.editableValueEventMap { + 'ojAnimateEnd': oj.inputBase.ojAnimateEnd; + 'ojAnimateStart': oj.inputBase.ojAnimateStart; + 'asyncValidatorsChanged': CustomEvent; + 'autocompleteChanged': CustomEvent; + 'autofocusChanged': CustomEvent; + 'nameChanged': CustomEvent; + 'placeholderChanged': CustomEvent; + 'rawValueChanged': CustomEvent; + 'readonlyChanged': CustomEvent; + 'requiredChanged': CustomEvent; + 'validatorsChanged': CustomEvent; + } + interface inputBaseSettableProperties extends editableValueSettableProperties { + asyncValidators: Array>; + autocomplete: 'on'|'off'|string; + autofocus: boolean; + name: string; + placeholder: string; + readonly rawValue: RV; + readonly: boolean; + required: boolean; + validators: Array|oj.Validation.RegisteredValidator>|null; + translations: {regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; + } + +} +declare namespace oj { + class ojInputPassword extends inputBase { + value: string|null; + translations: {regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojInputPassword.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojInputPassword.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputPasswordEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojInputPassword { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojInputPasswordEventMap extends oj.inputBaseEventMap { + 'ojAnimateEnd': oj.ojInputPassword.ojAnimateEnd; + 'ojAnimateStart': oj.ojInputPassword.ojAnimateStart; + 'valueChanged': CustomEvent; + } + interface ojInputPasswordSettableProperties extends inputBaseSettableProperties { + value: string|null; + translations: {regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; + } + +} +declare namespace oj { + class ojInputText extends inputBase { + clearIcon: 'never'|'always'|'conditional'; + converter: oj.Converter|oj.Validation.RegisteredConverter|null; + list: string; + virtualKeyboard: 'auto'|'email'|'number'|'search'|'tel'|'text'|'url'; + onClearIconChanged: (event: CustomEvent)=> any; + onConverterChanged: (event: CustomEvent)=> any; + onListChanged: (event: CustomEvent)=> any; + onVirtualKeyboardChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojInputText.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojInputText.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputTextEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojInputText { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojInputTextEventMap extends oj.inputBaseEventMap { + 'ojAnimateEnd': oj.ojInputText.ojAnimateEnd; + 'ojAnimateStart': oj.ojInputText.ojAnimateStart; + 'clearIconChanged': CustomEvent; + 'converterChanged': CustomEvent; + 'listChanged': CustomEvent; + 'virtualKeyboardChanged': CustomEvent; + } + interface ojInputTextSettableProperties extends inputBaseSettableProperties { + clearIcon: 'never'|'always'|'conditional'; + converter: oj.Converter|oj.Validation.RegisteredConverter|null; + list: string; + virtualKeyboard: 'auto'|'email'|'number'|'search'|'tel'|'text'|'url'; + } + +} +declare namespace oj { + class ojTextArea extends inputBase { + converter: oj.Converter|oj.Validation.RegisteredConverter|null; + rows: number; + onConverterChanged: (event: CustomEvent)=> any; + onRowsChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojTextArea.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojTextArea.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTextAreaEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojTextArea { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojTextAreaEventMap extends oj.inputBaseEventMap { + 'ojAnimateEnd': oj.ojTextArea.ojAnimateEnd; + 'ojAnimateStart': oj.ojTextArea.ojAnimateStart; + 'converterChanged': CustomEvent; + 'rowsChanged': CustomEvent; + } + interface ojTextAreaSettableProperties extends inputBaseSettableProperties { + converter: oj.Converter|oj.Validation.RegisteredConverter|null; + rows: number; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojkeyset/index.d.ts b/types/@oracle/oraclejet/ojs/ojkeyset/index.d.ts new file mode 100644 index 0000000000..f6608c7f7d --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojkeyset/index.d.ts @@ -0,0 +1,32 @@ +export class ExpandAllKeySet extends KeySet { + constructor(); + add(keys: Set|Array): ExpandAllKeySet + addAll(): ExpandAllKeySet + clear(): ExpandedKeySet + delete(keys: Set|Array): ExpandAllKeySet + deletedValues(): Set; + has(): ExpandAllKeySet + isAddAll(): boolean; + } + +export class ExpandedKeySet extends KeySet { + constructor(keys?: Set|Array); + add(keys: Set|Array): ExpandedKeySet + addAll(): ExpandAllKeySet + clear(): ExpandedKeySet + delete(keys: Set|Array): ExpandedKeySet + has(key: K): boolean; + isAddAll(): boolean; + values(): Set; + } + +export abstract class KeySet { + abstract add>(keys: Set|Array): KS + abstract addAll>(): KS + abstract clear>(): KS + abstract delete>(keys: Set|Array): KS + abstract has(key: K): boolean; + abstract isAddAll(): boolean; + } + + export as namespace KeySet; diff --git a/types/@oracle/oraclejet/ojs/ojknockout-keyset/index.d.ts b/types/@oracle/oraclejet/ojs/ojknockout-keyset/index.d.ts new file mode 100644 index 0000000000..71d1945a6c --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojknockout-keyset/index.d.ts @@ -0,0 +1,9 @@ +/// +export class ObservableExpandedKeySet { + constructor(initialValue?: KeySet.ExpandedKeySet|KeySet.ExpandAllKeySet); + add(keys: Set|Array): ObservableExpandedKeySet; + addAll(): ObservableExpandedKeySet; + clear(): ObservableExpandedKeySet; + delete(keys: Set|Array): ObservableExpandedKeySet; + } + diff --git a/types/@oracle/oraclejet/ojs/ojknockout-model/index.d.ts b/types/@oracle/oraclejet/ojs/ojknockout-model/index.d.ts new file mode 100644 index 0000000000..21bf95f0dc --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojknockout-model/index.d.ts @@ -0,0 +1,7 @@ +/// +declare namespace oj { + class KnockoutUtils { + static map(m: object, callback?: ((param0: object)=> void), array?: boolean): Array>|KnockoutObservableArray; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojknockout/index.d.ts b/types/@oracle/oraclejet/ojs/ojknockout/index.d.ts new file mode 100644 index 0000000000..f388d46c92 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojknockout/index.d.ts @@ -0,0 +1,14 @@ +/// +declare namespace oj { + namespace KnockoutTemplateUtils { + function getRenderer(template: string, bReplaceNode?: boolean): ((param0: object)=> void); + } + +} +declare namespace oj { + class ResponsiveKnockoutUtils { + static createMediaQueryObservable(queryString: string): KnockoutObservable; + static createScreenRangeObservable(): KnockoutObservable; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojlabel/index.d.ts b/types/@oracle/oraclejet/ojs/ojlabel/index.d.ts new file mode 100644 index 0000000000..c10e0daf17 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojlabel/index.d.ts @@ -0,0 +1,33 @@ +/// +declare namespace oj { + class ojLabel extends baseComponent { + for: string|null; + help: {definition?: string|null, source?: string|null}; + labelId: string|null; + showRequired: boolean|null; + translations: {tooltipHelp?: string, tooltipRequired?: string}; + onForChanged: (event: CustomEvent)=> any; + onHelpChanged: (event: CustomEvent)=> any; + onLabelIdChanged: (event: CustomEvent)=> any; + onShowRequiredChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojLabelEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + } + interface ojLabelEventMap extends oj.baseComponentEventMap { + 'forChanged': CustomEvent; + 'helpChanged': CustomEvent; + 'labelIdChanged': CustomEvent; + 'showRequiredChanged': CustomEvent; + } + interface ojLabelSettableProperties extends baseComponentSettableProperties { + for: string|null; + help: {definition?: string|null, source?: string|null}; + labelId: string|null; + showRequired: boolean|null; + translations: {tooltipHelp?: string, tooltipRequired?: string}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojlabelvalue/index.d.ts b/types/@oracle/oraclejet/ojs/ojlabelvalue/index.d.ts new file mode 100644 index 0000000000..c1649bedd7 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojlabelvalue/index.d.ts @@ -0,0 +1,25 @@ +declare namespace oj { + class ojLabelValue extends JetElement { + labelEdge: 'start'|'top'|'inherit'; + labelWidth: string; + onLabelEdgeChanged: (event: CustomEvent)=> any; + onLabelWidthChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojLabelValueEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getProperty(property: string): any; + refresh(): void; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + } + interface ojLabelValueEventMap extends oj.JetElementEventMap { + 'labelEdgeChanged': CustomEvent; + 'labelWidthChanged': CustomEvent; + } + interface ojLabelValueSettableProperties extends JetSettableProperties { + labelEdge: 'start'|'top'|'inherit'; + labelWidth: string; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojlegend/index.d.ts b/types/@oracle/oraclejet/ojs/ojlegend/index.d.ts new file mode 100644 index 0000000000..36f940f25c --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojlegend/index.d.ts @@ -0,0 +1,230 @@ +/// +/// +declare namespace oj { + class ojLegend extends dvtBaseComponent> { + as: string; + data: oj.DataProvider|null; + drilling: 'on'|'off'; + expanded: KeySet.KeySet|null; + halign: 'center'|'end'|'start'; + hiddenCategories: Array; + hideAndShowBehavior: 'on'|'off'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + hoverBehaviorDelay: number; + orientation: 'horizontal'|'vertical'; + scrolling: 'off'|'asNeeded'; + symbolHeight: number; + symbolWidth: number; + textStyle?: object; + valign: 'middle'|'bottom'|'top'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + onAsChanged: (event: CustomEvent)=> any; + onDataChanged: (event: CustomEvent)=> any; + onDrillingChanged: (event: CustomEvent)=> any; + onExpandedChanged: (event: CustomEvent)=> any; + onHalignChanged: (event: CustomEvent)=> any; + onHiddenCategoriesChanged: (event: CustomEvent)=> any; + onHideAndShowBehaviorChanged: (event: CustomEvent)=> any; + onHighlightedCategoriesChanged: (event: CustomEvent)=> any; + onHoverBehaviorChanged: (event: CustomEvent)=> any; + onHoverBehaviorDelayChanged: (event: CustomEvent)=> any; + onOrientationChanged: (event: CustomEvent)=> any; + onScrollingChanged: (event: CustomEvent)=> any; + onSymbolHeightChanged: (event: CustomEvent)=> any; + onSymbolWidthChanged: (event: CustomEvent)=> any; + onTextStyleChanged: (event: CustomEvent)=> any; + onValignChanged: (event: CustomEvent)=> any; + onOjDrill: (event: oj.ojLegend.ojDrill)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojLegendEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getContextByNode(node: Element): oj.ojLegend.NodeContext|null; + getItem(subIdPath: Array): oj.ojLegend.ItemContext|null; + getPreferredSize(): oj.ojLegend.PreferredSize|null; + getSection(subIdPath: Array): oj.ojLegend.SectionContext|null; + } + namespace ojLegend { + class ojDrill extends CustomEvent<{id: any, [propName: string]: any}> { + + } + } + interface ojLegendEventMap extends oj.dvtBaseComponentEventMap { + 'ojDrill': oj.ojLegend.ojDrill; + 'asChanged': CustomEvent; + 'dataChanged': CustomEvent; + 'drillingChanged': CustomEvent; + 'expandedChanged': CustomEvent; + 'halignChanged': CustomEvent; + 'hiddenCategoriesChanged': CustomEvent; + 'hideAndShowBehaviorChanged': CustomEvent; + 'highlightedCategoriesChanged': CustomEvent; + 'hoverBehaviorChanged': CustomEvent; + 'hoverBehaviorDelayChanged': CustomEvent; + 'orientationChanged': CustomEvent; + 'scrollingChanged': CustomEvent; + 'symbolHeightChanged': CustomEvent; + 'symbolWidthChanged': CustomEvent; + 'textStyleChanged': CustomEvent; + 'valignChanged': CustomEvent; + } + interface ojLegendSettableProperties extends dvtBaseComponentSettableProperties { + as: string; + data: oj.DataProvider|null; + drilling: 'on'|'off'; + expanded: KeySet.KeySet|null; + halign: 'center'|'end'|'start'; + hiddenCategories: Array; + hideAndShowBehavior: 'on'|'off'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + hoverBehaviorDelay: number; + orientation: 'horizontal'|'vertical'; + scrolling: 'off'|'asNeeded'; + symbolHeight: number; + symbolWidth: number; + textStyle?: object; + valign: 'middle'|'bottom'|'top'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + } + namespace ojLegend { + type ItemContext = + { + text: string + } + } + namespace ojLegend { + type NodeContext = + { + itemIndex: number, sectionIndexPath: Array, subId: string + } + } + namespace ojLegend { + type PreferredSize = + { + width: number, height: number + } + } + namespace ojLegend { + type SectionContext = + { + title: string, sections: Array, items: Array, getSection: {title: string, sections: string, items: boolean}, getItems: {text: string} + } + } + +} +declare namespace oj { + class ojLegendItem extends JetElement { + borderColor?: string; + categories?: Array; + categoryVisibility?: 'hidden'|'visible'; + color?: string; + drilling?: 'on'|'off'|'inherit'; + lineStyle?: 'dotted'|'dashed'|'solid'; + lineWidth?: number; + markerColor?: string; + markerShape: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string; + markerSvgClassName?: string; + markerSvgStyle?: object; + pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'; + shortDesc?: string; + source?: string; + svgClassName?: string; + svgStyle?: object; + symbolType?: 'line'|'lineWithMarker'|'image'|'marker'; + text: string; + onBorderColorChanged: (event: CustomEvent)=> any; + onCategoriesChanged: (event: CustomEvent)=> any; + onCategoryVisibilityChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onDrillingChanged: (event: CustomEvent)=> any; + onLineStyleChanged: (event: CustomEvent)=> any; + onLineWidthChanged: (event: CustomEvent)=> any; + onMarkerColorChanged: (event: CustomEvent)=> any; + onMarkerShapeChanged: (event: CustomEvent)=> any; + onMarkerSvgClassNameChanged: (event: CustomEvent)=> any; + onMarkerSvgStyleChanged: (event: CustomEvent)=> any; + onPatternChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onSourceChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onSymbolTypeChanged: (event: CustomEvent)=> any; + onTextChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojLegendItemEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojLegendItemEventMap extends oj.JetElementEventMap { + 'borderColorChanged': CustomEvent; + 'categoriesChanged': CustomEvent; + 'categoryVisibilityChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'drillingChanged': CustomEvent; + 'lineStyleChanged': CustomEvent; + 'lineWidthChanged': CustomEvent; + 'markerColorChanged': CustomEvent; + 'markerShapeChanged': CustomEvent; + 'markerSvgClassNameChanged': CustomEvent; + 'markerSvgStyleChanged': CustomEvent; + 'patternChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'sourceChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'symbolTypeChanged': CustomEvent; + 'textChanged': CustomEvent; + } + interface ojLegendItemSettableProperties extends JetSettableProperties { + borderColor?: string; + categories?: Array; + categoryVisibility?: 'hidden'|'visible'; + color?: string; + drilling?: 'on'|'off'|'inherit'; + lineStyle?: 'dotted'|'dashed'|'solid'; + lineWidth?: number; + markerColor?: string; + markerShape: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string; + markerSvgClassName?: string; + markerSvgStyle?: object; + pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'; + shortDesc?: string; + source?: string; + svgClassName?: string; + svgStyle?: object; + symbolType?: 'line'|'lineWithMarker'|'image'|'marker'; + text: string; + } + +} +declare namespace oj { + class ojLegendSection extends JetElement { + collapsible?: 'on'|'off'; + text?: string; + textHalign?: 'center'|'end'|'start'; + textStyle?: object; + onCollapsibleChanged: (event: CustomEvent)=> any; + onTextChanged: (event: CustomEvent)=> any; + onTextHalignChanged: (event: CustomEvent)=> any; + onTextStyleChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojLegendSectionEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojLegendSectionEventMap extends oj.JetElementEventMap { + 'collapsibleChanged': CustomEvent; + 'textChanged': CustomEvent; + 'textHalignChanged': CustomEvent; + 'textStyleChanged': CustomEvent; + } + interface ojLegendSectionSettableProperties extends JetSettableProperties { + collapsible?: 'on'|'off'; + text?: string; + textHalign?: 'center'|'end'|'start'; + textStyle?: object; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojlistdataproviderview/index.d.ts b/types/@oracle/oraclejet/ojs/ojlistdataproviderview/index.d.ts new file mode 100644 index 0000000000..ed2b3d981f --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojlistdataproviderview/index.d.ts @@ -0,0 +1,21 @@ +/// +declare namespace oj { + class ListDataProviderView implements DataProvider { + dataMapping: DataMapping; + from: any; + offset: number; + sortCriteria: SortCriterion[]; + constructor(dataProvider: DataProvider, options?: {from?: object, offset?: number, sortCriteria?: SortCriterion[], dataMapping?: DataMapping}); + addEventListener(eventType: string, listener: EventListener): void + containsKeys(params: FetchByKeysParameters): Promise> + dispatchEvent(evt: Event): boolean + fetchByKeys(params: FetchByKeysParameters): Promise> + fetchByOffset(params: FetchByOffsetParameters): Promise> + fetchFirst>(params?: FetchListParameters): AsyncIterable + getCapability(capabilityName: string) + getTotalSize(): Promise; + isEmpty(): 'yes'|'no'|'unknown'; + removeEventListener(eventType: string, listener: EventListener): void + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojlistview/index.d.ts b/types/@oracle/oraclejet/ojs/ojlistview/index.d.ts new file mode 100644 index 0000000000..cb4289b6ea --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojlistview/index.d.ts @@ -0,0 +1,167 @@ +/// +/// +/// +declare namespace oj { + class ojListView extends baseComponent> { + as: string; + currentItem: K; + data: oj.DataProvider; + dnd: {drag?: {items: {dataTypes?: string|Array, drag?: ((param0: Event)=> void), dragEnd?: ((param0: Event)=> void), dragStart?: ((param0: Event, param1: {items:Array})=> void)}}, drop?: {items: {dataTypes?: string|Array, dragEnter?: ((param0: Event, param1: {item:Element})=> void), dragLeave?: ((param0: Event, param1: {item:Element})=> void), dragOver?: ((param0: Event, param1: {item:Element})=> void), drop?: ((param0: Event, param1: oj.ojListView.ItemsDropContext)=> void)}}, reorder: {items: 'enabled'|'disabled'}}; + drillMode: 'collapsible'|'none'; + expanded: KeySet.KeySet; + readonly firstSelectedItem: {key: K, data: D}; + groupHeaderPosition: 'static'|'sticky'; + item: {focusable?: ((param0: oj.ojListView.ItemContext) => boolean)|boolean, renderer?: ((param0: oj.ojListView.ItemContext) => {insert: Element|string}|undefined)|null, selectable?: ((param0: oj.ojListView.ItemContext) => boolean)|boolean}; + scrollPolicy: 'auto'|'loadMoreOnScroll'; + scrollPolicyOptions: {fetchSize?: number, maxCount?: number, scroller?: Element}; + scrollPosition: {x?: number, y?: number, index?: number, parent?: K, key?: K, offsetX?: number, offsetY?: number}; + selection: Array; + selectionMode: 'none'|'single'|'multiple'; + selectionRequired: boolean; + translations: {accessibleNavigateSkipItems?: string, accessibleReorderAfterItem?: string, accessibleReorderBeforeItem?: string, accessibleReorderInsideItem?: string, accessibleReorderTouchInstructionText?: string, indexerCharacters?: string, labelCopy?: string, labelCut?: string, labelPaste?: string, labelPasteAfter?: string, labelPasteBefore?: string, msgFetchingData?: string, msgNoData?: string}; + onAsChanged: (event: CustomEvent)=> any; + onCurrentItemChanged: (event: CustomEvent)=> any; + onDataChanged: (event: CustomEvent)=> any; + onDndChanged: (event: CustomEvent)=> any; + onDrillModeChanged: (event: CustomEvent)=> any; + onExpandedChanged: (event: CustomEvent)=> any; + onFirstSelectedItemChanged: (event: CustomEvent)=> any; + onGroupHeaderPositionChanged: (event: CustomEvent)=> any; + onItemChanged: (event: CustomEvent)=> any; + onScrollPolicyChanged: (event: CustomEvent)=> any; + onScrollPolicyOptionsChanged: (event: CustomEvent)=> any; + onScrollPositionChanged: (event: CustomEvent)=> any; + onSelectionChanged: (event: CustomEvent)=> any; + onSelectionModeChanged: (event: CustomEvent)=> any; + onSelectionRequiredChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojListView.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojListView.ojAnimateStart)=> any; + onOjBeforeCollapse: (event: oj.ojListView.ojBeforeCollapse)=> any; + onOjBeforeCurrentItem: (event: oj.ojListView.ojBeforeCurrentItem)=> any; + onOjBeforeExpand: (event: oj.ojListView.ojBeforeExpand)=> any; + onOjCollapse: (event: oj.ojListView.ojCollapse)=> any; + onOjCopy: (event: oj.ojListView.ojCopy)=> any; + onOjCut: (event: oj.ojListView.ojCut)=> any; + onOjExpand: (event: oj.ojListView.ojExpand)=> any; + onOjPaste: (event: oj.ojListView.ojPaste)=> any; + onOjReorder: (event: oj.ojListView.ojReorder)=> any; + + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojListViewEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getContextByNode(node: Element): oj.ojListView.ContextByNode|null; + getDataForVisibleItem(context: {key?: K, index?: number, parent?: Element}): D; + refresh(): void; + scrollToItem(item: {key: K}): void; + } + namespace ojListView { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + + class ojBeforeCollapse extends CustomEvent<{key: K, item: Element, [propName: string]: any}> { + + } + + class ojBeforeCurrentItem extends CustomEvent<{previousKey: K, previousItem: Element, key: K, item: Element, [propName: string]: any}> { + + } + + class ojBeforeExpand extends CustomEvent<{key: K, item: Element, [propName: string]: any}> { + + } + + class ojCollapse extends CustomEvent<{key: K, item: Element, [propName: string]: any}> { + + } + + class ojCopy extends CustomEvent<{items: Array, [propName: string]: any}> { + + } + + class ojCut extends CustomEvent<{items: Array, [propName: string]: any}> { + + } + + class ojExpand extends CustomEvent<{key: K, item: Element, [propName: string]: any}> { + + } + + class ojPaste extends CustomEvent<{item: Element, [propName: string]: any}> { + + } + + class ojReorder extends CustomEvent<{items: Array, position: string, reference: Element, [propName: string]: any}> { + + } + } + interface ojListViewEventMap extends oj.baseComponentEventMap { + 'ojAnimateEnd': oj.ojListView.ojAnimateEnd; + 'ojAnimateStart': oj.ojListView.ojAnimateStart; + 'ojBeforeCollapse': oj.ojListView.ojBeforeCollapse; + 'ojBeforeCurrentItem': oj.ojListView.ojBeforeCurrentItem; + 'ojBeforeExpand': oj.ojListView.ojBeforeExpand; + 'ojCollapse': oj.ojListView.ojCollapse; + 'ojCopy': oj.ojListView.ojCopy; + 'ojCut': oj.ojListView.ojCut; + 'ojExpand': oj.ojListView.ojExpand; + 'ojPaste': oj.ojListView.ojPaste; + 'ojReorder': oj.ojListView.ojReorder; + 'asChanged': CustomEvent; + 'currentItemChanged': CustomEvent; + 'dataChanged': CustomEvent; + 'dndChanged': CustomEvent; + 'drillModeChanged': CustomEvent; + 'expandedChanged': CustomEvent; + 'firstSelectedItemChanged': CustomEvent; + 'groupHeaderPositionChanged': CustomEvent; + 'itemChanged': CustomEvent; + 'scrollPolicyChanged': CustomEvent; + 'scrollPolicyOptionsChanged': CustomEvent; + 'scrollPositionChanged': CustomEvent; + 'selectionChanged': CustomEvent; + 'selectionModeChanged': CustomEvent; + 'selectionRequiredChanged': CustomEvent; + } + interface ojListViewSettableProperties extends baseComponentSettableProperties { + as: string; + currentItem: K; + data: oj.DataProvider; + dnd: {drag?: {items: {dataTypes?: string|Array, drag?: ((param0: Event)=> void), dragEnd?: ((param0: Event)=> void), dragStart?: ((param0: Event, param1: {items:Array})=> void)}}, drop?: {items: {dataTypes?: string|Array, dragEnter?: ((param0: Event, param1: {item:Element})=> void), dragLeave?: ((param0: Event, param1: {item:Element})=> void), dragOver?: ((param0: Event, param1: {item:Element})=> void), drop?: ((param0: Event, param1: oj.ojListView.ItemsDropContext)=> void)}}, reorder: {items: 'enabled'|'disabled'}}; + drillMode: 'collapsible'|'none'; + expanded: KeySet.KeySet; + readonly firstSelectedItem: {key: K, data: D}; + groupHeaderPosition: 'static'|'sticky'; + item: {focusable?: ((param0: oj.ojListView.ItemContext) => boolean)|boolean, renderer?: ((param0: oj.ojListView.ItemContext) => {insert: Element|string}|undefined)|null, selectable?: ((param0: oj.ojListView.ItemContext) => boolean)|boolean}; + scrollPolicy: 'auto'|'loadMoreOnScroll'; + scrollPolicyOptions: {fetchSize?: number, maxCount?: number, scroller?: Element}; + scrollPosition: {x?: number, y?: number, index?: number, parent?: K, key?: K, offsetX?: number, offsetY?: number}; + selection: Array; + selectionMode: 'none'|'single'|'multiple'; + selectionRequired: boolean; + translations: {accessibleNavigateSkipItems?: string, accessibleReorderAfterItem?: string, accessibleReorderBeforeItem?: string, accessibleReorderInsideItem?: string, accessibleReorderTouchInstructionText?: string, indexerCharacters?: string, labelCopy?: string, labelCut?: string, labelPaste?: string, labelPasteAfter?: string, labelPasteBefore?: string, msgFetchingData?: string, msgNoData?: string}; + } + namespace ojListView { + type ContextByNode = + { + subId: string, key: K, index: number, parent?: Element, group?: boolean + } + } + namespace ojListView { + type ItemContext = + { + datasource: oj.DataProvider, index: number, key: K, data: D, parentElement: Element, depth?: number, parentKey?: K, leaf?: boolean + } + } + namespace ojListView { + type ItemsDropContext = + { + item: Element, position: 'before'|'after'|'inside', reorder: boolean + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojmasonrylayout/index.d.ts b/types/@oracle/oraclejet/ojs/ojmasonrylayout/index.d.ts new file mode 100644 index 0000000000..f355ffc77b --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojmasonrylayout/index.d.ts @@ -0,0 +1,85 @@ +/// +declare namespace oj { + class ojMasonryLayout extends baseComponent { + reorderHandle: string|null; + translations: {labelCut?: string, labelPasteAfter?: string, labelPasteBefore?: string}; + onReorderHandleChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojMasonryLayout.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojMasonryLayout.ojAnimateStart)=> any; + onOjBeforeInsert: (event: oj.ojMasonryLayout.ojBeforeInsert)=> any; + onOjBeforeRemove: (event: oj.ojMasonryLayout.ojBeforeRemove)=> any; + onOjBeforeReorder: (event: oj.ojMasonryLayout.ojBeforeReorder)=> any; + onOjBeforeResize: (event: oj.ojMasonryLayout.ojBeforeResize)=> any; + onOjInsert: (event: oj.ojMasonryLayout.ojInsert)=> any; + onOjRemove: (event: oj.ojMasonryLayout.ojRemove)=> any; + onOjReorder: (event: oj.ojMasonryLayout.ojReorder)=> any; + onOjResize: (event: oj.ojMasonryLayout.ojResize)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojMasonryLayoutEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + insertTile(selector: string, index: number): void; + refresh(): void; + removeTile(selector: string): void; + resizeTile(selector: string, sizeStyleClass: string): void; + } + namespace ojMasonryLayout { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + + class ojBeforeInsert extends CustomEvent<{tile: Element, index: number, [propName: string]: any}> { + + } + + class ojBeforeRemove extends CustomEvent<{tile: Element, [propName: string]: any}> { + + } + + class ojBeforeReorder extends CustomEvent<{tile: Element, fromIndex: number, [propName: string]: any}> { + + } + + class ojBeforeResize extends CustomEvent<{tile: Element, previousSizeStyleClass: string, sizeStyleClass: string, [propName: string]: any}> { + + } + + class ojInsert extends CustomEvent<{tile: Element, index: number, [propName: string]: any}> { + + } + + class ojRemove extends CustomEvent<{tile: Element, [propName: string]: any}> { + + } + + class ojReorder extends CustomEvent<{tile: Element, fromIndex: number, toIndex: number, [propName: string]: any}> { + + } + + class ojResize extends CustomEvent<{tile: Element, previousSizeStyleClass: string, sizeStyleClass: string, [propName: string]: any}> { + + } + } + interface ojMasonryLayoutEventMap extends oj.baseComponentEventMap { + 'ojAnimateEnd': oj.ojMasonryLayout.ojAnimateEnd; + 'ojAnimateStart': oj.ojMasonryLayout.ojAnimateStart; + 'ojBeforeInsert': oj.ojMasonryLayout.ojBeforeInsert; + 'ojBeforeRemove': oj.ojMasonryLayout.ojBeforeRemove; + 'ojBeforeReorder': oj.ojMasonryLayout.ojBeforeReorder; + 'ojBeforeResize': oj.ojMasonryLayout.ojBeforeResize; + 'ojInsert': oj.ojMasonryLayout.ojInsert; + 'ojRemove': oj.ojMasonryLayout.ojRemove; + 'ojReorder': oj.ojMasonryLayout.ojReorder; + 'ojResize': oj.ojMasonryLayout.ojResize; + 'reorderHandleChanged': CustomEvent; + } + interface ojMasonryLayoutSettableProperties extends baseComponentSettableProperties { + reorderHandle: string|null; + translations: {labelCut?: string, labelPasteAfter?: string, labelPasteBefore?: string}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojmenu/index.d.ts b/types/@oracle/oraclejet/ojs/ojmenu/index.d.ts new file mode 100644 index 0000000000..cd2c08461c --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojmenu/index.d.ts @@ -0,0 +1,87 @@ +/// +declare namespace oj { + class ojMenu extends baseComponent { + disabled: boolean; + openOptions: oj.ojMenu.OpenOptions; + translations: {ariaFocusSkipLink?: string, labelCancel?: string}; + onDisabledChanged: (event: CustomEvent)=> any; + onOpenOptionsChanged: (event: CustomEvent)=> any; + onOjAction: (event: oj.ojMenu.ojAction)=> any; + onOjAnimateEnd: (event: oj.ojMenu.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojMenu.ojAnimateStart)=> any; + onOjBeforeOpen: (event: oj.ojMenu.ojBeforeOpen)=> any; + onOjClose: (event: oj.ojMenu.ojClose)=> any; + onOjOpen: (event: oj.ojMenu.ojOpen)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojMenuEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + open(event?: object, openOptions?: oj.ojMenu.OpenOptions): void; + refresh(): void; + } + namespace ojMenu { + class ojAction extends CustomEvent<{ [propName: string]: any}> { + + } + + class ojAnimateEnd extends CustomEvent<{element: Element, action: 'open'|'close', [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: 'open'|'close', element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + + class ojBeforeOpen extends CustomEvent<{ [propName: string]: any}> { + + } + + class ojClose extends CustomEvent<{event: Event, [propName: string]: any}> { + + } + + class ojOpen extends CustomEvent<{event: Event, [propName: string]: any}> { + + } + } + interface ojMenuEventMap extends oj.baseComponentEventMap { + 'ojAction': oj.ojMenu.ojAction; + 'ojAnimateEnd': oj.ojMenu.ojAnimateEnd; + 'ojAnimateStart': oj.ojMenu.ojAnimateStart; + 'ojBeforeOpen': oj.ojMenu.ojBeforeOpen; + 'ojClose': oj.ojMenu.ojClose; + 'ojOpen': oj.ojMenu.ojOpen; + 'disabledChanged': CustomEvent; + 'openOptionsChanged': CustomEvent; + } + interface ojMenuSettableProperties extends baseComponentSettableProperties { + disabled: boolean; + openOptions: oj.ojMenu.OpenOptions; + translations: {ariaFocusSkipLink?: string, labelCancel?: string}; + } + namespace ojMenu { + type OpenOptions = + { + display?: string, initialFocus?: string, launcher?: string|Element, position?: oj.ojMenu.Position + } + } + namespace ojMenu { + type Position = + { + my?: oj.ojMenu.PositionAlign, at?: oj.ojMenu.PositionAlign, offset?: oj.ojMenu.PositionPoint, of?: string|oj.ojMenu.PositionPoint, collision?: 'flip'|'fit'|'flipfit'|'flipcenter'|'none' + } + } + namespace ojMenu { + type PositionAlign = + { + vertical?: 'top'|'bottom'|'center', horizontal?: 'start'|'end'|'left'|'center'|'bottom' + } + } + namespace ojMenu { + type PositionPoint = + { + x?: number, y?: number + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojmenuselectmany/index.d.ts b/types/@oracle/oraclejet/ojs/ojmenuselectmany/index.d.ts new file mode 100644 index 0000000000..0f380df2f2 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojmenuselectmany/index.d.ts @@ -0,0 +1,36 @@ +/// +/// +declare namespace oj { + class ojMenuSelectMany extends JetElement { + disabled: boolean; + options: Array|oj.DataProvider|null; + value: Array; + onDisabledChanged: (event: CustomEvent)=> any; + onOptionsChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojMenuSelectManyEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getProperty(property: string): any; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + } + interface ojMenuSelectManyEventMap extends oj.JetElementEventMap { + 'disabledChanged': CustomEvent; + 'optionsChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojMenuSelectManySettableProperties extends JetSettableProperties { + disabled: boolean; + options: Array|oj.DataProvider|null; + value: Array; + } + namespace ojMenuSelectMany { + type Option = + { + id?: string, disabled?: boolean, label: string, value: any + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojmessage/index.d.ts b/types/@oracle/oraclejet/ojs/ojmessage/index.d.ts new file mode 100644 index 0000000000..8be478bd06 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojmessage/index.d.ts @@ -0,0 +1,51 @@ +declare namespace oj { + class ojMessage extends JetElement { + message: oj.ojMessage.Message; + translations: {categories?: {confirmation?: string, error?: string, info?: string, warning?: string}, labelCloseIcon?: string}; + onMessageChanged: (event: CustomEvent)=> any; + + onTranslationsChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojMessage.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojMessage.ojAnimateStart)=> any; + onOjClose: (event: oj.ojMessage.ojClose)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojMessageEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + close(): void; + getProperty(property: string): any; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + } + namespace ojMessage { + class ojAnimateEnd extends CustomEvent<{element: Element, action: 'open'|'close', [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{element: Element, action: 'open'|'close', endCallback: (()=> void), [propName: string]: any}> { + + } + + class ojClose extends CustomEvent<{message: object, [propName: string]: any}> { + + } + } + interface ojMessageEventMap extends oj.JetElementEventMap { + 'ojAnimateEnd': oj.ojMessage.ojAnimateEnd; + 'ojAnimateStart': oj.ojMessage.ojAnimateStart; + 'ojClose': oj.ojMessage.ojClose; + 'messageChanged': CustomEvent; + 'translationsChanged': CustomEvent; + } + interface ojMessageSettableProperties extends JetSettableProperties { + message: oj.ojMessage.Message; + translations: {categories?: {confirmation?: string, error?: string, info?: string, warning?: string}, labelCloseIcon?: string}; + } + namespace ojMessage { + type Message = + { + icon?: string, category?: string, severity?: 'error'|'warning'|'confirmation'|'info'|'none', timestamp?: string, summary?: string, detail?: string, autoTimeout?: number, closeAffordance?: 'none'|'defaults', sound?: string + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojmessages/index.d.ts b/types/@oracle/oraclejet/ojs/ojmessages/index.d.ts new file mode 100644 index 0000000000..3246de390f --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojmessages/index.d.ts @@ -0,0 +1,55 @@ +/// +/// +declare namespace oj { + class ojMessages extends JetElement { + display: 'general'|'notification'; + messages: Array | null | oj.DataProvider; + position: oj.ojMessages.Position|null; + translations: {ariaLiveRegion?: {navigationFromKeyboard?: string, navigationToKeyboard?: string, navigationToTouch?: string, newMessage?: string}, labelLandmark?: string}; + onDisplayChanged: (event: CustomEvent)=> any; + onMessagesChanged: (event: CustomEvent)=> any; + onPositionChanged: (event: CustomEvent)=> any; + + onTranslationsChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojMessagesEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + close(associated: object): void; + closeAll(closeFilter?: (message: oj.ojMessage.Message) => boolean): void; + getProperty(property: string): any; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + } + interface ojMessagesEventMap extends oj.JetElementEventMap { + 'displayChanged': CustomEvent; + 'messagesChanged': CustomEvent; + 'positionChanged': CustomEvent; + 'translationsChanged': CustomEvent; + } + interface ojMessagesSettableProperties extends JetSettableProperties { + display: 'general'|'notification'; + messages: Array | null | oj.DataProvider; + position: oj.ojMessages.Position|null; + translations: {ariaLiveRegion?: {navigationFromKeyboard?: string, navigationToKeyboard?: string, navigationToTouch?: string, newMessage?: string}, labelLandmark?: string}; + } + namespace ojMessages { + type Position = + { + my?: oj.ojMessages.PositionAlign, at?: oj.ojMessages.PositionAlign, offset?: oj.ojMessages.PositionPoint, of?: string|oj.ojMessages.PositionPoint, collision?: 'flip'|'fit'|'flipfit'|'none' + } + } + namespace ojMessages { + type PositionAlign = + { + vertical?: 'top'|'bottom'|'center', horizontal?: 'start'|'end'|'left'|'center'|'bottom' + } + } + namespace ojMessages { + type PositionPoint = + { + x?: number, y?: number + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojmessaging/index.d.ts b/types/@oracle/oraclejet/ojs/ojmessaging/index.d.ts new file mode 100644 index 0000000000..e65a3ddcc3 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojmessaging/index.d.ts @@ -0,0 +1,30 @@ +declare namespace oj { + class Message { + detail: string; + severity: string|number; + summary: string; + constructor(summary: string, detail: string, severity?: number|string); + static getMaxSeverity(messages?: Array): number; + static getSeverityLevel(severity?: string|number|undefined): number; + static getSeverityType(level?: string|number|undefined): string; + static isValid(messages: Array): boolean; + } + namespace Message { + enum SEVERITY_LEVEL { + FATAL = "5", + ERROR = "4", + WARNING = "3", + INFO = "2", + CONFIRMATION = "1", + } + enum SEVERITY_TYPE { + CONFIRMATION = "confirmation", + INFO = "info", + WARNING = "warning", + ERROR = "error", + FATAL = "fatal", + } + } + + +} diff --git a/types/@oracle/oraclejet/ojs/ojmodel/index.d.ts b/types/@oracle/oraclejet/ojs/ojmodel/index.d.ts new file mode 100644 index 0000000000..6e3ebe4118 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojmodel/index.d.ts @@ -0,0 +1,169 @@ +declare namespace oj { + class Collection { + changes: Array; + comparator: null|string|((param0: oj.Model, param1?: oj.Model)=> number); + customPagingOptions: ((response: object)=> oj.Collection.CustomPagingOptionsReturn|null)|null; + customURL: ((param0: string, param1: oj.Collection, param2: object)=> string|Object|null)|null; + fetchSize: number; + hasMore: boolean; + lastFetchCount: number; + lastFetchSize: number; + length: number; + model: object; + modelLimit: number; + models: Array; + offset: number; + omitLanguageHeader: boolean; + parse: ((param0: object)=> Object); + sortDirection: number; + totalResults: number; + url: null|string|(()=> string); + constructor(models?: Array, options?: object); + static extend(properties?: {parse?: (data: any)=> any, model?: oj.Model, url?: string, initialize?: (models: Array, options: Object)=> void, comparator?: null|string|((model1: oj.Model, model2?: oj.Model)=> number), fetchSize?: number, modelLimit?: number, [propName: string]: any}, classProperties?: object): any; + abort(): Promise; + add(m: oj.Model|object|Array|Array, options?: {silent?: boolean, at?: number, merge?: boolean, sort?: boolean, force?: boolean, deferred?: boolean, [propName: string]: any}): Promise>|Array; + any(iterator: ((param0: object)=> void), context?: object): boolean; + at(index: number, options?: {fetchSize?: number, deferred?: boolean, [propName: string]: any}): oj.Model|Promise|null; + clone(): oj.Collection; + contains(model: object, options?: object): boolean|Promise; + create(attributes?: object, options?: {silent?: boolean, at?: number, merge?: boolean, sort?: boolean, force?: boolean, deferred?: boolean, [propName: string]: any}): oj.Model|boolean|Promise; + difference(...var_args: (Array)[]): Array; + each(iterator: ((param0: oj.Model)=> void), context?: object): undefined; + fetch(options?: {success?: (collection: oj.Collection, response: Object, options: Object)=> void, error?: (collection: oj.Collection, xhr: Object, options: Object)=> void, add?: boolean, set?: boolean, startIndex?: number, startID?: Object, since?: Object, until?: Object, fetchSize?: number, [propName: string]: any}): object; + filter(iterator: ((param0: oj.Model)=> void), context?: object): Array; + findWhere(attrs: object|Array, options?: {deferred?: boolean, [propName: string]: any}): oj.Model|Promise; + first(n?: number, options?: object): Array|null|Promise; + get(id: object|string, options?: object): oj.Model|null|Promise; + getByCid(clientId: string): oj.Model|null; + groupBy(iterator: string|((param0: oj.Model)=> object), context?: object): object; + include(model: object, options?: object): boolean|Promise; + indexBy(iterator: string|((param0: oj.Model)=> void), context?: object): object; + indexOf(model: object, options?: object): number|Promise; + initial(n?: number): Array; + isEmpty(): boolean; + isRangeLocal(start: number, count: number): boolean; + last(n?: number, options?: object): Promise|Array|null; + lastIndexOf(model: oj.Model, fromIndex?: number): number; + listenTo(otherObj: object, eventType: string, callback: Function): undefined; + listenToOnce(otherObj: object, eventType: string, callback: Function): undefined; + map(iterator: ((param0: oj.Model)=> object), context?: object): Array; + max(iterator: ((param0: oj.Model)=> object), context?: object): object; + min(iterator: ((param0: object)=> void), context?: object): object; + modelId(attrs: object): null|string; + next(n: number, options?: {success?: (collection: oj.Collection, response: Object, options: Object)=> void, error?: (collection: oj.Collection, xhr: Object, options: Object)=> void, [propName: string]: any}): object|null; + off(eventType?: string|object, callback?: Function, context?: object): undefined; + on(eventType: string|object, callback: Function, context?: object): undefined; + once(eventType: string, callback: Function, context?: object): undefined; + pluck(attr: string): Array; + pop(options?: {silent?: boolean, deferred?: boolean, [propName: string]: any}): oj.Model|Promise; + previous(n: number, options?: {success?: (collection: oj.Collection, response: Object, options: Object)=> void, error?: (collection: oj.Collection, xhr: Object, options: Object)=> void, [propName: string]: any}): object; + push(m: oj.Model|object, options?: {silent?: boolean, at?: number, merge?: boolean, sort?: boolean, force?: boolean, deferred?: boolean, [propName: string]: any}): Promise>|undefined; + refresh(options?: {silent?: boolean, startIndex?: number, [propName: string]: any}): Promise; + remove(m: oj.Model|Array, options?: object): Array|object; + reset(data?: object, options?: {silent?: boolean, [propName: string]: any}): oj.Model|Array; + rest(n?: number, options?: object): Array|Promise; + set(models: object, options?: {add?: boolean, remove?: boolean, merge?: boolean, silent?: boolean, deferred?: boolean, [propName: string]: any}): Promise|null; + setFetchSize(n: number): undefined; + setModelLimit(n: number): undefined; + setRangeLocal(start: number, count: number): Promise; + shift(options?: object): oj.Model|Promise|null; + size(): number; + slice(start: number, end?: number, options?: object): Promise>|Array; + sort(options?: {silent?: boolean, startIndex?: number, [propName: string]: any}): Promise|null; + sortBy(iterator: string|((param0: oj.Model)=> object), context?: object): Array; + sortedIndex(comparator: string|((param0: oj.Model, param1?: oj.Model)=> object)): number; + stopListening(otherObj?: object, eventType?: string, callback?: Function): undefined; + sync(method: string, collection: oj.Collection, options?: {success?: (json?: Array)=> void, error?: (xhr: Object, status: Object, error: Object)=> void, [propName: string]: any}): object; + toJSON(): Array; + trigger(eventType: string): undefined; + unshift(m: object, options?: {silent?: boolean, at?: number, merge?: boolean, sort?: boolean, force?: boolean, deferred?: boolean, [propName: string]: any}): Promise>|Array; + whenReady(): Promise; + where(attrs: object|Array, options?: object): Promise>|Array; + whereToCollection(attrs: object|Array, options?: object): oj.Collection|Promise; + without(...var_args: (oj.Model)[]): Array; + } + namespace Collection { + type CustomPagingOptionsReturn = + { + totalResults?: number, limit?: number, count?: number, offset?: number, hasMore?: boolean + } + } + namespace Collection { + type SetRangeLocalPromise = + { + start: number, count: number, models: Array + } + } + +} +declare namespace oj { + class Model { + attributes: object; + customURL: ((param0: string, param1: oj.Model, param2: object)=> string|Object|null)|null; + defaults: object; + id: string|null; + idAttribute: string|null; + omitLanguageHeader: boolean; + parse: ((param0: object)=> Object); + parseSave: ((param0: object)=> Object); + urlRoot: string|null; + validate: ((param0: object, param1: Object)=> string|Object|null)|null; + validationError: string|object|null; + constructor(attributes?: object, options?: object); + static extend(properties?: {parse?: (data: any)=> any, parseSave?: (data: any)=> any, urlRoot?: string, initialize?: (models: Array, options: Object)=> void, validate?: null|object|string|((attributes: Object, options?: oj.Model)=> number), [propName: string]: any}, classProperties?: object): any; + changedAttributes(attributes?: object): object|boolean; + clear(options?: object): oj.Model|boolean; + clone(): oj.Model; + destroy(options?: {success?: (model: oj.Model, response: Object, options: Object)=> void, error?: (model: oj.Model, xhr: Object, options: Object)=> void, wait?: boolean, [propName: string]: any}): boolean; + fetch(options?: {success?: (model: oj.Model, response: Object, options: Object)=> void, error?: (model: oj.Model, xhr: Object, options: Object)=> void, [propName: string]: any}): object; + get(property: string): object; + has(property: string): boolean; + hasChanged(attribute?: string): boolean; + invert(): object; + isNew(): boolean; + isValid(): boolean; + keys(): Array; + listenTo(otherObj: object, eventType: string, callback: Function): undefined; + listenToOnce(otherObj: object, eventType: string, callback: Function): undefined; + matches(attrs: object): ((param0: oj.Model)=> boolean); + off(eventType?: string|object, callback?: Function, context?: object): undefined; + omit(keys: Array|object): object; + on(eventType: string|object, callback: Function, context?: object): undefined; + once(eventType: string, callback: Function, context?: object): undefined; + pairs(): object; + pick(keys: Array|object): object; + previous(attr: string): object; + previousAttributes(): object; + save(attributes?: object, options?: {success?: (model: oj.Model, response: Object, options: Object)=> void, error?: (model: oj.Model, xhr: Object, options: Object)=> void, contentType?: string, valdiate?: boolean, wait?: boolean, patch?: boolean, attrs?: Object, [propName: string]: any}): object|boolean; + set(property: string|object, value?: object, options?: object): oj.Model|boolean; + stopListening(otherObj?: object, eventType?: string, callback?: Function): undefined; + sync(method: string, model: oj.Model, options?: object): object; + toJSON(): object; + trigger(eventType: string): undefined; + unset(property: string, options?: object): boolean; + url(): string|null; + values(): Array; + } + +} +declare namespace oj { + class OAuth { + constructor(attributes: object, header: string); + cleanAccessTokenRequest(): undefined; + cleanAccessTokenResponse(): undefined; + clientCredentialGrant(): undefined; + getAccessTokenRequest(): object; + getAccessTokenResponse(): object; + getHeader(): object; + isInitialized(): boolean; + setAccessTokenRequest(data: object): undefined; + setAccessTokenResponse(data: object): undefined; + } + +} +declare namespace oj { + class URLError { + constructor(); + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojmodule-element-utils/index.d.ts b/types/@oracle/oraclejet/ojs/ojmodule-element-utils/index.d.ts new file mode 100644 index 0000000000..f2b9b3db7c --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojmodule-element-utils/index.d.ts @@ -0,0 +1,3 @@ +export class ModuleElementUtils { + } + diff --git a/types/@oracle/oraclejet/ojs/ojmodule-element/index.d.ts b/types/@oracle/oraclejet/ojs/ojmodule-element/index.d.ts new file mode 100644 index 0000000000..5129c36e5a --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojmodule-element/index.d.ts @@ -0,0 +1,54 @@ +declare namespace oj { + interface ModuleElementAnimation { + animate(context: {node: Node, isInitial: boolean, oldViewModel: object, newViewModel: object, newViewParent: Node, oldViewParent: Node, removeOldView: Function, insertNewView: Function, oldDomNodes: Array}): Promise; + canAnimate(context: {node: Node, isInitial: boolean, oldViewModel: object, newViewModel: object}): boolean; + prepareAnimation(context: {node: Node, isInitial: boolean, oldViewModel: object, newViewModel: object}): object; + } + +} +declare namespace oj { + class ojModule { + animation: object; + config: {cleanupMode: 'onDisconnect'|'none', view: Array, viewModel: object}; + onAnimationChanged: (event: CustomEvent)=> any; + onConfigChanged: (event: CustomEvent)=> any; + onOjTransitionEnd: (event: oj.ojModule.ojTransitionEnd)=> any; + onOjTransitionStart: (event: oj.ojModule.ojTransitionStart)=> any; + onOjViewConnected: (event: oj.ojModule.ojViewConnected)=> any; + onOjViewDisconnected: (event: oj.ojModule.ojViewDisconnected)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojModuleEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojModule { + class ojTransitionEnd extends CustomEvent<{viewModel: object, [propName: string]: any}> { + + } + + class ojTransitionStart extends CustomEvent<{viewModel: object, [propName: string]: any}> { + + } + + class ojViewConnected extends CustomEvent<{viewModel: object, [propName: string]: any}> { + + } + + class ojViewDisconnected extends CustomEvent<{viewModel: object, view: Array, [propName: string]: any}> { + + } + } + interface ojModuleEventMap extends oj.JetElementEventMap { + 'ojTransitionEnd': oj.ojModule.ojTransitionEnd; + 'ojTransitionStart': oj.ojModule.ojTransitionStart; + 'ojViewConnected': oj.ojModule.ojViewConnected; + 'ojViewDisconnected': oj.ojModule.ojViewDisconnected; + 'animationChanged': CustomEvent; + 'configChanged': CustomEvent; + } + interface ojModuleSettableProperties extends JetSettableProperties { + animation: object; + config: {cleanupMode: 'onDisconnect'|'none', view: Array, viewModel: object}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojmodule/index.d.ts b/types/@oracle/oraclejet/ojs/ojmodule/index.d.ts new file mode 100644 index 0000000000..3cf1b7ee7e --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojmodule/index.d.ts @@ -0,0 +1,24 @@ +/// +declare namespace oj { + namespace ModuleBinding { + var defaults: {viewPath: string, viewSuffix: string, modelPath: string, initializeMethod: string, disposeMethod: string, activatedHandler: string, attachedHandler: string, detachedHandler: string, bindingsAppliedHandler: string, deactivatedHandler: string, transitionCompletedHandler: string}; + } + +} +declare namespace oj.ModuleBinding { + interface ConventionMethods { + dispose(info: {element: Node, valueAccessor: Function}): void; + handleActivated(info: {element: Node, valueAccessor: Function}): Promise|undefined; + handleAttached(info: {element: Node, valueAccessor: Function, fromCache: boolean}): void; + handleBindingsApplied(info: {element: Node, valueAccessor: Function}): void; + handleDeactivated(info: {element: Node, valueAccessor: Function}): void; + handleDetached(info: {element: Node, valueAccessor: Function, cachedNodes: Array}): void; + handleTransitionCompleted(info: {element: Node, valueAccessor: Function}): void; + initialize(info: {element: Node, valueAccessor: Function}): object|undefined; + } + +} +declare namespace ojModule { + var Options: {view: Promise|string|Array|DocumentFragment, viewModel: Promise|Function|object, name: string, viewName: string, require: Function|{instance: any, viewPath: string, modelPath: string}, viewModelFactory: object, params: object, createViewFunction: string, cacheKey: string, lifecycleListener: object, animation: object}; + } + diff --git a/types/@oracle/oraclejet/ojs/ojmoduleanimations/index.d.ts b/types/@oracle/oraclejet/ojs/ojmoduleanimations/index.d.ts new file mode 100644 index 0000000000..6d0592dbea --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojmoduleanimations/index.d.ts @@ -0,0 +1,30 @@ +/// +declare namespace oj { + namespace ModuleAnimations { + var coverStart: oj.ModuleElementAnimation; + var coverUp: oj.ModuleElementAnimation; + var fade: oj.ModuleElementAnimation; + var navChild: oj.ModuleElementAnimation; + var navParent: oj.ModuleElementAnimation; + var navSiblingEarlier: oj.ModuleElementAnimation; + var navSiblingLater: oj.ModuleElementAnimation; + var pushEnd: oj.ModuleElementAnimation; + var pushStart: oj.ModuleElementAnimation; + var revealDown: oj.ModuleElementAnimation; + var revealEnd: oj.ModuleElementAnimation; + var zoomIn: oj.ModuleElementAnimation; + var zoomOut: oj.ModuleElementAnimation; + function createAnimation(oldViewEffect: {effect: oj.AnimationUtils.AnimationMethods, [key:string]: any}|oj.AnimationUtils.AnimationMethods|null, newViewEffect: {effect: oj.AnimationUtils.AnimationMethods, [key:string]: any}|oj.AnimationUtils.AnimationMethods|null, newViewOnTop: boolean): oj.ModuleElementAnimation; + function switcher(callback: (param0: oj.ModuleAnimations.SwitcherCallBackParam) => oj.ModuleAnimations.Animations): oj.ModuleElementAnimation; + } + namespace ModuleAnimations { + type Animations = 'coverStart'|'coverUp'|'fade'|'navChild'|'navParent'|'navSiblingEarlier'|'navSiblingLater'|'pushEnd'|'pushStart'|'revealDown'|'revealEnd'|'zoomIn'|'zoomOut'; + } + namespace ModuleAnimations { + type SwitcherCallBackParam = + { + node: Element, valueAccessor: (()=> any), isInitial: boolean, oldViewModel: any, newViewModel: any + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojnavigationlist/index.d.ts b/types/@oracle/oraclejet/ojs/ojnavigationlist/index.d.ts new file mode 100644 index 0000000000..9d1c348467 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojnavigationlist/index.d.ts @@ -0,0 +1,253 @@ +/// +/// +/// +declare namespace oj { + class ojNavigationList extends baseComponent> { + as: string; + currentItem: K; + data: oj.DataProvider|null; + display: 'all'|'icons'; + drillMode: 'none'|'collapsible'|'sliding'; + edge: 'top'|'start'; + expanded: KeySet.KeySet; + hierarchyMenuThreshold: number; + item: {renderer?: (((context: oj.ojNavigationList.ItemContext) => void)|null), selectable?: (((context: oj.ojNavigationList.ItemContext) => boolean)|boolean)}; + overflow: 'popup'|'hidden'; + rootLabel: string|null; + selection: K; + translations: {defaultRootLabel?: string, hierMenuBtnLabel?: string, previousIcon?: string}; + onAsChanged: (event: CustomEvent)=> any; + onCurrentItemChanged: (event: CustomEvent)=> any; + onDataChanged: (event: CustomEvent)=> any; + onDisplayChanged: (event: CustomEvent)=> any; + onDrillModeChanged: (event: CustomEvent)=> any; + onEdgeChanged: (event: CustomEvent)=> any; + onExpandedChanged: (event: CustomEvent)=> any; + onHierarchyMenuThresholdChanged: (event: CustomEvent)=> any; + onItemChanged: (event: CustomEvent)=> any; + onOverflowChanged: (event: CustomEvent)=> any; + onRootLabelChanged: (event: CustomEvent)=> any; + onSelectionChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojNavigationList.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojNavigationList.ojAnimateStart)=> any; + onOjBeforeCollapse: (event: oj.ojNavigationList.ojBeforeCollapse)=> any; + onOjBeforeCurrentItem: (event: oj.ojNavigationList.ojBeforeCurrentItem)=> any; + onOjBeforeExpand: (event: oj.ojNavigationList.ojBeforeExpand)=> any; + onOjBeforeSelect: (event: oj.ojNavigationList.ojBeforeSelect)=> any; + onOjCollapse: (event: oj.ojNavigationList.ojCollapse)=> any; + onOjExpand: (event: oj.ojNavigationList.ojExpand)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojNavigationListEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getContextByNode(node: Element): oj.ojNavigationList.NodeContext|null; + refresh(): void; + } + namespace ojNavigationList { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + + class ojBeforeCollapse extends CustomEvent<{key: any, item: Element, [propName: string]: any}> { + + } + + class ojBeforeCurrentItem extends CustomEvent<{previousKey: any, previousItem: Element, key: any, item: Element, [propName: string]: any}> { + + } + + class ojBeforeExpand extends CustomEvent<{key: any, item: Element, [propName: string]: any}> { + + } + + class ojBeforeSelect extends CustomEvent<{key: any, item: Element, [propName: string]: any}> { + + } + + class ojCollapse extends CustomEvent<{key: any, item: Element, [propName: string]: any}> { + + } + + class ojExpand extends CustomEvent<{key: any, item: Element, [propName: string]: any}> { + + } + } + interface ojNavigationListEventMap extends oj.baseComponentEventMap { + 'ojAnimateEnd': oj.ojNavigationList.ojAnimateEnd; + 'ojAnimateStart': oj.ojNavigationList.ojAnimateStart; + 'ojBeforeCollapse': oj.ojNavigationList.ojBeforeCollapse; + 'ojBeforeCurrentItem': oj.ojNavigationList.ojBeforeCurrentItem; + 'ojBeforeExpand': oj.ojNavigationList.ojBeforeExpand; + 'ojBeforeSelect': oj.ojNavigationList.ojBeforeSelect; + 'ojCollapse': oj.ojNavigationList.ojCollapse; + 'ojExpand': oj.ojNavigationList.ojExpand; + 'asChanged': CustomEvent; + 'currentItemChanged': CustomEvent; + 'dataChanged': CustomEvent; + 'displayChanged': CustomEvent; + 'drillModeChanged': CustomEvent; + 'edgeChanged': CustomEvent; + 'expandedChanged': CustomEvent; + 'hierarchyMenuThresholdChanged': CustomEvent; + 'itemChanged': CustomEvent; + 'overflowChanged': CustomEvent; + 'rootLabelChanged': CustomEvent; + 'selectionChanged': CustomEvent; + } + interface ojNavigationListSettableProperties extends baseComponentSettableProperties { + as: string; + currentItem: K; + data: oj.DataProvider|null; + display: 'all'|'icons'; + drillMode: 'none'|'collapsible'|'sliding'; + edge: 'top'|'start'; + expanded: KeySet.KeySet; + hierarchyMenuThreshold: number; + item: {renderer?: (((context: oj.ojNavigationList.ItemContext) => void)|null), selectable?: (((context: oj.ojNavigationList.ItemContext) => boolean)|boolean)}; + overflow: 'popup'|'hidden'; + rootLabel: string|null; + selection: K; + translations: {defaultRootLabel?: string, hierMenuBtnLabel?: string, previousIcon?: string}; + } + namespace ojNavigationList { + type ItemContext = + { + componentElement: Element, datasource?: oj.DataProvider, index: number, key: any, data: any, parentElement: Element + } + } + namespace ojNavigationList { + type NodeContext = + { + subId: string, index: number, key: K, group: boolean, parent?: Element + } + } + +} +declare namespace oj { + class ojTabBar extends baseComponent> { + as: string; + currentItem: any; + data: oj.DataProvider|null; + display: 'all'|'icons'; + edge: 'top'|'bottom'|'start'|'end'; + item: {renderer?: (((context: oj.ojTabBar.ItemContext) => void)|null), selectable?: (((context: oj.ojTabBar.ItemContext) => boolean)|boolean)}; + overflow: 'popup'|'hidden'; + reorderable: 'enabled'|'disabled'; + selection: any; + truncation: 'none'|'progressive'; + translations: {accessibleReorderAfterItem?: string, accessibleReorderBeforeItem?: string, accessibleReorderTouchInstructionText?: string, labelCut?: string, labelPasteAfter?: string, labelPasteBefore?: string, labelRemove?: string, msgFetchingData?: string, msgNoData?: string, overflowItemLabel?: string, removeCueText?: string, selectedLabel?: string}; + onAsChanged: (event: CustomEvent)=> any; + onCurrentItemChanged: (event: CustomEvent)=> any; + onDataChanged: (event: CustomEvent)=> any; + onDisplayChanged: (event: CustomEvent)=> any; + onEdgeChanged: (event: CustomEvent)=> any; + onItemChanged: (event: CustomEvent)=> any; + onOverflowChanged: (event: CustomEvent)=> any; + onReorderableChanged: (event: CustomEvent)=> any; + onSelectionChanged: (event: CustomEvent)=> any; + onTruncationChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojTabBar.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojTabBar.ojAnimateStart)=> any; + onOjBeforeCurrentItem: (event: oj.ojTabBar.ojBeforeCurrentItem)=> any; + onOjBeforeDeselect: (event: oj.ojTabBar.ojBeforeDeselect)=> any; + onOjBeforeRemove: (event: oj.ojTabBar.ojBeforeRemove)=> any; + onOjBeforeSelect: (event: oj.ojTabBar.ojBeforeSelect)=> any; + onOjDeselect: (event: oj.ojTabBar.ojDeselect)=> any; + onOjRemove: (event: oj.ojTabBar.ojRemove)=> any; + onOjReorder: (event: oj.ojTabBar.ojReorder)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTabBarEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getContextByNode(node: Element): oj.ojTabBar.NodeContext|null; + refresh(): void; + } + namespace ojTabBar { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + + class ojBeforeCurrentItem extends CustomEvent<{previousKey: any, previousItem: Element, key: any, item: Element, [propName: string]: any}> { + + } + + class ojBeforeDeselect extends CustomEvent<{fromKey: any, fromItem: Element, toKey: any, toItem: Element, [propName: string]: any}> { + + } + + class ojBeforeRemove extends CustomEvent<{item: Element, key: any, [propName: string]: any}> { + + } + + class ojBeforeSelect extends CustomEvent<{key: any, item: Element, [propName: string]: any}> { + + } + + class ojDeselect extends CustomEvent<{fromKey: any, fromItem: Element, toKey: any, toItem: Element, [propName: string]: any}> { + + } + + class ojRemove extends CustomEvent<{item: Element, key: any, [propName: string]: any}> { + + } + + class ojReorder extends CustomEvent<{item: Element, position: 'before'|'after', reference: Element, [propName: string]: any}> { + + } + } + interface ojTabBarEventMap extends oj.baseComponentEventMap { + 'ojAnimateEnd': oj.ojTabBar.ojAnimateEnd; + 'ojAnimateStart': oj.ojTabBar.ojAnimateStart; + 'ojBeforeCurrentItem': oj.ojTabBar.ojBeforeCurrentItem; + 'ojBeforeDeselect': oj.ojTabBar.ojBeforeDeselect; + 'ojBeforeRemove': oj.ojTabBar.ojBeforeRemove; + 'ojBeforeSelect': oj.ojTabBar.ojBeforeSelect; + 'ojDeselect': oj.ojTabBar.ojDeselect; + 'ojRemove': oj.ojTabBar.ojRemove; + 'ojReorder': oj.ojTabBar.ojReorder; + 'asChanged': CustomEvent; + 'currentItemChanged': CustomEvent; + 'dataChanged': CustomEvent; + 'displayChanged': CustomEvent; + 'edgeChanged': CustomEvent; + 'itemChanged': CustomEvent; + 'overflowChanged': CustomEvent; + 'reorderableChanged': CustomEvent; + 'selectionChanged': CustomEvent; + 'truncationChanged': CustomEvent; + } + interface ojTabBarSettableProperties extends baseComponentSettableProperties { + as: string; + currentItem: any; + data: oj.DataProvider|null; + display: 'all'|'icons'; + edge: 'top'|'bottom'|'start'|'end'; + item: {renderer?: (((context: oj.ojTabBar.ItemContext) => void)|null), selectable?: (((context: oj.ojTabBar.ItemContext) => boolean)|boolean)}; + overflow: 'popup'|'hidden'; + reorderable: 'enabled'|'disabled'; + selection: any; + truncation: 'none'|'progressive'; + translations: {accessibleReorderAfterItem?: string, accessibleReorderBeforeItem?: string, accessibleReorderTouchInstructionText?: string, labelCut?: string, labelPasteAfter?: string, labelPasteBefore?: string, labelRemove?: string, msgFetchingData?: string, msgNoData?: string, overflowItemLabel?: string, removeCueText?: string, selectedLabel?: string}; + } + namespace ojTabBar { + type ItemContext = + { + componentElement: Element, datasource?: oj.DataProvider, index: number, key: K, data: D, parentElement: Element + } + } + namespace ojTabBar { + type NodeContext = + { + subId: string, index: number, key: K + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojnbox/index.d.ts b/types/@oracle/oraclejet/ojs/ojnbox/index.d.ts new file mode 100644 index 0000000000..454774c4bc --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojnbox/index.d.ts @@ -0,0 +1,251 @@ +/// +/// +declare namespace oj { + class ojNBox extends dvtBaseComponent> { + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + as: string; + cellContent: 'counts'|'auto'; + cellMaximize: 'off'|'on'; + cells: Promise>|null; + columns: Promise>|null; + columnsTitle: string; + countLabel: ((context: oj.ojNBox.CountLabelContext) => (string|null)); + data: oj.DataProvider|null; + groupAttributes: 'color'|'indicatorColor'|'indicatorIconColor'|'indicatorIconPattern'|'indicatorIconShape'; + groupBehavior: 'acrossCells'|'none'|'withinCell'; + hiddenCategories: Array; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + labelTruncation: 'ifRequired'|'on'; + maximizedColumn: string; + maximizedRow: string; + otherColor: string; + otherThreshold: number; + rows: Promise>|null; + rowsTitle: string; + selection: Array; + selectionMode: 'none'|'single'|'multiple'; + styleDefaults: {animationDuration: number, cellDefaults: {labelHalign: 'center'|'end'|'start', labelStyle: object, maximizedSvgStyle: object, minimizedSvgStyle: object, showCount: 'on'|'off'|'auto', svgStyle: object}, columnLabelStyle: object, columnsTitleStyle: object, hoverBehaviorDelay: number, nodeDefaults: {borderColor: string, borderWidth: number, color: string, iconDefaults: {borderColor: string, borderRadius: string, borderWidth: number, color: string, height: number, opacity: number, pattern: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none', shape: 'circle'|'ellipse'|'square'|'plus'|'diamond'|'triangleUp'|'triangleDown'|'human'|'rectangle'|'star', source: string, width: number}, indicatorColor: string, indicatorIconDefaults: {borderColor: string, borderRadius: string, borderWidth: number, color: string, height: number, opacity: number, pattern: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none', shape: 'circle'|'ellipse'|'square'|'plus'|'diamond'|'triangleUp'|'triangleDown'|'human'|'rectangle'|'star', source: string, width: number}, labelStyle: object, secondaryLabelStyle: object}, rowLabelStyle: object, rowsTitleStyle: object}; + tooltip: {renderer: ((context: oj.ojNBox.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))|null}; + touchResponse: 'touchStart'|'auto'; + translations: {componentName?: string, highlightedCount?: string, labelAdditionalData?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelGroup?: string, labelInvalidData?: string, labelNoData?: string, labelOther?: string, labelSize?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; + onAnimationOnDisplayChanged: (event: CustomEvent)=> any; + onAsChanged: (event: CustomEvent)=> any; + onCellContentChanged: (event: CustomEvent)=> any; + onCellMaximizeChanged: (event: CustomEvent)=> any; + onCellsChanged: (event: CustomEvent)=> any; + onColumnsChanged: (event: CustomEvent)=> any; + onColumnsTitleChanged: (event: CustomEvent)=> any; + onCountLabelChanged: (event: CustomEvent)=> any; + onDataChanged: (event: CustomEvent)=> any; + onGroupAttributesChanged: (event: CustomEvent)=> any; + onGroupBehaviorChanged: (event: CustomEvent)=> any; + onHiddenCategoriesChanged: (event: CustomEvent)=> any; + onHighlightMatchChanged: (event: CustomEvent)=> any; + onHighlightedCategoriesChanged: (event: CustomEvent)=> any; + onHoverBehaviorChanged: (event: CustomEvent)=> any; + onLabelTruncationChanged: (event: CustomEvent)=> any; + onMaximizedColumnChanged: (event: CustomEvent)=> any; + onMaximizedRowChanged: (event: CustomEvent)=> any; + onOtherColorChanged: (event: CustomEvent)=> any; + onOtherThresholdChanged: (event: CustomEvent)=> any; + onRowsChanged: (event: CustomEvent)=> any; + onRowsTitleChanged: (event: CustomEvent)=> any; + onSelectionChanged: (event: CustomEvent)=> any; + onSelectionModeChanged: (event: CustomEvent)=> any; + onStyleDefaultsChanged: (event: CustomEvent)=> any; + onTooltipChanged: (event: CustomEvent)=> any; + onTouchResponseChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojNBoxEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getCell(rowValue: string, columnValue: string): object|null; + getColumn(columnValue: string): object|null; + getColumnCount(): number; + getColumnsTitle(): string; + getContextByNode(node: Element): object|null; + getDialog(): object|null; + getGroupBehavior(): string; + getGroupNode(groupCategory: string): object|null; + getRow(rowValue: string): object|null; + getRowCount(): number; + getRowsTitle(): string; + } + interface ojNBoxEventMap extends oj.dvtBaseComponentEventMap { + 'animationOnDataChangeChanged': CustomEvent; + 'animationOnDisplayChanged': CustomEvent; + 'asChanged': CustomEvent; + 'cellContentChanged': CustomEvent; + 'cellMaximizeChanged': CustomEvent; + 'cellsChanged': CustomEvent; + 'columnsChanged': CustomEvent; + 'columnsTitleChanged': CustomEvent; + 'countLabelChanged': CustomEvent; + 'dataChanged': CustomEvent; + 'groupAttributesChanged': CustomEvent; + 'groupBehaviorChanged': CustomEvent; + 'hiddenCategoriesChanged': CustomEvent; + 'highlightMatchChanged': CustomEvent; + 'highlightedCategoriesChanged': CustomEvent; + 'hoverBehaviorChanged': CustomEvent; + 'labelTruncationChanged': CustomEvent; + 'maximizedColumnChanged': CustomEvent; + 'maximizedRowChanged': CustomEvent; + 'otherColorChanged': CustomEvent; + 'otherThresholdChanged': CustomEvent; + 'rowsChanged': CustomEvent; + 'rowsTitleChanged': CustomEvent; + 'selectionChanged': CustomEvent; + 'selectionModeChanged': CustomEvent; + 'styleDefaultsChanged': CustomEvent; + 'tooltipChanged': CustomEvent; + 'touchResponseChanged': CustomEvent; + } + interface ojNBoxSettableProperties extends dvtBaseComponentSettableProperties { + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + as: string; + cellContent: 'counts'|'auto'; + cellMaximize: 'off'|'on'; + cells: Array|Promise>|null; + columns: Array|Promise>|null; + columnsTitle: string; + countLabel: ((context: oj.ojNBox.CountLabelContext) => (string|null)); + data: oj.DataProvider|null; + groupAttributes: 'color'|'indicatorColor'|'indicatorIconColor'|'indicatorIconPattern'|'indicatorIconShape'; + groupBehavior: 'acrossCells'|'none'|'withinCell'; + hiddenCategories: Array; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + labelTruncation: 'ifRequired'|'on'; + maximizedColumn: string; + maximizedRow: string; + otherColor: string; + otherThreshold: number; + rows: Array|Promise>|null; + rowsTitle: string; + selection: Array; + selectionMode: 'none'|'single'|'multiple'; + styleDefaults: {animationDuration: number, cellDefaults: {labelHalign: 'center'|'end'|'start', labelStyle: object, maximizedSvgStyle: object, minimizedSvgStyle: object, showCount: 'on'|'off'|'auto', svgStyle: object}, columnLabelStyle: object, columnsTitleStyle: object, hoverBehaviorDelay: number, nodeDefaults: {borderColor: string, borderWidth: number, color: string, iconDefaults: {borderColor: string, borderRadius: string, borderWidth: number, color: string, height: number, opacity: number, pattern: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none', shape: 'circle'|'ellipse'|'square'|'plus'|'diamond'|'triangleUp'|'triangleDown'|'human'|'rectangle'|'star', source: string, width: number}, indicatorColor: string, indicatorIconDefaults: {borderColor: string, borderRadius: string, borderWidth: number, color: string, height: number, opacity: number, pattern: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none', shape: 'circle'|'ellipse'|'square'|'plus'|'diamond'|'triangleUp'|'triangleDown'|'human'|'rectangle'|'star', source: string, width: number}, labelStyle: object, secondaryLabelStyle: object}, rowLabelStyle: object, rowsTitleStyle: object}; + tooltip: {renderer: ((context: oj.ojNBox.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))|null}; + touchResponse: 'touchStart'|'auto'; + translations: {componentName?: string, highlightedCount?: string, labelAdditionalData?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelGroup?: string, labelInvalidData?: string, labelNoData?: string, labelOther?: string, labelSize?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + } + namespace ojNBox { + type Cell = + { + label?: string, column: string, labelHalign?: string, labelStyle?: object, svgClassName?: string, svgStyle?: object, maximizedSvgStyle?: object, maximizedSvgClassName?: string, minimizedSvgStyle?: object, minimizedSvgClassName?: string, row: string, showCount?: 'on'|'off'|'auto'|string, shortDesc?: string + } + } + namespace ojNBox { + type Column = + { + id: string, label?: string, labelStyle?: object + } + } + namespace ojNBox { + type CountLabelContext = + { + row: string, column: string, nodeCount: number, totalNodeCount: number, highlightedNodeCount: number + } + } + namespace ojNBox { + type Row = + { + id: string, label?: string, labelStyle?: object + } + } + namespace ojNBox { + type TooltipContext = + { + parentElement: Element, id: K, label: string, secondaryLabel: string, row: string, column: string, color: string, indicatorColor: string, componentElement: Element + } + } + +} +declare namespace oj { + class ojNBoxNode extends JetElement { + borderColor: string; + borderWidth: number; + categories: Array; + color?: string; + column: string; + groupCategory?: string; + icon?: {borderColor?: string, borderRadius?: string, borderWidth: number, color?: string, height?: number|null, opacity: number, pattern?: 'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'|'mallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle', shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, source?: string, svgClassName: string, svgStyle?: object, width?: number|null}; + indicatorColor?: string; + indicatorIcon?: {borderColor?: string, borderRadius?: string, borderWidth: number, color?: string, height?: number|null, opacity: number, pattern?: 'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'|'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle', shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, source?: string|null, svgClassName: string, svgStyle?: object|null, width?: number|null}; + label: string; + row: string; + secondaryLabel: string; + shortDesc: string; + svgClassName: string; + svgStyle: object|null; + xPercentage?: number|null; + yPercentage?: number|null; + onBorderColorChanged: (event: CustomEvent)=> any; + onBorderWidthChanged: (event: CustomEvent)=> any; + onCategoriesChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onColumnChanged: (event: CustomEvent)=> any; + onGroupCategoryChanged: (event: CustomEvent)=> any; + onIconChanged: (event: CustomEvent)=> any; + onIndicatorColorChanged: (event: CustomEvent)=> any; + onIndicatorIconChanged: (event: CustomEvent)=> any; + onLabelChanged: (event: CustomEvent)=> any; + onRowChanged: (event: CustomEvent)=> any; + onSecondaryLabelChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onXPercentageChanged: (event: CustomEvent)=> any; + onYPercentageChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojNBoxNodeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojNBoxNodeEventMap extends oj.JetElementEventMap { + 'borderColorChanged': CustomEvent; + 'borderWidthChanged': CustomEvent; + 'categoriesChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'columnChanged': CustomEvent; + 'groupCategoryChanged': CustomEvent; + 'iconChanged': CustomEvent; + 'indicatorColorChanged': CustomEvent; + 'indicatorIconChanged': CustomEvent; + 'labelChanged': CustomEvent; + 'rowChanged': CustomEvent; + 'secondaryLabelChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'xPercentageChanged': CustomEvent; + 'yPercentageChanged': CustomEvent; + } + interface ojNBoxNodeSettableProperties extends JetSettableProperties { + borderColor: string; + borderWidth: number; + categories: Array; + color?: string; + column: string; + groupCategory?: string; + icon?: {borderColor?: string, borderRadius?: string, borderWidth: number, color?: string, height?: number|null, opacity: number, pattern?: 'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'|'mallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle', shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, source?: string, svgClassName: string, svgStyle?: object, width?: number|null}; + indicatorColor?: string; + indicatorIcon?: {borderColor?: string, borderRadius?: string, borderWidth: number, color?: string, height?: number|null, opacity: number, pattern?: 'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'|'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle', shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, source?: string|null, svgClassName: string, svgStyle?: object|null, width?: number|null}; + label: string; + row: string; + secondaryLabel: string; + shortDesc: string; + svgClassName: string; + svgStyle: object|null; + xPercentage?: number|null; + yPercentage?: number|null; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojoffcanvas/index.d.ts b/types/@oracle/oraclejet/ojs/ojoffcanvas/index.d.ts new file mode 100644 index 0000000000..eab2775d88 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojoffcanvas/index.d.ts @@ -0,0 +1,13 @@ +declare namespace oj { + class OffcanvasUtils { + constructor(); + static close(offcanvas: {selector: string}): Promise; + static open(offcanvas: {selector: string, content: string, edge: string, displayMode: string, autoDismiss: string, size: string, modality: string}): Promise; + static setupPanToReveal(offcanvas: {selector: string, edge?: string, size?: string}): void; + static setupResponsive(offcanvas: {selector: string, edge: string, query: string}): void; + static tearDownPanToReveal(offcanvas: {selector: string}): void; + static tearDownResponsive(offcanvas: {selector: string}): void; + static toggle(offcanvas: {selector: string, content: string, edge: string, displayMode: string, autoDismiss: string, size: string, modality: string}): Promise; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojoptgroup/index.d.ts b/types/@oracle/oraclejet/ojs/ojoptgroup/index.d.ts new file mode 100644 index 0000000000..335cee2990 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojoptgroup/index.d.ts @@ -0,0 +1,25 @@ +declare namespace oj { + class ojOptgroup extends JetElement { + disabled: boolean; + label: string; + onDisabledChanged: (event: CustomEvent)=> any; + onLabelChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojOptgroupEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getProperty(property: string): any; + refresh(): void; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + } + interface ojOptgroupEventMap extends oj.JetElementEventMap { + 'disabledChanged': CustomEvent; + 'labelChanged': CustomEvent; + } + interface ojOptgroupSettableProperties extends JetSettableProperties { + disabled: boolean; + label: string; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojoption/index.d.ts b/types/@oracle/oraclejet/ojs/ojoption/index.d.ts new file mode 100644 index 0000000000..012cb7a4cc --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojoption/index.d.ts @@ -0,0 +1,25 @@ +declare namespace oj { + class ojOption extends JetElement { + disabled: boolean; + value: any; + onDisabledChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojOptionEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getProperty(property: string): any; + refresh(): void; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + } + interface ojOptionEventMap extends oj.JetElementEventMap { + 'disabledChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojOptionSettableProperties extends JetSettableProperties { + disabled: boolean; + value: any; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojpictochart/index.d.ts b/types/@oracle/oraclejet/ojs/ojpictochart/index.d.ts new file mode 100644 index 0000000000..ec1496377f --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojpictochart/index.d.ts @@ -0,0 +1,206 @@ +/// +/// +declare namespace oj { + class ojPictoChart extends dvtBaseComponent> { + animationDuration?: number; + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'popIn'|'alphaFade'|'zoom'|'none'; + as: string; + columnCount: number|null; + columnWidth: number|null; + data: oj.DataProvider|null; + drilling: 'on'|'off'; + hiddenCategories: Array; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + hoverBehaviorDelay: number; + layout: 'vertical'|'horizontal'; + layoutOrigin: 'topEnd'|'bottomStart'|'bottomEnd'|'topStart'; + rowCount: number|null; + rowHeight: number|null; + selection: Array; + selectionMode: 'single'|'multiple'|'none'; + tooltip: {renderer: ((context: oj.ojPictoChart.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))|null}; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + onAnimationDurationChanged: (event: CustomEvent)=> any; + onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; + onAnimationOnDisplayChanged: (event: CustomEvent)=> any; + onAsChanged: (event: CustomEvent)=> any; + onColumnCountChanged: (event: CustomEvent)=> any; + onColumnWidthChanged: (event: CustomEvent)=> any; + onDataChanged: (event: CustomEvent)=> any; + onDrillingChanged: (event: CustomEvent)=> any; + onHiddenCategoriesChanged: (event: CustomEvent)=> any; + onHighlightMatchChanged: (event: CustomEvent)=> any; + onHighlightedCategoriesChanged: (event: CustomEvent)=> any; + onHoverBehaviorChanged: (event: CustomEvent)=> any; + onHoverBehaviorDelayChanged: (event: CustomEvent)=> any; + onLayoutChanged: (event: CustomEvent)=> any; + onLayoutOriginChanged: (event: CustomEvent)=> any; + onRowCountChanged: (event: CustomEvent)=> any; + onRowHeightChanged: (event: CustomEvent)=> any; + onSelectionChanged: (event: CustomEvent)=> any; + onSelectionModeChanged: (event: CustomEvent)=> any; + onTooltipChanged: (event: CustomEvent)=> any; + onOjDrill: (event: oj.ojPictoChart.ojDrill)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojPictoChartEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getContextByNode(node: Element): oj.ojPictoChart.NodeContext|null; + getItem(index: number): oj.ojPictoChart.ItemContext|null; + getItemCount(): number; + } + namespace ojPictoChart { + class ojDrill extends CustomEvent<{id: any, [propName: string]: any}> { + + } + } + interface ojPictoChartEventMap extends oj.dvtBaseComponentEventMap { + 'ojDrill': oj.ojPictoChart.ojDrill; + 'animationDurationChanged': CustomEvent; + 'animationOnDataChangeChanged': CustomEvent; + 'animationOnDisplayChanged': CustomEvent; + 'asChanged': CustomEvent; + 'columnCountChanged': CustomEvent; + 'columnWidthChanged': CustomEvent; + 'dataChanged': CustomEvent; + 'drillingChanged': CustomEvent; + 'hiddenCategoriesChanged': CustomEvent; + 'highlightMatchChanged': CustomEvent; + 'highlightedCategoriesChanged': CustomEvent; + 'hoverBehaviorChanged': CustomEvent; + 'hoverBehaviorDelayChanged': CustomEvent; + 'layoutChanged': CustomEvent; + 'layoutOriginChanged': CustomEvent; + 'rowCountChanged': CustomEvent; + 'rowHeightChanged': CustomEvent; + 'selectionChanged': CustomEvent; + 'selectionModeChanged': CustomEvent; + 'tooltipChanged': CustomEvent; + } + interface ojPictoChartSettableProperties extends dvtBaseComponentSettableProperties { + animationDuration?: number; + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'popIn'|'alphaFade'|'zoom'|'none'; + as: string; + columnCount: number|null; + columnWidth: number|null; + data: oj.DataProvider|null; + drilling: 'on'|'off'; + hiddenCategories: Array; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + hoverBehaviorDelay: number; + layout: 'vertical'|'horizontal'; + layoutOrigin: 'topEnd'|'bottomStart'|'bottomEnd'|'topStart'; + rowCount: number|null; + rowHeight: number|null; + selection: Array; + selectionMode: 'single'|'multiple'|'none'; + tooltip: {renderer: ((context: oj.ojPictoChart.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))|null}; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + } + namespace ojPictoChart { + type ItemContext = + { + color: string, count: number, id: K, name: string, selected: boolean, tooltip: string + } + } + namespace ojPictoChart { + type NodeContext = + { + subId: string, index: number + } + } + namespace ojPictoChart { + type TooltipContext = + { + parentElement: Element, id: K, name: string, count: number, color: string, componentElement: Element + } + } + +} +declare namespace oj { + class ojPictoChartItem extends JetElement { + borderColor: string; + borderWidth: number; + categories: Array; + color: string; + columnSpan: number; + count: number; + drilling: 'inherit'|'off'|'on'; + name: string; + rowSpan: number; + shape: 'circle'|'diamond'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|'none'; + shortDesc: string; + source: string; + sourceHover: string; + sourceHoverSelected: string; + sourceSelected: string; + svgClassName: string; + svgStyle: object; + onBorderColorChanged: (event: CustomEvent)=> any; + onBorderWidthChanged: (event: CustomEvent)=> any; + onCategoriesChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onColumnSpanChanged: (event: CustomEvent)=> any; + onCountChanged: (event: CustomEvent)=> any; + onDrillingChanged: (event: CustomEvent)=> any; + onNameChanged: (event: CustomEvent)=> any; + onRowSpanChanged: (event: CustomEvent)=> any; + onShapeChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onSourceChanged: (event: CustomEvent)=> any; + onSourceHoverChanged: (event: CustomEvent)=> any; + onSourceHoverSelectedChanged: (event: CustomEvent)=> any; + onSourceSelectedChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojPictoChartItemEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojPictoChartItemEventMap extends oj.JetElementEventMap { + 'borderColorChanged': CustomEvent; + 'borderWidthChanged': CustomEvent; + 'categoriesChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'columnSpanChanged': CustomEvent; + 'countChanged': CustomEvent; + 'drillingChanged': CustomEvent; + 'nameChanged': CustomEvent; + 'rowSpanChanged': CustomEvent; + 'shapeChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'sourceChanged': CustomEvent; + 'sourceHoverChanged': CustomEvent; + 'sourceHoverSelectedChanged': CustomEvent; + 'sourceSelectedChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + } + interface ojPictoChartItemSettableProperties extends JetSettableProperties { + borderColor: string; + borderWidth: number; + categories: Array; + color: string; + columnSpan: number; + count: number; + drilling: 'inherit'|'off'|'on'; + name: string; + rowSpan: number; + shape: 'circle'|'diamond'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|'none'; + shortDesc: string; + source: string; + sourceHover: string; + sourceHoverSelected: string; + sourceSelected: string; + svgClassName: string; + svgStyle: object; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojpopup/index.d.ts b/types/@oracle/oraclejet/ojs/ojpopup/index.d.ts new file mode 100644 index 0000000000..c0b076be88 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojpopup/index.d.ts @@ -0,0 +1,105 @@ +/// +declare namespace oj { + class ojPopup extends baseComponent { + autoDismiss: 'none'|'focusLoss'; + chrome: 'default'|'none'; + initialFocus: 'auto'|'none'|'firstFocusable'|'popup'; + modality: 'modeless'|'modal'; + position: oj.ojPopup.Position; + tail: 'none'|'simple'; + translations: {ariaCloseSkipLink?: string, ariaFocusSkipLink?: string, ariaLiveRegionInitialFocusFirstFocusable?: string, ariaLiveRegionInitialFocusFirstFocusableTouch?: string, ariaLiveRegionInitialFocusNone?: string, ariaLiveRegionInitialFocusNoneTouch?: string}; + onAutoDismissChanged: (event: CustomEvent)=> any; + onChromeChanged: (event: CustomEvent)=> any; + onInitialFocusChanged: (event: CustomEvent)=> any; + onModalityChanged: (event: CustomEvent)=> any; + onPositionChanged: (event: CustomEvent)=> any; + onTailChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojPopup.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojPopup.ojAnimateStart)=> any; + onOjBeforeClose: (event: oj.ojPopup.ojBeforeClose)=> any; + onOjBeforeOpen: (event: oj.ojPopup.ojBeforeOpen)=> any; + onOjClose: (event: oj.ojPopup.ojClose)=> any; + onOjFocus: (event: oj.ojPopup.ojFocus)=> any; + onOjOpen: (event: oj.ojPopup.ojOpen)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojPopupEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + close(): void; + isOpen(): boolean; + open(launcher: string|Element, position?: oj.ojPopup.Position): void; + refresh(): void; + } + namespace ojPopup { + class ojAnimateEnd extends CustomEvent<{element: Element, action: 'open'|'close', [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: 'open'|'close', element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + + class ojBeforeClose extends CustomEvent<{ [propName: string]: any}> { + + } + + class ojBeforeOpen extends CustomEvent<{ [propName: string]: any}> { + + } + + class ojClose extends CustomEvent<{ [propName: string]: any}> { + + } + + class ojFocus extends CustomEvent<{ [propName: string]: any}> { + + } + + class ojOpen extends CustomEvent<{ [propName: string]: any}> { + + } + } + interface ojPopupEventMap extends oj.baseComponentEventMap { + 'ojAnimateEnd': oj.ojPopup.ojAnimateEnd; + 'ojAnimateStart': oj.ojPopup.ojAnimateStart; + 'ojBeforeClose': oj.ojPopup.ojBeforeClose; + 'ojBeforeOpen': oj.ojPopup.ojBeforeOpen; + 'ojClose': oj.ojPopup.ojClose; + 'ojFocus': oj.ojPopup.ojFocus; + 'ojOpen': oj.ojPopup.ojOpen; + 'autoDismissChanged': CustomEvent; + 'chromeChanged': CustomEvent; + 'initialFocusChanged': CustomEvent; + 'modalityChanged': CustomEvent; + 'positionChanged': CustomEvent; + 'tailChanged': CustomEvent; + } + interface ojPopupSettableProperties extends baseComponentSettableProperties { + autoDismiss: 'none'|'focusLoss'; + chrome: 'default'|'none'; + initialFocus: 'auto'|'none'|'firstFocusable'|'popup'; + modality: 'modeless'|'modal'; + position: oj.ojPopup.Position; + tail: 'none'|'simple'; + translations: {ariaCloseSkipLink?: string, ariaFocusSkipLink?: string, ariaLiveRegionInitialFocusFirstFocusable?: string, ariaLiveRegionInitialFocusFirstFocusableTouch?: string, ariaLiveRegionInitialFocusNone?: string, ariaLiveRegionInitialFocusNoneTouch?: string}; + } + namespace ojPopup { + type Position = + { + my?: oj.ojPopup.PositionAlign, at?: oj.ojPopup.PositionAlign, offset?: oj.ojPopup.PositionPoint, of?: string|oj.ojPopup.PositionPoint, collision?: 'flip'|'fit'|'flipfit'|'flipcenter'|'none' + } + } + namespace ojPopup { + type PositionAlign = + { + vertical?: 'top'|'bottom'|'center', horizontal?: 'start'|'end'|'left'|'center'|'bottom' + } + } + namespace ojPopup { + type PositionPoint = + { + x?: number, y?: number + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojprogress/index.d.ts b/types/@oracle/oraclejet/ojs/ojprogress/index.d.ts new file mode 100644 index 0000000000..66fec85056 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojprogress/index.d.ts @@ -0,0 +1,28 @@ +/// +declare namespace oj { + class ojProgress extends baseComponent { + max: number; + type: 'bar'|'circle'; + value: number; + translations: {ariaIndeterminateProgressText?: string}; + onMaxChanged: (event: CustomEvent)=> any; + onTypeChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojProgressEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojProgressEventMap extends oj.baseComponentEventMap { + 'maxChanged': CustomEvent; + 'typeChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojProgressSettableProperties extends baseComponentSettableProperties { + max: number; + type: 'bar'|'circle'; + value: number; + translations: {ariaIndeterminateProgressText?: string}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojprogresslist/index.d.ts b/types/@oracle/oraclejet/ojs/ojprogresslist/index.d.ts new file mode 100644 index 0000000000..d3b9efbc83 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojprogresslist/index.d.ts @@ -0,0 +1,50 @@ +/// +/// +/// +declare namespace oj { + class ojProgressList extends JetElement { + data: oj.DataProvider|null; + onDataChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojProgressListEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getProperty(property: string): any; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + } + interface ojProgressListEventMap extends oj.JetElementEventMap { + 'dataChanged': CustomEvent; + } + interface ojProgressListSettableProperties extends JetSettableProperties { + data: oj.DataProvider|null; + } + +} +declare namespace oj { + interface ProgressItem { + addEventListener(eventType: oj.ProgressItem.EventType, listener: EventListener): void; + removeEventListener(eventType: oj.ProgressItem.EventType, listener: EventListener): void; + } + namespace ProgressItem { + enum EventType { + LOADSTART = "loadstart", + PROGRESS = "progress", + ABORT = "abort", + ERROR = "error", + LOAD = "load", + TIMEOUT = "timeout", + LOADEND = "loadend", + } + enum Status { + QUEUED = "queued", + LOADSTARTED = "loadstarted", + ABORTED = "aborted", + ERRORED = "errored", + TIMEDOUT = "timedout", + LOADED = "loaded", + } + } + + +} diff --git a/types/@oracle/oraclejet/ojs/ojpulltorefresh/index.d.ts b/types/@oracle/oraclejet/ojs/ojpulltorefresh/index.d.ts new file mode 100644 index 0000000000..7367c03bbd --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojpulltorefresh/index.d.ts @@ -0,0 +1,7 @@ +declare namespace oj { + class PullToRefreshUtils { + static setupPullToRefresh(element: Element, refreshFunc: (()=> Promise), options?: {threshold?: number, primaryText?: string, secondaryText?: string}): void; + static tearDownPullToRefresh(element: Element): void; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojradioset/index.d.ts b/types/@oracle/oraclejet/ojs/ojradioset/index.d.ts new file mode 100644 index 0000000000..7657b0a18c --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojradioset/index.d.ts @@ -0,0 +1,47 @@ +/// +declare namespace oj { + class ojRadioset extends editableValue { + disabled: boolean|null; + labelledBy: string|null; + required: boolean; + value: any; + translations: {required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; + onDisabledChanged: (event: CustomEvent)=> any; + onLabelledByChanged: (event: CustomEvent)=> any; + onRequiredChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojRadioset.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojRadioset.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojRadiosetEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + validate(): Promise; + } + namespace ojRadioset { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojRadiosetEventMap extends oj.editableValueEventMap { + 'ojAnimateEnd': oj.ojRadioset.ojAnimateEnd; + 'ojAnimateStart': oj.ojRadioset.ojAnimateStart; + 'disabledChanged': CustomEvent; + 'labelledByChanged': CustomEvent; + 'requiredChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojRadiosetSettableProperties extends editableValueSettableProperties { + disabled: boolean|null; + labelledBy: string|null; + required: boolean; + value: any; + translations: {required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojrefresher/index.d.ts b/types/@oracle/oraclejet/ojs/ojrefresher/index.d.ts new file mode 100644 index 0000000000..5c2dee4c70 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojrefresher/index.d.ts @@ -0,0 +1,30 @@ +/// +declare namespace oj { + class ojRefresher extends baseComponent { + refreshContent: (()=> Promise); + target: Element; + text: string; + threshold: number; + onRefreshContentChanged: (event: CustomEvent)=> any; + onTargetChanged: (event: CustomEvent)=> any; + onTextChanged: (event: CustomEvent)=> any; + onThresholdChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojRefresherEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojRefresherEventMap extends oj.baseComponentEventMap { + 'refreshContentChanged': CustomEvent; + 'targetChanged': CustomEvent; + 'textChanged': CustomEvent; + 'thresholdChanged': CustomEvent; + } + interface ojRefresherSettableProperties extends baseComponentSettableProperties { + refreshContent: (()=> Promise); + target: Element; + text: string; + threshold: number; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojrouter/index.d.ts b/types/@oracle/oraclejet/ojs/ojrouter/index.d.ts new file mode 100644 index 0000000000..44c23b8f5d --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojrouter/index.d.ts @@ -0,0 +1,69 @@ +/// +declare namespace oj { + class Router { + readonly currentState: (()=> oj.RouterState|undefined); + readonly currentValue: (()=> string|undefined); + defaultStateId: string|undefined; + static defaults: {urlAdapter?: oj.Router.urlPathAdapter|oj.Router.urlParamAdapter, baseUrl?: string, rootInstanceName?: string}; + readonly direction: string|undefined; + readonly moduleConfig: {name: KnockoutObservable, params: {ojRouter: {parentRouter: oj.Router, direction: string}}, lifecycleListener: {attached: ((param0: string)=> void)}}; + readonly name: string; + readonly observableModuleConfig: KnockoutObservable; + readonly parent: oj.Router|undefined; + static readonly rootInstance: oj.Router; + readonly stateId: ((param0?: string)=> string); + readonly states: Array|null; + static readonly transitionedToState: object; + static sync(): Promise<{hasChanged: boolean}>; + configure(option: {[key:string]: oj.RouterState.ConfigOptions}|((id:string)=> oj.RouterState)): any; + createChildRouter(name: string, parentStateId?: string): oj.Router; + dispose(): undefined; + getChildRouter(name: string): oj.Router|undefined; + getCurrentChildRouter(): oj.Router|undefined; + getState(stateId: string): oj.RouterState|undefined; + go(stateIdPath?: string|Array, options?: {historyUpdate: string}): Promise<{hasChanged: boolean}>; + retrieve(): any; + store(data: object): undefined; + } + namespace Router { + type ModuleConfigType = + { + name: KnockoutObservable, params: {ojRouter: {parentRouter: oj.Router, direction: string, parameters: object}}, lifecycleListener: {attached: ((param0: object)=> void)} + } + } + namespace Router { + class urlParamAdapter { + constructor(); + } +class urlPathAdapter { + constructor(); + } + + + } + + +} +declare namespace oj { + class RouterState { + canEnter: (()=> boolean)|(()=> Promise); + canExit: (()=> boolean)|(()=> Promise); + enter: (()=> void)|(()=> Promise); + exit: (()=> void)|(()=> Promise); + readonly id: string; + label: string|undefined; + parameters: object; + title: string|(()=> string|undefined); + value: any; + constructor(id: string, options?: oj.RouterState.ConfigOptions, router?: oj.Router); + go(): Promise<{hasChanged: boolean}>; + isCurrent(): boolean; + } + namespace RouterState { + type ConfigOptions = + { + label?: string, value?: any, isDefault?: boolean, canEnter?: (()=> boolean)|(()=> Promise), enter?: (()=> void)|(()=> Promise), canExit?: (()=> boolean)|(()=> Promise), exit?: (()=> void)|(()=> Promise) + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojselectcombobox/index.d.ts b/types/@oracle/oraclejet/ojs/ojselectcombobox/index.d.ts new file mode 100644 index 0000000000..d6c2cec4a5 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojselectcombobox/index.d.ts @@ -0,0 +1,427 @@ +/// +declare namespace oj { + abstract class ojCombobox, SV=V, RV=V> extends editableValue { + onOjAnimateEnd: (event: oj.ojCombobox.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojCombobox.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojComboboxEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + validate(): Promise; + } + namespace ojCombobox { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojComboboxEventMap extends oj.editableValueEventMap { + 'ojAnimateEnd': oj.ojCombobox.ojAnimateEnd; + 'ojAnimateStart': oj.ojCombobox.ojAnimateStart; + } + interface ojComboboxSettableProperties extends editableValueSettableProperties { + } + namespace ojCombobox { + type Optgroup = + { + disabled?: boolean, label: string, children: Array<(oj.ojCombobox.Option|oj.ojCombobox.Optgroup)> + } + } + namespace ojCombobox { + type Option = + { + disabled?: boolean, label?: string, value: any + } + } + namespace ojCombobox { + type OptionContext = + { + component: Element, parent: Element, index: number, depth: number, leaf: boolean, data: object, parentElement: Element + } + } + namespace ojCombobox { + type OptionsKeys = + { + label?: string, value?: string, children?: string, childKeys?: oj.ojCombobox.OptionsKeys + } + } + +} +declare namespace oj { + class ojComboboxMany extends ojCombobox, ojComboboxManySettableProperties, Array, string> { + asyncValidators: Array>>; + converter: oj.Converter|oj.Validation.RegisteredConverter|null; + minLength: number; + optionRenderer?: ((param0: oj.ojCombobox.OptionContext) => {insert: Element}|undefined)|null; + options: Array|oj.DataProvider|null; + optionsKeys: {childKeys: {label?: string, value?: string, children?: string, childKeys?: oj.ojCombobox.OptionsKeys}, children?: string, label?: string, value?: string}; + pickerAttributes: {style?: string, class?: string}; + placeholder: string|null; + readonly rawValue: string|null; + required: boolean; + validators: Array>|oj.Validation.RegisteredValidator>|null; + value: Array|null; + valueOptions: Array<{value: any, label?: string}> | null; + translations: {filterFurther?: string, noMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; + onAsyncValidatorsChanged: (event: CustomEvent)=> any; + onConverterChanged: (event: CustomEvent)=> any; + onMinLengthChanged: (event: CustomEvent)=> any; + onOptionRendererChanged: (event: CustomEvent)=> any; + onOptionsChanged: (event: CustomEvent)=> any; + onOptionsKeysChanged: (event: CustomEvent)=> any; + onPickerAttributesChanged: (event: CustomEvent)=> any; + onPlaceholderChanged: (event: CustomEvent)=> any; + onRawValueChanged: (event: CustomEvent)=> any; + onRequiredChanged: (event: CustomEvent)=> any; + onValidatorsChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onValueOptionsChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojComboboxMany.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojComboboxMany.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojComboboxManyEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojComboboxMany { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojComboboxManyEventMap extends oj.ojComboboxEventMap { + 'ojAnimateEnd': oj.ojComboboxMany.ojAnimateEnd; + 'ojAnimateStart': oj.ojComboboxMany.ojAnimateStart; + 'asyncValidatorsChanged': CustomEvent; + 'converterChanged': CustomEvent; + 'minLengthChanged': CustomEvent; + 'optionRendererChanged': CustomEvent; + 'optionsChanged': CustomEvent; + 'optionsKeysChanged': CustomEvent; + 'pickerAttributesChanged': CustomEvent; + 'placeholderChanged': CustomEvent; + 'rawValueChanged': CustomEvent; + 'requiredChanged': CustomEvent; + 'validatorsChanged': CustomEvent; + 'valueChanged': CustomEvent; + 'valueOptionsChanged': CustomEvent; + } + interface ojComboboxManySettableProperties extends ojComboboxSettableProperties, Array, string> { + asyncValidators: Array>>; + converter: oj.Converter|oj.Validation.RegisteredConverter|null; + minLength: number; + optionRenderer?: ((param0: oj.ojCombobox.OptionContext) => {insert: Element}|undefined)|null; + options: Array|oj.DataProvider|null; + optionsKeys: {childKeys: {label?: string, value?: string, children?: string, childKeys?: oj.ojCombobox.OptionsKeys}, children?: string, label?: string, value?: string}; + pickerAttributes: {style?: string, class?: string}; + placeholder: string|null; + readonly rawValue: string|null; + required: boolean; + validators: Array>|oj.Validation.RegisteredValidator>|null; + value: Array|null; + valueOptions: Array<{value: any, label?: string}> | null; + translations: {filterFurther?: string, noMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; + } + +} +declare namespace oj { + class ojComboboxOne extends ojCombobox, any, string> { + asyncValidators: Array>; + converter: oj.Converter|oj.Validation.RegisteredConverter|null; + filterOnOpen: 'none'|'rawValue'; + minLength: number; + optionRenderer?: ((param0: oj.ojCombobox.OptionContext) => {insert: Element}|undefined)|null; + options: Array|oj.DataProvider|null; + optionsKeys: {childKeys: {label?: string, value?: string, children?: string, childKeys?: oj.ojCombobox.OptionsKeys}, children?: string, label?: string, value?: string}; + pickerAttributes: {style?: string, class?: string}; + placeholder: string|null; + readonly rawValue: string|null; + required: boolean; + validators: Array|oj.Validation.RegisteredValidator>|null; + value: any; + valueOption: {value: any, label?: string}; + translations: {filterFurther?: string, noMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; + onAsyncValidatorsChanged: (event: CustomEvent)=> any; + onConverterChanged: (event: CustomEvent)=> any; + onFilterOnOpenChanged: (event: CustomEvent)=> any; + onMinLengthChanged: (event: CustomEvent)=> any; + onOptionRendererChanged: (event: CustomEvent)=> any; + onOptionsChanged: (event: CustomEvent)=> any; + onOptionsKeysChanged: (event: CustomEvent)=> any; + onPickerAttributesChanged: (event: CustomEvent)=> any; + onPlaceholderChanged: (event: CustomEvent)=> any; + onRawValueChanged: (event: CustomEvent)=> any; + onRequiredChanged: (event: CustomEvent)=> any; + onValidatorsChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onValueOptionChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojComboboxOne.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojComboboxOne.ojAnimateStart)=> any; + onOjValueUpdated: (event: oj.ojComboboxOne.ojValueUpdated)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojComboboxOneEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojComboboxOne { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + + class ojValueUpdated extends CustomEvent<{value: any, previousValue: any, [propName: string]: any}> { + + } + } + interface ojComboboxOneEventMap extends oj.ojComboboxEventMap { + 'ojAnimateEnd': oj.ojComboboxOne.ojAnimateEnd; + 'ojAnimateStart': oj.ojComboboxOne.ojAnimateStart; + 'ojValueUpdated': oj.ojComboboxOne.ojValueUpdated; + 'asyncValidatorsChanged': CustomEvent; + 'converterChanged': CustomEvent; + 'filterOnOpenChanged': CustomEvent; + 'minLengthChanged': CustomEvent; + 'optionRendererChanged': CustomEvent; + 'optionsChanged': CustomEvent; + 'optionsKeysChanged': CustomEvent; + 'pickerAttributesChanged': CustomEvent; + 'placeholderChanged': CustomEvent; + 'rawValueChanged': CustomEvent; + 'requiredChanged': CustomEvent; + 'validatorsChanged': CustomEvent; + 'valueChanged': CustomEvent; + 'valueOptionChanged': CustomEvent; + } + interface ojComboboxOneSettableProperties extends ojComboboxSettableProperties { + asyncValidators: Array>; + converter: oj.Converter|oj.Validation.RegisteredConverter|null; + filterOnOpen: 'none'|'rawValue'; + minLength: number; + optionRenderer?: ((param0: oj.ojCombobox.OptionContext) => {insert: Element}|undefined)|null; + options: Array|oj.DataProvider|null; + optionsKeys: {childKeys: {label?: string, value?: string, children?: string, childKeys?: oj.ojCombobox.OptionsKeys}, children?: string, label?: string, value?: string}; + pickerAttributes: {style?: string, class?: string}; + placeholder: string|null; + readonly rawValue: string|null; + required: boolean; + validators: Array|oj.Validation.RegisteredValidator>|null; + value: any; + valueOption: {value: any, label?: string}; + translations: {filterFurther?: string, noMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; + } + +} +declare namespace oj { + abstract class ojSelect, SV=V> extends editableValue { + onOjAnimateEnd: (event: oj.ojSelect.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojSelect.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSelectEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + validate(): Promise; + } + namespace ojSelect { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojSelectEventMap extends oj.editableValueEventMap { + 'ojAnimateEnd': oj.ojSelect.ojAnimateEnd; + 'ojAnimateStart': oj.ojSelect.ojAnimateStart; + } + interface ojSelectSettableProperties extends editableValueSettableProperties { + } + namespace ojSelect { + type Optgroup = + { + disabled?: boolean, label: string, children: Array<(oj.ojSelect.Option|oj.ojSelect.Optgroup)> + } + } + namespace ojSelect { + type Option = + { + disabled?: boolean, label?: string, value: any + } + } + namespace ojSelect { + type OptionContext = + { + component: Element, parent: Element, index: number, depth: number, leaf: boolean, data: object, parentElement: Element + } + } + namespace ojSelect { + type OptionsKeys = + { + label?: string, value?: string, children?: string, childKeys?: oj.ojSelect.OptionsKeys + } + } + +} +declare namespace oj { + class ojSelectMany extends ojSelect, ojSelectManySettableProperties> { + minimumResultsForSearch: number; + optionRenderer?: ((param0: oj.ojSelect.OptionContext) => {insert: Element}|undefined)|null; + options: Array|oj.DataProvider|null; + optionsKeys: {childKeys?: {label?: string, value?: string, children?: string, childKeys?: oj.ojSelect.OptionsKeys}, children?: string, label?: string, value?: string}; + pickerAttributes: {style?: string, class?: string}; + placeholder: string|null; + renderMode: 'jet'|'native'; + required: boolean; + value: Array|null; + valueOptions: Array<{value: any, label?: string}> | null; + translations: {filterFurther?: string, moreMatchesFound?: string, noMatchesFound?: string, oneMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, searchField?: string}; + onMinimumResultsForSearchChanged: (event: CustomEvent)=> any; + onOptionRendererChanged: (event: CustomEvent)=> any; + onOptionsChanged: (event: CustomEvent)=> any; + onOptionsKeysChanged: (event: CustomEvent)=> any; + onPickerAttributesChanged: (event: CustomEvent)=> any; + onPlaceholderChanged: (event: CustomEvent)=> any; + onRenderModeChanged: (event: CustomEvent)=> any; + onRequiredChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onValueOptionsChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojSelectMany.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojSelectMany.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSelectManyEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojSelectMany { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojSelectManyEventMap extends oj.ojSelectEventMap { + 'ojAnimateEnd': oj.ojSelectMany.ojAnimateEnd; + 'ojAnimateStart': oj.ojSelectMany.ojAnimateStart; + 'minimumResultsForSearchChanged': CustomEvent; + 'optionRendererChanged': CustomEvent; + 'optionsChanged': CustomEvent; + 'optionsKeysChanged': CustomEvent; + 'pickerAttributesChanged': CustomEvent; + 'placeholderChanged': CustomEvent; + 'renderModeChanged': CustomEvent; + 'requiredChanged': CustomEvent; + 'valueChanged': CustomEvent; + 'valueOptionsChanged': CustomEvent; + } + interface ojSelectManySettableProperties extends ojSelectSettableProperties> { + minimumResultsForSearch: number; + optionRenderer?: ((param0: oj.ojSelect.OptionContext) => {insert: Element}|undefined)|null; + options: Array|oj.DataProvider|null; + optionsKeys: {childKeys?: {label?: string, value?: string, children?: string, childKeys?: oj.ojSelect.OptionsKeys}, children?: string, label?: string, value?: string}; + pickerAttributes: {style?: string, class?: string}; + placeholder: string|null; + renderMode: 'jet'|'native'; + required: boolean; + value: Array|null; + valueOptions: Array<{value: any, label?: string}> | null; + translations: {filterFurther?: string, moreMatchesFound?: string, noMatchesFound?: string, oneMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, searchField?: string}; + } + +} +declare namespace oj { + class ojSelectOne extends ojSelect> { + minimumResultsForSearch: number; + optionRenderer?: ((param0: oj.ojSelect.OptionContext) => {insert: Element}|undefined)|null; + options: Array|oj.DataProvider|null; + optionsKeys: {childKeys?: {label?: string, value?: string, children?: string, childKeys?: oj.ojSelect.OptionsKeys}, children?: string, label?: string, value?: string}; + pickerAttributes: {style?: string, class?: string}; + placeholder: string|null; + renderMode: 'jet'|'native'; + required: boolean; + value: any; + valueOption: {value: any, label?: string}; + translations: {filterFurther?: string, moreMatchesFound?: string, noMatchesFound?: string, oneMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, searchField?: string}; + onMinimumResultsForSearchChanged: (event: CustomEvent)=> any; + onOptionRendererChanged: (event: CustomEvent)=> any; + onOptionsChanged: (event: CustomEvent)=> any; + onOptionsKeysChanged: (event: CustomEvent)=> any; + onPickerAttributesChanged: (event: CustomEvent)=> any; + onPlaceholderChanged: (event: CustomEvent)=> any; + onRenderModeChanged: (event: CustomEvent)=> any; + onRequiredChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onValueOptionChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojSelectOne.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojSelectOne.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSelectOneEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojSelectOne { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojSelectOneEventMap extends oj.ojSelectEventMap { + 'ojAnimateEnd': oj.ojSelectOne.ojAnimateEnd; + 'ojAnimateStart': oj.ojSelectOne.ojAnimateStart; + 'minimumResultsForSearchChanged': CustomEvent; + 'optionRendererChanged': CustomEvent; + 'optionsChanged': CustomEvent; + 'optionsKeysChanged': CustomEvent; + 'pickerAttributesChanged': CustomEvent; + 'placeholderChanged': CustomEvent; + 'renderModeChanged': CustomEvent; + 'requiredChanged': CustomEvent; + 'valueChanged': CustomEvent; + 'valueOptionChanged': CustomEvent; + } + interface ojSelectOneSettableProperties extends ojSelectSettableProperties { + minimumResultsForSearch: number; + optionRenderer?: ((param0: oj.ojSelect.OptionContext) => {insert: Element}|undefined)|null; + options: Array|oj.DataProvider|null; + optionsKeys: {childKeys?: {label?: string, value?: string, children?: string, childKeys?: oj.ojSelect.OptionsKeys}, children?: string, label?: string, value?: string}; + pickerAttributes: {style?: string, class?: string}; + placeholder: string|null; + renderMode: 'jet'|'native'; + required: boolean; + value: any; + valueOption: {value: any, label?: string}; + translations: {filterFurther?: string, moreMatchesFound?: string, noMatchesFound?: string, oneMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, searchField?: string}; + } + +} +declare namespace oj { + interface Optgroup { + children: Array<(oj.Option|oj.Optgroup)>; + disabled?: boolean; + label: string; + } + +} +declare namespace oj { + interface Option { + disabled?: boolean; + label?: string; + value: object; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojslider/index.d.ts b/types/@oracle/oraclejet/ojs/ojslider/index.d.ts new file mode 100644 index 0000000000..467073e274 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojslider/index.d.ts @@ -0,0 +1,61 @@ +/// +declare namespace oj { + class ojSlider extends editableValue { + disabled: boolean|null; + max: number|null; + min: number|null; + orientation: 'horizontal'|'vertical'; + step: number|null; + readonly transientValue: number; + type: 'fromMin'|'fromMax'|'single'; + value: number|null; + translations: {invalidStep?: string, maxMin?: string, noValue?: string, optionNum?: string, valueRange?: string}; + onDisabledChanged: (event: CustomEvent)=> any; + onMaxChanged: (event: CustomEvent)=> any; + onMinChanged: (event: CustomEvent)=> any; + onOrientationChanged: (event: CustomEvent)=> any; + onStepChanged: (event: CustomEvent)=> any; + onTransientValueChanged: (event: CustomEvent)=> any; + onTypeChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojSlider.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojSlider.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSliderEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojSlider { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojSliderEventMap extends oj.editableValueEventMap { + 'ojAnimateEnd': oj.ojSlider.ojAnimateEnd; + 'ojAnimateStart': oj.ojSlider.ojAnimateStart; + 'disabledChanged': CustomEvent; + 'maxChanged': CustomEvent; + 'minChanged': CustomEvent; + 'orientationChanged': CustomEvent; + 'stepChanged': CustomEvent; + 'transientValueChanged': CustomEvent; + 'typeChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojSliderSettableProperties extends editableValueSettableProperties { + disabled: boolean|null; + max: number|null; + min: number|null; + orientation: 'horizontal'|'vertical'; + step: number|null; + readonly transientValue: number; + type: 'fromMin'|'fromMax'|'single'; + value: number|null; + translations: {invalidStep?: string, maxMin?: string, noValue?: string, optionNum?: string, valueRange?: string}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojsunburst/index.d.ts b/types/@oracle/oraclejet/ojs/ojsunburst/index.d.ts new file mode 100644 index 0000000000..6ef93fd030 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojsunburst/index.d.ts @@ -0,0 +1,270 @@ +/// +declare namespace oj { + class ojSunburst extends dvtBaseComponent> { + animationDuration: number; + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + animationUpdateColor: string; + as: string; + colorLabel: string; + data: oj.DataProvider|null; + displayLevels: number; + drilling: 'on'|'off'; + expanded: KeySet.KeySet; + hiddenCategories: Array; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + hoverBehaviorDelay: number; + nodeDefaults: {borderColor: string, borderWidth: number, hoverColor: string, labelDisplay: 'horizontal'|'rotated'|'off'|'auto', labelHalign: 'inner'|'outer'|'center', labelMinLength: number, labelStyle: object, selectedInnerColor: string, selectedOuterColor: string, showDisclosure: 'on'|'off'}; + rootNode: any; + rootNodeContent: {renderer: ((context: oj.ojSunburst.RootNodeContext) => ({insert: Element|string}))}; + rotation: 'off'|'on'; + selection: Array; + selectionMode: 'none'|'single'|'multiple'; + sizeLabel: string; + sorting: 'on'|'off'; + startAngle: number; + tooltip: {renderer: ((context: oj.ojSunburst.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + touchResponse: 'touchStart'|'auto'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelColor?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, labelSize?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, tooltipCollapse?: string, tooltipExpand?: string}; + onAnimationDurationChanged: (event: CustomEvent)=> any; + onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; + onAnimationOnDisplayChanged: (event: CustomEvent)=> any; + onAnimationUpdateColorChanged: (event: CustomEvent)=> any; + onAsChanged: (event: CustomEvent)=> any; + onColorLabelChanged: (event: CustomEvent)=> any; + onDataChanged: (event: CustomEvent)=> any; + onDisplayLevelsChanged: (event: CustomEvent)=> any; + onDrillingChanged: (event: CustomEvent)=> any; + onExpandedChanged: (event: CustomEvent)=> any; + onHiddenCategoriesChanged: (event: CustomEvent)=> any; + onHighlightMatchChanged: (event: CustomEvent)=> any; + onHighlightedCategoriesChanged: (event: CustomEvent)=> any; + onHoverBehaviorChanged: (event: CustomEvent)=> any; + onHoverBehaviorDelayChanged: (event: CustomEvent)=> any; + onNodeDefaultsChanged: (event: CustomEvent)=> any; + onRootNodeChanged: (event: CustomEvent)=> any; + onRootNodeContentChanged: (event: CustomEvent)=> any; + onRotationChanged: (event: CustomEvent)=> any; + onSelectionChanged: (event: CustomEvent)=> any; + onSelectionModeChanged: (event: CustomEvent)=> any; + onSizeLabelChanged: (event: CustomEvent)=> any; + onSortingChanged: (event: CustomEvent)=> any; + onStartAngleChanged: (event: CustomEvent)=> any; + onTooltipChanged: (event: CustomEvent)=> any; + onTouchResponseChanged: (event: CustomEvent)=> any; + onOjBeforeCollapse: (event: oj.ojSunburst.ojBeforeCollapse)=> any; + onOjBeforeDrill: (event: oj.ojSunburst.ojBeforeDrill)=> any; + onOjBeforeExpand: (event: oj.ojSunburst.ojBeforeExpand)=> any; + onOjCollapse: (event: oj.ojSunburst.ojCollapse)=> any; + onOjDrill: (event: oj.ojSunburst.ojDrill)=> any; + onOjExpand: (event: oj.ojSunburst.ojExpand)=> any; + onOjRotateInput: (event: oj.ojSunburst.ojRotateInput)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSunburstEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getContextByNode(node: Element): oj.ojSunburst.NodeContext|null; + getNode(subIdPath: Array): oj.ojSunburst.DataContext|null; + } + namespace ojSunburst { + class ojBeforeCollapse extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { + + } + + class ojBeforeDrill extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { + + } + + class ojBeforeExpand extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { + + } + + class ojCollapse extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { + + } + + class ojDrill extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { + + } + + class ojExpand extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { + + } + + class ojRotateInput extends CustomEvent<{value: number, [propName: string]: any}> { + + } + } + interface ojSunburstEventMap extends oj.dvtBaseComponentEventMap { + 'ojBeforeCollapse': oj.ojSunburst.ojBeforeCollapse; + 'ojBeforeDrill': oj.ojSunburst.ojBeforeDrill; + 'ojBeforeExpand': oj.ojSunburst.ojBeforeExpand; + 'ojCollapse': oj.ojSunburst.ojCollapse; + 'ojDrill': oj.ojSunburst.ojDrill; + 'ojExpand': oj.ojSunburst.ojExpand; + 'ojRotateInput': oj.ojSunburst.ojRotateInput; + 'animationDurationChanged': CustomEvent; + 'animationOnDataChangeChanged': CustomEvent; + 'animationOnDisplayChanged': CustomEvent; + 'animationUpdateColorChanged': CustomEvent; + 'asChanged': CustomEvent; + 'colorLabelChanged': CustomEvent; + 'dataChanged': CustomEvent; + 'displayLevelsChanged': CustomEvent; + 'drillingChanged': CustomEvent; + 'expandedChanged': CustomEvent; + 'hiddenCategoriesChanged': CustomEvent; + 'highlightMatchChanged': CustomEvent; + 'highlightedCategoriesChanged': CustomEvent; + 'hoverBehaviorChanged': CustomEvent; + 'hoverBehaviorDelayChanged': CustomEvent; + 'nodeDefaultsChanged': CustomEvent; + 'rootNodeChanged': CustomEvent; + 'rootNodeContentChanged': CustomEvent; + 'rotationChanged': CustomEvent; + 'selectionChanged': CustomEvent; + 'selectionModeChanged': CustomEvent; + 'sizeLabelChanged': CustomEvent; + 'sortingChanged': CustomEvent; + 'startAngleChanged': CustomEvent; + 'tooltipChanged': CustomEvent; + 'touchResponseChanged': CustomEvent; + } + interface ojSunburstSettableProperties extends dvtBaseComponentSettableProperties { + animationDuration: number; + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + animationUpdateColor: string; + as: string; + colorLabel: string; + data: oj.DataProvider|null; + displayLevels: number; + drilling: 'on'|'off'; + expanded: KeySet.KeySet; + hiddenCategories: Array; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + hoverBehaviorDelay: number; + nodeDefaults: {borderColor: string, borderWidth: number, hoverColor: string, labelDisplay: 'horizontal'|'rotated'|'off'|'auto', labelHalign: 'inner'|'outer'|'center', labelMinLength: number, labelStyle: object, selectedInnerColor: string, selectedOuterColor: string, showDisclosure: 'on'|'off'}; + rootNode: any; + rootNodeContent: {renderer: ((context: oj.ojSunburst.RootNodeContext) => ({insert: Element|string}))}; + rotation: 'off'|'on'; + selection: Array; + selectionMode: 'none'|'single'|'multiple'; + sizeLabel: string; + sorting: 'on'|'off'; + startAngle: number; + tooltip: {renderer: ((context: oj.ojSunburst.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + touchResponse: 'touchStart'|'auto'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelColor?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, labelSize?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, tooltipCollapse?: string, tooltipExpand?: string}; + } + namespace ojSunburst { + type DataContext = + { + color: string, label: string, selected: boolean, size: number, tooltip: string + } + } + namespace ojSunburst { + type NodeContext = + { + subId: string, indexPath: Array + } + } + namespace ojSunburst { + type RootNodeContext = + { + outerBounds: {x: number, y: number, width: number, height: number}, innerBounds: {x: number, y: number, width: number, height: number}, id: K, data: object, itemData: D, componentElement: Element + } + } + namespace ojSunburst { + type TooltipContext = + { + parentElement: Element, id: K, label: string, value: number, radius: number, color: string, data: object, itemData: D, componentElement: Element + } + } + +} +declare namespace oj { + class ojSunburstNode extends JetElement { + borderColor?: string; + borderWidth?: number; + categories?: Array; + color?: string; + drilling?: 'on'|'off'|'inherit'; + label?: string; + labelDisplay?: 'horizontal'|'rotated'|'off'|'auto'; + labelHalign?: 'inner'|'outer'|'center'; + labelStyle?: object; + pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'; + radius?: number; + selectable?: 'off'|'auto'; + shortDesc?: string; + showDisclosure?: 'on'|'off'|'inherit'; + svgClassName?: string; + svgStyle?: object; + value: number; + onBorderColorChanged: (event: CustomEvent)=> any; + onBorderWidthChanged: (event: CustomEvent)=> any; + onCategoriesChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onDrillingChanged: (event: CustomEvent)=> any; + onLabelChanged: (event: CustomEvent)=> any; + onLabelDisplayChanged: (event: CustomEvent)=> any; + onLabelHalignChanged: (event: CustomEvent)=> any; + onLabelStyleChanged: (event: CustomEvent)=> any; + onPatternChanged: (event: CustomEvent)=> any; + onRadiusChanged: (event: CustomEvent)=> any; + onSelectableChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onShowDisclosureChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSunburstNodeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojSunburstNodeEventMap extends oj.JetElementEventMap { + 'borderColorChanged': CustomEvent; + 'borderWidthChanged': CustomEvent; + 'categoriesChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'drillingChanged': CustomEvent; + 'labelChanged': CustomEvent; + 'labelDisplayChanged': CustomEvent; + 'labelHalignChanged': CustomEvent; + 'labelStyleChanged': CustomEvent; + 'patternChanged': CustomEvent; + 'radiusChanged': CustomEvent; + 'selectableChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'showDisclosureChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojSunburstNodeSettableProperties extends JetSettableProperties { + borderColor?: string; + borderWidth?: number; + categories?: Array; + color?: string; + drilling?: 'on'|'off'|'inherit'; + label?: string; + labelDisplay?: 'horizontal'|'rotated'|'off'|'auto'; + labelHalign?: 'inner'|'outer'|'center'; + labelStyle?: object; + pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'; + radius?: number; + selectable?: 'off'|'auto'; + shortDesc?: string; + showDisclosure?: 'on'|'off'|'inherit'; + svgClassName?: string; + svgStyle?: object; + value: number; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojswipeactions/index.d.ts b/types/@oracle/oraclejet/ojs/ojswipeactions/index.d.ts new file mode 100644 index 0000000000..11ce95700d --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojswipeactions/index.d.ts @@ -0,0 +1,24 @@ +/// +declare namespace oj { + class ojSwipeActions extends baseComponent { + translations: {ariaHideActionsDescription?: string, ariaShowEndActionsDescription?: string, ariaShowStartActionsDescription?: string}; + onOjAction: (event: oj.ojSwipeActions.ojAction)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSwipeActionsEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + } + namespace ojSwipeActions { + class ojAction extends CustomEvent<{ [propName: string]: any}> { + + } + } + interface ojSwipeActionsEventMap extends oj.baseComponentEventMap { + 'ojAction': oj.ojSwipeActions.ojAction; + } + interface ojSwipeActionsSettableProperties extends baseComponentSettableProperties { + translations: {ariaHideActionsDescription?: string, ariaShowEndActionsDescription?: string, ariaShowStartActionsDescription?: string}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojswipetoreveal/index.d.ts b/types/@oracle/oraclejet/ojs/ojswipetoreveal/index.d.ts new file mode 100644 index 0000000000..da94a66d4b --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojswipetoreveal/index.d.ts @@ -0,0 +1,7 @@ +declare namespace oj { + class SwipeToRevealUtils { + static setupSwipeActions(elem: Element, options?: {threshold?: number}): void; + static tearDownSwipeActions(elem: Element): void; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojswitch/index.d.ts b/types/@oracle/oraclejet/ojs/ojswitch/index.d.ts new file mode 100644 index 0000000000..31f04cc1ee --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojswitch/index.d.ts @@ -0,0 +1,39 @@ +/// +declare namespace oj { + class ojSwitch extends editableValue { + disabled: boolean; + readonly: boolean; + value: boolean; + onDisabledChanged: (event: CustomEvent)=> any; + onReadonlyChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojSwitch.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojSwitch.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSwitchEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojSwitch { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojSwitchEventMap extends oj.editableValueEventMap { + 'ojAnimateEnd': oj.ojSwitch.ojAnimateEnd; + 'ojAnimateStart': oj.ojSwitch.ojAnimateStart; + 'disabledChanged': CustomEvent; + 'readonlyChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojSwitchSettableProperties extends editableValueSettableProperties { + disabled: boolean; + readonly: boolean; + value: boolean; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojswitcher/index.d.ts b/types/@oracle/oraclejet/ojs/ojswitcher/index.d.ts new file mode 100644 index 0000000000..d99477edf8 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojswitcher/index.d.ts @@ -0,0 +1,21 @@ +declare namespace oj { + class ojSwitcher extends JetElement { + value: string; + onValueChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSwitcherEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getProperty(property: string): any; + refresh(): void; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + } + interface ojSwitcherEventMap extends oj.JetElementEventMap { + 'valueChanged': CustomEvent; + } + interface ojSwitcherSettableProperties extends JetSettableProperties { + value: string; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojtable/index.d.ts b/types/@oracle/oraclejet/ojs/ojtable/index.d.ts new file mode 100644 index 0000000000..5ee54785bd --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojtable/index.d.ts @@ -0,0 +1,197 @@ +/// +/// +declare namespace oj { + class ojTable extends baseComponent> { + accessibility: {rowHeader: string}; + as: string; + columns: Array<{className?: string|null, field?: string|null, footerClassName?: string|null, footerRenderer?: ((context: oj.ojTable.FooterRendererContext) => {insert: HTMLElement | string} | void) | null, footerStyle?: string|null, footerTemplate?: {componentElement: Element}, headerClassName?: string|null, headerRenderer?: ((context: oj.ojTable.HeaderRendererContext) => {insert: HTMLElement | string} | void) | null, headerStyle?: string|null, headerTemplate?: {componentElement: Element, data: object}, headerText?: string|null, id?: string|null, renderer?: ((context: oj.ojTable.ColumnsRendererContext) => {insert: HTMLElement | string} | void) | null, resizable?: 'enabled'|'disabled', sortProperty?: string|null, sortable?: 'auto'|'enabled'|'disabled', style?: string|null, template?: {componentElement: Element, data: object, row: object, index: number, columnIndex: number, key: any, mode: string}, width?: number|null}>|null; + columnsDefault: {className?: string|null, field?: string|null, footerClassName?: string|null, footerRenderer?: ((context: oj.ojTable.FooterRendererContext) => {insert: HTMLElement | string} | void) | null, footerStyle?: string|null, footerTemplate?: {componentElement: Element}, headerClassName?: string|null, headerRenderer?: ((context: oj.ojTable.HeaderRendererContext) => {insert: HTMLElement | string} | void) | null, headerStyle?: string|null, headerTemplate?: {componentElement: Element, data: object}, headerText?: string|null, renderer?: ((context: oj.ojTable.ColumnsRendererContext) => {insert: HTMLElement | string} | void) | null, resizable?: 'enabled'|'disabled', sortProperty?: string|null, sortable?: 'auto'|'enabled'|'disabled', style?: string|null, template?: {componentElement: Element, data: object, row: object, index: number, columnIndex: number, key: any, mode: string}, width?: number|null}; + currentRow: oj.ojTable.CurrentRow | null; + data: oj.DataProvider; + display: 'list'|'grid'; + dnd: {drag: {rows: {dataTypes?: string|Array, dragStart?: ((param0: DragEvent, param1: oj.ojTable.DragRowContext)=> void), drag?: ((param0: DragEvent)=> void), dragEnd?: ((param0: DragEvent)=> void)}}, drop: {columns: {dataTypes: string|Array, dragEnter?: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void), dragOver?: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void), dragLeave?: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void), drop: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void)}, rows: {dataTypes: string|Array, dragEnter?: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void), dragOver?: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void), dragLeave?: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void), drop: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void)}}, reorder: {columns: 'enabled'|'disabled'}}; + editMode: 'none'|'rowEdit'; + readonly firstSelectedRow: object; + horizontalGridVisible: 'auto'|'enabled'|'disabled'; + rowRenderer: ((context: oj.ojTable.RowRendererContext) => string | HTMLElement | void) | null; + scrollPolicy: 'auto'|'loadMoreOnScroll'; + scrollPolicyOptions: {fetchSize: number, maxCount: number}; + scrollPosition: {x?: number, y?: number, columnIndex?: number, rowIndex?: number, columnKey?: any, rowKey?: any, offsetX?: number, offsetY?: number}; + selection: Array & oj.ojTable.RowSelectionEnd> | Array & oj.ojTable.ColumnSelectionEnd>; + selectionMode: {column: 'single'|'multiple', row: 'single'|'multiple'}; + selectionRequired: boolean; + verticalGridVisible: 'auto'|'enabled'|'disabled'; + translations: {labelAccSelectionAffordanceBottom?: string, labelAccSelectionAffordanceTop?: string, labelDisableNonContiguousSelection?: string, labelEditRow?: string, labelEnableNonContiguousSelection?: string, labelResize?: string, labelResizePopupSpinner?: string, labelResizePopupSubmit?: string, labelSelectAndEditRow?: string, labelSelectColum?: string, labelSelectRow?: string, labelSort?: string, labelSortAsc?: string, labelSortDsc?: string, msgColumnResizeWidthValidation?: string, msgFetchingData?: string, msgInitializing?: string, msgNoData?: string, msgScrollPolicyMaxCountDetail?: string, msgScrollPolicyMaxCountSummary?: string, msgStatusSortAscending?: string, msgStatusSortDescending?: string}; + onAccessibilityChanged: (event: CustomEvent)=> any; + onAsChanged: (event: CustomEvent)=> any; + onColumnsChanged: (event: CustomEvent)=> any; + onColumnsDefaultChanged: (event: CustomEvent)=> any; + onCurrentRowChanged: (event: CustomEvent)=> any; + onDataChanged: (event: CustomEvent)=> any; + onDisplayChanged: (event: CustomEvent)=> any; + onDndChanged: (event: CustomEvent)=> any; + onEditModeChanged: (event: CustomEvent)=> any; + onFirstSelectedRowChanged: (event: CustomEvent)=> any; + onHorizontalGridVisibleChanged: (event: CustomEvent)=> any; + onRowRendererChanged: (event: CustomEvent)=> any; + onScrollPolicyChanged: (event: CustomEvent)=> any; + onScrollPolicyOptionsChanged: (event: CustomEvent)=> any; + onScrollPositionChanged: (event: CustomEvent)=> any; + onSelectionChanged: (event: CustomEvent)=> any; + onSelectionModeChanged: (event: CustomEvent)=> any; + onSelectionRequiredChanged: (event: CustomEvent)=> any; + onVerticalGridVisibleChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojTable.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojTable.ojAnimateStart)=> any; + onOjBeforeCurrentRow: (event: oj.ojTable.ojBeforeCurrentRow)=> any; + onOjBeforeRowEdit: (event: oj.ojTable.ojBeforeRowEdit)=> any; + onOjBeforeRowEditEnd: (event: oj.ojTable.ojBeforeRowEditEnd)=> any; + onOjSort: (event: oj.ojTable.ojSort)=> any; + + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojTableEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getContextByNode(node: Element): {subId: 'oj-table-cell', rowIndex: number, columnIndex: number, key:string} | {subId: 'oj-table-footer'|'oj-table-header',index: number}; + getDataForVisibleRow(rowIndex: number) : {data: D, index: number, key: K} | null + refresh(): void; + refreshRow(rowIdx: number): Promise; + } + namespace ojTable { + class ojAnimateEnd extends CustomEvent<{action: 'add'|'remove'|'update', element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: 'add'|'remove'|'update', element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + + class ojBeforeCurrentRow extends CustomEvent<{currentRow: oj.ojTable.CurrentRow, previousCurrentRow: oj.ojTable.CurrentRow, [propName: string]: any}> { + + } + + class ojBeforeRowEdit extends CustomEvent<{rowContext: object, [propName: string]: any}> { + + } + + class ojBeforeRowEditEnd extends CustomEvent<{rowContext: object, cancelEdit: object, [propName: string]: any}> { + + } + + class ojSort extends CustomEvent<{header: Element, direction: 'ascending'|'descending', [propName: string]: any}> { + + } + } + interface ojTableEventMap extends oj.baseComponentEventMap { + 'ojAnimateEnd': oj.ojTable.ojAnimateEnd; + 'ojAnimateStart': oj.ojTable.ojAnimateStart; + 'ojBeforeCurrentRow': oj.ojTable.ojBeforeCurrentRow; + 'ojBeforeRowEdit': oj.ojTable.ojBeforeRowEdit; + 'ojBeforeRowEditEnd': oj.ojTable.ojBeforeRowEditEnd; + 'ojSort': oj.ojTable.ojSort; + 'accessibilityChanged': CustomEvent; + 'asChanged': CustomEvent; + 'columnsChanged': CustomEvent; + 'columnsDefaultChanged': CustomEvent; + 'currentRowChanged': CustomEvent; + 'dataChanged': CustomEvent; + 'displayChanged': CustomEvent; + 'dndChanged': CustomEvent; + 'editModeChanged': CustomEvent; + 'firstSelectedRowChanged': CustomEvent; + 'horizontalGridVisibleChanged': CustomEvent; + 'rowRendererChanged': CustomEvent; + 'scrollPolicyChanged': CustomEvent; + 'scrollPolicyOptionsChanged': CustomEvent; + 'scrollPositionChanged': CustomEvent; + 'selectionChanged': CustomEvent; + 'selectionModeChanged': CustomEvent; + 'selectionRequiredChanged': CustomEvent; + 'verticalGridVisibleChanged': CustomEvent; + } + interface ojTableSettableProperties extends baseComponentSettableProperties { + accessibility: {rowHeader: string}; + as: string; + columns: Array<{className?: string|null, field?: string|null, footerClassName?: string|null, footerRenderer?: ((context: oj.ojTable.FooterRendererContext) => {insert: HTMLElement | string} | void) | null, footerStyle?: string|null, footerTemplate?: {componentElement: Element}, headerClassName?: string|null, headerRenderer?: ((context: oj.ojTable.HeaderRendererContext) => {insert: HTMLElement | string} | void) | null, headerStyle?: string|null, headerTemplate?: {componentElement: Element, data: object}, headerText?: string|null, id?: string|null, renderer?: ((context: oj.ojTable.ColumnsRendererContext) => {insert: HTMLElement | string} | void) | null, resizable?: 'enabled'|'disabled', sortProperty?: string|null, sortable?: 'auto'|'enabled'|'disabled', style?: string|null, template?: {componentElement: Element, data: object, row: object, index: number, columnIndex: number, key: any, mode: string}, width?: number|null}>|null; + columnsDefault: {className?: string|null, field?: string|null, footerClassName?: string|null, footerRenderer?: ((context: oj.ojTable.FooterRendererContext) => {insert: HTMLElement | string} | void) | null, footerStyle?: string|null, footerTemplate?: {componentElement: Element}, headerClassName?: string|null, headerRenderer?: ((context: oj.ojTable.HeaderRendererContext) => {insert: HTMLElement | string} | void) | null, headerStyle?: string|null, headerTemplate?: {componentElement: Element, data: object}, headerText?: string|null, renderer?: ((context: oj.ojTable.ColumnsRendererContext) => {insert: HTMLElement | string} | void) | null, resizable?: 'enabled'|'disabled', sortProperty?: string|null, sortable?: 'auto'|'enabled'|'disabled', style?: string|null, template?: {componentElement: Element, data: object, row: object, index: number, columnIndex: number, key: any, mode: string}, width?: number|null}; + currentRow: oj.ojTable.CurrentRow | null; + data: oj.DataProvider|null; + display: 'list'|'grid'; + dnd: {drag: {rows: {dataTypes?: string|Array, dragStart?: ((param0: DragEvent, param1: oj.ojTable.DragRowContext)=> void), drag?: ((param0: DragEvent)=> void), dragEnd?: ((param0: DragEvent)=> void)}}, drop: {columns: {dataTypes: string|Array, dragEnter?: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void), dragOver?: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void), dragLeave?: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void), drop: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void)}, rows: {dataTypes: string|Array, dragEnter?: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void), dragOver?: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void), dragLeave?: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void), drop: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void)}}, reorder: {columns: 'enabled'|'disabled'}}; + editMode: 'none'|'rowEdit'; + readonly firstSelectedRow: object; + horizontalGridVisible: 'auto'|'enabled'|'disabled'; + rowRenderer: ((context: oj.ojTable.RowRendererContext) => string | HTMLElement | void) | null; + scrollPolicy: 'auto'|'loadMoreOnScroll'; + scrollPolicyOptions: {fetchSize: number, maxCount: number}; + scrollPosition: {x?: number, y?: number, columnIndex?: number, rowIndex?: number, columnKey?: any, rowKey?: any, offsetX?: number, offsetY?: number}; + selection: Array & oj.ojTable.RowSelectionEnd> | Array & oj.ojTable.ColumnSelectionEnd>; + selectionMode: {column: 'single'|'multiple', row: 'single'|'multiple'}; + selectionRequired: boolean; + verticalGridVisible: 'auto'|'enabled'|'disabled'; + translations: {labelAccSelectionAffordanceBottom?: string, labelAccSelectionAffordanceTop?: string, labelDisableNonContiguousSelection?: string, labelEditRow?: string, labelEnableNonContiguousSelection?: string, labelResize?: string, labelResizePopupSpinner?: string, labelResizePopupSubmit?: string, labelSelectAndEditRow?: string, labelSelectColum?: string, labelSelectRow?: string, labelSort?: string, labelSortAsc?: string, labelSortDsc?: string, msgColumnResizeWidthValidation?: string, msgFetchingData?: string, msgInitializing?: string, msgNoData?: string, msgScrollPolicyMaxCountDetail?: string, msgScrollPolicyMaxCountSummary?: string, msgStatusSortAscending?: string, msgStatusSortDescending?: string}; + } + namespace ojTable { + type ColumnSelectionEnd = {endIndex:{column:number},endKey?:{column:K}}|{endIndex?:{column:number}, endKey:{column:K}}; + } + namespace ojTable { + type ColumnSelectionStart = {startIndex:{column:number}, startKey?:{column:K}}|{startIndex?:{column:number}, startKey:{column:K}}; + } + namespace ojTable { + type ColumnsRendererContext = + { + cellContext: {datasource: oj.DataProvider|null, mode: 'edit'|'navigation', status: oj.ojTable.ContextStatus}, columnIndex: number, componentElement: Element, data: D, parentElement: Element, row: {[name: string]: any} + } + } + namespace ojTable { + type ContextStatus = + { + rowIndex: number, rowKey: K, currentRow: oj.ojTable.CurrentRow + } + } + namespace ojTable { + type CurrentRow = {rowIndex: number, rowKey?: K}|{rowIndex?: number, rowKey: K}; + } + namespace ojTable { + type DragRowContext = + { + rows: Array<{data: D, index: number, key: K}> + } + } + namespace ojTable { + type DropColumnContext = + { + columnIndex: number + } + } + namespace ojTable { + type DropRowContext = + { + rowIndex: number + } + } + namespace ojTable { + type FooterRendererContext = + { + columnIndex: number, componentElement: Element, footerContext: {datasource: oj.DataProvider|null}, parentElement: Element + } + } + namespace ojTable { + type HeaderRendererContext = + { + columnIndex: number, columnHeaderDefaultRenderer: ((param0: object, param1: ((param0: object)=>void))=> void), columnHeaderSortableIconRenderer: ((param0: object, param1: ((param0: Object)=>void))=> void), componentElement: Element, data: string, headerContext: {datasource: oj.DataProvider|null}, parentElement: Element + } + } + namespace ojTable { + type RowRendererContext = + { + componentElement: Element, data: {[name: string]: any}, parentElement: Element, rowContext: {datasource: oj.DataProvider|null, mode: 'edit'|'navigation', status: oj.ojTable.ContextStatus} + } + } + namespace ojTable { + type RowSelectionEnd = {endIndex: {row: number}, endKey?: {row: K}}|{endIndex?:{row: number}, endKey:{row: K}}; + } + namespace ojTable { + type RowSelectionStart = {startIndex: {row: number}, startKey?:{row: K}}|{startIndex?: {row: number}, startKey:{row: K}}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojtagcloud/index.d.ts b/types/@oracle/oraclejet/ojs/ojtagcloud/index.d.ts new file mode 100644 index 0000000000..9400b980f7 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojtagcloud/index.d.ts @@ -0,0 +1,139 @@ +/// +/// +declare namespace oj { + class ojTagCloud extends dvtBaseComponent> { + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + as: string; + data: oj.DataProvider|null; + hiddenCategories: Array; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + layout: 'cloud'|'rectangular'; + selection: Array; + selectionMode: 'single'|'multiple'|'none'; + styleDefaults: {animationDuration?: number, hoverBehaviorDelay?: number, svgStyle?: object}; + tooltip: {renderer: ((context: oj.ojTagCloud.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + touchResponse: 'touchStart'|'auto'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; + onAnimationOnDisplayChanged: (event: CustomEvent)=> any; + onAsChanged: (event: CustomEvent)=> any; + onDataChanged: (event: CustomEvent)=> any; + onHiddenCategoriesChanged: (event: CustomEvent)=> any; + onHighlightMatchChanged: (event: CustomEvent)=> any; + onHighlightedCategoriesChanged: (event: CustomEvent)=> any; + onHoverBehaviorChanged: (event: CustomEvent)=> any; + onLayoutChanged: (event: CustomEvent)=> any; + onSelectionChanged: (event: CustomEvent)=> any; + onSelectionModeChanged: (event: CustomEvent)=> any; + onStyleDefaultsChanged: (event: CustomEvent)=> any; + onTooltipChanged: (event: CustomEvent)=> any; + onTouchResponseChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTagCloudEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getContextByNode(node: Element): oj.ojTagCloud.NodeContext|null; + getItem(index: number): oj.ojTagCloud.ItemContext|null; + getItemCount(): number; + } + interface ojTagCloudEventMap extends oj.dvtBaseComponentEventMap { + 'animationOnDataChangeChanged': CustomEvent; + 'animationOnDisplayChanged': CustomEvent; + 'asChanged': CustomEvent; + 'dataChanged': CustomEvent; + 'hiddenCategoriesChanged': CustomEvent; + 'highlightMatchChanged': CustomEvent; + 'highlightedCategoriesChanged': CustomEvent; + 'hoverBehaviorChanged': CustomEvent; + 'layoutChanged': CustomEvent; + 'selectionChanged': CustomEvent; + 'selectionModeChanged': CustomEvent; + 'styleDefaultsChanged': CustomEvent; + 'tooltipChanged': CustomEvent; + 'touchResponseChanged': CustomEvent; + } + interface ojTagCloudSettableProperties extends dvtBaseComponentSettableProperties { + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + as: string; + data: oj.DataProvider|null; + hiddenCategories: Array; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + layout: 'cloud'|'rectangular'; + selection: Array; + selectionMode: 'single'|'multiple'|'none'; + styleDefaults: {animationDuration?: number, hoverBehaviorDelay?: number, svgStyle?: object}; + tooltip: {renderer: ((context: oj.ojTagCloud.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + touchResponse: 'touchStart'|'auto'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + } + namespace ojTagCloud { + type ItemContext = + { + color: string, label: string, selected: boolean, tooltip: string, value: number + } + } + namespace ojTagCloud { + type NodeContext = + { + subId: string, index: number + } + } + namespace ojTagCloud { + type TooltipContext = + { + color: string, componentElement: Element, id: K, label: string, parentElement: Element, value: number + } + } + +} +declare namespace oj { + class ojTagCloudItem extends JetElement { + categories: Array; + color?: string; + label: string; + shortDesc: string; + svgClassName: string; + svgStyle: object; + url: string; + value: number|null; + onCategoriesChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onLabelChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onUrlChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTagCloudItemEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojTagCloudItemEventMap extends oj.JetElementEventMap { + 'categoriesChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'labelChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'urlChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojTagCloudItemSettableProperties extends JetSettableProperties { + categories: Array; + color?: string; + label: string; + shortDesc: string; + svgClassName: string; + svgStyle: object; + url: string; + value: number|null; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojthematicmap/index.d.ts b/types/@oracle/oraclejet/ojs/ojthematicmap/index.d.ts new file mode 100644 index 0000000000..81c012ce6d --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojthematicmap/index.d.ts @@ -0,0 +1,376 @@ +/// +/// +declare namespace oj { + class ojThematicMap extends dvtBaseComponent> { + animationDuration: number; + animationOnDisplay: 'auto'|'none'; + areaData: oj.DataProvider|null; + as: string; + focusRenderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); + hiddenCategories: Array; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + hoverRenderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); + initialZooming: 'auto'|'none'; + isolatedItem: K1; + labelDisplay: 'on'|'off'|'auto'; + labelType: 'long'|'short'; + linkData: oj.DataProvider|null; + mapProvider: {geo: object, propertiesKeys: {id: string, longLabel?: string, shortLabel?: string}}; + markerData: oj.DataProvider|null; + markerZoomBehavior: 'zoom'|'fixed'; + maxZoom: number; + panning: 'auto'|'none'; + renderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); + selection: Array; + selectionMode: 'single'|'multiple'|'none'; + selectionRenderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); + styleDefaults: {areaSvgStyle?: object, dataAreaDefaults?: {borderColor?: string, hoverColor?: string, selectedInnerColor?: string, selectedOuterColor?: string}, dataMarkerDefaults?: {borderColor?: string, borderStyle?: 'none'|'solid', borderWidth?: number, color?: string, height?: number, labelStyle?: object, opacity?: number, shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, width?: number}, hoverBehaviorDelay?: number, labelStyle?: object, linkDefaults?: {color?: string, width?: number}}; + tooltip: {renderer: ((context: oj.ojThematicMap.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + tooltipDisplay: 'auto'|'labelAndShortDesc'|'none'|'shortDesc'; + touchResponse: 'touchStart'|'auto'; + zooming: 'auto'|'none'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + onAnimationDurationChanged: (event: CustomEvent)=> any; + onAnimationOnDisplayChanged: (event: CustomEvent)=> any; + onAreaDataChanged: (event: CustomEvent)=> any; + onAsChanged: (event: CustomEvent)=> any; + onFocusRendererChanged: (event: CustomEvent)=> any; + onHiddenCategoriesChanged: (event: CustomEvent)=> any; + onHighlightMatchChanged: (event: CustomEvent)=> any; + onHighlightedCategoriesChanged: (event: CustomEvent)=> any; + onHoverBehaviorChanged: (event: CustomEvent)=> any; + onHoverRendererChanged: (event: CustomEvent)=> any; + onInitialZoomingChanged: (event: CustomEvent)=> any; + onIsolatedItemChanged: (event: CustomEvent)=> any; + onLabelDisplayChanged: (event: CustomEvent)=> any; + onLabelTypeChanged: (event: CustomEvent)=> any; + onLinkDataChanged: (event: CustomEvent)=> any; + onMapProviderChanged: (event: CustomEvent)=> any; + onMarkerDataChanged: (event: CustomEvent)=> any; + onMarkerZoomBehaviorChanged: (event: CustomEvent)=> any; + onMaxZoomChanged: (event: CustomEvent)=> any; + onPanningChanged: (event: CustomEvent)=> any; + onRendererChanged: (event: CustomEvent)=> any; + onSelectionChanged: (event: CustomEvent)=> any; + onSelectionModeChanged: (event: CustomEvent)=> any; + onSelectionRendererChanged: (event: CustomEvent)=> any; + onStyleDefaultsChanged: (event: CustomEvent)=> any; + onTooltipChanged: (event: CustomEvent)=> any; + onTooltipDisplayChanged: (event: CustomEvent)=> any; + onTouchResponseChanged: (event: CustomEvent)=> any; + onZoomingChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojThematicMapEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getArea(index: number): oj.ojThematicMap.DataContext|null; + getContextByNode(node: Element): oj.ojThematicMap.NodeContext|null; + getLink(index: number): oj.ojThematicMap.DataContext|null; + getMarker(index: number): oj.ojThematicMap.DataContext|null; + } + interface ojThematicMapEventMap extends oj.dvtBaseComponentEventMap { + 'animationDurationChanged': CustomEvent; + 'animationOnDisplayChanged': CustomEvent; + 'areaDataChanged': CustomEvent; + 'asChanged': CustomEvent; + 'focusRendererChanged': CustomEvent; + 'hiddenCategoriesChanged': CustomEvent; + 'highlightMatchChanged': CustomEvent; + 'highlightedCategoriesChanged': CustomEvent; + 'hoverBehaviorChanged': CustomEvent; + 'hoverRendererChanged': CustomEvent; + 'initialZoomingChanged': CustomEvent; + 'isolatedItemChanged': CustomEvent; + 'labelDisplayChanged': CustomEvent; + 'labelTypeChanged': CustomEvent; + 'linkDataChanged': CustomEvent; + 'mapProviderChanged': CustomEvent; + 'markerDataChanged': CustomEvent; + 'markerZoomBehaviorChanged': CustomEvent; + 'maxZoomChanged': CustomEvent; + 'panningChanged': CustomEvent; + 'rendererChanged': CustomEvent; + 'selectionChanged': CustomEvent; + 'selectionModeChanged': CustomEvent; + 'selectionRendererChanged': CustomEvent; + 'styleDefaultsChanged': CustomEvent; + 'tooltipChanged': CustomEvent; + 'tooltipDisplayChanged': CustomEvent; + 'touchResponseChanged': CustomEvent; + 'zoomingChanged': CustomEvent; + } + interface ojThematicMapSettableProperties extends dvtBaseComponentSettableProperties { + animationDuration: number; + animationOnDisplay: 'auto'|'none'; + areaData: oj.DataProvider|null; + as: string; + focusRenderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); + hiddenCategories: Array; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + hoverRenderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); + initialZooming: 'auto'|'none'; + isolatedItem: K1; + labelDisplay: 'on'|'off'|'auto'; + labelType: 'long'|'short'; + linkData: oj.DataProvider|null; + mapProvider: {geo: object, propertiesKeys: {id: string, longLabel?: string, shortLabel?: string}}; + markerData: oj.DataProvider|null; + markerZoomBehavior: 'zoom'|'fixed'; + maxZoom: number; + panning: 'auto'|'none'; + renderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); + selection: Array; + selectionMode: 'single'|'multiple'|'none'; + selectionRenderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); + styleDefaults: {areaSvgStyle?: object, dataAreaDefaults?: {borderColor?: string, hoverColor?: string, selectedInnerColor?: string, selectedOuterColor?: string}, dataMarkerDefaults?: {borderColor?: string, borderStyle?: 'none'|'solid', borderWidth?: number, color?: string, height?: number, labelStyle?: object, opacity?: number, shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, width?: number}, hoverBehaviorDelay?: number, labelStyle?: object, linkDefaults?: {color?: string, width?: number}}; + tooltip: {renderer: ((context: oj.ojThematicMap.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + tooltipDisplay: 'auto'|'labelAndShortDesc'|'none'|'shortDesc'; + touchResponse: 'touchStart'|'auto'; + zooming: 'auto'|'none'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + } + namespace ojThematicMap { + type DataContext = + { + color: string, label: string, selected: boolean, tooltip: string + } + } + namespace ojThematicMap { + type NodeContext = + { + subId: string, index: number + } + } + namespace ojThematicMap { + type RendererContext = + { + color: string, componentElement: Element, data: object, id: K1|K2|K3, itemData: D1|D2|D3, label: string, location: string|null, parentElement: Element, previousState: {hovered: boolean, selected: boolean, focused: boolean}, renderDefaultFocus: (()=> void), renderDefaultHover: (()=> void), renderDefaultSelection: (()=> void), root: Element|null, state: {hovered: boolean, selected: boolean, focused: boolean}, x: number|null, y: number|null + } + } + namespace ojThematicMap { + type TooltipContext = + { + color: string|null, componentElement: Element, data: object|null, id: K1|K2|K3, itemData: D1|D2|D3, label: string|null, location: string|null, locationName: string|null, parentElement: Element, tooltip: string, x: number, y: number + } + } + +} +declare namespace oj { + class ojThematicMapArea extends JetElement { + categories: Array; + color: string; + label: string; + labelStyle: object; + location: string; + opacity: number; + selectable: 'auto'|'off'; + shortDesc: string; + svgClassName: string; + svgStyle: object; + onCategoriesChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onLabelChanged: (event: CustomEvent)=> any; + onLabelStyleChanged: (event: CustomEvent)=> any; + onLocationChanged: (event: CustomEvent)=> any; + onOpacityChanged: (event: CustomEvent)=> any; + onSelectableChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojThematicMapAreaEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojThematicMapAreaEventMap extends oj.JetElementEventMap { + 'categoriesChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'labelChanged': CustomEvent; + 'labelStyleChanged': CustomEvent; + 'locationChanged': CustomEvent; + 'opacityChanged': CustomEvent; + 'selectableChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + } + interface ojThematicMapAreaSettableProperties extends JetSettableProperties { + categories: Array; + color: string; + label: string; + labelStyle: object; + location: string; + opacity: number; + selectable: 'auto'|'off'; + shortDesc: string; + svgClassName: string; + svgStyle: object; + } + +} +declare namespace oj { + class ojThematicMapLink extends JetElement { + categories: Array; + color: string; + endLocation: {id?: any, location?: string, x?: number, y?: number}; + selectable: 'auto'|'off'; + shortDesc: string; + startLocation: {id?: any, location?: string, x?: number, y?: number}; + svgClassName: string; + svgStyle: object; + width: number; + onCategoriesChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onEndLocationChanged: (event: CustomEvent)=> any; + onSelectableChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onStartLocationChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onWidthChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojThematicMapLinkEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojThematicMapLinkEventMap extends oj.JetElementEventMap { + 'categoriesChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'endLocationChanged': CustomEvent; + 'selectableChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'startLocationChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'widthChanged': CustomEvent; + } + interface ojThematicMapLinkSettableProperties extends JetSettableProperties { + categories: Array; + color: string; + endLocation: {id?: any, location?: string, x?: number, y?: number}; + selectable: 'auto'|'off'; + shortDesc: string; + startLocation: {id?: any, location?: string, x?: number, y?: number}; + svgClassName: string; + svgStyle: object; + width: number; + } + +} +declare namespace oj { + class ojThematicMapMarker extends JetElement { + borderColor: string; + borderStyle: 'solid'|'none'; + borderWidth: number; + categories: Array; + color: string; + height: number; + label: string; + labelPosition: 'bottom'|'center'|'top'; + labelStyle: object; + location: string; + opacity: number; + rotation: number; + selectable: 'auto'|'off'; + shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string; + shortDesc: string; + source: string; + sourceHover: string; + sourceHoverSelected: string; + sourceSelected: string; + svgClassName: string; + svgStyle: object; + value: number; + width: number; + x: number|null; + y: number|null; + onBorderColorChanged: (event: CustomEvent)=> any; + onBorderStyleChanged: (event: CustomEvent)=> any; + onBorderWidthChanged: (event: CustomEvent)=> any; + onCategoriesChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onHeightChanged: (event: CustomEvent)=> any; + onLabelChanged: (event: CustomEvent)=> any; + onLabelPositionChanged: (event: CustomEvent)=> any; + onLabelStyleChanged: (event: CustomEvent)=> any; + onLocationChanged: (event: CustomEvent)=> any; + onOpacityChanged: (event: CustomEvent)=> any; + onRotationChanged: (event: CustomEvent)=> any; + onSelectableChanged: (event: CustomEvent)=> any; + onShapeChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onSourceChanged: (event: CustomEvent)=> any; + onSourceHoverChanged: (event: CustomEvent)=> any; + onSourceHoverSelectedChanged: (event: CustomEvent)=> any; + onSourceSelectedChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onWidthChanged: (event: CustomEvent)=> any; + onXChanged: (event: CustomEvent)=> any; + onYChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojThematicMapMarkerEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojThematicMapMarkerEventMap extends oj.JetElementEventMap { + 'borderColorChanged': CustomEvent; + 'borderStyleChanged': CustomEvent; + 'borderWidthChanged': CustomEvent; + 'categoriesChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'heightChanged': CustomEvent; + 'labelChanged': CustomEvent; + 'labelPositionChanged': CustomEvent; + 'labelStyleChanged': CustomEvent; + 'locationChanged': CustomEvent; + 'opacityChanged': CustomEvent; + 'rotationChanged': CustomEvent; + 'selectableChanged': CustomEvent; + 'shapeChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'sourceChanged': CustomEvent; + 'sourceHoverChanged': CustomEvent; + 'sourceHoverSelectedChanged': CustomEvent; + 'sourceSelectedChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'valueChanged': CustomEvent; + 'widthChanged': CustomEvent; + 'xChanged': CustomEvent; + 'yChanged': CustomEvent; + } + interface ojThematicMapMarkerSettableProperties extends JetSettableProperties { + borderColor: string; + borderStyle: 'solid'|'none'; + borderWidth: number; + categories: Array; + color: string; + height: number; + label: string; + labelPosition: 'bottom'|'center'|'top'; + labelStyle: object; + location: string; + opacity: number; + rotation: number; + selectable: 'auto'|'off'; + shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string; + shortDesc: string; + source: string; + sourceHover: string; + sourceHoverSelected: string; + sourceSelected: string; + svgClassName: string; + svgStyle: object; + value: number; + width: number; + x: number|null; + y: number|null; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojtime-base/index.d.ts b/types/@oracle/oraclejet/ojs/ojtime-base/index.d.ts new file mode 100644 index 0000000000..ba23106a05 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojtime-base/index.d.ts @@ -0,0 +1,15 @@ +/// +/// +declare namespace oj { + abstract class dvtTimeComponent extends dvtBaseComponent { + + addEventListener(type: T, listener: (this: HTMLElement, ev: dvtTimeComponentEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface dvtTimeComponentEventMap extends oj.dvtBaseComponentEventMap { + } + interface dvtTimeComponentSettableProperties extends dvtBaseComponentSettableProperties { + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojtimeaxis/index.d.ts b/types/@oracle/oraclejet/ojs/ojtimeaxis/index.d.ts new file mode 100644 index 0000000000..1710eb655d --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojtimeaxis/index.d.ts @@ -0,0 +1,40 @@ +/// +/// +/// +declare namespace oj { + class ojTimeAxis extends dvtBaseComponent { + converter: oj.ojTimeAxis.Converter|oj.Converter; + end: string; + scale: 'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'quarters'|'years'; + start: string; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + onConverterChanged: (event: CustomEvent)=> any; + onEndChanged: (event: CustomEvent)=> any; + onScaleChanged: (event: CustomEvent)=> any; + onStartChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTimeAxisEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojTimeAxisEventMap extends oj.dvtBaseComponentEventMap { + 'converterChanged': CustomEvent; + 'endChanged': CustomEvent; + 'scaleChanged': CustomEvent; + 'startChanged': CustomEvent; + } + interface ojTimeAxisSettableProperties extends dvtBaseComponentSettableProperties { + converter: oj.ojTimeAxis.Converter|oj.Converter; + end: string; + scale: 'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'quarters'|'years'; + start: string; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + } + namespace ojTimeAxis { + type Converter = + { + default?: oj.Converter, seconds?: oj.Converter, minutes?: oj.Converter, hours?: oj.Converter, days?: oj.Converter, weeks?: oj.Converter, months?: oj.Converter, quarters?: oj.Converter, years?: oj.Converter + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojtimeutils/index.d.ts b/types/@oracle/oraclejet/ojs/ojtimeutils/index.d.ts new file mode 100644 index 0000000000..9252a83ed8 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojtimeutils/index.d.ts @@ -0,0 +1,8 @@ +declare namespace oj { + class TimeUtils { + static getDate(pos: number, rangeStartTime: Date|string|number, rangeEndTime: Date|string|number, rangeWidth: number): number; + static getLength(startTime: Date|string|number, endTime: Date|string|number, rangeStartTime: Date|string|number, rangeEndTime: Date|string|number, rangeWidth: number): number; + static getPosition(time: Date|string|number, rangeStartTime: Date|string|number, rangeEndTime: Date|string|number, rangeWidth: number): number; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojtoolbar/index.d.ts b/types/@oracle/oraclejet/ojs/ojtoolbar/index.d.ts new file mode 100644 index 0000000000..a8eec009ec --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojtoolbar/index.d.ts @@ -0,0 +1,19 @@ +/// +declare namespace oj { + class ojToolbar extends baseComponent { + chroming: 'full'|'half'|'outlined'; + onChromingChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojToolbarEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + } + interface ojToolbarEventMap extends oj.baseComponentEventMap { + 'chromingChanged': CustomEvent; + } + interface ojToolbarSettableProperties extends baseComponentSettableProperties { + chroming: 'full'|'half'|'outlined'; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojtrain/index.d.ts b/types/@oracle/oraclejet/ojs/ojtrain/index.d.ts new file mode 100644 index 0000000000..db6720b353 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojtrain/index.d.ts @@ -0,0 +1,58 @@ +/// +declare namespace oj { + class ojTrain extends baseComponent { + selectedStep: string; + steps: Array; + onSelectedStepChanged: (event: CustomEvent)=> any; + onStepsChanged: (event: CustomEvent)=> any; + onOjBeforeDeselect: (event: oj.ojTrain.ojBeforeDeselect)=> any; + onOjBeforeSelect: (event: oj.ojTrain.ojBeforeSelect)=> any; + onOjDeselect: (event: oj.ojTrain.ojDeselect)=> any; + onOjSelect: (event: oj.ojTrain.ojSelect)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTrainEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getNextSelectableStep(): string|null; + getPreviousSelectableStep(): string|null; + getStep(id: string): oj.ojTrain.Step|null; + refresh(): void; + updateStep(id: string, stepProperties: {id?: string, label?: string, disabled?: boolean, visited?: boolean, messageType?: 'info'|'error'|'fatal'|'warning'}): void; + } + namespace ojTrain { + class ojBeforeDeselect extends CustomEvent<{toStep: string, fromStep: string, [propName: string]: any}> { + + } + + class ojBeforeSelect extends CustomEvent<{toStep: string, fromStep: string, [propName: string]: any}> { + + } + + class ojDeselect extends CustomEvent<{toStep: string, fromStep: string, [propName: string]: any}> { + + } + + class ojSelect extends CustomEvent<{toStep: string, fromStep: string, [propName: string]: any}> { + + } + } + interface ojTrainEventMap extends oj.baseComponentEventMap { + 'ojBeforeDeselect': oj.ojTrain.ojBeforeDeselect; + 'ojBeforeSelect': oj.ojTrain.ojBeforeSelect; + 'ojDeselect': oj.ojTrain.ojDeselect; + 'ojSelect': oj.ojTrain.ojSelect; + 'selectedStepChanged': CustomEvent; + 'stepsChanged': CustomEvent; + } + interface ojTrainSettableProperties extends baseComponentSettableProperties { + selectedStep: string; + steps: Array; + } + namespace ojTrain { + type Step = + { + id: string, label: string, disabled?: boolean, visited?: boolean, messageType?: 'info'|'error'|'fatal'|'warning' + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojtreedataprovider/index.d.ts b/types/@oracle/oraclejet/ojs/ojtreedataprovider/index.d.ts new file mode 100644 index 0000000000..333e0208ec --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojtreedataprovider/index.d.ts @@ -0,0 +1,7 @@ +/// +declare namespace oj { + interface TreeDataProvider extends DataProvider { + getChildDataProvider(any): TreeDataProvider + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojtreemap/index.d.ts b/types/@oracle/oraclejet/ojs/ojtreemap/index.d.ts new file mode 100644 index 0000000000..96a1db2873 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojtreemap/index.d.ts @@ -0,0 +1,241 @@ +/// +/// +declare namespace oj { + class ojTreemap extends dvtBaseComponent> { + animationDuration: number; + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + animationUpdateColor: string; + as: string; + colorLabel: string; + data: oj.DataProvider|null; + displayLevels: number; + drilling: 'on'|'off'; + groupGaps: 'all'|'none'|'outer'; + hiddenCategories: Array; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + hoverBehaviorDelay: number; + isolatedNode: any; + layout: 'sliceAndDiceHorizontal'|'sliceAndDiceVertical'|'squarified'; + nodeContent: {renderer: ((context: oj.ojTreemap.NodeContentContext) => ({insert: Element|string}))}; + nodeDefaults: {groupLabelDisplay: 'node'|'off'|'header', header: {backgroundColor: string, borderColor: string, hoverBackgroundColor: string, hoverInnerColor: string, hoverOuterColor: string, isolate: 'off'|'on', labelHalign: 'center'|'end'|'start', labelStyle: object, selectedBackgroundColor: string, selectedInnerColor: string, selectedOuterColor: string, useNodeColor: 'on'|'off'}, hoverColor: string, labelDisplay: 'off'|'node', labelHalign: 'start'|'end'|'center', labelMinLength: number, labelStyle: object, labelValign: 'top'|'bottom'|'center', selectedInnerColor: string, selectedOuterColor: string}; + nodeSeparators: 'bevels'|'gaps'; + rootNode: any; + selection: Array; + selectionMode: 'none'|'single'|'multiple'; + sizeLabel: string; + sorting: 'on'|'off'; + tooltip: {renderer: ((context: oj.ojTreemap.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + touchResponse: 'touchStart'|'auto'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelColor?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, labelSize?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, tooltipIsolate?: string, tooltipRestore?: string}; + onAnimationDurationChanged: (event: CustomEvent)=> any; + onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; + onAnimationOnDisplayChanged: (event: CustomEvent)=> any; + onAnimationUpdateColorChanged: (event: CustomEvent)=> any; + onAsChanged: (event: CustomEvent)=> any; + onColorLabelChanged: (event: CustomEvent)=> any; + onDataChanged: (event: CustomEvent)=> any; + onDisplayLevelsChanged: (event: CustomEvent)=> any; + onDrillingChanged: (event: CustomEvent)=> any; + onGroupGapsChanged: (event: CustomEvent)=> any; + onHiddenCategoriesChanged: (event: CustomEvent)=> any; + onHighlightMatchChanged: (event: CustomEvent)=> any; + onHighlightedCategoriesChanged: (event: CustomEvent)=> any; + onHoverBehaviorChanged: (event: CustomEvent)=> any; + onHoverBehaviorDelayChanged: (event: CustomEvent)=> any; + onIsolatedNodeChanged: (event: CustomEvent)=> any; + onLayoutChanged: (event: CustomEvent)=> any; + onNodeContentChanged: (event: CustomEvent)=> any; + onNodeDefaultsChanged: (event: CustomEvent)=> any; + onNodeSeparatorsChanged: (event: CustomEvent)=> any; + onRootNodeChanged: (event: CustomEvent)=> any; + onSelectionChanged: (event: CustomEvent)=> any; + onSelectionModeChanged: (event: CustomEvent)=> any; + onSizeLabelChanged: (event: CustomEvent)=> any; + onSortingChanged: (event: CustomEvent)=> any; + onTooltipChanged: (event: CustomEvent)=> any; + onTouchResponseChanged: (event: CustomEvent)=> any; + onOjBeforeDrill: (event: oj.ojTreemap.ojBeforeDrill)=> any; + onOjDrill: (event: oj.ojTreemap.ojDrill)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTreemapEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getContextByNode(node: Element): oj.ojTreemap.NodeContext|null; + getNode(subIdPath: Array): oj.ojTreemap.DataContext|null; + } + namespace ojTreemap { + class ojBeforeDrill extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { + + } + + class ojDrill extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { + + } + } + interface ojTreemapEventMap extends oj.dvtBaseComponentEventMap { + 'ojBeforeDrill': oj.ojTreemap.ojBeforeDrill; + 'ojDrill': oj.ojTreemap.ojDrill; + 'animationDurationChanged': CustomEvent; + 'animationOnDataChangeChanged': CustomEvent; + 'animationOnDisplayChanged': CustomEvent; + 'animationUpdateColorChanged': CustomEvent; + 'asChanged': CustomEvent; + 'colorLabelChanged': CustomEvent; + 'dataChanged': CustomEvent; + 'displayLevelsChanged': CustomEvent; + 'drillingChanged': CustomEvent; + 'groupGapsChanged': CustomEvent; + 'hiddenCategoriesChanged': CustomEvent; + 'highlightMatchChanged': CustomEvent; + 'highlightedCategoriesChanged': CustomEvent; + 'hoverBehaviorChanged': CustomEvent; + 'hoverBehaviorDelayChanged': CustomEvent; + 'isolatedNodeChanged': CustomEvent; + 'layoutChanged': CustomEvent; + 'nodeContentChanged': CustomEvent; + 'nodeDefaultsChanged': CustomEvent; + 'nodeSeparatorsChanged': CustomEvent; + 'rootNodeChanged': CustomEvent; + 'selectionChanged': CustomEvent; + 'selectionModeChanged': CustomEvent; + 'sizeLabelChanged': CustomEvent; + 'sortingChanged': CustomEvent; + 'tooltipChanged': CustomEvent; + 'touchResponseChanged': CustomEvent; + } + interface ojTreemapSettableProperties extends dvtBaseComponentSettableProperties { + animationDuration: number; + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + animationUpdateColor: string; + as: string; + colorLabel: string; + data: oj.DataProvider|null; + displayLevels: number; + drilling: 'on'|'off'; + groupGaps: 'all'|'none'|'outer'; + hiddenCategories: Array; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + hoverBehaviorDelay: number; + isolatedNode: any; + layout: 'sliceAndDiceHorizontal'|'sliceAndDiceVertical'|'squarified'; + nodeContent: {renderer: ((context: oj.ojTreemap.NodeContentContext) => ({insert: Element|string}))}; + nodeDefaults: {groupLabelDisplay: 'node'|'off'|'header', header: {backgroundColor: string, borderColor: string, hoverBackgroundColor: string, hoverInnerColor: string, hoverOuterColor: string, isolate: 'off'|'on', labelHalign: 'center'|'end'|'start', labelStyle: object, selectedBackgroundColor: string, selectedInnerColor: string, selectedOuterColor: string, useNodeColor: 'on'|'off'}, hoverColor: string, labelDisplay: 'off'|'node', labelHalign: 'start'|'end'|'center', labelMinLength: number, labelStyle: object, labelValign: 'top'|'bottom'|'center', selectedInnerColor: string, selectedOuterColor: string}; + nodeSeparators: 'bevels'|'gaps'; + rootNode: any; + selection: Array; + selectionMode: 'none'|'single'|'multiple'; + sizeLabel: string; + sorting: 'on'|'off'; + tooltip: {renderer: ((context: oj.ojTreemap.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + touchResponse: 'touchStart'|'auto'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelColor?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, labelSize?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, tooltipIsolate?: string, tooltipRestore?: string}; + } + namespace ojTreemap { + type DataContext = + { + color: string, label: string, selected: boolean, size: number, tooltip: string + } + } + namespace ojTreemap { + type NodeContentContext = + { + bounds: {x: number, y: number, width: number, height: number}, id: K, data: object, itemData: D, componentElement: Element + } + } + namespace ojTreemap { + type NodeContext = + { + subId: string, indexPath: Array + } + } + namespace ojTreemap { + type TooltipContext = + { + parentElement: Element, id: K, label: string, value: number, color: string, data: object, itemData: D, componentElement: Element + } + } + +} +declare namespace oj { + class ojTreemapNode extends JetElement { + categories?: Array; + color?: string; + drilling?: 'on'|'off'|'inherit'; + groupLabelDisplay?: 'node'|'off'|'header'; + header?: {isolate?: 'off'|'on', labelHalign?: 'center'|'end'|'start', labelStyle?: object, useNodeColor?: 'on'|'off'}; + label?: string; + labelDisplay?: 'off'|'node'; + labelHalign?: 'start'|'end'|'center'; + labelStyle?: object; + labelValign?: 'top'|'bottom'|'center'; + pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'; + selectable?: 'off'|'auto'; + shortDesc?: string; + svgClassName?: string; + svgStyle?: object; + value: number; + onCategoriesChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onDrillingChanged: (event: CustomEvent)=> any; + onGroupLabelDisplayChanged: (event: CustomEvent)=> any; + onHeaderChanged: (event: CustomEvent)=> any; + onLabelChanged: (event: CustomEvent)=> any; + onLabelDisplayChanged: (event: CustomEvent)=> any; + onLabelHalignChanged: (event: CustomEvent)=> any; + onLabelStyleChanged: (event: CustomEvent)=> any; + onLabelValignChanged: (event: CustomEvent)=> any; + onPatternChanged: (event: CustomEvent)=> any; + onSelectableChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTreemapNodeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojTreemapNodeEventMap extends oj.JetElementEventMap { + 'categoriesChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'drillingChanged': CustomEvent; + 'groupLabelDisplayChanged': CustomEvent; + 'headerChanged': CustomEvent; + 'labelChanged': CustomEvent; + 'labelDisplayChanged': CustomEvent; + 'labelHalignChanged': CustomEvent; + 'labelStyleChanged': CustomEvent; + 'labelValignChanged': CustomEvent; + 'patternChanged': CustomEvent; + 'selectableChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojTreemapNodeSettableProperties extends JetSettableProperties { + categories?: Array; + color?: string; + drilling?: 'on'|'off'|'inherit'; + groupLabelDisplay?: 'node'|'off'|'header'; + header?: {isolate?: 'off'|'on', labelHalign?: 'center'|'end'|'start', labelStyle?: object, useNodeColor?: 'on'|'off'}; + label?: string; + labelDisplay?: 'off'|'node'; + labelHalign?: 'start'|'end'|'center'; + labelStyle?: object; + labelValign?: 'top'|'bottom'|'center'; + pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'; + selectable?: 'off'|'auto'; + shortDesc?: string; + svgClassName?: string; + svgStyle?: object; + value: number; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojvalidation-base/index.d.ts b/types/@oracle/oraclejet/ojs/ojvalidation-base/index.d.ts new file mode 100644 index 0000000000..01a6280ff9 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojvalidation-base/index.d.ts @@ -0,0 +1,188 @@ +/// +/// +declare namespace oj { + interface AsyncValidator { + hint: Promise; + validate(value: V): Promise + } + +} +declare namespace oj { + class ColorConverter extends Converter { + constructor(options?: oj.ColorConverter.ConverterOptions); + format(color: oj.Color): string|null; + getHint(): string; + parse(value: string): oj.Color; + resolvedOptions(): oj.ColorConverter.ConverterOptions; + } + namespace ColorConverter { + type ConverterOptions = + { + format?: 'rgb'|'hsl'|'hsv'|'hex'|'hex3' + } + } + +} +declare namespace oj { + class ColorConverterFactory { + createConverter(options?: oj.ColorConverter.ConverterOptions): oj.ColorConverter; + } + +} +declare namespace oj { + class Converter { + format(value: V): string|null; + getHint?(): string|null + getOptions?(): object + parse(value: string): V; + resolvedOptions?(): object + } + +} +declare namespace oj { + class ConverterError { + constructor(summary: string, detail: string); + getMessage(): oj.Message; + } + +} +declare namespace oj { + class ConverterFactory { + static CONVERTER_TYPE_COLOR: string; + static CONVERTER_TYPE_DATETIME: string; + static CONVERTER_TYPE_NUMBER: string; + createConverter(options: object|null): oj.Converter; + } + +} +declare namespace oj { + class IntlConverterUtils { + static dateToLocalIso(date: Date): string; + static getConverterInstance(converterOption: string|oj.Validation.RegisteredConverter|oj.Converter): oj.Converter|null + static getInitials(firstName?: string, lastName?: string): string|undefined; + static getLocalTimeZoneOffset(): string; + static isoToDate(isoString: string): Date; + static isoToLocalDate(isoString: string): Date; + } + +} +declare namespace oj { + class LengthValidator extends Validator { + static defaults: {countBy: string}; + constructor(options?: oj.LengthValidator.ValidatorOptions); + getHint(): string|null; + validate(value: string|number): void; + } + namespace LengthValidator { + type ValidatorOptions = + { + countBy?: 'codeUnit'|'codePoint', min?: number, max?: number, hint?: {max?: string, min?: string, inRange?: string, exact?: string}, messageDetail?: {tooLong?: string, tooShort?: string}, messageSummary?: {tooLong?: string, tooShort?: string} + } + } + +} +declare namespace oj { + class LengthValidatorFactory { + createValidator(options?: oj.LengthValidator.ValidatorOptions): oj.LengthValidator; + } + +} +declare namespace oj { + class LocaleData { + static getDayNames(type?: 'abbreviated'|'narrow'|'wide'): Array; + static getFirstDayOfWeek(): number; + static getMonthNames(type?: 'abbreviated'|'narrow'|'wide'): Array; + static getWeekendEnd(): number; + static getWeekendStart(): number; + static isMonthPriorToYear(): boolean; + static setBundle(bundle: object): void; + } + +} +declare namespace oj { + class RegExpValidator extends Validator { + constructor(options?: oj.RegExpValidator.ValidatorOptions); + getHint(): string|null; + validate(value: string|number): void; + } + namespace RegExpValidator { + type ValidatorOptions = + { + pattern?: string, hint?: string, messageSummary?: string, messageDetail?: string + } + } + +} +declare namespace oj { + class RegExpValidatorFactory { + createValidator(options: oj.RegExpValidator.ValidatorOptions): oj.RegExpValidator; + } + +} +declare namespace oj { + class RequiredValidator extends Validator { + constructor(options?: oj.RequiredValidator.ValidatorOptions); + getHint(): string|null; + validate(value: object|string|number): void; + } + namespace RequiredValidator { + type ValidatorOptions = + { + hint?: string, messageSummary?: string, messageDetail?: string + } + } + +} +declare namespace oj { + class RequiredValidatorFactory { + createValidator(options?: oj.RequiredValidator.ValidatorOptions): oj.RequiredValidator; + } + +} +declare namespace oj { + class Validation { + static converterFactory>(type:'number'|'color'|'datetime'|string, instance?:CF): CF|null + static getDefaultConverterFactory(type: 'number'|'color'|'datetime'): oj.ConverterFactory|null + static getDefaultValidatorFactory(type: 'required'|'regexp'|'numberRange'|'length'|'dateTimeRange'|'dateRestriction'): oj.ValidatorFactory|null + static validatorFactory>(type:'required'|'regexp'|'numberRange'|'length'|'dateTimeRange'|'dateRestriction'|string, instance?:VF): VF|null + } + namespace Validation { + type RegisteredConverter = + { + type: string, options?: object + } + } + namespace Validation { + type RegisteredValidator = + { + type: string, options?: object + } + } + +} +declare namespace oj { + class Validator { + getHint?(): string|null + validate(value: V): void; + } + +} +declare namespace oj { + class ValidatorError { + constructor(summary: string, detail: string); + getMessage(): oj.Message; + } + +} +declare namespace oj { + class ValidatorFactory { + static VALIDATOR_TYPE_DATERESTRICTION: string; + static VALIDATOR_TYPE_DATETIMERANGE: string; + static VALIDATOR_TYPE_LENGTH: string; + static VALIDATOR_TYPE_NUMBERRANGE: string; + static VALIDATOR_TYPE_REGEXP: string; + static VALIDATOR_TYPE_REQUIRED: string; + createValidator(options: object|null): oj.Validator; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojvalidation-datetime/index.d.ts b/types/@oracle/oraclejet/ojs/ojvalidation-datetime/index.d.ts new file mode 100644 index 0000000000..f4ab6b312b --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojvalidation-datetime/index.d.ts @@ -0,0 +1,108 @@ +/// +declare namespace oj { + class DateRestrictionValidator extends Validator { + constructor(options?: oj.DateRestrictionValidator.ValidatorOptions); + getHint(): string|null; + validate(value: string): void; + } + namespace DateRestrictionValidator { + type DayFormatterInput = + { + fullYear: number, month: number, date: number + } + } + namespace DateRestrictionValidator { + type DayFormatterOutput = + { + disabled?: boolean, className?: string, tooltip?: string + } + } + namespace DateRestrictionValidator { + type ValidatorOptions = + { + dayFormatter?: ((param0: oj.DateRestrictionValidator.DayFormatterInput)=> oj.DateRestrictionValidator.DayFormatterOutput|null|'all'), messageSummary?: string, messageDetail?: string + } + } + +} +declare namespace oj { + class DateRestrictionValidatorFactory { + createValidator(options?: oj.DateRestrictionValidator.ValidatorOptions): oj.DateRestrictionValidator; + } + +} +declare namespace oj { + abstract class DateTimeConverter extends Converter { + abstract calculateWeek(value: string): number|undefined; + compareISODates(isoStr: string, isoStr2: string): number; + format(value: string): string|null; + getAvailableTimeZones(): Array; + abstract isDayNameSet():boolean + abstract isDaySet():boolean + abstract isHourInAMPMSet():boolean + abstract isHourInDaySet():boolean + abstract isMilliSecondSet():boolean + abstract isMinuteSet():boolean + abstract isMonthSet():boolean + abstract isSecondSet():boolean + abstract isYearSet():boolean + parse(value: string): string; + } + +} +declare namespace oj { + class DateTimeConverterFactory { + createConverter(options?: oj.IntlDateTimeConverter.ConverterOptions): oj.IntlDateTimeConverter; + } + +} +declare namespace oj { + class DateTimeRangeValidator extends Validator { + constructor(options?: oj.DateTimeRangeValidator.ValidatorOptions); + getHint(): string|null; + validate(value: string): void; + } + namespace DateTimeRangeValidator { + type ValidatorOptions = + { + converter: oj.DateTimeConverter, min?: string, max?: string, hint?: {max?: string, min?: string, inRange?: string}, translationKey?: string, messageDetail?: {rangeUnderflow?: string, rangeOverflow?: string}, messageSummary?: {rangeUnderflow?: string, rangeOverflow?: string} + } + } + +} +declare namespace oj { + class DateTimeRangeValidatorFactory { + createValidator(options?: oj.DateTimeRangeValidator.ValidatorOptions): oj.DateTimeRangeValidator; + } + +} +declare namespace oj { + class IntlDateTimeConverter extends DateTimeConverter { + constructor(options?: oj.IntlDateTimeConverter.ConverterOptions); + calculateWeek(value: string): number; + compareISODates(isoStr: string, isoStr2: string): number; + format(value: string): string|null; + formatRelative(value: string, relativeOptions?: {formatUsing?: string, dateField?: string, relativeTime?: string, dateOnly?: boolean, timeZone?: string}): string|null; + getAvailableTimeZones(): Array; + getHint(): null; + getOptions(): oj.IntlDateTimeConverter.ConverterOptions; + isDayNameSet(): boolean; + isDaySet(): boolean; + isHourInAMPMSet(): boolean; + isHourInDaySet(): boolean; + isMilliSecondSet(): boolean; + isMinuteSet(): boolean; + isMonthSet(): boolean; + isSecondSet(): boolean; + isYearSet(): boolean; + parse(value: string): string|null; + resolvedOptions(): oj.IntlDateTimeConverter.ConverterOptions; + } + namespace IntlDateTimeConverter { + type ConverterOptions = + { + year?: '2-digit'|'numeric', 'two-digit-year-start'?: number, month?: '2-digit'|'numeric'|'narrow'|'short'|'long', day?: '2-digit'|'numeric', hour?: '2-digit'|'numeric', minute?: '2-digit'|'numeric', second?: '2-digit'|'numeric', millisecond?: 'numeric', weekday?: 'narrow'|'short'|'long', era?: 'narrow'|'short'|'long', timeZoneName?: 'short'|'long', timeZone?: string, isoStrFormat?: 'offset'|'zulu'|'local'|'auto', dst?: boolean, hour12?: boolean, pattern?: string, formatType?: 'date'|'time'|'datetime', dateFormat?: 'short'|'medium'|'long'|'full', timeFormat?: 'short'|'medium'|'long'|'full', lenientParse?: 'full'|'none' + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojvalidation-number/index.d.ts b/types/@oracle/oraclejet/ojs/ojvalidation-number/index.d.ts new file mode 100644 index 0000000000..d53b2b8258 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojvalidation-number/index.d.ts @@ -0,0 +1,51 @@ +/// +declare namespace oj { + class IntlNumberConverter extends NumberConverter { + constructor(options?: oj.IntlNumberConverter.ConverterOptions); + format(value: number): string; + getHint(): null; + getOptions(): oj.IntlNumberConverter.ConverterOptions; + parse(value: string): number|null; + resolvedOptions(): oj.IntlNumberConverter.ConverterOptions; + } + namespace IntlNumberConverter { + type ConverterOptions = + { + style?: 'decimal'|'currency'|'percent'|'unit', currency?: string, unit?: 'byte'|'bit', currencyDisplay?: 'code'|'symbol'|'name', decimalFormat?: 'standard'|'short'|'long', currencyFormat?: 'standard'|'short'|'long', minimumIntegerDigits?: number, minimumFractionDigits?: number, maximumFractionDigits?: number, useGrouping?: boolean, pattern?: string, roundingMode?: 'HALF_UP'|'HALF_DOWN'|'HALF_EVEN', roundDuringParse?: boolean, separators?: object, lenientParse?: 'full'|'none' + } + } + +} +declare namespace oj { + class NumberConverter extends Converter { + format(value: number): string|null; + parse(value: string): number; + } + +} +declare namespace oj { + class NumberConverterFactory { + createConverter(options?: oj.IntlNumberConverter.ConverterOptions): oj.IntlNumberConverter; + } + +} +declare namespace oj { + class NumberRangeValidator extends Validator { + constructor(options?: oj.NumberRangeValidator.ValidatorOptions); + getHint(): string|null; + validate(value: string|number): void; + } + namespace NumberRangeValidator { + type ValidatorOptions = + { + converter?: oj.NumberConverter, min?: number, max?: number, hint?: {max?: string, min?: string, inRange?: string, exact?: string}, messageDetail?: {rangeUnderflow?: string, rangeOverflow?: string, exact?: string}, messageSummary?: {rangeUnderflow?: string, rangeOverflow?: string} + } + } + +} +declare namespace oj { + class NumberRangeValidatorFactory { + createValidator(options?: oj.NumberRangeValidator.ValidatorOptions): oj.NumberRangeValidator; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojvalidationgroup/index.d.ts b/types/@oracle/oraclejet/ojs/ojvalidationgroup/index.d.ts new file mode 100644 index 0000000000..c714ed9ecc --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojvalidationgroup/index.d.ts @@ -0,0 +1,22 @@ +declare namespace oj { + class ojValidationGroup extends JetElement { + readonly valid: 'valid'|'pending'|'invalidHidden'|'invalidShown'; + onValidChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojValidationGroupEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + focusOn(key?: '@firstInvalidShown'): void; + getProperty(property: string): any; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + showMessages(): void; + } + interface ojValidationGroupEventMap extends oj.JetElementEventMap { + 'validChanged': CustomEvent; + } + interface ojValidationGroupSettableProperties extends JetSettableProperties { + readonly valid: 'valid'|'pending'|'invalidHidden'|'invalidShown'; + } + +} diff --git a/types/@oracle/tests/oraclejet/@oraclejet-tests.ts b/types/@oracle/tests/oraclejet/@oraclejet-tests.ts new file mode 100644 index 0000000000..9fc8ff4951 --- /dev/null +++ b/types/@oracle/tests/oraclejet/@oraclejet-tests.ts @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. + * The Universal Permissive License (UPL), Version 1.0 + */ +import "ojs/ojcore"; +import "ojs/ojinputtext"; +import "ojs/ojinputnumber"; + +/** + * @public + * @export + */ +class Test { + value: string; + + constructor() { + let self = this; + self.value = "Good Morning"; + + let textInput = document.getElementById('text-input') as oj.ojInputText; + //test a custom API of the component + let rawVal: string = textInput.rawValue; + } +} + +export = Test; \ No newline at end of file diff --git a/types/@oracle/tsconfig.json b/types/@oracle/tsconfig.json new file mode 100644 index 0000000000..812f56815d --- /dev/null +++ b/types/@oracle/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compileOnSave": true, + "compilerOptions": { + "module": "amd", + "lib": ["dom","es5","scripthost", "es2015.core","es2015.collection","es2015","esnext.asynciterable"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "types": ["knockout"], + "forceConsistentCasingInFileNames": true, + "noEmit": true, + "target": "es5", + "typeRoots": ["../","./oraclejet/","./oraclejet/ojs/"] + }, + "include": [ + "/tests/oraclejet/@oraclejet-tests.ts", + "./oraclejet/**/*" + ] +} \ No newline at end of file diff --git a/types/@oracle/tslint.json b/types/@oracle/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/@oracle/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 6814f8fa911ee85bd2170d6603129a1292fb5571 Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Mon, 1 Oct 2018 18:36:48 -0700 Subject: [PATCH 002/160] Update to latest version --- types/@oracle/index.d.ts | 0 types/@oracle/oraclejet/index.d.ts | 0 types/@oracle/oraclejet/ojs/index.d.ts | 23 - .../oraclejet/ojs/ojaccordion/index.d.ts | 49 - .../oraclejet/ojs/ojanimation/index.d.ts | 19 - .../ojs/ojarraydataprovider/index.d.ts | 22 - .../ojs/ojarraytreedataprovider/index.d.ts | 18 - .../@oracle/oraclejet/ojs/ojavatar/index.d.ts | 28 - .../@oracle/oraclejet/ojs/ojbutton/index.d.ts | 144 -- .../@oracle/oraclejet/ojs/ojchart/index.d.ts | 822 ------- .../oraclejet/ojs/ojcheckboxset/index.d.ts | 47 - .../oraclejet/ojs/ojcollapsible/index.d.ts | 52 - .../ojs/ojcollectiondataprovider/index.d.ts | 17 - .../@oracle/oraclejet/ojs/ojcolor/index.d.ts | 179 -- .../oraclejet/ojs/ojcolorpalette/index.d.ts | 56 - .../oraclejet/ojs/ojcolorspectrum/index.d.ts | 44 - .../oraclejet/ojs/ojcomponentcore/index.d.ts | 31 - .../oraclejet/ojs/ojcomposite/index.d.ts | 31 - .../oraclejet/ojs/ojconveyorbelt/index.d.ts | 23 - types/@oracle/oraclejet/ojs/ojcore/index.d.ts | 123 - .../oraclejet/ojs/ojdataprovider/index.d.ts | 254 -- .../oraclejet/ojs/ojdatetimepicker/index.d.ts | 308 --- .../@oracle/oraclejet/ojs/ojdefer/index.d.ts | 13 - .../ojs/ojdeferreddataprovider/index.d.ts | 17 - .../@oracle/oraclejet/ojs/ojdialog/index.d.ts | 127 - .../oraclejet/ojs/ojdvt-base/index.d.ts | 20 - .../oraclejet/ojs/ojeditablevalue/index.d.ts | 67 - .../oraclejet/ojs/ojfilepicker/index.d.ts | 44 - .../oraclejet/ojs/ojfilmstrip/index.d.ts | 42 - .../oraclejet/ojs/ojformlayout/index.d.ts | 37 - .../@oracle/oraclejet/ojs/ojgantt/index.d.ts | 286 --- .../@oracle/oraclejet/ojs/ojgauge/index.d.ts | 347 --- .../oraclejet/ojs/ojindexer/index.d.ts | 13 - .../oraclejet/ojs/ojinputnumber/index.d.ts | 95 - .../oraclejet/ojs/ojinputtext/index.d.ts | 178 -- .../@oracle/oraclejet/ojs/ojkeyset/index.d.ts | 32 - .../ojs/ojknockout-keyset/index.d.ts | 9 - .../oraclejet/ojs/ojknockout-model/index.d.ts | 7 - .../oraclejet/ojs/ojknockout/index.d.ts | 14 - .../@oracle/oraclejet/ojs/ojlabel/index.d.ts | 33 - .../oraclejet/ojs/ojlabelvalue/index.d.ts | 25 - .../@oracle/oraclejet/ojs/ojlegend/index.d.ts | 230 -- .../ojs/ojlistdataproviderview/index.d.ts | 21 - .../oraclejet/ojs/ojlistview/index.d.ts | 167 -- .../oraclejet/ojs/ojmasonrylayout/index.d.ts | 85 - types/@oracle/oraclejet/ojs/ojmenu/index.d.ts | 87 - .../oraclejet/ojs/ojmenuselectmany/index.d.ts | 36 - .../oraclejet/ojs/ojmessage/index.d.ts | 51 - .../oraclejet/ojs/ojmessages/index.d.ts | 55 - .../oraclejet/ojs/ojmessaging/index.d.ts | 30 - .../@oracle/oraclejet/ojs/ojmodel/index.d.ts | 169 -- .../ojs/ojmodule-element-utils/index.d.ts | 3 - .../oraclejet/ojs/ojmodule-element/index.d.ts | 54 - .../@oracle/oraclejet/ojs/ojmodule/index.d.ts | 24 - .../ojs/ojmoduleanimations/index.d.ts | 30 - .../oraclejet/ojs/ojnavigationlist/index.d.ts | 253 -- types/@oracle/oraclejet/ojs/ojnbox/index.d.ts | 251 -- .../oraclejet/ojs/ojoffcanvas/index.d.ts | 13 - .../oraclejet/ojs/ojoptgroup/index.d.ts | 25 - .../@oracle/oraclejet/ojs/ojoption/index.d.ts | 25 - .../oraclejet/ojs/ojpictochart/index.d.ts | 206 -- .../@oracle/oraclejet/ojs/ojpopup/index.d.ts | 105 - .../oraclejet/ojs/ojprogress/index.d.ts | 28 - .../oraclejet/ojs/ojprogresslist/index.d.ts | 50 - .../oraclejet/ojs/ojpulltorefresh/index.d.ts | 7 - .../oraclejet/ojs/ojradioset/index.d.ts | 47 - .../oraclejet/ojs/ojrefresher/index.d.ts | 30 - .../@oracle/oraclejet/ojs/ojrouter/index.d.ts | 69 - .../oraclejet/ojs/ojselectcombobox/index.d.ts | 427 ---- .../@oracle/oraclejet/ojs/ojslider/index.d.ts | 61 - .../oraclejet/ojs/ojsunburst/index.d.ts | 270 --- .../oraclejet/ojs/ojswipeactions/index.d.ts | 24 - .../oraclejet/ojs/ojswipetoreveal/index.d.ts | 7 - .../@oracle/oraclejet/ojs/ojswitch/index.d.ts | 39 - .../oraclejet/ojs/ojswitcher/index.d.ts | 21 - .../@oracle/oraclejet/ojs/ojtable/index.d.ts | 197 -- .../oraclejet/ojs/ojtagcloud/index.d.ts | 139 -- .../oraclejet/ojs/ojthematicmap/index.d.ts | 376 --- .../oraclejet/ojs/ojtime-base/index.d.ts | 15 - .../oraclejet/ojs/ojtimeaxis/index.d.ts | 40 - .../oraclejet/ojs/ojtimeutils/index.d.ts | 8 - .../oraclejet/ojs/ojtoolbar/index.d.ts | 19 - .../@oracle/oraclejet/ojs/ojtrain/index.d.ts | 58 - .../ojs/ojtreedataprovider/index.d.ts | 7 - .../oraclejet/ojs/ojtreemap/index.d.ts | 241 -- .../ojs/ojvalidation-base/index.d.ts | 188 -- .../ojs/ojvalidation-datetime/index.d.ts | 108 - .../ojs/ojvalidation-number/index.d.ts | 51 - .../ojs/ojvalidationgroup/index.d.ts | 22 - .../tests/oraclejet/@oraclejet-tests.ts | 26 - types/@oracle/tslint.json | 1 - types/oraclejet/index.d.ts | 60 + types/oraclejet/ojaccordion/index.d.ts | 66 + types/oraclejet/ojanimation/index.d.ts | 111 + .../oraclejet/ojarraydataprovider/index.d.ts | 27 + .../ojarraytreedataprovider/index.d.ts | 25 + .../ojattributegrouphandler/index.d.ts | 23 + types/oraclejet/ojavatar/index.d.ts | 29 + types/oraclejet/ojbutton/index.d.ts | 165 ++ types/oraclejet/ojchart/index.d.ts | 2104 +++++++++++++++++ types/oraclejet/ojcheckboxset/index.d.ts | 69 + types/oraclejet/ojcollapsible/index.d.ts | 64 + .../ojcollectiondataprovider/index.d.ts | 16 + types/oraclejet/ojcolor/index.d.ts | 182 ++ types/oraclejet/ojcolorpalette/index.d.ts | 74 + types/oraclejet/ojcolorspectrum/index.d.ts | 62 + types/oraclejet/ojcomponentcore/index.d.ts | 6 + types/oraclejet/ojcomposite/index.d.ts | 45 + types/oraclejet/ojconfig/index.d.ts | 9 + types/oraclejet/ojcontext/index.d.ts | 39 + types/oraclejet/ojconveyorbelt/index.d.ts | 26 + types/oraclejet/ojdatagrid/index.d.ts | 520 ++++ types/oraclejet/ojdataprovider/index.d.ts | 111 + types/oraclejet/ojdatetimepicker/index.d.ts | 639 +++++ types/oraclejet/ojdefer/index.d.ts | 21 + .../ojdeferreddataprovider/index.d.ts | 16 + types/oraclejet/ojdiagram/index.d.ts | 790 +++++++ types/oraclejet/ojdialog/index.d.ts | 148 ++ types/oraclejet/ojdvt-base/index.d.ts | 57 + types/oraclejet/ojeditablevalue/index.d.ts | 96 + types/oraclejet/ojexpressionutils/index.d.ts | 5 + types/oraclejet/ojfilepicker/index.d.ts | 43 + types/oraclejet/ojfilmstrip/index.d.ts | 63 + types/oraclejet/ojformlayout/index.d.ts | 38 + types/oraclejet/ojgantt/index.d.ts | 679 ++++++ types/oraclejet/ojganttutils/index.d.ts | 4 + types/oraclejet/ojgauge/index.d.ts | 574 +++++ types/oraclejet/ojinputnumber/index.d.ts | 150 ++ types/oraclejet/ojinputtext/index.d.ts | 249 ++ types/oraclejet/ojkeyset/index.d.ts | 28 + types/oraclejet/ojknockout-keyset/index.d.ts | 8 + types/oraclejet/ojknockout-model/index.d.ts | 3 + .../ojknockouttemplateutils/index.d.ts | 1 + types/oraclejet/ojlabel/index.d.ts | 48 + types/oraclejet/ojlabelvalue/index.d.ts | 26 + types/oraclejet/ojlegend/index.d.ts | 286 +++ .../ojlistdataproviderview/index.d.ts | 25 + types/oraclejet/ojlistview/index.d.ts | 335 +++ types/oraclejet/ojlocaledata/index.d.ts | 7 + types/oraclejet/ojlogger/index.d.ts | 10 + types/oraclejet/ojmasonrylayout/index.d.ts | 119 + types/oraclejet/ojmenu/index.d.ts | 105 + types/oraclejet/ojmenuselectmany/index.d.ts | 39 + types/oraclejet/ojmessage/index.d.ts | 80 + types/oraclejet/ojmessages/index.d.ts | 73 + types/oraclejet/ojmessaging/index.d.ts | 15 + types/oraclejet/ojmodel/index.d.ts | 280 +++ .../ojmodule-element-utils/index.d.ts | 8 + types/oraclejet/ojmodule-element/index.d.ts | 89 + types/oraclejet/ojmoduleanimations/index.d.ts | 34 + types/oraclejet/ojnavigationlist/index.d.ts | 360 +++ types/oraclejet/ojnbox/index.d.ts | 490 ++++ types/oraclejet/ojoptgroup/index.d.ts | 26 + types/oraclejet/ojoption/index.d.ts | 26 + types/oraclejet/ojpictochart/index.d.ts | 268 +++ types/oraclejet/ojpopup/index.d.ts | 128 + types/oraclejet/ojprogress/index.d.ts | 35 + types/oraclejet/ojprogresslist/index.d.ts | 30 + types/oraclejet/ojpulltorefresh/index.d.ts | 6 + types/oraclejet/ojradioset/index.d.ts | 69 + types/oraclejet/ojrefresher/index.d.ts | 33 + .../ojresponsiveknockoututils/index.d.ts | 4 + types/oraclejet/ojresponsiveutils/index.d.ts | 4 + types/oraclejet/ojrouter/index.d.ts | 131 + types/oraclejet/ojselectcombobox/index.d.ts | 714 ++++++ types/oraclejet/ojslider/index.d.ts | 83 + types/oraclejet/ojsunburst/index.d.ts | 407 ++++ types/oraclejet/ojswipeactions/index.d.ts | 36 + types/oraclejet/ojswipetoreveal/index.d.ts | 4 + types/oraclejet/ojswitch/index.d.ts | 49 + types/oraclejet/ojswitcher/index.d.ts | 22 + types/oraclejet/ojtable/index.d.ts | 595 +++++ types/oraclejet/ojtagcloud/index.d.ts | 208 ++ types/oraclejet/ojthematicmap/index.d.ts | 576 +++++ types/oraclejet/ojthemeutils/index.d.ts | 4 + types/oraclejet/ojtime-base/index.d.ts | 22 + types/oraclejet/ojtimeaxis/index.d.ts | 87 + types/oraclejet/ojtimeutils/index.d.ts | 3 + types/oraclejet/ojtoolbar/index.d.ts | 22 + types/oraclejet/ojtrain/index.d.ts | 78 + types/oraclejet/ojtranslation/index.d.ts | 5 + types/oraclejet/ojtreedataprovider/index.d.ts | 5 + types/oraclejet/ojtreemap/index.d.ts | 392 +++ types/oraclejet/ojvalidation-base/index.d.ts | 144 ++ .../ojvalidation-datetime/index.d.ts | 130 + .../oraclejet/ojvalidation-number/index.d.ts | 67 + types/oraclejet/ojvalidationgroup/index.d.ts | 23 + types/oraclejet/test.ts | 113 + types/{@oracle => oraclejet}/tsconfig.json | 13 +- types/oraclejet/tslint.json | 3 + 190 files changed, 14434 insertions(+), 8197 deletions(-) delete mode 100644 types/@oracle/index.d.ts delete mode 100644 types/@oracle/oraclejet/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojaccordion/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojanimation/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojarraydataprovider/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojarraytreedataprovider/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojavatar/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojbutton/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojchart/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojcheckboxset/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojcollapsible/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojcollectiondataprovider/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojcolor/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojcolorpalette/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojcolorspectrum/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojcomponentcore/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojcomposite/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojconveyorbelt/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojcore/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojdataprovider/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojdatetimepicker/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojdefer/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojdeferreddataprovider/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojdialog/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojdvt-base/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojeditablevalue/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojfilepicker/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojfilmstrip/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojformlayout/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojgantt/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojgauge/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojindexer/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojinputnumber/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojinputtext/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojkeyset/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojknockout-keyset/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojknockout-model/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojknockout/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojlabel/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojlabelvalue/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojlegend/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojlistdataproviderview/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojlistview/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojmasonrylayout/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojmenu/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojmenuselectmany/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojmessage/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojmessages/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojmessaging/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojmodel/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojmodule-element-utils/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojmodule-element/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojmodule/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojmoduleanimations/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojnavigationlist/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojnbox/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojoffcanvas/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojoptgroup/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojoption/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojpictochart/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojpopup/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojprogress/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojprogresslist/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojpulltorefresh/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojradioset/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojrefresher/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojrouter/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojselectcombobox/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojslider/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojsunburst/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojswipeactions/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojswipetoreveal/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojswitch/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojswitcher/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojtable/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojtagcloud/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojthematicmap/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojtime-base/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojtimeaxis/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojtimeutils/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojtoolbar/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojtrain/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojtreedataprovider/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojtreemap/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojvalidation-base/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojvalidation-datetime/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojvalidation-number/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojvalidationgroup/index.d.ts delete mode 100644 types/@oracle/tests/oraclejet/@oraclejet-tests.ts delete mode 100644 types/@oracle/tslint.json create mode 100644 types/oraclejet/index.d.ts create mode 100644 types/oraclejet/ojaccordion/index.d.ts create mode 100644 types/oraclejet/ojanimation/index.d.ts create mode 100644 types/oraclejet/ojarraydataprovider/index.d.ts create mode 100644 types/oraclejet/ojarraytreedataprovider/index.d.ts create mode 100644 types/oraclejet/ojattributegrouphandler/index.d.ts create mode 100644 types/oraclejet/ojavatar/index.d.ts create mode 100644 types/oraclejet/ojbutton/index.d.ts create mode 100644 types/oraclejet/ojchart/index.d.ts create mode 100644 types/oraclejet/ojcheckboxset/index.d.ts create mode 100644 types/oraclejet/ojcollapsible/index.d.ts create mode 100644 types/oraclejet/ojcollectiondataprovider/index.d.ts create mode 100644 types/oraclejet/ojcolor/index.d.ts create mode 100644 types/oraclejet/ojcolorpalette/index.d.ts create mode 100644 types/oraclejet/ojcolorspectrum/index.d.ts create mode 100644 types/oraclejet/ojcomponentcore/index.d.ts create mode 100644 types/oraclejet/ojcomposite/index.d.ts create mode 100644 types/oraclejet/ojconfig/index.d.ts create mode 100644 types/oraclejet/ojcontext/index.d.ts create mode 100644 types/oraclejet/ojconveyorbelt/index.d.ts create mode 100644 types/oraclejet/ojdatagrid/index.d.ts create mode 100644 types/oraclejet/ojdataprovider/index.d.ts create mode 100644 types/oraclejet/ojdatetimepicker/index.d.ts create mode 100644 types/oraclejet/ojdefer/index.d.ts create mode 100644 types/oraclejet/ojdeferreddataprovider/index.d.ts create mode 100644 types/oraclejet/ojdiagram/index.d.ts create mode 100644 types/oraclejet/ojdialog/index.d.ts create mode 100644 types/oraclejet/ojdvt-base/index.d.ts create mode 100644 types/oraclejet/ojeditablevalue/index.d.ts create mode 100644 types/oraclejet/ojexpressionutils/index.d.ts create mode 100644 types/oraclejet/ojfilepicker/index.d.ts create mode 100644 types/oraclejet/ojfilmstrip/index.d.ts create mode 100644 types/oraclejet/ojformlayout/index.d.ts create mode 100644 types/oraclejet/ojgantt/index.d.ts create mode 100644 types/oraclejet/ojganttutils/index.d.ts create mode 100644 types/oraclejet/ojgauge/index.d.ts create mode 100644 types/oraclejet/ojinputnumber/index.d.ts create mode 100644 types/oraclejet/ojinputtext/index.d.ts create mode 100644 types/oraclejet/ojkeyset/index.d.ts create mode 100644 types/oraclejet/ojknockout-keyset/index.d.ts create mode 100644 types/oraclejet/ojknockout-model/index.d.ts create mode 100644 types/oraclejet/ojknockouttemplateutils/index.d.ts create mode 100644 types/oraclejet/ojlabel/index.d.ts create mode 100644 types/oraclejet/ojlabelvalue/index.d.ts create mode 100644 types/oraclejet/ojlegend/index.d.ts create mode 100644 types/oraclejet/ojlistdataproviderview/index.d.ts create mode 100644 types/oraclejet/ojlistview/index.d.ts create mode 100644 types/oraclejet/ojlocaledata/index.d.ts create mode 100644 types/oraclejet/ojlogger/index.d.ts create mode 100644 types/oraclejet/ojmasonrylayout/index.d.ts create mode 100644 types/oraclejet/ojmenu/index.d.ts create mode 100644 types/oraclejet/ojmenuselectmany/index.d.ts create mode 100644 types/oraclejet/ojmessage/index.d.ts create mode 100644 types/oraclejet/ojmessages/index.d.ts create mode 100644 types/oraclejet/ojmessaging/index.d.ts create mode 100644 types/oraclejet/ojmodel/index.d.ts create mode 100644 types/oraclejet/ojmodule-element-utils/index.d.ts create mode 100644 types/oraclejet/ojmodule-element/index.d.ts create mode 100644 types/oraclejet/ojmoduleanimations/index.d.ts create mode 100644 types/oraclejet/ojnavigationlist/index.d.ts create mode 100644 types/oraclejet/ojnbox/index.d.ts create mode 100644 types/oraclejet/ojoptgroup/index.d.ts create mode 100644 types/oraclejet/ojoption/index.d.ts create mode 100644 types/oraclejet/ojpictochart/index.d.ts create mode 100644 types/oraclejet/ojpopup/index.d.ts create mode 100644 types/oraclejet/ojprogress/index.d.ts create mode 100644 types/oraclejet/ojprogresslist/index.d.ts create mode 100644 types/oraclejet/ojpulltorefresh/index.d.ts create mode 100644 types/oraclejet/ojradioset/index.d.ts create mode 100644 types/oraclejet/ojrefresher/index.d.ts create mode 100644 types/oraclejet/ojresponsiveknockoututils/index.d.ts create mode 100644 types/oraclejet/ojresponsiveutils/index.d.ts create mode 100644 types/oraclejet/ojrouter/index.d.ts create mode 100644 types/oraclejet/ojselectcombobox/index.d.ts create mode 100644 types/oraclejet/ojslider/index.d.ts create mode 100644 types/oraclejet/ojsunburst/index.d.ts create mode 100644 types/oraclejet/ojswipeactions/index.d.ts create mode 100644 types/oraclejet/ojswipetoreveal/index.d.ts create mode 100644 types/oraclejet/ojswitch/index.d.ts create mode 100644 types/oraclejet/ojswitcher/index.d.ts create mode 100644 types/oraclejet/ojtable/index.d.ts create mode 100644 types/oraclejet/ojtagcloud/index.d.ts create mode 100644 types/oraclejet/ojthematicmap/index.d.ts create mode 100644 types/oraclejet/ojthemeutils/index.d.ts create mode 100644 types/oraclejet/ojtime-base/index.d.ts create mode 100644 types/oraclejet/ojtimeaxis/index.d.ts create mode 100644 types/oraclejet/ojtimeutils/index.d.ts create mode 100644 types/oraclejet/ojtoolbar/index.d.ts create mode 100644 types/oraclejet/ojtrain/index.d.ts create mode 100644 types/oraclejet/ojtranslation/index.d.ts create mode 100644 types/oraclejet/ojtreedataprovider/index.d.ts create mode 100644 types/oraclejet/ojtreemap/index.d.ts create mode 100644 types/oraclejet/ojvalidation-base/index.d.ts create mode 100644 types/oraclejet/ojvalidation-datetime/index.d.ts create mode 100644 types/oraclejet/ojvalidation-number/index.d.ts create mode 100644 types/oraclejet/ojvalidationgroup/index.d.ts create mode 100644 types/oraclejet/test.ts rename types/{@oracle => oraclejet}/tsconfig.json (68%) create mode 100644 types/oraclejet/tslint.json diff --git a/types/@oracle/index.d.ts b/types/@oracle/index.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/@oracle/oraclejet/index.d.ts b/types/@oracle/oraclejet/index.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/@oracle/oraclejet/ojs/index.d.ts b/types/@oracle/oraclejet/ojs/index.d.ts deleted file mode 100644 index 90fb69208a..0000000000 --- a/types/@oracle/oraclejet/ojs/index.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/// -declare namespace oj { - - var revision: string; - var version: string; - function ajax(settings?: object): object; - function sync(method: string, model: oj.Model|oj.Collection, options?: object): object; - -} -declare namespace oj { - interface JetSettableProperties { - } - interface GenericSetter { - set(propertyName: K, propertyValue: SP[K]): void; - unset(propertyName: K): void; - } - abstract class JetElement extends HTMLElement implements GenericSetter { - set(propertyName: K, propertyValue: SP[K]): void; - unset(propertyName: K): void; - } - interface JetElementEventMap extends HTMLElementEventMap { - } -} \ No newline at end of file diff --git a/types/@oracle/oraclejet/ojs/ojaccordion/index.d.ts b/types/@oracle/oraclejet/ojs/ojaccordion/index.d.ts deleted file mode 100644 index 427ee7ecaa..0000000000 --- a/types/@oracle/oraclejet/ojs/ojaccordion/index.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -/// -/// -declare namespace oj { - class ojAccordion extends baseComponent { - expanded: Array<{id?: string, index?: number}>|null; - multiple: boolean; - onExpandedChanged: (event: CustomEvent)=> any; - onMultipleChanged: (event: CustomEvent)=> any; - onOjBeforeCollapse: (event: oj.ojAccordion.ojBeforeCollapse)=> any; - onOjBeforeExpand: (event: oj.ojAccordion.ojBeforeExpand)=> any; - onOjCollapse: (event: oj.ojAccordion.ojCollapse)=> any; - onOjExpand: (event: oj.ojAccordion.ojExpand)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojAccordionEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - } - namespace ojAccordion { - class ojBeforeCollapse extends CustomEvent<{toCollapsible: Element, fromCollapsible: Element, [propName: string]: any}> { - - } - - class ojBeforeExpand extends CustomEvent<{toCollapsible: Element, fromCollapsible: Element, [propName: string]: any}> { - - } - - class ojCollapse extends CustomEvent<{toCollapsible: Element, fromCollapsible: Element, [propName: string]: any}> { - - } - - class ojExpand extends CustomEvent<{toCollapsible: Element, fromCollapsible: Element, [propName: string]: any}> { - - } - } - interface ojAccordionEventMap extends oj.baseComponentEventMap { - 'ojBeforeCollapse': oj.ojAccordion.ojBeforeCollapse; - 'ojBeforeExpand': oj.ojAccordion.ojBeforeExpand; - 'ojCollapse': oj.ojAccordion.ojCollapse; - 'ojExpand': oj.ojAccordion.ojExpand; - 'expandedChanged': CustomEvent; - 'multipleChanged': CustomEvent; - } - interface ojAccordionSettableProperties extends baseComponentSettableProperties { - expanded: Array|Array|Array<{id?: string, index?: number}>|null; - multiple: boolean; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojanimation/index.d.ts b/types/@oracle/oraclejet/ojs/ojanimation/index.d.ts deleted file mode 100644 index bd4b77f2c6..0000000000 --- a/types/@oracle/oraclejet/ojs/ojanimation/index.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -declare namespace oj { - namespace AnimationUtils { - function collapse(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, direction?: string, startMaxHeight?: string, endMaxHeight?: string, startMaxWidth?: string, endMaxWidth?: string}): Promise; - function expand(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, direction?: string, startMaxHeight?: string, endMaxHeight?: string, startMaxWidth?: string, endMaxWidth?: string}): Promise; - function fadeIn(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, startOpacity?: number, endOpacity?: number}): Promise; - function fadeOut(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, startOpacity?: number, endOpacity?: number}): Promise; - function flipIn(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, axis?: string, startAngle?: string, endAngle?: string, backfaceVisibility?: string, perspective?: string, transformOrigin?: string, flipTarget?: string}): Promise; - function flipOut(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, axis?: string, startAngle?: string, endAngle?: string, backfaceVisibility?: string, perspective?: string, transformOrigin?: string, flipTarget?: string}): Promise; - function ripple(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, offsetX?: string, offsetY?: string, color?: string, diameter?: string, startOpacity?: number, endOpacity?: number}): Promise; - function slideIn(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, direction?: string, offsetX?: string, offsetY?: string}): Promise; - function slideOut(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, direction?: string, offsetX?: string, offsetY?: string}): Promise; - function zoomIn(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, axis?: string, transformOrigin?: string}): Promise; - function zoomOut(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, axis?: string, transformOrigin?: string}): Promise; - } - namespace AnimationUtils { - type AnimationMethods = 'collapse'|'expand'|'fadeIn'|'fadeOut'|'flipIn'|'flipOut'|'ripple'|'slideIn'|'slideOut'|'zoomIn'|'zoomOut'; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojarraydataprovider/index.d.ts b/types/@oracle/oraclejet/ojs/ojarraydataprovider/index.d.ts deleted file mode 100644 index dddaf2290a..0000000000 --- a/types/@oracle/oraclejet/ojs/ojarraydataprovider/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/// -declare namespace oj { - class ArrayDataProvider implements DataProvider { - constructor(data: Array|(()=> Array), options?: {sortComparators?: SortComparators, implicitSort?: SortCriterion[], keys?: Array|(()=> Array), idAttribute?: string|Array, keyAttributes?: string|Array}); - addEventListener(eventType: string, listener: EventListener): void - containsKeys(params: FetchByKeysParameters): Promise> - dispatchEvent(evt: Event): boolean - fetchByKeys(params: FetchByKeysParameters): Promise> - fetchByOffset(params: FetchByOffsetParameters): Promise> - fetchFirst>(params?: FetchListParameters): AsyncIterable - getCapability(capabilityName?: string): any - getTotalSize(): Promise; - isEmpty(): 'yes'|'no'|'unknown'; - removeEventListener(eventType: string, listener: EventListener): void - } - -} -declare namespace oj { - interface SortComparators { - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojarraytreedataprovider/index.d.ts b/types/@oracle/oraclejet/ojs/ojarraytreedataprovider/index.d.ts deleted file mode 100644 index dbb445c36f..0000000000 --- a/types/@oracle/oraclejet/ojs/ojarraytreedataprovider/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/// -declare namespace oj { - class ArrayTreeDataProvider implements TreeDataProvider { - constructor(data: Array|(()=> Array), options?: {sortComparators?: SortComparators, implicitSort?: SortCriterion[], keyAttributes?: string|Array, keyAttributesScope?: 'global'|'siblings', childrenAttribute?: string}); - addEventListener(eventType: string, listener: EventListener): void - containsKeys(params: FetchByKeysParameters): Promise> - dispatchEvent(evt: Event): boolean - fetchByKeys(params: FetchByKeysParameters): Promise> - fetchByOffset(params: FetchByOffsetParameters): Promise> - fetchFirst>(params?: FetchListParameters): AsyncIterable - getCapability(capabilityName?: string): any - getChildDataProvider(any): ArrayTreeDataProvider - getTotalSize(): Promise; - isEmpty(): 'yes'|'no'|'unknown'; - removeEventListener(eventType: string, listener: EventListener): void - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojavatar/index.d.ts b/types/@oracle/oraclejet/ojs/ojavatar/index.d.ts deleted file mode 100644 index bfdda53359..0000000000 --- a/types/@oracle/oraclejet/ojs/ojavatar/index.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -declare namespace oj { - class ojAvatar extends JetElement { - initials: string; - size: 'xxs'|'xs'|'sm'|'md'|'lg'|'xl'|'xxl'; - src: string; - onInitialsChanged: (event: CustomEvent)=> any; - onSizeChanged: (event: CustomEvent)=> any; - onSrcChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojAvatarEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getProperty(property: string): any; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - } - interface ojAvatarEventMap extends oj.JetElementEventMap { - 'initialsChanged': CustomEvent; - 'sizeChanged': CustomEvent; - 'srcChanged': CustomEvent; - } - interface ojAvatarSettableProperties extends JetSettableProperties { - initials: string; - size: 'xxs'|'xs'|'sm'|'md'|'lg'|'xl'|'xxl'; - src: string; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojbutton/index.d.ts b/types/@oracle/oraclejet/ojs/ojbutton/index.d.ts deleted file mode 100644 index 22df674702..0000000000 --- a/types/@oracle/oraclejet/ojs/ojbutton/index.d.ts +++ /dev/null @@ -1,144 +0,0 @@ -/// -declare namespace oj { - class ojButton extends baseComponent { - chroming: 'full'|'half'|'outlined'; - disabled: boolean; - display: 'all'|'icons'; - onChromingChanged: (event: CustomEvent)=> any; - onDisabledChanged: (event: CustomEvent)=> any; - onDisplayChanged: (event: CustomEvent)=> any; - onOjAction: (event: oj.ojButton.ojAction)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojButtonEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojButton { - class ojAction extends CustomEvent<{ [propName: string]: any}> { - - } - } - interface ojButtonEventMap extends oj.baseComponentEventMap { - 'ojAction': oj.ojButton.ojAction; - 'chromingChanged': CustomEvent; - 'disabledChanged': CustomEvent; - 'displayChanged': CustomEvent; - } - interface ojButtonSettableProperties extends baseComponentSettableProperties { - chroming: 'full'|'half'|'outlined'; - disabled: boolean; - display: 'all'|'icons'; - } - -} -declare namespace oj { - abstract class ojButtonset extends baseComponent { - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojButtonsetEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojButtonsetEventMap extends oj.baseComponentEventMap { - } - interface ojButtonsetSettableProperties extends baseComponentSettableProperties { - } - -} -declare namespace oj { - class ojButtonsetMany extends ojButtonset { - chroming: 'full'|'half'|'outlined'; - disabled: boolean; - display: 'all'|'icons'; - focusManagement: 'oneTabstop'|'none'; - value: Array|null; - onChromingChanged: (event: CustomEvent)=> any; - onDisabledChanged: (event: CustomEvent)=> any; - onDisplayChanged: (event: CustomEvent)=> any; - onFocusManagementChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojButtonsetManyEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojButtonsetManyEventMap extends oj.ojButtonsetEventMap { - 'chromingChanged': CustomEvent; - 'disabledChanged': CustomEvent; - 'displayChanged': CustomEvent; - 'focusManagementChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojButtonsetManySettableProperties extends ojButtonsetSettableProperties { - chroming: 'full'|'half'|'outlined'; - disabled: boolean; - display: 'all'|'icons'; - focusManagement: 'oneTabstop'|'none'; - value: Array|null; - } - -} -declare namespace oj { - class ojButtonsetOne extends ojButtonset { - chroming: 'full'|'half'|'outlined'; - disabled: boolean; - display: 'all'|'icons'; - focusManagement: 'oneTabstop'|'none'; - value: any; - onChromingChanged: (event: CustomEvent)=> any; - onDisabledChanged: (event: CustomEvent)=> any; - onDisplayChanged: (event: CustomEvent)=> any; - onFocusManagementChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojButtonsetOneEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojButtonsetOneEventMap extends oj.ojButtonsetEventMap { - 'chromingChanged': CustomEvent; - 'disabledChanged': CustomEvent; - 'displayChanged': CustomEvent; - 'focusManagementChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojButtonsetOneSettableProperties extends ojButtonsetSettableProperties { - chroming: 'full'|'half'|'outlined'; - disabled: boolean; - display: 'all'|'icons'; - focusManagement: 'oneTabstop'|'none'; - value: any; - } - -} -declare namespace oj { - class ojMenuButton extends ojButton { - chroming: 'full'|'half'|'outlined'; - disabled: boolean; - display: 'all'|'icons'; - onChromingChanged: (event: CustomEvent)=> any; - onDisabledChanged: (event: CustomEvent)=> any; - onDisplayChanged: (event: CustomEvent)=> any; - onOjAction: (event: oj.ojMenuButton.ojAction)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojMenuButtonEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojMenuButton { - class ojAction extends CustomEvent<{ [propName: string]: any}> { - - } - } - interface ojMenuButtonEventMap extends oj.ojButtonEventMap { - 'ojAction': oj.ojMenuButton.ojAction; - 'chromingChanged': CustomEvent; - 'disabledChanged': CustomEvent; - 'displayChanged': CustomEvent; - } - interface ojMenuButtonSettableProperties extends ojButtonSettableProperties { - chroming: 'full'|'half'|'outlined'; - disabled: boolean; - display: 'all'|'icons'; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojchart/index.d.ts b/types/@oracle/oraclejet/ojs/ojchart/index.d.ts deleted file mode 100644 index f2e3354441..0000000000 --- a/types/@oracle/oraclejet/ojs/ojchart/index.d.ts +++ /dev/null @@ -1,822 +0,0 @@ -/// -/// -declare namespace oj { - class ojChart extends dvtBaseComponent> { - animationOnDataChange: 'auto'|'slideToLeft'|'slideToRight'|'none'; - animationOnDisplay: 'auto'|'alphaFade'|'zoom'|'none'; - as: string; - coordinateSystem: 'polar'|'cartesian'; - data: oj.DataProvider|null; - dataCursor: 'off'|'on'|'auto'; - dataCursorBehavior: 'smooth'|'snap'|'auto'; - dataCursorPosition: {x: number|string, y: number, y2: number}; - dataLabel: ((context: oj.ojChart.DataLabelContext) => ({insert: Element|string}|{preventDefault: boolean})); - dnd: {drag: {groups: {dataTypes: string|Array, drag: ((param0: Event)=> void), dragEnd: ((param0: Event)=> void), dragStart: ((param0: Event, param1: object)=> void)}, items: {dataTypes: string|Array, drag: ((param0: Event)=> void), dragEnd: ((param0: Event)=> void), dragStart: ((param0: Event, param1: object)=> void)}, series: {dataTypes: string|Array, drag: ((param0: Event)=> void), dragEnd: ((param0: Event)=> void), dragStart: ((param0: Event, param1: object)=> void)}}, drop: {legend: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, plotArea: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, xAxis: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, y2Axis: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, yAxis: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}}}; - dragMode: 'pan'|'zoom'|'select'|'off'|'user'; - drilling: 'on'|'seriesOnly'|'groupsOnly'|'off'; - groupComparator: ((param0: object, param1: Object)=> number)|null; - hiddenCategories: Array; - hideAndShowBehavior: 'withRescale'|'withoutRescale'|'none'; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - initialZooming: 'first'|'last'|'none'; - legend: {backgroundColor: string, borderColor: string, maxSize: string, position: 'start'|'end'|'bottom'|'top'|'auto', referenceObjectSection: {title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}, rendered: 'on'|'off'|'auto', scrolling: 'off'|'asNeeded', sections: Array<{items: Array<{borderColor: string, categories: Array, categoryVisibility: 'hidden'|'visible', color: string, id: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, markerColor: string, markerShape?: 'circle'|'diamond'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, pattern: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none', shortDesc: string, source: string, symbolType: 'line'|'lineWithMarker'|'image'|'marker', text: string}>, sections: Array, title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}>, seriesSection: {title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}, size: string, symbolHeight: number, symbolWidth: number, textStyle: object, title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}; - orientation: 'horizontal'|'vertical'; - otherThreshold: number; - overview: {content: object, height: string, rendered: 'on'|'off'}; - pieCenter: {converter: object, label: string, labelStyle: object, renderer: ((context: oj.ojChart.PieCenterContext) => ({insert: Element|string}|{preventDefault: boolean})), scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto'}; - plotArea: {backgroundColor: string, borderColor: string, borderWidth: number, rendered: 'off'|'on'}; - polarGridShape: 'polygon'|'circle'; - selection: Array; - selectionMode: 'single'|'multiple'|'none'; - seriesComparator: ((param0: object, param1: Object)=> number)|null; - sorting: 'ascending'|'descending'|'off'; - splitDualY: 'on'|'off'|'auto'; - splitterPosition: number; - stack: 'on'|'off'; - stackLabel: 'on'|'off'; - styleDefaults: {animationDownColor: string, animationDuration: number, animationIndicators: 'none'|'all', animationUpColor: string, barGapRatio: number, borderColor: string, borderWidth: number, boxPlot: {medianSvgClassName: string, medianSvgStyle: object, whiskerEndLength: string, whiskerEndSvgClassName: string, whiskerEndSvgStyle: object, whiskerSvgClassName: string, whiskerSvgStyle: object}, colors: Array, dataCursor: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, markerColor: string, markerDisplayed: 'off'|'on', markerSize: number}, dataItemGaps: string, dataLabelPosition: 'center'|'outsideSlice'|'aboveMarker'|'belowMarker'|'beforeMarker'|'afterMarker'|'insideBarEdge'|'outsideBarEdge'|'none'|'auto', dataLabelStyle: object|Array, funnelBackgroundColor: string, groupSeparators: {color: string, rendered: 'off'|'auto'}, hoverBehaviorDelay: number, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'straight'|'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'none'|'auto', lineWidth: number, markerColor: string, markerDisplayed: 'on'|'off'|'auto', markerShape?: 'auto'|'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'|string, markerSize: number, marqueeBorderColor: string, marqueeColor: string, maxBarWidth: number, otherColor: string, patterns: Array, pieFeelerColor: string, pieInnerRadius: number, selectionEffect: 'explode'|'highlightAndExplode'|'highlight', seriesEffect: 'color'|'pattern'|'gradient', shapes: Array, stackLabelStyle: object, stockFallingColor: string, stockRangeColor: string, stockRisingColor: string, stockVolumeColor: string, threeDEffect: 'on'|'off', tooltipLabelStyle: object, tooltipValueStyle: object}; - timeAxisType: 'enabled'|'mixedFrequency'|'skipGaps'|'disabled'|'auto'; - tooltip: {renderer: ((context: oj.ojChart.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - touchResponse: 'touchStart'|'auto'; - type: 'line'|'area'|'lineWithArea'|'stock'|'boxPlot'|'combo'|'pie'|'scatter'|'bubble'|'funnel'|'pyramid'|'bar'; - valueFormats: {close: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, group: {tooltipDisplay: 'off'|'auto', tooltipLabel: string|Array}, high: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, label: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto'}, low: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, open: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, q1: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, q2: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, q3: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, series: {tooltipDisplay: 'off'|'auto', tooltipLabel: string}, targetValue: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, value: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, volume: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, x: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, y: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, y2: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, z: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}}; - xAxis: {axisLine: {lineColor: string, lineWidth: number, rendered: 'off'|'on'}, baselineScaling: 'min'|'zero', dataMax: number, dataMin: number, majorTick: {baselineColor: 'inherit'|'auto', baselineStyle: 'dotted'|'dashed'|'solid', baselineWidth: number, lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, max: number|string, maxSize: string, min: number|string, minStep: number, minorStep: number, minorTick: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, referenceObjects: Array<{categories: Array, color: string, displayInLegend: 'on'|'off', high: number, id: string, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'straight', lineWidth: number, location: 'front'|'back', low: number, shortDesc: string, svgClassName: string, svgStyle: object, text: string, type: 'area'|'line', value: number}>, rendered: 'off'|'on', scale: 'log'|'linear', size: string, step: number, tickLabel: {converter: object, rendered: 'off'|'on', rotation: 'none'|'auto', scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style: object}, title: string, titleStyle: object, viewportEndGroup: number|string, viewportMax: number|string, viewportMin: number|string, viewportStartGroup: number|string}; - y2Axis: {alignTickMarks: 'off'|'on', axisLine: {lineColor: string, lineWidth: number, rendered: 'on'|'off'|'auto'}, baselineScaling: 'min'|'zero', dataMax: number, dataMin: number, majorTick: {baselineColor: 'inherit'|'auto', baselineStyle: 'dotted'|'dashed'|'solid', baselineWidth: number, lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, max: number, maxSize: string, min: number, minStep: number, minorStep: number, minorTick: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, position: 'start'|'end'|'top'|'bottom'|'auto', referenceObjects: Array<{categories: Array, color: string, displayInLegend: 'on'|'off', high: number, id: string, items: Array<{high: number, low: number, value: number, x: number|string}>, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'straight', lineWidth: number, location: 'front'|'back', low: number, shortDesc: string, svgClassName: string, svgStyle: object, text: string, type: 'area'|'line', value: number}>, rendered: 'off'|'on', scale: 'log'|'linear', size: string, step: number, tickLabel: {converter: object, position: 'inside'|'outside', rendered: 'off'|'on', scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style: object}, title: string, titleStyle: object}; - yAxis: {axisLine: {lineColor: string, lineWidth: number, rendered: 'on'|'off'|'auto'}, baselineScaling: 'min'|'zero', dataMax: number, dataMin: number, majorTick: {baselineColor: 'inherit'|'auto', baselineStyle: 'dotted'|'dashed'|'solid', baselineWidth: number, lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, max: number, maxSize: string, min: number, minStep: number, minorStep: number, minorTick: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, position: 'start'|'end'|'top'|'bottom'|'auto', referenceObjects: Array<{categories: Array, color: string, displayInLegend: 'on'|'off', high: number, id: string, items: Array<{high: number, low: number, value: number, x: number|string}>, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'straight', lineWidth: number, location: 'front'|'back', low: number, shortDesc: string, svgClassName: string, svgStyle: object, text: string, type: 'area'|'line', value: number}>, rendered: 'off'|'on', scale: 'log'|'linear', size: string, step: number, tickLabel: {converter: object, position: 'inside'|'outside', rendered: 'off'|'on', scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style: object}, title: string, titleStyle: object, viewportMax: number, viewportMin: number}; - zoomAndScroll: 'delayedScrollOnly'|'liveScrollOnly'|'delayed'|'live'|'off'; - zoomDirection: 'x'|'y'|'auto'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelClose?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelDate?: string, labelDefaultGroupName?: string, labelGroup?: string, labelHigh?: string, labelInvalidData?: string, labelLow?: string, labelNoData?: string, labelOpen?: string, labelOther?: string, labelPercentage?: string, labelQ1?: string, labelQ2?: string, labelQ3?: string, labelSeries?: string, labelTargetValue?: string, labelValue?: string, labelVolume?: string, labelX?: string, labelY?: string, labelZ?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, tooltipPan?: string, tooltipSelect?: string, tooltipZoom?: string}; - onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; - onAnimationOnDisplayChanged: (event: CustomEvent)=> any; - onAsChanged: (event: CustomEvent)=> any; - onCoordinateSystemChanged: (event: CustomEvent)=> any; - onDataChanged: (event: CustomEvent)=> any; - onDataCursorChanged: (event: CustomEvent)=> any; - onDataCursorBehaviorChanged: (event: CustomEvent)=> any; - onDataCursorPositionChanged: (event: CustomEvent)=> any; - onDataLabelChanged: (event: CustomEvent)=> any; - onDndChanged: (event: CustomEvent)=> any; - onDragModeChanged: (event: CustomEvent)=> any; - onDrillingChanged: (event: CustomEvent)=> any; - onGroupComparatorChanged: (event: CustomEvent)=> any; - onHiddenCategoriesChanged: (event: CustomEvent)=> any; - onHideAndShowBehaviorChanged: (event: CustomEvent)=> any; - onHighlightMatchChanged: (event: CustomEvent)=> any; - onHighlightedCategoriesChanged: (event: CustomEvent)=> any; - onHoverBehaviorChanged: (event: CustomEvent)=> any; - onInitialZoomingChanged: (event: CustomEvent)=> any; - onLegendChanged: (event: CustomEvent)=> any; - onOrientationChanged: (event: CustomEvent)=> any; - onOtherThresholdChanged: (event: CustomEvent)=> any; - onOverviewChanged: (event: CustomEvent)=> any; - onPieCenterChanged: (event: CustomEvent)=> any; - onPlotAreaChanged: (event: CustomEvent)=> any; - onPolarGridShapeChanged: (event: CustomEvent)=> any; - onSelectionChanged: (event: CustomEvent)=> any; - onSelectionModeChanged: (event: CustomEvent)=> any; - onSeriesComparatorChanged: (event: CustomEvent)=> any; - onSortingChanged: (event: CustomEvent)=> any; - onSplitDualYChanged: (event: CustomEvent)=> any; - onSplitterPositionChanged: (event: CustomEvent)=> any; - onStackChanged: (event: CustomEvent)=> any; - onStackLabelChanged: (event: CustomEvent)=> any; - onStyleDefaultsChanged: (event: CustomEvent)=> any; - onTimeAxisTypeChanged: (event: CustomEvent)=> any; - onTooltipChanged: (event: CustomEvent)=> any; - onTouchResponseChanged: (event: CustomEvent)=> any; - onTypeChanged: (event: CustomEvent)=> any; - onValueFormatsChanged: (event: CustomEvent)=> any; - onXAxisChanged: (event: CustomEvent)=> any; - onY2AxisChanged: (event: CustomEvent)=> any; - onYAxisChanged: (event: CustomEvent)=> any; - onZoomAndScrollChanged: (event: CustomEvent)=> any; - onZoomDirectionChanged: (event: CustomEvent)=> any; - onOjDrill: (event: oj.ojChart.ojDrill)=> any; - onOjSelectInput: (event: oj.ojChart.ojSelectInput)=> any; - onOjViewportChange: (event: oj.ojChart.ojViewportChange)=> any; - onOjViewportChangeInput: (event: oj.ojChart.ojViewportChangeInput)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojChartEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getContextByNode(node: Element): oj.ojChart.PieCenterLabelContext|oj.ojChart.LegendItemContext|oj.ojChart.ReferenceObject|oj.ojChart.GroupContext|oj.ojChart.AxisTitleContext|oj.ojChart.ItemContext|oj.ojChart.SeriesContext; - getDataItem(seriesIndex: number, groupIndex: number): object|null; - getGroup(groupIndex: string): string; - getGroupCount(): number; - getLegend(): object; - getPlotArea(): object; - getSeries(seriesIndex: string): string; - getSeriesCount(): number; - getValuesAt(x: number, y: number): object; - getXAxis(): object; - getY2Axis(): object; - getYAxis(): object; - } - namespace ojChart { - class ojDrill extends CustomEvent<{id: string, series: string, group: string, data: object, itemData: object, seriesData: object, groupData: Array, [propName: string]: any}> { - - } - - class ojSelectInput extends CustomEvent<{items: Array, selectionData: Array<{data: object, itemData: object, groupData: Array, seriesData: object}>, endGroup: string, startGroup: string, xMax: number, xMin: number, yMax: number, yMin: number, [propName: string]: any}> { - - } - - class ojViewportChange extends CustomEvent<{endGroup: string, startGroup: string, xMax: number, xMin: number, yMax: number, yMin: number, [propName: string]: any}> { - - } - - class ojViewportChangeInput extends CustomEvent<{endGroup: string, startGroup: string, xMax: number, xMin: number, yMax: number, yMin: number, [propName: string]: any}> { - - } - } - interface ojChartEventMap extends oj.dvtBaseComponentEventMap { - 'ojDrill': oj.ojChart.ojDrill; - 'ojSelectInput': oj.ojChart.ojSelectInput; - 'ojViewportChange': oj.ojChart.ojViewportChange; - 'ojViewportChangeInput': oj.ojChart.ojViewportChangeInput; - 'animationOnDataChangeChanged': CustomEvent; - 'animationOnDisplayChanged': CustomEvent; - 'asChanged': CustomEvent; - 'coordinateSystemChanged': CustomEvent; - 'dataChanged': CustomEvent; - 'dataCursorChanged': CustomEvent; - 'dataCursorBehaviorChanged': CustomEvent; - 'dataCursorPositionChanged': CustomEvent; - 'dataLabelChanged': CustomEvent; - 'dndChanged': CustomEvent; - 'dragModeChanged': CustomEvent; - 'drillingChanged': CustomEvent; - 'groupComparatorChanged': CustomEvent; - 'hiddenCategoriesChanged': CustomEvent; - 'hideAndShowBehaviorChanged': CustomEvent; - 'highlightMatchChanged': CustomEvent; - 'highlightedCategoriesChanged': CustomEvent; - 'hoverBehaviorChanged': CustomEvent; - 'initialZoomingChanged': CustomEvent; - 'legendChanged': CustomEvent; - 'orientationChanged': CustomEvent; - 'otherThresholdChanged': CustomEvent; - 'overviewChanged': CustomEvent; - 'pieCenterChanged': CustomEvent; - 'plotAreaChanged': CustomEvent; - 'polarGridShapeChanged': CustomEvent; - 'selectionChanged': CustomEvent; - 'selectionModeChanged': CustomEvent; - 'seriesComparatorChanged': CustomEvent; - 'sortingChanged': CustomEvent; - 'splitDualYChanged': CustomEvent; - 'splitterPositionChanged': CustomEvent; - 'stackChanged': CustomEvent; - 'stackLabelChanged': CustomEvent; - 'styleDefaultsChanged': CustomEvent; - 'timeAxisTypeChanged': CustomEvent; - 'tooltipChanged': CustomEvent; - 'touchResponseChanged': CustomEvent; - 'typeChanged': CustomEvent; - 'valueFormatsChanged': CustomEvent; - 'xAxisChanged': CustomEvent; - 'y2AxisChanged': CustomEvent; - 'yAxisChanged': CustomEvent; - 'zoomAndScrollChanged': CustomEvent; - 'zoomDirectionChanged': CustomEvent; - } - interface ojChartSettableProperties extends dvtBaseComponentSettableProperties { - animationOnDataChange: 'auto'|'slideToLeft'|'slideToRight'|'none'; - animationOnDisplay: 'auto'|'alphaFade'|'zoom'|'none'; - as: string; - coordinateSystem: 'polar'|'cartesian'; - data: oj.DataProvider|null; - dataCursor: 'off'|'on'|'auto'; - dataCursorBehavior: 'smooth'|'snap'|'auto'; - dataCursorPosition: {x: number|string, y: number, y2: number}; - dataLabel: ((context: oj.ojChart.DataLabelContext) => ({insert: Element|string}|{preventDefault: boolean})); - dnd: {drag: {groups: {dataTypes: string|Array, drag: ((param0: Event)=> void), dragEnd: ((param0: Event)=> void), dragStart: ((param0: Event, param1: object)=> void)}, items: {dataTypes: string|Array, drag: ((param0: Event)=> void), dragEnd: ((param0: Event)=> void), dragStart: ((param0: Event, param1: object)=> void)}, series: {dataTypes: string|Array, drag: ((param0: Event)=> void), dragEnd: ((param0: Event)=> void), dragStart: ((param0: Event, param1: object)=> void)}}, drop: {legend: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, plotArea: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, xAxis: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, y2Axis: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, yAxis: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}}}; - dragMode: 'pan'|'zoom'|'select'|'off'|'user'; - drilling: 'on'|'seriesOnly'|'groupsOnly'|'off'; - groupComparator: ((param0: object, param1: Object)=> number)|null; - hiddenCategories: Array; - hideAndShowBehavior: 'withRescale'|'withoutRescale'|'none'; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - initialZooming: 'first'|'last'|'none'; - legend: {backgroundColor: string, borderColor: string, maxSize: string, position: 'start'|'end'|'bottom'|'top'|'auto', referenceObjectSection: {title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}, rendered: 'on'|'off'|'auto', scrolling: 'off'|'asNeeded', sections: Array<{items: Array<{borderColor: string, categories: Array, categoryVisibility: 'hidden'|'visible', color: string, id: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, markerColor: string, markerShape?: 'circle'|'diamond'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, pattern: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none', shortDesc: string, source: string, symbolType: 'line'|'lineWithMarker'|'image'|'marker', text: string}>, sections: Array, title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}>, seriesSection: {title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}, size: string, symbolHeight: number, symbolWidth: number, textStyle: object, title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}; - orientation: 'horizontal'|'vertical'; - otherThreshold: number; - overview: {content: object, height: string, rendered: 'on'|'off'}; - pieCenter: {converter: object, label: string, labelStyle: object, renderer: ((context: oj.ojChart.PieCenterContext) => ({insert: Element|string}|{preventDefault: boolean})), scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto'}; - plotArea: {backgroundColor: string, borderColor: string, borderWidth: number, rendered: 'off'|'on'}; - polarGridShape: 'polygon'|'circle'; - selection: Array; - selectionMode: 'single'|'multiple'|'none'; - seriesComparator: ((param0: object, param1: Object)=> number)|null; - sorting: 'ascending'|'descending'|'off'; - splitDualY: 'on'|'off'|'auto'; - splitterPosition: number; - stack: 'on'|'off'; - stackLabel: 'on'|'off'; - styleDefaults: {animationDownColor: string, animationDuration: number, animationIndicators: 'none'|'all', animationUpColor: string, barGapRatio: number, borderColor: string, borderWidth: number, boxPlot: {medianSvgClassName: string, medianSvgStyle: object, whiskerEndLength: string, whiskerEndSvgClassName: string, whiskerEndSvgStyle: object, whiskerSvgClassName: string, whiskerSvgStyle: object}, colors: Array, dataCursor: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, markerColor: string, markerDisplayed: 'off'|'on', markerSize: number}, dataItemGaps: string, dataLabelPosition: 'center'|'outsideSlice'|'aboveMarker'|'belowMarker'|'beforeMarker'|'afterMarker'|'insideBarEdge'|'outsideBarEdge'|'none'|'auto', dataLabelStyle: object|Array, funnelBackgroundColor: string, groupSeparators: {color: string, rendered: 'off'|'auto'}, hoverBehaviorDelay: number, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'straight'|'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'none'|'auto', lineWidth: number, markerColor: string, markerDisplayed: 'on'|'off'|'auto', markerShape?: 'auto'|'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'|string, markerSize: number, marqueeBorderColor: string, marqueeColor: string, maxBarWidth: number, otherColor: string, patterns: Array, pieFeelerColor: string, pieInnerRadius: number, selectionEffect: 'explode'|'highlightAndExplode'|'highlight', seriesEffect: 'color'|'pattern'|'gradient', shapes: Array, stackLabelStyle: object, stockFallingColor: string, stockRangeColor: string, stockRisingColor: string, stockVolumeColor: string, threeDEffect: 'on'|'off', tooltipLabelStyle: object, tooltipValueStyle: object}; - timeAxisType: 'enabled'|'mixedFrequency'|'skipGaps'|'disabled'|'auto'; - tooltip: {renderer: ((context: oj.ojChart.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - touchResponse: 'touchStart'|'auto'; - type: 'line'|'area'|'lineWithArea'|'stock'|'boxPlot'|'combo'|'pie'|'scatter'|'bubble'|'funnel'|'pyramid'|'bar'; - valueFormats: {close: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, group: {tooltipDisplay: 'off'|'auto', tooltipLabel: string|Array}, high: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, label: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto'}, low: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, open: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, q1: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, q2: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, q3: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, series: {tooltipDisplay: 'off'|'auto', tooltipLabel: string}, targetValue: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, value: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, volume: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, x: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, y: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, y2: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, z: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}}; - xAxis: {axisLine: {lineColor: string, lineWidth: number, rendered: 'off'|'on'}, baselineScaling: 'min'|'zero', dataMax: number, dataMin: number, majorTick: {baselineColor: 'inherit'|'auto', baselineStyle: 'dotted'|'dashed'|'solid', baselineWidth: number, lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, max: number|string, maxSize: string, min: number|string, minStep: number, minorStep: number, minorTick: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, referenceObjects: Array<{categories: Array, color: string, displayInLegend: 'on'|'off', high: number, id: string, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'straight', lineWidth: number, location: 'front'|'back', low: number, shortDesc: string, svgClassName: string, svgStyle: object, text: string, type: 'area'|'line', value: number}>, rendered: 'off'|'on', scale: 'log'|'linear', size: string, step: number, tickLabel: {converter: object, rendered: 'off'|'on', rotation: 'none'|'auto', scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style: object}, title: string, titleStyle: object, viewportEndGroup: number|string, viewportMax: number|string, viewportMin: number|string, viewportStartGroup: number|string}; - y2Axis: {alignTickMarks: 'off'|'on', axisLine: {lineColor: string, lineWidth: number, rendered: 'on'|'off'|'auto'}, baselineScaling: 'min'|'zero', dataMax: number, dataMin: number, majorTick: {baselineColor: 'inherit'|'auto', baselineStyle: 'dotted'|'dashed'|'solid', baselineWidth: number, lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, max: number, maxSize: string, min: number, minStep: number, minorStep: number, minorTick: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, position: 'start'|'end'|'top'|'bottom'|'auto', referenceObjects: Array<{categories: Array, color: string, displayInLegend: 'on'|'off', high: number, id: string, items: Array<{high: number, low: number, value: number, x: number|string}>, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'straight', lineWidth: number, location: 'front'|'back', low: number, shortDesc: string, svgClassName: string, svgStyle: object, text: string, type: 'area'|'line', value: number}>, rendered: 'off'|'on', scale: 'log'|'linear', size: string, step: number, tickLabel: {converter: object, position: 'inside'|'outside', rendered: 'off'|'on', scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style: object}, title: string, titleStyle: object}; - yAxis: {axisLine: {lineColor: string, lineWidth: number, rendered: 'on'|'off'|'auto'}, baselineScaling: 'min'|'zero', dataMax: number, dataMin: number, majorTick: {baselineColor: 'inherit'|'auto', baselineStyle: 'dotted'|'dashed'|'solid', baselineWidth: number, lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, max: number, maxSize: string, min: number, minStep: number, minorStep: number, minorTick: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, position: 'start'|'end'|'top'|'bottom'|'auto', referenceObjects: Array<{categories: Array, color: string, displayInLegend: 'on'|'off', high: number, id: string, items: Array<{high: number, low: number, value: number, x: number|string}>, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'straight', lineWidth: number, location: 'front'|'back', low: number, shortDesc: string, svgClassName: string, svgStyle: object, text: string, type: 'area'|'line', value: number}>, rendered: 'off'|'on', scale: 'log'|'linear', size: string, step: number, tickLabel: {converter: object, position: 'inside'|'outside', rendered: 'off'|'on', scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style: object}, title: string, titleStyle: object, viewportMax: number, viewportMin: number}; - zoomAndScroll: 'delayedScrollOnly'|'liveScrollOnly'|'delayed'|'live'|'off'; - zoomDirection: 'x'|'y'|'auto'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelClose?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelDate?: string, labelDefaultGroupName?: string, labelGroup?: string, labelHigh?: string, labelInvalidData?: string, labelLow?: string, labelNoData?: string, labelOpen?: string, labelOther?: string, labelPercentage?: string, labelQ1?: string, labelQ2?: string, labelQ3?: string, labelSeries?: string, labelTargetValue?: string, labelValue?: string, labelVolume?: string, labelX?: string, labelY?: string, labelZ?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, tooltipPan?: string, tooltipSelect?: string, tooltipZoom?: string}; - } - namespace ojChart { - type AxisTitleContext = - { - axis: 'xAxis'|'yAxis'|'y2Axis', subId: string - } - } - namespace ojChart { - type DataLabelContext = - { - id: any, series: string, group: string|Array, value: number, targetValue: number, x: number|string, y: number, z: number, low: number, high: number, open: number, close: number, volume: number, label: string, totalValue: number, data: object|null, itemData: object|null, seriesData: object|null, groupData: object|null, componentElement: Element - } - } - namespace ojChart { - type GroupContext = - { - indexPath: Array, subId: string - } - } - namespace ojChart { - type ItemContext = - { - seriesIndex: number, itemIndex: number, subId: string - } - } - namespace ojChart { - type LegendItemContext = - { - sectionIndexPath: Array, itemIndex: number, subId: string - } - } - namespace ojChart { - type PieCenterContext = - { - outerBounds: object, innerBounds: object, label: string, componentElement: Element - } - } - namespace ojChart { - type PieCenterLabelContext = - { - subId: string - } - } - namespace ojChart { - type ReferenceObject = - { - axis: 'xAxis'|'yAxis'|'y2Axis', index: number, subId: string - } - } - namespace ojChart { - type SeriesContext = - { - itemIndex: number, subId: string - } - } - namespace ojChart { - type TooltipContext = - { - parentElement: Element, id: any, series: string, group: string|Array, label: string, value: number, x: number|string, y: number, z: number, low: number, high: number, open: number, close: number, volume: number, targetValue: number, data: object|null, itemData: object|null, seriesData: object|null, groupData: object|null, componentElement: Element, color: string - } - } - -} -declare namespace oj { - class ojChartGroup extends JetElement { - drilling?: 'on'|'off'|'inherit'; - labelStyle?: object; - name?: string; - shortDesc?: string; - onDrillingChanged: (event: CustomEvent)=> any; - onLabelStyleChanged: (event: CustomEvent)=> any; - onNameChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojChartGroupEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojChartGroupEventMap extends oj.JetElementEventMap { - 'drillingChanged': CustomEvent; - 'labelStyleChanged': CustomEvent; - 'nameChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - } - interface ojChartGroupSettableProperties extends JetSettableProperties { - drilling?: 'on'|'off'|'inherit'; - labelStyle?: object; - name?: string; - shortDesc?: string; - } - -} -declare namespace oj { - class ojChartItem extends JetElement { - borderColor?: string; - borderWidth?: number; - boxPlot?: {medianSvgClassName?: string, medianSvgStyle?: object, q2Color?: string, q2SvgClassName?: string, q2SvgStyle?: object, q3SvgClassName?: string, q3SvgStyle?: object, whiskerEndLength?: string, whiskerEndSvgClassName?: string, whiskerEndSvgStyle?: object, whiskerSvgClassName?: string, whiskerSvgStyle?: object}; - categories?: Array; - close?: number; - color?: string; - drilling?: 'on'|'off'|'inherit'; - groupId: Array; - high?: number; - items?: Array|Array; - label?: string|Array; - labelPosition?: 'center'|'outsideSlice'|'aboveMarker'|'belowMarker'|'beforeMarker'|'afterMarker'|'insideBarEdge'|'outsideBarEdge'|'none'|'auto'; - labelStyle?: object|Array; - low?: number; - markerDisplayed?: 'on'|'off'|'auto'; - markerShape?: 'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'|'auto'|string; - markerSize?: number; - open?: number; - pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'auto'; - q1?: number; - q2?: number; - q3?: number; - seriesId: string; - shortDesc?: string; - source?: string; - sourceHover?: string; - sourceHoverSelected?: string; - sourceSelected?: string; - svgClassName?: string; - svgStyle?: object; - targetValue?: number; - value?: number; - volume?: number; - x?: number|string; - y?: number; - z?: number; - onBorderColorChanged: (event: CustomEvent)=> any; - onBorderWidthChanged: (event: CustomEvent)=> any; - onBoxPlotChanged: (event: CustomEvent)=> any; - onCategoriesChanged: (event: CustomEvent)=> any; - onCloseChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onDrillingChanged: (event: CustomEvent)=> any; - onGroupIdChanged: (event: CustomEvent)=> any; - onHighChanged: (event: CustomEvent)=> any; - onItemsChanged: (event: CustomEvent)=> any; - onLabelChanged: (event: CustomEvent)=> any; - onLabelPositionChanged: (event: CustomEvent)=> any; - onLabelStyleChanged: (event: CustomEvent)=> any; - onLowChanged: (event: CustomEvent)=> any; - onMarkerDisplayedChanged: (event: CustomEvent)=> any; - onMarkerShapeChanged: (event: CustomEvent)=> any; - onMarkerSizeChanged: (event: CustomEvent)=> any; - onOpenChanged: (event: CustomEvent)=> any; - onPatternChanged: (event: CustomEvent)=> any; - onQ1Changed: (event: CustomEvent)=> any; - onQ2Changed: (event: CustomEvent)=> any; - onQ3Changed: (event: CustomEvent)=> any; - onSeriesIdChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onSourceChanged: (event: CustomEvent)=> any; - onSourceHoverChanged: (event: CustomEvent)=> any; - onSourceHoverSelectedChanged: (event: CustomEvent)=> any; - onSourceSelectedChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onTargetValueChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onVolumeChanged: (event: CustomEvent)=> any; - onXChanged: (event: CustomEvent)=> any; - onYChanged: (event: CustomEvent)=> any; - onZChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojChartItemEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojChartItemEventMap extends oj.JetElementEventMap { - 'borderColorChanged': CustomEvent; - 'borderWidthChanged': CustomEvent; - 'boxPlotChanged': CustomEvent; - 'categoriesChanged': CustomEvent; - 'closeChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'drillingChanged': CustomEvent; - 'groupIdChanged': CustomEvent; - 'highChanged': CustomEvent; - 'itemsChanged': CustomEvent; - 'labelChanged': CustomEvent; - 'labelPositionChanged': CustomEvent; - 'labelStyleChanged': CustomEvent; - 'lowChanged': CustomEvent; - 'markerDisplayedChanged': CustomEvent; - 'markerShapeChanged': CustomEvent; - 'markerSizeChanged': CustomEvent; - 'openChanged': CustomEvent; - 'patternChanged': CustomEvent; - 'q1Changed': CustomEvent; - 'q2Changed': CustomEvent; - 'q3Changed': CustomEvent; - 'seriesIdChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'sourceChanged': CustomEvent; - 'sourceHoverChanged': CustomEvent; - 'sourceHoverSelectedChanged': CustomEvent; - 'sourceSelectedChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'targetValueChanged': CustomEvent; - 'valueChanged': CustomEvent; - 'volumeChanged': CustomEvent; - 'xChanged': CustomEvent; - 'yChanged': CustomEvent; - 'zChanged': CustomEvent; - } - interface ojChartItemSettableProperties extends JetSettableProperties { - borderColor?: string; - borderWidth?: number; - boxPlot?: {medianSvgClassName?: string, medianSvgStyle?: object, q2Color?: string, q2SvgClassName?: string, q2SvgStyle?: object, q3SvgClassName?: string, q3SvgStyle?: object, whiskerEndLength?: string, whiskerEndSvgClassName?: string, whiskerEndSvgStyle?: object, whiskerSvgClassName?: string, whiskerSvgStyle?: object}; - categories?: Array; - close?: number; - color?: string; - drilling?: 'on'|'off'|'inherit'; - groupId: Array; - high?: number; - items?: Array|Array; - label?: string|Array; - labelPosition?: 'center'|'outsideSlice'|'aboveMarker'|'belowMarker'|'beforeMarker'|'afterMarker'|'insideBarEdge'|'outsideBarEdge'|'none'|'auto'; - labelStyle?: object|Array; - low?: number; - markerDisplayed?: 'on'|'off'|'auto'; - markerShape?: 'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'|'auto'|string; - markerSize?: number; - open?: number; - pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'auto'; - q1?: number; - q2?: number; - q3?: number; - seriesId: string; - shortDesc?: string; - source?: string; - sourceHover?: string; - sourceHoverSelected?: string; - sourceSelected?: string; - svgClassName?: string; - svgStyle?: object; - targetValue?: number; - value?: number; - volume?: number; - x?: number|string; - y?: number; - z?: number; - } - -} -declare namespace oj { - class ojChartSeries extends JetElement { - areaColor?: string; - areaSvgClassName?: string; - areaSvgStyle?: object; - assignedToY2?: 'on'|'off'; - borderColor?: string; - borderWidth?: number; - boxPlot?: {medianSvgClassName?: string, medianSvgStyle?: object, q2Color?: string, q2SvgClassName?: string, q2SvgStyle?: object, q3Color?: string, q3SvgClassName?: string, q3SvgStyle?: object, whiskerEndLength?: string, whiskerEndSvgClassName?: string, whiskerEndSvgStyle?: object, whiskerSvgClassName?: string, whiskerSvgStyle?: object}; - categories?: Array; - color?: string; - displayInLegend?: 'on'|'off'|'auto'; - drilling?: 'on'|'off'|'inherit'; - lineStyle?: 'dotted'|'dashed'|'solid'; - lineType?: 'straight'|'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'none'|'auto'; - lineWidth?: number; - markerColor?: string; - markerDisplayed?: 'on'|'off'|'auto'; - markerShape?: 'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'|'auto'|string; - markerSize?: number; - markerSvgClassName?: string; - markerSvgStyle?: object; - name?: string; - pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'auto'; - pieSliceExplode?: number; - shortDesc?: string; - source?: string; - sourceHover?: string; - sourceHoverSelected?: string; - sourceSelected?: string; - stackCategory?: string; - svgClassName?: string; - svgStyle?: object; - type?: 'bar'|'line'|'area'|'lineWithArea'|'candlestick'|'boxPlot'|'auto'; - onAreaColorChanged: (event: CustomEvent)=> any; - onAreaSvgClassNameChanged: (event: CustomEvent)=> any; - onAreaSvgStyleChanged: (event: CustomEvent)=> any; - onAssignedToY2Changed: (event: CustomEvent)=> any; - onBorderColorChanged: (event: CustomEvent)=> any; - onBorderWidthChanged: (event: CustomEvent)=> any; - onBoxPlotChanged: (event: CustomEvent)=> any; - onCategoriesChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onDisplayInLegendChanged: (event: CustomEvent)=> any; - onDrillingChanged: (event: CustomEvent)=> any; - onLineStyleChanged: (event: CustomEvent)=> any; - onLineTypeChanged: (event: CustomEvent)=> any; - onLineWidthChanged: (event: CustomEvent)=> any; - onMarkerColorChanged: (event: CustomEvent)=> any; - onMarkerDisplayedChanged: (event: CustomEvent)=> any; - onMarkerShapeChanged: (event: CustomEvent)=> any; - onMarkerSizeChanged: (event: CustomEvent)=> any; - onMarkerSvgClassNameChanged: (event: CustomEvent)=> any; - onMarkerSvgStyleChanged: (event: CustomEvent)=> any; - onNameChanged: (event: CustomEvent)=> any; - onPatternChanged: (event: CustomEvent)=> any; - onPieSliceExplodeChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onSourceChanged: (event: CustomEvent)=> any; - onSourceHoverChanged: (event: CustomEvent)=> any; - onSourceHoverSelectedChanged: (event: CustomEvent)=> any; - onSourceSelectedChanged: (event: CustomEvent)=> any; - onStackCategoryChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onTypeChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojChartSeriesEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojChartSeriesEventMap extends oj.JetElementEventMap { - 'areaColorChanged': CustomEvent; - 'areaSvgClassNameChanged': CustomEvent; - 'areaSvgStyleChanged': CustomEvent; - 'assignedToY2Changed': CustomEvent; - 'borderColorChanged': CustomEvent; - 'borderWidthChanged': CustomEvent; - 'boxPlotChanged': CustomEvent; - 'categoriesChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'displayInLegendChanged': CustomEvent; - 'drillingChanged': CustomEvent; - 'lineStyleChanged': CustomEvent; - 'lineTypeChanged': CustomEvent; - 'lineWidthChanged': CustomEvent; - 'markerColorChanged': CustomEvent; - 'markerDisplayedChanged': CustomEvent; - 'markerShapeChanged': CustomEvent; - 'markerSizeChanged': CustomEvent; - 'markerSvgClassNameChanged': CustomEvent; - 'markerSvgStyleChanged': CustomEvent; - 'nameChanged': CustomEvent; - 'patternChanged': CustomEvent; - 'pieSliceExplodeChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'sourceChanged': CustomEvent; - 'sourceHoverChanged': CustomEvent; - 'sourceHoverSelectedChanged': CustomEvent; - 'sourceSelectedChanged': CustomEvent; - 'stackCategoryChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'typeChanged': CustomEvent; - } - interface ojChartSeriesSettableProperties extends JetSettableProperties { - areaColor?: string; - areaSvgClassName?: string; - areaSvgStyle?: object; - assignedToY2?: 'on'|'off'; - borderColor?: string; - borderWidth?: number; - boxPlot?: {medianSvgClassName?: string, medianSvgStyle?: object, q2Color?: string, q2SvgClassName?: string, q2SvgStyle?: object, q3Color?: string, q3SvgClassName?: string, q3SvgStyle?: object, whiskerEndLength?: string, whiskerEndSvgClassName?: string, whiskerEndSvgStyle?: object, whiskerSvgClassName?: string, whiskerSvgStyle?: object}; - categories?: Array; - color?: string; - displayInLegend?: 'on'|'off'|'auto'; - drilling?: 'on'|'off'|'inherit'; - lineStyle?: 'dotted'|'dashed'|'solid'; - lineType?: 'straight'|'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'none'|'auto'; - lineWidth?: number; - markerColor?: string; - markerDisplayed?: 'on'|'off'|'auto'; - markerShape?: 'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'|'auto'|string; - markerSize?: number; - markerSvgClassName?: string; - markerSvgStyle?: object; - name?: string; - pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'auto'; - pieSliceExplode?: number; - shortDesc?: string; - source?: string; - sourceHover?: string; - sourceHoverSelected?: string; - sourceSelected?: string; - stackCategory?: string; - svgClassName?: string; - svgStyle?: object; - type?: 'bar'|'line'|'area'|'lineWithArea'|'candlestick'|'boxPlot'|'auto'; - } - -} -declare namespace oj { - class ojSparkChart extends dvtBaseComponent> { - animationDuration: number|null; - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - areaColor: string; - areaSvgClassName: string; - areaSvgStyle: object; - as: string; - barGapRatio: number; - baselineScaling: 'zero'|'min'; - color: string; - data: oj.DataProvider|null; - firstColor: string; - highColor: string; - lastColor: string; - lineStyle: 'dotted'|'dashed'|'solid'; - lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'none'|'straight'; - lineWidth: number; - lowColor: string; - markerShape: 'square'|'circle'|'diamond'|'plus'|'triangleDown'|'triangleUp'|'human'|'star'|'auto'; - markerSize: number; - referenceObjects: Array; - svgClassName: string; - svgStyle: object; - tooltip: {renderer: ((context: oj.ojSparkChart.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))|null}; - type: 'area'|'lineWithArea'|'bar'|'line'; - visualEffects: 'none'|'auto'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - onAnimationDurationChanged: (event: CustomEvent)=> any; - onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; - onAnimationOnDisplayChanged: (event: CustomEvent)=> any; - onAreaColorChanged: (event: CustomEvent)=> any; - onAreaSvgClassNameChanged: (event: CustomEvent)=> any; - onAreaSvgStyleChanged: (event: CustomEvent)=> any; - onAsChanged: (event: CustomEvent)=> any; - onBarGapRatioChanged: (event: CustomEvent)=> any; - onBaselineScalingChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onDataChanged: (event: CustomEvent)=> any; - onFirstColorChanged: (event: CustomEvent)=> any; - onHighColorChanged: (event: CustomEvent)=> any; - onLastColorChanged: (event: CustomEvent)=> any; - onLineStyleChanged: (event: CustomEvent)=> any; - onLineTypeChanged: (event: CustomEvent)=> any; - onLineWidthChanged: (event: CustomEvent)=> any; - onLowColorChanged: (event: CustomEvent)=> any; - onMarkerShapeChanged: (event: CustomEvent)=> any; - onMarkerSizeChanged: (event: CustomEvent)=> any; - onReferenceObjectsChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onTooltipChanged: (event: CustomEvent)=> any; - onTypeChanged: (event: CustomEvent)=> any; - onVisualEffectsChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojSparkChartEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getDataItem(itemIndex: number): oj.ojSparkChart.ItemContext|null; - } - interface ojSparkChartEventMap extends oj.dvtBaseComponentEventMap { - 'animationDurationChanged': CustomEvent; - 'animationOnDataChangeChanged': CustomEvent; - 'animationOnDisplayChanged': CustomEvent; - 'areaColorChanged': CustomEvent; - 'areaSvgClassNameChanged': CustomEvent; - 'areaSvgStyleChanged': CustomEvent; - 'asChanged': CustomEvent; - 'barGapRatioChanged': CustomEvent; - 'baselineScalingChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'dataChanged': CustomEvent; - 'firstColorChanged': CustomEvent; - 'highColorChanged': CustomEvent; - 'lastColorChanged': CustomEvent; - 'lineStyleChanged': CustomEvent; - 'lineTypeChanged': CustomEvent; - 'lineWidthChanged': CustomEvent; - 'lowColorChanged': CustomEvent; - 'markerShapeChanged': CustomEvent; - 'markerSizeChanged': CustomEvent; - 'referenceObjectsChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'tooltipChanged': CustomEvent; - 'typeChanged': CustomEvent; - 'visualEffectsChanged': CustomEvent; - } - interface ojSparkChartSettableProperties extends dvtBaseComponentSettableProperties { - animationDuration: number|null; - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - areaColor: string; - areaSvgClassName: string; - areaSvgStyle: object; - as: string; - barGapRatio: number; - baselineScaling: 'zero'|'min'; - color: string; - data: oj.DataProvider|null; - firstColor: string; - highColor: string; - lastColor: string; - lineStyle: 'dotted'|'dashed'|'solid'; - lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'none'|'straight'; - lineWidth: number; - lowColor: string; - markerShape: 'square'|'circle'|'diamond'|'plus'|'triangleDown'|'triangleUp'|'human'|'star'|'auto'; - markerSize: number; - referenceObjects: Array; - svgClassName: string; - svgStyle: object; - tooltip: {renderer: ((context: oj.ojSparkChart.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))|null}; - type: 'area'|'lineWithArea'|'bar'|'line'; - visualEffects: 'none'|'auto'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - } - namespace ojSparkChart { - type Item = - { - borderColor: string, color: string, date: Date, high: number, low: number, markerDisplayed: 'on'|'off', markerShape: 'square'|'circle'|'diamond'|'plus'|'triangleDown'|'triangleUp'|'human'|'star'|'auto'|string, markerSize: number, svgClassName: string, svgStyle: object, value: number - } - } - namespace ojSparkChart { - type ItemContext = - { - borderColor: string, color: string, date: Date, high: number, low: number, value: number - } - } - namespace ojSparkChart { - type ReferenceObject = - { - color?: string, high?: number, lineWidth?: number, lineStyle: 'dotted'|'dashed'|'solid', location: 'front'|'back', low?: number, svgClassName?: string, svgStyle?: object, type: 'area'|'line', value?: number - } - } - namespace ojSparkChart { - type TooltipContext = - { - color: string, componentElement: Element, parentElement: Element - } - } - -} -declare namespace oj { - class ojSparkChartItem extends JetElement { - borderColor: string; - color: string; - date: string; - high: number|null; - low: number|null; - markerDisplayed: 'off'|'on'; - markerShape: 'auto'|'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'; - markerSize: number; - svgClassName: string; - svgStyle: object; - value: number|null; - onBorderColorChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onDateChanged: (event: CustomEvent)=> any; - onHighChanged: (event: CustomEvent)=> any; - onLowChanged: (event: CustomEvent)=> any; - onMarkerDisplayedChanged: (event: CustomEvent)=> any; - onMarkerShapeChanged: (event: CustomEvent)=> any; - onMarkerSizeChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojSparkChartItemEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojSparkChartItemEventMap extends oj.JetElementEventMap { - 'borderColorChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'dateChanged': CustomEvent; - 'highChanged': CustomEvent; - 'lowChanged': CustomEvent; - 'markerDisplayedChanged': CustomEvent; - 'markerShapeChanged': CustomEvent; - 'markerSizeChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojSparkChartItemSettableProperties extends JetSettableProperties { - borderColor: string; - color: string; - date: string; - high: number|null; - low: number|null; - markerDisplayed: 'off'|'on'; - markerShape: 'auto'|'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'; - markerSize: number; - svgClassName: string; - svgStyle: object; - value: number|null; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojcheckboxset/index.d.ts b/types/@oracle/oraclejet/ojs/ojcheckboxset/index.d.ts deleted file mode 100644 index 6972efe009..0000000000 --- a/types/@oracle/oraclejet/ojs/ojcheckboxset/index.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -/// -declare namespace oj { - class ojCheckboxset extends editableValue, ojCheckboxsetSettableProperties> { - disabled: boolean; - labelledBy: string|null; - required: boolean; - value: Array; - translations: {required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; - onDisabledChanged: (event: CustomEvent)=> any; - onLabelledByChanged: (event: CustomEvent)=> any; - onRequiredChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojCheckboxset.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojCheckboxset.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojCheckboxsetEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - validate(): Promise; - } - namespace ojCheckboxset { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojCheckboxsetEventMap extends oj.editableValueEventMap { - 'ojAnimateEnd': oj.ojCheckboxset.ojAnimateEnd; - 'ojAnimateStart': oj.ojCheckboxset.ojAnimateStart; - 'disabledChanged': CustomEvent; - 'labelledByChanged': CustomEvent; - 'requiredChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojCheckboxsetSettableProperties extends editableValueSettableProperties> { - disabled: boolean; - labelledBy: string|null; - required: boolean; - value: Array; - translations: {required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojcollapsible/index.d.ts b/types/@oracle/oraclejet/ojs/ojcollapsible/index.d.ts deleted file mode 100644 index 4784d83c1c..0000000000 --- a/types/@oracle/oraclejet/ojs/ojcollapsible/index.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -/// -declare namespace oj { - class ojCollapsible extends baseComponent { - disabled: boolean; - expandArea: 'header'|'disclosureIcon'; - expanded: boolean; - onDisabledChanged: (event: CustomEvent)=> any; - onExpandAreaChanged: (event: CustomEvent)=> any; - onExpandedChanged: (event: CustomEvent)=> any; - onOjBeforeCollapse: (event: oj.ojCollapsible.ojBeforeCollapse)=> any; - onOjBeforeExpand: (event: oj.ojCollapsible.ojBeforeExpand)=> any; - onOjCollapse: (event: oj.ojCollapsible.ojCollapse)=> any; - onOjExpand: (event: oj.ojCollapsible.ojExpand)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojCollapsibleEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - } - namespace ojCollapsible { - class ojBeforeCollapse extends CustomEvent<{header: Element, content: Element, [propName: string]: any}> { - - } - - class ojBeforeExpand extends CustomEvent<{header: Element, content: Element, [propName: string]: any}> { - - } - - class ojCollapse extends CustomEvent<{header: Element, content: Element, [propName: string]: any}> { - - } - - class ojExpand extends CustomEvent<{header: Element, content: Element, [propName: string]: any}> { - - } - } - interface ojCollapsibleEventMap extends oj.baseComponentEventMap { - 'ojBeforeCollapse': oj.ojCollapsible.ojBeforeCollapse; - 'ojBeforeExpand': oj.ojCollapsible.ojBeforeExpand; - 'ojCollapse': oj.ojCollapsible.ojCollapse; - 'ojExpand': oj.ojCollapsible.ojExpand; - 'disabledChanged': CustomEvent; - 'expandAreaChanged': CustomEvent; - 'expandedChanged': CustomEvent; - } - interface ojCollapsibleSettableProperties extends baseComponentSettableProperties { - disabled: boolean; - expandArea: 'header'|'disclosureIcon'; - expanded: boolean; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojcollectiondataprovider/index.d.ts b/types/@oracle/oraclejet/ojs/ojcollectiondataprovider/index.d.ts deleted file mode 100644 index 08bd5b25c8..0000000000 --- a/types/@oracle/oraclejet/ojs/ojcollectiondataprovider/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/// -declare namespace oj { - class CollectionDataProvider implements DataProvider { - constructor(collection: oj.Collection); - addEventListener(eventType: string, listener: EventListener): void - containsKeys(params: FetchByKeysParameters): Promise> - dispatchEvent(evt: Event): boolean - fetchByKeys(params: FetchByKeysParameters): Promise> - fetchByOffset(params: FetchByOffsetParameters): Promise> - fetchFirst>(params?: FetchListParameters): AsyncIterable - getCapability(capabilityName?: string): any - getTotalSize(): Promise; - isEmpty(): 'yes'|'no'|'unknown'; - removeEventListener(eventType: string, listener: EventListener): void - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojcolor/index.d.ts b/types/@oracle/oraclejet/ojs/ojcolor/index.d.ts deleted file mode 100644 index 0c8397621c..0000000000 --- a/types/@oracle/oraclejet/ojs/ojcolor/index.d.ts +++ /dev/null @@ -1,179 +0,0 @@ -declare namespace oj { - class Color { - static ALICEBLUE: oj.Color; - static ANTIQUEWHITE: oj.Color; - static AQUA: oj.Color; - static AQUAMARINE: oj.Color; - static AZURE: oj.Color; - static BEIGE: oj.Color; - static BISQUE: oj.Color; - static BLACK: oj.Color; - static BLANCHEDALMOND: oj.Color; - static BLUE: oj.Color; - static BLUEVIOLET: oj.Color; - static BROWN: oj.Color; - static BURLYWOOD: oj.Color; - static CADETBLUE: oj.Color; - static CHARTREUSE: oj.Color; - static CHOCOLATE: oj.Color; - static CORAL: oj.Color; - static CORNFLOWERBLUE: oj.Color; - static CORNSILK: oj.Color; - static CRIMSON: oj.Color; - static CYAN: oj.Color; - static DARKBLUE: oj.Color; - static DARKCYAN: oj.Color; - static DARKGOLDENROD: oj.Color; - static DARKGRAY: oj.Color; - static DARKGREEN: oj.Color; - static DARKGREY: oj.Color; - static DARKKHAKI: oj.Color; - static DARKMAGENTA: oj.Color; - static DARKOLIVEGREEN: oj.Color; - static DARKORANGE: oj.Color; - static DARKORCHID: oj.Color; - static DARKRED: oj.Color; - static DARKSALMON: oj.Color; - static DARKSEAGREEN: oj.Color; - static DARKSLATEBLUE: oj.Color; - static DARKSLATEGRAY: oj.Color; - static DARKSLATEGREY: oj.Color; - static DARKTURQUOISE: oj.Color; - static DARKVIOLET: oj.Color; - static DEEPPINK: oj.Color; - static DEEPSKYBLUE: oj.Color; - static DIMGRAY: oj.Color; - static DIMGREY: oj.Color; - static DODGERBLUE: oj.Color; - static FIREBRICK: oj.Color; - static FLORALWHITE: oj.Color; - static FORESTGREEN: oj.Color; - static FUCHSIA: oj.Color; - static GAINSBORO: oj.Color; - static GHOSTWHITE: oj.Color; - static GOLD: oj.Color; - static GOLDENROD: oj.Color; - static GRAY: oj.Color; - static GREEN: oj.Color; - static GREENYELLOW: oj.Color; - static GREY: oj.Color; - static HONEYDEW: oj.Color; - static HOTPINK: oj.Color; - static INDIANRED: oj.Color; - static INDIGO: oj.Color; - static IVORY: oj.Color; - static KHAKI: oj.Color; - static LAVENDER: oj.Color; - static LAVENDERBLUSH: oj.Color; - static LAWNGREEN: oj.Color; - static LEMONCHIFFON: oj.Color; - static LIGHTBLUE: oj.Color; - static LIGHTCORAL: oj.Color; - static LIGHTCYAN: oj.Color; - static LIGHTGOLDENRODYELLOW: oj.Color; - static LIGHTGRAY: oj.Color; - static LIGHTGREEN: oj.Color; - static LIGHTGREY: oj.Color; - static LIGHTPINK: oj.Color; - static LIGHTSALMON: oj.Color; - static LIGHTSEAGREEN: oj.Color; - static LIGHTSKYBLUE: oj.Color; - static LIGHTSLATEGRAY: oj.Color; - static LIGHTSLATEGREY: oj.Color; - static LIGHTSTEELBLUE: oj.Color; - static LIGHTYELLOW: oj.Color; - static LIME: oj.Color; - static LIMEGREEN: oj.Color; - static LINEN: oj.Color; - static MAGENTA: oj.Color; - static MAROON: oj.Color; - static MEDIUMAQUAMARINE: oj.Color; - static MEDIUMBLUE: oj.Color; - static MEDIUMORCHID: oj.Color; - static MEDIUMPURPLE: oj.Color; - static MEDIUMSEAGREEN: oj.Color; - static MEDIUMSLATEBLUE: oj.Color; - static MEDIUMSPRINGGREEN: oj.Color; - static MEDIUMTURQUOISE: oj.Color; - static MEDIUMVIOLETRED: oj.Color; - static MIDNIGHTBLUE: oj.Color; - static MINTCREAM: oj.Color; - static MISTYROSE: oj.Color; - static MOCCASIN: oj.Color; - static NAVAJOWHITE: oj.Color; - static NAVY: oj.Color; - static OLDLACE: oj.Color; - static OLIVE: oj.Color; - static OLIVEDRAB: oj.Color; - static ORANGE: oj.Color; - static ORANGERED: oj.Color; - static ORCHID: oj.Color; - static PALEGOLDENROD: oj.Color; - static PALEGREEN: oj.Color; - static PALETURQUOISE: oj.Color; - static PALEVIOLETRED: oj.Color; - static PAPAYAWHIP: oj.Color; - static PEACHPUFF: oj.Color; - static PERU: oj.Color; - static PINK: oj.Color; - static PLUM: oj.Color; - static POWDERBLUE: oj.Color; - static PURPLE: oj.Color; - static REBECCAPURPLE: oj.Color; - static RED: oj.Color; - static ROSYBROWN: oj.Color; - static ROYALBLUE: oj.Color; - static SADDLEBROWN: oj.Color; - static SALMON: oj.Color; - static SANDYBROWN: oj.Color; - static SEAGREEN: oj.Color; - static SEASHELL: oj.Color; - static SIENNA: oj.Color; - static SILVER: oj.Color; - static SKYBLUE: oj.Color; - static SLATEBLUE: oj.Color; - static SLATEGRAY: oj.Color; - static SLATEGREY: oj.Color; - static SNOW: oj.Color; - static SPRINGGREEN: oj.Color; - static STEELBLUE: oj.Color; - static TAN: oj.Color; - static TEAL: oj.Color; - static THISTLE: oj.Color; - static TOMATO: oj.Color; - static TRANSPARENT: oj.Color; - static TURQUOISE: oj.Color; - static VIOLET: oj.Color; - static WHEAT: oj.Color; - static WHITE: oj.Color; - static WHITESMOKE: oj.Color; - static YELLOW: oj.Color; - static YELLOWGREEN: oj.Color; - constructor(color: string|oj.Color.RGBA|oj.Color.HSLA|oj.Color.HSVA); - getAlpha(): number; - getBlue(doNotRound?: boolean): number; - getGreen(doNotRound?: boolean): number; - getRed(doNotRound?: boolean): number; - isEqual(color: oj.Color): boolean; - toString(): string; - } - namespace Color { - type HSLA = - { - h: number, s: number, l: number, a?: number - } - } - namespace Color { - type HSVA = - { - h: number, s: number, v: number, a?: number - } - } - namespace Color { - type RGBA = - { - r: number, g: number, b: number, a?: number - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojcolorpalette/index.d.ts b/types/@oracle/oraclejet/ojs/ojcolorpalette/index.d.ts deleted file mode 100644 index 34aaa0e23e..0000000000 --- a/types/@oracle/oraclejet/ojs/ojcolorpalette/index.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -/// -declare namespace oj { - class ojColorPalette extends editableValue { - labelDisplay: 'auto'|'off'; - labelledBy: string|null; - layout: 'grid'|'list'; - palette: Array<{color: oj.Color, label?: string}>; - swatchSize: 'xs'|'sm'|'lg'; - value: oj.Color; - translations: {labelNone?: string}; - onLabelDisplayChanged: (event: CustomEvent)=> any; - onLabelledByChanged: (event: CustomEvent)=> any; - onLayoutChanged: (event: CustomEvent)=> any; - onPaletteChanged: (event: CustomEvent)=> any; - onSwatchSizeChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojColorPalette.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojColorPalette.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojColorPaletteEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getProperty(property: string): any; - setProperties(properties: object): any; - setProperty(property: string, value: any): any; - } - namespace ojColorPalette { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojColorPaletteEventMap extends oj.editableValueEventMap { - 'ojAnimateEnd': oj.ojColorPalette.ojAnimateEnd; - 'ojAnimateStart': oj.ojColorPalette.ojAnimateStart; - 'labelDisplayChanged': CustomEvent; - 'labelledByChanged': CustomEvent; - 'layoutChanged': CustomEvent; - 'paletteChanged': CustomEvent; - 'swatchSizeChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojColorPaletteSettableProperties extends editableValueSettableProperties { - labelDisplay: 'auto'|'off'; - labelledBy: string|null; - layout: 'grid'|'list'; - palette: Array<{color: oj.Color, label?: string}>; - swatchSize: 'xs'|'sm'|'lg'; - value: oj.Color; - translations: {labelNone?: string}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojcolorspectrum/index.d.ts b/types/@oracle/oraclejet/ojs/ojcolorspectrum/index.d.ts deleted file mode 100644 index f5e8308c9c..0000000000 --- a/types/@oracle/oraclejet/ojs/ojcolorspectrum/index.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -/// -declare namespace oj { - class ojColorSpectrum extends editableValue { - labelledBy: string|null; - readonly transientValue: oj.Color; - value: oj.Color; - translations: {labelHue?: string, labelOpacity?: string, labelSatLum?: string, labelThumbDesc?: string}; - onLabelledByChanged: (event: CustomEvent)=> any; - onTransientValueChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojColorSpectrum.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojColorSpectrum.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojColorSpectrumEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getProperty(property: string): any; - setProperties(properties: object): any; - setProperty(property: string, value: any): any; - } - namespace ojColorSpectrum { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojColorSpectrumEventMap extends oj.editableValueEventMap { - 'ojAnimateEnd': oj.ojColorSpectrum.ojAnimateEnd; - 'ojAnimateStart': oj.ojColorSpectrum.ojAnimateStart; - 'labelledByChanged': CustomEvent; - 'transientValueChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojColorSpectrumSettableProperties extends editableValueSettableProperties { - labelledBy: string|null; - readonly transientValue: oj.Color; - value: oj.Color; - translations: {labelHue?: string, labelOpacity?: string, labelSatLum?: string, labelThumbDesc?: string}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojcomponentcore/index.d.ts b/types/@oracle/oraclejet/ojs/ojcomponentcore/index.d.ts deleted file mode 100644 index 0bb4197939..0000000000 --- a/types/@oracle/oraclejet/ojs/ojcomponentcore/index.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -declare namespace oj { - abstract class baseComponent extends JetElement { - translations: object|null; - - onTranslationsChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: baseComponentEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getProperty(property: string): any; - refresh(): void; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - } - interface baseComponentEventMap extends oj.JetElementEventMap { - 'translationsChanged': CustomEvent; - } - interface baseComponentSettableProperties extends JetSettableProperties { - translations: object|null; - } - -} -declare namespace oj { - class Components { - static subtreeAttached(node: Element): void; - static subtreeDetached(node: Element): void; - static subtreeHidden(node: Element): void; - static subtreeShown(node: Element, options?: {initialRender: boolean}): void; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojcomposite/index.d.ts b/types/@oracle/oraclejet/ojs/ojcomposite/index.d.ts deleted file mode 100644 index aeb13c443b..0000000000 --- a/types/@oracle/oraclejet/ojs/ojcomposite/index.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -declare namespace oj { - namespace Composite { - function getComponentMetadata(name: string): oj.Composite.Metadata|null; - function register(name: string, descriptor: {metadata: oj.Composite.Metadata, view: string, viewModel: ((param0: oj.Composite.ViewModelContext)=> void|object), parseFunction: ((value: string, name: string, meta: Object, defaultParseFunction: (value: string)=> any)=>any)}): void; - } - namespace Composite { - type Metadata = - { - name: string, version: string, jetVersion: string, properties?: object, methods?: object, events?: object, slots?: object - } - } - namespace Composite { - type PropertyChangedContext = - { - property: string, value: any, previousValue: any, updatedFrom: 'external'|'internal', subproperty?: {path: string, value: any, previousValue: any} - } - } - namespace Composite { - type ViewModel = - { - activated: ((param0: oj.Composite.ViewModelContext)=> Promise|void), connected: ((param0: oj.Composite.ViewModelContext)=> void), bindingsApplied: ((param0: oj.Composite.ViewModelContext)=> void), propertyChanged: ((param0: oj.Composite.PropertyChangedContext)=> void), disconnected: ((param0: Element)=> void) - } - } - namespace Composite { - type ViewModelContext = - { - element: Element, properties: object, slotCounts: object, unique: string, uniqueId: string - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojconveyorbelt/index.d.ts b/types/@oracle/oraclejet/ojs/ojconveyorbelt/index.d.ts deleted file mode 100644 index f7463f449e..0000000000 --- a/types/@oracle/oraclejet/ojs/ojconveyorbelt/index.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/// -declare namespace oj { - class ojConveyorBelt extends baseComponent { - contentParent: string|null; - orientation: 'horizontal'|'vertical'; - onContentParentChanged: (event: CustomEvent)=> any; - onOrientationChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojConveyorBeltEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - } - interface ojConveyorBeltEventMap extends oj.baseComponentEventMap { - 'contentParentChanged': CustomEvent; - 'orientationChanged': CustomEvent; - } - interface ojConveyorBeltSettableProperties extends baseComponentSettableProperties { - contentParent: string|null; - orientation: 'horizontal'|'vertical'; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojcore/index.d.ts b/types/@oracle/oraclejet/ojs/ojcore/index.d.ts deleted file mode 100644 index 2d23485157..0000000000 --- a/types/@oracle/oraclejet/ojs/ojcore/index.d.ts +++ /dev/null @@ -1,123 +0,0 @@ -declare namespace oj { - class BusyContext { - static applicationBootstrapComplete(): undefined; - static setDefaultTimeout(timeout: number): undefined; - addBusyState(options: {description: object|(()=> string)}): (()=> void); - clear(): undefined; - dump(message?: string): undefined; - getBusyStates(): Array<{id:string, description:string}>; - isReady(): boolean; - toString(): string; - whenReady(timeout?: number): Promise<(boolean|Error)>; - } - -} -declare namespace oj { - class Config { - static getAutomationMode(): string; - static getDeviceType(): 'phone'|'tablet'|'others'; - static getLocale(): string; - static getResourceUrl(relativePath: string): string; - static getVersionInfo(): string; - static logVersionInfo(): undefined; - static setAutomationMode(mode: string): undefined; - static setLocale(locale: string, callback?: (()=> void)): undefined; - static setResourceBaseUrl(baseUrl: string): undefined; - } - -} -declare namespace oj { - class Context { - static getContext(node: Element): oj.Context; - static getPageContext(): oj.Context; - getBusyContext(): oj.BusyContext; - } - -} -declare namespace oj { - class Logger { - static readonly LEVEL_ERROR: number; - static readonly LEVEL_INFO: number; - static readonly LEVEL_LOG: number; - static readonly LEVEL_NONE: number; - static readonly LEVEL_WARN: number; - static error(...args: (object|string|number)[]): void; - static info(...args: (object|string|number)[]): void; - static log(...args: (object|string|number)[]): void; - static option(key?: object|string, value?: any): any; - static warn(...args: (object|string|number)[]): void; - } - -} -declare namespace oj { - class Object { - constructor(); - static compareValues(obj1: any, obj2: any): boolean; - static copyPropertiesForClass(targetClass: object, source: object): void; - static createCallback(obj: object, func: object): ()=>any; - static createSubclass(extendingClass: object, baseClass: object, typeName?: string): void; - static ensureClassInitialization(clazz: object): void; - static getTypeName(): string; - static isEmpty(): boolean; - clone(): object; - equals(object: object): boolean; - getClass(otherInstance?: object): object; - getTypeName(clazz: object|null): string; - Init(): void; - toDebugString(): string; - toString(): string; - } - -} -declare namespace oj { - class ResponsiveUtils { - static compare(size1: oj.ResponsiveUtils.SCREEN_RANGE, size2: oj.ResponsiveUtils.SCREEN_RANGE): number; - static getFrameworkQuery(frameworkQueryKey: oj.ResponsiveUtils.FRAMEWORK_QUERY_KEY): string|null; - } - namespace ResponsiveUtils { - enum FRAMEWORK_QUERY_KEY { - SM_UP = "sm-up", - MD_UP = "md-up", - LG_UP = "lg-up", - XL_UP = "xl-up", - XXL_UP = "xxl-up", - SM_ONLY = "sm-only", - MD_ONLY = "md-only", - LG_ONLY = "lg-only", - XL_ONLY = "xl-only", - MD_DOWN = "md-down", - LG_DOWN = "lg-down", - XL_DOWN = "xl-down", - HIGH_RESOLUTION = "high-resolution", - } - enum SCREEN_RANGE { - SM = "sm", - MD = "md", - LG = "lg", - XL = "xl", - XXL = "xxl", - } - } - - -} -declare namespace oj { - class ThemeUtils { - constructor(); - static clearCache(): void; - static getThemeName(): string|null; - static getThemeTargetPlatform(): string|null; - static parseJSONFromFontFamily(selector: string): any; - } - -} -declare namespace oj { - class Translations { - static applyParameters(pattern: string, parameters: object|Array): string|null; - static getComponentTranslations(componentName: string): object; - static getResource(key: string): object|string|null; - static getTranslatedString(key: string, ...var_args: (string|object|Array)[]): string; - static setBundle(bundle: object): void; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojdataprovider/index.d.ts b/types/@oracle/oraclejet/ojs/ojdataprovider/index.d.ts deleted file mode 100644 index 45cd10f459..0000000000 --- a/types/@oracle/oraclejet/ojs/ojdataprovider/index.d.ts +++ /dev/null @@ -1,254 +0,0 @@ -declare namespace oj { - interface AttributeFilterOperator { - attribute: string; - op: oj.AttributeFilterOperator.AttributeOperator; - value: any; - } - namespace AttributeFilterOperator { - enum AttributeOperator { - $co, - $eq, - $ew, - $pr, - $gt, - $ge, - $lt, - $le, - $ne, - $regex, - $sw, - } - } - - -} -declare namespace oj { - interface CompoundFilterOperator { - criteria: FilterOperator[]; - op: oj.CompoundFilterOperator.CompoundOperator; - } - namespace CompoundFilterOperator { - enum CompoundOperator { - $and, - $or, - } - } - - -} -declare namespace oj { - interface ContainsKeysResults { - containsParameters: FetchByKeysParameters; - results: Set; - } - -} -declare namespace oj { - interface DataMapping { - mapFields: (item: Item) => Item; - mapFilterCriterion?: (filterCriterion: FilterOperator[]) => FilterOperator[]; - mapSortCriteria?: (sortCriteria: SortCriterion[]) => SortCriterion[]; - unmapSortCriteria?: (sortCriteria: SortCriterion[]) => SortCriterion[]; - } - -} -declare namespace oj { - interface DataProvider extends EventTarget { - containsKeys(parameters : FetchByKeysParameters) : Promise> - fetchByKeys(parameters : FetchByKeysParameters) : Promise> - fetchByOffset(parameters: FetchByOffsetParameters): Promise> - fetchFirst(FetchListParameters?): AsyncIterable> - getCapability(capabilityName: string): any - getTotalSize(): Promise; - isEmpty(): 'yes' | 'no' | 'unknown' - } - -} -declare namespace oj { - interface DataProviderAddOperationEventDetail extends DataProviderOperationEventDetail { - afterKeys?: Set; - } - -} -declare namespace oj { - class DataProviderMutationEvent implements Event { - AT_TARGET: number; - BUBBLING_PHASE: number; - CAPTURING_PHASE: number; - NONE: number; - bubbles: boolean; - cancelBubble: boolean; - cancelable: boolean; - composed: boolean; - currentTarget: EventTarget; - deepPath: () => EventTarget[]; - defaultPrevented: boolean; - detail: DataProviderMutationEventDetail; - eventPhase: number; - initEvent: (eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean) => void; - isTrusted: boolean; - preventDefault: () => void; - returnValue: boolean; - scoped: boolean; - srcElement: Element|null; - stopImmediatePropagation: () => void; - stopPropagation: () => void; - target: EventTarget; - timeStamp: number; - type: string; - constructor(detail: DataProviderMutationEventDetail); - } - -} -declare namespace oj { - interface DataProviderMutationEventDetail { - add?: DataProviderAddOperationEventDetail; - remove?: DataProviderOperationEventDetail; - update?: DataProviderOperationEventDetail; - } - -} -declare namespace oj { - interface DataProviderOperationEventDetail { - data?: D[]; - indexes?: number[]; - keys: Set; - metadata?: ItemMetadata[]; - } - -} -declare namespace oj { - class DataProviderRefreshEvent implements Event { - AT_TARGET: number; - BUBBLING_PHASE: number; - CAPTURING_PHASE: number; - NONE: number; - bubbles: boolean; - cancelBubble: boolean; - cancelable: boolean; - composed: boolean; - currentTarget: EventTarget; - deepPath: () => EventTarget[]; - defaultPrevented: boolean; - eventPhase: number; - initEvent: (eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean) => void; - isTrusted: boolean; - preventDefault: () => void; - returnValue: boolean; - scoped: boolean; - srcElement: Element|null; - stopImmediatePropagation: () => void; - stopPropagation: () => void; - target: EventTarget; - timeStamp: number; - type: string; - constructor(); - } - -} -declare namespace oj { - interface FetchByKeysCapability { - implementation: 'iteration'|'lookup'; - } - -} -declare namespace oj { - class FetchByKeysMixin { - static applyMixin(derivedCtor: Function): any; - } - -} -declare namespace oj { - interface FetchByKeysParameters { - keys: Set; - } - -} -declare namespace oj { - interface FetchByKeysResults { - fetchParameters: FetchByKeysParameters; - results: Map>; - } - -} -declare namespace oj { - interface FetchByOffsetCapability { - implementation: 'iteration'|'randomAccess'; - } - -} -declare namespace oj { - class FetchByOffsetMixin { - static applyMixin(derivedCtor: Function): any; - } - -} -declare namespace oj { - interface FetchByOffsetParameters extends FetchListParameters { - offset: number; - } - -} -declare namespace oj { - interface FetchByOffsetResults { - done: boolean; - fetchParameters: FetchByOffsetParameters; - results: Array>; - } - -} -declare namespace oj { - interface FetchListParameters { - filterCriterion?: FilterOperator; - size: number; - sortCriteria?: SortCriterion[]; - } - -} -declare namespace oj { - interface FetchListResult { - data: D[]; - fetchParameters: FetchListParameters; - metadata: ItemMetadata[]; - } - -} -declare namespace oj { - interface FilterCapability { - operators: Array; - } - -} -declare namespace oj { - interface FilterOperator { - op: oj.AttributeFilterOperator.AttributeOperator|oj.CompoundFilterOperator.CompoundOperator; - filter(data: Array): Array; - } - -} -declare namespace oj { - interface Item { - data: D; - metadata: ItemMetadata; - } - -} -declare namespace oj { - interface ItemMetadata { - key: K; - } - -} -declare namespace oj { - interface SortCapability { - attributes: 'none'|'single'|'multiple'; - } - -} -declare namespace oj { - interface SortCriterion { - attribute: keyof D; - direction: string; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojdatetimepicker/index.d.ts b/types/@oracle/oraclejet/ojs/ojdatetimepicker/index.d.ts deleted file mode 100644 index 707a963de7..0000000000 --- a/types/@oracle/oraclejet/ojs/ojdatetimepicker/index.d.ts +++ /dev/null @@ -1,308 +0,0 @@ -/// -/// -/// -declare namespace oj { - class ojDatePicker extends ojInputDate { - keyboardEdit: 'disabled'; - max: string|null; - min: string|null; - renderMode: 'jet'; - value: string; - onKeyboardEditChanged: (event: CustomEvent)=> any; - onMaxChanged: (event: CustomEvent)=> any; - onMinChanged: (event: CustomEvent)=> any; - onRenderModeChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojDatePicker.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojDatePicker.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojDatePickerEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojDatePicker { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojDatePickerEventMap extends oj.ojInputDateEventMap { - 'ojAnimateEnd': oj.ojDatePicker.ojAnimateEnd; - 'ojAnimateStart': oj.ojDatePicker.ojAnimateStart; - 'keyboardEditChanged': CustomEvent; - 'maxChanged': CustomEvent; - 'minChanged': CustomEvent; - 'renderModeChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojDatePickerSettableProperties extends ojInputDateSettableProperties { - keyboardEdit: 'disabled'; - max: string|null; - min: string|null; - renderMode: 'jet'; - value: string; - } - -} -declare namespace oj { - class ojDateTimePicker extends ojInputDateTime { - keyboardEdit: 'disabled'; - max: string|null; - min: string|null; - renderMode: 'jet'; - value: string; - onKeyboardEditChanged: (event: CustomEvent)=> any; - onMaxChanged: (event: CustomEvent)=> any; - onMinChanged: (event: CustomEvent)=> any; - onRenderModeChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojDateTimePicker.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojDateTimePicker.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojDateTimePickerEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojDateTimePicker { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojDateTimePickerEventMap extends oj.ojInputDateTimeEventMap { - 'ojAnimateEnd': oj.ojDateTimePicker.ojAnimateEnd; - 'ojAnimateStart': oj.ojDateTimePicker.ojAnimateStart; - 'keyboardEditChanged': CustomEvent; - 'maxChanged': CustomEvent; - 'minChanged': CustomEvent; - 'renderModeChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojDateTimePickerSettableProperties extends ojInputDateTimeSettableProperties { - keyboardEdit: 'disabled'; - max: string|null; - min: string|null; - renderMode: 'jet'; - value: string; - } - -} -declare namespace oj { - class ojInputDate extends inputBase { - converter: oj.Converter|oj.Validation.RegisteredConverter; - datePicker: {changeMonth: 'select'|'none', changeYear: 'select'|'none', currentMonthPos: number, daysOutsideMonth: 'hidden'|'visible'|'selectable', footerLayout: ''|'today', numberOfMonths: number, showOn: 'focus'|'image', stepBigMonths: number, stepMonths: 'numberOfMonths'|number, weekDisplay: 'number'|'none', yearRange: string}; - dayFormatter: (param: oj.ojInputDate.DayFormatterInput)=> (null|'all'|oj.ojInputDate.DayFormatterOutput); - dayMetaData: {[key:string]: {[key:string]: {[key:string]: {disabled?: boolean, className?: string, tooltip?: string}}}}; - keyboardEdit: 'enabled'|'disabled'; - max: string|null; - min: string|null; - pickerAttributes: {style?: string, class?: string}; - renderMode: 'jet'|'native'; - validators: Array|oj.Validation.RegisteredValidator>; - value: string; - translations: {currentText?: string, dateRestriction?: {hint?: string, messageDetail?: string, messageSummary?: string}, dateTimeRange?: {hint?: {inRange?: string, max?: string, min?: string}, messageDetail?: {rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, nextText?: string, prevText?: string, regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipCalendar?: string, tooltipCalendarDisabled?: string, tooltipCalendarTime?: string, tooltipCalendarTimeDisabled?: string, weekHeader?: string}; - onConverterChanged: (event: CustomEvent)=> any; - onDatePickerChanged: (event: CustomEvent)=> any; - onDayFormatterChanged: (event: CustomEvent)=> any; - onDayMetaDataChanged: (event: CustomEvent)=> any; - onKeyboardEditChanged: (event: CustomEvent)=> any; - onMaxChanged: (event: CustomEvent)=> any; - onMinChanged: (event: CustomEvent)=> any; - onPickerAttributesChanged: (event: CustomEvent)=> any; - onRenderModeChanged: (event: CustomEvent)=> any; - onValidatorsChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojInputDate.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojInputDate.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputDateEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - hide(): void; - refresh(): void; - show(): void; - } - namespace ojInputDate { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojInputDateEventMap extends oj.inputBaseEventMap { - 'ojAnimateEnd': oj.ojInputDate.ojAnimateEnd; - 'ojAnimateStart': oj.ojInputDate.ojAnimateStart; - 'converterChanged': CustomEvent; - 'datePickerChanged': CustomEvent; - 'dayFormatterChanged': CustomEvent; - 'dayMetaDataChanged': CustomEvent; - 'keyboardEditChanged': CustomEvent; - 'maxChanged': CustomEvent; - 'minChanged': CustomEvent; - 'pickerAttributesChanged': CustomEvent; - 'renderModeChanged': CustomEvent; - 'validatorsChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojInputDateSettableProperties extends inputBaseSettableProperties { - converter: oj.Converter|oj.Validation.RegisteredConverter; - datePicker: {changeMonth: 'select'|'none', changeYear: 'select'|'none', currentMonthPos: number, daysOutsideMonth: 'hidden'|'visible'|'selectable', footerLayout: ''|'today', numberOfMonths: number, showOn: 'focus'|'image', stepBigMonths: number, stepMonths: 'numberOfMonths'|number, weekDisplay: 'number'|'none', yearRange: string}; - dayFormatter: (param: oj.ojInputDate.DayFormatterInput)=> (null|'all'|oj.ojInputDate.DayFormatterOutput); - dayMetaData: {[key:string]: {[key:string]: {[key:string]: {disabled?: boolean, className?: string, tooltip?: string}}}}; - keyboardEdit: 'enabled'|'disabled'; - max: string|null; - min: string|null; - pickerAttributes: {style?: string, class?: string}; - renderMode: 'jet'|'native'; - validators: Array|oj.Validation.RegisteredValidator>; - value: string; - translations: {currentText?: string, dateRestriction?: {hint?: string, messageDetail?: string, messageSummary?: string}, dateTimeRange?: {hint?: {inRange?: string, max?: string, min?: string}, messageDetail?: {rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, nextText?: string, prevText?: string, regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipCalendar?: string, tooltipCalendarDisabled?: string, tooltipCalendarTime?: string, tooltipCalendarTimeDisabled?: string, weekHeader?: string}; - } - namespace ojInputDate { - type DayFormatterInput = - { - fullYear: number, month: number, date: number - } - } - namespace ojInputDate { - type DayFormatterOutput = - { - disabled?: boolean, className?: string, tooltip?: string - } - } - -} -declare namespace oj { - class ojInputDateTime extends ojInputDate { - converter: oj.Converter|oj.Validation.RegisteredConverter; - max: string|null; - min: string|null; - renderMode: 'jet'|'native'; - timePicker: {footerLayout: ''|'now', showOn: 'focus'|'image', timeIncrement: string}; - validators: Array|oj.Validation.RegisteredValidator>; - value: string; - translations: {cancel?: string, currentText?: string, dateRestriction?: {hint?: string, messageDetail?: string, messageSummary?: string}, dateTimeRange?: {hint?: {inRange?: string, max?: string, min?: string}, messageDetail?: {rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, done?: string, nextText?: string, prevText?: string, regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipCalendar?: string, tooltipCalendarDisabled?: string, tooltipCalendarTime?: string, tooltipCalendarTimeDisabled?: string, weekHeader?: string}; - onConverterChanged: (event: CustomEvent)=> any; - onMaxChanged: (event: CustomEvent)=> any; - onMinChanged: (event: CustomEvent)=> any; - onRenderModeChanged: (event: CustomEvent)=> any; - onTimePickerChanged: (event: CustomEvent)=> any; - onValidatorsChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojInputDateTime.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojInputDateTime.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputDateTimeEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - hideTimePicker(): void; - show(): void; - showTimePicker(): void; - } - namespace ojInputDateTime { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojInputDateTimeEventMap extends oj.ojInputDateEventMap { - 'ojAnimateEnd': oj.ojInputDateTime.ojAnimateEnd; - 'ojAnimateStart': oj.ojInputDateTime.ojAnimateStart; - 'converterChanged': CustomEvent; - 'maxChanged': CustomEvent; - 'minChanged': CustomEvent; - 'renderModeChanged': CustomEvent; - 'timePickerChanged': CustomEvent; - 'validatorsChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojInputDateTimeSettableProperties extends ojInputDateSettableProperties { - converter: oj.Converter|oj.Validation.RegisteredConverter; - max: string|null; - min: string|null; - renderMode: 'jet'|'native'; - timePicker: {footerLayout: ''|'now', showOn: 'focus'|'image', timeIncrement: string}; - validators: Array|oj.Validation.RegisteredValidator>; - value: string; - translations: {cancel?: string, currentText?: string, dateRestriction?: {hint?: string, messageDetail?: string, messageSummary?: string}, dateTimeRange?: {hint?: {inRange?: string, max?: string, min?: string}, messageDetail?: {rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, done?: string, nextText?: string, prevText?: string, regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipCalendar?: string, tooltipCalendarDisabled?: string, tooltipCalendarTime?: string, tooltipCalendarTimeDisabled?: string, weekHeader?: string}; - } - -} -declare namespace oj { - class ojInputTime extends inputBase { - converter: oj.Converter|oj.Validation.RegisteredConverter; - keyboardEdit: 'enabled'|'disabled'; - max: string|null; - min: string|null; - pickerAttributes: {style?: string, class?: string}; - renderMode: 'jet'|'native'; - timePicker: {footerLayout: ''|'now', showOn: 'focus'|'image', timeIncrement: string}; - validators: Array|oj.Validation.RegisteredValidator>; - value: string; - translations: {ampmWheelLabel?: string, cancelText?: string, currentTimeText?: string, dateTimeRange?: {hint?: {inRange?: string, max?: string, min?: string}, messageDetail?: {rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, hourWheelLabel?: string, minuteWheelLabel?: string, okText?: string, regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipTime?: string, tooltipTimeDisabled?: string}; - onConverterChanged: (event: CustomEvent)=> any; - onKeyboardEditChanged: (event: CustomEvent)=> any; - onMaxChanged: (event: CustomEvent)=> any; - onMinChanged: (event: CustomEvent)=> any; - onPickerAttributesChanged: (event: CustomEvent)=> any; - onRenderModeChanged: (event: CustomEvent)=> any; - onTimePickerChanged: (event: CustomEvent)=> any; - onValidatorsChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojInputTime.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojInputTime.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputTimeEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - hide(): void; - refresh(): void; - show(): void; - } - namespace ojInputTime { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojInputTimeEventMap extends oj.inputBaseEventMap { - 'ojAnimateEnd': oj.ojInputTime.ojAnimateEnd; - 'ojAnimateStart': oj.ojInputTime.ojAnimateStart; - 'converterChanged': CustomEvent; - 'keyboardEditChanged': CustomEvent; - 'maxChanged': CustomEvent; - 'minChanged': CustomEvent; - 'pickerAttributesChanged': CustomEvent; - 'renderModeChanged': CustomEvent; - 'timePickerChanged': CustomEvent; - 'validatorsChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojInputTimeSettableProperties extends inputBaseSettableProperties { - converter: oj.Converter|oj.Validation.RegisteredConverter; - keyboardEdit: 'enabled'|'disabled'; - max: string|null; - min: string|null; - pickerAttributes: {style?: string, class?: string}; - renderMode: 'jet'|'native'; - timePicker: {footerLayout: ''|'now', showOn: 'focus'|'image', timeIncrement: string}; - validators: Array|oj.Validation.RegisteredValidator>; - value: string; - translations: {ampmWheelLabel?: string, cancelText?: string, currentTimeText?: string, dateTimeRange?: {hint?: {inRange?: string, max?: string, min?: string}, messageDetail?: {rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, hourWheelLabel?: string, minuteWheelLabel?: string, okText?: string, regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipTime?: string, tooltipTimeDisabled?: string}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojdefer/index.d.ts b/types/@oracle/oraclejet/ojs/ojdefer/index.d.ts deleted file mode 100644 index 7672ac8a35..0000000000 --- a/types/@oracle/oraclejet/ojs/ojdefer/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -declare namespace oj { - class ojDefer extends JetElement { - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojDeferEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojDeferEventMap extends oj.JetElementEventMap { - } - interface ojDeferSettableProperties extends JetSettableProperties { - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojdeferreddataprovider/index.d.ts b/types/@oracle/oraclejet/ojs/ojdeferreddataprovider/index.d.ts deleted file mode 100644 index 0df017ec3c..0000000000 --- a/types/@oracle/oraclejet/ojs/ojdeferreddataprovider/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/// -declare namespace oj { - class DeferredDataProvider implements DataProvider { - constructor(dataProvider: Promise>[], capabilityFunc: Function); - addEventListener(eventType: string, listener: EventListener): any; - containsKeys(params: FetchByKeysParameters): Promise> - dispatchEvent(evt: Event): boolean; - fetchByKeys(params: FetchByKeysParameters): Promise> - fetchByOffset(params: FetchByOffsetParameters): Promise> - fetchFirst>(params?: FetchListParameters): AsyncIterable - getCapability(capabilityName: string): object; - getTotalSize(): Promise; - isEmpty(): 'yes'|'no'|'unknown'; - removeEventListener(eventType: string, listener: EventListener): any; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojdialog/index.d.ts b/types/@oracle/oraclejet/ojs/ojdialog/index.d.ts deleted file mode 100644 index 85ea4be39c..0000000000 --- a/types/@oracle/oraclejet/ojs/ojdialog/index.d.ts +++ /dev/null @@ -1,127 +0,0 @@ -/// -declare namespace oj { - class ojDialog extends baseComponent { - cancelBehavior: 'icon'|'escape'|'none'; - dragAffordance: 'title-bar'|'none'; - initialVisibility: 'hide'|'show'; - modality: 'modal'|'modeless'; - position: oj.ojDialog.Position; - resizeBehavior: 'resizable'|'none'; - role: string; - translations: {labelCloseIcon?: string}; - onCancelBehaviorChanged: (event: CustomEvent)=> any; - onDragAffordanceChanged: (event: CustomEvent)=> any; - onInitialVisibilityChanged: (event: CustomEvent)=> any; - onModalityChanged: (event: CustomEvent)=> any; - onPositionChanged: (event: CustomEvent)=> any; - onResizeBehaviorChanged: (event: CustomEvent)=> any; - onRoleChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojDialog.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojDialog.ojAnimateStart)=> any; - onOjBeforeClose: (event: oj.ojDialog.ojBeforeClose)=> any; - onOjBeforeOpen: (event: oj.ojDialog.ojBeforeOpen)=> any; - onOjClose: (event: oj.ojDialog.ojClose)=> any; - onOjFocus: (event: oj.ojDialog.ojFocus)=> any; - onOjOpen: (event: oj.ojDialog.ojOpen)=> any; - onOjResize: (event: oj.ojDialog.ojResize)=> any; - onOjResizeStart: (event: oj.ojDialog.ojResizeStart)=> any; - onOjResizeStop: (event: oj.ojDialog.ojResizeStop)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojDialogEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - close(): void; - isOpen(): boolean; - open(): void; - refresh(): void; - } - namespace ojDialog { - class ojAnimateEnd extends CustomEvent<{element: Element, action: 'open'|'close', [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: 'open'|'close', element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - - class ojBeforeClose extends CustomEvent<{event: Event, [propName: string]: any}> { - - } - - class ojBeforeOpen extends CustomEvent<{event: Event, [propName: string]: any}> { - - } - - class ojClose extends CustomEvent<{event: Event, [propName: string]: any}> { - - } - - class ojFocus extends CustomEvent<{event: Event, [propName: string]: any}> { - - } - - class ojOpen extends CustomEvent<{event: Event, [propName: string]: any}> { - - } - - class ojResize extends CustomEvent<{event: Event, [propName: string]: any}> { - - } - - class ojResizeStart extends CustomEvent<{event: Event, [propName: string]: any}> { - - } - - class ojResizeStop extends CustomEvent<{event: Event, [propName: string]: any}> { - - } - } - interface ojDialogEventMap extends oj.baseComponentEventMap { - 'ojAnimateEnd': oj.ojDialog.ojAnimateEnd; - 'ojAnimateStart': oj.ojDialog.ojAnimateStart; - 'ojBeforeClose': oj.ojDialog.ojBeforeClose; - 'ojBeforeOpen': oj.ojDialog.ojBeforeOpen; - 'ojClose': oj.ojDialog.ojClose; - 'ojFocus': oj.ojDialog.ojFocus; - 'ojOpen': oj.ojDialog.ojOpen; - 'ojResize': oj.ojDialog.ojResize; - 'ojResizeStart': oj.ojDialog.ojResizeStart; - 'ojResizeStop': oj.ojDialog.ojResizeStop; - 'cancelBehaviorChanged': CustomEvent; - 'dragAffordanceChanged': CustomEvent; - 'initialVisibilityChanged': CustomEvent; - 'modalityChanged': CustomEvent; - 'positionChanged': CustomEvent; - 'resizeBehaviorChanged': CustomEvent; - 'roleChanged': CustomEvent; - } - interface ojDialogSettableProperties extends baseComponentSettableProperties { - cancelBehavior: 'icon'|'escape'|'none'; - dragAffordance: 'title-bar'|'none'; - initialVisibility: 'hide'|'show'; - modality: 'modal'|'modeless'; - position: oj.ojDialog.Position; - resizeBehavior: 'resizable'|'none'; - role: string; - translations: {labelCloseIcon?: string}; - } - namespace ojDialog { - type Position = - { - my?: oj.ojDialog.PositionAlign, at?: oj.ojDialog.PositionAlign, offset?: oj.ojDialog.PositionPoint, of?: string|oj.ojDialog.PositionPoint, collision?: 'flip'|'fit'|'flipfit'|'none' - } - } - namespace ojDialog { - type PositionAlign = - { - vertical?: 'top'|'bottom'|'center', horizontal?: 'start'|'end'|'left'|'center'|'bottom' - } - } - namespace ojDialog { - type PositionPoint = - { - x?: number, y?: number - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojdvt-base/index.d.ts b/types/@oracle/oraclejet/ojs/ojdvt-base/index.d.ts deleted file mode 100644 index 9624749ed1..0000000000 --- a/types/@oracle/oraclejet/ojs/ojdvt-base/index.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/// -declare namespace oj { - abstract class dvtBaseComponent extends baseComponent { - trackResize: 'on'|'off'; - translations: {labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - onTrackResizeChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: dvtBaseComponentEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface dvtBaseComponentEventMap extends oj.baseComponentEventMap { - 'trackResizeChanged': CustomEvent; - } - interface dvtBaseComponentSettableProperties extends baseComponentSettableProperties { - trackResize: 'on'|'off'; - translations: {labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojeditablevalue/index.d.ts b/types/@oracle/oraclejet/ojs/ojeditablevalue/index.d.ts deleted file mode 100644 index 63176945d9..0000000000 --- a/types/@oracle/oraclejet/ojs/ojeditablevalue/index.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -/// -/// -declare namespace oj { - abstract class editableValue, SV= V, RV= V> extends baseComponent { - describedBy: string|null; - disabled: boolean; - displayOptions: {converterHint: Array<'placeholder'|'notewindow'|'none'>|'placeholder'|'notewindow'|'none', helpInstruction: Array<'notewindow'|'none'>|'notewindow'|'none', messages: Array<'inline'|'notewindow'|'none'>|'inline'|'notewindow'|'none', validatorHint: Array<'notewindow'|'none'>|'notewindow'|'none'}; - help: {instruction?: string}; - helpHints: {definition?: string, source?: string}; - labelHint: string; - messagesCustom: Array; - readonly valid: 'valid'|'pending'|'invalidHidden'|'invalidShown'; - value: V; - onDescribedByChanged: (event: CustomEvent)=> any; - onDisabledChanged: (event: CustomEvent)=> any; - onDisplayOptionsChanged: (event: CustomEvent)=> any; - onHelpChanged: (event: CustomEvent)=> any; - onHelpHintsChanged: (event: CustomEvent)=> any; - onLabelHintChanged: (event: CustomEvent)=> any; - onMessagesCustomChanged: (event: CustomEvent)=> any; - onValidChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.editableValue.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.editableValue.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: editableValueEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - reset(): void; - showMessages(): void; - } - namespace editableValue { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface editableValueEventMap extends oj.baseComponentEventMap { - 'ojAnimateEnd': oj.editableValue.ojAnimateEnd; - 'ojAnimateStart': oj.editableValue.ojAnimateStart; - 'describedByChanged': CustomEvent; - 'disabledChanged': CustomEvent; - 'displayOptionsChanged': CustomEvent; - 'helpChanged': CustomEvent; - 'helpHintsChanged': CustomEvent; - 'labelHintChanged': CustomEvent; - 'messagesCustomChanged': CustomEvent; - 'validChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface editableValueSettableProperties extends baseComponentSettableProperties { - describedBy: string|null; - disabled: boolean; - displayOptions: {converterHint: Array<'placeholder'|'notewindow'|'none'>|'placeholder'|'notewindow'|'none', helpInstruction: Array<'notewindow'|'none'>|'notewindow'|'none', messages: Array<'inline'|'notewindow'|'none'>|'inline'|'notewindow'|'none', validatorHint: Array<'notewindow'|'none'>|'notewindow'|'none'}; - help: {instruction?: string}; - helpHints: {definition?: string, source?: string}; - labelHint: string; - messagesCustom: Array; - readonly valid: 'valid'|'pending'|'invalidHidden'|'invalidShown'; - value: SV; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojfilepicker/index.d.ts b/types/@oracle/oraclejet/ojs/ojfilepicker/index.d.ts deleted file mode 100644 index dbcfec3632..0000000000 --- a/types/@oracle/oraclejet/ojs/ojfilepicker/index.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -/// -/// -declare namespace oj { - interface FileUploadTransport { - flush(): void; - queue(fileList: FileList): Array; - } - -} -declare namespace oj { - class ojFilePicker extends JetElement { - accept: Array|null; - selectOn: 'auto'|'click'|'drop'|'clickAndDrop'; - selectionMode: 'multiple'|'single'; - onAcceptChanged: (event: CustomEvent)=> any; - onSelectOnChanged: (event: CustomEvent)=> any; - onSelectionModeChanged: (event: CustomEvent)=> any; - onOjSelect: (event: oj.ojFilePicker.ojSelect)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojFilePickerEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getProperty(property: string): any; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - } - namespace ojFilePicker { - class ojSelect extends CustomEvent<{files: FileList, [propName: string]: any}> { - - } - } - interface ojFilePickerEventMap extends oj.JetElementEventMap { - 'ojSelect': oj.ojFilePicker.ojSelect; - 'acceptChanged': CustomEvent; - 'selectOnChanged': CustomEvent; - 'selectionModeChanged': CustomEvent; - } - interface ojFilePickerSettableProperties extends JetSettableProperties { - accept: Array|null; - selectOn: 'auto'|'click'|'drop'|'clickAndDrop'; - selectionMode: 'multiple'|'single'; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojfilmstrip/index.d.ts b/types/@oracle/oraclejet/ojs/ojfilmstrip/index.d.ts deleted file mode 100644 index 5287e1be53..0000000000 --- a/types/@oracle/oraclejet/ojs/ojfilmstrip/index.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -/// -declare namespace oj { - class ojFilmStrip extends baseComponent { - arrowPlacement: 'adjacent'|'overlay'; - arrowVisibility: 'visible'|'hidden'|'hover'|'auto'; - currentItem: {id?: string, index?: number}; - looping: 'off'|'page'; - maxItemsPerPage: number; - orientation: 'horizontal'|'vertical'; - translations: {labelAccArrowNextPage?: string, labelAccArrowPreviousPage?: string, labelAccFilmStrip?: string, tipArrowNextPage?: string, tipArrowPreviousPage?: string}; - onArrowPlacementChanged: (event: CustomEvent)=> any; - onArrowVisibilityChanged: (event: CustomEvent)=> any; - onCurrentItemChanged: (event: CustomEvent)=> any; - onLoopingChanged: (event: CustomEvent)=> any; - onMaxItemsPerPageChanged: (event: CustomEvent)=> any; - onOrientationChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojFilmStripEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getItemsPerPage(): number; - refresh(): void; - } - interface ojFilmStripEventMap extends oj.baseComponentEventMap { - 'arrowPlacementChanged': CustomEvent; - 'arrowVisibilityChanged': CustomEvent; - 'currentItemChanged': CustomEvent; - 'loopingChanged': CustomEvent; - 'maxItemsPerPageChanged': CustomEvent; - 'orientationChanged': CustomEvent; - } - interface ojFilmStripSettableProperties extends baseComponentSettableProperties { - arrowPlacement: 'adjacent'|'overlay'; - arrowVisibility: 'visible'|'hidden'|'hover'|'auto'; - currentItem: {id?: string, index?: number}; - looping: 'off'|'page'; - maxItemsPerPage: number; - orientation: 'horizontal'|'vertical'; - translations: {labelAccArrowNextPage?: string, labelAccArrowPreviousPage?: string, labelAccFilmStrip?: string, tipArrowNextPage?: string, tipArrowPreviousPage?: string}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojformlayout/index.d.ts b/types/@oracle/oraclejet/ojs/ojformlayout/index.d.ts deleted file mode 100644 index 4487a1baa7..0000000000 --- a/types/@oracle/oraclejet/ojs/ojformlayout/index.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -declare namespace oj { - class ojFormLayout extends JetElement { - direction: 'column'|'row'; - labelEdge: 'start'|'top'; - labelWidth: string; - labelWrapping: 'truncate'|'wrap'; - maxColumns: number; - onDirectionChanged: (event: CustomEvent)=> any; - onLabelEdgeChanged: (event: CustomEvent)=> any; - onLabelWidthChanged: (event: CustomEvent)=> any; - onLabelWrappingChanged: (event: CustomEvent)=> any; - onMaxColumnsChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojFormLayoutEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getProperty(property: string): any; - refresh(): void; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - } - interface ojFormLayoutEventMap extends oj.JetElementEventMap { - 'directionChanged': CustomEvent; - 'labelEdgeChanged': CustomEvent; - 'labelWidthChanged': CustomEvent; - 'labelWrappingChanged': CustomEvent; - 'maxColumnsChanged': CustomEvent; - } - interface ojFormLayoutSettableProperties extends JetSettableProperties { - direction: 'column'|'row'; - labelEdge: 'start'|'top'; - labelWidth: string; - labelWrapping: 'truncate'|'wrap'; - maxColumns: number; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojgantt/index.d.ts b/types/@oracle/oraclejet/ojs/ojgantt/index.d.ts deleted file mode 100644 index 86b2f26147..0000000000 --- a/types/@oracle/oraclejet/ojs/ojgantt/index.d.ts +++ /dev/null @@ -1,286 +0,0 @@ -/// -/// -declare namespace oj { - class ojGantt extends dvtTimeComponent> { - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - as: string; - axisPosition: 'bottom'|'top'; - dependencyData?: (oj.DataProvider); - dnd: {move?: {tasks?: 'disabled'|'enabled'}}; - end: string; - gridlines: {horizontal?: 'hidden'|'visible'|'auto', vertical?: 'hidden'|'visible'|'auto'}; - majorAxis: {converter?: (oj.ojTimeAxis.Converter|oj.Converter), height?: number, scale: 'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'quarters'|'years', zoomOrder?: Array}; - minorAxis: {converter?: (oj.ojTimeAxis.Converter|oj.Converter), height?: number, scale: 'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'quarters'|'years', zoomOrder?: Array}; - referenceObjects: Array; - rowAxis: {label?: {renderer: ((context: oj.ojGantt.RowAxisLabelRendererContext) => ({insert: Element}))}, maxWidth?: string, rendered?: 'on'|'off', width?: string}; - rowDefaults: {height?: number}; - scrollPosition: {offsetY?: number, rowIndex?: number, y?: number}; - selection: Array; - selectionMode: 'single'|'multiple'|'none'; - start: string; - taskData?: (oj.DataProvider); - taskDefaults: {baseline?: {borderRadius?: string, height?: number, svgClassName?: string, svgStyle?: object}, borderRadius?: string, height?: number, labelPosition?: (string|Array), progress?: {borderRadius?: string, height?: string, svgClassName?: string, svgStyle?: object}, svgClassName?: string, svgStyle?: object, type?: 'normal'|'milestone'|'summary'|'auto'}; - tooltip: {renderer: ((context: oj.ojGantt.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - valueFormats: {baselineDate?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, baselineEnd?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, baselineStart?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, date?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, end?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, label?: {tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, progress?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, row?: {tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, start?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}}; - viewportEnd: string; - viewportStart: string; - translations: {accessibleDependencyInfo?: string, accessiblePredecessorInfo?: string, accessibleSuccessorInfo?: string, accessibleTaskTypeMilestone?: string, accessibleTaskTypeSummary?: string, componentName?: string, finishFinishDependencyAriaDesc?: string, finishStartDependencyAriaDesc?: string, labelAndValue?: string, labelBaselineDate?: string, labelBaselineEnd?: string, labelBaselineStart?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelDate?: string, labelEnd?: string, labelInvalidData?: string, labelLabel?: string, labelMoveBy?: string, labelNoData?: string, labelProgress?: string, labelRow?: string, labelStart?: string, startFinishDependencyAriaDesc?: string, startStartDependencyAriaDesc?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, taskMoveCancelled?: string, taskMoveFinalized?: string, taskMoveInitiated?: string, taskMoveInitiatedInstruction?: string, taskMoveSelectionInfo?: string, tooltipZoomIn?: string, tooltipZoomOut?: string}; - onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; - onAnimationOnDisplayChanged: (event: CustomEvent)=> any; - onAsChanged: (event: CustomEvent)=> any; - onAxisPositionChanged: (event: CustomEvent)=> any; - onDependencyDataChanged: (event: CustomEvent)=> any; - onDndChanged: (event: CustomEvent)=> any; - onEndChanged: (event: CustomEvent)=> any; - onGridlinesChanged: (event: CustomEvent)=> any; - onMajorAxisChanged: (event: CustomEvent)=> any; - onMinorAxisChanged: (event: CustomEvent)=> any; - onReferenceObjectsChanged: (event: CustomEvent)=> any; - onRowAxisChanged: (event: CustomEvent)=> any; - onRowDefaultsChanged: (event: CustomEvent)=> any; - onScrollPositionChanged: (event: CustomEvent)=> any; - onSelectionChanged: (event: CustomEvent)=> any; - onSelectionModeChanged: (event: CustomEvent)=> any; - onStartChanged: (event: CustomEvent)=> any; - onTaskDataChanged: (event: CustomEvent)=> any; - onTaskDefaultsChanged: (event: CustomEvent)=> any; - onTooltipChanged: (event: CustomEvent)=> any; - onValueFormatsChanged: (event: CustomEvent)=> any; - onViewportEndChanged: (event: CustomEvent)=> any; - onViewportStartChanged: (event: CustomEvent)=> any; - onOjMove: (event: oj.ojGantt.ojMove)=> any; - onOjViewportChange: (event: oj.ojGantt.ojViewportChange)=> any; - - addEventListener>(type: T, listener: (this: HTMLElement, ev: ojGanttEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getContextByNode(node: Element): {subId: 'oj-gantt-row-label', index: number} | {subId: 'oj-gantt-taskbar', rowIndex: number, index: number} | null; - } - namespace ojGantt { - class ojMove extends CustomEvent<{taskContexts: Array<{data: oj.ojGantt.RowTask, rowData: oj.ojGantt.Row, itemData: D2|null, color: string}>, value: string, start: string, end: string, baselineStart: string, baselineEnd: string, rowContext: {rowData: oj.ojGantt.Row, componentElement: Element}, [propName: string]: any}> { - - } - - class ojViewportChange extends CustomEvent<{viewportStart: string, viewportEnd: string, majorAxisScale: string, minorAxisScale: string, [propName: string]: any}> { - - } - } - interface ojGanttEventMap extends oj.dvtTimeComponentEventMap { - 'ojMove': oj.ojGantt.ojMove; - 'ojViewportChange': oj.ojGantt.ojViewportChange; - 'animationOnDataChangeChanged': CustomEvent; - 'animationOnDisplayChanged': CustomEvent; - 'asChanged': CustomEvent; - 'axisPositionChanged': CustomEvent; - 'dependencyDataChanged': CustomEvent; - 'dndChanged': CustomEvent; - 'endChanged': CustomEvent; - 'gridlinesChanged': CustomEvent; - 'majorAxisChanged': CustomEvent; - 'minorAxisChanged': CustomEvent; - 'referenceObjectsChanged': CustomEvent; - 'rowAxisChanged': CustomEvent; - 'rowDefaultsChanged': CustomEvent; - 'scrollPositionChanged': CustomEvent; - 'selectionChanged': CustomEvent; - 'selectionModeChanged': CustomEvent; - 'startChanged': CustomEvent; - 'taskDataChanged': CustomEvent; - 'taskDefaultsChanged': CustomEvent; - 'tooltipChanged': CustomEvent; - 'valueFormatsChanged': CustomEvent; - 'viewportEndChanged': CustomEvent; - 'viewportStartChanged': CustomEvent; - } - interface ojGanttSettableProperties extends dvtTimeComponentSettableProperties { - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - as: string; - axisPosition: 'bottom'|'top'; - dependencyData?: (oj.DataProvider); - dnd: {move?: {tasks?: 'disabled'|'enabled'}}; - end: string; - gridlines: {horizontal?: 'hidden'|'visible'|'auto', vertical?: 'hidden'|'visible'|'auto'}; - majorAxis: {converter?: (oj.ojTimeAxis.Converter|oj.Converter), height?: number, scale: 'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'quarters'|'years', zoomOrder?: Array}; - minorAxis: {converter?: (oj.ojTimeAxis.Converter|oj.Converter), height?: number, scale: 'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'quarters'|'years', zoomOrder?: Array}; - referenceObjects: Array; - rowAxis: {label?: {renderer: ((context: oj.ojGantt.RowAxisLabelRendererContext) => ({insert: Element}))}, maxWidth?: string, rendered?: 'on'|'off', width?: string}; - rowDefaults: {height?: number}; - scrollPosition: {offsetY?: number, rowIndex?: number, y?: number}; - selection: Array; - selectionMode: 'single'|'multiple'|'none'; - start: string; - taskData?: (oj.DataProvider); - taskDefaults: {baseline?: {borderRadius?: string, height?: number, svgClassName?: string, svgStyle?: object}, borderRadius?: string, height?: number, labelPosition?: (string|Array), progress?: {borderRadius?: string, height?: string, svgClassName?: string, svgStyle?: object}, svgClassName?: string, svgStyle?: object, type?: 'normal'|'milestone'|'summary'|'auto'}; - tooltip: {renderer: ((context: oj.ojGantt.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - valueFormats: {baselineDate?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, baselineEnd?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, baselineStart?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, date?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, end?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, label?: {tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, progress?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, row?: {tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, start?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}}; - viewportEnd: string; - viewportStart: string; - translations: {accessibleDependencyInfo?: string, accessiblePredecessorInfo?: string, accessibleSuccessorInfo?: string, accessibleTaskTypeMilestone?: string, accessibleTaskTypeSummary?: string, componentName?: string, finishFinishDependencyAriaDesc?: string, finishStartDependencyAriaDesc?: string, labelAndValue?: string, labelBaselineDate?: string, labelBaselineEnd?: string, labelBaselineStart?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelDate?: string, labelEnd?: string, labelInvalidData?: string, labelLabel?: string, labelMoveBy?: string, labelNoData?: string, labelProgress?: string, labelRow?: string, labelStart?: string, startFinishDependencyAriaDesc?: string, startStartDependencyAriaDesc?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, taskMoveCancelled?: string, taskMoveFinalized?: string, taskMoveInitiated?: string, taskMoveInitiatedInstruction?: string, taskMoveSelectionInfo?: string, tooltipZoomIn?: string, tooltipZoomOut?: string}; - } - namespace ojGantt { - type Dependency = - { - id: K1, predecessorTaskId: K2, shortDesc?: string, successorTaskId: K2, svgClassName?: string, svgStyle?: object, type?: 'startStart'|'startFinish'|'finishFinish'|'finishStart' - } - } - namespace ojGantt { - type ReferenceObject = - { - svgClassName?: string, svgStyle?: object, value?: string - } - } - namespace ojGantt { - type Row = - { - id?: any, label?: string, labelStyle?: object, tasks?: Array> - } - } - namespace ojGantt { - type RowAxisLabelRendererContext = - { - parentElement: Element, rowData: oj.ojGantt.Row, itemData: Array, componentElement: Element, maxWidth: number, maxHeight: number - } - } - namespace ojGantt { - type RowTask = - { - borderRadius?: string, end?: string, height?: number, id: K2, label?: string, labelPosition?: string|Array, labelStyle?: object, start?: string, shortDesc?: string, svgClassName?: string, svgStyle?: object, type?: 'normal'|'milestone'|'summary'|'auto', progress?: {borderRadius?: string, height?: string, svgClassName?: string, svgStyle?: object, value?: number}, baseline?: {borderRadius?: string, end?: string, height?: number, start?: string, svgClassName?: string, svgStyle?: object} - } - } - namespace ojGantt { - type TooltipContext = - { - parentElement: Element, data: oj.ojGantt.RowTask, rowData: oj.ojGantt.Row, itemData: D2, componentElement: Element, color: string - } - } - -} -declare namespace oj { - class ojGanttDependency extends JetElement { - predecessorTaskId: any; - shortDesc: string|null; - successorTaskId: any; - svgClassName: string; - svgStyle: object; - type: 'finishStart'|'finishFinish'|'startStart'|'startFinish'; - onPredecessorTaskIdChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onSuccessorTaskIdChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onTypeChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojGanttDependencyEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojGanttDependencyEventMap extends oj.JetElementEventMap { - 'predecessorTaskIdChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'successorTaskIdChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'typeChanged': CustomEvent; - } - interface ojGanttDependencySettableProperties extends JetSettableProperties { - predecessorTaskId: any; - shortDesc: string|null; - successorTaskId: any; - svgClassName: string; - svgStyle: object; - type: 'finishStart'|'finishFinish'|'startStart'|'startFinish'; - } - -} -declare namespace oj { - class ojGanttRow extends JetElement { - label: string; - labelStyle: object; - onLabelChanged: (event: CustomEvent)=> any; - onLabelStyleChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojGanttRowEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojGanttRowEventMap extends oj.JetElementEventMap { - 'labelChanged': CustomEvent; - 'labelStyleChanged': CustomEvent; - } - interface ojGanttRowSettableProperties extends JetSettableProperties { - label: string; - labelStyle: object; - } - -} -declare namespace oj { - class ojGanttTask extends JetElement { - baseline: {borderRadius?: string, end?: string, height?: number, start?: string, svgClassName?: string, svgStyle?: object}; - borderRadius: string; - end: string; - height: number|null; - label: string; - labelPosition: 'start'|'innerCenter'|'innerStart'|'innerEnd'|'end'|'none'; - labelStyle: object; - progress: {borderRadius?: string, height?: string, svgClassName?: string, svgStyle?: object, value?: number}; - rowId?: any; - shortDesc: string|null; - start: string; - svgClassName: string; - svgStyle: object; - type: 'normal'|'milestone'|'summary'|'auto'; - onBaselineChanged: (event: CustomEvent)=> any; - onBorderRadiusChanged: (event: CustomEvent)=> any; - onEndChanged: (event: CustomEvent)=> any; - onHeightChanged: (event: CustomEvent)=> any; - onLabelChanged: (event: CustomEvent)=> any; - onLabelPositionChanged: (event: CustomEvent)=> any; - onLabelStyleChanged: (event: CustomEvent)=> any; - onProgressChanged: (event: CustomEvent)=> any; - onRowIdChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onStartChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onTypeChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojGanttTaskEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojGanttTaskEventMap extends oj.JetElementEventMap { - 'baselineChanged': CustomEvent; - 'borderRadiusChanged': CustomEvent; - 'endChanged': CustomEvent; - 'heightChanged': CustomEvent; - 'labelChanged': CustomEvent; - 'labelPositionChanged': CustomEvent; - 'labelStyleChanged': CustomEvent; - 'progressChanged': CustomEvent; - 'rowIdChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'startChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'typeChanged': CustomEvent; - } - interface ojGanttTaskSettableProperties extends JetSettableProperties { - baseline: {borderRadius?: string, end?: string, height?: number, start?: string, svgClassName?: string, svgStyle?: object}; - borderRadius: string; - end: string; - height: number|null; - label: string; - labelPosition: 'start'|'innerCenter'|'innerStart'|'innerEnd'|'end'|'none'; - labelStyle: object; - progress: {borderRadius?: string, height?: string, svgClassName?: string, svgStyle?: object, value?: number}; - rowId?: any; - shortDesc: string|null; - start: string; - svgClassName: string; - svgStyle: object; - type: 'normal'|'milestone'|'summary'|'auto'; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojgauge/index.d.ts b/types/@oracle/oraclejet/ojs/ojgauge/index.d.ts deleted file mode 100644 index 0c3efab804..0000000000 --- a/types/@oracle/oraclejet/ojs/ojgauge/index.d.ts +++ /dev/null @@ -1,347 +0,0 @@ -/// -declare namespace oj { - abstract class dvtBaseGauge extends dvtBaseComponent { - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - - addEventListener(type: T, listener: (this: HTMLElement, ev: dvtBaseGaugeEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface dvtBaseGaugeEventMap extends oj.dvtBaseComponentEventMap { - } - interface dvtBaseGaugeSettableProperties extends dvtBaseComponentSettableProperties { - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - } - -} -declare namespace oj { - class ojLedGauge extends dvtBaseGauge { - borderColor: string; - color: string; - label: {style?: object, text?: string}; - max: number; - metricLabel: {converter?: Converter, rendered?: 'on'|'off', scaling?: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style?: object, text?: string, textType?: 'percent'|'number'}; - min: number; - rotation: 90|180|270|0; - size: number; - svgClassName: string; - svgStyle: object; - thresholds: Array; - tooltip: {renderer: ((context: oj.ojLedGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - type: 'arrow'|'diamond'|'square'|'rectangle'|'triangle'|'star'|'human'|'circle'; - value: number|null; - visualEffects: 'none'|'auto'; - onBorderColorChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onLabelChanged: (event: CustomEvent)=> any; - onMaxChanged: (event: CustomEvent)=> any; - onMetricLabelChanged: (event: CustomEvent)=> any; - onMinChanged: (event: CustomEvent)=> any; - onRotationChanged: (event: CustomEvent)=> any; - onSizeChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onThresholdsChanged: (event: CustomEvent)=> any; - onTooltipChanged: (event: CustomEvent)=> any; - onTypeChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onVisualEffectsChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojLedGaugeEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getMetricLabel(): string; - } - interface ojLedGaugeEventMap extends oj.dvtBaseGaugeEventMap { - 'borderColorChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'labelChanged': CustomEvent; - 'maxChanged': CustomEvent; - 'metricLabelChanged': CustomEvent; - 'minChanged': CustomEvent; - 'rotationChanged': CustomEvent; - 'sizeChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'thresholdsChanged': CustomEvent; - 'tooltipChanged': CustomEvent; - 'typeChanged': CustomEvent; - 'valueChanged': CustomEvent; - 'visualEffectsChanged': CustomEvent; - } - interface ojLedGaugeSettableProperties extends dvtBaseGaugeSettableProperties { - borderColor: string; - color: string; - label: {style?: object, text?: string}; - max: number; - metricLabel: {converter?: Converter, rendered?: 'on'|'off', scaling?: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style?: object, text?: string, textType?: 'percent'|'number'}; - min: number; - rotation: 90|180|270|0; - size: number; - svgClassName: string; - svgStyle: object; - thresholds: Array; - tooltip: {renderer: ((context: oj.ojLedGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - type: 'arrow'|'diamond'|'square'|'rectangle'|'triangle'|'star'|'human'|'circle'; - value: number|null; - visualEffects: 'none'|'auto'; - } - namespace ojLedGauge { - type Threshold = - { - borderColor?: string, color?: string, max?: number, shortDesc?: string - } - } - namespace ojLedGauge { - type TooltipContext = - { - color: string, componentElement: Element, label: string, parentElement: Element - } - } - -} -declare namespace oj { - class ojRatingGauge extends dvtBaseGauge { - changed: boolean; - changedState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; - hoverState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; - max: number; - min: number; - orientation: 'vertical'|'horizontal'; - preserveAspectRatio: 'none'|'meet'; - readonly: boolean; - selectedState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; - step: 0.5|1; - thresholds: Array; - tooltip: {renderer: ((context: oj.ojRatingGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - readonly transientValue: number|null; - unselectedState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; - value: number|null; - visualEffects: 'none'|'auto'; - onChangedChanged: (event: CustomEvent)=> any; - onChangedStateChanged: (event: CustomEvent)=> any; - onHoverStateChanged: (event: CustomEvent)=> any; - onMaxChanged: (event: CustomEvent)=> any; - onMinChanged: (event: CustomEvent)=> any; - onOrientationChanged: (event: CustomEvent)=> any; - onPreserveAspectRatioChanged: (event: CustomEvent)=> any; - onReadonlyChanged: (event: CustomEvent)=> any; - onSelectedStateChanged: (event: CustomEvent)=> any; - onStepChanged: (event: CustomEvent)=> any; - onThresholdsChanged: (event: CustomEvent)=> any; - onTooltipChanged: (event: CustomEvent)=> any; - onTransientValueChanged: (event: CustomEvent)=> any; - onUnselectedStateChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onVisualEffectsChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojRatingGaugeEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojRatingGaugeEventMap extends oj.dvtBaseGaugeEventMap { - 'changedChanged': CustomEvent; - 'changedStateChanged': CustomEvent; - 'hoverStateChanged': CustomEvent; - 'maxChanged': CustomEvent; - 'minChanged': CustomEvent; - 'orientationChanged': CustomEvent; - 'preserveAspectRatioChanged': CustomEvent; - 'readonlyChanged': CustomEvent; - 'selectedStateChanged': CustomEvent; - 'stepChanged': CustomEvent; - 'thresholdsChanged': CustomEvent; - 'tooltipChanged': CustomEvent; - 'transientValueChanged': CustomEvent; - 'unselectedStateChanged': CustomEvent; - 'valueChanged': CustomEvent; - 'visualEffectsChanged': CustomEvent; - } - interface ojRatingGaugeSettableProperties extends dvtBaseGaugeSettableProperties { - changed: boolean; - changedState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; - hoverState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; - max: number; - min: number; - orientation: 'vertical'|'horizontal'; - preserveAspectRatio: 'none'|'meet'; - readonly: boolean; - selectedState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; - step: 0.5|1; - thresholds: Array; - tooltip: {renderer: ((context: oj.ojRatingGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - readonly transientValue: number|null; - unselectedState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; - value: number|null; - visualEffects: 'none'|'auto'; - } - namespace ojRatingGauge { - type Threshold = - { - borderColor?: string, color?: string, max?: number, shortDesc?: string - } - } - namespace ojRatingGauge { - type TooltipContext = - { - color: string, componentElement: Element, label: string, parentElement: Element - } - } - -} -declare namespace oj { - class ojStatusMeterGauge extends dvtBaseGauge { - angleExtent: number; - animationDuration?: number; - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - borderColor: string; - borderRadius: string; - center: {renderer: ((context: oj.ojStatusMeterGauge.CenterContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - color: string; - indicatorSize: number; - innerRadius: number; - label: {position?: 'center'|'start'|'auto', style?: object, text?: string}; - max: number; - metricLabel: {converter?: Converter, position?: 'center'|'insideIndicatorEdge'|'outsideIndicatorEdge'|'outsidePlotArea'|'withLabel'|'auto', rendered?: 'on'|'off'|'auto', scaling?: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style?: object, text?: string, textType?: 'percent'|'number'}; - min: number; - orientation: 'circular'|'vertical'|'horizontal'; - plotArea: {borderColor?: string, borderRadius?: string, color?: string, rendered?: 'on'|'off'|'auto', svgClassName?: string, svgStyle?: object}; - readonly: boolean; - referenceLines: Array; - startAngle: number; - step: number|null; - svgClassName: string; - svgStyle: object; - thresholdDisplay: 'currentOnly'|'all'|'onIndicator'; - thresholds: Array; - tooltip: {renderer: ((context: oj.ojStatusMeterGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - readonly transientValue: number|null; - value: number|null; - visualEffects: 'none'|'auto'; - onAngleExtentChanged: (event: CustomEvent)=> any; - onAnimationDurationChanged: (event: CustomEvent)=> any; - onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; - onAnimationOnDisplayChanged: (event: CustomEvent)=> any; - onBorderColorChanged: (event: CustomEvent)=> any; - onBorderRadiusChanged: (event: CustomEvent)=> any; - onCenterChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onIndicatorSizeChanged: (event: CustomEvent)=> any; - onInnerRadiusChanged: (event: CustomEvent)=> any; - onLabelChanged: (event: CustomEvent)=> any; - onMaxChanged: (event: CustomEvent)=> any; - onMetricLabelChanged: (event: CustomEvent)=> any; - onMinChanged: (event: CustomEvent)=> any; - onOrientationChanged: (event: CustomEvent)=> any; - onPlotAreaChanged: (event: CustomEvent)=> any; - onReadonlyChanged: (event: CustomEvent)=> any; - onReferenceLinesChanged: (event: CustomEvent)=> any; - onStartAngleChanged: (event: CustomEvent)=> any; - onStepChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onThresholdDisplayChanged: (event: CustomEvent)=> any; - onThresholdsChanged: (event: CustomEvent)=> any; - onTooltipChanged: (event: CustomEvent)=> any; - onTransientValueChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onVisualEffectsChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojStatusMeterGaugeEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getMetricLabel(): string; - } - interface ojStatusMeterGaugeEventMap extends oj.dvtBaseGaugeEventMap { - 'angleExtentChanged': CustomEvent; - 'animationDurationChanged': CustomEvent; - 'animationOnDataChangeChanged': CustomEvent; - 'animationOnDisplayChanged': CustomEvent; - 'borderColorChanged': CustomEvent; - 'borderRadiusChanged': CustomEvent; - 'centerChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'indicatorSizeChanged': CustomEvent; - 'innerRadiusChanged': CustomEvent; - 'labelChanged': CustomEvent; - 'maxChanged': CustomEvent; - 'metricLabelChanged': CustomEvent; - 'minChanged': CustomEvent; - 'orientationChanged': CustomEvent; - 'plotAreaChanged': CustomEvent; - 'readonlyChanged': CustomEvent; - 'referenceLinesChanged': CustomEvent; - 'startAngleChanged': CustomEvent; - 'stepChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'thresholdDisplayChanged': CustomEvent; - 'thresholdsChanged': CustomEvent; - 'tooltipChanged': CustomEvent; - 'transientValueChanged': CustomEvent; - 'valueChanged': CustomEvent; - 'visualEffectsChanged': CustomEvent; - } - interface ojStatusMeterGaugeSettableProperties extends dvtBaseGaugeSettableProperties { - angleExtent: number; - animationDuration?: number; - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - borderColor: string; - borderRadius: string; - center: {renderer: ((context: oj.ojStatusMeterGauge.CenterContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - color: string; - indicatorSize: number; - innerRadius: number; - label: {position?: 'center'|'start'|'auto', style?: object, text?: string}; - max: number; - metricLabel: {converter?: Converter, position?: 'center'|'insideIndicatorEdge'|'outsideIndicatorEdge'|'outsidePlotArea'|'withLabel'|'auto', rendered?: 'on'|'off'|'auto', scaling?: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style?: object, text?: string, textType?: 'percent'|'number'}; - min: number; - orientation: 'circular'|'vertical'|'horizontal'; - plotArea: {borderColor?: string, borderRadius?: string, color?: string, rendered?: 'on'|'off'|'auto', svgClassName?: string, svgStyle?: object}; - readonly: boolean; - referenceLines: Array; - startAngle: number; - step: number|null; - svgClassName: string; - svgStyle: object; - thresholdDisplay: 'currentOnly'|'all'|'onIndicator'; - thresholds: Array; - tooltip: {renderer: ((context: oj.ojStatusMeterGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - readonly transientValue: number|null; - value: number|null; - visualEffects: 'none'|'auto'; - } - namespace ojStatusMeterGauge { - type Bounds = - { - x: number, y: number, width: number, height: number - } - } - namespace ojStatusMeterGauge { - type CenterContext = - { - componentElement: Element, innerBounds: oj.ojStatusMeterGauge.Bounds, metricLabel: string, outerBounds: oj.ojStatusMeterGauge.Bounds - } - } - namespace ojStatusMeterGauge { - type ReferenceLine = - { - color?: string, value?: number - } - } - namespace ojStatusMeterGauge { - type Threshold = - { - borderColor?: string, color?: string, max?: number, shortDesc?: string - } - } - namespace ojStatusMeterGauge { - type TooltipContext = - { - color: string, componentElement: Element, label: string, parentElement: Element - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojindexer/index.d.ts b/types/@oracle/oraclejet/ojs/ojindexer/index.d.ts deleted file mode 100644 index 49b10e2bfa..0000000000 --- a/types/@oracle/oraclejet/ojs/ojindexer/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -declare namespace oj { - interface IndexerModel { - getIndexableSections(): Array|Array; - getMissingSections(): Array|Array; - setSection(section: string|object): Promise|Promise; - } - var IndexerModel: { - prototype: IndexerModel; - - SECTION_OTHERS: {id: string, label: string}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojinputnumber/index.d.ts b/types/@oracle/oraclejet/ojs/ojinputnumber/index.d.ts deleted file mode 100644 index ea03d4c8d3..0000000000 --- a/types/@oracle/oraclejet/ojs/ojinputnumber/index.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -/// -/// -/// -declare namespace oj { - class ojInputNumber extends editableValue { - asyncValidators: Array>; - autocomplete: 'on'|'off'|string; - autofocus: boolean; - converter: oj.Converter|oj.Validation.RegisteredConverter; - max: number|null; - min: number|null; - name: string; - placeholder: string|null; - readonly rawValue: string; - readonly: boolean|null; - required: boolean; - step: number|null; - validators: Array|oj.Validation.RegisteredValidator>; - value: number|null; - virtualKeyboard: 'auto'|'number'|'text'; - translations: {numberRange?: {hint?: {exact?: string, inRange?: string, max?: string, min?: string}, messageDetail?: {exact?: string, rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipDecrement?: string, tooltipIncrement?: string}; - onAsyncValidatorsChanged: (event: CustomEvent)=> any; - onAutocompleteChanged: (event: CustomEvent)=> any; - onAutofocusChanged: (event: CustomEvent)=> any; - onConverterChanged: (event: CustomEvent)=> any; - onMaxChanged: (event: CustomEvent)=> any; - onMinChanged: (event: CustomEvent)=> any; - onNameChanged: (event: CustomEvent)=> any; - onPlaceholderChanged: (event: CustomEvent)=> any; - onRawValueChanged: (event: CustomEvent)=> any; - onReadonlyChanged: (event: CustomEvent)=> any; - onRequiredChanged: (event: CustomEvent)=> any; - onStepChanged: (event: CustomEvent)=> any; - onValidatorsChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onVirtualKeyboardChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojInputNumber.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojInputNumber.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputNumberEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - stepDown(steps?: number): void; - stepUp(steps?: number): void; - validate(): Promise; - } - namespace ojInputNumber { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojInputNumberEventMap extends oj.editableValueEventMap { - 'ojAnimateEnd': oj.ojInputNumber.ojAnimateEnd; - 'ojAnimateStart': oj.ojInputNumber.ojAnimateStart; - 'asyncValidatorsChanged': CustomEvent; - 'autocompleteChanged': CustomEvent; - 'autofocusChanged': CustomEvent; - 'converterChanged': CustomEvent; - 'maxChanged': CustomEvent; - 'minChanged': CustomEvent; - 'nameChanged': CustomEvent; - 'placeholderChanged': CustomEvent; - 'rawValueChanged': CustomEvent; - 'readonlyChanged': CustomEvent; - 'requiredChanged': CustomEvent; - 'stepChanged': CustomEvent; - 'validatorsChanged': CustomEvent; - 'valueChanged': CustomEvent; - 'virtualKeyboardChanged': CustomEvent; - } - interface ojInputNumberSettableProperties extends editableValueSettableProperties { - asyncValidators: Array>; - autocomplete: 'on'|'off'|string; - autofocus: boolean; - converter: oj.Converter|oj.Validation.RegisteredConverter; - max: number|null; - min: number|null; - name: string; - placeholder: string|null; - readonly rawValue: string; - readonly: boolean|null; - required: boolean; - step: number|null; - validators: Array|oj.Validation.RegisteredValidator>; - value: number|null; - virtualKeyboard: 'auto'|'number'|'text'; - translations: {numberRange?: {hint?: {exact?: string, inRange?: string, max?: string, min?: string}, messageDetail?: {exact?: string, rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipDecrement?: string, tooltipIncrement?: string}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojinputtext/index.d.ts b/types/@oracle/oraclejet/ojs/ojinputtext/index.d.ts deleted file mode 100644 index 248bf14f58..0000000000 --- a/types/@oracle/oraclejet/ojs/ojinputtext/index.d.ts +++ /dev/null @@ -1,178 +0,0 @@ -/// -/// -/// -/// -declare namespace oj { - abstract class inputBase, SV= V, RV= V> extends editableValue { - asyncValidators: Array>; - autocomplete: 'on'|'off'|string; - autofocus: boolean; - name: string; - placeholder: string; - readonly rawValue: RV; - readonly: boolean; - required: boolean; - validators: Array|oj.Validation.RegisteredValidator>|null; - translations: {regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; - onAsyncValidatorsChanged: (event: CustomEvent)=> any; - onAutocompleteChanged: (event: CustomEvent)=> any; - onAutofocusChanged: (event: CustomEvent)=> any; - onNameChanged: (event: CustomEvent)=> any; - onPlaceholderChanged: (event: CustomEvent)=> any; - onRawValueChanged: (event: CustomEvent)=> any; - onReadonlyChanged: (event: CustomEvent)=> any; - onRequiredChanged: (event: CustomEvent)=> any; - onValidatorsChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.inputBase.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.inputBase.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: inputBaseEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - validate(): Promise<'valid'|'invalid'>; - } - namespace inputBase { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface inputBaseEventMap extends oj.editableValueEventMap { - 'ojAnimateEnd': oj.inputBase.ojAnimateEnd; - 'ojAnimateStart': oj.inputBase.ojAnimateStart; - 'asyncValidatorsChanged': CustomEvent; - 'autocompleteChanged': CustomEvent; - 'autofocusChanged': CustomEvent; - 'nameChanged': CustomEvent; - 'placeholderChanged': CustomEvent; - 'rawValueChanged': CustomEvent; - 'readonlyChanged': CustomEvent; - 'requiredChanged': CustomEvent; - 'validatorsChanged': CustomEvent; - } - interface inputBaseSettableProperties extends editableValueSettableProperties { - asyncValidators: Array>; - autocomplete: 'on'|'off'|string; - autofocus: boolean; - name: string; - placeholder: string; - readonly rawValue: RV; - readonly: boolean; - required: boolean; - validators: Array|oj.Validation.RegisteredValidator>|null; - translations: {regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; - } - -} -declare namespace oj { - class ojInputPassword extends inputBase { - value: string|null; - translations: {regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojInputPassword.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojInputPassword.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputPasswordEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojInputPassword { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojInputPasswordEventMap extends oj.inputBaseEventMap { - 'ojAnimateEnd': oj.ojInputPassword.ojAnimateEnd; - 'ojAnimateStart': oj.ojInputPassword.ojAnimateStart; - 'valueChanged': CustomEvent; - } - interface ojInputPasswordSettableProperties extends inputBaseSettableProperties { - value: string|null; - translations: {regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; - } - -} -declare namespace oj { - class ojInputText extends inputBase { - clearIcon: 'never'|'always'|'conditional'; - converter: oj.Converter|oj.Validation.RegisteredConverter|null; - list: string; - virtualKeyboard: 'auto'|'email'|'number'|'search'|'tel'|'text'|'url'; - onClearIconChanged: (event: CustomEvent)=> any; - onConverterChanged: (event: CustomEvent)=> any; - onListChanged: (event: CustomEvent)=> any; - onVirtualKeyboardChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojInputText.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojInputText.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputTextEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojInputText { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojInputTextEventMap extends oj.inputBaseEventMap { - 'ojAnimateEnd': oj.ojInputText.ojAnimateEnd; - 'ojAnimateStart': oj.ojInputText.ojAnimateStart; - 'clearIconChanged': CustomEvent; - 'converterChanged': CustomEvent; - 'listChanged': CustomEvent; - 'virtualKeyboardChanged': CustomEvent; - } - interface ojInputTextSettableProperties extends inputBaseSettableProperties { - clearIcon: 'never'|'always'|'conditional'; - converter: oj.Converter|oj.Validation.RegisteredConverter|null; - list: string; - virtualKeyboard: 'auto'|'email'|'number'|'search'|'tel'|'text'|'url'; - } - -} -declare namespace oj { - class ojTextArea extends inputBase { - converter: oj.Converter|oj.Validation.RegisteredConverter|null; - rows: number; - onConverterChanged: (event: CustomEvent)=> any; - onRowsChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojTextArea.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojTextArea.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojTextAreaEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojTextArea { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojTextAreaEventMap extends oj.inputBaseEventMap { - 'ojAnimateEnd': oj.ojTextArea.ojAnimateEnd; - 'ojAnimateStart': oj.ojTextArea.ojAnimateStart; - 'converterChanged': CustomEvent; - 'rowsChanged': CustomEvent; - } - interface ojTextAreaSettableProperties extends inputBaseSettableProperties { - converter: oj.Converter|oj.Validation.RegisteredConverter|null; - rows: number; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojkeyset/index.d.ts b/types/@oracle/oraclejet/ojs/ojkeyset/index.d.ts deleted file mode 100644 index f6608c7f7d..0000000000 --- a/types/@oracle/oraclejet/ojs/ojkeyset/index.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -export class ExpandAllKeySet extends KeySet { - constructor(); - add(keys: Set|Array): ExpandAllKeySet - addAll(): ExpandAllKeySet - clear(): ExpandedKeySet - delete(keys: Set|Array): ExpandAllKeySet - deletedValues(): Set; - has(): ExpandAllKeySet - isAddAll(): boolean; - } - -export class ExpandedKeySet extends KeySet { - constructor(keys?: Set|Array); - add(keys: Set|Array): ExpandedKeySet - addAll(): ExpandAllKeySet - clear(): ExpandedKeySet - delete(keys: Set|Array): ExpandedKeySet - has(key: K): boolean; - isAddAll(): boolean; - values(): Set; - } - -export abstract class KeySet { - abstract add>(keys: Set|Array): KS - abstract addAll>(): KS - abstract clear>(): KS - abstract delete>(keys: Set|Array): KS - abstract has(key: K): boolean; - abstract isAddAll(): boolean; - } - - export as namespace KeySet; diff --git a/types/@oracle/oraclejet/ojs/ojknockout-keyset/index.d.ts b/types/@oracle/oraclejet/ojs/ojknockout-keyset/index.d.ts deleted file mode 100644 index 71d1945a6c..0000000000 --- a/types/@oracle/oraclejet/ojs/ojknockout-keyset/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/// -export class ObservableExpandedKeySet { - constructor(initialValue?: KeySet.ExpandedKeySet|KeySet.ExpandAllKeySet); - add(keys: Set|Array): ObservableExpandedKeySet; - addAll(): ObservableExpandedKeySet; - clear(): ObservableExpandedKeySet; - delete(keys: Set|Array): ObservableExpandedKeySet; - } - diff --git a/types/@oracle/oraclejet/ojs/ojknockout-model/index.d.ts b/types/@oracle/oraclejet/ojs/ojknockout-model/index.d.ts deleted file mode 100644 index 21bf95f0dc..0000000000 --- a/types/@oracle/oraclejet/ojs/ojknockout-model/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/// -declare namespace oj { - class KnockoutUtils { - static map(m: object, callback?: ((param0: object)=> void), array?: boolean): Array>|KnockoutObservableArray; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojknockout/index.d.ts b/types/@oracle/oraclejet/ojs/ojknockout/index.d.ts deleted file mode 100644 index f388d46c92..0000000000 --- a/types/@oracle/oraclejet/ojs/ojknockout/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/// -declare namespace oj { - namespace KnockoutTemplateUtils { - function getRenderer(template: string, bReplaceNode?: boolean): ((param0: object)=> void); - } - -} -declare namespace oj { - class ResponsiveKnockoutUtils { - static createMediaQueryObservable(queryString: string): KnockoutObservable; - static createScreenRangeObservable(): KnockoutObservable; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojlabel/index.d.ts b/types/@oracle/oraclejet/ojs/ojlabel/index.d.ts deleted file mode 100644 index c10e0daf17..0000000000 --- a/types/@oracle/oraclejet/ojs/ojlabel/index.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -/// -declare namespace oj { - class ojLabel extends baseComponent { - for: string|null; - help: {definition?: string|null, source?: string|null}; - labelId: string|null; - showRequired: boolean|null; - translations: {tooltipHelp?: string, tooltipRequired?: string}; - onForChanged: (event: CustomEvent)=> any; - onHelpChanged: (event: CustomEvent)=> any; - onLabelIdChanged: (event: CustomEvent)=> any; - onShowRequiredChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojLabelEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - } - interface ojLabelEventMap extends oj.baseComponentEventMap { - 'forChanged': CustomEvent; - 'helpChanged': CustomEvent; - 'labelIdChanged': CustomEvent; - 'showRequiredChanged': CustomEvent; - } - interface ojLabelSettableProperties extends baseComponentSettableProperties { - for: string|null; - help: {definition?: string|null, source?: string|null}; - labelId: string|null; - showRequired: boolean|null; - translations: {tooltipHelp?: string, tooltipRequired?: string}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojlabelvalue/index.d.ts b/types/@oracle/oraclejet/ojs/ojlabelvalue/index.d.ts deleted file mode 100644 index c1649bedd7..0000000000 --- a/types/@oracle/oraclejet/ojs/ojlabelvalue/index.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -declare namespace oj { - class ojLabelValue extends JetElement { - labelEdge: 'start'|'top'|'inherit'; - labelWidth: string; - onLabelEdgeChanged: (event: CustomEvent)=> any; - onLabelWidthChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojLabelValueEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getProperty(property: string): any; - refresh(): void; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - } - interface ojLabelValueEventMap extends oj.JetElementEventMap { - 'labelEdgeChanged': CustomEvent; - 'labelWidthChanged': CustomEvent; - } - interface ojLabelValueSettableProperties extends JetSettableProperties { - labelEdge: 'start'|'top'|'inherit'; - labelWidth: string; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojlegend/index.d.ts b/types/@oracle/oraclejet/ojs/ojlegend/index.d.ts deleted file mode 100644 index 36f940f25c..0000000000 --- a/types/@oracle/oraclejet/ojs/ojlegend/index.d.ts +++ /dev/null @@ -1,230 +0,0 @@ -/// -/// -declare namespace oj { - class ojLegend extends dvtBaseComponent> { - as: string; - data: oj.DataProvider|null; - drilling: 'on'|'off'; - expanded: KeySet.KeySet|null; - halign: 'center'|'end'|'start'; - hiddenCategories: Array; - hideAndShowBehavior: 'on'|'off'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - hoverBehaviorDelay: number; - orientation: 'horizontal'|'vertical'; - scrolling: 'off'|'asNeeded'; - symbolHeight: number; - symbolWidth: number; - textStyle?: object; - valign: 'middle'|'bottom'|'top'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - onAsChanged: (event: CustomEvent)=> any; - onDataChanged: (event: CustomEvent)=> any; - onDrillingChanged: (event: CustomEvent)=> any; - onExpandedChanged: (event: CustomEvent)=> any; - onHalignChanged: (event: CustomEvent)=> any; - onHiddenCategoriesChanged: (event: CustomEvent)=> any; - onHideAndShowBehaviorChanged: (event: CustomEvent)=> any; - onHighlightedCategoriesChanged: (event: CustomEvent)=> any; - onHoverBehaviorChanged: (event: CustomEvent)=> any; - onHoverBehaviorDelayChanged: (event: CustomEvent)=> any; - onOrientationChanged: (event: CustomEvent)=> any; - onScrollingChanged: (event: CustomEvent)=> any; - onSymbolHeightChanged: (event: CustomEvent)=> any; - onSymbolWidthChanged: (event: CustomEvent)=> any; - onTextStyleChanged: (event: CustomEvent)=> any; - onValignChanged: (event: CustomEvent)=> any; - onOjDrill: (event: oj.ojLegend.ojDrill)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojLegendEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getContextByNode(node: Element): oj.ojLegend.NodeContext|null; - getItem(subIdPath: Array): oj.ojLegend.ItemContext|null; - getPreferredSize(): oj.ojLegend.PreferredSize|null; - getSection(subIdPath: Array): oj.ojLegend.SectionContext|null; - } - namespace ojLegend { - class ojDrill extends CustomEvent<{id: any, [propName: string]: any}> { - - } - } - interface ojLegendEventMap extends oj.dvtBaseComponentEventMap { - 'ojDrill': oj.ojLegend.ojDrill; - 'asChanged': CustomEvent; - 'dataChanged': CustomEvent; - 'drillingChanged': CustomEvent; - 'expandedChanged': CustomEvent; - 'halignChanged': CustomEvent; - 'hiddenCategoriesChanged': CustomEvent; - 'hideAndShowBehaviorChanged': CustomEvent; - 'highlightedCategoriesChanged': CustomEvent; - 'hoverBehaviorChanged': CustomEvent; - 'hoverBehaviorDelayChanged': CustomEvent; - 'orientationChanged': CustomEvent; - 'scrollingChanged': CustomEvent; - 'symbolHeightChanged': CustomEvent; - 'symbolWidthChanged': CustomEvent; - 'textStyleChanged': CustomEvent; - 'valignChanged': CustomEvent; - } - interface ojLegendSettableProperties extends dvtBaseComponentSettableProperties { - as: string; - data: oj.DataProvider|null; - drilling: 'on'|'off'; - expanded: KeySet.KeySet|null; - halign: 'center'|'end'|'start'; - hiddenCategories: Array; - hideAndShowBehavior: 'on'|'off'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - hoverBehaviorDelay: number; - orientation: 'horizontal'|'vertical'; - scrolling: 'off'|'asNeeded'; - symbolHeight: number; - symbolWidth: number; - textStyle?: object; - valign: 'middle'|'bottom'|'top'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - } - namespace ojLegend { - type ItemContext = - { - text: string - } - } - namespace ojLegend { - type NodeContext = - { - itemIndex: number, sectionIndexPath: Array, subId: string - } - } - namespace ojLegend { - type PreferredSize = - { - width: number, height: number - } - } - namespace ojLegend { - type SectionContext = - { - title: string, sections: Array, items: Array, getSection: {title: string, sections: string, items: boolean}, getItems: {text: string} - } - } - -} -declare namespace oj { - class ojLegendItem extends JetElement { - borderColor?: string; - categories?: Array; - categoryVisibility?: 'hidden'|'visible'; - color?: string; - drilling?: 'on'|'off'|'inherit'; - lineStyle?: 'dotted'|'dashed'|'solid'; - lineWidth?: number; - markerColor?: string; - markerShape: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string; - markerSvgClassName?: string; - markerSvgStyle?: object; - pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'; - shortDesc?: string; - source?: string; - svgClassName?: string; - svgStyle?: object; - symbolType?: 'line'|'lineWithMarker'|'image'|'marker'; - text: string; - onBorderColorChanged: (event: CustomEvent)=> any; - onCategoriesChanged: (event: CustomEvent)=> any; - onCategoryVisibilityChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onDrillingChanged: (event: CustomEvent)=> any; - onLineStyleChanged: (event: CustomEvent)=> any; - onLineWidthChanged: (event: CustomEvent)=> any; - onMarkerColorChanged: (event: CustomEvent)=> any; - onMarkerShapeChanged: (event: CustomEvent)=> any; - onMarkerSvgClassNameChanged: (event: CustomEvent)=> any; - onMarkerSvgStyleChanged: (event: CustomEvent)=> any; - onPatternChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onSourceChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onSymbolTypeChanged: (event: CustomEvent)=> any; - onTextChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojLegendItemEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojLegendItemEventMap extends oj.JetElementEventMap { - 'borderColorChanged': CustomEvent; - 'categoriesChanged': CustomEvent; - 'categoryVisibilityChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'drillingChanged': CustomEvent; - 'lineStyleChanged': CustomEvent; - 'lineWidthChanged': CustomEvent; - 'markerColorChanged': CustomEvent; - 'markerShapeChanged': CustomEvent; - 'markerSvgClassNameChanged': CustomEvent; - 'markerSvgStyleChanged': CustomEvent; - 'patternChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'sourceChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'symbolTypeChanged': CustomEvent; - 'textChanged': CustomEvent; - } - interface ojLegendItemSettableProperties extends JetSettableProperties { - borderColor?: string; - categories?: Array; - categoryVisibility?: 'hidden'|'visible'; - color?: string; - drilling?: 'on'|'off'|'inherit'; - lineStyle?: 'dotted'|'dashed'|'solid'; - lineWidth?: number; - markerColor?: string; - markerShape: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string; - markerSvgClassName?: string; - markerSvgStyle?: object; - pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'; - shortDesc?: string; - source?: string; - svgClassName?: string; - svgStyle?: object; - symbolType?: 'line'|'lineWithMarker'|'image'|'marker'; - text: string; - } - -} -declare namespace oj { - class ojLegendSection extends JetElement { - collapsible?: 'on'|'off'; - text?: string; - textHalign?: 'center'|'end'|'start'; - textStyle?: object; - onCollapsibleChanged: (event: CustomEvent)=> any; - onTextChanged: (event: CustomEvent)=> any; - onTextHalignChanged: (event: CustomEvent)=> any; - onTextStyleChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojLegendSectionEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojLegendSectionEventMap extends oj.JetElementEventMap { - 'collapsibleChanged': CustomEvent; - 'textChanged': CustomEvent; - 'textHalignChanged': CustomEvent; - 'textStyleChanged': CustomEvent; - } - interface ojLegendSectionSettableProperties extends JetSettableProperties { - collapsible?: 'on'|'off'; - text?: string; - textHalign?: 'center'|'end'|'start'; - textStyle?: object; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojlistdataproviderview/index.d.ts b/types/@oracle/oraclejet/ojs/ojlistdataproviderview/index.d.ts deleted file mode 100644 index ed2b3d981f..0000000000 --- a/types/@oracle/oraclejet/ojs/ojlistdataproviderview/index.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/// -declare namespace oj { - class ListDataProviderView implements DataProvider { - dataMapping: DataMapping; - from: any; - offset: number; - sortCriteria: SortCriterion[]; - constructor(dataProvider: DataProvider, options?: {from?: object, offset?: number, sortCriteria?: SortCriterion[], dataMapping?: DataMapping}); - addEventListener(eventType: string, listener: EventListener): void - containsKeys(params: FetchByKeysParameters): Promise> - dispatchEvent(evt: Event): boolean - fetchByKeys(params: FetchByKeysParameters): Promise> - fetchByOffset(params: FetchByOffsetParameters): Promise> - fetchFirst>(params?: FetchListParameters): AsyncIterable - getCapability(capabilityName: string) - getTotalSize(): Promise; - isEmpty(): 'yes'|'no'|'unknown'; - removeEventListener(eventType: string, listener: EventListener): void - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojlistview/index.d.ts b/types/@oracle/oraclejet/ojs/ojlistview/index.d.ts deleted file mode 100644 index cb4289b6ea..0000000000 --- a/types/@oracle/oraclejet/ojs/ojlistview/index.d.ts +++ /dev/null @@ -1,167 +0,0 @@ -/// -/// -/// -declare namespace oj { - class ojListView extends baseComponent> { - as: string; - currentItem: K; - data: oj.DataProvider; - dnd: {drag?: {items: {dataTypes?: string|Array, drag?: ((param0: Event)=> void), dragEnd?: ((param0: Event)=> void), dragStart?: ((param0: Event, param1: {items:Array})=> void)}}, drop?: {items: {dataTypes?: string|Array, dragEnter?: ((param0: Event, param1: {item:Element})=> void), dragLeave?: ((param0: Event, param1: {item:Element})=> void), dragOver?: ((param0: Event, param1: {item:Element})=> void), drop?: ((param0: Event, param1: oj.ojListView.ItemsDropContext)=> void)}}, reorder: {items: 'enabled'|'disabled'}}; - drillMode: 'collapsible'|'none'; - expanded: KeySet.KeySet; - readonly firstSelectedItem: {key: K, data: D}; - groupHeaderPosition: 'static'|'sticky'; - item: {focusable?: ((param0: oj.ojListView.ItemContext) => boolean)|boolean, renderer?: ((param0: oj.ojListView.ItemContext) => {insert: Element|string}|undefined)|null, selectable?: ((param0: oj.ojListView.ItemContext) => boolean)|boolean}; - scrollPolicy: 'auto'|'loadMoreOnScroll'; - scrollPolicyOptions: {fetchSize?: number, maxCount?: number, scroller?: Element}; - scrollPosition: {x?: number, y?: number, index?: number, parent?: K, key?: K, offsetX?: number, offsetY?: number}; - selection: Array; - selectionMode: 'none'|'single'|'multiple'; - selectionRequired: boolean; - translations: {accessibleNavigateSkipItems?: string, accessibleReorderAfterItem?: string, accessibleReorderBeforeItem?: string, accessibleReorderInsideItem?: string, accessibleReorderTouchInstructionText?: string, indexerCharacters?: string, labelCopy?: string, labelCut?: string, labelPaste?: string, labelPasteAfter?: string, labelPasteBefore?: string, msgFetchingData?: string, msgNoData?: string}; - onAsChanged: (event: CustomEvent)=> any; - onCurrentItemChanged: (event: CustomEvent)=> any; - onDataChanged: (event: CustomEvent)=> any; - onDndChanged: (event: CustomEvent)=> any; - onDrillModeChanged: (event: CustomEvent)=> any; - onExpandedChanged: (event: CustomEvent)=> any; - onFirstSelectedItemChanged: (event: CustomEvent)=> any; - onGroupHeaderPositionChanged: (event: CustomEvent)=> any; - onItemChanged: (event: CustomEvent)=> any; - onScrollPolicyChanged: (event: CustomEvent)=> any; - onScrollPolicyOptionsChanged: (event: CustomEvent)=> any; - onScrollPositionChanged: (event: CustomEvent)=> any; - onSelectionChanged: (event: CustomEvent)=> any; - onSelectionModeChanged: (event: CustomEvent)=> any; - onSelectionRequiredChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojListView.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojListView.ojAnimateStart)=> any; - onOjBeforeCollapse: (event: oj.ojListView.ojBeforeCollapse)=> any; - onOjBeforeCurrentItem: (event: oj.ojListView.ojBeforeCurrentItem)=> any; - onOjBeforeExpand: (event: oj.ojListView.ojBeforeExpand)=> any; - onOjCollapse: (event: oj.ojListView.ojCollapse)=> any; - onOjCopy: (event: oj.ojListView.ojCopy)=> any; - onOjCut: (event: oj.ojListView.ojCut)=> any; - onOjExpand: (event: oj.ojListView.ojExpand)=> any; - onOjPaste: (event: oj.ojListView.ojPaste)=> any; - onOjReorder: (event: oj.ojListView.ojReorder)=> any; - - addEventListener>(type: T, listener: (this: HTMLElement, ev: ojListViewEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getContextByNode(node: Element): oj.ojListView.ContextByNode|null; - getDataForVisibleItem(context: {key?: K, index?: number, parent?: Element}): D; - refresh(): void; - scrollToItem(item: {key: K}): void; - } - namespace ojListView { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - - class ojBeforeCollapse extends CustomEvent<{key: K, item: Element, [propName: string]: any}> { - - } - - class ojBeforeCurrentItem extends CustomEvent<{previousKey: K, previousItem: Element, key: K, item: Element, [propName: string]: any}> { - - } - - class ojBeforeExpand extends CustomEvent<{key: K, item: Element, [propName: string]: any}> { - - } - - class ojCollapse extends CustomEvent<{key: K, item: Element, [propName: string]: any}> { - - } - - class ojCopy extends CustomEvent<{items: Array, [propName: string]: any}> { - - } - - class ojCut extends CustomEvent<{items: Array, [propName: string]: any}> { - - } - - class ojExpand extends CustomEvent<{key: K, item: Element, [propName: string]: any}> { - - } - - class ojPaste extends CustomEvent<{item: Element, [propName: string]: any}> { - - } - - class ojReorder extends CustomEvent<{items: Array, position: string, reference: Element, [propName: string]: any}> { - - } - } - interface ojListViewEventMap extends oj.baseComponentEventMap { - 'ojAnimateEnd': oj.ojListView.ojAnimateEnd; - 'ojAnimateStart': oj.ojListView.ojAnimateStart; - 'ojBeforeCollapse': oj.ojListView.ojBeforeCollapse; - 'ojBeforeCurrentItem': oj.ojListView.ojBeforeCurrentItem; - 'ojBeforeExpand': oj.ojListView.ojBeforeExpand; - 'ojCollapse': oj.ojListView.ojCollapse; - 'ojCopy': oj.ojListView.ojCopy; - 'ojCut': oj.ojListView.ojCut; - 'ojExpand': oj.ojListView.ojExpand; - 'ojPaste': oj.ojListView.ojPaste; - 'ojReorder': oj.ojListView.ojReorder; - 'asChanged': CustomEvent; - 'currentItemChanged': CustomEvent; - 'dataChanged': CustomEvent; - 'dndChanged': CustomEvent; - 'drillModeChanged': CustomEvent; - 'expandedChanged': CustomEvent; - 'firstSelectedItemChanged': CustomEvent; - 'groupHeaderPositionChanged': CustomEvent; - 'itemChanged': CustomEvent; - 'scrollPolicyChanged': CustomEvent; - 'scrollPolicyOptionsChanged': CustomEvent; - 'scrollPositionChanged': CustomEvent; - 'selectionChanged': CustomEvent; - 'selectionModeChanged': CustomEvent; - 'selectionRequiredChanged': CustomEvent; - } - interface ojListViewSettableProperties extends baseComponentSettableProperties { - as: string; - currentItem: K; - data: oj.DataProvider; - dnd: {drag?: {items: {dataTypes?: string|Array, drag?: ((param0: Event)=> void), dragEnd?: ((param0: Event)=> void), dragStart?: ((param0: Event, param1: {items:Array})=> void)}}, drop?: {items: {dataTypes?: string|Array, dragEnter?: ((param0: Event, param1: {item:Element})=> void), dragLeave?: ((param0: Event, param1: {item:Element})=> void), dragOver?: ((param0: Event, param1: {item:Element})=> void), drop?: ((param0: Event, param1: oj.ojListView.ItemsDropContext)=> void)}}, reorder: {items: 'enabled'|'disabled'}}; - drillMode: 'collapsible'|'none'; - expanded: KeySet.KeySet; - readonly firstSelectedItem: {key: K, data: D}; - groupHeaderPosition: 'static'|'sticky'; - item: {focusable?: ((param0: oj.ojListView.ItemContext) => boolean)|boolean, renderer?: ((param0: oj.ojListView.ItemContext) => {insert: Element|string}|undefined)|null, selectable?: ((param0: oj.ojListView.ItemContext) => boolean)|boolean}; - scrollPolicy: 'auto'|'loadMoreOnScroll'; - scrollPolicyOptions: {fetchSize?: number, maxCount?: number, scroller?: Element}; - scrollPosition: {x?: number, y?: number, index?: number, parent?: K, key?: K, offsetX?: number, offsetY?: number}; - selection: Array; - selectionMode: 'none'|'single'|'multiple'; - selectionRequired: boolean; - translations: {accessibleNavigateSkipItems?: string, accessibleReorderAfterItem?: string, accessibleReorderBeforeItem?: string, accessibleReorderInsideItem?: string, accessibleReorderTouchInstructionText?: string, indexerCharacters?: string, labelCopy?: string, labelCut?: string, labelPaste?: string, labelPasteAfter?: string, labelPasteBefore?: string, msgFetchingData?: string, msgNoData?: string}; - } - namespace ojListView { - type ContextByNode = - { - subId: string, key: K, index: number, parent?: Element, group?: boolean - } - } - namespace ojListView { - type ItemContext = - { - datasource: oj.DataProvider, index: number, key: K, data: D, parentElement: Element, depth?: number, parentKey?: K, leaf?: boolean - } - } - namespace ojListView { - type ItemsDropContext = - { - item: Element, position: 'before'|'after'|'inside', reorder: boolean - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojmasonrylayout/index.d.ts b/types/@oracle/oraclejet/ojs/ojmasonrylayout/index.d.ts deleted file mode 100644 index f355ffc77b..0000000000 --- a/types/@oracle/oraclejet/ojs/ojmasonrylayout/index.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -/// -declare namespace oj { - class ojMasonryLayout extends baseComponent { - reorderHandle: string|null; - translations: {labelCut?: string, labelPasteAfter?: string, labelPasteBefore?: string}; - onReorderHandleChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojMasonryLayout.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojMasonryLayout.ojAnimateStart)=> any; - onOjBeforeInsert: (event: oj.ojMasonryLayout.ojBeforeInsert)=> any; - onOjBeforeRemove: (event: oj.ojMasonryLayout.ojBeforeRemove)=> any; - onOjBeforeReorder: (event: oj.ojMasonryLayout.ojBeforeReorder)=> any; - onOjBeforeResize: (event: oj.ojMasonryLayout.ojBeforeResize)=> any; - onOjInsert: (event: oj.ojMasonryLayout.ojInsert)=> any; - onOjRemove: (event: oj.ojMasonryLayout.ojRemove)=> any; - onOjReorder: (event: oj.ojMasonryLayout.ojReorder)=> any; - onOjResize: (event: oj.ojMasonryLayout.ojResize)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojMasonryLayoutEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - insertTile(selector: string, index: number): void; - refresh(): void; - removeTile(selector: string): void; - resizeTile(selector: string, sizeStyleClass: string): void; - } - namespace ojMasonryLayout { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - - class ojBeforeInsert extends CustomEvent<{tile: Element, index: number, [propName: string]: any}> { - - } - - class ojBeforeRemove extends CustomEvent<{tile: Element, [propName: string]: any}> { - - } - - class ojBeforeReorder extends CustomEvent<{tile: Element, fromIndex: number, [propName: string]: any}> { - - } - - class ojBeforeResize extends CustomEvent<{tile: Element, previousSizeStyleClass: string, sizeStyleClass: string, [propName: string]: any}> { - - } - - class ojInsert extends CustomEvent<{tile: Element, index: number, [propName: string]: any}> { - - } - - class ojRemove extends CustomEvent<{tile: Element, [propName: string]: any}> { - - } - - class ojReorder extends CustomEvent<{tile: Element, fromIndex: number, toIndex: number, [propName: string]: any}> { - - } - - class ojResize extends CustomEvent<{tile: Element, previousSizeStyleClass: string, sizeStyleClass: string, [propName: string]: any}> { - - } - } - interface ojMasonryLayoutEventMap extends oj.baseComponentEventMap { - 'ojAnimateEnd': oj.ojMasonryLayout.ojAnimateEnd; - 'ojAnimateStart': oj.ojMasonryLayout.ojAnimateStart; - 'ojBeforeInsert': oj.ojMasonryLayout.ojBeforeInsert; - 'ojBeforeRemove': oj.ojMasonryLayout.ojBeforeRemove; - 'ojBeforeReorder': oj.ojMasonryLayout.ojBeforeReorder; - 'ojBeforeResize': oj.ojMasonryLayout.ojBeforeResize; - 'ojInsert': oj.ojMasonryLayout.ojInsert; - 'ojRemove': oj.ojMasonryLayout.ojRemove; - 'ojReorder': oj.ojMasonryLayout.ojReorder; - 'ojResize': oj.ojMasonryLayout.ojResize; - 'reorderHandleChanged': CustomEvent; - } - interface ojMasonryLayoutSettableProperties extends baseComponentSettableProperties { - reorderHandle: string|null; - translations: {labelCut?: string, labelPasteAfter?: string, labelPasteBefore?: string}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojmenu/index.d.ts b/types/@oracle/oraclejet/ojs/ojmenu/index.d.ts deleted file mode 100644 index cd2c08461c..0000000000 --- a/types/@oracle/oraclejet/ojs/ojmenu/index.d.ts +++ /dev/null @@ -1,87 +0,0 @@ -/// -declare namespace oj { - class ojMenu extends baseComponent { - disabled: boolean; - openOptions: oj.ojMenu.OpenOptions; - translations: {ariaFocusSkipLink?: string, labelCancel?: string}; - onDisabledChanged: (event: CustomEvent)=> any; - onOpenOptionsChanged: (event: CustomEvent)=> any; - onOjAction: (event: oj.ojMenu.ojAction)=> any; - onOjAnimateEnd: (event: oj.ojMenu.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojMenu.ojAnimateStart)=> any; - onOjBeforeOpen: (event: oj.ojMenu.ojBeforeOpen)=> any; - onOjClose: (event: oj.ojMenu.ojClose)=> any; - onOjOpen: (event: oj.ojMenu.ojOpen)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojMenuEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - open(event?: object, openOptions?: oj.ojMenu.OpenOptions): void; - refresh(): void; - } - namespace ojMenu { - class ojAction extends CustomEvent<{ [propName: string]: any}> { - - } - - class ojAnimateEnd extends CustomEvent<{element: Element, action: 'open'|'close', [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: 'open'|'close', element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - - class ojBeforeOpen extends CustomEvent<{ [propName: string]: any}> { - - } - - class ojClose extends CustomEvent<{event: Event, [propName: string]: any}> { - - } - - class ojOpen extends CustomEvent<{event: Event, [propName: string]: any}> { - - } - } - interface ojMenuEventMap extends oj.baseComponentEventMap { - 'ojAction': oj.ojMenu.ojAction; - 'ojAnimateEnd': oj.ojMenu.ojAnimateEnd; - 'ojAnimateStart': oj.ojMenu.ojAnimateStart; - 'ojBeforeOpen': oj.ojMenu.ojBeforeOpen; - 'ojClose': oj.ojMenu.ojClose; - 'ojOpen': oj.ojMenu.ojOpen; - 'disabledChanged': CustomEvent; - 'openOptionsChanged': CustomEvent; - } - interface ojMenuSettableProperties extends baseComponentSettableProperties { - disabled: boolean; - openOptions: oj.ojMenu.OpenOptions; - translations: {ariaFocusSkipLink?: string, labelCancel?: string}; - } - namespace ojMenu { - type OpenOptions = - { - display?: string, initialFocus?: string, launcher?: string|Element, position?: oj.ojMenu.Position - } - } - namespace ojMenu { - type Position = - { - my?: oj.ojMenu.PositionAlign, at?: oj.ojMenu.PositionAlign, offset?: oj.ojMenu.PositionPoint, of?: string|oj.ojMenu.PositionPoint, collision?: 'flip'|'fit'|'flipfit'|'flipcenter'|'none' - } - } - namespace ojMenu { - type PositionAlign = - { - vertical?: 'top'|'bottom'|'center', horizontal?: 'start'|'end'|'left'|'center'|'bottom' - } - } - namespace ojMenu { - type PositionPoint = - { - x?: number, y?: number - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojmenuselectmany/index.d.ts b/types/@oracle/oraclejet/ojs/ojmenuselectmany/index.d.ts deleted file mode 100644 index 0f380df2f2..0000000000 --- a/types/@oracle/oraclejet/ojs/ojmenuselectmany/index.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -/// -/// -declare namespace oj { - class ojMenuSelectMany extends JetElement { - disabled: boolean; - options: Array|oj.DataProvider|null; - value: Array; - onDisabledChanged: (event: CustomEvent)=> any; - onOptionsChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojMenuSelectManyEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getProperty(property: string): any; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - } - interface ojMenuSelectManyEventMap extends oj.JetElementEventMap { - 'disabledChanged': CustomEvent; - 'optionsChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojMenuSelectManySettableProperties extends JetSettableProperties { - disabled: boolean; - options: Array|oj.DataProvider|null; - value: Array; - } - namespace ojMenuSelectMany { - type Option = - { - id?: string, disabled?: boolean, label: string, value: any - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojmessage/index.d.ts b/types/@oracle/oraclejet/ojs/ojmessage/index.d.ts deleted file mode 100644 index 8be478bd06..0000000000 --- a/types/@oracle/oraclejet/ojs/ojmessage/index.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -declare namespace oj { - class ojMessage extends JetElement { - message: oj.ojMessage.Message; - translations: {categories?: {confirmation?: string, error?: string, info?: string, warning?: string}, labelCloseIcon?: string}; - onMessageChanged: (event: CustomEvent)=> any; - - onTranslationsChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojMessage.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojMessage.ojAnimateStart)=> any; - onOjClose: (event: oj.ojMessage.ojClose)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojMessageEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - close(): void; - getProperty(property: string): any; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - } - namespace ojMessage { - class ojAnimateEnd extends CustomEvent<{element: Element, action: 'open'|'close', [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{element: Element, action: 'open'|'close', endCallback: (()=> void), [propName: string]: any}> { - - } - - class ojClose extends CustomEvent<{message: object, [propName: string]: any}> { - - } - } - interface ojMessageEventMap extends oj.JetElementEventMap { - 'ojAnimateEnd': oj.ojMessage.ojAnimateEnd; - 'ojAnimateStart': oj.ojMessage.ojAnimateStart; - 'ojClose': oj.ojMessage.ojClose; - 'messageChanged': CustomEvent; - 'translationsChanged': CustomEvent; - } - interface ojMessageSettableProperties extends JetSettableProperties { - message: oj.ojMessage.Message; - translations: {categories?: {confirmation?: string, error?: string, info?: string, warning?: string}, labelCloseIcon?: string}; - } - namespace ojMessage { - type Message = - { - icon?: string, category?: string, severity?: 'error'|'warning'|'confirmation'|'info'|'none', timestamp?: string, summary?: string, detail?: string, autoTimeout?: number, closeAffordance?: 'none'|'defaults', sound?: string - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojmessages/index.d.ts b/types/@oracle/oraclejet/ojs/ojmessages/index.d.ts deleted file mode 100644 index 3246de390f..0000000000 --- a/types/@oracle/oraclejet/ojs/ojmessages/index.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -/// -/// -declare namespace oj { - class ojMessages extends JetElement { - display: 'general'|'notification'; - messages: Array | null | oj.DataProvider; - position: oj.ojMessages.Position|null; - translations: {ariaLiveRegion?: {navigationFromKeyboard?: string, navigationToKeyboard?: string, navigationToTouch?: string, newMessage?: string}, labelLandmark?: string}; - onDisplayChanged: (event: CustomEvent)=> any; - onMessagesChanged: (event: CustomEvent)=> any; - onPositionChanged: (event: CustomEvent)=> any; - - onTranslationsChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojMessagesEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - close(associated: object): void; - closeAll(closeFilter?: (message: oj.ojMessage.Message) => boolean): void; - getProperty(property: string): any; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - } - interface ojMessagesEventMap extends oj.JetElementEventMap { - 'displayChanged': CustomEvent; - 'messagesChanged': CustomEvent; - 'positionChanged': CustomEvent; - 'translationsChanged': CustomEvent; - } - interface ojMessagesSettableProperties extends JetSettableProperties { - display: 'general'|'notification'; - messages: Array | null | oj.DataProvider; - position: oj.ojMessages.Position|null; - translations: {ariaLiveRegion?: {navigationFromKeyboard?: string, navigationToKeyboard?: string, navigationToTouch?: string, newMessage?: string}, labelLandmark?: string}; - } - namespace ojMessages { - type Position = - { - my?: oj.ojMessages.PositionAlign, at?: oj.ojMessages.PositionAlign, offset?: oj.ojMessages.PositionPoint, of?: string|oj.ojMessages.PositionPoint, collision?: 'flip'|'fit'|'flipfit'|'none' - } - } - namespace ojMessages { - type PositionAlign = - { - vertical?: 'top'|'bottom'|'center', horizontal?: 'start'|'end'|'left'|'center'|'bottom' - } - } - namespace ojMessages { - type PositionPoint = - { - x?: number, y?: number - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojmessaging/index.d.ts b/types/@oracle/oraclejet/ojs/ojmessaging/index.d.ts deleted file mode 100644 index e65a3ddcc3..0000000000 --- a/types/@oracle/oraclejet/ojs/ojmessaging/index.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -declare namespace oj { - class Message { - detail: string; - severity: string|number; - summary: string; - constructor(summary: string, detail: string, severity?: number|string); - static getMaxSeverity(messages?: Array): number; - static getSeverityLevel(severity?: string|number|undefined): number; - static getSeverityType(level?: string|number|undefined): string; - static isValid(messages: Array): boolean; - } - namespace Message { - enum SEVERITY_LEVEL { - FATAL = "5", - ERROR = "4", - WARNING = "3", - INFO = "2", - CONFIRMATION = "1", - } - enum SEVERITY_TYPE { - CONFIRMATION = "confirmation", - INFO = "info", - WARNING = "warning", - ERROR = "error", - FATAL = "fatal", - } - } - - -} diff --git a/types/@oracle/oraclejet/ojs/ojmodel/index.d.ts b/types/@oracle/oraclejet/ojs/ojmodel/index.d.ts deleted file mode 100644 index 6e3ebe4118..0000000000 --- a/types/@oracle/oraclejet/ojs/ojmodel/index.d.ts +++ /dev/null @@ -1,169 +0,0 @@ -declare namespace oj { - class Collection { - changes: Array; - comparator: null|string|((param0: oj.Model, param1?: oj.Model)=> number); - customPagingOptions: ((response: object)=> oj.Collection.CustomPagingOptionsReturn|null)|null; - customURL: ((param0: string, param1: oj.Collection, param2: object)=> string|Object|null)|null; - fetchSize: number; - hasMore: boolean; - lastFetchCount: number; - lastFetchSize: number; - length: number; - model: object; - modelLimit: number; - models: Array; - offset: number; - omitLanguageHeader: boolean; - parse: ((param0: object)=> Object); - sortDirection: number; - totalResults: number; - url: null|string|(()=> string); - constructor(models?: Array, options?: object); - static extend(properties?: {parse?: (data: any)=> any, model?: oj.Model, url?: string, initialize?: (models: Array, options: Object)=> void, comparator?: null|string|((model1: oj.Model, model2?: oj.Model)=> number), fetchSize?: number, modelLimit?: number, [propName: string]: any}, classProperties?: object): any; - abort(): Promise; - add(m: oj.Model|object|Array|Array, options?: {silent?: boolean, at?: number, merge?: boolean, sort?: boolean, force?: boolean, deferred?: boolean, [propName: string]: any}): Promise>|Array; - any(iterator: ((param0: object)=> void), context?: object): boolean; - at(index: number, options?: {fetchSize?: number, deferred?: boolean, [propName: string]: any}): oj.Model|Promise|null; - clone(): oj.Collection; - contains(model: object, options?: object): boolean|Promise; - create(attributes?: object, options?: {silent?: boolean, at?: number, merge?: boolean, sort?: boolean, force?: boolean, deferred?: boolean, [propName: string]: any}): oj.Model|boolean|Promise; - difference(...var_args: (Array)[]): Array; - each(iterator: ((param0: oj.Model)=> void), context?: object): undefined; - fetch(options?: {success?: (collection: oj.Collection, response: Object, options: Object)=> void, error?: (collection: oj.Collection, xhr: Object, options: Object)=> void, add?: boolean, set?: boolean, startIndex?: number, startID?: Object, since?: Object, until?: Object, fetchSize?: number, [propName: string]: any}): object; - filter(iterator: ((param0: oj.Model)=> void), context?: object): Array; - findWhere(attrs: object|Array, options?: {deferred?: boolean, [propName: string]: any}): oj.Model|Promise; - first(n?: number, options?: object): Array|null|Promise; - get(id: object|string, options?: object): oj.Model|null|Promise; - getByCid(clientId: string): oj.Model|null; - groupBy(iterator: string|((param0: oj.Model)=> object), context?: object): object; - include(model: object, options?: object): boolean|Promise; - indexBy(iterator: string|((param0: oj.Model)=> void), context?: object): object; - indexOf(model: object, options?: object): number|Promise; - initial(n?: number): Array; - isEmpty(): boolean; - isRangeLocal(start: number, count: number): boolean; - last(n?: number, options?: object): Promise|Array|null; - lastIndexOf(model: oj.Model, fromIndex?: number): number; - listenTo(otherObj: object, eventType: string, callback: Function): undefined; - listenToOnce(otherObj: object, eventType: string, callback: Function): undefined; - map(iterator: ((param0: oj.Model)=> object), context?: object): Array; - max(iterator: ((param0: oj.Model)=> object), context?: object): object; - min(iterator: ((param0: object)=> void), context?: object): object; - modelId(attrs: object): null|string; - next(n: number, options?: {success?: (collection: oj.Collection, response: Object, options: Object)=> void, error?: (collection: oj.Collection, xhr: Object, options: Object)=> void, [propName: string]: any}): object|null; - off(eventType?: string|object, callback?: Function, context?: object): undefined; - on(eventType: string|object, callback: Function, context?: object): undefined; - once(eventType: string, callback: Function, context?: object): undefined; - pluck(attr: string): Array; - pop(options?: {silent?: boolean, deferred?: boolean, [propName: string]: any}): oj.Model|Promise; - previous(n: number, options?: {success?: (collection: oj.Collection, response: Object, options: Object)=> void, error?: (collection: oj.Collection, xhr: Object, options: Object)=> void, [propName: string]: any}): object; - push(m: oj.Model|object, options?: {silent?: boolean, at?: number, merge?: boolean, sort?: boolean, force?: boolean, deferred?: boolean, [propName: string]: any}): Promise>|undefined; - refresh(options?: {silent?: boolean, startIndex?: number, [propName: string]: any}): Promise; - remove(m: oj.Model|Array, options?: object): Array|object; - reset(data?: object, options?: {silent?: boolean, [propName: string]: any}): oj.Model|Array; - rest(n?: number, options?: object): Array|Promise; - set(models: object, options?: {add?: boolean, remove?: boolean, merge?: boolean, silent?: boolean, deferred?: boolean, [propName: string]: any}): Promise|null; - setFetchSize(n: number): undefined; - setModelLimit(n: number): undefined; - setRangeLocal(start: number, count: number): Promise; - shift(options?: object): oj.Model|Promise|null; - size(): number; - slice(start: number, end?: number, options?: object): Promise>|Array; - sort(options?: {silent?: boolean, startIndex?: number, [propName: string]: any}): Promise|null; - sortBy(iterator: string|((param0: oj.Model)=> object), context?: object): Array; - sortedIndex(comparator: string|((param0: oj.Model, param1?: oj.Model)=> object)): number; - stopListening(otherObj?: object, eventType?: string, callback?: Function): undefined; - sync(method: string, collection: oj.Collection, options?: {success?: (json?: Array)=> void, error?: (xhr: Object, status: Object, error: Object)=> void, [propName: string]: any}): object; - toJSON(): Array; - trigger(eventType: string): undefined; - unshift(m: object, options?: {silent?: boolean, at?: number, merge?: boolean, sort?: boolean, force?: boolean, deferred?: boolean, [propName: string]: any}): Promise>|Array; - whenReady(): Promise; - where(attrs: object|Array, options?: object): Promise>|Array; - whereToCollection(attrs: object|Array, options?: object): oj.Collection|Promise; - without(...var_args: (oj.Model)[]): Array; - } - namespace Collection { - type CustomPagingOptionsReturn = - { - totalResults?: number, limit?: number, count?: number, offset?: number, hasMore?: boolean - } - } - namespace Collection { - type SetRangeLocalPromise = - { - start: number, count: number, models: Array - } - } - -} -declare namespace oj { - class Model { - attributes: object; - customURL: ((param0: string, param1: oj.Model, param2: object)=> string|Object|null)|null; - defaults: object; - id: string|null; - idAttribute: string|null; - omitLanguageHeader: boolean; - parse: ((param0: object)=> Object); - parseSave: ((param0: object)=> Object); - urlRoot: string|null; - validate: ((param0: object, param1: Object)=> string|Object|null)|null; - validationError: string|object|null; - constructor(attributes?: object, options?: object); - static extend(properties?: {parse?: (data: any)=> any, parseSave?: (data: any)=> any, urlRoot?: string, initialize?: (models: Array, options: Object)=> void, validate?: null|object|string|((attributes: Object, options?: oj.Model)=> number), [propName: string]: any}, classProperties?: object): any; - changedAttributes(attributes?: object): object|boolean; - clear(options?: object): oj.Model|boolean; - clone(): oj.Model; - destroy(options?: {success?: (model: oj.Model, response: Object, options: Object)=> void, error?: (model: oj.Model, xhr: Object, options: Object)=> void, wait?: boolean, [propName: string]: any}): boolean; - fetch(options?: {success?: (model: oj.Model, response: Object, options: Object)=> void, error?: (model: oj.Model, xhr: Object, options: Object)=> void, [propName: string]: any}): object; - get(property: string): object; - has(property: string): boolean; - hasChanged(attribute?: string): boolean; - invert(): object; - isNew(): boolean; - isValid(): boolean; - keys(): Array; - listenTo(otherObj: object, eventType: string, callback: Function): undefined; - listenToOnce(otherObj: object, eventType: string, callback: Function): undefined; - matches(attrs: object): ((param0: oj.Model)=> boolean); - off(eventType?: string|object, callback?: Function, context?: object): undefined; - omit(keys: Array|object): object; - on(eventType: string|object, callback: Function, context?: object): undefined; - once(eventType: string, callback: Function, context?: object): undefined; - pairs(): object; - pick(keys: Array|object): object; - previous(attr: string): object; - previousAttributes(): object; - save(attributes?: object, options?: {success?: (model: oj.Model, response: Object, options: Object)=> void, error?: (model: oj.Model, xhr: Object, options: Object)=> void, contentType?: string, valdiate?: boolean, wait?: boolean, patch?: boolean, attrs?: Object, [propName: string]: any}): object|boolean; - set(property: string|object, value?: object, options?: object): oj.Model|boolean; - stopListening(otherObj?: object, eventType?: string, callback?: Function): undefined; - sync(method: string, model: oj.Model, options?: object): object; - toJSON(): object; - trigger(eventType: string): undefined; - unset(property: string, options?: object): boolean; - url(): string|null; - values(): Array; - } - -} -declare namespace oj { - class OAuth { - constructor(attributes: object, header: string); - cleanAccessTokenRequest(): undefined; - cleanAccessTokenResponse(): undefined; - clientCredentialGrant(): undefined; - getAccessTokenRequest(): object; - getAccessTokenResponse(): object; - getHeader(): object; - isInitialized(): boolean; - setAccessTokenRequest(data: object): undefined; - setAccessTokenResponse(data: object): undefined; - } - -} -declare namespace oj { - class URLError { - constructor(); - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojmodule-element-utils/index.d.ts b/types/@oracle/oraclejet/ojs/ojmodule-element-utils/index.d.ts deleted file mode 100644 index f2b9b3db7c..0000000000 --- a/types/@oracle/oraclejet/ojs/ojmodule-element-utils/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export class ModuleElementUtils { - } - diff --git a/types/@oracle/oraclejet/ojs/ojmodule-element/index.d.ts b/types/@oracle/oraclejet/ojs/ojmodule-element/index.d.ts deleted file mode 100644 index 5129c36e5a..0000000000 --- a/types/@oracle/oraclejet/ojs/ojmodule-element/index.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -declare namespace oj { - interface ModuleElementAnimation { - animate(context: {node: Node, isInitial: boolean, oldViewModel: object, newViewModel: object, newViewParent: Node, oldViewParent: Node, removeOldView: Function, insertNewView: Function, oldDomNodes: Array}): Promise; - canAnimate(context: {node: Node, isInitial: boolean, oldViewModel: object, newViewModel: object}): boolean; - prepareAnimation(context: {node: Node, isInitial: boolean, oldViewModel: object, newViewModel: object}): object; - } - -} -declare namespace oj { - class ojModule { - animation: object; - config: {cleanupMode: 'onDisconnect'|'none', view: Array, viewModel: object}; - onAnimationChanged: (event: CustomEvent)=> any; - onConfigChanged: (event: CustomEvent)=> any; - onOjTransitionEnd: (event: oj.ojModule.ojTransitionEnd)=> any; - onOjTransitionStart: (event: oj.ojModule.ojTransitionStart)=> any; - onOjViewConnected: (event: oj.ojModule.ojViewConnected)=> any; - onOjViewDisconnected: (event: oj.ojModule.ojViewDisconnected)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojModuleEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojModule { - class ojTransitionEnd extends CustomEvent<{viewModel: object, [propName: string]: any}> { - - } - - class ojTransitionStart extends CustomEvent<{viewModel: object, [propName: string]: any}> { - - } - - class ojViewConnected extends CustomEvent<{viewModel: object, [propName: string]: any}> { - - } - - class ojViewDisconnected extends CustomEvent<{viewModel: object, view: Array, [propName: string]: any}> { - - } - } - interface ojModuleEventMap extends oj.JetElementEventMap { - 'ojTransitionEnd': oj.ojModule.ojTransitionEnd; - 'ojTransitionStart': oj.ojModule.ojTransitionStart; - 'ojViewConnected': oj.ojModule.ojViewConnected; - 'ojViewDisconnected': oj.ojModule.ojViewDisconnected; - 'animationChanged': CustomEvent; - 'configChanged': CustomEvent; - } - interface ojModuleSettableProperties extends JetSettableProperties { - animation: object; - config: {cleanupMode: 'onDisconnect'|'none', view: Array, viewModel: object}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojmodule/index.d.ts b/types/@oracle/oraclejet/ojs/ojmodule/index.d.ts deleted file mode 100644 index 3cf1b7ee7e..0000000000 --- a/types/@oracle/oraclejet/ojs/ojmodule/index.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/// -declare namespace oj { - namespace ModuleBinding { - var defaults: {viewPath: string, viewSuffix: string, modelPath: string, initializeMethod: string, disposeMethod: string, activatedHandler: string, attachedHandler: string, detachedHandler: string, bindingsAppliedHandler: string, deactivatedHandler: string, transitionCompletedHandler: string}; - } - -} -declare namespace oj.ModuleBinding { - interface ConventionMethods { - dispose(info: {element: Node, valueAccessor: Function}): void; - handleActivated(info: {element: Node, valueAccessor: Function}): Promise|undefined; - handleAttached(info: {element: Node, valueAccessor: Function, fromCache: boolean}): void; - handleBindingsApplied(info: {element: Node, valueAccessor: Function}): void; - handleDeactivated(info: {element: Node, valueAccessor: Function}): void; - handleDetached(info: {element: Node, valueAccessor: Function, cachedNodes: Array}): void; - handleTransitionCompleted(info: {element: Node, valueAccessor: Function}): void; - initialize(info: {element: Node, valueAccessor: Function}): object|undefined; - } - -} -declare namespace ojModule { - var Options: {view: Promise|string|Array|DocumentFragment, viewModel: Promise|Function|object, name: string, viewName: string, require: Function|{instance: any, viewPath: string, modelPath: string}, viewModelFactory: object, params: object, createViewFunction: string, cacheKey: string, lifecycleListener: object, animation: object}; - } - diff --git a/types/@oracle/oraclejet/ojs/ojmoduleanimations/index.d.ts b/types/@oracle/oraclejet/ojs/ojmoduleanimations/index.d.ts deleted file mode 100644 index 6d0592dbea..0000000000 --- a/types/@oracle/oraclejet/ojs/ojmoduleanimations/index.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/// -declare namespace oj { - namespace ModuleAnimations { - var coverStart: oj.ModuleElementAnimation; - var coverUp: oj.ModuleElementAnimation; - var fade: oj.ModuleElementAnimation; - var navChild: oj.ModuleElementAnimation; - var navParent: oj.ModuleElementAnimation; - var navSiblingEarlier: oj.ModuleElementAnimation; - var navSiblingLater: oj.ModuleElementAnimation; - var pushEnd: oj.ModuleElementAnimation; - var pushStart: oj.ModuleElementAnimation; - var revealDown: oj.ModuleElementAnimation; - var revealEnd: oj.ModuleElementAnimation; - var zoomIn: oj.ModuleElementAnimation; - var zoomOut: oj.ModuleElementAnimation; - function createAnimation(oldViewEffect: {effect: oj.AnimationUtils.AnimationMethods, [key:string]: any}|oj.AnimationUtils.AnimationMethods|null, newViewEffect: {effect: oj.AnimationUtils.AnimationMethods, [key:string]: any}|oj.AnimationUtils.AnimationMethods|null, newViewOnTop: boolean): oj.ModuleElementAnimation; - function switcher(callback: (param0: oj.ModuleAnimations.SwitcherCallBackParam) => oj.ModuleAnimations.Animations): oj.ModuleElementAnimation; - } - namespace ModuleAnimations { - type Animations = 'coverStart'|'coverUp'|'fade'|'navChild'|'navParent'|'navSiblingEarlier'|'navSiblingLater'|'pushEnd'|'pushStart'|'revealDown'|'revealEnd'|'zoomIn'|'zoomOut'; - } - namespace ModuleAnimations { - type SwitcherCallBackParam = - { - node: Element, valueAccessor: (()=> any), isInitial: boolean, oldViewModel: any, newViewModel: any - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojnavigationlist/index.d.ts b/types/@oracle/oraclejet/ojs/ojnavigationlist/index.d.ts deleted file mode 100644 index 9d1c348467..0000000000 --- a/types/@oracle/oraclejet/ojs/ojnavigationlist/index.d.ts +++ /dev/null @@ -1,253 +0,0 @@ -/// -/// -/// -declare namespace oj { - class ojNavigationList extends baseComponent> { - as: string; - currentItem: K; - data: oj.DataProvider|null; - display: 'all'|'icons'; - drillMode: 'none'|'collapsible'|'sliding'; - edge: 'top'|'start'; - expanded: KeySet.KeySet; - hierarchyMenuThreshold: number; - item: {renderer?: (((context: oj.ojNavigationList.ItemContext) => void)|null), selectable?: (((context: oj.ojNavigationList.ItemContext) => boolean)|boolean)}; - overflow: 'popup'|'hidden'; - rootLabel: string|null; - selection: K; - translations: {defaultRootLabel?: string, hierMenuBtnLabel?: string, previousIcon?: string}; - onAsChanged: (event: CustomEvent)=> any; - onCurrentItemChanged: (event: CustomEvent)=> any; - onDataChanged: (event: CustomEvent)=> any; - onDisplayChanged: (event: CustomEvent)=> any; - onDrillModeChanged: (event: CustomEvent)=> any; - onEdgeChanged: (event: CustomEvent)=> any; - onExpandedChanged: (event: CustomEvent)=> any; - onHierarchyMenuThresholdChanged: (event: CustomEvent)=> any; - onItemChanged: (event: CustomEvent)=> any; - onOverflowChanged: (event: CustomEvent)=> any; - onRootLabelChanged: (event: CustomEvent)=> any; - onSelectionChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojNavigationList.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojNavigationList.ojAnimateStart)=> any; - onOjBeforeCollapse: (event: oj.ojNavigationList.ojBeforeCollapse)=> any; - onOjBeforeCurrentItem: (event: oj.ojNavigationList.ojBeforeCurrentItem)=> any; - onOjBeforeExpand: (event: oj.ojNavigationList.ojBeforeExpand)=> any; - onOjBeforeSelect: (event: oj.ojNavigationList.ojBeforeSelect)=> any; - onOjCollapse: (event: oj.ojNavigationList.ojCollapse)=> any; - onOjExpand: (event: oj.ojNavigationList.ojExpand)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojNavigationListEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getContextByNode(node: Element): oj.ojNavigationList.NodeContext|null; - refresh(): void; - } - namespace ojNavigationList { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - - class ojBeforeCollapse extends CustomEvent<{key: any, item: Element, [propName: string]: any}> { - - } - - class ojBeforeCurrentItem extends CustomEvent<{previousKey: any, previousItem: Element, key: any, item: Element, [propName: string]: any}> { - - } - - class ojBeforeExpand extends CustomEvent<{key: any, item: Element, [propName: string]: any}> { - - } - - class ojBeforeSelect extends CustomEvent<{key: any, item: Element, [propName: string]: any}> { - - } - - class ojCollapse extends CustomEvent<{key: any, item: Element, [propName: string]: any}> { - - } - - class ojExpand extends CustomEvent<{key: any, item: Element, [propName: string]: any}> { - - } - } - interface ojNavigationListEventMap extends oj.baseComponentEventMap { - 'ojAnimateEnd': oj.ojNavigationList.ojAnimateEnd; - 'ojAnimateStart': oj.ojNavigationList.ojAnimateStart; - 'ojBeforeCollapse': oj.ojNavigationList.ojBeforeCollapse; - 'ojBeforeCurrentItem': oj.ojNavigationList.ojBeforeCurrentItem; - 'ojBeforeExpand': oj.ojNavigationList.ojBeforeExpand; - 'ojBeforeSelect': oj.ojNavigationList.ojBeforeSelect; - 'ojCollapse': oj.ojNavigationList.ojCollapse; - 'ojExpand': oj.ojNavigationList.ojExpand; - 'asChanged': CustomEvent; - 'currentItemChanged': CustomEvent; - 'dataChanged': CustomEvent; - 'displayChanged': CustomEvent; - 'drillModeChanged': CustomEvent; - 'edgeChanged': CustomEvent; - 'expandedChanged': CustomEvent; - 'hierarchyMenuThresholdChanged': CustomEvent; - 'itemChanged': CustomEvent; - 'overflowChanged': CustomEvent; - 'rootLabelChanged': CustomEvent; - 'selectionChanged': CustomEvent; - } - interface ojNavigationListSettableProperties extends baseComponentSettableProperties { - as: string; - currentItem: K; - data: oj.DataProvider|null; - display: 'all'|'icons'; - drillMode: 'none'|'collapsible'|'sliding'; - edge: 'top'|'start'; - expanded: KeySet.KeySet; - hierarchyMenuThreshold: number; - item: {renderer?: (((context: oj.ojNavigationList.ItemContext) => void)|null), selectable?: (((context: oj.ojNavigationList.ItemContext) => boolean)|boolean)}; - overflow: 'popup'|'hidden'; - rootLabel: string|null; - selection: K; - translations: {defaultRootLabel?: string, hierMenuBtnLabel?: string, previousIcon?: string}; - } - namespace ojNavigationList { - type ItemContext = - { - componentElement: Element, datasource?: oj.DataProvider, index: number, key: any, data: any, parentElement: Element - } - } - namespace ojNavigationList { - type NodeContext = - { - subId: string, index: number, key: K, group: boolean, parent?: Element - } - } - -} -declare namespace oj { - class ojTabBar extends baseComponent> { - as: string; - currentItem: any; - data: oj.DataProvider|null; - display: 'all'|'icons'; - edge: 'top'|'bottom'|'start'|'end'; - item: {renderer?: (((context: oj.ojTabBar.ItemContext) => void)|null), selectable?: (((context: oj.ojTabBar.ItemContext) => boolean)|boolean)}; - overflow: 'popup'|'hidden'; - reorderable: 'enabled'|'disabled'; - selection: any; - truncation: 'none'|'progressive'; - translations: {accessibleReorderAfterItem?: string, accessibleReorderBeforeItem?: string, accessibleReorderTouchInstructionText?: string, labelCut?: string, labelPasteAfter?: string, labelPasteBefore?: string, labelRemove?: string, msgFetchingData?: string, msgNoData?: string, overflowItemLabel?: string, removeCueText?: string, selectedLabel?: string}; - onAsChanged: (event: CustomEvent)=> any; - onCurrentItemChanged: (event: CustomEvent)=> any; - onDataChanged: (event: CustomEvent)=> any; - onDisplayChanged: (event: CustomEvent)=> any; - onEdgeChanged: (event: CustomEvent)=> any; - onItemChanged: (event: CustomEvent)=> any; - onOverflowChanged: (event: CustomEvent)=> any; - onReorderableChanged: (event: CustomEvent)=> any; - onSelectionChanged: (event: CustomEvent)=> any; - onTruncationChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojTabBar.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojTabBar.ojAnimateStart)=> any; - onOjBeforeCurrentItem: (event: oj.ojTabBar.ojBeforeCurrentItem)=> any; - onOjBeforeDeselect: (event: oj.ojTabBar.ojBeforeDeselect)=> any; - onOjBeforeRemove: (event: oj.ojTabBar.ojBeforeRemove)=> any; - onOjBeforeSelect: (event: oj.ojTabBar.ojBeforeSelect)=> any; - onOjDeselect: (event: oj.ojTabBar.ojDeselect)=> any; - onOjRemove: (event: oj.ojTabBar.ojRemove)=> any; - onOjReorder: (event: oj.ojTabBar.ojReorder)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojTabBarEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getContextByNode(node: Element): oj.ojTabBar.NodeContext|null; - refresh(): void; - } - namespace ojTabBar { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - - class ojBeforeCurrentItem extends CustomEvent<{previousKey: any, previousItem: Element, key: any, item: Element, [propName: string]: any}> { - - } - - class ojBeforeDeselect extends CustomEvent<{fromKey: any, fromItem: Element, toKey: any, toItem: Element, [propName: string]: any}> { - - } - - class ojBeforeRemove extends CustomEvent<{item: Element, key: any, [propName: string]: any}> { - - } - - class ojBeforeSelect extends CustomEvent<{key: any, item: Element, [propName: string]: any}> { - - } - - class ojDeselect extends CustomEvent<{fromKey: any, fromItem: Element, toKey: any, toItem: Element, [propName: string]: any}> { - - } - - class ojRemove extends CustomEvent<{item: Element, key: any, [propName: string]: any}> { - - } - - class ojReorder extends CustomEvent<{item: Element, position: 'before'|'after', reference: Element, [propName: string]: any}> { - - } - } - interface ojTabBarEventMap extends oj.baseComponentEventMap { - 'ojAnimateEnd': oj.ojTabBar.ojAnimateEnd; - 'ojAnimateStart': oj.ojTabBar.ojAnimateStart; - 'ojBeforeCurrentItem': oj.ojTabBar.ojBeforeCurrentItem; - 'ojBeforeDeselect': oj.ojTabBar.ojBeforeDeselect; - 'ojBeforeRemove': oj.ojTabBar.ojBeforeRemove; - 'ojBeforeSelect': oj.ojTabBar.ojBeforeSelect; - 'ojDeselect': oj.ojTabBar.ojDeselect; - 'ojRemove': oj.ojTabBar.ojRemove; - 'ojReorder': oj.ojTabBar.ojReorder; - 'asChanged': CustomEvent; - 'currentItemChanged': CustomEvent; - 'dataChanged': CustomEvent; - 'displayChanged': CustomEvent; - 'edgeChanged': CustomEvent; - 'itemChanged': CustomEvent; - 'overflowChanged': CustomEvent; - 'reorderableChanged': CustomEvent; - 'selectionChanged': CustomEvent; - 'truncationChanged': CustomEvent; - } - interface ojTabBarSettableProperties extends baseComponentSettableProperties { - as: string; - currentItem: any; - data: oj.DataProvider|null; - display: 'all'|'icons'; - edge: 'top'|'bottom'|'start'|'end'; - item: {renderer?: (((context: oj.ojTabBar.ItemContext) => void)|null), selectable?: (((context: oj.ojTabBar.ItemContext) => boolean)|boolean)}; - overflow: 'popup'|'hidden'; - reorderable: 'enabled'|'disabled'; - selection: any; - truncation: 'none'|'progressive'; - translations: {accessibleReorderAfterItem?: string, accessibleReorderBeforeItem?: string, accessibleReorderTouchInstructionText?: string, labelCut?: string, labelPasteAfter?: string, labelPasteBefore?: string, labelRemove?: string, msgFetchingData?: string, msgNoData?: string, overflowItemLabel?: string, removeCueText?: string, selectedLabel?: string}; - } - namespace ojTabBar { - type ItemContext = - { - componentElement: Element, datasource?: oj.DataProvider, index: number, key: K, data: D, parentElement: Element - } - } - namespace ojTabBar { - type NodeContext = - { - subId: string, index: number, key: K - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojnbox/index.d.ts b/types/@oracle/oraclejet/ojs/ojnbox/index.d.ts deleted file mode 100644 index 454774c4bc..0000000000 --- a/types/@oracle/oraclejet/ojs/ojnbox/index.d.ts +++ /dev/null @@ -1,251 +0,0 @@ -/// -/// -declare namespace oj { - class ojNBox extends dvtBaseComponent> { - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - as: string; - cellContent: 'counts'|'auto'; - cellMaximize: 'off'|'on'; - cells: Promise>|null; - columns: Promise>|null; - columnsTitle: string; - countLabel: ((context: oj.ojNBox.CountLabelContext) => (string|null)); - data: oj.DataProvider|null; - groupAttributes: 'color'|'indicatorColor'|'indicatorIconColor'|'indicatorIconPattern'|'indicatorIconShape'; - groupBehavior: 'acrossCells'|'none'|'withinCell'; - hiddenCategories: Array; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - labelTruncation: 'ifRequired'|'on'; - maximizedColumn: string; - maximizedRow: string; - otherColor: string; - otherThreshold: number; - rows: Promise>|null; - rowsTitle: string; - selection: Array; - selectionMode: 'none'|'single'|'multiple'; - styleDefaults: {animationDuration: number, cellDefaults: {labelHalign: 'center'|'end'|'start', labelStyle: object, maximizedSvgStyle: object, minimizedSvgStyle: object, showCount: 'on'|'off'|'auto', svgStyle: object}, columnLabelStyle: object, columnsTitleStyle: object, hoverBehaviorDelay: number, nodeDefaults: {borderColor: string, borderWidth: number, color: string, iconDefaults: {borderColor: string, borderRadius: string, borderWidth: number, color: string, height: number, opacity: number, pattern: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none', shape: 'circle'|'ellipse'|'square'|'plus'|'diamond'|'triangleUp'|'triangleDown'|'human'|'rectangle'|'star', source: string, width: number}, indicatorColor: string, indicatorIconDefaults: {borderColor: string, borderRadius: string, borderWidth: number, color: string, height: number, opacity: number, pattern: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none', shape: 'circle'|'ellipse'|'square'|'plus'|'diamond'|'triangleUp'|'triangleDown'|'human'|'rectangle'|'star', source: string, width: number}, labelStyle: object, secondaryLabelStyle: object}, rowLabelStyle: object, rowsTitleStyle: object}; - tooltip: {renderer: ((context: oj.ojNBox.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))|null}; - touchResponse: 'touchStart'|'auto'; - translations: {componentName?: string, highlightedCount?: string, labelAdditionalData?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelGroup?: string, labelInvalidData?: string, labelNoData?: string, labelOther?: string, labelSize?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; - onAnimationOnDisplayChanged: (event: CustomEvent)=> any; - onAsChanged: (event: CustomEvent)=> any; - onCellContentChanged: (event: CustomEvent)=> any; - onCellMaximizeChanged: (event: CustomEvent)=> any; - onCellsChanged: (event: CustomEvent)=> any; - onColumnsChanged: (event: CustomEvent)=> any; - onColumnsTitleChanged: (event: CustomEvent)=> any; - onCountLabelChanged: (event: CustomEvent)=> any; - onDataChanged: (event: CustomEvent)=> any; - onGroupAttributesChanged: (event: CustomEvent)=> any; - onGroupBehaviorChanged: (event: CustomEvent)=> any; - onHiddenCategoriesChanged: (event: CustomEvent)=> any; - onHighlightMatchChanged: (event: CustomEvent)=> any; - onHighlightedCategoriesChanged: (event: CustomEvent)=> any; - onHoverBehaviorChanged: (event: CustomEvent)=> any; - onLabelTruncationChanged: (event: CustomEvent)=> any; - onMaximizedColumnChanged: (event: CustomEvent)=> any; - onMaximizedRowChanged: (event: CustomEvent)=> any; - onOtherColorChanged: (event: CustomEvent)=> any; - onOtherThresholdChanged: (event: CustomEvent)=> any; - onRowsChanged: (event: CustomEvent)=> any; - onRowsTitleChanged: (event: CustomEvent)=> any; - onSelectionChanged: (event: CustomEvent)=> any; - onSelectionModeChanged: (event: CustomEvent)=> any; - onStyleDefaultsChanged: (event: CustomEvent)=> any; - onTooltipChanged: (event: CustomEvent)=> any; - onTouchResponseChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojNBoxEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getCell(rowValue: string, columnValue: string): object|null; - getColumn(columnValue: string): object|null; - getColumnCount(): number; - getColumnsTitle(): string; - getContextByNode(node: Element): object|null; - getDialog(): object|null; - getGroupBehavior(): string; - getGroupNode(groupCategory: string): object|null; - getRow(rowValue: string): object|null; - getRowCount(): number; - getRowsTitle(): string; - } - interface ojNBoxEventMap extends oj.dvtBaseComponentEventMap { - 'animationOnDataChangeChanged': CustomEvent; - 'animationOnDisplayChanged': CustomEvent; - 'asChanged': CustomEvent; - 'cellContentChanged': CustomEvent; - 'cellMaximizeChanged': CustomEvent; - 'cellsChanged': CustomEvent; - 'columnsChanged': CustomEvent; - 'columnsTitleChanged': CustomEvent; - 'countLabelChanged': CustomEvent; - 'dataChanged': CustomEvent; - 'groupAttributesChanged': CustomEvent; - 'groupBehaviorChanged': CustomEvent; - 'hiddenCategoriesChanged': CustomEvent; - 'highlightMatchChanged': CustomEvent; - 'highlightedCategoriesChanged': CustomEvent; - 'hoverBehaviorChanged': CustomEvent; - 'labelTruncationChanged': CustomEvent; - 'maximizedColumnChanged': CustomEvent; - 'maximizedRowChanged': CustomEvent; - 'otherColorChanged': CustomEvent; - 'otherThresholdChanged': CustomEvent; - 'rowsChanged': CustomEvent; - 'rowsTitleChanged': CustomEvent; - 'selectionChanged': CustomEvent; - 'selectionModeChanged': CustomEvent; - 'styleDefaultsChanged': CustomEvent; - 'tooltipChanged': CustomEvent; - 'touchResponseChanged': CustomEvent; - } - interface ojNBoxSettableProperties extends dvtBaseComponentSettableProperties { - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - as: string; - cellContent: 'counts'|'auto'; - cellMaximize: 'off'|'on'; - cells: Array|Promise>|null; - columns: Array|Promise>|null; - columnsTitle: string; - countLabel: ((context: oj.ojNBox.CountLabelContext) => (string|null)); - data: oj.DataProvider|null; - groupAttributes: 'color'|'indicatorColor'|'indicatorIconColor'|'indicatorIconPattern'|'indicatorIconShape'; - groupBehavior: 'acrossCells'|'none'|'withinCell'; - hiddenCategories: Array; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - labelTruncation: 'ifRequired'|'on'; - maximizedColumn: string; - maximizedRow: string; - otherColor: string; - otherThreshold: number; - rows: Array|Promise>|null; - rowsTitle: string; - selection: Array; - selectionMode: 'none'|'single'|'multiple'; - styleDefaults: {animationDuration: number, cellDefaults: {labelHalign: 'center'|'end'|'start', labelStyle: object, maximizedSvgStyle: object, minimizedSvgStyle: object, showCount: 'on'|'off'|'auto', svgStyle: object}, columnLabelStyle: object, columnsTitleStyle: object, hoverBehaviorDelay: number, nodeDefaults: {borderColor: string, borderWidth: number, color: string, iconDefaults: {borderColor: string, borderRadius: string, borderWidth: number, color: string, height: number, opacity: number, pattern: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none', shape: 'circle'|'ellipse'|'square'|'plus'|'diamond'|'triangleUp'|'triangleDown'|'human'|'rectangle'|'star', source: string, width: number}, indicatorColor: string, indicatorIconDefaults: {borderColor: string, borderRadius: string, borderWidth: number, color: string, height: number, opacity: number, pattern: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none', shape: 'circle'|'ellipse'|'square'|'plus'|'diamond'|'triangleUp'|'triangleDown'|'human'|'rectangle'|'star', source: string, width: number}, labelStyle: object, secondaryLabelStyle: object}, rowLabelStyle: object, rowsTitleStyle: object}; - tooltip: {renderer: ((context: oj.ojNBox.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))|null}; - touchResponse: 'touchStart'|'auto'; - translations: {componentName?: string, highlightedCount?: string, labelAdditionalData?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelGroup?: string, labelInvalidData?: string, labelNoData?: string, labelOther?: string, labelSize?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - } - namespace ojNBox { - type Cell = - { - label?: string, column: string, labelHalign?: string, labelStyle?: object, svgClassName?: string, svgStyle?: object, maximizedSvgStyle?: object, maximizedSvgClassName?: string, minimizedSvgStyle?: object, minimizedSvgClassName?: string, row: string, showCount?: 'on'|'off'|'auto'|string, shortDesc?: string - } - } - namespace ojNBox { - type Column = - { - id: string, label?: string, labelStyle?: object - } - } - namespace ojNBox { - type CountLabelContext = - { - row: string, column: string, nodeCount: number, totalNodeCount: number, highlightedNodeCount: number - } - } - namespace ojNBox { - type Row = - { - id: string, label?: string, labelStyle?: object - } - } - namespace ojNBox { - type TooltipContext = - { - parentElement: Element, id: K, label: string, secondaryLabel: string, row: string, column: string, color: string, indicatorColor: string, componentElement: Element - } - } - -} -declare namespace oj { - class ojNBoxNode extends JetElement { - borderColor: string; - borderWidth: number; - categories: Array; - color?: string; - column: string; - groupCategory?: string; - icon?: {borderColor?: string, borderRadius?: string, borderWidth: number, color?: string, height?: number|null, opacity: number, pattern?: 'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'|'mallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle', shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, source?: string, svgClassName: string, svgStyle?: object, width?: number|null}; - indicatorColor?: string; - indicatorIcon?: {borderColor?: string, borderRadius?: string, borderWidth: number, color?: string, height?: number|null, opacity: number, pattern?: 'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'|'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle', shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, source?: string|null, svgClassName: string, svgStyle?: object|null, width?: number|null}; - label: string; - row: string; - secondaryLabel: string; - shortDesc: string; - svgClassName: string; - svgStyle: object|null; - xPercentage?: number|null; - yPercentage?: number|null; - onBorderColorChanged: (event: CustomEvent)=> any; - onBorderWidthChanged: (event: CustomEvent)=> any; - onCategoriesChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onColumnChanged: (event: CustomEvent)=> any; - onGroupCategoryChanged: (event: CustomEvent)=> any; - onIconChanged: (event: CustomEvent)=> any; - onIndicatorColorChanged: (event: CustomEvent)=> any; - onIndicatorIconChanged: (event: CustomEvent)=> any; - onLabelChanged: (event: CustomEvent)=> any; - onRowChanged: (event: CustomEvent)=> any; - onSecondaryLabelChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onXPercentageChanged: (event: CustomEvent)=> any; - onYPercentageChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojNBoxNodeEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojNBoxNodeEventMap extends oj.JetElementEventMap { - 'borderColorChanged': CustomEvent; - 'borderWidthChanged': CustomEvent; - 'categoriesChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'columnChanged': CustomEvent; - 'groupCategoryChanged': CustomEvent; - 'iconChanged': CustomEvent; - 'indicatorColorChanged': CustomEvent; - 'indicatorIconChanged': CustomEvent; - 'labelChanged': CustomEvent; - 'rowChanged': CustomEvent; - 'secondaryLabelChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'xPercentageChanged': CustomEvent; - 'yPercentageChanged': CustomEvent; - } - interface ojNBoxNodeSettableProperties extends JetSettableProperties { - borderColor: string; - borderWidth: number; - categories: Array; - color?: string; - column: string; - groupCategory?: string; - icon?: {borderColor?: string, borderRadius?: string, borderWidth: number, color?: string, height?: number|null, opacity: number, pattern?: 'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'|'mallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle', shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, source?: string, svgClassName: string, svgStyle?: object, width?: number|null}; - indicatorColor?: string; - indicatorIcon?: {borderColor?: string, borderRadius?: string, borderWidth: number, color?: string, height?: number|null, opacity: number, pattern?: 'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'|'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle', shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, source?: string|null, svgClassName: string, svgStyle?: object|null, width?: number|null}; - label: string; - row: string; - secondaryLabel: string; - shortDesc: string; - svgClassName: string; - svgStyle: object|null; - xPercentage?: number|null; - yPercentage?: number|null; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojoffcanvas/index.d.ts b/types/@oracle/oraclejet/ojs/ojoffcanvas/index.d.ts deleted file mode 100644 index eab2775d88..0000000000 --- a/types/@oracle/oraclejet/ojs/ojoffcanvas/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -declare namespace oj { - class OffcanvasUtils { - constructor(); - static close(offcanvas: {selector: string}): Promise; - static open(offcanvas: {selector: string, content: string, edge: string, displayMode: string, autoDismiss: string, size: string, modality: string}): Promise; - static setupPanToReveal(offcanvas: {selector: string, edge?: string, size?: string}): void; - static setupResponsive(offcanvas: {selector: string, edge: string, query: string}): void; - static tearDownPanToReveal(offcanvas: {selector: string}): void; - static tearDownResponsive(offcanvas: {selector: string}): void; - static toggle(offcanvas: {selector: string, content: string, edge: string, displayMode: string, autoDismiss: string, size: string, modality: string}): Promise; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojoptgroup/index.d.ts b/types/@oracle/oraclejet/ojs/ojoptgroup/index.d.ts deleted file mode 100644 index 335cee2990..0000000000 --- a/types/@oracle/oraclejet/ojs/ojoptgroup/index.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -declare namespace oj { - class ojOptgroup extends JetElement { - disabled: boolean; - label: string; - onDisabledChanged: (event: CustomEvent)=> any; - onLabelChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojOptgroupEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getProperty(property: string): any; - refresh(): void; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - } - interface ojOptgroupEventMap extends oj.JetElementEventMap { - 'disabledChanged': CustomEvent; - 'labelChanged': CustomEvent; - } - interface ojOptgroupSettableProperties extends JetSettableProperties { - disabled: boolean; - label: string; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojoption/index.d.ts b/types/@oracle/oraclejet/ojs/ojoption/index.d.ts deleted file mode 100644 index 012cb7a4cc..0000000000 --- a/types/@oracle/oraclejet/ojs/ojoption/index.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -declare namespace oj { - class ojOption extends JetElement { - disabled: boolean; - value: any; - onDisabledChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojOptionEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getProperty(property: string): any; - refresh(): void; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - } - interface ojOptionEventMap extends oj.JetElementEventMap { - 'disabledChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojOptionSettableProperties extends JetSettableProperties { - disabled: boolean; - value: any; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojpictochart/index.d.ts b/types/@oracle/oraclejet/ojs/ojpictochart/index.d.ts deleted file mode 100644 index ec1496377f..0000000000 --- a/types/@oracle/oraclejet/ojs/ojpictochart/index.d.ts +++ /dev/null @@ -1,206 +0,0 @@ -/// -/// -declare namespace oj { - class ojPictoChart extends dvtBaseComponent> { - animationDuration?: number; - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'popIn'|'alphaFade'|'zoom'|'none'; - as: string; - columnCount: number|null; - columnWidth: number|null; - data: oj.DataProvider|null; - drilling: 'on'|'off'; - hiddenCategories: Array; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - hoverBehaviorDelay: number; - layout: 'vertical'|'horizontal'; - layoutOrigin: 'topEnd'|'bottomStart'|'bottomEnd'|'topStart'; - rowCount: number|null; - rowHeight: number|null; - selection: Array; - selectionMode: 'single'|'multiple'|'none'; - tooltip: {renderer: ((context: oj.ojPictoChart.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))|null}; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - onAnimationDurationChanged: (event: CustomEvent)=> any; - onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; - onAnimationOnDisplayChanged: (event: CustomEvent)=> any; - onAsChanged: (event: CustomEvent)=> any; - onColumnCountChanged: (event: CustomEvent)=> any; - onColumnWidthChanged: (event: CustomEvent)=> any; - onDataChanged: (event: CustomEvent)=> any; - onDrillingChanged: (event: CustomEvent)=> any; - onHiddenCategoriesChanged: (event: CustomEvent)=> any; - onHighlightMatchChanged: (event: CustomEvent)=> any; - onHighlightedCategoriesChanged: (event: CustomEvent)=> any; - onHoverBehaviorChanged: (event: CustomEvent)=> any; - onHoverBehaviorDelayChanged: (event: CustomEvent)=> any; - onLayoutChanged: (event: CustomEvent)=> any; - onLayoutOriginChanged: (event: CustomEvent)=> any; - onRowCountChanged: (event: CustomEvent)=> any; - onRowHeightChanged: (event: CustomEvent)=> any; - onSelectionChanged: (event: CustomEvent)=> any; - onSelectionModeChanged: (event: CustomEvent)=> any; - onTooltipChanged: (event: CustomEvent)=> any; - onOjDrill: (event: oj.ojPictoChart.ojDrill)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojPictoChartEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getContextByNode(node: Element): oj.ojPictoChart.NodeContext|null; - getItem(index: number): oj.ojPictoChart.ItemContext|null; - getItemCount(): number; - } - namespace ojPictoChart { - class ojDrill extends CustomEvent<{id: any, [propName: string]: any}> { - - } - } - interface ojPictoChartEventMap extends oj.dvtBaseComponentEventMap { - 'ojDrill': oj.ojPictoChart.ojDrill; - 'animationDurationChanged': CustomEvent; - 'animationOnDataChangeChanged': CustomEvent; - 'animationOnDisplayChanged': CustomEvent; - 'asChanged': CustomEvent; - 'columnCountChanged': CustomEvent; - 'columnWidthChanged': CustomEvent; - 'dataChanged': CustomEvent; - 'drillingChanged': CustomEvent; - 'hiddenCategoriesChanged': CustomEvent; - 'highlightMatchChanged': CustomEvent; - 'highlightedCategoriesChanged': CustomEvent; - 'hoverBehaviorChanged': CustomEvent; - 'hoverBehaviorDelayChanged': CustomEvent; - 'layoutChanged': CustomEvent; - 'layoutOriginChanged': CustomEvent; - 'rowCountChanged': CustomEvent; - 'rowHeightChanged': CustomEvent; - 'selectionChanged': CustomEvent; - 'selectionModeChanged': CustomEvent; - 'tooltipChanged': CustomEvent; - } - interface ojPictoChartSettableProperties extends dvtBaseComponentSettableProperties { - animationDuration?: number; - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'popIn'|'alphaFade'|'zoom'|'none'; - as: string; - columnCount: number|null; - columnWidth: number|null; - data: oj.DataProvider|null; - drilling: 'on'|'off'; - hiddenCategories: Array; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - hoverBehaviorDelay: number; - layout: 'vertical'|'horizontal'; - layoutOrigin: 'topEnd'|'bottomStart'|'bottomEnd'|'topStart'; - rowCount: number|null; - rowHeight: number|null; - selection: Array; - selectionMode: 'single'|'multiple'|'none'; - tooltip: {renderer: ((context: oj.ojPictoChart.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))|null}; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - } - namespace ojPictoChart { - type ItemContext = - { - color: string, count: number, id: K, name: string, selected: boolean, tooltip: string - } - } - namespace ojPictoChart { - type NodeContext = - { - subId: string, index: number - } - } - namespace ojPictoChart { - type TooltipContext = - { - parentElement: Element, id: K, name: string, count: number, color: string, componentElement: Element - } - } - -} -declare namespace oj { - class ojPictoChartItem extends JetElement { - borderColor: string; - borderWidth: number; - categories: Array; - color: string; - columnSpan: number; - count: number; - drilling: 'inherit'|'off'|'on'; - name: string; - rowSpan: number; - shape: 'circle'|'diamond'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|'none'; - shortDesc: string; - source: string; - sourceHover: string; - sourceHoverSelected: string; - sourceSelected: string; - svgClassName: string; - svgStyle: object; - onBorderColorChanged: (event: CustomEvent)=> any; - onBorderWidthChanged: (event: CustomEvent)=> any; - onCategoriesChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onColumnSpanChanged: (event: CustomEvent)=> any; - onCountChanged: (event: CustomEvent)=> any; - onDrillingChanged: (event: CustomEvent)=> any; - onNameChanged: (event: CustomEvent)=> any; - onRowSpanChanged: (event: CustomEvent)=> any; - onShapeChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onSourceChanged: (event: CustomEvent)=> any; - onSourceHoverChanged: (event: CustomEvent)=> any; - onSourceHoverSelectedChanged: (event: CustomEvent)=> any; - onSourceSelectedChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojPictoChartItemEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojPictoChartItemEventMap extends oj.JetElementEventMap { - 'borderColorChanged': CustomEvent; - 'borderWidthChanged': CustomEvent; - 'categoriesChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'columnSpanChanged': CustomEvent; - 'countChanged': CustomEvent; - 'drillingChanged': CustomEvent; - 'nameChanged': CustomEvent; - 'rowSpanChanged': CustomEvent; - 'shapeChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'sourceChanged': CustomEvent; - 'sourceHoverChanged': CustomEvent; - 'sourceHoverSelectedChanged': CustomEvent; - 'sourceSelectedChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - } - interface ojPictoChartItemSettableProperties extends JetSettableProperties { - borderColor: string; - borderWidth: number; - categories: Array; - color: string; - columnSpan: number; - count: number; - drilling: 'inherit'|'off'|'on'; - name: string; - rowSpan: number; - shape: 'circle'|'diamond'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|'none'; - shortDesc: string; - source: string; - sourceHover: string; - sourceHoverSelected: string; - sourceSelected: string; - svgClassName: string; - svgStyle: object; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojpopup/index.d.ts b/types/@oracle/oraclejet/ojs/ojpopup/index.d.ts deleted file mode 100644 index c0b076be88..0000000000 --- a/types/@oracle/oraclejet/ojs/ojpopup/index.d.ts +++ /dev/null @@ -1,105 +0,0 @@ -/// -declare namespace oj { - class ojPopup extends baseComponent { - autoDismiss: 'none'|'focusLoss'; - chrome: 'default'|'none'; - initialFocus: 'auto'|'none'|'firstFocusable'|'popup'; - modality: 'modeless'|'modal'; - position: oj.ojPopup.Position; - tail: 'none'|'simple'; - translations: {ariaCloseSkipLink?: string, ariaFocusSkipLink?: string, ariaLiveRegionInitialFocusFirstFocusable?: string, ariaLiveRegionInitialFocusFirstFocusableTouch?: string, ariaLiveRegionInitialFocusNone?: string, ariaLiveRegionInitialFocusNoneTouch?: string}; - onAutoDismissChanged: (event: CustomEvent)=> any; - onChromeChanged: (event: CustomEvent)=> any; - onInitialFocusChanged: (event: CustomEvent)=> any; - onModalityChanged: (event: CustomEvent)=> any; - onPositionChanged: (event: CustomEvent)=> any; - onTailChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojPopup.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojPopup.ojAnimateStart)=> any; - onOjBeforeClose: (event: oj.ojPopup.ojBeforeClose)=> any; - onOjBeforeOpen: (event: oj.ojPopup.ojBeforeOpen)=> any; - onOjClose: (event: oj.ojPopup.ojClose)=> any; - onOjFocus: (event: oj.ojPopup.ojFocus)=> any; - onOjOpen: (event: oj.ojPopup.ojOpen)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojPopupEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - close(): void; - isOpen(): boolean; - open(launcher: string|Element, position?: oj.ojPopup.Position): void; - refresh(): void; - } - namespace ojPopup { - class ojAnimateEnd extends CustomEvent<{element: Element, action: 'open'|'close', [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: 'open'|'close', element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - - class ojBeforeClose extends CustomEvent<{ [propName: string]: any}> { - - } - - class ojBeforeOpen extends CustomEvent<{ [propName: string]: any}> { - - } - - class ojClose extends CustomEvent<{ [propName: string]: any}> { - - } - - class ojFocus extends CustomEvent<{ [propName: string]: any}> { - - } - - class ojOpen extends CustomEvent<{ [propName: string]: any}> { - - } - } - interface ojPopupEventMap extends oj.baseComponentEventMap { - 'ojAnimateEnd': oj.ojPopup.ojAnimateEnd; - 'ojAnimateStart': oj.ojPopup.ojAnimateStart; - 'ojBeforeClose': oj.ojPopup.ojBeforeClose; - 'ojBeforeOpen': oj.ojPopup.ojBeforeOpen; - 'ojClose': oj.ojPopup.ojClose; - 'ojFocus': oj.ojPopup.ojFocus; - 'ojOpen': oj.ojPopup.ojOpen; - 'autoDismissChanged': CustomEvent; - 'chromeChanged': CustomEvent; - 'initialFocusChanged': CustomEvent; - 'modalityChanged': CustomEvent; - 'positionChanged': CustomEvent; - 'tailChanged': CustomEvent; - } - interface ojPopupSettableProperties extends baseComponentSettableProperties { - autoDismiss: 'none'|'focusLoss'; - chrome: 'default'|'none'; - initialFocus: 'auto'|'none'|'firstFocusable'|'popup'; - modality: 'modeless'|'modal'; - position: oj.ojPopup.Position; - tail: 'none'|'simple'; - translations: {ariaCloseSkipLink?: string, ariaFocusSkipLink?: string, ariaLiveRegionInitialFocusFirstFocusable?: string, ariaLiveRegionInitialFocusFirstFocusableTouch?: string, ariaLiveRegionInitialFocusNone?: string, ariaLiveRegionInitialFocusNoneTouch?: string}; - } - namespace ojPopup { - type Position = - { - my?: oj.ojPopup.PositionAlign, at?: oj.ojPopup.PositionAlign, offset?: oj.ojPopup.PositionPoint, of?: string|oj.ojPopup.PositionPoint, collision?: 'flip'|'fit'|'flipfit'|'flipcenter'|'none' - } - } - namespace ojPopup { - type PositionAlign = - { - vertical?: 'top'|'bottom'|'center', horizontal?: 'start'|'end'|'left'|'center'|'bottom' - } - } - namespace ojPopup { - type PositionPoint = - { - x?: number, y?: number - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojprogress/index.d.ts b/types/@oracle/oraclejet/ojs/ojprogress/index.d.ts deleted file mode 100644 index 66fec85056..0000000000 --- a/types/@oracle/oraclejet/ojs/ojprogress/index.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/// -declare namespace oj { - class ojProgress extends baseComponent { - max: number; - type: 'bar'|'circle'; - value: number; - translations: {ariaIndeterminateProgressText?: string}; - onMaxChanged: (event: CustomEvent)=> any; - onTypeChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojProgressEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojProgressEventMap extends oj.baseComponentEventMap { - 'maxChanged': CustomEvent; - 'typeChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojProgressSettableProperties extends baseComponentSettableProperties { - max: number; - type: 'bar'|'circle'; - value: number; - translations: {ariaIndeterminateProgressText?: string}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojprogresslist/index.d.ts b/types/@oracle/oraclejet/ojs/ojprogresslist/index.d.ts deleted file mode 100644 index d3b9efbc83..0000000000 --- a/types/@oracle/oraclejet/ojs/ojprogresslist/index.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -/// -/// -/// -declare namespace oj { - class ojProgressList extends JetElement { - data: oj.DataProvider|null; - onDataChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojProgressListEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getProperty(property: string): any; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - } - interface ojProgressListEventMap extends oj.JetElementEventMap { - 'dataChanged': CustomEvent; - } - interface ojProgressListSettableProperties extends JetSettableProperties { - data: oj.DataProvider|null; - } - -} -declare namespace oj { - interface ProgressItem { - addEventListener(eventType: oj.ProgressItem.EventType, listener: EventListener): void; - removeEventListener(eventType: oj.ProgressItem.EventType, listener: EventListener): void; - } - namespace ProgressItem { - enum EventType { - LOADSTART = "loadstart", - PROGRESS = "progress", - ABORT = "abort", - ERROR = "error", - LOAD = "load", - TIMEOUT = "timeout", - LOADEND = "loadend", - } - enum Status { - QUEUED = "queued", - LOADSTARTED = "loadstarted", - ABORTED = "aborted", - ERRORED = "errored", - TIMEDOUT = "timedout", - LOADED = "loaded", - } - } - - -} diff --git a/types/@oracle/oraclejet/ojs/ojpulltorefresh/index.d.ts b/types/@oracle/oraclejet/ojs/ojpulltorefresh/index.d.ts deleted file mode 100644 index 7367c03bbd..0000000000 --- a/types/@oracle/oraclejet/ojs/ojpulltorefresh/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -declare namespace oj { - class PullToRefreshUtils { - static setupPullToRefresh(element: Element, refreshFunc: (()=> Promise), options?: {threshold?: number, primaryText?: string, secondaryText?: string}): void; - static tearDownPullToRefresh(element: Element): void; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojradioset/index.d.ts b/types/@oracle/oraclejet/ojs/ojradioset/index.d.ts deleted file mode 100644 index 7657b0a18c..0000000000 --- a/types/@oracle/oraclejet/ojs/ojradioset/index.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -/// -declare namespace oj { - class ojRadioset extends editableValue { - disabled: boolean|null; - labelledBy: string|null; - required: boolean; - value: any; - translations: {required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; - onDisabledChanged: (event: CustomEvent)=> any; - onLabelledByChanged: (event: CustomEvent)=> any; - onRequiredChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojRadioset.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojRadioset.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojRadiosetEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - validate(): Promise; - } - namespace ojRadioset { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojRadiosetEventMap extends oj.editableValueEventMap { - 'ojAnimateEnd': oj.ojRadioset.ojAnimateEnd; - 'ojAnimateStart': oj.ojRadioset.ojAnimateStart; - 'disabledChanged': CustomEvent; - 'labelledByChanged': CustomEvent; - 'requiredChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojRadiosetSettableProperties extends editableValueSettableProperties { - disabled: boolean|null; - labelledBy: string|null; - required: boolean; - value: any; - translations: {required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojrefresher/index.d.ts b/types/@oracle/oraclejet/ojs/ojrefresher/index.d.ts deleted file mode 100644 index 5c2dee4c70..0000000000 --- a/types/@oracle/oraclejet/ojs/ojrefresher/index.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/// -declare namespace oj { - class ojRefresher extends baseComponent { - refreshContent: (()=> Promise); - target: Element; - text: string; - threshold: number; - onRefreshContentChanged: (event: CustomEvent)=> any; - onTargetChanged: (event: CustomEvent)=> any; - onTextChanged: (event: CustomEvent)=> any; - onThresholdChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojRefresherEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojRefresherEventMap extends oj.baseComponentEventMap { - 'refreshContentChanged': CustomEvent; - 'targetChanged': CustomEvent; - 'textChanged': CustomEvent; - 'thresholdChanged': CustomEvent; - } - interface ojRefresherSettableProperties extends baseComponentSettableProperties { - refreshContent: (()=> Promise); - target: Element; - text: string; - threshold: number; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojrouter/index.d.ts b/types/@oracle/oraclejet/ojs/ojrouter/index.d.ts deleted file mode 100644 index 44c23b8f5d..0000000000 --- a/types/@oracle/oraclejet/ojs/ojrouter/index.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -/// -declare namespace oj { - class Router { - readonly currentState: (()=> oj.RouterState|undefined); - readonly currentValue: (()=> string|undefined); - defaultStateId: string|undefined; - static defaults: {urlAdapter?: oj.Router.urlPathAdapter|oj.Router.urlParamAdapter, baseUrl?: string, rootInstanceName?: string}; - readonly direction: string|undefined; - readonly moduleConfig: {name: KnockoutObservable, params: {ojRouter: {parentRouter: oj.Router, direction: string}}, lifecycleListener: {attached: ((param0: string)=> void)}}; - readonly name: string; - readonly observableModuleConfig: KnockoutObservable; - readonly parent: oj.Router|undefined; - static readonly rootInstance: oj.Router; - readonly stateId: ((param0?: string)=> string); - readonly states: Array|null; - static readonly transitionedToState: object; - static sync(): Promise<{hasChanged: boolean}>; - configure(option: {[key:string]: oj.RouterState.ConfigOptions}|((id:string)=> oj.RouterState)): any; - createChildRouter(name: string, parentStateId?: string): oj.Router; - dispose(): undefined; - getChildRouter(name: string): oj.Router|undefined; - getCurrentChildRouter(): oj.Router|undefined; - getState(stateId: string): oj.RouterState|undefined; - go(stateIdPath?: string|Array, options?: {historyUpdate: string}): Promise<{hasChanged: boolean}>; - retrieve(): any; - store(data: object): undefined; - } - namespace Router { - type ModuleConfigType = - { - name: KnockoutObservable, params: {ojRouter: {parentRouter: oj.Router, direction: string, parameters: object}}, lifecycleListener: {attached: ((param0: object)=> void)} - } - } - namespace Router { - class urlParamAdapter { - constructor(); - } -class urlPathAdapter { - constructor(); - } - - - } - - -} -declare namespace oj { - class RouterState { - canEnter: (()=> boolean)|(()=> Promise); - canExit: (()=> boolean)|(()=> Promise); - enter: (()=> void)|(()=> Promise); - exit: (()=> void)|(()=> Promise); - readonly id: string; - label: string|undefined; - parameters: object; - title: string|(()=> string|undefined); - value: any; - constructor(id: string, options?: oj.RouterState.ConfigOptions, router?: oj.Router); - go(): Promise<{hasChanged: boolean}>; - isCurrent(): boolean; - } - namespace RouterState { - type ConfigOptions = - { - label?: string, value?: any, isDefault?: boolean, canEnter?: (()=> boolean)|(()=> Promise), enter?: (()=> void)|(()=> Promise), canExit?: (()=> boolean)|(()=> Promise), exit?: (()=> void)|(()=> Promise) - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojselectcombobox/index.d.ts b/types/@oracle/oraclejet/ojs/ojselectcombobox/index.d.ts deleted file mode 100644 index d6c2cec4a5..0000000000 --- a/types/@oracle/oraclejet/ojs/ojselectcombobox/index.d.ts +++ /dev/null @@ -1,427 +0,0 @@ -/// -declare namespace oj { - abstract class ojCombobox, SV=V, RV=V> extends editableValue { - onOjAnimateEnd: (event: oj.ojCombobox.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojCombobox.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojComboboxEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - validate(): Promise; - } - namespace ojCombobox { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojComboboxEventMap extends oj.editableValueEventMap { - 'ojAnimateEnd': oj.ojCombobox.ojAnimateEnd; - 'ojAnimateStart': oj.ojCombobox.ojAnimateStart; - } - interface ojComboboxSettableProperties extends editableValueSettableProperties { - } - namespace ojCombobox { - type Optgroup = - { - disabled?: boolean, label: string, children: Array<(oj.ojCombobox.Option|oj.ojCombobox.Optgroup)> - } - } - namespace ojCombobox { - type Option = - { - disabled?: boolean, label?: string, value: any - } - } - namespace ojCombobox { - type OptionContext = - { - component: Element, parent: Element, index: number, depth: number, leaf: boolean, data: object, parentElement: Element - } - } - namespace ojCombobox { - type OptionsKeys = - { - label?: string, value?: string, children?: string, childKeys?: oj.ojCombobox.OptionsKeys - } - } - -} -declare namespace oj { - class ojComboboxMany extends ojCombobox, ojComboboxManySettableProperties, Array, string> { - asyncValidators: Array>>; - converter: oj.Converter|oj.Validation.RegisteredConverter|null; - minLength: number; - optionRenderer?: ((param0: oj.ojCombobox.OptionContext) => {insert: Element}|undefined)|null; - options: Array|oj.DataProvider|null; - optionsKeys: {childKeys: {label?: string, value?: string, children?: string, childKeys?: oj.ojCombobox.OptionsKeys}, children?: string, label?: string, value?: string}; - pickerAttributes: {style?: string, class?: string}; - placeholder: string|null; - readonly rawValue: string|null; - required: boolean; - validators: Array>|oj.Validation.RegisteredValidator>|null; - value: Array|null; - valueOptions: Array<{value: any, label?: string}> | null; - translations: {filterFurther?: string, noMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; - onAsyncValidatorsChanged: (event: CustomEvent)=> any; - onConverterChanged: (event: CustomEvent)=> any; - onMinLengthChanged: (event: CustomEvent)=> any; - onOptionRendererChanged: (event: CustomEvent)=> any; - onOptionsChanged: (event: CustomEvent)=> any; - onOptionsKeysChanged: (event: CustomEvent)=> any; - onPickerAttributesChanged: (event: CustomEvent)=> any; - onPlaceholderChanged: (event: CustomEvent)=> any; - onRawValueChanged: (event: CustomEvent)=> any; - onRequiredChanged: (event: CustomEvent)=> any; - onValidatorsChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onValueOptionsChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojComboboxMany.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojComboboxMany.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojComboboxManyEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojComboboxMany { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojComboboxManyEventMap extends oj.ojComboboxEventMap { - 'ojAnimateEnd': oj.ojComboboxMany.ojAnimateEnd; - 'ojAnimateStart': oj.ojComboboxMany.ojAnimateStart; - 'asyncValidatorsChanged': CustomEvent; - 'converterChanged': CustomEvent; - 'minLengthChanged': CustomEvent; - 'optionRendererChanged': CustomEvent; - 'optionsChanged': CustomEvent; - 'optionsKeysChanged': CustomEvent; - 'pickerAttributesChanged': CustomEvent; - 'placeholderChanged': CustomEvent; - 'rawValueChanged': CustomEvent; - 'requiredChanged': CustomEvent; - 'validatorsChanged': CustomEvent; - 'valueChanged': CustomEvent; - 'valueOptionsChanged': CustomEvent; - } - interface ojComboboxManySettableProperties extends ojComboboxSettableProperties, Array, string> { - asyncValidators: Array>>; - converter: oj.Converter|oj.Validation.RegisteredConverter|null; - minLength: number; - optionRenderer?: ((param0: oj.ojCombobox.OptionContext) => {insert: Element}|undefined)|null; - options: Array|oj.DataProvider|null; - optionsKeys: {childKeys: {label?: string, value?: string, children?: string, childKeys?: oj.ojCombobox.OptionsKeys}, children?: string, label?: string, value?: string}; - pickerAttributes: {style?: string, class?: string}; - placeholder: string|null; - readonly rawValue: string|null; - required: boolean; - validators: Array>|oj.Validation.RegisteredValidator>|null; - value: Array|null; - valueOptions: Array<{value: any, label?: string}> | null; - translations: {filterFurther?: string, noMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; - } - -} -declare namespace oj { - class ojComboboxOne extends ojCombobox, any, string> { - asyncValidators: Array>; - converter: oj.Converter|oj.Validation.RegisteredConverter|null; - filterOnOpen: 'none'|'rawValue'; - minLength: number; - optionRenderer?: ((param0: oj.ojCombobox.OptionContext) => {insert: Element}|undefined)|null; - options: Array|oj.DataProvider|null; - optionsKeys: {childKeys: {label?: string, value?: string, children?: string, childKeys?: oj.ojCombobox.OptionsKeys}, children?: string, label?: string, value?: string}; - pickerAttributes: {style?: string, class?: string}; - placeholder: string|null; - readonly rawValue: string|null; - required: boolean; - validators: Array|oj.Validation.RegisteredValidator>|null; - value: any; - valueOption: {value: any, label?: string}; - translations: {filterFurther?: string, noMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; - onAsyncValidatorsChanged: (event: CustomEvent)=> any; - onConverterChanged: (event: CustomEvent)=> any; - onFilterOnOpenChanged: (event: CustomEvent)=> any; - onMinLengthChanged: (event: CustomEvent)=> any; - onOptionRendererChanged: (event: CustomEvent)=> any; - onOptionsChanged: (event: CustomEvent)=> any; - onOptionsKeysChanged: (event: CustomEvent)=> any; - onPickerAttributesChanged: (event: CustomEvent)=> any; - onPlaceholderChanged: (event: CustomEvent)=> any; - onRawValueChanged: (event: CustomEvent)=> any; - onRequiredChanged: (event: CustomEvent)=> any; - onValidatorsChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onValueOptionChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojComboboxOne.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojComboboxOne.ojAnimateStart)=> any; - onOjValueUpdated: (event: oj.ojComboboxOne.ojValueUpdated)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojComboboxOneEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojComboboxOne { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - - class ojValueUpdated extends CustomEvent<{value: any, previousValue: any, [propName: string]: any}> { - - } - } - interface ojComboboxOneEventMap extends oj.ojComboboxEventMap { - 'ojAnimateEnd': oj.ojComboboxOne.ojAnimateEnd; - 'ojAnimateStart': oj.ojComboboxOne.ojAnimateStart; - 'ojValueUpdated': oj.ojComboboxOne.ojValueUpdated; - 'asyncValidatorsChanged': CustomEvent; - 'converterChanged': CustomEvent; - 'filterOnOpenChanged': CustomEvent; - 'minLengthChanged': CustomEvent; - 'optionRendererChanged': CustomEvent; - 'optionsChanged': CustomEvent; - 'optionsKeysChanged': CustomEvent; - 'pickerAttributesChanged': CustomEvent; - 'placeholderChanged': CustomEvent; - 'rawValueChanged': CustomEvent; - 'requiredChanged': CustomEvent; - 'validatorsChanged': CustomEvent; - 'valueChanged': CustomEvent; - 'valueOptionChanged': CustomEvent; - } - interface ojComboboxOneSettableProperties extends ojComboboxSettableProperties { - asyncValidators: Array>; - converter: oj.Converter|oj.Validation.RegisteredConverter|null; - filterOnOpen: 'none'|'rawValue'; - minLength: number; - optionRenderer?: ((param0: oj.ojCombobox.OptionContext) => {insert: Element}|undefined)|null; - options: Array|oj.DataProvider|null; - optionsKeys: {childKeys: {label?: string, value?: string, children?: string, childKeys?: oj.ojCombobox.OptionsKeys}, children?: string, label?: string, value?: string}; - pickerAttributes: {style?: string, class?: string}; - placeholder: string|null; - readonly rawValue: string|null; - required: boolean; - validators: Array|oj.Validation.RegisteredValidator>|null; - value: any; - valueOption: {value: any, label?: string}; - translations: {filterFurther?: string, noMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; - } - -} -declare namespace oj { - abstract class ojSelect, SV=V> extends editableValue { - onOjAnimateEnd: (event: oj.ojSelect.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojSelect.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojSelectEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - validate(): Promise; - } - namespace ojSelect { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojSelectEventMap extends oj.editableValueEventMap { - 'ojAnimateEnd': oj.ojSelect.ojAnimateEnd; - 'ojAnimateStart': oj.ojSelect.ojAnimateStart; - } - interface ojSelectSettableProperties extends editableValueSettableProperties { - } - namespace ojSelect { - type Optgroup = - { - disabled?: boolean, label: string, children: Array<(oj.ojSelect.Option|oj.ojSelect.Optgroup)> - } - } - namespace ojSelect { - type Option = - { - disabled?: boolean, label?: string, value: any - } - } - namespace ojSelect { - type OptionContext = - { - component: Element, parent: Element, index: number, depth: number, leaf: boolean, data: object, parentElement: Element - } - } - namespace ojSelect { - type OptionsKeys = - { - label?: string, value?: string, children?: string, childKeys?: oj.ojSelect.OptionsKeys - } - } - -} -declare namespace oj { - class ojSelectMany extends ojSelect, ojSelectManySettableProperties> { - minimumResultsForSearch: number; - optionRenderer?: ((param0: oj.ojSelect.OptionContext) => {insert: Element}|undefined)|null; - options: Array|oj.DataProvider|null; - optionsKeys: {childKeys?: {label?: string, value?: string, children?: string, childKeys?: oj.ojSelect.OptionsKeys}, children?: string, label?: string, value?: string}; - pickerAttributes: {style?: string, class?: string}; - placeholder: string|null; - renderMode: 'jet'|'native'; - required: boolean; - value: Array|null; - valueOptions: Array<{value: any, label?: string}> | null; - translations: {filterFurther?: string, moreMatchesFound?: string, noMatchesFound?: string, oneMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, searchField?: string}; - onMinimumResultsForSearchChanged: (event: CustomEvent)=> any; - onOptionRendererChanged: (event: CustomEvent)=> any; - onOptionsChanged: (event: CustomEvent)=> any; - onOptionsKeysChanged: (event: CustomEvent)=> any; - onPickerAttributesChanged: (event: CustomEvent)=> any; - onPlaceholderChanged: (event: CustomEvent)=> any; - onRenderModeChanged: (event: CustomEvent)=> any; - onRequiredChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onValueOptionsChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojSelectMany.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojSelectMany.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojSelectManyEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojSelectMany { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojSelectManyEventMap extends oj.ojSelectEventMap { - 'ojAnimateEnd': oj.ojSelectMany.ojAnimateEnd; - 'ojAnimateStart': oj.ojSelectMany.ojAnimateStart; - 'minimumResultsForSearchChanged': CustomEvent; - 'optionRendererChanged': CustomEvent; - 'optionsChanged': CustomEvent; - 'optionsKeysChanged': CustomEvent; - 'pickerAttributesChanged': CustomEvent; - 'placeholderChanged': CustomEvent; - 'renderModeChanged': CustomEvent; - 'requiredChanged': CustomEvent; - 'valueChanged': CustomEvent; - 'valueOptionsChanged': CustomEvent; - } - interface ojSelectManySettableProperties extends ojSelectSettableProperties> { - minimumResultsForSearch: number; - optionRenderer?: ((param0: oj.ojSelect.OptionContext) => {insert: Element}|undefined)|null; - options: Array|oj.DataProvider|null; - optionsKeys: {childKeys?: {label?: string, value?: string, children?: string, childKeys?: oj.ojSelect.OptionsKeys}, children?: string, label?: string, value?: string}; - pickerAttributes: {style?: string, class?: string}; - placeholder: string|null; - renderMode: 'jet'|'native'; - required: boolean; - value: Array|null; - valueOptions: Array<{value: any, label?: string}> | null; - translations: {filterFurther?: string, moreMatchesFound?: string, noMatchesFound?: string, oneMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, searchField?: string}; - } - -} -declare namespace oj { - class ojSelectOne extends ojSelect> { - minimumResultsForSearch: number; - optionRenderer?: ((param0: oj.ojSelect.OptionContext) => {insert: Element}|undefined)|null; - options: Array|oj.DataProvider|null; - optionsKeys: {childKeys?: {label?: string, value?: string, children?: string, childKeys?: oj.ojSelect.OptionsKeys}, children?: string, label?: string, value?: string}; - pickerAttributes: {style?: string, class?: string}; - placeholder: string|null; - renderMode: 'jet'|'native'; - required: boolean; - value: any; - valueOption: {value: any, label?: string}; - translations: {filterFurther?: string, moreMatchesFound?: string, noMatchesFound?: string, oneMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, searchField?: string}; - onMinimumResultsForSearchChanged: (event: CustomEvent)=> any; - onOptionRendererChanged: (event: CustomEvent)=> any; - onOptionsChanged: (event: CustomEvent)=> any; - onOptionsKeysChanged: (event: CustomEvent)=> any; - onPickerAttributesChanged: (event: CustomEvent)=> any; - onPlaceholderChanged: (event: CustomEvent)=> any; - onRenderModeChanged: (event: CustomEvent)=> any; - onRequiredChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onValueOptionChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojSelectOne.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojSelectOne.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojSelectOneEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojSelectOne { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojSelectOneEventMap extends oj.ojSelectEventMap { - 'ojAnimateEnd': oj.ojSelectOne.ojAnimateEnd; - 'ojAnimateStart': oj.ojSelectOne.ojAnimateStart; - 'minimumResultsForSearchChanged': CustomEvent; - 'optionRendererChanged': CustomEvent; - 'optionsChanged': CustomEvent; - 'optionsKeysChanged': CustomEvent; - 'pickerAttributesChanged': CustomEvent; - 'placeholderChanged': CustomEvent; - 'renderModeChanged': CustomEvent; - 'requiredChanged': CustomEvent; - 'valueChanged': CustomEvent; - 'valueOptionChanged': CustomEvent; - } - interface ojSelectOneSettableProperties extends ojSelectSettableProperties { - minimumResultsForSearch: number; - optionRenderer?: ((param0: oj.ojSelect.OptionContext) => {insert: Element}|undefined)|null; - options: Array|oj.DataProvider|null; - optionsKeys: {childKeys?: {label?: string, value?: string, children?: string, childKeys?: oj.ojSelect.OptionsKeys}, children?: string, label?: string, value?: string}; - pickerAttributes: {style?: string, class?: string}; - placeholder: string|null; - renderMode: 'jet'|'native'; - required: boolean; - value: any; - valueOption: {value: any, label?: string}; - translations: {filterFurther?: string, moreMatchesFound?: string, noMatchesFound?: string, oneMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, searchField?: string}; - } - -} -declare namespace oj { - interface Optgroup { - children: Array<(oj.Option|oj.Optgroup)>; - disabled?: boolean; - label: string; - } - -} -declare namespace oj { - interface Option { - disabled?: boolean; - label?: string; - value: object; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojslider/index.d.ts b/types/@oracle/oraclejet/ojs/ojslider/index.d.ts deleted file mode 100644 index 467073e274..0000000000 --- a/types/@oracle/oraclejet/ojs/ojslider/index.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -/// -declare namespace oj { - class ojSlider extends editableValue { - disabled: boolean|null; - max: number|null; - min: number|null; - orientation: 'horizontal'|'vertical'; - step: number|null; - readonly transientValue: number; - type: 'fromMin'|'fromMax'|'single'; - value: number|null; - translations: {invalidStep?: string, maxMin?: string, noValue?: string, optionNum?: string, valueRange?: string}; - onDisabledChanged: (event: CustomEvent)=> any; - onMaxChanged: (event: CustomEvent)=> any; - onMinChanged: (event: CustomEvent)=> any; - onOrientationChanged: (event: CustomEvent)=> any; - onStepChanged: (event: CustomEvent)=> any; - onTransientValueChanged: (event: CustomEvent)=> any; - onTypeChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojSlider.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojSlider.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojSliderEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojSlider { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojSliderEventMap extends oj.editableValueEventMap { - 'ojAnimateEnd': oj.ojSlider.ojAnimateEnd; - 'ojAnimateStart': oj.ojSlider.ojAnimateStart; - 'disabledChanged': CustomEvent; - 'maxChanged': CustomEvent; - 'minChanged': CustomEvent; - 'orientationChanged': CustomEvent; - 'stepChanged': CustomEvent; - 'transientValueChanged': CustomEvent; - 'typeChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojSliderSettableProperties extends editableValueSettableProperties { - disabled: boolean|null; - max: number|null; - min: number|null; - orientation: 'horizontal'|'vertical'; - step: number|null; - readonly transientValue: number; - type: 'fromMin'|'fromMax'|'single'; - value: number|null; - translations: {invalidStep?: string, maxMin?: string, noValue?: string, optionNum?: string, valueRange?: string}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojsunburst/index.d.ts b/types/@oracle/oraclejet/ojs/ojsunburst/index.d.ts deleted file mode 100644 index 6ef93fd030..0000000000 --- a/types/@oracle/oraclejet/ojs/ojsunburst/index.d.ts +++ /dev/null @@ -1,270 +0,0 @@ -/// -declare namespace oj { - class ojSunburst extends dvtBaseComponent> { - animationDuration: number; - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - animationUpdateColor: string; - as: string; - colorLabel: string; - data: oj.DataProvider|null; - displayLevels: number; - drilling: 'on'|'off'; - expanded: KeySet.KeySet; - hiddenCategories: Array; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - hoverBehaviorDelay: number; - nodeDefaults: {borderColor: string, borderWidth: number, hoverColor: string, labelDisplay: 'horizontal'|'rotated'|'off'|'auto', labelHalign: 'inner'|'outer'|'center', labelMinLength: number, labelStyle: object, selectedInnerColor: string, selectedOuterColor: string, showDisclosure: 'on'|'off'}; - rootNode: any; - rootNodeContent: {renderer: ((context: oj.ojSunburst.RootNodeContext) => ({insert: Element|string}))}; - rotation: 'off'|'on'; - selection: Array; - selectionMode: 'none'|'single'|'multiple'; - sizeLabel: string; - sorting: 'on'|'off'; - startAngle: number; - tooltip: {renderer: ((context: oj.ojSunburst.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - touchResponse: 'touchStart'|'auto'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelColor?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, labelSize?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, tooltipCollapse?: string, tooltipExpand?: string}; - onAnimationDurationChanged: (event: CustomEvent)=> any; - onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; - onAnimationOnDisplayChanged: (event: CustomEvent)=> any; - onAnimationUpdateColorChanged: (event: CustomEvent)=> any; - onAsChanged: (event: CustomEvent)=> any; - onColorLabelChanged: (event: CustomEvent)=> any; - onDataChanged: (event: CustomEvent)=> any; - onDisplayLevelsChanged: (event: CustomEvent)=> any; - onDrillingChanged: (event: CustomEvent)=> any; - onExpandedChanged: (event: CustomEvent)=> any; - onHiddenCategoriesChanged: (event: CustomEvent)=> any; - onHighlightMatchChanged: (event: CustomEvent)=> any; - onHighlightedCategoriesChanged: (event: CustomEvent)=> any; - onHoverBehaviorChanged: (event: CustomEvent)=> any; - onHoverBehaviorDelayChanged: (event: CustomEvent)=> any; - onNodeDefaultsChanged: (event: CustomEvent)=> any; - onRootNodeChanged: (event: CustomEvent)=> any; - onRootNodeContentChanged: (event: CustomEvent)=> any; - onRotationChanged: (event: CustomEvent)=> any; - onSelectionChanged: (event: CustomEvent)=> any; - onSelectionModeChanged: (event: CustomEvent)=> any; - onSizeLabelChanged: (event: CustomEvent)=> any; - onSortingChanged: (event: CustomEvent)=> any; - onStartAngleChanged: (event: CustomEvent)=> any; - onTooltipChanged: (event: CustomEvent)=> any; - onTouchResponseChanged: (event: CustomEvent)=> any; - onOjBeforeCollapse: (event: oj.ojSunburst.ojBeforeCollapse)=> any; - onOjBeforeDrill: (event: oj.ojSunburst.ojBeforeDrill)=> any; - onOjBeforeExpand: (event: oj.ojSunburst.ojBeforeExpand)=> any; - onOjCollapse: (event: oj.ojSunburst.ojCollapse)=> any; - onOjDrill: (event: oj.ojSunburst.ojDrill)=> any; - onOjExpand: (event: oj.ojSunburst.ojExpand)=> any; - onOjRotateInput: (event: oj.ojSunburst.ojRotateInput)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojSunburstEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getContextByNode(node: Element): oj.ojSunburst.NodeContext|null; - getNode(subIdPath: Array): oj.ojSunburst.DataContext|null; - } - namespace ojSunburst { - class ojBeforeCollapse extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { - - } - - class ojBeforeDrill extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { - - } - - class ojBeforeExpand extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { - - } - - class ojCollapse extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { - - } - - class ojDrill extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { - - } - - class ojExpand extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { - - } - - class ojRotateInput extends CustomEvent<{value: number, [propName: string]: any}> { - - } - } - interface ojSunburstEventMap extends oj.dvtBaseComponentEventMap { - 'ojBeforeCollapse': oj.ojSunburst.ojBeforeCollapse; - 'ojBeforeDrill': oj.ojSunburst.ojBeforeDrill; - 'ojBeforeExpand': oj.ojSunburst.ojBeforeExpand; - 'ojCollapse': oj.ojSunburst.ojCollapse; - 'ojDrill': oj.ojSunburst.ojDrill; - 'ojExpand': oj.ojSunburst.ojExpand; - 'ojRotateInput': oj.ojSunburst.ojRotateInput; - 'animationDurationChanged': CustomEvent; - 'animationOnDataChangeChanged': CustomEvent; - 'animationOnDisplayChanged': CustomEvent; - 'animationUpdateColorChanged': CustomEvent; - 'asChanged': CustomEvent; - 'colorLabelChanged': CustomEvent; - 'dataChanged': CustomEvent; - 'displayLevelsChanged': CustomEvent; - 'drillingChanged': CustomEvent; - 'expandedChanged': CustomEvent; - 'hiddenCategoriesChanged': CustomEvent; - 'highlightMatchChanged': CustomEvent; - 'highlightedCategoriesChanged': CustomEvent; - 'hoverBehaviorChanged': CustomEvent; - 'hoverBehaviorDelayChanged': CustomEvent; - 'nodeDefaultsChanged': CustomEvent; - 'rootNodeChanged': CustomEvent; - 'rootNodeContentChanged': CustomEvent; - 'rotationChanged': CustomEvent; - 'selectionChanged': CustomEvent; - 'selectionModeChanged': CustomEvent; - 'sizeLabelChanged': CustomEvent; - 'sortingChanged': CustomEvent; - 'startAngleChanged': CustomEvent; - 'tooltipChanged': CustomEvent; - 'touchResponseChanged': CustomEvent; - } - interface ojSunburstSettableProperties extends dvtBaseComponentSettableProperties { - animationDuration: number; - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - animationUpdateColor: string; - as: string; - colorLabel: string; - data: oj.DataProvider|null; - displayLevels: number; - drilling: 'on'|'off'; - expanded: KeySet.KeySet; - hiddenCategories: Array; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - hoverBehaviorDelay: number; - nodeDefaults: {borderColor: string, borderWidth: number, hoverColor: string, labelDisplay: 'horizontal'|'rotated'|'off'|'auto', labelHalign: 'inner'|'outer'|'center', labelMinLength: number, labelStyle: object, selectedInnerColor: string, selectedOuterColor: string, showDisclosure: 'on'|'off'}; - rootNode: any; - rootNodeContent: {renderer: ((context: oj.ojSunburst.RootNodeContext) => ({insert: Element|string}))}; - rotation: 'off'|'on'; - selection: Array; - selectionMode: 'none'|'single'|'multiple'; - sizeLabel: string; - sorting: 'on'|'off'; - startAngle: number; - tooltip: {renderer: ((context: oj.ojSunburst.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - touchResponse: 'touchStart'|'auto'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelColor?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, labelSize?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, tooltipCollapse?: string, tooltipExpand?: string}; - } - namespace ojSunburst { - type DataContext = - { - color: string, label: string, selected: boolean, size: number, tooltip: string - } - } - namespace ojSunburst { - type NodeContext = - { - subId: string, indexPath: Array - } - } - namespace ojSunburst { - type RootNodeContext = - { - outerBounds: {x: number, y: number, width: number, height: number}, innerBounds: {x: number, y: number, width: number, height: number}, id: K, data: object, itemData: D, componentElement: Element - } - } - namespace ojSunburst { - type TooltipContext = - { - parentElement: Element, id: K, label: string, value: number, radius: number, color: string, data: object, itemData: D, componentElement: Element - } - } - -} -declare namespace oj { - class ojSunburstNode extends JetElement { - borderColor?: string; - borderWidth?: number; - categories?: Array; - color?: string; - drilling?: 'on'|'off'|'inherit'; - label?: string; - labelDisplay?: 'horizontal'|'rotated'|'off'|'auto'; - labelHalign?: 'inner'|'outer'|'center'; - labelStyle?: object; - pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'; - radius?: number; - selectable?: 'off'|'auto'; - shortDesc?: string; - showDisclosure?: 'on'|'off'|'inherit'; - svgClassName?: string; - svgStyle?: object; - value: number; - onBorderColorChanged: (event: CustomEvent)=> any; - onBorderWidthChanged: (event: CustomEvent)=> any; - onCategoriesChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onDrillingChanged: (event: CustomEvent)=> any; - onLabelChanged: (event: CustomEvent)=> any; - onLabelDisplayChanged: (event: CustomEvent)=> any; - onLabelHalignChanged: (event: CustomEvent)=> any; - onLabelStyleChanged: (event: CustomEvent)=> any; - onPatternChanged: (event: CustomEvent)=> any; - onRadiusChanged: (event: CustomEvent)=> any; - onSelectableChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onShowDisclosureChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojSunburstNodeEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojSunburstNodeEventMap extends oj.JetElementEventMap { - 'borderColorChanged': CustomEvent; - 'borderWidthChanged': CustomEvent; - 'categoriesChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'drillingChanged': CustomEvent; - 'labelChanged': CustomEvent; - 'labelDisplayChanged': CustomEvent; - 'labelHalignChanged': CustomEvent; - 'labelStyleChanged': CustomEvent; - 'patternChanged': CustomEvent; - 'radiusChanged': CustomEvent; - 'selectableChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'showDisclosureChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojSunburstNodeSettableProperties extends JetSettableProperties { - borderColor?: string; - borderWidth?: number; - categories?: Array; - color?: string; - drilling?: 'on'|'off'|'inherit'; - label?: string; - labelDisplay?: 'horizontal'|'rotated'|'off'|'auto'; - labelHalign?: 'inner'|'outer'|'center'; - labelStyle?: object; - pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'; - radius?: number; - selectable?: 'off'|'auto'; - shortDesc?: string; - showDisclosure?: 'on'|'off'|'inherit'; - svgClassName?: string; - svgStyle?: object; - value: number; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojswipeactions/index.d.ts b/types/@oracle/oraclejet/ojs/ojswipeactions/index.d.ts deleted file mode 100644 index 11ce95700d..0000000000 --- a/types/@oracle/oraclejet/ojs/ojswipeactions/index.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/// -declare namespace oj { - class ojSwipeActions extends baseComponent { - translations: {ariaHideActionsDescription?: string, ariaShowEndActionsDescription?: string, ariaShowStartActionsDescription?: string}; - onOjAction: (event: oj.ojSwipeActions.ojAction)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojSwipeActionsEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - } - namespace ojSwipeActions { - class ojAction extends CustomEvent<{ [propName: string]: any}> { - - } - } - interface ojSwipeActionsEventMap extends oj.baseComponentEventMap { - 'ojAction': oj.ojSwipeActions.ojAction; - } - interface ojSwipeActionsSettableProperties extends baseComponentSettableProperties { - translations: {ariaHideActionsDescription?: string, ariaShowEndActionsDescription?: string, ariaShowStartActionsDescription?: string}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojswipetoreveal/index.d.ts b/types/@oracle/oraclejet/ojs/ojswipetoreveal/index.d.ts deleted file mode 100644 index da94a66d4b..0000000000 --- a/types/@oracle/oraclejet/ojs/ojswipetoreveal/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -declare namespace oj { - class SwipeToRevealUtils { - static setupSwipeActions(elem: Element, options?: {threshold?: number}): void; - static tearDownSwipeActions(elem: Element): void; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojswitch/index.d.ts b/types/@oracle/oraclejet/ojs/ojswitch/index.d.ts deleted file mode 100644 index 31f04cc1ee..0000000000 --- a/types/@oracle/oraclejet/ojs/ojswitch/index.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -/// -declare namespace oj { - class ojSwitch extends editableValue { - disabled: boolean; - readonly: boolean; - value: boolean; - onDisabledChanged: (event: CustomEvent)=> any; - onReadonlyChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojSwitch.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojSwitch.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojSwitchEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojSwitch { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojSwitchEventMap extends oj.editableValueEventMap { - 'ojAnimateEnd': oj.ojSwitch.ojAnimateEnd; - 'ojAnimateStart': oj.ojSwitch.ojAnimateStart; - 'disabledChanged': CustomEvent; - 'readonlyChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojSwitchSettableProperties extends editableValueSettableProperties { - disabled: boolean; - readonly: boolean; - value: boolean; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojswitcher/index.d.ts b/types/@oracle/oraclejet/ojs/ojswitcher/index.d.ts deleted file mode 100644 index d99477edf8..0000000000 --- a/types/@oracle/oraclejet/ojs/ojswitcher/index.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -declare namespace oj { - class ojSwitcher extends JetElement { - value: string; - onValueChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojSwitcherEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getProperty(property: string): any; - refresh(): void; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - } - interface ojSwitcherEventMap extends oj.JetElementEventMap { - 'valueChanged': CustomEvent; - } - interface ojSwitcherSettableProperties extends JetSettableProperties { - value: string; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojtable/index.d.ts b/types/@oracle/oraclejet/ojs/ojtable/index.d.ts deleted file mode 100644 index 5ee54785bd..0000000000 --- a/types/@oracle/oraclejet/ojs/ojtable/index.d.ts +++ /dev/null @@ -1,197 +0,0 @@ -/// -/// -declare namespace oj { - class ojTable extends baseComponent> { - accessibility: {rowHeader: string}; - as: string; - columns: Array<{className?: string|null, field?: string|null, footerClassName?: string|null, footerRenderer?: ((context: oj.ojTable.FooterRendererContext) => {insert: HTMLElement | string} | void) | null, footerStyle?: string|null, footerTemplate?: {componentElement: Element}, headerClassName?: string|null, headerRenderer?: ((context: oj.ojTable.HeaderRendererContext) => {insert: HTMLElement | string} | void) | null, headerStyle?: string|null, headerTemplate?: {componentElement: Element, data: object}, headerText?: string|null, id?: string|null, renderer?: ((context: oj.ojTable.ColumnsRendererContext) => {insert: HTMLElement | string} | void) | null, resizable?: 'enabled'|'disabled', sortProperty?: string|null, sortable?: 'auto'|'enabled'|'disabled', style?: string|null, template?: {componentElement: Element, data: object, row: object, index: number, columnIndex: number, key: any, mode: string}, width?: number|null}>|null; - columnsDefault: {className?: string|null, field?: string|null, footerClassName?: string|null, footerRenderer?: ((context: oj.ojTable.FooterRendererContext) => {insert: HTMLElement | string} | void) | null, footerStyle?: string|null, footerTemplate?: {componentElement: Element}, headerClassName?: string|null, headerRenderer?: ((context: oj.ojTable.HeaderRendererContext) => {insert: HTMLElement | string} | void) | null, headerStyle?: string|null, headerTemplate?: {componentElement: Element, data: object}, headerText?: string|null, renderer?: ((context: oj.ojTable.ColumnsRendererContext) => {insert: HTMLElement | string} | void) | null, resizable?: 'enabled'|'disabled', sortProperty?: string|null, sortable?: 'auto'|'enabled'|'disabled', style?: string|null, template?: {componentElement: Element, data: object, row: object, index: number, columnIndex: number, key: any, mode: string}, width?: number|null}; - currentRow: oj.ojTable.CurrentRow | null; - data: oj.DataProvider; - display: 'list'|'grid'; - dnd: {drag: {rows: {dataTypes?: string|Array, dragStart?: ((param0: DragEvent, param1: oj.ojTable.DragRowContext)=> void), drag?: ((param0: DragEvent)=> void), dragEnd?: ((param0: DragEvent)=> void)}}, drop: {columns: {dataTypes: string|Array, dragEnter?: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void), dragOver?: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void), dragLeave?: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void), drop: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void)}, rows: {dataTypes: string|Array, dragEnter?: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void), dragOver?: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void), dragLeave?: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void), drop: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void)}}, reorder: {columns: 'enabled'|'disabled'}}; - editMode: 'none'|'rowEdit'; - readonly firstSelectedRow: object; - horizontalGridVisible: 'auto'|'enabled'|'disabled'; - rowRenderer: ((context: oj.ojTable.RowRendererContext) => string | HTMLElement | void) | null; - scrollPolicy: 'auto'|'loadMoreOnScroll'; - scrollPolicyOptions: {fetchSize: number, maxCount: number}; - scrollPosition: {x?: number, y?: number, columnIndex?: number, rowIndex?: number, columnKey?: any, rowKey?: any, offsetX?: number, offsetY?: number}; - selection: Array & oj.ojTable.RowSelectionEnd> | Array & oj.ojTable.ColumnSelectionEnd>; - selectionMode: {column: 'single'|'multiple', row: 'single'|'multiple'}; - selectionRequired: boolean; - verticalGridVisible: 'auto'|'enabled'|'disabled'; - translations: {labelAccSelectionAffordanceBottom?: string, labelAccSelectionAffordanceTop?: string, labelDisableNonContiguousSelection?: string, labelEditRow?: string, labelEnableNonContiguousSelection?: string, labelResize?: string, labelResizePopupSpinner?: string, labelResizePopupSubmit?: string, labelSelectAndEditRow?: string, labelSelectColum?: string, labelSelectRow?: string, labelSort?: string, labelSortAsc?: string, labelSortDsc?: string, msgColumnResizeWidthValidation?: string, msgFetchingData?: string, msgInitializing?: string, msgNoData?: string, msgScrollPolicyMaxCountDetail?: string, msgScrollPolicyMaxCountSummary?: string, msgStatusSortAscending?: string, msgStatusSortDescending?: string}; - onAccessibilityChanged: (event: CustomEvent)=> any; - onAsChanged: (event: CustomEvent)=> any; - onColumnsChanged: (event: CustomEvent)=> any; - onColumnsDefaultChanged: (event: CustomEvent)=> any; - onCurrentRowChanged: (event: CustomEvent)=> any; - onDataChanged: (event: CustomEvent)=> any; - onDisplayChanged: (event: CustomEvent)=> any; - onDndChanged: (event: CustomEvent)=> any; - onEditModeChanged: (event: CustomEvent)=> any; - onFirstSelectedRowChanged: (event: CustomEvent)=> any; - onHorizontalGridVisibleChanged: (event: CustomEvent)=> any; - onRowRendererChanged: (event: CustomEvent)=> any; - onScrollPolicyChanged: (event: CustomEvent)=> any; - onScrollPolicyOptionsChanged: (event: CustomEvent)=> any; - onScrollPositionChanged: (event: CustomEvent)=> any; - onSelectionChanged: (event: CustomEvent)=> any; - onSelectionModeChanged: (event: CustomEvent)=> any; - onSelectionRequiredChanged: (event: CustomEvent)=> any; - onVerticalGridVisibleChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojTable.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojTable.ojAnimateStart)=> any; - onOjBeforeCurrentRow: (event: oj.ojTable.ojBeforeCurrentRow)=> any; - onOjBeforeRowEdit: (event: oj.ojTable.ojBeforeRowEdit)=> any; - onOjBeforeRowEditEnd: (event: oj.ojTable.ojBeforeRowEditEnd)=> any; - onOjSort: (event: oj.ojTable.ojSort)=> any; - - addEventListener>(type: T, listener: (this: HTMLElement, ev: ojTableEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getContextByNode(node: Element): {subId: 'oj-table-cell', rowIndex: number, columnIndex: number, key:string} | {subId: 'oj-table-footer'|'oj-table-header',index: number}; - getDataForVisibleRow(rowIndex: number) : {data: D, index: number, key: K} | null - refresh(): void; - refreshRow(rowIdx: number): Promise; - } - namespace ojTable { - class ojAnimateEnd extends CustomEvent<{action: 'add'|'remove'|'update', element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: 'add'|'remove'|'update', element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - - class ojBeforeCurrentRow extends CustomEvent<{currentRow: oj.ojTable.CurrentRow, previousCurrentRow: oj.ojTable.CurrentRow, [propName: string]: any}> { - - } - - class ojBeforeRowEdit extends CustomEvent<{rowContext: object, [propName: string]: any}> { - - } - - class ojBeforeRowEditEnd extends CustomEvent<{rowContext: object, cancelEdit: object, [propName: string]: any}> { - - } - - class ojSort extends CustomEvent<{header: Element, direction: 'ascending'|'descending', [propName: string]: any}> { - - } - } - interface ojTableEventMap extends oj.baseComponentEventMap { - 'ojAnimateEnd': oj.ojTable.ojAnimateEnd; - 'ojAnimateStart': oj.ojTable.ojAnimateStart; - 'ojBeforeCurrentRow': oj.ojTable.ojBeforeCurrentRow; - 'ojBeforeRowEdit': oj.ojTable.ojBeforeRowEdit; - 'ojBeforeRowEditEnd': oj.ojTable.ojBeforeRowEditEnd; - 'ojSort': oj.ojTable.ojSort; - 'accessibilityChanged': CustomEvent; - 'asChanged': CustomEvent; - 'columnsChanged': CustomEvent; - 'columnsDefaultChanged': CustomEvent; - 'currentRowChanged': CustomEvent; - 'dataChanged': CustomEvent; - 'displayChanged': CustomEvent; - 'dndChanged': CustomEvent; - 'editModeChanged': CustomEvent; - 'firstSelectedRowChanged': CustomEvent; - 'horizontalGridVisibleChanged': CustomEvent; - 'rowRendererChanged': CustomEvent; - 'scrollPolicyChanged': CustomEvent; - 'scrollPolicyOptionsChanged': CustomEvent; - 'scrollPositionChanged': CustomEvent; - 'selectionChanged': CustomEvent; - 'selectionModeChanged': CustomEvent; - 'selectionRequiredChanged': CustomEvent; - 'verticalGridVisibleChanged': CustomEvent; - } - interface ojTableSettableProperties extends baseComponentSettableProperties { - accessibility: {rowHeader: string}; - as: string; - columns: Array<{className?: string|null, field?: string|null, footerClassName?: string|null, footerRenderer?: ((context: oj.ojTable.FooterRendererContext) => {insert: HTMLElement | string} | void) | null, footerStyle?: string|null, footerTemplate?: {componentElement: Element}, headerClassName?: string|null, headerRenderer?: ((context: oj.ojTable.HeaderRendererContext) => {insert: HTMLElement | string} | void) | null, headerStyle?: string|null, headerTemplate?: {componentElement: Element, data: object}, headerText?: string|null, id?: string|null, renderer?: ((context: oj.ojTable.ColumnsRendererContext) => {insert: HTMLElement | string} | void) | null, resizable?: 'enabled'|'disabled', sortProperty?: string|null, sortable?: 'auto'|'enabled'|'disabled', style?: string|null, template?: {componentElement: Element, data: object, row: object, index: number, columnIndex: number, key: any, mode: string}, width?: number|null}>|null; - columnsDefault: {className?: string|null, field?: string|null, footerClassName?: string|null, footerRenderer?: ((context: oj.ojTable.FooterRendererContext) => {insert: HTMLElement | string} | void) | null, footerStyle?: string|null, footerTemplate?: {componentElement: Element}, headerClassName?: string|null, headerRenderer?: ((context: oj.ojTable.HeaderRendererContext) => {insert: HTMLElement | string} | void) | null, headerStyle?: string|null, headerTemplate?: {componentElement: Element, data: object}, headerText?: string|null, renderer?: ((context: oj.ojTable.ColumnsRendererContext) => {insert: HTMLElement | string} | void) | null, resizable?: 'enabled'|'disabled', sortProperty?: string|null, sortable?: 'auto'|'enabled'|'disabled', style?: string|null, template?: {componentElement: Element, data: object, row: object, index: number, columnIndex: number, key: any, mode: string}, width?: number|null}; - currentRow: oj.ojTable.CurrentRow | null; - data: oj.DataProvider|null; - display: 'list'|'grid'; - dnd: {drag: {rows: {dataTypes?: string|Array, dragStart?: ((param0: DragEvent, param1: oj.ojTable.DragRowContext)=> void), drag?: ((param0: DragEvent)=> void), dragEnd?: ((param0: DragEvent)=> void)}}, drop: {columns: {dataTypes: string|Array, dragEnter?: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void), dragOver?: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void), dragLeave?: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void), drop: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void)}, rows: {dataTypes: string|Array, dragEnter?: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void), dragOver?: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void), dragLeave?: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void), drop: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void)}}, reorder: {columns: 'enabled'|'disabled'}}; - editMode: 'none'|'rowEdit'; - readonly firstSelectedRow: object; - horizontalGridVisible: 'auto'|'enabled'|'disabled'; - rowRenderer: ((context: oj.ojTable.RowRendererContext) => string | HTMLElement | void) | null; - scrollPolicy: 'auto'|'loadMoreOnScroll'; - scrollPolicyOptions: {fetchSize: number, maxCount: number}; - scrollPosition: {x?: number, y?: number, columnIndex?: number, rowIndex?: number, columnKey?: any, rowKey?: any, offsetX?: number, offsetY?: number}; - selection: Array & oj.ojTable.RowSelectionEnd> | Array & oj.ojTable.ColumnSelectionEnd>; - selectionMode: {column: 'single'|'multiple', row: 'single'|'multiple'}; - selectionRequired: boolean; - verticalGridVisible: 'auto'|'enabled'|'disabled'; - translations: {labelAccSelectionAffordanceBottom?: string, labelAccSelectionAffordanceTop?: string, labelDisableNonContiguousSelection?: string, labelEditRow?: string, labelEnableNonContiguousSelection?: string, labelResize?: string, labelResizePopupSpinner?: string, labelResizePopupSubmit?: string, labelSelectAndEditRow?: string, labelSelectColum?: string, labelSelectRow?: string, labelSort?: string, labelSortAsc?: string, labelSortDsc?: string, msgColumnResizeWidthValidation?: string, msgFetchingData?: string, msgInitializing?: string, msgNoData?: string, msgScrollPolicyMaxCountDetail?: string, msgScrollPolicyMaxCountSummary?: string, msgStatusSortAscending?: string, msgStatusSortDescending?: string}; - } - namespace ojTable { - type ColumnSelectionEnd = {endIndex:{column:number},endKey?:{column:K}}|{endIndex?:{column:number}, endKey:{column:K}}; - } - namespace ojTable { - type ColumnSelectionStart = {startIndex:{column:number}, startKey?:{column:K}}|{startIndex?:{column:number}, startKey:{column:K}}; - } - namespace ojTable { - type ColumnsRendererContext = - { - cellContext: {datasource: oj.DataProvider|null, mode: 'edit'|'navigation', status: oj.ojTable.ContextStatus}, columnIndex: number, componentElement: Element, data: D, parentElement: Element, row: {[name: string]: any} - } - } - namespace ojTable { - type ContextStatus = - { - rowIndex: number, rowKey: K, currentRow: oj.ojTable.CurrentRow - } - } - namespace ojTable { - type CurrentRow = {rowIndex: number, rowKey?: K}|{rowIndex?: number, rowKey: K}; - } - namespace ojTable { - type DragRowContext = - { - rows: Array<{data: D, index: number, key: K}> - } - } - namespace ojTable { - type DropColumnContext = - { - columnIndex: number - } - } - namespace ojTable { - type DropRowContext = - { - rowIndex: number - } - } - namespace ojTable { - type FooterRendererContext = - { - columnIndex: number, componentElement: Element, footerContext: {datasource: oj.DataProvider|null}, parentElement: Element - } - } - namespace ojTable { - type HeaderRendererContext = - { - columnIndex: number, columnHeaderDefaultRenderer: ((param0: object, param1: ((param0: object)=>void))=> void), columnHeaderSortableIconRenderer: ((param0: object, param1: ((param0: Object)=>void))=> void), componentElement: Element, data: string, headerContext: {datasource: oj.DataProvider|null}, parentElement: Element - } - } - namespace ojTable { - type RowRendererContext = - { - componentElement: Element, data: {[name: string]: any}, parentElement: Element, rowContext: {datasource: oj.DataProvider|null, mode: 'edit'|'navigation', status: oj.ojTable.ContextStatus} - } - } - namespace ojTable { - type RowSelectionEnd = {endIndex: {row: number}, endKey?: {row: K}}|{endIndex?:{row: number}, endKey:{row: K}}; - } - namespace ojTable { - type RowSelectionStart = {startIndex: {row: number}, startKey?:{row: K}}|{startIndex?: {row: number}, startKey:{row: K}}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojtagcloud/index.d.ts b/types/@oracle/oraclejet/ojs/ojtagcloud/index.d.ts deleted file mode 100644 index 9400b980f7..0000000000 --- a/types/@oracle/oraclejet/ojs/ojtagcloud/index.d.ts +++ /dev/null @@ -1,139 +0,0 @@ -/// -/// -declare namespace oj { - class ojTagCloud extends dvtBaseComponent> { - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - as: string; - data: oj.DataProvider|null; - hiddenCategories: Array; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - layout: 'cloud'|'rectangular'; - selection: Array; - selectionMode: 'single'|'multiple'|'none'; - styleDefaults: {animationDuration?: number, hoverBehaviorDelay?: number, svgStyle?: object}; - tooltip: {renderer: ((context: oj.ojTagCloud.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - touchResponse: 'touchStart'|'auto'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; - onAnimationOnDisplayChanged: (event: CustomEvent)=> any; - onAsChanged: (event: CustomEvent)=> any; - onDataChanged: (event: CustomEvent)=> any; - onHiddenCategoriesChanged: (event: CustomEvent)=> any; - onHighlightMatchChanged: (event: CustomEvent)=> any; - onHighlightedCategoriesChanged: (event: CustomEvent)=> any; - onHoverBehaviorChanged: (event: CustomEvent)=> any; - onLayoutChanged: (event: CustomEvent)=> any; - onSelectionChanged: (event: CustomEvent)=> any; - onSelectionModeChanged: (event: CustomEvent)=> any; - onStyleDefaultsChanged: (event: CustomEvent)=> any; - onTooltipChanged: (event: CustomEvent)=> any; - onTouchResponseChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojTagCloudEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getContextByNode(node: Element): oj.ojTagCloud.NodeContext|null; - getItem(index: number): oj.ojTagCloud.ItemContext|null; - getItemCount(): number; - } - interface ojTagCloudEventMap extends oj.dvtBaseComponentEventMap { - 'animationOnDataChangeChanged': CustomEvent; - 'animationOnDisplayChanged': CustomEvent; - 'asChanged': CustomEvent; - 'dataChanged': CustomEvent; - 'hiddenCategoriesChanged': CustomEvent; - 'highlightMatchChanged': CustomEvent; - 'highlightedCategoriesChanged': CustomEvent; - 'hoverBehaviorChanged': CustomEvent; - 'layoutChanged': CustomEvent; - 'selectionChanged': CustomEvent; - 'selectionModeChanged': CustomEvent; - 'styleDefaultsChanged': CustomEvent; - 'tooltipChanged': CustomEvent; - 'touchResponseChanged': CustomEvent; - } - interface ojTagCloudSettableProperties extends dvtBaseComponentSettableProperties { - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - as: string; - data: oj.DataProvider|null; - hiddenCategories: Array; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - layout: 'cloud'|'rectangular'; - selection: Array; - selectionMode: 'single'|'multiple'|'none'; - styleDefaults: {animationDuration?: number, hoverBehaviorDelay?: number, svgStyle?: object}; - tooltip: {renderer: ((context: oj.ojTagCloud.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - touchResponse: 'touchStart'|'auto'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - } - namespace ojTagCloud { - type ItemContext = - { - color: string, label: string, selected: boolean, tooltip: string, value: number - } - } - namespace ojTagCloud { - type NodeContext = - { - subId: string, index: number - } - } - namespace ojTagCloud { - type TooltipContext = - { - color: string, componentElement: Element, id: K, label: string, parentElement: Element, value: number - } - } - -} -declare namespace oj { - class ojTagCloudItem extends JetElement { - categories: Array; - color?: string; - label: string; - shortDesc: string; - svgClassName: string; - svgStyle: object; - url: string; - value: number|null; - onCategoriesChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onLabelChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onUrlChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojTagCloudItemEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojTagCloudItemEventMap extends oj.JetElementEventMap { - 'categoriesChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'labelChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'urlChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojTagCloudItemSettableProperties extends JetSettableProperties { - categories: Array; - color?: string; - label: string; - shortDesc: string; - svgClassName: string; - svgStyle: object; - url: string; - value: number|null; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojthematicmap/index.d.ts b/types/@oracle/oraclejet/ojs/ojthematicmap/index.d.ts deleted file mode 100644 index 81c012ce6d..0000000000 --- a/types/@oracle/oraclejet/ojs/ojthematicmap/index.d.ts +++ /dev/null @@ -1,376 +0,0 @@ -/// -/// -declare namespace oj { - class ojThematicMap extends dvtBaseComponent> { - animationDuration: number; - animationOnDisplay: 'auto'|'none'; - areaData: oj.DataProvider|null; - as: string; - focusRenderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); - hiddenCategories: Array; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - hoverRenderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); - initialZooming: 'auto'|'none'; - isolatedItem: K1; - labelDisplay: 'on'|'off'|'auto'; - labelType: 'long'|'short'; - linkData: oj.DataProvider|null; - mapProvider: {geo: object, propertiesKeys: {id: string, longLabel?: string, shortLabel?: string}}; - markerData: oj.DataProvider|null; - markerZoomBehavior: 'zoom'|'fixed'; - maxZoom: number; - panning: 'auto'|'none'; - renderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); - selection: Array; - selectionMode: 'single'|'multiple'|'none'; - selectionRenderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); - styleDefaults: {areaSvgStyle?: object, dataAreaDefaults?: {borderColor?: string, hoverColor?: string, selectedInnerColor?: string, selectedOuterColor?: string}, dataMarkerDefaults?: {borderColor?: string, borderStyle?: 'none'|'solid', borderWidth?: number, color?: string, height?: number, labelStyle?: object, opacity?: number, shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, width?: number}, hoverBehaviorDelay?: number, labelStyle?: object, linkDefaults?: {color?: string, width?: number}}; - tooltip: {renderer: ((context: oj.ojThematicMap.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - tooltipDisplay: 'auto'|'labelAndShortDesc'|'none'|'shortDesc'; - touchResponse: 'touchStart'|'auto'; - zooming: 'auto'|'none'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - onAnimationDurationChanged: (event: CustomEvent)=> any; - onAnimationOnDisplayChanged: (event: CustomEvent)=> any; - onAreaDataChanged: (event: CustomEvent)=> any; - onAsChanged: (event: CustomEvent)=> any; - onFocusRendererChanged: (event: CustomEvent)=> any; - onHiddenCategoriesChanged: (event: CustomEvent)=> any; - onHighlightMatchChanged: (event: CustomEvent)=> any; - onHighlightedCategoriesChanged: (event: CustomEvent)=> any; - onHoverBehaviorChanged: (event: CustomEvent)=> any; - onHoverRendererChanged: (event: CustomEvent)=> any; - onInitialZoomingChanged: (event: CustomEvent)=> any; - onIsolatedItemChanged: (event: CustomEvent)=> any; - onLabelDisplayChanged: (event: CustomEvent)=> any; - onLabelTypeChanged: (event: CustomEvent)=> any; - onLinkDataChanged: (event: CustomEvent)=> any; - onMapProviderChanged: (event: CustomEvent)=> any; - onMarkerDataChanged: (event: CustomEvent)=> any; - onMarkerZoomBehaviorChanged: (event: CustomEvent)=> any; - onMaxZoomChanged: (event: CustomEvent)=> any; - onPanningChanged: (event: CustomEvent)=> any; - onRendererChanged: (event: CustomEvent)=> any; - onSelectionChanged: (event: CustomEvent)=> any; - onSelectionModeChanged: (event: CustomEvent)=> any; - onSelectionRendererChanged: (event: CustomEvent)=> any; - onStyleDefaultsChanged: (event: CustomEvent)=> any; - onTooltipChanged: (event: CustomEvent)=> any; - onTooltipDisplayChanged: (event: CustomEvent)=> any; - onTouchResponseChanged: (event: CustomEvent)=> any; - onZoomingChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojThematicMapEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getArea(index: number): oj.ojThematicMap.DataContext|null; - getContextByNode(node: Element): oj.ojThematicMap.NodeContext|null; - getLink(index: number): oj.ojThematicMap.DataContext|null; - getMarker(index: number): oj.ojThematicMap.DataContext|null; - } - interface ojThematicMapEventMap extends oj.dvtBaseComponentEventMap { - 'animationDurationChanged': CustomEvent; - 'animationOnDisplayChanged': CustomEvent; - 'areaDataChanged': CustomEvent; - 'asChanged': CustomEvent; - 'focusRendererChanged': CustomEvent; - 'hiddenCategoriesChanged': CustomEvent; - 'highlightMatchChanged': CustomEvent; - 'highlightedCategoriesChanged': CustomEvent; - 'hoverBehaviorChanged': CustomEvent; - 'hoverRendererChanged': CustomEvent; - 'initialZoomingChanged': CustomEvent; - 'isolatedItemChanged': CustomEvent; - 'labelDisplayChanged': CustomEvent; - 'labelTypeChanged': CustomEvent; - 'linkDataChanged': CustomEvent; - 'mapProviderChanged': CustomEvent; - 'markerDataChanged': CustomEvent; - 'markerZoomBehaviorChanged': CustomEvent; - 'maxZoomChanged': CustomEvent; - 'panningChanged': CustomEvent; - 'rendererChanged': CustomEvent; - 'selectionChanged': CustomEvent; - 'selectionModeChanged': CustomEvent; - 'selectionRendererChanged': CustomEvent; - 'styleDefaultsChanged': CustomEvent; - 'tooltipChanged': CustomEvent; - 'tooltipDisplayChanged': CustomEvent; - 'touchResponseChanged': CustomEvent; - 'zoomingChanged': CustomEvent; - } - interface ojThematicMapSettableProperties extends dvtBaseComponentSettableProperties { - animationDuration: number; - animationOnDisplay: 'auto'|'none'; - areaData: oj.DataProvider|null; - as: string; - focusRenderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); - hiddenCategories: Array; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - hoverRenderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); - initialZooming: 'auto'|'none'; - isolatedItem: K1; - labelDisplay: 'on'|'off'|'auto'; - labelType: 'long'|'short'; - linkData: oj.DataProvider|null; - mapProvider: {geo: object, propertiesKeys: {id: string, longLabel?: string, shortLabel?: string}}; - markerData: oj.DataProvider|null; - markerZoomBehavior: 'zoom'|'fixed'; - maxZoom: number; - panning: 'auto'|'none'; - renderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); - selection: Array; - selectionMode: 'single'|'multiple'|'none'; - selectionRenderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); - styleDefaults: {areaSvgStyle?: object, dataAreaDefaults?: {borderColor?: string, hoverColor?: string, selectedInnerColor?: string, selectedOuterColor?: string}, dataMarkerDefaults?: {borderColor?: string, borderStyle?: 'none'|'solid', borderWidth?: number, color?: string, height?: number, labelStyle?: object, opacity?: number, shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, width?: number}, hoverBehaviorDelay?: number, labelStyle?: object, linkDefaults?: {color?: string, width?: number}}; - tooltip: {renderer: ((context: oj.ojThematicMap.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - tooltipDisplay: 'auto'|'labelAndShortDesc'|'none'|'shortDesc'; - touchResponse: 'touchStart'|'auto'; - zooming: 'auto'|'none'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - } - namespace ojThematicMap { - type DataContext = - { - color: string, label: string, selected: boolean, tooltip: string - } - } - namespace ojThematicMap { - type NodeContext = - { - subId: string, index: number - } - } - namespace ojThematicMap { - type RendererContext = - { - color: string, componentElement: Element, data: object, id: K1|K2|K3, itemData: D1|D2|D3, label: string, location: string|null, parentElement: Element, previousState: {hovered: boolean, selected: boolean, focused: boolean}, renderDefaultFocus: (()=> void), renderDefaultHover: (()=> void), renderDefaultSelection: (()=> void), root: Element|null, state: {hovered: boolean, selected: boolean, focused: boolean}, x: number|null, y: number|null - } - } - namespace ojThematicMap { - type TooltipContext = - { - color: string|null, componentElement: Element, data: object|null, id: K1|K2|K3, itemData: D1|D2|D3, label: string|null, location: string|null, locationName: string|null, parentElement: Element, tooltip: string, x: number, y: number - } - } - -} -declare namespace oj { - class ojThematicMapArea extends JetElement { - categories: Array; - color: string; - label: string; - labelStyle: object; - location: string; - opacity: number; - selectable: 'auto'|'off'; - shortDesc: string; - svgClassName: string; - svgStyle: object; - onCategoriesChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onLabelChanged: (event: CustomEvent)=> any; - onLabelStyleChanged: (event: CustomEvent)=> any; - onLocationChanged: (event: CustomEvent)=> any; - onOpacityChanged: (event: CustomEvent)=> any; - onSelectableChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojThematicMapAreaEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojThematicMapAreaEventMap extends oj.JetElementEventMap { - 'categoriesChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'labelChanged': CustomEvent; - 'labelStyleChanged': CustomEvent; - 'locationChanged': CustomEvent; - 'opacityChanged': CustomEvent; - 'selectableChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - } - interface ojThematicMapAreaSettableProperties extends JetSettableProperties { - categories: Array; - color: string; - label: string; - labelStyle: object; - location: string; - opacity: number; - selectable: 'auto'|'off'; - shortDesc: string; - svgClassName: string; - svgStyle: object; - } - -} -declare namespace oj { - class ojThematicMapLink extends JetElement { - categories: Array; - color: string; - endLocation: {id?: any, location?: string, x?: number, y?: number}; - selectable: 'auto'|'off'; - shortDesc: string; - startLocation: {id?: any, location?: string, x?: number, y?: number}; - svgClassName: string; - svgStyle: object; - width: number; - onCategoriesChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onEndLocationChanged: (event: CustomEvent)=> any; - onSelectableChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onStartLocationChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onWidthChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojThematicMapLinkEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojThematicMapLinkEventMap extends oj.JetElementEventMap { - 'categoriesChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'endLocationChanged': CustomEvent; - 'selectableChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'startLocationChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'widthChanged': CustomEvent; - } - interface ojThematicMapLinkSettableProperties extends JetSettableProperties { - categories: Array; - color: string; - endLocation: {id?: any, location?: string, x?: number, y?: number}; - selectable: 'auto'|'off'; - shortDesc: string; - startLocation: {id?: any, location?: string, x?: number, y?: number}; - svgClassName: string; - svgStyle: object; - width: number; - } - -} -declare namespace oj { - class ojThematicMapMarker extends JetElement { - borderColor: string; - borderStyle: 'solid'|'none'; - borderWidth: number; - categories: Array; - color: string; - height: number; - label: string; - labelPosition: 'bottom'|'center'|'top'; - labelStyle: object; - location: string; - opacity: number; - rotation: number; - selectable: 'auto'|'off'; - shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string; - shortDesc: string; - source: string; - sourceHover: string; - sourceHoverSelected: string; - sourceSelected: string; - svgClassName: string; - svgStyle: object; - value: number; - width: number; - x: number|null; - y: number|null; - onBorderColorChanged: (event: CustomEvent)=> any; - onBorderStyleChanged: (event: CustomEvent)=> any; - onBorderWidthChanged: (event: CustomEvent)=> any; - onCategoriesChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onHeightChanged: (event: CustomEvent)=> any; - onLabelChanged: (event: CustomEvent)=> any; - onLabelPositionChanged: (event: CustomEvent)=> any; - onLabelStyleChanged: (event: CustomEvent)=> any; - onLocationChanged: (event: CustomEvent)=> any; - onOpacityChanged: (event: CustomEvent)=> any; - onRotationChanged: (event: CustomEvent)=> any; - onSelectableChanged: (event: CustomEvent)=> any; - onShapeChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onSourceChanged: (event: CustomEvent)=> any; - onSourceHoverChanged: (event: CustomEvent)=> any; - onSourceHoverSelectedChanged: (event: CustomEvent)=> any; - onSourceSelectedChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onWidthChanged: (event: CustomEvent)=> any; - onXChanged: (event: CustomEvent)=> any; - onYChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojThematicMapMarkerEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojThematicMapMarkerEventMap extends oj.JetElementEventMap { - 'borderColorChanged': CustomEvent; - 'borderStyleChanged': CustomEvent; - 'borderWidthChanged': CustomEvent; - 'categoriesChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'heightChanged': CustomEvent; - 'labelChanged': CustomEvent; - 'labelPositionChanged': CustomEvent; - 'labelStyleChanged': CustomEvent; - 'locationChanged': CustomEvent; - 'opacityChanged': CustomEvent; - 'rotationChanged': CustomEvent; - 'selectableChanged': CustomEvent; - 'shapeChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'sourceChanged': CustomEvent; - 'sourceHoverChanged': CustomEvent; - 'sourceHoverSelectedChanged': CustomEvent; - 'sourceSelectedChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'valueChanged': CustomEvent; - 'widthChanged': CustomEvent; - 'xChanged': CustomEvent; - 'yChanged': CustomEvent; - } - interface ojThematicMapMarkerSettableProperties extends JetSettableProperties { - borderColor: string; - borderStyle: 'solid'|'none'; - borderWidth: number; - categories: Array; - color: string; - height: number; - label: string; - labelPosition: 'bottom'|'center'|'top'; - labelStyle: object; - location: string; - opacity: number; - rotation: number; - selectable: 'auto'|'off'; - shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string; - shortDesc: string; - source: string; - sourceHover: string; - sourceHoverSelected: string; - sourceSelected: string; - svgClassName: string; - svgStyle: object; - value: number; - width: number; - x: number|null; - y: number|null; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojtime-base/index.d.ts b/types/@oracle/oraclejet/ojs/ojtime-base/index.d.ts deleted file mode 100644 index ba23106a05..0000000000 --- a/types/@oracle/oraclejet/ojs/ojtime-base/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/// -/// -declare namespace oj { - abstract class dvtTimeComponent extends dvtBaseComponent { - - addEventListener(type: T, listener: (this: HTMLElement, ev: dvtTimeComponentEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface dvtTimeComponentEventMap extends oj.dvtBaseComponentEventMap { - } - interface dvtTimeComponentSettableProperties extends dvtBaseComponentSettableProperties { - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojtimeaxis/index.d.ts b/types/@oracle/oraclejet/ojs/ojtimeaxis/index.d.ts deleted file mode 100644 index 1710eb655d..0000000000 --- a/types/@oracle/oraclejet/ojs/ojtimeaxis/index.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -/// -/// -/// -declare namespace oj { - class ojTimeAxis extends dvtBaseComponent { - converter: oj.ojTimeAxis.Converter|oj.Converter; - end: string; - scale: 'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'quarters'|'years'; - start: string; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - onConverterChanged: (event: CustomEvent)=> any; - onEndChanged: (event: CustomEvent)=> any; - onScaleChanged: (event: CustomEvent)=> any; - onStartChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojTimeAxisEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojTimeAxisEventMap extends oj.dvtBaseComponentEventMap { - 'converterChanged': CustomEvent; - 'endChanged': CustomEvent; - 'scaleChanged': CustomEvent; - 'startChanged': CustomEvent; - } - interface ojTimeAxisSettableProperties extends dvtBaseComponentSettableProperties { - converter: oj.ojTimeAxis.Converter|oj.Converter; - end: string; - scale: 'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'quarters'|'years'; - start: string; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - } - namespace ojTimeAxis { - type Converter = - { - default?: oj.Converter, seconds?: oj.Converter, minutes?: oj.Converter, hours?: oj.Converter, days?: oj.Converter, weeks?: oj.Converter, months?: oj.Converter, quarters?: oj.Converter, years?: oj.Converter - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojtimeutils/index.d.ts b/types/@oracle/oraclejet/ojs/ojtimeutils/index.d.ts deleted file mode 100644 index 9252a83ed8..0000000000 --- a/types/@oracle/oraclejet/ojs/ojtimeutils/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -declare namespace oj { - class TimeUtils { - static getDate(pos: number, rangeStartTime: Date|string|number, rangeEndTime: Date|string|number, rangeWidth: number): number; - static getLength(startTime: Date|string|number, endTime: Date|string|number, rangeStartTime: Date|string|number, rangeEndTime: Date|string|number, rangeWidth: number): number; - static getPosition(time: Date|string|number, rangeStartTime: Date|string|number, rangeEndTime: Date|string|number, rangeWidth: number): number; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojtoolbar/index.d.ts b/types/@oracle/oraclejet/ojs/ojtoolbar/index.d.ts deleted file mode 100644 index a8eec009ec..0000000000 --- a/types/@oracle/oraclejet/ojs/ojtoolbar/index.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/// -declare namespace oj { - class ojToolbar extends baseComponent { - chroming: 'full'|'half'|'outlined'; - onChromingChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojToolbarEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - } - interface ojToolbarEventMap extends oj.baseComponentEventMap { - 'chromingChanged': CustomEvent; - } - interface ojToolbarSettableProperties extends baseComponentSettableProperties { - chroming: 'full'|'half'|'outlined'; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojtrain/index.d.ts b/types/@oracle/oraclejet/ojs/ojtrain/index.d.ts deleted file mode 100644 index db6720b353..0000000000 --- a/types/@oracle/oraclejet/ojs/ojtrain/index.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -/// -declare namespace oj { - class ojTrain extends baseComponent { - selectedStep: string; - steps: Array; - onSelectedStepChanged: (event: CustomEvent)=> any; - onStepsChanged: (event: CustomEvent)=> any; - onOjBeforeDeselect: (event: oj.ojTrain.ojBeforeDeselect)=> any; - onOjBeforeSelect: (event: oj.ojTrain.ojBeforeSelect)=> any; - onOjDeselect: (event: oj.ojTrain.ojDeselect)=> any; - onOjSelect: (event: oj.ojTrain.ojSelect)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojTrainEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getNextSelectableStep(): string|null; - getPreviousSelectableStep(): string|null; - getStep(id: string): oj.ojTrain.Step|null; - refresh(): void; - updateStep(id: string, stepProperties: {id?: string, label?: string, disabled?: boolean, visited?: boolean, messageType?: 'info'|'error'|'fatal'|'warning'}): void; - } - namespace ojTrain { - class ojBeforeDeselect extends CustomEvent<{toStep: string, fromStep: string, [propName: string]: any}> { - - } - - class ojBeforeSelect extends CustomEvent<{toStep: string, fromStep: string, [propName: string]: any}> { - - } - - class ojDeselect extends CustomEvent<{toStep: string, fromStep: string, [propName: string]: any}> { - - } - - class ojSelect extends CustomEvent<{toStep: string, fromStep: string, [propName: string]: any}> { - - } - } - interface ojTrainEventMap extends oj.baseComponentEventMap { - 'ojBeforeDeselect': oj.ojTrain.ojBeforeDeselect; - 'ojBeforeSelect': oj.ojTrain.ojBeforeSelect; - 'ojDeselect': oj.ojTrain.ojDeselect; - 'ojSelect': oj.ojTrain.ojSelect; - 'selectedStepChanged': CustomEvent; - 'stepsChanged': CustomEvent; - } - interface ojTrainSettableProperties extends baseComponentSettableProperties { - selectedStep: string; - steps: Array; - } - namespace ojTrain { - type Step = - { - id: string, label: string, disabled?: boolean, visited?: boolean, messageType?: 'info'|'error'|'fatal'|'warning' - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojtreedataprovider/index.d.ts b/types/@oracle/oraclejet/ojs/ojtreedataprovider/index.d.ts deleted file mode 100644 index 333e0208ec..0000000000 --- a/types/@oracle/oraclejet/ojs/ojtreedataprovider/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/// -declare namespace oj { - interface TreeDataProvider extends DataProvider { - getChildDataProvider(any): TreeDataProvider - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojtreemap/index.d.ts b/types/@oracle/oraclejet/ojs/ojtreemap/index.d.ts deleted file mode 100644 index 96a1db2873..0000000000 --- a/types/@oracle/oraclejet/ojs/ojtreemap/index.d.ts +++ /dev/null @@ -1,241 +0,0 @@ -/// -/// -declare namespace oj { - class ojTreemap extends dvtBaseComponent> { - animationDuration: number; - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - animationUpdateColor: string; - as: string; - colorLabel: string; - data: oj.DataProvider|null; - displayLevels: number; - drilling: 'on'|'off'; - groupGaps: 'all'|'none'|'outer'; - hiddenCategories: Array; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - hoverBehaviorDelay: number; - isolatedNode: any; - layout: 'sliceAndDiceHorizontal'|'sliceAndDiceVertical'|'squarified'; - nodeContent: {renderer: ((context: oj.ojTreemap.NodeContentContext) => ({insert: Element|string}))}; - nodeDefaults: {groupLabelDisplay: 'node'|'off'|'header', header: {backgroundColor: string, borderColor: string, hoverBackgroundColor: string, hoverInnerColor: string, hoverOuterColor: string, isolate: 'off'|'on', labelHalign: 'center'|'end'|'start', labelStyle: object, selectedBackgroundColor: string, selectedInnerColor: string, selectedOuterColor: string, useNodeColor: 'on'|'off'}, hoverColor: string, labelDisplay: 'off'|'node', labelHalign: 'start'|'end'|'center', labelMinLength: number, labelStyle: object, labelValign: 'top'|'bottom'|'center', selectedInnerColor: string, selectedOuterColor: string}; - nodeSeparators: 'bevels'|'gaps'; - rootNode: any; - selection: Array; - selectionMode: 'none'|'single'|'multiple'; - sizeLabel: string; - sorting: 'on'|'off'; - tooltip: {renderer: ((context: oj.ojTreemap.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - touchResponse: 'touchStart'|'auto'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelColor?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, labelSize?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, tooltipIsolate?: string, tooltipRestore?: string}; - onAnimationDurationChanged: (event: CustomEvent)=> any; - onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; - onAnimationOnDisplayChanged: (event: CustomEvent)=> any; - onAnimationUpdateColorChanged: (event: CustomEvent)=> any; - onAsChanged: (event: CustomEvent)=> any; - onColorLabelChanged: (event: CustomEvent)=> any; - onDataChanged: (event: CustomEvent)=> any; - onDisplayLevelsChanged: (event: CustomEvent)=> any; - onDrillingChanged: (event: CustomEvent)=> any; - onGroupGapsChanged: (event: CustomEvent)=> any; - onHiddenCategoriesChanged: (event: CustomEvent)=> any; - onHighlightMatchChanged: (event: CustomEvent)=> any; - onHighlightedCategoriesChanged: (event: CustomEvent)=> any; - onHoverBehaviorChanged: (event: CustomEvent)=> any; - onHoverBehaviorDelayChanged: (event: CustomEvent)=> any; - onIsolatedNodeChanged: (event: CustomEvent)=> any; - onLayoutChanged: (event: CustomEvent)=> any; - onNodeContentChanged: (event: CustomEvent)=> any; - onNodeDefaultsChanged: (event: CustomEvent)=> any; - onNodeSeparatorsChanged: (event: CustomEvent)=> any; - onRootNodeChanged: (event: CustomEvent)=> any; - onSelectionChanged: (event: CustomEvent)=> any; - onSelectionModeChanged: (event: CustomEvent)=> any; - onSizeLabelChanged: (event: CustomEvent)=> any; - onSortingChanged: (event: CustomEvent)=> any; - onTooltipChanged: (event: CustomEvent)=> any; - onTouchResponseChanged: (event: CustomEvent)=> any; - onOjBeforeDrill: (event: oj.ojTreemap.ojBeforeDrill)=> any; - onOjDrill: (event: oj.ojTreemap.ojDrill)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojTreemapEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getContextByNode(node: Element): oj.ojTreemap.NodeContext|null; - getNode(subIdPath: Array): oj.ojTreemap.DataContext|null; - } - namespace ojTreemap { - class ojBeforeDrill extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { - - } - - class ojDrill extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { - - } - } - interface ojTreemapEventMap extends oj.dvtBaseComponentEventMap { - 'ojBeforeDrill': oj.ojTreemap.ojBeforeDrill; - 'ojDrill': oj.ojTreemap.ojDrill; - 'animationDurationChanged': CustomEvent; - 'animationOnDataChangeChanged': CustomEvent; - 'animationOnDisplayChanged': CustomEvent; - 'animationUpdateColorChanged': CustomEvent; - 'asChanged': CustomEvent; - 'colorLabelChanged': CustomEvent; - 'dataChanged': CustomEvent; - 'displayLevelsChanged': CustomEvent; - 'drillingChanged': CustomEvent; - 'groupGapsChanged': CustomEvent; - 'hiddenCategoriesChanged': CustomEvent; - 'highlightMatchChanged': CustomEvent; - 'highlightedCategoriesChanged': CustomEvent; - 'hoverBehaviorChanged': CustomEvent; - 'hoverBehaviorDelayChanged': CustomEvent; - 'isolatedNodeChanged': CustomEvent; - 'layoutChanged': CustomEvent; - 'nodeContentChanged': CustomEvent; - 'nodeDefaultsChanged': CustomEvent; - 'nodeSeparatorsChanged': CustomEvent; - 'rootNodeChanged': CustomEvent; - 'selectionChanged': CustomEvent; - 'selectionModeChanged': CustomEvent; - 'sizeLabelChanged': CustomEvent; - 'sortingChanged': CustomEvent; - 'tooltipChanged': CustomEvent; - 'touchResponseChanged': CustomEvent; - } - interface ojTreemapSettableProperties extends dvtBaseComponentSettableProperties { - animationDuration: number; - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - animationUpdateColor: string; - as: string; - colorLabel: string; - data: oj.DataProvider|null; - displayLevels: number; - drilling: 'on'|'off'; - groupGaps: 'all'|'none'|'outer'; - hiddenCategories: Array; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - hoverBehaviorDelay: number; - isolatedNode: any; - layout: 'sliceAndDiceHorizontal'|'sliceAndDiceVertical'|'squarified'; - nodeContent: {renderer: ((context: oj.ojTreemap.NodeContentContext) => ({insert: Element|string}))}; - nodeDefaults: {groupLabelDisplay: 'node'|'off'|'header', header: {backgroundColor: string, borderColor: string, hoverBackgroundColor: string, hoverInnerColor: string, hoverOuterColor: string, isolate: 'off'|'on', labelHalign: 'center'|'end'|'start', labelStyle: object, selectedBackgroundColor: string, selectedInnerColor: string, selectedOuterColor: string, useNodeColor: 'on'|'off'}, hoverColor: string, labelDisplay: 'off'|'node', labelHalign: 'start'|'end'|'center', labelMinLength: number, labelStyle: object, labelValign: 'top'|'bottom'|'center', selectedInnerColor: string, selectedOuterColor: string}; - nodeSeparators: 'bevels'|'gaps'; - rootNode: any; - selection: Array; - selectionMode: 'none'|'single'|'multiple'; - sizeLabel: string; - sorting: 'on'|'off'; - tooltip: {renderer: ((context: oj.ojTreemap.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - touchResponse: 'touchStart'|'auto'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelColor?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, labelSize?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, tooltipIsolate?: string, tooltipRestore?: string}; - } - namespace ojTreemap { - type DataContext = - { - color: string, label: string, selected: boolean, size: number, tooltip: string - } - } - namespace ojTreemap { - type NodeContentContext = - { - bounds: {x: number, y: number, width: number, height: number}, id: K, data: object, itemData: D, componentElement: Element - } - } - namespace ojTreemap { - type NodeContext = - { - subId: string, indexPath: Array - } - } - namespace ojTreemap { - type TooltipContext = - { - parentElement: Element, id: K, label: string, value: number, color: string, data: object, itemData: D, componentElement: Element - } - } - -} -declare namespace oj { - class ojTreemapNode extends JetElement { - categories?: Array; - color?: string; - drilling?: 'on'|'off'|'inherit'; - groupLabelDisplay?: 'node'|'off'|'header'; - header?: {isolate?: 'off'|'on', labelHalign?: 'center'|'end'|'start', labelStyle?: object, useNodeColor?: 'on'|'off'}; - label?: string; - labelDisplay?: 'off'|'node'; - labelHalign?: 'start'|'end'|'center'; - labelStyle?: object; - labelValign?: 'top'|'bottom'|'center'; - pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'; - selectable?: 'off'|'auto'; - shortDesc?: string; - svgClassName?: string; - svgStyle?: object; - value: number; - onCategoriesChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onDrillingChanged: (event: CustomEvent)=> any; - onGroupLabelDisplayChanged: (event: CustomEvent)=> any; - onHeaderChanged: (event: CustomEvent)=> any; - onLabelChanged: (event: CustomEvent)=> any; - onLabelDisplayChanged: (event: CustomEvent)=> any; - onLabelHalignChanged: (event: CustomEvent)=> any; - onLabelStyleChanged: (event: CustomEvent)=> any; - onLabelValignChanged: (event: CustomEvent)=> any; - onPatternChanged: (event: CustomEvent)=> any; - onSelectableChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojTreemapNodeEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojTreemapNodeEventMap extends oj.JetElementEventMap { - 'categoriesChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'drillingChanged': CustomEvent; - 'groupLabelDisplayChanged': CustomEvent; - 'headerChanged': CustomEvent; - 'labelChanged': CustomEvent; - 'labelDisplayChanged': CustomEvent; - 'labelHalignChanged': CustomEvent; - 'labelStyleChanged': CustomEvent; - 'labelValignChanged': CustomEvent; - 'patternChanged': CustomEvent; - 'selectableChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojTreemapNodeSettableProperties extends JetSettableProperties { - categories?: Array; - color?: string; - drilling?: 'on'|'off'|'inherit'; - groupLabelDisplay?: 'node'|'off'|'header'; - header?: {isolate?: 'off'|'on', labelHalign?: 'center'|'end'|'start', labelStyle?: object, useNodeColor?: 'on'|'off'}; - label?: string; - labelDisplay?: 'off'|'node'; - labelHalign?: 'start'|'end'|'center'; - labelStyle?: object; - labelValign?: 'top'|'bottom'|'center'; - pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'; - selectable?: 'off'|'auto'; - shortDesc?: string; - svgClassName?: string; - svgStyle?: object; - value: number; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojvalidation-base/index.d.ts b/types/@oracle/oraclejet/ojs/ojvalidation-base/index.d.ts deleted file mode 100644 index 01a6280ff9..0000000000 --- a/types/@oracle/oraclejet/ojs/ojvalidation-base/index.d.ts +++ /dev/null @@ -1,188 +0,0 @@ -/// -/// -declare namespace oj { - interface AsyncValidator { - hint: Promise; - validate(value: V): Promise - } - -} -declare namespace oj { - class ColorConverter extends Converter { - constructor(options?: oj.ColorConverter.ConverterOptions); - format(color: oj.Color): string|null; - getHint(): string; - parse(value: string): oj.Color; - resolvedOptions(): oj.ColorConverter.ConverterOptions; - } - namespace ColorConverter { - type ConverterOptions = - { - format?: 'rgb'|'hsl'|'hsv'|'hex'|'hex3' - } - } - -} -declare namespace oj { - class ColorConverterFactory { - createConverter(options?: oj.ColorConverter.ConverterOptions): oj.ColorConverter; - } - -} -declare namespace oj { - class Converter { - format(value: V): string|null; - getHint?(): string|null - getOptions?(): object - parse(value: string): V; - resolvedOptions?(): object - } - -} -declare namespace oj { - class ConverterError { - constructor(summary: string, detail: string); - getMessage(): oj.Message; - } - -} -declare namespace oj { - class ConverterFactory { - static CONVERTER_TYPE_COLOR: string; - static CONVERTER_TYPE_DATETIME: string; - static CONVERTER_TYPE_NUMBER: string; - createConverter(options: object|null): oj.Converter; - } - -} -declare namespace oj { - class IntlConverterUtils { - static dateToLocalIso(date: Date): string; - static getConverterInstance(converterOption: string|oj.Validation.RegisteredConverter|oj.Converter): oj.Converter|null - static getInitials(firstName?: string, lastName?: string): string|undefined; - static getLocalTimeZoneOffset(): string; - static isoToDate(isoString: string): Date; - static isoToLocalDate(isoString: string): Date; - } - -} -declare namespace oj { - class LengthValidator extends Validator { - static defaults: {countBy: string}; - constructor(options?: oj.LengthValidator.ValidatorOptions); - getHint(): string|null; - validate(value: string|number): void; - } - namespace LengthValidator { - type ValidatorOptions = - { - countBy?: 'codeUnit'|'codePoint', min?: number, max?: number, hint?: {max?: string, min?: string, inRange?: string, exact?: string}, messageDetail?: {tooLong?: string, tooShort?: string}, messageSummary?: {tooLong?: string, tooShort?: string} - } - } - -} -declare namespace oj { - class LengthValidatorFactory { - createValidator(options?: oj.LengthValidator.ValidatorOptions): oj.LengthValidator; - } - -} -declare namespace oj { - class LocaleData { - static getDayNames(type?: 'abbreviated'|'narrow'|'wide'): Array; - static getFirstDayOfWeek(): number; - static getMonthNames(type?: 'abbreviated'|'narrow'|'wide'): Array; - static getWeekendEnd(): number; - static getWeekendStart(): number; - static isMonthPriorToYear(): boolean; - static setBundle(bundle: object): void; - } - -} -declare namespace oj { - class RegExpValidator extends Validator { - constructor(options?: oj.RegExpValidator.ValidatorOptions); - getHint(): string|null; - validate(value: string|number): void; - } - namespace RegExpValidator { - type ValidatorOptions = - { - pattern?: string, hint?: string, messageSummary?: string, messageDetail?: string - } - } - -} -declare namespace oj { - class RegExpValidatorFactory { - createValidator(options: oj.RegExpValidator.ValidatorOptions): oj.RegExpValidator; - } - -} -declare namespace oj { - class RequiredValidator extends Validator { - constructor(options?: oj.RequiredValidator.ValidatorOptions); - getHint(): string|null; - validate(value: object|string|number): void; - } - namespace RequiredValidator { - type ValidatorOptions = - { - hint?: string, messageSummary?: string, messageDetail?: string - } - } - -} -declare namespace oj { - class RequiredValidatorFactory { - createValidator(options?: oj.RequiredValidator.ValidatorOptions): oj.RequiredValidator; - } - -} -declare namespace oj { - class Validation { - static converterFactory>(type:'number'|'color'|'datetime'|string, instance?:CF): CF|null - static getDefaultConverterFactory(type: 'number'|'color'|'datetime'): oj.ConverterFactory|null - static getDefaultValidatorFactory(type: 'required'|'regexp'|'numberRange'|'length'|'dateTimeRange'|'dateRestriction'): oj.ValidatorFactory|null - static validatorFactory>(type:'required'|'regexp'|'numberRange'|'length'|'dateTimeRange'|'dateRestriction'|string, instance?:VF): VF|null - } - namespace Validation { - type RegisteredConverter = - { - type: string, options?: object - } - } - namespace Validation { - type RegisteredValidator = - { - type: string, options?: object - } - } - -} -declare namespace oj { - class Validator { - getHint?(): string|null - validate(value: V): void; - } - -} -declare namespace oj { - class ValidatorError { - constructor(summary: string, detail: string); - getMessage(): oj.Message; - } - -} -declare namespace oj { - class ValidatorFactory { - static VALIDATOR_TYPE_DATERESTRICTION: string; - static VALIDATOR_TYPE_DATETIMERANGE: string; - static VALIDATOR_TYPE_LENGTH: string; - static VALIDATOR_TYPE_NUMBERRANGE: string; - static VALIDATOR_TYPE_REGEXP: string; - static VALIDATOR_TYPE_REQUIRED: string; - createValidator(options: object|null): oj.Validator; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojvalidation-datetime/index.d.ts b/types/@oracle/oraclejet/ojs/ojvalidation-datetime/index.d.ts deleted file mode 100644 index f4ab6b312b..0000000000 --- a/types/@oracle/oraclejet/ojs/ojvalidation-datetime/index.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -/// -declare namespace oj { - class DateRestrictionValidator extends Validator { - constructor(options?: oj.DateRestrictionValidator.ValidatorOptions); - getHint(): string|null; - validate(value: string): void; - } - namespace DateRestrictionValidator { - type DayFormatterInput = - { - fullYear: number, month: number, date: number - } - } - namespace DateRestrictionValidator { - type DayFormatterOutput = - { - disabled?: boolean, className?: string, tooltip?: string - } - } - namespace DateRestrictionValidator { - type ValidatorOptions = - { - dayFormatter?: ((param0: oj.DateRestrictionValidator.DayFormatterInput)=> oj.DateRestrictionValidator.DayFormatterOutput|null|'all'), messageSummary?: string, messageDetail?: string - } - } - -} -declare namespace oj { - class DateRestrictionValidatorFactory { - createValidator(options?: oj.DateRestrictionValidator.ValidatorOptions): oj.DateRestrictionValidator; - } - -} -declare namespace oj { - abstract class DateTimeConverter extends Converter { - abstract calculateWeek(value: string): number|undefined; - compareISODates(isoStr: string, isoStr2: string): number; - format(value: string): string|null; - getAvailableTimeZones(): Array; - abstract isDayNameSet():boolean - abstract isDaySet():boolean - abstract isHourInAMPMSet():boolean - abstract isHourInDaySet():boolean - abstract isMilliSecondSet():boolean - abstract isMinuteSet():boolean - abstract isMonthSet():boolean - abstract isSecondSet():boolean - abstract isYearSet():boolean - parse(value: string): string; - } - -} -declare namespace oj { - class DateTimeConverterFactory { - createConverter(options?: oj.IntlDateTimeConverter.ConverterOptions): oj.IntlDateTimeConverter; - } - -} -declare namespace oj { - class DateTimeRangeValidator extends Validator { - constructor(options?: oj.DateTimeRangeValidator.ValidatorOptions); - getHint(): string|null; - validate(value: string): void; - } - namespace DateTimeRangeValidator { - type ValidatorOptions = - { - converter: oj.DateTimeConverter, min?: string, max?: string, hint?: {max?: string, min?: string, inRange?: string}, translationKey?: string, messageDetail?: {rangeUnderflow?: string, rangeOverflow?: string}, messageSummary?: {rangeUnderflow?: string, rangeOverflow?: string} - } - } - -} -declare namespace oj { - class DateTimeRangeValidatorFactory { - createValidator(options?: oj.DateTimeRangeValidator.ValidatorOptions): oj.DateTimeRangeValidator; - } - -} -declare namespace oj { - class IntlDateTimeConverter extends DateTimeConverter { - constructor(options?: oj.IntlDateTimeConverter.ConverterOptions); - calculateWeek(value: string): number; - compareISODates(isoStr: string, isoStr2: string): number; - format(value: string): string|null; - formatRelative(value: string, relativeOptions?: {formatUsing?: string, dateField?: string, relativeTime?: string, dateOnly?: boolean, timeZone?: string}): string|null; - getAvailableTimeZones(): Array; - getHint(): null; - getOptions(): oj.IntlDateTimeConverter.ConverterOptions; - isDayNameSet(): boolean; - isDaySet(): boolean; - isHourInAMPMSet(): boolean; - isHourInDaySet(): boolean; - isMilliSecondSet(): boolean; - isMinuteSet(): boolean; - isMonthSet(): boolean; - isSecondSet(): boolean; - isYearSet(): boolean; - parse(value: string): string|null; - resolvedOptions(): oj.IntlDateTimeConverter.ConverterOptions; - } - namespace IntlDateTimeConverter { - type ConverterOptions = - { - year?: '2-digit'|'numeric', 'two-digit-year-start'?: number, month?: '2-digit'|'numeric'|'narrow'|'short'|'long', day?: '2-digit'|'numeric', hour?: '2-digit'|'numeric', minute?: '2-digit'|'numeric', second?: '2-digit'|'numeric', millisecond?: 'numeric', weekday?: 'narrow'|'short'|'long', era?: 'narrow'|'short'|'long', timeZoneName?: 'short'|'long', timeZone?: string, isoStrFormat?: 'offset'|'zulu'|'local'|'auto', dst?: boolean, hour12?: boolean, pattern?: string, formatType?: 'date'|'time'|'datetime', dateFormat?: 'short'|'medium'|'long'|'full', timeFormat?: 'short'|'medium'|'long'|'full', lenientParse?: 'full'|'none' - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojvalidation-number/index.d.ts b/types/@oracle/oraclejet/ojs/ojvalidation-number/index.d.ts deleted file mode 100644 index d53b2b8258..0000000000 --- a/types/@oracle/oraclejet/ojs/ojvalidation-number/index.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -/// -declare namespace oj { - class IntlNumberConverter extends NumberConverter { - constructor(options?: oj.IntlNumberConverter.ConverterOptions); - format(value: number): string; - getHint(): null; - getOptions(): oj.IntlNumberConverter.ConverterOptions; - parse(value: string): number|null; - resolvedOptions(): oj.IntlNumberConverter.ConverterOptions; - } - namespace IntlNumberConverter { - type ConverterOptions = - { - style?: 'decimal'|'currency'|'percent'|'unit', currency?: string, unit?: 'byte'|'bit', currencyDisplay?: 'code'|'symbol'|'name', decimalFormat?: 'standard'|'short'|'long', currencyFormat?: 'standard'|'short'|'long', minimumIntegerDigits?: number, minimumFractionDigits?: number, maximumFractionDigits?: number, useGrouping?: boolean, pattern?: string, roundingMode?: 'HALF_UP'|'HALF_DOWN'|'HALF_EVEN', roundDuringParse?: boolean, separators?: object, lenientParse?: 'full'|'none' - } - } - -} -declare namespace oj { - class NumberConverter extends Converter { - format(value: number): string|null; - parse(value: string): number; - } - -} -declare namespace oj { - class NumberConverterFactory { - createConverter(options?: oj.IntlNumberConverter.ConverterOptions): oj.IntlNumberConverter; - } - -} -declare namespace oj { - class NumberRangeValidator extends Validator { - constructor(options?: oj.NumberRangeValidator.ValidatorOptions); - getHint(): string|null; - validate(value: string|number): void; - } - namespace NumberRangeValidator { - type ValidatorOptions = - { - converter?: oj.NumberConverter, min?: number, max?: number, hint?: {max?: string, min?: string, inRange?: string, exact?: string}, messageDetail?: {rangeUnderflow?: string, rangeOverflow?: string, exact?: string}, messageSummary?: {rangeUnderflow?: string, rangeOverflow?: string} - } - } - -} -declare namespace oj { - class NumberRangeValidatorFactory { - createValidator(options?: oj.NumberRangeValidator.ValidatorOptions): oj.NumberRangeValidator; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojvalidationgroup/index.d.ts b/types/@oracle/oraclejet/ojs/ojvalidationgroup/index.d.ts deleted file mode 100644 index c714ed9ecc..0000000000 --- a/types/@oracle/oraclejet/ojs/ojvalidationgroup/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -declare namespace oj { - class ojValidationGroup extends JetElement { - readonly valid: 'valid'|'pending'|'invalidHidden'|'invalidShown'; - onValidChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojValidationGroupEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - focusOn(key?: '@firstInvalidShown'): void; - getProperty(property: string): any; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - showMessages(): void; - } - interface ojValidationGroupEventMap extends oj.JetElementEventMap { - 'validChanged': CustomEvent; - } - interface ojValidationGroupSettableProperties extends JetSettableProperties { - readonly valid: 'valid'|'pending'|'invalidHidden'|'invalidShown'; - } - -} diff --git a/types/@oracle/tests/oraclejet/@oraclejet-tests.ts b/types/@oracle/tests/oraclejet/@oraclejet-tests.ts deleted file mode 100644 index 9fc8ff4951..0000000000 --- a/types/@oracle/tests/oraclejet/@oraclejet-tests.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) 2014, 2017, Oracle and/or its affiliates. - * The Universal Permissive License (UPL), Version 1.0 - */ -import "ojs/ojcore"; -import "ojs/ojinputtext"; -import "ojs/ojinputnumber"; - -/** - * @public - * @export - */ -class Test { - value: string; - - constructor() { - let self = this; - self.value = "Good Morning"; - - let textInput = document.getElementById('text-input') as oj.ojInputText; - //test a custom API of the component - let rawVal: string = textInput.rawValue; - } -} - -export = Test; \ No newline at end of file diff --git a/types/@oracle/tslint.json b/types/@oracle/tslint.json deleted file mode 100644 index 3db14f85ea..0000000000 --- a/types/@oracle/tslint.json +++ /dev/null @@ -1 +0,0 @@ -{ "extends": "dtslint/dt.json" } diff --git a/types/oraclejet/index.d.ts b/types/oraclejet/index.d.ts new file mode 100644 index 0000000000..dd99802419 --- /dev/null +++ b/types/oraclejet/index.d.ts @@ -0,0 +1,60 @@ +// Type definitions for oraclejet 6.0 +// Project: https://github.com/oracle/oraclejet +// Definitions by: Naizam Olakara +// Jing Wu +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.9 +import { Model, Collection } from './ojmodel'; +export namespace oj { + let revision: string; + let version: string; + function ajax(settings?: object): object; + function sync(method: string, model: Model | Collection, options?: object): object; +} +export interface baseComponent extends JetElement { + translations: object | null; + onTranslationsChanged: ((event: JetElementCustomEvent["translations"]>) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: baseComponentEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): baseComponent[T]; + getProperty(property: string): any; + setProperty(property: T, value: baseComponentSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: baseComponentSettablePropertiesLenient): void; + refresh(): void; +} +export interface baseComponentEventMap extends HTMLElementEventMap { + 'translationsChanged': JetElementCustomEvent["translations"]>; +} +export interface baseComponentSettableProperties extends JetSettableProperties { + translations: object | null; +} +export interface baseComponentSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface GenericSetter { + set(propertyName: K, propertyValue: SP[K]): void; + unset(propertyName: keyof SP): void; +} +export interface JetElement extends HTMLElement, GenericSetter { + set(propertyName: K, propertyValue: SP[K]): void; + unset(propertyName: keyof SP): void; +} +export interface JetElementCustomEvent extends CustomEvent<{ + value: V; + previousValue: V; + updatedFrom: 'external' | 'internal'; + subproperty: { + path: string; + value: any; + previousValue: any; + [key: string]: any; + }; + [key: string]: any; +}> { +} +// This interfaces is empty but required to keep the component chain intact. Avoid lint-rule +// tslint:disable-next-line no-empty-interface +export interface JetSettableProperties { +} +export type JetSetPropertyType = K extends keyof U ? U[K] : any; diff --git a/types/oraclejet/ojaccordion/index.d.ts b/types/oraclejet/ojaccordion/index.d.ts new file mode 100644 index 0000000000..15d843d90e --- /dev/null +++ b/types/oraclejet/ojaccordion/index.d.ts @@ -0,0 +1,66 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojAccordion extends baseComponent { + expanded: Array<{ + id?: string; + index?: number; + }> | null; + multiple: boolean; + onExpandedChanged: ((event: JetElementCustomEvent) => any) | null; + onMultipleChanged: ((event: JetElementCustomEvent) => any) | null; + onOjBeforeCollapse: ((event: ojAccordion.ojBeforeCollapse) => any) | null; + onOjBeforeExpand: ((event: ojAccordion.ojBeforeExpand) => any) | null; + onOjCollapse: ((event: ojAccordion.ojCollapse) => any) | null; + onOjExpand: ((event: ojAccordion.ojExpand) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojAccordionEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojAccordion[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojAccordionSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojAccordionSettablePropertiesLenient): void; + refresh(): void; +} +export namespace ojAccordion { + interface ojBeforeCollapse extends CustomEvent<{ + toCollapsible: Element; + fromCollapsible: Element; + [propName: string]: any; + }> { + } + interface ojBeforeExpand extends CustomEvent<{ + toCollapsible: Element; + fromCollapsible: Element; + [propName: string]: any; + }> { + } + interface ojCollapse extends CustomEvent<{ + toCollapsible: Element; + fromCollapsible: Element; + [propName: string]: any; + }> { + } + interface ojExpand extends CustomEvent<{ + toCollapsible: Element; + fromCollapsible: Element; + [propName: string]: any; + }> { + } +} +export interface ojAccordionEventMap extends baseComponentEventMap { + 'ojBeforeCollapse': ojAccordion.ojBeforeCollapse; + 'ojBeforeExpand': ojAccordion.ojBeforeExpand; + 'ojCollapse': ojAccordion.ojCollapse; + 'ojExpand': ojAccordion.ojExpand; + 'expandedChanged': JetElementCustomEvent; + 'multipleChanged': JetElementCustomEvent; +} +export interface ojAccordionSettableProperties extends baseComponentSettableProperties { + expanded: string[] | number[] | Array<{ + id?: string; + index?: number; + }> | null; + multiple: boolean; +} +export interface ojAccordionSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojanimation/index.d.ts b/types/oraclejet/ojanimation/index.d.ts new file mode 100644 index 0000000000..e4b1d6dbc2 --- /dev/null +++ b/types/oraclejet/ojanimation/index.d.ts @@ -0,0 +1,111 @@ +export function collapse(element: Element, options?: { + delay?: string; + duration?: string; + timingFunction?: string; + persist?: string; + direction?: string; + startMaxHeight?: string; + endMaxHeight?: string; + startMaxWidth?: string; + endMaxWidth?: string; +}): Promise; +export function expand(element: Element, options?: { + delay?: string; + duration?: string; + timingFunction?: string; + persist?: string; + direction?: string; + startMaxHeight?: string; + endMaxHeight?: string; + startMaxWidth?: string; + endMaxWidth?: string; +}): Promise; +export function fadeIn(element: Element, options?: { + delay?: string; + duration?: string; + timingFunction?: string; + persist?: string; + startOpacity?: number; + endOpacity?: number; +}): Promise; +export function fadeOut(element: Element, options?: { + delay?: string; + duration?: string; + timingFunction?: string; + persist?: string; + startOpacity?: number; + endOpacity?: number; +}): Promise; +export function flipIn(element: Element, options?: { + delay?: string; + duration?: string; + timingFunction?: string; + persist?: string; + axis?: string; + startAngle?: string; + endAngle?: string; + backfaceVisibility?: string; + perspective?: string; + transformOrigin?: string; + flipTarget?: string; +}): Promise; +export function flipOut(element: Element, options?: { + delay?: string; + duration?: string; + timingFunction?: string; + persist?: string; + axis?: string; + startAngle?: string; + endAngle?: string; + backfaceVisibility?: string; + perspective?: string; + transformOrigin?: string; + flipTarget?: string; +}): Promise; +export function ripple(element: Element, options?: { + delay?: string; + duration?: string; + timingFunction?: string; + offsetX?: string; + offsetY?: string; + color?: string; + diameter?: string; + startOpacity?: number; + endOpacity?: number; +}): Promise; +export function slideIn(element: Element, options?: { + delay?: string; + duration?: string; + timingFunction?: string; + persist?: string; + direction?: string; + offsetX?: string; + offsetY?: string; +}): Promise; +export function slideOut(element: Element, options?: { + delay?: string; + duration?: string; + timingFunction?: string; + persist?: string; + direction?: string; + offsetX?: string; + offsetY?: string; +}): Promise; +export function zoomIn(element: Element, options?: { + delay?: string; + duration?: string; + timingFunction?: string; + persist?: string; + axis?: string; + transformOrigin?: string; +}): Promise; +export function zoomOut(element: Element, options?: { + delay?: string; + duration?: string; + timingFunction?: string; + persist?: string; + axis?: string; + transformOrigin?: string; +}): Promise; +// tslint:disable-next-line interface-over-type-literal +export type AnimationMethods = 'collapse' | 'expand' | 'fadeIn' | 'fadeOut' | 'flipIn' | 'flipOut' | 'ripple' | 'slideIn' | 'slideOut' | 'zoomIn' | 'zoomOut'; diff --git a/types/oraclejet/ojarraydataprovider/index.d.ts b/types/oraclejet/ojarraydataprovider/index.d.ts new file mode 100644 index 0000000000..884920c03e --- /dev/null +++ b/types/oraclejet/ojarraydataprovider/index.d.ts @@ -0,0 +1,27 @@ +import { DataProvider, SortCriterion, FetchByKeysParameters, ContainsKeysResults, FetchByKeysResults, FetchByOffsetParameters, FetchByOffsetResults, FetchListResult, + FetchListParameters } from '../ojdataprovider'; +declare class ArrayDataProvider implements DataProvider { + constructor(data: any[] | (() => any[]), options?: { + sortComparators?: ArrayDataProvider.SortComparators; + implicitSort?: Array>; + keys?: any[] | (() => any[]); + idAttribute?: string | string[]; + keyAttributes?: string | string[]; + }); + addEventListener(eventType: string, listener: EventListener): void; + containsKeys(params: FetchByKeysParameters): Promise>; + dispatchEvent(evt: Event): boolean; + fetchByKeys(params: FetchByKeysParameters): Promise>; + fetchByOffset(params: FetchByOffsetParameters): Promise>; + fetchFirst(params?: FetchListParameters): AsyncIterable>; + getCapability(capabilityName?: string): any; + getTotalSize(): Promise; + isEmpty(): 'yes' | 'no' | 'unknown'; + removeEventListener(eventType: string, listener: EventListener): void; +} +export = ArrayDataProvider; +declare namespace ArrayDataProvider { + interface SortComparators { + comparators: Map number>; + } +} diff --git a/types/oraclejet/ojarraytreedataprovider/index.d.ts b/types/oraclejet/ojarraytreedataprovider/index.d.ts new file mode 100644 index 0000000000..452b47a910 --- /dev/null +++ b/types/oraclejet/ojarraytreedataprovider/index.d.ts @@ -0,0 +1,25 @@ +import { DataProvider, SortCriterion, FetchByKeysParameters, ContainsKeysResults, FetchByKeysResults, FetchByOffsetParameters, FetchByOffsetResults, FetchListResult, + FetchListParameters } from '../ojdataprovider'; +import ArrayDataProvider = require('../ojarraydataprovider'); +import TreeDataProvider = require('../ojtreedataprovider'); +declare class ArrayTreeDataProvider implements TreeDataProvider { + constructor(data: any[] | (() => any[]), options?: { + sortComparators?: ArrayDataProvider.SortComparators; + implicitSort?: Array>; + keyAttributes?: string | string[]; + keyAttributesScope?: 'global' | 'siblings'; + childrenAttribute?: string; + }); + addEventListener(eventType: string, listener: EventListener): void; + containsKeys(params: FetchByKeysParameters): Promise>; + dispatchEvent(evt: Event): boolean; + fetchByKeys(params: FetchByKeysParameters): Promise>; + fetchByOffset(params: FetchByOffsetParameters): Promise>; + fetchFirst(params?: FetchListParameters): AsyncIterable>; + getCapability(capabilityName?: string): any; + getChildDataProvider(parentKey: any): ArrayTreeDataProvider; + getTotalSize(): Promise; + isEmpty(): 'yes' | 'no' | 'unknown'; + removeEventListener(eventType: string, listener: EventListener): void; +} +export = ArrayTreeDataProvider; diff --git a/types/oraclejet/ojattributegrouphandler/index.d.ts b/types/oraclejet/ojattributegrouphandler/index.d.ts new file mode 100644 index 0000000000..3442581069 --- /dev/null +++ b/types/oraclejet/ojattributegrouphandler/index.d.ts @@ -0,0 +1,23 @@ +export class AttributeGroupHandler { + constructor(matchRules?: { + [propName: string]: any; + }); + addMatchRule(category: string, attributeValue: any): void; + getCategoryAssignments(): Array<{ + [propName: string]: any; + }>; + getValue(category: string): any; + getValueRamp(): any[]; +} +export class ColorAttributeGroupHandler extends AttributeGroupHandler { + constructor(matchRules?: { + [propName: string]: any; + }); + getValueRamp(): string[]; +} +export class ShapeAttributeGroupHandler extends AttributeGroupHandler { + constructor(matchRules?: { + [propName: string]: any; + }); + getValueRamp(): string[]; +} diff --git a/types/oraclejet/ojavatar/index.d.ts b/types/oraclejet/ojavatar/index.d.ts new file mode 100644 index 0000000000..ed82db0a5e --- /dev/null +++ b/types/oraclejet/ojavatar/index.d.ts @@ -0,0 +1,29 @@ +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojAvatar extends JetElement { + initials: string; + size: 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'; + src: string; + onInitialsChanged: ((event: JetElementCustomEvent) => any) | null; + onSizeChanged: ((event: JetElementCustomEvent) => any) | null; + onSrcChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojAvatarEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojAvatar[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojAvatarSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojAvatarSettablePropertiesLenient): void; +} +export interface ojAvatarEventMap extends HTMLElementEventMap { + 'initialsChanged': JetElementCustomEvent; + 'sizeChanged': JetElementCustomEvent; + 'srcChanged': JetElementCustomEvent; +} +export interface ojAvatarSettableProperties extends JetSettableProperties { + initials: string; + size: 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'; + src: string; +} +export interface ojAvatarSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojbutton/index.d.ts b/types/oraclejet/ojbutton/index.d.ts new file mode 100644 index 0000000000..542f5eec9e --- /dev/null +++ b/types/oraclejet/ojbutton/index.d.ts @@ -0,0 +1,165 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojButton extends baseComponent { + chroming: 'full' | 'half' | 'outlined'; + disabled: boolean; + display: 'all' | 'icons'; + onChromingChanged: ((event: JetElementCustomEvent["chroming"]>) => any) | null; + onDisabledChanged: ((event: JetElementCustomEvent["disabled"]>) => any) | null; + onDisplayChanged: ((event: JetElementCustomEvent["display"]>) => any) | null; + onOjAction: ((event: ojButton.ojAction) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojButtonEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojButton[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojButtonSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojButtonSettablePropertiesLenient): void; +} +export namespace ojButton { + interface ojAction extends CustomEvent<{ + [propName: string]: any; + }> { + } +} +export interface ojButtonEventMap extends baseComponentEventMap { + 'ojAction': ojButton.ojAction; + 'chromingChanged': JetElementCustomEvent["chroming"]>; + 'disabledChanged': JetElementCustomEvent["disabled"]>; + 'displayChanged': JetElementCustomEvent["display"]>; +} +export interface ojButtonSettableProperties extends baseComponentSettableProperties { + chroming: 'full' | 'half' | 'outlined'; + disabled: boolean; + display: 'all' | 'icons'; +} +export interface ojButtonSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojButtonset extends baseComponent { + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojButtonsetEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojButtonset[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojButtonsetSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojButtonsetSettablePropertiesLenient): void; +} +// These interfaces are empty but required to keep the event chain intact. Avoid lint-rule +// tslint:disable-next-line no-empty-interface +export interface ojButtonsetEventMap extends baseComponentEventMap { +} +// These interfaces are empty but required to keep the component chain intact. Avoid lint-rule +// tslint:disable-next-line no-empty-interface +export interface ojButtonsetSettableProperties extends baseComponentSettableProperties { +} +export interface ojButtonsetSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojButtonsetMany extends ojButtonset { + chroming: 'full' | 'half' | 'outlined'; + disabled: boolean; + display: 'all' | 'icons'; + focusManagement: 'oneTabstop' | 'none'; + value: any[] | null; + onChromingChanged: ((event: JetElementCustomEvent) => any) | null; + onDisabledChanged: ((event: JetElementCustomEvent) => any) | null; + onDisplayChanged: ((event: JetElementCustomEvent) => any) | null; + onFocusManagementChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojButtonsetManyEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojButtonsetMany[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojButtonsetManySettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojButtonsetManySettablePropertiesLenient): void; +} +export interface ojButtonsetManyEventMap extends ojButtonsetEventMap { + 'chromingChanged': JetElementCustomEvent; + 'disabledChanged': JetElementCustomEvent; + 'displayChanged': JetElementCustomEvent; + 'focusManagementChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojButtonsetManySettableProperties extends ojButtonsetSettableProperties { + chroming: 'full' | 'half' | 'outlined'; + disabled: boolean; + display: 'all' | 'icons'; + focusManagement: 'oneTabstop' | 'none'; + value: any[] | null; +} +export interface ojButtonsetManySettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojButtonsetOne extends ojButtonset { + chroming: 'full' | 'half' | 'outlined'; + disabled: boolean; + display: 'all' | 'icons'; + focusManagement: 'oneTabstop' | 'none'; + value: any; + onChromingChanged: ((event: JetElementCustomEvent) => any) | null; + onDisabledChanged: ((event: JetElementCustomEvent) => any) | null; + onDisplayChanged: ((event: JetElementCustomEvent) => any) | null; + onFocusManagementChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojButtonsetOneEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojButtonsetOne[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojButtonsetOneSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojButtonsetOneSettablePropertiesLenient): void; +} +export interface ojButtonsetOneEventMap extends ojButtonsetEventMap { + 'chromingChanged': JetElementCustomEvent; + 'disabledChanged': JetElementCustomEvent; + 'displayChanged': JetElementCustomEvent; + 'focusManagementChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojButtonsetOneSettableProperties extends ojButtonsetSettableProperties { + chroming: 'full' | 'half' | 'outlined'; + disabled: boolean; + display: 'all' | 'icons'; + focusManagement: 'oneTabstop' | 'none'; + value: any; +} +export interface ojButtonsetOneSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojMenuButton extends ojButton { + chroming: 'full' | 'half' | 'outlined'; + disabled: boolean; + display: 'all' | 'icons'; + onChromingChanged: ((event: JetElementCustomEvent) => any) | null; + onDisabledChanged: ((event: JetElementCustomEvent) => any) | null; + onDisplayChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAction: ((event: ojMenuButton.ojAction) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojMenuButtonEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojMenuButton[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojMenuButtonSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojMenuButtonSettablePropertiesLenient): void; +} +export namespace ojMenuButton { + interface ojAction extends CustomEvent<{ + [propName: string]: any; + }> { + } +} +export interface ojMenuButtonEventMap extends ojButtonEventMap { + 'ojAction': ojMenuButton.ojAction; + 'chromingChanged': JetElementCustomEvent; + 'disabledChanged': JetElementCustomEvent; + 'displayChanged': JetElementCustomEvent; +} +export interface ojMenuButtonSettableProperties extends ojButtonSettableProperties { + chroming: 'full' | 'half' | 'outlined'; + disabled: boolean; + display: 'all' | 'icons'; +} +export interface ojMenuButtonSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojchart/index.d.ts b/types/oraclejet/ojchart/index.d.ts new file mode 100644 index 0000000000..25970f316e --- /dev/null +++ b/types/oraclejet/ojchart/index.d.ts @@ -0,0 +1,2104 @@ +import { DataProvider } from '../ojdataprovider'; +import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojChart extends dvtBaseComponent> { + animationOnDataChange: 'auto' | 'slideToLeft' | 'slideToRight' | 'none'; + animationOnDisplay: 'auto' | 'alphaFade' | 'zoom' | 'none'; + as: string; + coordinateSystem: 'polar' | 'cartesian'; + data: DataProvider | null; + dataCursor: 'off' | 'on' | 'auto'; + dataCursorBehavior: 'smooth' | 'snap' | 'auto'; + dataCursorPosition: { + x: number | string; + y: number; + y2: number; + }; + dataLabel: ((context: ojChart.DataLabelContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + dnd: { + drag: { + groups: { + dataTypes: string | string[]; + drag: ((param0: Event) => void); + dragEnd: ((param0: Event) => void); + dragStart: ((param0: Event, param1: object) => void); + }; + items: { + dataTypes: string | string[]; + drag: ((param0: Event) => void); + dragEnd: ((param0: Event) => void); + dragStart: ((param0: Event, param1: object) => void); + }; + series: { + dataTypes: string | string[]; + drag: ((param0: Event) => void); + dragEnd: ((param0: Event) => void); + dragStart: ((param0: Event, param1: object) => void); + }; + }; + drop: { + legend: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + plotArea: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + xAxis: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + y2Axis: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + yAxis: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + }; + }; + dragMode: 'pan' | 'zoom' | 'select' | 'off' | 'user'; + drilling: 'on' | 'seriesOnly' | 'groupsOnly' | 'off'; + groupComparator: ((param0: object, param1: object) => number) | null; + hiddenCategories: string[]; + hideAndShowBehavior: 'withRescale' | 'withoutRescale' | 'none'; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + initialZooming: 'first' | 'last' | 'none'; + legend: { + backgroundColor: string; + borderColor: string; + maxSize: string; + position: 'start' | 'end' | 'bottom' | 'top' | 'auto'; + referenceObjectSection: { + title: string; + titleHalign: 'center' | 'end' | 'start'; + titleStyle: object; + }; + rendered: 'on' | 'off' | 'auto'; + scrolling: 'off' | 'asNeeded'; + sections: Array<{ + items: Array<{ + borderColor: string; + categories: string[]; + categoryVisibility: 'hidden' | 'visible'; + color: string; + id: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + markerColor: string; + markerShape?: 'circle' | 'diamond' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + pattern: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + shortDesc: string; + source: string; + symbolType: 'line' | 'lineWithMarker' | 'image' | 'marker'; + text: string; + }>; + sections: object[]; + title: string; + titleHalign: 'center' | 'end' | 'start'; + titleStyle: object; + }>; + seriesSection: { + title: string; + titleHalign: 'center' | 'end' | 'start'; + titleStyle: object; + }; + size: string; + symbolHeight: number; + symbolWidth: number; + textStyle: object; + title: string; + titleHalign: 'center' | 'end' | 'start'; + titleStyle: object; + }; + orientation: 'horizontal' | 'vertical'; + otherThreshold: number; + overview: { + content: object; + height: string; + rendered: 'on' | 'off'; + }; + pieCenter: { + converter: object; + label: string; + labelStyle: object; + renderer: ((context: ojChart.PieCenterContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + }; + plotArea: { + backgroundColor: string; + borderColor: string; + borderWidth: number; + rendered: 'off' | 'on'; + }; + polarGridShape: 'polygon' | 'circle'; + selection: K[]; + selectionMode: 'single' | 'multiple' | 'none'; + seriesComparator: ((param0: object, param1: object) => number) | null; + sorting: 'ascending' | 'descending' | 'off'; + splitDualY: 'on' | 'off' | 'auto'; + splitterPosition: number; + stack: 'on' | 'off'; + stackLabel: 'on' | 'off'; + styleDefaults: { + animationDownColor: string; + animationDuration: number; + animationIndicators: 'none' | 'all'; + animationUpColor: string; + barGapRatio: number; + borderColor: string; + borderWidth: number; + boxPlot: { + medianSvgClassName: string; + medianSvgStyle: object; + whiskerEndLength: string; + whiskerEndSvgClassName: string; + whiskerEndSvgStyle: object; + whiskerSvgClassName: string; + whiskerSvgStyle: object; + }; + colors: string[]; + dataCursor: { + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + markerColor: string; + markerDisplayed: 'off' | 'on'; + markerSize: number; + }; + dataItemGaps: string; + dataLabelPosition: 'center' | 'outsideSlice' | 'aboveMarker' | 'belowMarker' | 'beforeMarker' | 'afterMarker' | 'insideBarEdge' | 'outsideBarEdge' | 'none' | 'auto'; + dataLabelStyle: object | object[]; + funnelBackgroundColor: string; + groupSeparators: { + color: string; + rendered: 'off' | 'auto'; + }; + hoverBehaviorDelay: number; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineType: 'straight' | 'curved' | 'stepped' | 'centeredStepped' | 'segmented' | 'centeredSegmented' | 'none' | 'auto'; + lineWidth: number; + markerColor: string; + markerDisplayed: 'on' | 'off' | 'auto'; + markerShape?: 'auto' | 'circle' | 'diamond' | 'human' | 'plus' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + markerSize: number; + marqueeBorderColor: string; + marqueeColor: string; + maxBarWidth: number; + otherColor: string; + patterns: string[]; + pieFeelerColor: string; + pieInnerRadius: number; + selectionEffect: 'explode' | 'highlightAndExplode' | 'highlight'; + seriesEffect: 'color' | 'pattern' | 'gradient'; + shapes: string[]; + stackLabelStyle: object; + stockFallingColor: string; + stockRangeColor: string; + stockRisingColor: string; + stockVolumeColor: string; + threeDEffect: 'on' | 'off'; + tooltipLabelStyle: object; + tooltipValueStyle: object; + }; + timeAxisType: 'enabled' | 'mixedFrequency' | 'skipGaps' | 'disabled' | 'auto'; + tooltip: { + renderer: ((context: ojChart.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + touchResponse: 'touchStart' | 'auto'; + type: 'line' | 'area' | 'lineWithArea' | 'stock' | 'boxPlot' | 'combo' | 'pie' | 'scatter' | 'bubble' | 'funnel' | 'pyramid' | 'bar'; + valueFormats: { + close: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + group: { + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string | string[]; + }; + high: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + label: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + }; + low: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + open: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + q1: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + q2: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + q3: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + series: { + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + targetValue: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + value: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + volume: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + x: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + y: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + y2: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + z: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + }; + xAxis: { + axisLine: { + lineColor: string; + lineWidth: number; + rendered: 'off' | 'on'; + }; + baselineScaling: 'min' | 'zero'; + dataMax: number; + dataMin: number; + majorTick: { + baselineColor: 'inherit' | 'auto'; + baselineStyle: 'dotted' | 'dashed' | 'solid'; + baselineWidth: number; + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + max: number | string; + maxSize: string; + min: number | string; + minStep: number; + minorStep: number; + minorTick: { + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + referenceObjects: Array<{ + categories: string[]; + color: string; + displayInLegend: 'on' | 'off'; + high: number; + id: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineType: 'curved' | 'stepped' | 'centeredStepped' | 'segmented' | 'centeredSegmented' | 'straight'; + lineWidth: number; + location: 'front' | 'back'; + low: number; + shortDesc: string; + svgClassName: string; + svgStyle: object; + text: string; + type: 'area' | 'line'; + value: number; + }>; + rendered: 'off' | 'on'; + scale: 'log' | 'linear'; + size: string; + step: number; + tickLabel: { + converter: object; + rendered: 'off' | 'on'; + rotation: 'none' | 'auto'; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + style: object; + }; + title: string; + titleStyle: object; + viewportEndGroup: number | string; + viewportMax: number | string; + viewportMin: number | string; + viewportStartGroup: number | string; + }; + y2Axis: { + alignTickMarks: 'off' | 'on'; + axisLine: { + lineColor: string; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + baselineScaling: 'min' | 'zero'; + dataMax: number; + dataMin: number; + majorTick: { + baselineColor: 'inherit' | 'auto'; + baselineStyle: 'dotted' | 'dashed' | 'solid'; + baselineWidth: number; + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + max: number; + maxSize: string; + min: number; + minStep: number; + minorStep: number; + minorTick: { + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + position: 'start' | 'end' | 'top' | 'bottom' | 'auto'; + referenceObjects: Array<{ + categories: string[]; + color: string; + displayInLegend: 'on' | 'off'; + high: number; + id: string; + items: Array<{ + high: number; + low: number; + value: number; + x: number | string; + }>; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineType: 'curved' | 'stepped' | 'centeredStepped' | 'segmented' | 'centeredSegmented' | 'straight'; + lineWidth: number; + location: 'front' | 'back'; + low: number; + shortDesc: string; + svgClassName: string; + svgStyle: object; + text: string; + type: 'area' | 'line'; + value: number; + }>; + rendered: 'off' | 'on'; + scale: 'log' | 'linear'; + size: string; + step: number; + tickLabel: { + converter: object; + position: 'inside' | 'outside'; + rendered: 'off' | 'on'; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + style: object; + }; + title: string; + titleStyle: object; + }; + yAxis: { + axisLine: { + lineColor: string; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + baselineScaling: 'min' | 'zero'; + dataMax: number; + dataMin: number; + majorTick: { + baselineColor: 'inherit' | 'auto'; + baselineStyle: 'dotted' | 'dashed' | 'solid'; + baselineWidth: number; + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + max: number; + maxSize: string; + min: number; + minStep: number; + minorStep: number; + minorTick: { + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + position: 'start' | 'end' | 'top' | 'bottom' | 'auto'; + referenceObjects: Array<{ + categories: string[]; + color: string; + displayInLegend: 'on' | 'off'; + high: number; + id: string; + items: Array<{ + high: number; + low: number; + value: number; + x: number | string; + }>; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineType: 'curved' | 'stepped' | 'centeredStepped' | 'segmented' | 'centeredSegmented' | 'straight'; + lineWidth: number; + location: 'front' | 'back'; + low: number; + shortDesc: string; + svgClassName: string; + svgStyle: object; + text: string; + type: 'area' | 'line'; + value: number; + }>; + rendered: 'off' | 'on'; + scale: 'log' | 'linear'; + size: string; + step: number; + tickLabel: { + converter: object; + position: 'inside' | 'outside'; + rendered: 'off' | 'on'; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + style: object; + }; + title: string; + titleStyle: object; + viewportMax: number; + viewportMin: number; + }; + zoomAndScroll: 'delayedScrollOnly' | 'liveScrollOnly' | 'delayed' | 'live' | 'off'; + zoomDirection: 'x' | 'y' | 'auto'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelClose?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelDate?: string; + labelDefaultGroupName?: string; + labelGroup?: string; + labelHigh?: string; + labelInvalidData?: string; + labelLow?: string; + labelNoData?: string; + labelOpen?: string; + labelOther?: string; + labelPercentage?: string; + labelQ1?: string; + labelQ2?: string; + labelQ3?: string; + labelSeries?: string; + labelTargetValue?: string; + labelValue?: string; + labelVolume?: string; + labelX?: string; + labelY?: string; + labelZ?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + tooltipPan?: string; + tooltipSelect?: string; + tooltipZoom?: string; + }; + onAnimationOnDataChangeChanged: ((event: JetElementCustomEvent["animationOnDataChange"]>) => any) | null; + onAnimationOnDisplayChanged: ((event: JetElementCustomEvent["animationOnDisplay"]>) => any) | null; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onCoordinateSystemChanged: ((event: JetElementCustomEvent["coordinateSystem"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onDataCursorChanged: ((event: JetElementCustomEvent["dataCursor"]>) => any) | null; + onDataCursorBehaviorChanged: ((event: JetElementCustomEvent["dataCursorBehavior"]>) => any) | null; + onDataCursorPositionChanged: ((event: JetElementCustomEvent["dataCursorPosition"]>) => any) | null; + onDataLabelChanged: ((event: JetElementCustomEvent["dataLabel"]>) => any) | null; + onDndChanged: ((event: JetElementCustomEvent["dnd"]>) => any) | null; + onDragModeChanged: ((event: JetElementCustomEvent["dragMode"]>) => any) | null; + onDrillingChanged: ((event: JetElementCustomEvent["drilling"]>) => any) | null; + onGroupComparatorChanged: ((event: JetElementCustomEvent["groupComparator"]>) => any) | null; + onHiddenCategoriesChanged: ((event: JetElementCustomEvent["hiddenCategories"]>) => any) | null; + onHideAndShowBehaviorChanged: ((event: JetElementCustomEvent["hideAndShowBehavior"]>) => any) | null; + onHighlightMatchChanged: ((event: JetElementCustomEvent["highlightMatch"]>) => any) | null; + onHighlightedCategoriesChanged: ((event: JetElementCustomEvent["highlightedCategories"]>) => any) | null; + onHoverBehaviorChanged: ((event: JetElementCustomEvent["hoverBehavior"]>) => any) | null; + onInitialZoomingChanged: ((event: JetElementCustomEvent["initialZooming"]>) => any) | null; + onLegendChanged: ((event: JetElementCustomEvent["legend"]>) => any) | null; + onOrientationChanged: ((event: JetElementCustomEvent["orientation"]>) => any) | null; + onOtherThresholdChanged: ((event: JetElementCustomEvent["otherThreshold"]>) => any) | null; + onOverviewChanged: ((event: JetElementCustomEvent["overview"]>) => any) | null; + onPieCenterChanged: ((event: JetElementCustomEvent["pieCenter"]>) => any) | null; + onPlotAreaChanged: ((event: JetElementCustomEvent["plotArea"]>) => any) | null; + onPolarGridShapeChanged: ((event: JetElementCustomEvent["polarGridShape"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent["selectionMode"]>) => any) | null; + onSeriesComparatorChanged: ((event: JetElementCustomEvent["seriesComparator"]>) => any) | null; + onSortingChanged: ((event: JetElementCustomEvent["sorting"]>) => any) | null; + onSplitDualYChanged: ((event: JetElementCustomEvent["splitDualY"]>) => any) | null; + onSplitterPositionChanged: ((event: JetElementCustomEvent["splitterPosition"]>) => any) | null; + onStackChanged: ((event: JetElementCustomEvent["stack"]>) => any) | null; + onStackLabelChanged: ((event: JetElementCustomEvent["stackLabel"]>) => any) | null; + onStyleDefaultsChanged: ((event: JetElementCustomEvent["styleDefaults"]>) => any) | null; + onTimeAxisTypeChanged: ((event: JetElementCustomEvent["timeAxisType"]>) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent["tooltip"]>) => any) | null; + onTouchResponseChanged: ((event: JetElementCustomEvent["touchResponse"]>) => any) | null; + onTypeChanged: ((event: JetElementCustomEvent["type"]>) => any) | null; + onValueFormatsChanged: ((event: JetElementCustomEvent["valueFormats"]>) => any) | null; + onXAxisChanged: ((event: JetElementCustomEvent["xAxis"]>) => any) | null; + onY2AxisChanged: ((event: JetElementCustomEvent["y2Axis"]>) => any) | null; + onYAxisChanged: ((event: JetElementCustomEvent["yAxis"]>) => any) | null; + onZoomAndScrollChanged: ((event: JetElementCustomEvent["zoomAndScroll"]>) => any) | null; + onZoomDirectionChanged: ((event: JetElementCustomEvent["zoomDirection"]>) => any) | null; + onOjDrill: ((event: ojChart.ojDrill) => any) | null; + onOjSelectInput: ((event: ojChart.ojSelectInput) => any) | null; + onOjViewportChange: ((event: ojChart.ojViewportChange) => any) | null; + onOjViewportChangeInput: ((event: ojChart.ojViewportChangeInput) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojChartEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojChart[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojChartSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojChartSettablePropertiesLenient): void; + getContextByNode(node: Element): ojChart.PieCenterLabelContext | ojChart.LegendItemContext | ojChart.ReferenceObject | ojChart.GroupContext | ojChart.AxisTitleContext | ojChart.ItemContext | + ojChart.SeriesContext; + getDataItem(seriesIndex: number, groupIndex: number): object | null; + getGroup(groupIndex: string): string; + getGroupCount(): number; + getLegend(): object; + getPlotArea(): object; + getSeries(seriesIndex: string): string; + getSeriesCount(): number; + getValuesAt(x: number, y: number): object; + getXAxis(): object; + getY2Axis(): object; + getYAxis(): object; +} +export namespace ojChart { + interface ojDrill extends CustomEvent<{ + id: string; + series: string; + group: string; + data: object; + itemData: object; + seriesData: object; + groupData: any[]; + [propName: string]: any; + }> { + } + interface ojSelectInput extends CustomEvent<{ + items: any[]; + selectionData: Array<{ + data: object; + itemData: object; + groupData: any[]; + seriesData: object; + }>; + endGroup: string; + startGroup: string; + xMax: number; + xMin: number; + yMax: number; + yMin: number; + [propName: string]: any; + }> { + } + interface ojViewportChange extends CustomEvent<{ + endGroup: string; + startGroup: string; + xMax: number; + xMin: number; + yMax: number; + yMin: number; + [propName: string]: any; + }> { + } + interface ojViewportChangeInput extends CustomEvent<{ + endGroup: string; + startGroup: string; + xMax: number; + xMin: number; + yMax: number; + yMin: number; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type AxisTitleContext = { + axis: 'xAxis' | 'yAxis' | 'y2Axis'; + subId: string; + }; + // tslint:disable-next-line interface-over-type-literal + type DataLabelContext = { + id: any; + series: string; + group: string | string[]; + value: number; + targetValue: number; + x: number | string; + y: number; + z: number; + low: number; + high: number; + open: number; + close: number; + volume: number; + label: string; + totalValue: number; + data: object | null; + itemData: object | null; + seriesData: object | null; + groupData: object | null; + componentElement: Element; + }; + // tslint:disable-next-line interface-over-type-literal + type GroupContext = { + indexPath: any[]; + subId: string; + }; + // tslint:disable-next-line interface-over-type-literal + type ItemContext = { + seriesIndex: number; + itemIndex: number; + subId: string; + }; + // tslint:disable-next-line interface-over-type-literal + type LegendItemContext = { + sectionIndexPath: any[]; + itemIndex: number; + subId: string; + }; + // tslint:disable-next-line interface-over-type-literal + type PieCenterContext = { + outerBounds: object; + innerBounds: object; + label: string; + componentElement: Element; + }; + // tslint:disable-next-line interface-over-type-literal + type PieCenterLabelContext = { + subId: string; + }; + // tslint:disable-next-line interface-over-type-literal + type ReferenceObject = { + axis: 'xAxis' | 'yAxis' | 'y2Axis'; + index: number; + subId: string; + }; + // tslint:disable-next-line interface-over-type-literal + type SeriesContext = { + itemIndex: number; + subId: string; + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + parentElement: Element; + id: any; + series: string; + group: string | string[]; + label: string; + value: number; + x: number | string; + y: number; + z: number; + low: number; + high: number; + open: number; + close: number; + volume: number; + targetValue: number; + data: object | null; + itemData: object | null; + seriesData: object | null; + groupData: object | null; + componentElement: Element; + color: string; + }; +} +export interface ojChartEventMap extends dvtBaseComponentEventMap> { + 'ojDrill': ojChart.ojDrill; + 'ojSelectInput': ojChart.ojSelectInput; + 'ojViewportChange': ojChart.ojViewportChange; + 'ojViewportChangeInput': ojChart.ojViewportChangeInput; + 'animationOnDataChangeChanged': JetElementCustomEvent["animationOnDataChange"]>; + 'animationOnDisplayChanged': JetElementCustomEvent["animationOnDisplay"]>; + 'asChanged': JetElementCustomEvent["as"]>; + 'coordinateSystemChanged': JetElementCustomEvent["coordinateSystem"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'dataCursorChanged': JetElementCustomEvent["dataCursor"]>; + 'dataCursorBehaviorChanged': JetElementCustomEvent["dataCursorBehavior"]>; + 'dataCursorPositionChanged': JetElementCustomEvent["dataCursorPosition"]>; + 'dataLabelChanged': JetElementCustomEvent["dataLabel"]>; + 'dndChanged': JetElementCustomEvent["dnd"]>; + 'dragModeChanged': JetElementCustomEvent["dragMode"]>; + 'drillingChanged': JetElementCustomEvent["drilling"]>; + 'groupComparatorChanged': JetElementCustomEvent["groupComparator"]>; + 'hiddenCategoriesChanged': JetElementCustomEvent["hiddenCategories"]>; + 'hideAndShowBehaviorChanged': JetElementCustomEvent["hideAndShowBehavior"]>; + 'highlightMatchChanged': JetElementCustomEvent["highlightMatch"]>; + 'highlightedCategoriesChanged': JetElementCustomEvent["highlightedCategories"]>; + 'hoverBehaviorChanged': JetElementCustomEvent["hoverBehavior"]>; + 'initialZoomingChanged': JetElementCustomEvent["initialZooming"]>; + 'legendChanged': JetElementCustomEvent["legend"]>; + 'orientationChanged': JetElementCustomEvent["orientation"]>; + 'otherThresholdChanged': JetElementCustomEvent["otherThreshold"]>; + 'overviewChanged': JetElementCustomEvent["overview"]>; + 'pieCenterChanged': JetElementCustomEvent["pieCenter"]>; + 'plotAreaChanged': JetElementCustomEvent["plotArea"]>; + 'polarGridShapeChanged': JetElementCustomEvent["polarGridShape"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'selectionModeChanged': JetElementCustomEvent["selectionMode"]>; + 'seriesComparatorChanged': JetElementCustomEvent["seriesComparator"]>; + 'sortingChanged': JetElementCustomEvent["sorting"]>; + 'splitDualYChanged': JetElementCustomEvent["splitDualY"]>; + 'splitterPositionChanged': JetElementCustomEvent["splitterPosition"]>; + 'stackChanged': JetElementCustomEvent["stack"]>; + 'stackLabelChanged': JetElementCustomEvent["stackLabel"]>; + 'styleDefaultsChanged': JetElementCustomEvent["styleDefaults"]>; + 'timeAxisTypeChanged': JetElementCustomEvent["timeAxisType"]>; + 'tooltipChanged': JetElementCustomEvent["tooltip"]>; + 'touchResponseChanged': JetElementCustomEvent["touchResponse"]>; + 'typeChanged': JetElementCustomEvent["type"]>; + 'valueFormatsChanged': JetElementCustomEvent["valueFormats"]>; + 'xAxisChanged': JetElementCustomEvent["xAxis"]>; + 'y2AxisChanged': JetElementCustomEvent["y2Axis"]>; + 'yAxisChanged': JetElementCustomEvent["yAxis"]>; + 'zoomAndScrollChanged': JetElementCustomEvent["zoomAndScroll"]>; + 'zoomDirectionChanged': JetElementCustomEvent["zoomDirection"]>; +} +export interface ojChartSettableProperties extends dvtBaseComponentSettableProperties { + animationOnDataChange: 'auto' | 'slideToLeft' | 'slideToRight' | 'none'; + animationOnDisplay: 'auto' | 'alphaFade' | 'zoom' | 'none'; + as: string; + coordinateSystem: 'polar' | 'cartesian'; + data: DataProvider | null; + dataCursor: 'off' | 'on' | 'auto'; + dataCursorBehavior: 'smooth' | 'snap' | 'auto'; + dataCursorPosition: { + x: number | string; + y: number; + y2: number; + }; + dataLabel: ((context: ojChart.DataLabelContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + dnd: { + drag: { + groups: { + dataTypes: string | string[]; + drag: ((param0: Event) => void); + dragEnd: ((param0: Event) => void); + dragStart: ((param0: Event, param1: object) => void); + }; + items: { + dataTypes: string | string[]; + drag: ((param0: Event) => void); + dragEnd: ((param0: Event) => void); + dragStart: ((param0: Event, param1: object) => void); + }; + series: { + dataTypes: string | string[]; + drag: ((param0: Event) => void); + dragEnd: ((param0: Event) => void); + dragStart: ((param0: Event, param1: object) => void); + }; + }; + drop: { + legend: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + plotArea: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + xAxis: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + y2Axis: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + yAxis: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + }; + }; + dragMode: 'pan' | 'zoom' | 'select' | 'off' | 'user'; + drilling: 'on' | 'seriesOnly' | 'groupsOnly' | 'off'; + groupComparator: ((param0: object, param1: object) => number) | null; + hiddenCategories: string[]; + hideAndShowBehavior: 'withRescale' | 'withoutRescale' | 'none'; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + initialZooming: 'first' | 'last' | 'none'; + legend: { + backgroundColor: string; + borderColor: string; + maxSize: string; + position: 'start' | 'end' | 'bottom' | 'top' | 'auto'; + referenceObjectSection: { + title: string; + titleHalign: 'center' | 'end' | 'start'; + titleStyle: object; + }; + rendered: 'on' | 'off' | 'auto'; + scrolling: 'off' | 'asNeeded'; + sections: Array<{ + items: Array<{ + borderColor: string; + categories: string[]; + categoryVisibility: 'hidden' | 'visible'; + color: string; + id: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + markerColor: string; + markerShape?: 'circle' | 'diamond' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + pattern: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + shortDesc: string; + source: string; + symbolType: 'line' | 'lineWithMarker' | 'image' | 'marker'; + text: string; + }>; + sections: object[]; + title: string; + titleHalign: 'center' | 'end' | 'start'; + titleStyle: object; + }>; + seriesSection: { + title: string; + titleHalign: 'center' | 'end' | 'start'; + titleStyle: object; + }; + size: string; + symbolHeight: number; + symbolWidth: number; + textStyle: object; + title: string; + titleHalign: 'center' | 'end' | 'start'; + titleStyle: object; + }; + orientation: 'horizontal' | 'vertical'; + otherThreshold: number; + overview: { + content: object; + height: string; + rendered: 'on' | 'off'; + }; + pieCenter: { + converter: object; + label: string; + labelStyle: object; + renderer: ((context: ojChart.PieCenterContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + }; + plotArea: { + backgroundColor: string; + borderColor: string; + borderWidth: number; + rendered: 'off' | 'on'; + }; + polarGridShape: 'polygon' | 'circle'; + selection: K[]; + selectionMode: 'single' | 'multiple' | 'none'; + seriesComparator: ((param0: object, param1: object) => number) | null; + sorting: 'ascending' | 'descending' | 'off'; + splitDualY: 'on' | 'off' | 'auto'; + splitterPosition: number; + stack: 'on' | 'off'; + stackLabel: 'on' | 'off'; + styleDefaults: { + animationDownColor: string; + animationDuration: number; + animationIndicators: 'none' | 'all'; + animationUpColor: string; + barGapRatio: number; + borderColor: string; + borderWidth: number; + boxPlot: { + medianSvgClassName: string; + medianSvgStyle: object; + whiskerEndLength: string; + whiskerEndSvgClassName: string; + whiskerEndSvgStyle: object; + whiskerSvgClassName: string; + whiskerSvgStyle: object; + }; + colors: string[]; + dataCursor: { + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + markerColor: string; + markerDisplayed: 'off' | 'on'; + markerSize: number; + }; + dataItemGaps: string; + dataLabelPosition: 'center' | 'outsideSlice' | 'aboveMarker' | 'belowMarker' | 'beforeMarker' | 'afterMarker' | 'insideBarEdge' | 'outsideBarEdge' | 'none' | 'auto'; + dataLabelStyle: object | object[]; + funnelBackgroundColor: string; + groupSeparators: { + color: string; + rendered: 'off' | 'auto'; + }; + hoverBehaviorDelay: number; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineType: 'straight' | 'curved' | 'stepped' | 'centeredStepped' | 'segmented' | 'centeredSegmented' | 'none' | 'auto'; + lineWidth: number; + markerColor: string; + markerDisplayed: 'on' | 'off' | 'auto'; + markerShape?: 'auto' | 'circle' | 'diamond' | 'human' | 'plus' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + markerSize: number; + marqueeBorderColor: string; + marqueeColor: string; + maxBarWidth: number; + otherColor: string; + patterns: string[]; + pieFeelerColor: string; + pieInnerRadius: number; + selectionEffect: 'explode' | 'highlightAndExplode' | 'highlight'; + seriesEffect: 'color' | 'pattern' | 'gradient'; + shapes: string[]; + stackLabelStyle: object; + stockFallingColor: string; + stockRangeColor: string; + stockRisingColor: string; + stockVolumeColor: string; + threeDEffect: 'on' | 'off'; + tooltipLabelStyle: object; + tooltipValueStyle: object; + }; + timeAxisType: 'enabled' | 'mixedFrequency' | 'skipGaps' | 'disabled' | 'auto'; + tooltip: { + renderer: ((context: ojChart.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + touchResponse: 'touchStart' | 'auto'; + type: 'line' | 'area' | 'lineWithArea' | 'stock' | 'boxPlot' | 'combo' | 'pie' | 'scatter' | 'bubble' | 'funnel' | 'pyramid' | 'bar'; + valueFormats: { + close: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + group: { + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string | string[]; + }; + high: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + label: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + }; + low: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + open: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + q1: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + q2: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + q3: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + series: { + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + targetValue: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + value: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + volume: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + x: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + y: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + y2: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + z: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + }; + xAxis: { + axisLine: { + lineColor: string; + lineWidth: number; + rendered: 'off' | 'on'; + }; + baselineScaling: 'min' | 'zero'; + dataMax: number; + dataMin: number; + majorTick: { + baselineColor: 'inherit' | 'auto'; + baselineStyle: 'dotted' | 'dashed' | 'solid'; + baselineWidth: number; + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + max: number | string; + maxSize: string; + min: number | string; + minStep: number; + minorStep: number; + minorTick: { + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + referenceObjects: Array<{ + categories: string[]; + color: string; + displayInLegend: 'on' | 'off'; + high: number; + id: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineType: 'curved' | 'stepped' | 'centeredStepped' | 'segmented' | 'centeredSegmented' | 'straight'; + lineWidth: number; + location: 'front' | 'back'; + low: number; + shortDesc: string; + svgClassName: string; + svgStyle: object; + text: string; + type: 'area' | 'line'; + value: number; + }>; + rendered: 'off' | 'on'; + scale: 'log' | 'linear'; + size: string; + step: number; + tickLabel: { + converter: object; + rendered: 'off' | 'on'; + rotation: 'none' | 'auto'; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + style: object; + }; + title: string; + titleStyle: object; + viewportEndGroup: number | string; + viewportMax: number | string; + viewportMin: number | string; + viewportStartGroup: number | string; + }; + y2Axis: { + alignTickMarks: 'off' | 'on'; + axisLine: { + lineColor: string; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + baselineScaling: 'min' | 'zero'; + dataMax: number; + dataMin: number; + majorTick: { + baselineColor: 'inherit' | 'auto'; + baselineStyle: 'dotted' | 'dashed' | 'solid'; + baselineWidth: number; + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + max: number; + maxSize: string; + min: number; + minStep: number; + minorStep: number; + minorTick: { + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + position: 'start' | 'end' | 'top' | 'bottom' | 'auto'; + referenceObjects: Array<{ + categories: string[]; + color: string; + displayInLegend: 'on' | 'off'; + high: number; + id: string; + items: Array<{ + high: number; + low: number; + value: number; + x: number | string; + }>; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineType: 'curved' | 'stepped' | 'centeredStepped' | 'segmented' | 'centeredSegmented' | 'straight'; + lineWidth: number; + location: 'front' | 'back'; + low: number; + shortDesc: string; + svgClassName: string; + svgStyle: object; + text: string; + type: 'area' | 'line'; + value: number; + }>; + rendered: 'off' | 'on'; + scale: 'log' | 'linear'; + size: string; + step: number; + tickLabel: { + converter: object; + position: 'inside' | 'outside'; + rendered: 'off' | 'on'; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + style: object; + }; + title: string; + titleStyle: object; + }; + yAxis: { + axisLine: { + lineColor: string; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + baselineScaling: 'min' | 'zero'; + dataMax: number; + dataMin: number; + majorTick: { + baselineColor: 'inherit' | 'auto'; + baselineStyle: 'dotted' | 'dashed' | 'solid'; + baselineWidth: number; + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + max: number; + maxSize: string; + min: number; + minStep: number; + minorStep: number; + minorTick: { + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + position: 'start' | 'end' | 'top' | 'bottom' | 'auto'; + referenceObjects: Array<{ + categories: string[]; + color: string; + displayInLegend: 'on' | 'off'; + high: number; + id: string; + items: Array<{ + high: number; + low: number; + value: number; + x: number | string; + }>; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineType: 'curved' | 'stepped' | 'centeredStepped' | 'segmented' | 'centeredSegmented' | 'straight'; + lineWidth: number; + location: 'front' | 'back'; + low: number; + shortDesc: string; + svgClassName: string; + svgStyle: object; + text: string; + type: 'area' | 'line'; + value: number; + }>; + rendered: 'off' | 'on'; + scale: 'log' | 'linear'; + size: string; + step: number; + tickLabel: { + converter: object; + position: 'inside' | 'outside'; + rendered: 'off' | 'on'; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + style: object; + }; + title: string; + titleStyle: object; + viewportMax: number; + viewportMin: number; + }; + zoomAndScroll: 'delayedScrollOnly' | 'liveScrollOnly' | 'delayed' | 'live' | 'off'; + zoomDirection: 'x' | 'y' | 'auto'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelClose?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelDate?: string; + labelDefaultGroupName?: string; + labelGroup?: string; + labelHigh?: string; + labelInvalidData?: string; + labelLow?: string; + labelNoData?: string; + labelOpen?: string; + labelOther?: string; + labelPercentage?: string; + labelQ1?: string; + labelQ2?: string; + labelQ3?: string; + labelSeries?: string; + labelTargetValue?: string; + labelValue?: string; + labelVolume?: string; + labelX?: string; + labelY?: string; + labelZ?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + tooltipPan?: string; + tooltipSelect?: string; + tooltipZoom?: string; + }; +} +export interface ojChartSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojChartGroup extends JetElement { + drilling?: 'on' | 'off' | 'inherit'; + labelStyle?: object; + name?: string; + shortDesc?: string; + onDrillingChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onNameChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojChartGroupEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojChartGroup[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojChartGroupSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojChartGroupSettablePropertiesLenient): void; +} +export interface ojChartGroupEventMap extends HTMLElementEventMap { + 'drillingChanged': JetElementCustomEvent; + 'labelStyleChanged': JetElementCustomEvent; + 'nameChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; +} +export interface ojChartGroupSettableProperties extends JetSettableProperties { + drilling?: 'on' | 'off' | 'inherit'; + labelStyle?: object; + name?: string; + shortDesc?: string; +} +export interface ojChartGroupSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojChartItem extends JetElement { + borderColor?: string; + borderWidth?: number; + boxPlot?: { + medianSvgClassName?: string; + medianSvgStyle?: object; + q2Color?: string; + q2SvgClassName?: string; + q2SvgStyle?: object; + q3SvgClassName?: string; + q3SvgStyle?: object; + whiskerEndLength?: string; + whiskerEndSvgClassName?: string; + whiskerEndSvgStyle?: object; + whiskerSvgClassName?: string; + whiskerSvgStyle?: object; + }; + categories?: string[]; + close?: number; + color?: string; + drilling?: 'on' | 'off' | 'inherit'; + groupId: string[]; + high?: number; + items?: object[] | number[]; + label?: string | string[]; + labelPosition?: 'center' | 'outsideSlice' | 'aboveMarker' | 'belowMarker' | 'beforeMarker' | 'afterMarker' | 'insideBarEdge' | 'outsideBarEdge' | 'none' | 'auto'; + labelStyle?: object | object[]; + low?: number; + markerDisplayed?: 'on' | 'off' | 'auto'; + markerShape?: 'circle' | 'diamond' | 'human' | 'plus' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | 'auto' | string; + markerSize?: number; + open?: number; + pattern?: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'auto'; + q1?: number; + q2?: number; + q3?: number; + seriesId: string; + shortDesc?: string; + source?: string; + sourceHover?: string; + sourceHoverSelected?: string; + sourceSelected?: string; + svgClassName?: string; + svgStyle?: object; + targetValue?: number; + value?: number; + volume?: number; + x?: number | string; + y?: number; + z?: number; + onBorderColorChanged: ((event: JetElementCustomEvent) => any) | null; + onBorderWidthChanged: ((event: JetElementCustomEvent) => any) | null; + onBoxPlotChanged: ((event: JetElementCustomEvent) => any) | null; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onCloseChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onDrillingChanged: ((event: JetElementCustomEvent) => any) | null; + onGroupIdChanged: ((event: JetElementCustomEvent) => any) | null; + onHighChanged: ((event: JetElementCustomEvent) => any) | null; + onItemsChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelPositionChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onLowChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerDisplayedChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerShapeChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerSizeChanged: ((event: JetElementCustomEvent) => any) | null; + onOpenChanged: ((event: JetElementCustomEvent) => any) | null; + onPatternChanged: ((event: JetElementCustomEvent) => any) | null; + onQ1Changed: ((event: JetElementCustomEvent) => any) | null; + onQ2Changed: ((event: JetElementCustomEvent) => any) | null; + onQ3Changed: ((event: JetElementCustomEvent) => any) | null; + onSeriesIdChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceHoverChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceHoverSelectedChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceSelectedChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onTargetValueChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onVolumeChanged: ((event: JetElementCustomEvent) => any) | null; + onXChanged: ((event: JetElementCustomEvent) => any) | null; + onYChanged: ((event: JetElementCustomEvent) => any) | null; + onZChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojChartItemEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojChartItem[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojChartItemSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojChartItemSettablePropertiesLenient): void; +} +export interface ojChartItemEventMap extends HTMLElementEventMap { + 'borderColorChanged': JetElementCustomEvent; + 'borderWidthChanged': JetElementCustomEvent; + 'boxPlotChanged': JetElementCustomEvent; + 'categoriesChanged': JetElementCustomEvent; + 'closeChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'drillingChanged': JetElementCustomEvent; + 'groupIdChanged': JetElementCustomEvent; + 'highChanged': JetElementCustomEvent; + 'itemsChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; + 'labelPositionChanged': JetElementCustomEvent; + 'labelStyleChanged': JetElementCustomEvent; + 'lowChanged': JetElementCustomEvent; + 'markerDisplayedChanged': JetElementCustomEvent; + 'markerShapeChanged': JetElementCustomEvent; + 'markerSizeChanged': JetElementCustomEvent; + 'openChanged': JetElementCustomEvent; + 'patternChanged': JetElementCustomEvent; + 'q1Changed': JetElementCustomEvent; + 'q2Changed': JetElementCustomEvent; + 'q3Changed': JetElementCustomEvent; + 'seriesIdChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'sourceChanged': JetElementCustomEvent; + 'sourceHoverChanged': JetElementCustomEvent; + 'sourceHoverSelectedChanged': JetElementCustomEvent; + 'sourceSelectedChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'targetValueChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; + 'volumeChanged': JetElementCustomEvent; + 'xChanged': JetElementCustomEvent; + 'yChanged': JetElementCustomEvent; + 'zChanged': JetElementCustomEvent; +} +export interface ojChartItemSettableProperties extends JetSettableProperties { + borderColor?: string; + borderWidth?: number; + boxPlot?: { + medianSvgClassName?: string; + medianSvgStyle?: object; + q2Color?: string; + q2SvgClassName?: string; + q2SvgStyle?: object; + q3SvgClassName?: string; + q3SvgStyle?: object; + whiskerEndLength?: string; + whiskerEndSvgClassName?: string; + whiskerEndSvgStyle?: object; + whiskerSvgClassName?: string; + whiskerSvgStyle?: object; + }; + categories?: string[]; + close?: number; + color?: string; + drilling?: 'on' | 'off' | 'inherit'; + groupId: string[]; + high?: number; + items?: object[] | number[]; + label?: string | string[]; + labelPosition?: 'center' | 'outsideSlice' | 'aboveMarker' | 'belowMarker' | 'beforeMarker' | 'afterMarker' | 'insideBarEdge' | 'outsideBarEdge' | 'none' | 'auto'; + labelStyle?: object | object[]; + low?: number; + markerDisplayed?: 'on' | 'off' | 'auto'; + markerShape?: 'circle' | 'diamond' | 'human' | 'plus' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | 'auto' | string; + markerSize?: number; + open?: number; + pattern?: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'auto'; + q1?: number; + q2?: number; + q3?: number; + seriesId: string; + shortDesc?: string; + source?: string; + sourceHover?: string; + sourceHoverSelected?: string; + sourceSelected?: string; + svgClassName?: string; + svgStyle?: object; + targetValue?: number; + value?: number; + volume?: number; + x?: number | string; + y?: number; + z?: number; +} +export interface ojChartItemSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojChartSeries extends JetElement { + areaColor?: string; + areaSvgClassName?: string; + areaSvgStyle?: object; + assignedToY2?: 'on' | 'off'; + borderColor?: string; + borderWidth?: number; + boxPlot?: { + medianSvgClassName?: string; + medianSvgStyle?: object; + q2Color?: string; + q2SvgClassName?: string; + q2SvgStyle?: object; + q3Color?: string; + q3SvgClassName?: string; + q3SvgStyle?: object; + whiskerEndLength?: string; + whiskerEndSvgClassName?: string; + whiskerEndSvgStyle?: object; + whiskerSvgClassName?: string; + whiskerSvgStyle?: object; + }; + categories?: string[]; + color?: string; + displayInLegend?: 'on' | 'off' | 'auto'; + drilling?: 'on' | 'off' | 'inherit'; + lineStyle?: 'dotted' | 'dashed' | 'solid'; + lineType?: 'straight' | 'curved' | 'stepped' | 'centeredStepped' | 'segmented' | 'centeredSegmented' | 'none' | 'auto'; + lineWidth?: number; + markerColor?: string; + markerDisplayed?: 'on' | 'off' | 'auto'; + markerShape?: 'circle' | 'diamond' | 'human' | 'plus' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | 'auto' | string; + markerSize?: number; + markerSvgClassName?: string; + markerSvgStyle?: object; + name?: string; + pattern?: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'auto'; + pieSliceExplode?: number; + shortDesc?: string; + source?: string; + sourceHover?: string; + sourceHoverSelected?: string; + sourceSelected?: string; + stackCategory?: string; + svgClassName?: string; + svgStyle?: object; + type?: 'bar' | 'line' | 'area' | 'lineWithArea' | 'candlestick' | 'boxPlot' | 'auto'; + onAreaColorChanged: ((event: JetElementCustomEvent) => any) | null; + onAreaSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onAreaSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onAssignedToY2Changed: ((event: JetElementCustomEvent) => any) | null; + onBorderColorChanged: ((event: JetElementCustomEvent) => any) | null; + onBorderWidthChanged: ((event: JetElementCustomEvent) => any) | null; + onBoxPlotChanged: ((event: JetElementCustomEvent) => any) | null; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onDisplayInLegendChanged: ((event: JetElementCustomEvent) => any) | null; + onDrillingChanged: ((event: JetElementCustomEvent) => any) | null; + onLineStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onLineTypeChanged: ((event: JetElementCustomEvent) => any) | null; + onLineWidthChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerColorChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerDisplayedChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerShapeChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerSizeChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onNameChanged: ((event: JetElementCustomEvent) => any) | null; + onPatternChanged: ((event: JetElementCustomEvent) => any) | null; + onPieSliceExplodeChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceHoverChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceHoverSelectedChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceSelectedChanged: ((event: JetElementCustomEvent) => any) | null; + onStackCategoryChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onTypeChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojChartSeriesEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojChartSeries[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojChartSeriesSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojChartSeriesSettablePropertiesLenient): void; +} +export interface ojChartSeriesEventMap extends HTMLElementEventMap { + 'areaColorChanged': JetElementCustomEvent; + 'areaSvgClassNameChanged': JetElementCustomEvent; + 'areaSvgStyleChanged': JetElementCustomEvent; + 'assignedToY2Changed': JetElementCustomEvent; + 'borderColorChanged': JetElementCustomEvent; + 'borderWidthChanged': JetElementCustomEvent; + 'boxPlotChanged': JetElementCustomEvent; + 'categoriesChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'displayInLegendChanged': JetElementCustomEvent; + 'drillingChanged': JetElementCustomEvent; + 'lineStyleChanged': JetElementCustomEvent; + 'lineTypeChanged': JetElementCustomEvent; + 'lineWidthChanged': JetElementCustomEvent; + 'markerColorChanged': JetElementCustomEvent; + 'markerDisplayedChanged': JetElementCustomEvent; + 'markerShapeChanged': JetElementCustomEvent; + 'markerSizeChanged': JetElementCustomEvent; + 'markerSvgClassNameChanged': JetElementCustomEvent; + 'markerSvgStyleChanged': JetElementCustomEvent; + 'nameChanged': JetElementCustomEvent; + 'patternChanged': JetElementCustomEvent; + 'pieSliceExplodeChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'sourceChanged': JetElementCustomEvent; + 'sourceHoverChanged': JetElementCustomEvent; + 'sourceHoverSelectedChanged': JetElementCustomEvent; + 'sourceSelectedChanged': JetElementCustomEvent; + 'stackCategoryChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'typeChanged': JetElementCustomEvent; +} +export interface ojChartSeriesSettableProperties extends JetSettableProperties { + areaColor?: string; + areaSvgClassName?: string; + areaSvgStyle?: object; + assignedToY2?: 'on' | 'off'; + borderColor?: string; + borderWidth?: number; + boxPlot?: { + medianSvgClassName?: string; + medianSvgStyle?: object; + q2Color?: string; + q2SvgClassName?: string; + q2SvgStyle?: object; + q3Color?: string; + q3SvgClassName?: string; + q3SvgStyle?: object; + whiskerEndLength?: string; + whiskerEndSvgClassName?: string; + whiskerEndSvgStyle?: object; + whiskerSvgClassName?: string; + whiskerSvgStyle?: object; + }; + categories?: string[]; + color?: string; + displayInLegend?: 'on' | 'off' | 'auto'; + drilling?: 'on' | 'off' | 'inherit'; + lineStyle?: 'dotted' | 'dashed' | 'solid'; + lineType?: 'straight' | 'curved' | 'stepped' | 'centeredStepped' | 'segmented' | 'centeredSegmented' | 'none' | 'auto'; + lineWidth?: number; + markerColor?: string; + markerDisplayed?: 'on' | 'off' | 'auto'; + markerShape?: 'circle' | 'diamond' | 'human' | 'plus' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | 'auto' | string; + markerSize?: number; + markerSvgClassName?: string; + markerSvgStyle?: object; + name?: string; + pattern?: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'auto'; + pieSliceExplode?: number; + shortDesc?: string; + source?: string; + sourceHover?: string; + sourceHoverSelected?: string; + sourceSelected?: string; + stackCategory?: string; + svgClassName?: string; + svgStyle?: object; + type?: 'bar' | 'line' | 'area' | 'lineWithArea' | 'candlestick' | 'boxPlot' | 'auto'; +} +export interface ojChartSeriesSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojSparkChart extends dvtBaseComponent> { + animationDuration: number | null; + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + areaColor: string; + areaSvgClassName: string; + areaSvgStyle: object; + as: string; + barGapRatio: number; + baselineScaling: 'zero' | 'min'; + color: string; + data: DataProvider | null; + firstColor: string; + highColor: string; + lastColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineType: 'curved' | 'stepped' | 'centeredStepped' | 'segmented' | 'centeredSegmented' | 'none' | 'straight'; + lineWidth: number; + lowColor: string; + markerShape: 'auto' | 'circle' | 'diamond' | 'human' | 'plus' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + markerSize: number; + referenceObjects: ojSparkChart.ReferenceObject[]; + svgClassName: string; + svgStyle: object; + tooltip: { + renderer: ((context: ojSparkChart.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })) | null; + }; + type: 'area' | 'lineWithArea' | 'bar' | 'line'; + visualEffects: 'none' | 'auto'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; + onAnimationDurationChanged: ((event: JetElementCustomEvent["animationDuration"]>) => any) | null; + onAnimationOnDataChangeChanged: ((event: JetElementCustomEvent["animationOnDataChange"]>) => any) | null; + onAnimationOnDisplayChanged: ((event: JetElementCustomEvent["animationOnDisplay"]>) => any) | null; + onAreaColorChanged: ((event: JetElementCustomEvent["areaColor"]>) => any) | null; + onAreaSvgClassNameChanged: ((event: JetElementCustomEvent["areaSvgClassName"]>) => any) | null; + onAreaSvgStyleChanged: ((event: JetElementCustomEvent["areaSvgStyle"]>) => any) | null; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onBarGapRatioChanged: ((event: JetElementCustomEvent["barGapRatio"]>) => any) | null; + onBaselineScalingChanged: ((event: JetElementCustomEvent["baselineScaling"]>) => any) | null; + onColorChanged: ((event: JetElementCustomEvent["color"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onFirstColorChanged: ((event: JetElementCustomEvent["firstColor"]>) => any) | null; + onHighColorChanged: ((event: JetElementCustomEvent["highColor"]>) => any) | null; + onLastColorChanged: ((event: JetElementCustomEvent["lastColor"]>) => any) | null; + onLineStyleChanged: ((event: JetElementCustomEvent["lineStyle"]>) => any) | null; + onLineTypeChanged: ((event: JetElementCustomEvent["lineType"]>) => any) | null; + onLineWidthChanged: ((event: JetElementCustomEvent["lineWidth"]>) => any) | null; + onLowColorChanged: ((event: JetElementCustomEvent["lowColor"]>) => any) | null; + onMarkerShapeChanged: ((event: JetElementCustomEvent["markerShape"]>) => any) | null; + onMarkerSizeChanged: ((event: JetElementCustomEvent["markerSize"]>) => any) | null; + onReferenceObjectsChanged: ((event: JetElementCustomEvent["referenceObjects"]>) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent["svgClassName"]>) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent["svgStyle"]>) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent["tooltip"]>) => any) | null; + onTypeChanged: ((event: JetElementCustomEvent["type"]>) => any) | null; + onVisualEffectsChanged: ((event: JetElementCustomEvent["visualEffects"]>) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojSparkChartEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojSparkChart[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojSparkChartSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojSparkChartSettablePropertiesLenient): void; + getDataItem(itemIndex: number): ojSparkChart.ItemContext | null; +} +export interface ojSparkChartEventMap extends dvtBaseComponentEventMap> { + 'animationDurationChanged': JetElementCustomEvent["animationDuration"]>; + 'animationOnDataChangeChanged': JetElementCustomEvent["animationOnDataChange"]>; + 'animationOnDisplayChanged': JetElementCustomEvent["animationOnDisplay"]>; + 'areaColorChanged': JetElementCustomEvent["areaColor"]>; + 'areaSvgClassNameChanged': JetElementCustomEvent["areaSvgClassName"]>; + 'areaSvgStyleChanged': JetElementCustomEvent["areaSvgStyle"]>; + 'asChanged': JetElementCustomEvent["as"]>; + 'barGapRatioChanged': JetElementCustomEvent["barGapRatio"]>; + 'baselineScalingChanged': JetElementCustomEvent["baselineScaling"]>; + 'colorChanged': JetElementCustomEvent["color"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'firstColorChanged': JetElementCustomEvent["firstColor"]>; + 'highColorChanged': JetElementCustomEvent["highColor"]>; + 'lastColorChanged': JetElementCustomEvent["lastColor"]>; + 'lineStyleChanged': JetElementCustomEvent["lineStyle"]>; + 'lineTypeChanged': JetElementCustomEvent["lineType"]>; + 'lineWidthChanged': JetElementCustomEvent["lineWidth"]>; + 'lowColorChanged': JetElementCustomEvent["lowColor"]>; + 'markerShapeChanged': JetElementCustomEvent["markerShape"]>; + 'markerSizeChanged': JetElementCustomEvent["markerSize"]>; + 'referenceObjectsChanged': JetElementCustomEvent["referenceObjects"]>; + 'svgClassNameChanged': JetElementCustomEvent["svgClassName"]>; + 'svgStyleChanged': JetElementCustomEvent["svgStyle"]>; + 'tooltipChanged': JetElementCustomEvent["tooltip"]>; + 'typeChanged': JetElementCustomEvent["type"]>; + 'visualEffectsChanged': JetElementCustomEvent["visualEffects"]>; +} +export interface ojSparkChartSettableProperties extends dvtBaseComponentSettableProperties { + animationDuration: number | null; + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + areaColor: string; + areaSvgClassName: string; + areaSvgStyle: object; + as: string; + barGapRatio: number; + baselineScaling: 'zero' | 'min'; + color: string; + data: DataProvider | null; + firstColor: string; + highColor: string; + lastColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineType: 'curved' | 'stepped' | 'centeredStepped' | 'segmented' | 'centeredSegmented' | 'none' | 'straight'; + lineWidth: number; + lowColor: string; + markerShape: 'auto' | 'circle' | 'diamond' | 'human' | 'plus' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + markerSize: number; + referenceObjects: ojSparkChart.ReferenceObject[]; + svgClassName: string; + svgStyle: object; + tooltip: { + renderer: ((context: ojSparkChart.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })) | null; + }; + type: 'area' | 'lineWithArea' | 'bar' | 'line'; + visualEffects: 'none' | 'auto'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; +} +export interface ojSparkChartSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export namespace ojSparkChart { + // tslint:disable-next-line interface-over-type-literal + type Item = { + borderColor: string; + color: string; + date: Date; + high: number; + low: number; + markerDisplayed: 'on' | 'off'; + markerShape: 'square' | 'circle' | 'diamond' | 'plus' | 'triangleDown' | 'triangleUp' | 'human' | 'star' | 'auto' | string; + markerSize: number; + svgClassName: string; + svgStyle: object; + value: number; + }; + // tslint:disable-next-line interface-over-type-literal + type ItemContext = { + borderColor: string; + color: string; + date: Date; + high: number; + low: number; + value: number; + }; + // tslint:disable-next-line interface-over-type-literal + type ReferenceObject = { + color?: string; + high?: number; + lineWidth?: number; + lineStyle: 'dotted' | 'dashed' | 'solid'; + location: 'front' | 'back'; + low?: number; + svgClassName?: string; + svgStyle?: object; + type: 'area' | 'line'; + value?: number; + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + color: string; + componentElement: Element; + parentElement: Element; + }; +} +export interface ojSparkChartItem extends JetElement { + borderColor: string; + color: string; + date: string; + high: number | null; + low: number | null; + markerDisplayed: 'off' | 'on'; + markerShape?: 'auto' | 'circle' | 'diamond' | 'human' | 'plus' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + markerSize: number; + svgClassName: string; + svgStyle: object; + value: number | null; + onBorderColorChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onDateChanged: ((event: JetElementCustomEvent) => any) | null; + onHighChanged: ((event: JetElementCustomEvent) => any) | null; + onLowChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerDisplayedChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerShapeChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerSizeChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSparkChartItemEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojSparkChartItem[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojSparkChartItemSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojSparkChartItemSettablePropertiesLenient): void; +} +export interface ojSparkChartItemEventMap extends HTMLElementEventMap { + 'borderColorChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'dateChanged': JetElementCustomEvent; + 'highChanged': JetElementCustomEvent; + 'lowChanged': JetElementCustomEvent; + 'markerDisplayedChanged': JetElementCustomEvent; + 'markerShapeChanged': JetElementCustomEvent; + 'markerSizeChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojSparkChartItemSettableProperties extends JetSettableProperties { + borderColor: string; + color: string; + date: string; + high: number | null; + low: number | null; + markerDisplayed: 'off' | 'on'; + markerShape?: 'auto' | 'circle' | 'diamond' | 'human' | 'plus' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + markerSize: number; + svgClassName: string; + svgStyle: object; + value: number | null; +} +export interface ojSparkChartItemSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojcheckboxset/index.d.ts b/types/oraclejet/ojcheckboxset/index.d.ts new file mode 100644 index 0000000000..afed42d51c --- /dev/null +++ b/types/oraclejet/ojcheckboxset/index.d.ts @@ -0,0 +1,69 @@ +import { editableValue, editableValueEventMap, editableValueSettableProperties } from '../ojeditablevalue'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojCheckboxset extends editableValue { + disabled: boolean; + labelledBy: string | null; + required: boolean; + value: any[]; + translations: { + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + }; + onDisabledChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelledByChanged: ((event: JetElementCustomEvent) => any) | null; + onRequiredChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojCheckboxset.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojCheckboxset.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojCheckboxsetEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojCheckboxset[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojCheckboxsetSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojCheckboxsetSettablePropertiesLenient): void; + refresh(): void; + validate(): Promise; +} +export namespace ojCheckboxset { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojCheckboxsetEventMap extends editableValueEventMap { + 'ojAnimateEnd': ojCheckboxset.ojAnimateEnd; + 'ojAnimateStart': ojCheckboxset.ojAnimateStart; + 'disabledChanged': JetElementCustomEvent; + 'labelledByChanged': JetElementCustomEvent; + 'requiredChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojCheckboxsetSettableProperties extends editableValueSettableProperties { + disabled: boolean; + labelledBy: string | null; + required: boolean; + value: any[]; + translations: { + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + }; +} +export interface ojCheckboxsetSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojcollapsible/index.d.ts b/types/oraclejet/ojcollapsible/index.d.ts new file mode 100644 index 0000000000..1d677ed1c1 --- /dev/null +++ b/types/oraclejet/ojcollapsible/index.d.ts @@ -0,0 +1,64 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojCollapsible extends baseComponent { + disabled: boolean; + expandArea: 'header' | 'disclosureIcon'; + expanded: boolean; + onDisabledChanged: ((event: JetElementCustomEvent) => any) | null; + onExpandAreaChanged: ((event: JetElementCustomEvent) => any) | null; + onExpandedChanged: ((event: JetElementCustomEvent) => any) | null; + onOjBeforeCollapse: ((event: ojCollapsible.ojBeforeCollapse) => any) | null; + onOjBeforeExpand: ((event: ojCollapsible.ojBeforeExpand) => any) | null; + onOjCollapse: ((event: ojCollapsible.ojCollapse) => any) | null; + onOjExpand: ((event: ojCollapsible.ojExpand) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojCollapsibleEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojCollapsible[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojCollapsibleSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojCollapsibleSettablePropertiesLenient): void; + refresh(): void; +} +export namespace ojCollapsible { + interface ojBeforeCollapse extends CustomEvent<{ + header: Element; + content: Element; + [propName: string]: any; + }> { + } + interface ojBeforeExpand extends CustomEvent<{ + header: Element; + content: Element; + [propName: string]: any; + }> { + } + interface ojCollapse extends CustomEvent<{ + header: Element; + content: Element; + [propName: string]: any; + }> { + } + interface ojExpand extends CustomEvent<{ + header: Element; + content: Element; + [propName: string]: any; + }> { + } +} +export interface ojCollapsibleEventMap extends baseComponentEventMap { + 'ojBeforeCollapse': ojCollapsible.ojBeforeCollapse; + 'ojBeforeExpand': ojCollapsible.ojBeforeExpand; + 'ojCollapse': ojCollapsible.ojCollapse; + 'ojExpand': ojCollapsible.ojExpand; + 'disabledChanged': JetElementCustomEvent; + 'expandAreaChanged': JetElementCustomEvent; + 'expandedChanged': JetElementCustomEvent; +} +export interface ojCollapsibleSettableProperties extends baseComponentSettableProperties { + disabled: boolean; + expandArea: 'header' | 'disclosureIcon'; + expanded: boolean; +} +export interface ojCollapsibleSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojcollectiondataprovider/index.d.ts b/types/oraclejet/ojcollectiondataprovider/index.d.ts new file mode 100644 index 0000000000..19b87d4f8a --- /dev/null +++ b/types/oraclejet/ojcollectiondataprovider/index.d.ts @@ -0,0 +1,16 @@ +import { Collection } from '../ojmodel'; +import { DataProvider, FetchByKeysParameters, ContainsKeysResults, FetchByKeysResults, FetchByOffsetParameters, FetchByOffsetResults, FetchListResult, FetchListParameters } from '../ojdataprovider'; +declare class CollectionDataProvider implements DataProvider { + constructor(collection: Collection); + addEventListener(eventType: string, listener: EventListener): void; + containsKeys(params: FetchByKeysParameters): Promise>; + dispatchEvent(evt: Event): boolean; + fetchByKeys(params: FetchByKeysParameters): Promise>; + fetchByOffset(params: FetchByOffsetParameters): Promise>; + fetchFirst(params?: FetchListParameters): AsyncIterable>; + getCapability(capabilityName?: string): any; + getTotalSize(): Promise; + isEmpty(): 'yes' | 'no' | 'unknown'; + removeEventListener(eventType: string, listener: EventListener): void; +} +export = CollectionDataProvider; diff --git a/types/oraclejet/ojcolor/index.d.ts b/types/oraclejet/ojcolor/index.d.ts new file mode 100644 index 0000000000..b252df9ab7 --- /dev/null +++ b/types/oraclejet/ojcolor/index.d.ts @@ -0,0 +1,182 @@ +declare class Color { + static ALICEBLUE: Color; + static ANTIQUEWHITE: Color; + static AQUA: Color; + static AQUAMARINE: Color; + static AZURE: Color; + static BEIGE: Color; + static BISQUE: Color; + static BLACK: Color; + static BLANCHEDALMOND: Color; + static BLUE: Color; + static BLUEVIOLET: Color; + static BROWN: Color; + static BURLYWOOD: Color; + static CADETBLUE: Color; + static CHARTREUSE: Color; + static CHOCOLATE: Color; + static CORAL: Color; + static CORNFLOWERBLUE: Color; + static CORNSILK: Color; + static CRIMSON: Color; + static CYAN: Color; + static DARKBLUE: Color; + static DARKCYAN: Color; + static DARKGOLDENROD: Color; + static DARKGRAY: Color; + static DARKGREEN: Color; + static DARKGREY: Color; + static DARKKHAKI: Color; + static DARKMAGENTA: Color; + static DARKOLIVEGREEN: Color; + static DARKORANGE: Color; + static DARKORCHID: Color; + static DARKRED: Color; + static DARKSALMON: Color; + static DARKSEAGREEN: Color; + static DARKSLATEBLUE: Color; + static DARKSLATEGRAY: Color; + static DARKSLATEGREY: Color; + static DARKTURQUOISE: Color; + static DARKVIOLET: Color; + static DEEPPINK: Color; + static DEEPSKYBLUE: Color; + static DIMGRAY: Color; + static DIMGREY: Color; + static DODGERBLUE: Color; + static FIREBRICK: Color; + static FLORALWHITE: Color; + static FORESTGREEN: Color; + static FUCHSIA: Color; + static GAINSBORO: Color; + static GHOSTWHITE: Color; + static GOLD: Color; + static GOLDENROD: Color; + static GRAY: Color; + static GREEN: Color; + static GREENYELLOW: Color; + static GREY: Color; + static HONEYDEW: Color; + static HOTPINK: Color; + static INDIANRED: Color; + static INDIGO: Color; + static IVORY: Color; + static KHAKI: Color; + static LAVENDER: Color; + static LAVENDERBLUSH: Color; + static LAWNGREEN: Color; + static LEMONCHIFFON: Color; + static LIGHTBLUE: Color; + static LIGHTCORAL: Color; + static LIGHTCYAN: Color; + static LIGHTGOLDENRODYELLOW: Color; + static LIGHTGRAY: Color; + static LIGHTGREEN: Color; + static LIGHTGREY: Color; + static LIGHTPINK: Color; + static LIGHTSALMON: Color; + static LIGHTSEAGREEN: Color; + static LIGHTSKYBLUE: Color; + static LIGHTSLATEGRAY: Color; + static LIGHTSLATEGREY: Color; + static LIGHTSTEELBLUE: Color; + static LIGHTYELLOW: Color; + static LIME: Color; + static LIMEGREEN: Color; + static LINEN: Color; + static MAGENTA: Color; + static MAROON: Color; + static MEDIUMAQUAMARINE: Color; + static MEDIUMBLUE: Color; + static MEDIUMORCHID: Color; + static MEDIUMPURPLE: Color; + static MEDIUMSEAGREEN: Color; + static MEDIUMSLATEBLUE: Color; + static MEDIUMSPRINGGREEN: Color; + static MEDIUMTURQUOISE: Color; + static MEDIUMVIOLETRED: Color; + static MIDNIGHTBLUE: Color; + static MINTCREAM: Color; + static MISTYROSE: Color; + static MOCCASIN: Color; + static NAVAJOWHITE: Color; + static NAVY: Color; + static OLDLACE: Color; + static OLIVE: Color; + static OLIVEDRAB: Color; + static ORANGE: Color; + static ORANGERED: Color; + static ORCHID: Color; + static PALEGOLDENROD: Color; + static PALEGREEN: Color; + static PALETURQUOISE: Color; + static PALEVIOLETRED: Color; + static PAPAYAWHIP: Color; + static PEACHPUFF: Color; + static PERU: Color; + static PINK: Color; + static PLUM: Color; + static POWDERBLUE: Color; + static PURPLE: Color; + static REBECCAPURPLE: Color; + static RED: Color; + static ROSYBROWN: Color; + static ROYALBLUE: Color; + static SADDLEBROWN: Color; + static SALMON: Color; + static SANDYBROWN: Color; + static SEAGREEN: Color; + static SEASHELL: Color; + static SIENNA: Color; + static SILVER: Color; + static SKYBLUE: Color; + static SLATEBLUE: Color; + static SLATEGRAY: Color; + static SLATEGREY: Color; + static SNOW: Color; + static SPRINGGREEN: Color; + static STEELBLUE: Color; + static TAN: Color; + static TEAL: Color; + static THISTLE: Color; + static TOMATO: Color; + static TRANSPARENT: Color; + static TURQUOISE: Color; + static VIOLET: Color; + static WHEAT: Color; + static WHITE: Color; + static WHITESMOKE: Color; + static YELLOW: Color; + static YELLOWGREEN: Color; + constructor(color: string | Color.RGBA | Color.HSLA | Color.HSVA); + getAlpha(): number; + getBlue(doNotRound?: boolean): number; + getGreen(doNotRound?: boolean): number; + getRed(doNotRound?: boolean): number; + isEqual(color: Color): boolean; + toString(): string; +} +declare namespace Color { + // tslint:disable-next-line interface-over-type-literal + type HSLA = { + h: number; + s: number; + l: number; + a?: number; + }; + // tslint:disable-next-line interface-over-type-literal + type HSVA = { + h: number; + s: number; + v: number; + a?: number; + }; + // tslint:disable-next-line interface-over-type-literal + type RGBA = { + r: number; + g: number; + b: number; + a?: number; + }; +} +export = Color; diff --git a/types/oraclejet/ojcolorpalette/index.d.ts b/types/oraclejet/ojcolorpalette/index.d.ts new file mode 100644 index 0000000000..5e0b278199 --- /dev/null +++ b/types/oraclejet/ojcolorpalette/index.d.ts @@ -0,0 +1,74 @@ +import Color = require('../ojcolor'); +import { editableValue, editableValueEventMap, editableValueSettableProperties } from '../ojeditablevalue'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojColorPalette extends editableValue { + labelDisplay: 'auto' | 'off'; + labelledBy: string | null; + layout: 'grid' | 'list'; + palette: Array<{ + color: Color; + label?: string; + }>; + swatchSize: 'xs' | 'sm' | 'lg'; + value: Color; + translations: { + labelNone?: string; + }; + onLabelDisplayChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelledByChanged: ((event: JetElementCustomEvent) => any) | null; + onLayoutChanged: ((event: JetElementCustomEvent) => any) | null; + onPaletteChanged: ((event: JetElementCustomEvent) => any) | null; + onSwatchSizeChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojColorPalette.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojColorPalette.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojColorPaletteEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojColorPalette[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojColorPaletteSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojColorPaletteSettablePropertiesLenient): void; +} +export namespace ojColorPalette { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojColorPaletteEventMap extends editableValueEventMap { + 'ojAnimateEnd': ojColorPalette.ojAnimateEnd; + 'ojAnimateStart': ojColorPalette.ojAnimateStart; + 'labelDisplayChanged': JetElementCustomEvent; + 'labelledByChanged': JetElementCustomEvent; + 'layoutChanged': JetElementCustomEvent; + 'paletteChanged': JetElementCustomEvent; + 'swatchSizeChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojColorPaletteSettableProperties extends editableValueSettableProperties { + labelDisplay: 'auto' | 'off'; + labelledBy: string | null; + layout: 'grid' | 'list'; + palette: Array<{ + color: Color; + label?: string; + }>; + swatchSize: 'xs' | 'sm' | 'lg'; + value: Color; + translations: { + labelNone?: string; + }; +} +export interface ojColorPaletteSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojcolorspectrum/index.d.ts b/types/oraclejet/ojcolorspectrum/index.d.ts new file mode 100644 index 0000000000..a96f0c1977 --- /dev/null +++ b/types/oraclejet/ojcolorspectrum/index.d.ts @@ -0,0 +1,62 @@ +import Color = require('../ojcolor'); +import { editableValue, editableValueEventMap, editableValueSettableProperties } from '../ojeditablevalue'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojColorSpectrum extends editableValue { + labelledBy: string | null; + readonly transientValue: Color; + value: Color; + translations: { + labelHue?: string; + labelOpacity?: string; + labelSatLum?: string; + labelThumbDesc?: string; + }; + onLabelledByChanged: ((event: JetElementCustomEvent) => any) | null; + onTransientValueChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojColorSpectrum.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojColorSpectrum.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojColorSpectrumEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojColorSpectrum[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojColorSpectrumSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojColorSpectrumSettablePropertiesLenient): void; +} +export namespace ojColorSpectrum { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojColorSpectrumEventMap extends editableValueEventMap { + 'ojAnimateEnd': ojColorSpectrum.ojAnimateEnd; + 'ojAnimateStart': ojColorSpectrum.ojAnimateStart; + 'labelledByChanged': JetElementCustomEvent; + 'transientValueChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojColorSpectrumSettableProperties extends editableValueSettableProperties { + labelledBy: string | null; + readonly transientValue: Color; + value: Color; + translations: { + labelHue?: string; + labelOpacity?: string; + labelSatLum?: string; + labelThumbDesc?: string; + }; +} +export interface ojColorSpectrumSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojcomponentcore/index.d.ts b/types/oraclejet/ojcomponentcore/index.d.ts new file mode 100644 index 0000000000..17ab67c7b9 --- /dev/null +++ b/types/oraclejet/ojcomponentcore/index.d.ts @@ -0,0 +1,6 @@ +export function subtreeAttached(node: Element): void; +export function subtreeDetached(node: Element): void; +export function subtreeHidden(node: Element): void; +export function subtreeShown(node: Element, options?: { + initialRender: boolean; +}): void; diff --git a/types/oraclejet/ojcomposite/index.d.ts b/types/oraclejet/ojcomposite/index.d.ts new file mode 100644 index 0000000000..d8ed0bbb4e --- /dev/null +++ b/types/oraclejet/ojcomposite/index.d.ts @@ -0,0 +1,45 @@ +export function getComponentMetadata(name: string): Metadata | null; +export function register(name: string, descriptor: { + metadata: Metadata; + view: string; + viewModel: ((param0: ViewModelContext) => void | object); + parseFunction: ((value: string, name: string, meta: object, defaultParseFunction: (value: string) => any) => any); +}): void; +// tslint:disable-next-line interface-over-type-literal +export type Metadata = { + name: string; + version: string; + jetVersion: string; + properties?: object; + methods?: object; + events?: object; + slots?: object; +}; +// tslint:disable-next-line interface-over-type-literal +export type PropertyChangedContext = { + property: string; + value: any; + previousValue: any; + updatedFrom: 'external' | 'internal'; + subproperty?: { + path: string; + value: any; + previousValue: any; + }; +}; +// tslint:disable-next-line interface-over-type-literal +export type ViewModel = { + activated: ((param0: ViewModelContext) => Promise | void); + connected: ((param0: ViewModelContext) => void); + bindingsApplied: ((param0: ViewModelContext) => void); + propertyChanged: ((param0: PropertyChangedContext) => void); + disconnected: ((param0: Element) => void); +}; +// tslint:disable-next-line interface-over-type-literal +export type ViewModelContext = { + element: Element; + properties: object; + slotCounts: object; + unique: string; + uniqueId: string; +}; diff --git a/types/oraclejet/ojconfig/index.d.ts b/types/oraclejet/ojconfig/index.d.ts new file mode 100644 index 0000000000..6fefb1406c --- /dev/null +++ b/types/oraclejet/ojconfig/index.d.ts @@ -0,0 +1,9 @@ +export function getAutomationMode(): string; +export function getDeviceType(): 'phone' | 'tablet' | 'others'; +export function getLocale(): string; +export function getResourceUrl(relativePath: string): string; +export function getVersionInfo(): string; +export function logVersionInfo(): undefined; +export function setAutomationMode(mode: string): undefined; +export function setLocale(locale: string, callback?: (() => void)): undefined; +export function setResourceBaseUrl(baseUrl: string): undefined; diff --git a/types/oraclejet/ojcontext/index.d.ts b/types/oraclejet/ojcontext/index.d.ts new file mode 100644 index 0000000000..0bb6a856c7 --- /dev/null +++ b/types/oraclejet/ojcontext/index.d.ts @@ -0,0 +1,39 @@ +declare class BusyContext { + addBusyState(options: { + description: object | (() => string); + }): (() => void); + applicationBootstrapComplete(): undefined; + clear(): undefined; + dump(message?: string): undefined; + getBusyStates(): Array<{ + id: string; + description: string; + }>; + isReady(): boolean; + toString(): string; + whenReady(timeout?: number): Promise<(boolean | Error)>; +} +declare namespace Context { + interface BusyContext { + addBusyState(options: { + description: object | (() => string); + }): (() => void); + applicationBootstrapComplete(): undefined; + clear(): undefined; + dump(message?: string): undefined; + getBusyStates(): Array<{ + id: string; + description: string; + }>; + isReady(): boolean; + toString(): string; + whenReady(timeout?: number): Promise<(boolean | Error)>; + } +} +declare class Context { + static getContext(node: Element): Context; + static getPageContext(): Context; + static setBusyContextDefaultTimeout(timeout: number): any; + getBusyContext(): BusyContext; +} +export = Context; diff --git a/types/oraclejet/ojconveyorbelt/index.d.ts b/types/oraclejet/ojconveyorbelt/index.d.ts new file mode 100644 index 0000000000..bacc5f7a7f --- /dev/null +++ b/types/oraclejet/ojconveyorbelt/index.d.ts @@ -0,0 +1,26 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojConveyorBelt extends baseComponent { + contentParent: string | null; + orientation: 'horizontal' | 'vertical'; + onContentParentChanged: ((event: JetElementCustomEvent) => any) | null; + onOrientationChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojConveyorBeltEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojConveyorBelt[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojConveyorBeltSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojConveyorBeltSettablePropertiesLenient): void; + refresh(): void; +} +export interface ojConveyorBeltEventMap extends baseComponentEventMap { + 'contentParentChanged': JetElementCustomEvent; + 'orientationChanged': JetElementCustomEvent; +} +export interface ojConveyorBeltSettableProperties extends baseComponentSettableProperties { + contentParent: string | null; + orientation: 'horizontal' | 'vertical'; +} +export interface ojConveyorBeltSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojdatagrid/index.d.ts b/types/oraclejet/ojdatagrid/index.d.ts new file mode 100644 index 0000000000..073f5de2af --- /dev/null +++ b/types/oraclejet/ojdatagrid/index.d.ts @@ -0,0 +1,520 @@ +import { DataProvider } from '../ojdataprovider'; +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojDataGrid extends baseComponent> { + bandingInterval: { + column: number; + row: number; + }; + cell: { + className?: ((context: ojDataGrid.CellContext) => string | void | null) | string | null; + renderer?: ((context: ojDataGrid.CellContext) => { + insert: HTMLElement | string; + } | void | null) | null; + style?: ((context: ojDataGrid.CellContext) => string | void | null) | string | null; + }; + currentCell: ojDataGrid.CurrentCell | null; + data: DataProvider; + dnd: { + reorder: { + row: 'enable' | 'disable'; + }; + }; + editMode: 'none' | 'cellNavigation' | 'cellEdit'; + gridlines: { + horizontal: 'visible' | 'hidden'; + vertical: 'visible' | 'hidden'; + }; + header: { + column: { + className?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + label: { + className?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + renderer?: ((context: ojDataGrid.LabelContext) => { + insert: HTMLElement | string; + } | void | null) | null; + style?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + }; + renderer?: ((context: ojDataGrid.HeaderContext) => { + insert: HTMLElement | string; + } | void | null) | null; + resizable: { + height: 'enable' | 'disable'; + width?: ((context: ojDataGrid.HeaderContext) => string) | string | null; + }; + sortable?: ((context: ojDataGrid.HeaderContext) => string) | string | null; + style?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + }; + columnEnd: { + className?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + label: { + className?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + renderer?: ((context: ojDataGrid.LabelContext) => { + insert: HTMLElement | string; + } | void | null) | null; + style?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + }; + renderer?: ((context: ojDataGrid.HeaderContext) => { + insert: HTMLElement | string; + } | void | null) | null; + resizable: { + height: 'enable' | 'disable'; + width?: ((context: ojDataGrid.HeaderContext) => string) | string | null; + }; + style?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + }; + row: { + className?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + label: { + className?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + renderer?: ((context: ojDataGrid.LabelContext) => { + insert: HTMLElement | string; + } | void | null) | null; + style?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + }; + renderer?: ((context: ojDataGrid.HeaderContext) => { + insert: HTMLElement | string; + } | void | null) | null; + resizable: { + height?: ((context: ojDataGrid.HeaderContext) => string) | string | null; + width: 'enable' | 'disable'; + }; + sortable?: ((context: ojDataGrid.HeaderContext) => string) | string | null; + style?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + }; + rowEnd: { + className?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + label: { + className?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + renderer?: ((context: ojDataGrid.LabelContext) => { + insert: HTMLElement | string; + } | void | null) | null; + style?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + }; + renderer?: ((context: ojDataGrid.HeaderContext) => { + insert: HTMLElement | string; + } | void | null) | null; + resizable: { + height?: ((context: ojDataGrid.HeaderContext) => string) | string | null; + width: 'enable' | 'disable'; + }; + style?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + }; + }; + scrollPolicy: 'auto' | 'loadMoreOnScroll' | 'scroll'; + scrollPolicyOptions: { + maxColumnCount: number; + maxRowCount: number; + }; + scrollPosition: { + x?: number; + y?: number; + rowIndex?: number; + columnIndex?: number; + rowKey?: K; + columnKey?: K; + offsetX?: number; + offsetY?: number; + }; + selection: Array>; + selectionMode: { + cell: 'none' | 'single' | 'multiple'; + row: 'none' | 'single' | 'multiple'; + }; + translations: { + accessibleActionableMode?: string; + accessibleColumnContext?: string; + accessibleColumnEndHeaderContext?: string; + accessibleColumnHeaderContext?: string; + accessibleColumnSelected?: string; + accessibleColumnSpanContext?: string; + accessibleFirstColumn?: string; + accessibleFirstRow?: string; + accessibleLastColumn?: string; + accessibleLastRow?: string; + accessibleLevelContext?: string; + accessibleMultiCellSelected?: string; + accessibleNavigationMode?: string; + accessibleRangeSelectModeOff?: string; + accessibleRangeSelectModeOn?: string; + accessibleRowCollapsed?: string; + accessibleRowContext?: string; + accessibleRowEndHeaderContext?: string; + accessibleRowExpanded?: string; + accessibleRowHeaderContext?: string; + accessibleRowSelected?: string; + accessibleRowSpanContext?: string; + accessibleSelectionAffordanceBottom?: string; + accessibleSelectionAffordanceTop?: string; + accessibleSortAscending?: string; + accessibleSortDescending?: string; + accessibleStateSelected?: string; + accessibleSummaryEstimate?: string; + accessibleSummaryExact?: string; + accessibleSummaryExpanded?: string; + labelCut?: string; + labelDisableNonContiguous?: string; + labelEnableNonContiguous?: string; + labelPaste?: string; + labelResize?: string; + labelResizeDialogSubmit?: string; + labelResizeHeight?: string; + labelResizeWidth?: string; + labelSortCol?: string; + labelSortColAsc?: string; + labelSortColDsc?: string; + labelSortRow?: string; + labelSortRowAsc?: string; + labelSortRowDsc?: string; + msgFetchingData?: string; + msgNoData?: string; + }; + onBandingIntervalChanged: ((event: JetElementCustomEvent["bandingInterval"]>) => any) | null; + onCellChanged: ((event: JetElementCustomEvent["cell"]>) => any) | null; + onCurrentCellChanged: ((event: JetElementCustomEvent["currentCell"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onDndChanged: ((event: JetElementCustomEvent["dnd"]>) => any) | null; + onEditModeChanged: ((event: JetElementCustomEvent["editMode"]>) => any) | null; + onGridlinesChanged: ((event: JetElementCustomEvent["gridlines"]>) => any) | null; + onHeaderChanged: ((event: JetElementCustomEvent["header"]>) => any) | null; + onScrollPolicyChanged: ((event: JetElementCustomEvent["scrollPolicy"]>) => any) | null; + onScrollPolicyOptionsChanged: ((event: JetElementCustomEvent["scrollPolicyOptions"]>) => any) | null; + onScrollPositionChanged: ((event: JetElementCustomEvent["scrollPosition"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent["selectionMode"]>) => any) | null; + onOjBeforeCurrentCell: ((event: ojDataGrid.ojBeforeCurrentCell) => any) | null; + onOjBeforeEdit: ((event: ojDataGrid.ojBeforeEdit) => any) | null; + onOjBeforeEditEnd: ((event: ojDataGrid.ojBeforeEditEnd) => any) | null; + onOjResize: ((event: ojDataGrid.ojResize) => any) | null; + onOjScroll: ((event: ojDataGrid.ojScroll) => any) | null; + onOjSort: ((event: ojDataGrid.ojSort) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojDataGridEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojDataGrid[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojDataGridSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojDataGridSettablePropertiesLenient): void; + getContextByNode(node: Element): ojDataGrid.CellContext & { + subId: 'oj-datagrid-cell'; + } | ojDataGrid.HeaderContext & { + subId: 'oj-datagrid-header'; + } | ojDataGrid.LabelContext & { + subId: 'oj-datagrid-header-label'; + }; + refresh(): void; +} +export namespace ojDataGrid { + interface ojBeforeCurrentCell extends CustomEvent<{ + currentCell: CurrentCell; + previousCurrentCell: CurrentCell; + [propName: string]: any; + }> { + } + interface ojBeforeEdit extends CustomEvent<{ + cellContext: CellContext; + [propName: string]: any; + }> { + } + interface ojBeforeEditEnd extends CustomEvent<{ + cellContext: CellContext; + cancelEdit: boolean; + [propName: string]: any; + }> { + } + interface ojResize extends CustomEvent<{ + header: string | number; + oldDimensions: { + width: number; + height: number; + }; + newDimensions: { + width: number; + height: number; + }; + [propName: string]: any; + }> { + } + interface ojScroll extends CustomEvent<{ + scrollX: number; + scrollY: number; + [propName: string]: any; + }> { + } + interface ojSort extends CustomEvent<{ + header: any; + direction: 'ascending' | 'descending'; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type CellContext = { + componentElement: Element; + parentElement: Element; + cell: D; + data: D; + datasource: DataProvider | null; + indexes: { + row: number; + column: number; + }; + keys: { + row: K; + column: K; + }; + extents: { + row: number; + column: number; + }; + mode: 'edit' | 'navigation'; + }; + // tslint:disable-next-line interface-over-type-literal + type CurrentCell = { + type: 'cell' | 'header' | 'label'; + axis?: 'column' | 'columnEnd' | 'row' | 'rowEnd'; + index?: number; + level?: number; + key?: any; + indexes?: { + row: number; + column: number; + }; + keys?: { + row: K; + column: K; + }; + }; + // tslint:disable-next-line interface-over-type-literal + type HeaderContext = { + componentElement: Element; + parentElement: Element; + data: D; + datasource: DataProvider | null; + axis: 'column' | 'columnEnd' | 'row' | 'rowEnd'; + index: number; + key: K; + level: number; + extent: number; + depth: number; + }; + // tslint:disable-next-line interface-over-type-literal + type LabelContext = { + componentElement: Element; + parentElement: Element; + datasource: DataProvider | null; + axis: 'column' | 'columnEnd' | 'row' | 'rowEnd'; + key: K; + level: number; + }; + // tslint:disable-next-line interface-over-type-literal + type Selection = { + startIndex?: { + row: number; + column?: number; + }; + startKey?: { + row: K; + column?: K; + }; + endIndex?: { + row: number; + column?: number; + }; + endKey?: { + row: K; + column?: K; + }; + }; +} +export interface ojDataGridEventMap extends baseComponentEventMap> { + 'ojBeforeCurrentCell': ojDataGrid.ojBeforeCurrentCell; + 'ojBeforeEdit': ojDataGrid.ojBeforeEdit; + 'ojBeforeEditEnd': ojDataGrid.ojBeforeEditEnd; + 'ojResize': ojDataGrid.ojResize; + 'ojScroll': ojDataGrid.ojScroll; + 'ojSort': ojDataGrid.ojSort; + 'bandingIntervalChanged': JetElementCustomEvent["bandingInterval"]>; + 'cellChanged': JetElementCustomEvent["cell"]>; + 'currentCellChanged': JetElementCustomEvent["currentCell"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'dndChanged': JetElementCustomEvent["dnd"]>; + 'editModeChanged': JetElementCustomEvent["editMode"]>; + 'gridlinesChanged': JetElementCustomEvent["gridlines"]>; + 'headerChanged': JetElementCustomEvent["header"]>; + 'scrollPolicyChanged': JetElementCustomEvent["scrollPolicy"]>; + 'scrollPolicyOptionsChanged': JetElementCustomEvent["scrollPolicyOptions"]>; + 'scrollPositionChanged': JetElementCustomEvent["scrollPosition"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'selectionModeChanged': JetElementCustomEvent["selectionMode"]>; +} +export interface ojDataGridSettableProperties extends baseComponentSettableProperties { + bandingInterval: { + column: number; + row: number; + }; + cell: { + className?: ((context: ojDataGrid.CellContext) => string | void | null) | string | null; + renderer?: ((context: ojDataGrid.CellContext) => { + insert: HTMLElement | string; + } | void | null) | null; + style?: ((context: ojDataGrid.CellContext) => string | void | null) | string | null; + }; + currentCell: ojDataGrid.CurrentCell | null; + data: DataProvider | null; + dnd: { + reorder: { + row: 'enable' | 'disable'; + }; + }; + editMode: 'none' | 'cellNavigation' | 'cellEdit'; + gridlines: { + horizontal: 'visible' | 'hidden'; + vertical: 'visible' | 'hidden'; + }; + header: { + column: { + className?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + label: { + className?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + renderer?: ((context: ojDataGrid.LabelContext) => { + insert: HTMLElement | string; + } | void | null) | null; + style?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + }; + renderer?: ((context: ojDataGrid.HeaderContext) => { + insert: HTMLElement | string; + } | void | null) | null; + resizable: { + height: 'enable' | 'disable'; + width?: ((context: ojDataGrid.HeaderContext) => string) | string | null; + }; + sortable?: ((context: ojDataGrid.HeaderContext) => string) | string | null; + style?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + }; + columnEnd: { + className?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + label: { + className?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + renderer?: ((context: ojDataGrid.LabelContext) => { + insert: HTMLElement | string; + } | void | null) | null; + style?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + }; + renderer?: ((context: ojDataGrid.HeaderContext) => { + insert: HTMLElement | string; + } | void | null) | null; + resizable: { + height: 'enable' | 'disable'; + width?: ((context: ojDataGrid.HeaderContext) => string) | string | null; + }; + style?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + }; + row: { + className?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + label: { + className?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + renderer?: ((context: ojDataGrid.LabelContext) => { + insert: HTMLElement | string; + } | void | null) | null; + style?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + }; + renderer?: ((context: ojDataGrid.HeaderContext) => { + insert: HTMLElement | string; + } | void | null) | null; + resizable: { + height?: ((context: ojDataGrid.HeaderContext) => string) | string | null; + width: 'enable' | 'disable'; + }; + sortable?: ((context: ojDataGrid.HeaderContext) => string) | string | null; + style?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + }; + rowEnd: { + className?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + label: { + className?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + renderer?: ((context: ojDataGrid.LabelContext) => { + insert: HTMLElement | string; + } | void | null) | null; + style?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + }; + renderer?: ((context: ojDataGrid.HeaderContext) => { + insert: HTMLElement | string; + } | void | null) | null; + resizable: { + height?: ((context: ojDataGrid.HeaderContext) => string) | string | null; + width: 'enable' | 'disable'; + }; + style?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + }; + }; + scrollPolicy: 'auto' | 'loadMoreOnScroll' | 'scroll'; + scrollPolicyOptions: { + maxColumnCount: number; + maxRowCount: number; + }; + scrollPosition: { + x?: number; + y?: number; + rowIndex?: number; + columnIndex?: number; + rowKey?: K; + columnKey?: K; + offsetX?: number; + offsetY?: number; + }; + selection: Array>; + selectionMode: { + cell: 'none' | 'single' | 'multiple'; + row: 'none' | 'single' | 'multiple'; + }; + translations: { + accessibleActionableMode?: string; + accessibleColumnContext?: string; + accessibleColumnEndHeaderContext?: string; + accessibleColumnHeaderContext?: string; + accessibleColumnSelected?: string; + accessibleColumnSpanContext?: string; + accessibleFirstColumn?: string; + accessibleFirstRow?: string; + accessibleLastColumn?: string; + accessibleLastRow?: string; + accessibleLevelContext?: string; + accessibleMultiCellSelected?: string; + accessibleNavigationMode?: string; + accessibleRangeSelectModeOff?: string; + accessibleRangeSelectModeOn?: string; + accessibleRowCollapsed?: string; + accessibleRowContext?: string; + accessibleRowEndHeaderContext?: string; + accessibleRowExpanded?: string; + accessibleRowHeaderContext?: string; + accessibleRowSelected?: string; + accessibleRowSpanContext?: string; + accessibleSelectionAffordanceBottom?: string; + accessibleSelectionAffordanceTop?: string; + accessibleSortAscending?: string; + accessibleSortDescending?: string; + accessibleStateSelected?: string; + accessibleSummaryEstimate?: string; + accessibleSummaryExact?: string; + accessibleSummaryExpanded?: string; + labelCut?: string; + labelDisableNonContiguous?: string; + labelEnableNonContiguous?: string; + labelPaste?: string; + labelResize?: string; + labelResizeDialogSubmit?: string; + labelResizeHeight?: string; + labelResizeWidth?: string; + labelSortCol?: string; + labelSortColAsc?: string; + labelSortColDsc?: string; + labelSortRow?: string; + labelSortRowAsc?: string; + labelSortRowDsc?: string; + msgFetchingData?: string; + msgNoData?: string; + }; +} +export interface ojDataGridSettablePropertiesLenient extends Partial> { + [key: string]: any; +} diff --git a/types/oraclejet/ojdataprovider/index.d.ts b/types/oraclejet/ojdataprovider/index.d.ts new file mode 100644 index 0000000000..accc1f25bc --- /dev/null +++ b/types/oraclejet/ojdataprovider/index.d.ts @@ -0,0 +1,111 @@ +export interface AttributeFilterOperator { + attribute: string; + op: AttributeFilterOperator.AttributeOperator; + value: any; +} +export namespace AttributeFilterOperator { + type AttributeOperator = "$co" | "$eq" | "$ew" | "$pr" | "$gt" | "$ge" | "$lt" | "$le" | "$ne" | "$regex" | "$sw"; +} +export interface CompoundFilterOperator { + criteria: Array>; + op: CompoundFilterOperator.CompoundOperator; +} +export namespace CompoundFilterOperator { + type CompoundOperator = "$and" | "$or"; +} +export interface ContainsKeysResults { + containsParameters: FetchByKeysParameters; + results: Set; +} +export interface DataMapping { + mapFields: (item: Item) => Item; + mapFilterCriterion?: (filterCriterion: Array>) => Array>; + mapSortCriteria?: (sortCriteria: Array>) => Array>; + unmapSortCriteria?: (sortCriteria: Array>) => Array>; +} +export interface DataProvider extends EventTarget { + containsKeys(parameters: FetchByKeysParameters): Promise>; + fetchByKeys(parameters: FetchByKeysParameters): Promise>; + fetchByOffset(parameters: FetchByOffsetParameters): Promise>; + fetchFirst(parameters?: FetchListParameters): AsyncIterable>; + getCapability(capabilityName: string): any; + getTotalSize(): Promise; + isEmpty(): 'yes' | 'no' | 'unknown'; +} +export interface DataProviderAddOperationEventDetail extends DataProviderOperationEventDetail { + addBeforeKeys?: K[]; + parentKeys?: K[]; +} +export interface DataProviderMutationEventDetail { + add?: DataProviderAddOperationEventDetail; + remove?: DataProviderOperationEventDetail; + update?: DataProviderOperationEventDetail; +} +export interface DataProviderOperationEventDetail { + data?: D[]; + indexes?: number[]; + keys: Set; + metadata?: Array>; +} +export interface FetchByKeysCapability { + implementation: 'iteration' | 'lookup'; +} +export namespace FetchByKeysMixin { + function applyMixin(derivedCtor: { + new (): DataProvider; + }): any; +} +export interface FetchByKeysParameters { + keys: Set; +} +export interface FetchByKeysResults { + fetchParameters: FetchByKeysParameters; + results: Map>; +} +export interface FetchByOffsetCapability { + implementation: 'iteration' | 'randomAccess'; +} +export namespace FetchByOffsetMixin { + function applyMixin(derivedCtor: { + new (): DataProvider; + }): any; +} +export interface FetchByOffsetParameters extends FetchListParameters { + offset: number; +} +export interface FetchByOffsetResults { + done: boolean; + fetchParameters: FetchByOffsetParameters; + results: Array>; +} +export interface FetchListParameters { + filterCriterion?: FilterOperator; + size: number; + sortCriteria?: Array>; +} +export interface FetchListResult { + data: D[]; + fetchParameters: FetchListParameters; + metadata: Array>; +} +export interface FilterCapability { + operators: string[]; +} +export interface FilterOperator { + op: AttributeFilterOperator.AttributeOperator | CompoundFilterOperator.CompoundOperator; + filter(data: any[]): any[]; +} +export interface Item { + data: D; + metadata: ItemMetadata; +} +export interface ItemMetadata { + key: K; +} +export interface SortCapability { + attributes: 'none' | 'single' | 'multiple'; +} +export interface SortCriterion { + attribute: keyof D; + direction: string; +} diff --git a/types/oraclejet/ojdatetimepicker/index.d.ts b/types/oraclejet/ojdatetimepicker/index.d.ts new file mode 100644 index 0000000000..914dd06df7 --- /dev/null +++ b/types/oraclejet/ojdatetimepicker/index.d.ts @@ -0,0 +1,639 @@ +import { Converter, Validator, Validation } from '../ojvalidation-base'; +import { inputBase, inputBaseEventMap, inputBaseSettableProperties } from '../ojinputtext'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojDatePicker extends ojInputDate { + keyboardEdit: 'disabled'; + max: string | null; + min: string | null; + renderMode: 'jet'; + value: string; + onMaxChanged: ((event: JetElementCustomEvent) => any) | null; + onMinChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojDatePicker.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojDatePicker.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojDatePickerEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojDatePicker[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojDatePickerSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojDatePickerSettablePropertiesLenient): void; +} +export namespace ojDatePicker { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojDatePickerEventMap extends ojInputDateEventMap { + 'ojAnimateEnd': ojDatePicker.ojAnimateEnd; + 'ojAnimateStart': ojDatePicker.ojAnimateStart; + 'maxChanged': JetElementCustomEvent; + 'minChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojDatePickerSettableProperties extends ojInputDateSettableProperties { + keyboardEdit: 'disabled'; + max: string | null; + min: string | null; + renderMode: 'jet'; + value: string; +} +export interface ojDatePickerSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojDateTimePicker extends ojInputDateTime { + keyboardEdit: 'disabled'; + max: string | null; + min: string | null; + renderMode: 'jet'; + value: string; + onMaxChanged: ((event: JetElementCustomEvent) => any) | null; + onMinChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojDateTimePicker.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojDateTimePicker.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojDateTimePickerEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojDateTimePicker[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojDateTimePickerSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojDateTimePickerSettablePropertiesLenient): void; +} +export namespace ojDateTimePicker { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojDateTimePickerEventMap extends ojInputDateTimeEventMap { + 'ojAnimateEnd': ojDateTimePicker.ojAnimateEnd; + 'ojAnimateStart': ojDateTimePicker.ojAnimateStart; + 'maxChanged': JetElementCustomEvent; + 'minChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojDateTimePickerSettableProperties extends ojInputDateTimeSettableProperties { + keyboardEdit: 'disabled'; + max: string | null; + min: string | null; + renderMode: 'jet'; + value: string; +} +export interface ojDateTimePickerSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojInputDate extends inputBase { + converter: Converter | Validation.RegisteredConverter; + datePicker: { + changeMonth: 'select' | 'none'; + changeYear: 'select' | 'none'; + currentMonthPos: number; + daysOutsideMonth: 'hidden' | 'visible' | 'selectable'; + footerLayout: '' | 'today'; + numberOfMonths: number; + showOn: 'focus' | 'image'; + stepBigMonths: number; + stepMonths: 'numberOfMonths' | number; + weekDisplay: 'number' | 'none'; + yearRange: string; + }; + dayFormatter: (param: ojInputDate.DayFormatterInput) => (null | 'all' | ojInputDate.DayFormatterOutput); + dayMetaData: { + [key: string]: { + [key: string]: { + [key: string]: { + disabled?: boolean; + className?: string; + tooltip?: string; + }; + }; + }; + }; + keyboardEdit: 'enabled' | 'disabled'; + max: string | null; + min: string | null; + pickerAttributes: { + style?: string; + class?: string; + }; + renderMode: 'jet' | 'native'; + validators: Array | Validation.RegisteredValidator> | null; + value: string; + translations: { + currentText?: string; + dateRestriction?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + dateTimeRange?: { + hint?: { + inRange?: string; + max?: string; + min?: string; + }; + messageDetail?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + messageSummary?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + }; + nextText?: string; + prevText?: string; + regexp?: { + messageDetail?: string; + messageSummary?: string; + }; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + tooltipCalendar?: string; + tooltipCalendarDisabled?: string; + tooltipCalendarTime?: string; + tooltipCalendarTimeDisabled?: string; + weekHeader?: string; + }; + onConverterChanged: ((event: JetElementCustomEvent["converter"]>) => any) | null; + onDatePickerChanged: ((event: JetElementCustomEvent["datePicker"]>) => any) | null; + onDayFormatterChanged: ((event: JetElementCustomEvent["dayFormatter"]>) => any) | null; + onDayMetaDataChanged: ((event: JetElementCustomEvent["dayMetaData"]>) => any) | null; + onKeyboardEditChanged: ((event: JetElementCustomEvent["keyboardEdit"]>) => any) | null; + onMaxChanged: ((event: JetElementCustomEvent["max"]>) => any) | null; + onMinChanged: ((event: JetElementCustomEvent["min"]>) => any) | null; + onPickerAttributesChanged: ((event: JetElementCustomEvent["pickerAttributes"]>) => any) | null; + onRenderModeChanged: ((event: JetElementCustomEvent["renderMode"]>) => any) | null; + onValidatorsChanged: ((event: JetElementCustomEvent["validators"]>) => any) | null; + onValueChanged: ((event: JetElementCustomEvent["value"]>) => any) | null; + onOjAnimateEnd: ((event: ojInputDate.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojInputDate.ojAnimateStart) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojInputDateEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojInputDate[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojInputDateSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojInputDateSettablePropertiesLenient): void; + hide(): void; + refresh(): void; + show(): void; +} +export namespace ojInputDate { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type DayFormatterInput = { + fullYear: number; + month: number; + date: number; + }; + // tslint:disable-next-line interface-over-type-literal + type DayFormatterOutput = { + disabled?: boolean; + className?: string; + tooltip?: string; + }; +} +export interface ojInputDateEventMap extends inputBaseEventMap { + 'ojAnimateEnd': ojInputDate.ojAnimateEnd; + 'ojAnimateStart': ojInputDate.ojAnimateStart; + 'converterChanged': JetElementCustomEvent["converter"]>; + 'datePickerChanged': JetElementCustomEvent["datePicker"]>; + 'dayFormatterChanged': JetElementCustomEvent["dayFormatter"]>; + 'dayMetaDataChanged': JetElementCustomEvent["dayMetaData"]>; + 'keyboardEditChanged': JetElementCustomEvent["keyboardEdit"]>; + 'maxChanged': JetElementCustomEvent["max"]>; + 'minChanged': JetElementCustomEvent["min"]>; + 'pickerAttributesChanged': JetElementCustomEvent["pickerAttributes"]>; + 'renderModeChanged': JetElementCustomEvent["renderMode"]>; + 'validatorsChanged': JetElementCustomEvent["validators"]>; + 'valueChanged': JetElementCustomEvent["value"]>; +} +export interface ojInputDateSettableProperties extends inputBaseSettableProperties { + converter: Converter | Validation.RegisteredConverter; + datePicker: { + changeMonth: 'select' | 'none'; + changeYear: 'select' | 'none'; + currentMonthPos: number; + daysOutsideMonth: 'hidden' | 'visible' | 'selectable'; + footerLayout: '' | 'today'; + numberOfMonths: number; + showOn: 'focus' | 'image'; + stepBigMonths: number; + stepMonths: 'numberOfMonths' | number; + weekDisplay: 'number' | 'none'; + yearRange: string; + }; + dayFormatter: (param: ojInputDate.DayFormatterInput) => (null | 'all' | ojInputDate.DayFormatterOutput); + dayMetaData: { + [key: string]: { + [key: string]: { + [key: string]: { + disabled?: boolean; + className?: string; + tooltip?: string; + }; + }; + }; + }; + keyboardEdit: 'enabled' | 'disabled'; + max: string | null; + min: string | null; + pickerAttributes: { + style?: string; + class?: string; + }; + renderMode: 'jet' | 'native'; + validators: Array | Validation.RegisteredValidator> | null; + value: string; + translations: { + currentText?: string; + dateRestriction?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + dateTimeRange?: { + hint?: { + inRange?: string; + max?: string; + min?: string; + }; + messageDetail?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + messageSummary?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + }; + nextText?: string; + prevText?: string; + regexp?: { + messageDetail?: string; + messageSummary?: string; + }; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + tooltipCalendar?: string; + tooltipCalendarDisabled?: string; + tooltipCalendarTime?: string; + tooltipCalendarTimeDisabled?: string; + weekHeader?: string; + }; +} +export interface ojInputDateSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojInputDateTime extends ojInputDate { + converter: Converter | Validation.RegisteredConverter; + max: string | null; + min: string | null; + renderMode: 'jet' | 'native'; + timePicker: { + footerLayout: '' | 'now'; + showOn: 'focus' | 'image'; + timeIncrement: string; + }; + validators: Array | Validation.RegisteredValidator> | null; + value: string; + translations: { + cancel?: string; + currentText?: string; + dateRestriction?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + dateTimeRange?: { + hint?: { + inRange?: string; + max?: string; + min?: string; + }; + messageDetail?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + messageSummary?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + }; + done?: string; + nextText?: string; + prevText?: string; + regexp?: { + messageDetail?: string; + messageSummary?: string; + }; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + tooltipCalendar?: string; + tooltipCalendarDisabled?: string; + tooltipCalendarTime?: string; + tooltipCalendarTimeDisabled?: string; + weekHeader?: string; + }; + onConverterChanged: ((event: JetElementCustomEvent["converter"]>) => any) | null; + onMaxChanged: ((event: JetElementCustomEvent["max"]>) => any) | null; + onMinChanged: ((event: JetElementCustomEvent["min"]>) => any) | null; + onRenderModeChanged: ((event: JetElementCustomEvent["renderMode"]>) => any) | null; + onTimePickerChanged: ((event: JetElementCustomEvent["timePicker"]>) => any) | null; + onValidatorsChanged: ((event: JetElementCustomEvent["validators"]>) => any) | null; + onValueChanged: ((event: JetElementCustomEvent["value"]>) => any) | null; + onOjAnimateEnd: ((event: ojInputDateTime.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojInputDateTime.ojAnimateStart) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojInputDateTimeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojInputDateTime[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojInputDateTimeSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojInputDateTimeSettablePropertiesLenient): void; + hideTimePicker(): void; + show(): void; + showTimePicker(): void; +} +export namespace ojInputDateTime { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojInputDateTimeEventMap extends ojInputDateEventMap { + 'ojAnimateEnd': ojInputDateTime.ojAnimateEnd; + 'ojAnimateStart': ojInputDateTime.ojAnimateStart; + 'converterChanged': JetElementCustomEvent["converter"]>; + 'maxChanged': JetElementCustomEvent["max"]>; + 'minChanged': JetElementCustomEvent["min"]>; + 'renderModeChanged': JetElementCustomEvent["renderMode"]>; + 'timePickerChanged': JetElementCustomEvent["timePicker"]>; + 'validatorsChanged': JetElementCustomEvent["validators"]>; + 'valueChanged': JetElementCustomEvent["value"]>; +} +export interface ojInputDateTimeSettableProperties extends ojInputDateSettableProperties { + converter: Converter | Validation.RegisteredConverter; + max: string | null; + min: string | null; + renderMode: 'jet' | 'native'; + timePicker: { + footerLayout: '' | 'now'; + showOn: 'focus' | 'image'; + timeIncrement: string; + }; + validators: Array | Validation.RegisteredValidator> | null; + value: string; + translations: { + cancel?: string; + currentText?: string; + dateRestriction?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + dateTimeRange?: { + hint?: { + inRange?: string; + max?: string; + min?: string; + }; + messageDetail?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + messageSummary?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + }; + done?: string; + nextText?: string; + prevText?: string; + regexp?: { + messageDetail?: string; + messageSummary?: string; + }; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + tooltipCalendar?: string; + tooltipCalendarDisabled?: string; + tooltipCalendarTime?: string; + tooltipCalendarTimeDisabled?: string; + weekHeader?: string; + }; +} +export interface ojInputDateTimeSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojInputTime extends inputBase { + converter: Converter | Validation.RegisteredConverter; + keyboardEdit: 'enabled' | 'disabled'; + max: string | null; + min: string | null; + pickerAttributes: { + style?: string; + class?: string; + }; + renderMode: 'jet' | 'native'; + timePicker: { + footerLayout: '' | 'now'; + showOn: 'focus' | 'image'; + timeIncrement: string; + }; + validators: Array | Validation.RegisteredValidator> | null; + value: string; + translations: { + ampmWheelLabel?: string; + cancelText?: string; + currentTimeText?: string; + dateTimeRange?: { + hint?: { + inRange?: string; + max?: string; + min?: string; + }; + messageDetail?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + messageSummary?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + }; + hourWheelLabel?: string; + minuteWheelLabel?: string; + okText?: string; + regexp?: { + messageDetail?: string; + messageSummary?: string; + }; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + tooltipTime?: string; + tooltipTimeDisabled?: string; + }; + onConverterChanged: ((event: JetElementCustomEvent) => any) | null; + onKeyboardEditChanged: ((event: JetElementCustomEvent) => any) | null; + onMaxChanged: ((event: JetElementCustomEvent) => any) | null; + onMinChanged: ((event: JetElementCustomEvent) => any) | null; + onPickerAttributesChanged: ((event: JetElementCustomEvent) => any) | null; + onRenderModeChanged: ((event: JetElementCustomEvent) => any) | null; + onTimePickerChanged: ((event: JetElementCustomEvent) => any) | null; + onValidatorsChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojInputTime.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojInputTime.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputTimeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojInputTime[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojInputTimeSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojInputTimeSettablePropertiesLenient): void; + hide(): void; + refresh(): void; + show(): void; +} +export namespace ojInputTime { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojInputTimeEventMap extends inputBaseEventMap { + 'ojAnimateEnd': ojInputTime.ojAnimateEnd; + 'ojAnimateStart': ojInputTime.ojAnimateStart; + 'converterChanged': JetElementCustomEvent; + 'keyboardEditChanged': JetElementCustomEvent; + 'maxChanged': JetElementCustomEvent; + 'minChanged': JetElementCustomEvent; + 'pickerAttributesChanged': JetElementCustomEvent; + 'renderModeChanged': JetElementCustomEvent; + 'timePickerChanged': JetElementCustomEvent; + 'validatorsChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojInputTimeSettableProperties extends inputBaseSettableProperties { + converter: Converter | Validation.RegisteredConverter; + keyboardEdit: 'enabled' | 'disabled'; + max: string | null; + min: string | null; + pickerAttributes: { + style?: string; + class?: string; + }; + renderMode: 'jet' | 'native'; + timePicker: { + footerLayout: '' | 'now'; + showOn: 'focus' | 'image'; + timeIncrement: string; + }; + validators: Array | Validation.RegisteredValidator> | null; + value: string; + translations: { + ampmWheelLabel?: string; + cancelText?: string; + currentTimeText?: string; + dateTimeRange?: { + hint?: { + inRange?: string; + max?: string; + min?: string; + }; + messageDetail?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + messageSummary?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + }; + hourWheelLabel?: string; + minuteWheelLabel?: string; + okText?: string; + regexp?: { + messageDetail?: string; + messageSummary?: string; + }; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + tooltipTime?: string; + tooltipTimeDisabled?: string; + }; +} +export interface ojInputTimeSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojdefer/index.d.ts b/types/oraclejet/ojdefer/index.d.ts new file mode 100644 index 0000000000..03eefbd714 --- /dev/null +++ b/types/oraclejet/ojdefer/index.d.ts @@ -0,0 +1,21 @@ +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojDefer extends JetElement { + addEventListener(type: T, listener: (this: HTMLElement, ev: ojDeferEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojDefer[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojDeferSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojDeferSettablePropertiesLenient): void; +} +// These interfaces are empty but required to keep the event chain intact. Avoid lint-rule +// tslint:disable-next-line no-empty-interface +export interface ojDeferEventMap extends HTMLElementEventMap { +} +// These interfaces are empty but required to keep the component chain intact. Avoid lint-rule +// tslint:disable-next-line no-empty-interface +export interface ojDeferSettableProperties extends JetSettableProperties { +} +export interface ojDeferSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojdeferreddataprovider/index.d.ts b/types/oraclejet/ojdeferreddataprovider/index.d.ts new file mode 100644 index 0000000000..e2332cac46 --- /dev/null +++ b/types/oraclejet/ojdeferreddataprovider/index.d.ts @@ -0,0 +1,16 @@ +import { DataProvider, SortCriterion, FetchByKeysParameters, ContainsKeysResults, FetchByKeysResults, FetchByOffsetParameters, FetchByOffsetResults, FetchListResult, + FetchListParameters } from '../ojdataprovider'; +declare class DeferredDataProvider implements DataProvider { + constructor(dataProvider: Promise>, capabilityFunc: (capabilityName: string) => any); + addEventListener(eventType: string, listener: EventListener): any; + containsKeys(params: FetchByKeysParameters): Promise>; + dispatchEvent(evt: Event): boolean; + fetchByKeys(params: FetchByKeysParameters): Promise>; + fetchByOffset(params: FetchByOffsetParameters): Promise>; + fetchFirst(params?: FetchListParameters): AsyncIterable>; + getCapability(capabilityName: string): object; + getTotalSize(): Promise; + isEmpty(): 'yes' | 'no' | 'unknown'; + removeEventListener(eventType: string, listener: EventListener): any; +} +export = DeferredDataProvider; diff --git a/types/oraclejet/ojdiagram/index.d.ts b/types/oraclejet/ojdiagram/index.d.ts new file mode 100644 index 0000000000..db79f4b2be --- /dev/null +++ b/types/oraclejet/ojdiagram/index.d.ts @@ -0,0 +1,790 @@ +import { KeySet } from '../ojkeyset'; +import { DataProvider } from '../ojdataprovider'; +import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface DvtDiagramLayoutContext { + getCommonContainer(nodeId1: any, nodeId2: any): any; + getComponentSize(): { + x: number; + y: number; + w: number; + h: number; + }; + getCurrentViewport(): { + x: number; + y: number; + w: number; + h: number; + }; + getEventData(): object; + getLinkById(id: any): DvtDiagramLayoutContextLink; + getLinkByIndex(index: number): DvtDiagramLayoutContextLink; + getLinkCount(): number; + getNodeById(id: any): DvtDiagramLayoutContextNode; + getNodeByIndex(index: number): DvtDiagramLayoutContextNode; + getNodeCount(): number; + getViewport(): { + x: number; + y: number; + w: number; + h: number; + }; + isLocaleR2L(): boolean; + setViewport(viewport: { + x: number; + y: number; + w: number; + h: number; + }): void; +} +export interface DvtDiagramLayoutContextLink { + getCoordinateSpace(): any; + getData(): object | any[]; + getEndConnectorOffset(): number; + getEndId(): any; + getId(): any; + getLabelBounds(): { + x: number; + y: number; + w: number; + h: number; + }; + getLabelHalign(): 'left' | 'center' | 'right'; + getLabelPosition(): { + x: number; + y: number; + }; + getLabelRotationAngle(): number; + getLabelRotationPoint(): { + x: number; + y: number; + }; + getLabelValign(): 'top' | 'middle' | 'bottom' | 'baseline'; + getLinkWidth(): number; + getPoints(): any[]; + getSelected(): boolean; + getStartConnectorOffset(): number; + getStartId(): any; + isPromoted(): boolean; + setCoordinateSpace(containerId: any): void; + setLabelHalign(halign: 'left' | 'center' | 'right'): void; + setLabelPosition(pos: { + x: number; + y: number; + }): void; + setLabelRotationAngle(angle: number): void; + setLabelRotationPoint(point: { + x: number; + y: number; + }): void; + setLabelValign(valign: 'top' | 'middle' | 'bottom' | 'baseline'): void; + setPoints(points: any[]): void; +} +export interface DvtDiagramLayoutContextNode { + getBounds(): { + x: number; + y: number; + w: number; + h: number; + }; + getChildNodes(): any[]; + getContentBounds(): { + x: number; + y: number; + w: number; + h: number; + }; + getData(): object; + getId(): any; + getLabelBounds(): { + x: number; + y: number; + w: number; + h: number; + }; + getLabelHalign(): 'left' | 'center' | 'right'; + getLabelPosition(): { + x: number; + y: number; + }; + getLabelRotationAngle(): number; + getLabelRotationPoint(): { + x: number; + y: number; + }; + getLabelValign(): 'top' | 'middle' | 'bottom' | 'baseline'; + getPosition(): { + x: number; + y: number; + }; + getRelativePosition(containerId: any): { + x: number; + y: number; + }; + getSelected(): boolean; + isDisclosed(): boolean; + setLabelHalign(halign: 'left' | 'center' | 'right'): void; + setLabelPosition(pos: { + x: number; + y: number; + }): void; + setLabelRotationAngle(angle: number): void; + setLabelRotationPoint(point: { + x: number; + y: number; + }): void; + setLabelValign(valign: 'top' | 'middle' | 'bottom' | 'baseline'): void; + setPosition(pos: { + x: number; + y: number; + }): void; +} +export interface ojDiagram extends dvtBaseComponent> { + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + as: string; + dnd: { + drag: { + nodes: { + dataTypes: string | string[]; + drag: ((param0: Event) => void); + dragEnd: ((param0: Event) => void); + dragStart: ((param0: Event, param1: object) => void); + }; + ports: { + dataTypes: string | string[]; + drag: ((param0: Event) => void); + dragEnd: ((param0: Event) => void); + dragStart: ((param0: Event, param1: object) => void); + linkStyle: ((param0: object) => void); + selector: string; + }; + }; + drop: { + background: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + links: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + nodes: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + ports: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + selector: string; + }; + }; + }; + expanded: KeySet; + focusRenderer: ((context: ojDiagram.RendererContext) => { + insert: SVGElement; + } | void) | null; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + hoverRenderer: ((context: ojDiagram.RendererContext) => { + insert: SVGElement; + } | void) | null; + layout: ((param0: DvtDiagramLayoutContext) => void); + linkData: DataProvider | null; + linkHighlightMode: 'linkAndNodes' | 'link'; + maxZoom: number; + minZoom: number; + nodeData: DataProvider | null; + nodeHighlightMode: 'nodeAndIncomingLinks' | 'nodeAndOutgoingLinks' | 'nodeAndLinks' | 'node'; + overview: { + halign: 'start' | 'end' | 'center'; + height: number; + rendered: 'on' | 'off'; + valign: 'top' | 'bottom' | 'middle'; + width: number; + }; + panDirection: 'x' | 'y' | 'auto'; + panning: 'auto' | 'none'; + promotedLinkBehavior: 'none' | 'full' | 'lazy'; + renderer: ((context: ojDiagram.RendererContext) => ({ + insert: SVGElement; + })); + selection: Array; + selectionMode: 'single' | 'multiple' | 'none'; + selectionRenderer: ((context: ojDiagram.RendererContext) => { + insert: SVGElement; + } | void) | null; + styleDefaults: { + animationDuration: number; + hoverBehaviorDelay: number; + linkDefaults: { + color: string; + endConnectorType: 'arrowOpen' | 'arrow' | 'arrowConcave' | 'circle' | 'rectangle' | 'rectangleRounded' | 'none'; + labelStyle: object; + startConnectorType: 'arrowOpen' | 'arrow' | 'arrowConcave' | 'circle' | 'rectangle' | 'rectangleRounded' | 'none'; + svgClassName: string; + svgStyle: object; + width: number; + }; + nodeDefaults: { + icon: { + borderColor: string; + borderRadius: string; + borderWidth: number; + color: string; + height: number; + pattern: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + source: string; + sourceHover: string; + sourceHoverSelected: string; + sourceSelected: string; + svgClassName: string; + svgStyle: object; + width: number; + }; + labelStyle: object; + showDisclosure: 'off' | 'on'; + }; + promotedLink: { + color: string; + endConnectorType: 'arrowOpen' | 'arrow' | 'arrowConcave' | 'circle' | 'rectangle' | 'rectangleRounded' | 'none'; + startConnectorType: 'arrowOpen' | 'arrow' | 'arrowConcave' | 'circle' | 'rectangle' | 'rectangleRounded' | 'none'; + svgClassName: string; + svgStyle: object; + width: number; + }; + }; + tooltip: { + renderer: ((context: ojDiagram.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + touchResponse: 'touchStart' | 'auto'; + zoomRenderer: ((context: ojDiagram.RendererContext) => { + insert: SVGElement; + } | void) | null; + zooming: 'auto' | 'none'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + promotedLink?: string; + promotedLinkAriaDesc?: string; + promotedLinks?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; + onAnimationOnDataChangeChanged: ((event: JetElementCustomEvent["animationOnDataChange"]>) => any) | null; + onAnimationOnDisplayChanged: ((event: JetElementCustomEvent["animationOnDisplay"]>) => any) | null; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onDndChanged: ((event: JetElementCustomEvent["dnd"]>) => any) | null; + onExpandedChanged: ((event: JetElementCustomEvent["expanded"]>) => any) | null; + onFocusRendererChanged: ((event: JetElementCustomEvent["focusRenderer"]>) => any) | null; + onHiddenCategoriesChanged: ((event: JetElementCustomEvent["hiddenCategories"]>) => any) | null; + onHighlightMatchChanged: ((event: JetElementCustomEvent["highlightMatch"]>) => any) | null; + onHighlightedCategoriesChanged: ((event: JetElementCustomEvent["highlightedCategories"]>) => any) | null; + onHoverBehaviorChanged: ((event: JetElementCustomEvent["hoverBehavior"]>) => any) | null; + onHoverRendererChanged: ((event: JetElementCustomEvent["hoverRenderer"]>) => any) | null; + onLayoutChanged: ((event: JetElementCustomEvent["layout"]>) => any) | null; + onLinkDataChanged: ((event: JetElementCustomEvent["linkData"]>) => any) | null; + onLinkHighlightModeChanged: ((event: JetElementCustomEvent["linkHighlightMode"]>) => any) | null; + onMaxZoomChanged: ((event: JetElementCustomEvent["maxZoom"]>) => any) | null; + onMinZoomChanged: ((event: JetElementCustomEvent["minZoom"]>) => any) | null; + onNodeDataChanged: ((event: JetElementCustomEvent["nodeData"]>) => any) | null; + onNodeHighlightModeChanged: ((event: JetElementCustomEvent["nodeHighlightMode"]>) => any) | null; + onOverviewChanged: ((event: JetElementCustomEvent["overview"]>) => any) | null; + onPanDirectionChanged: ((event: JetElementCustomEvent["panDirection"]>) => any) | null; + onPanningChanged: ((event: JetElementCustomEvent["panning"]>) => any) | null; + onPromotedLinkBehaviorChanged: ((event: JetElementCustomEvent["promotedLinkBehavior"]>) => any) | null; + onRendererChanged: ((event: JetElementCustomEvent["renderer"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent["selectionMode"]>) => any) | null; + onSelectionRendererChanged: ((event: JetElementCustomEvent["selectionRenderer"]>) => any) | null; + onStyleDefaultsChanged: ((event: JetElementCustomEvent["styleDefaults"]>) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent["tooltip"]>) => any) | null; + onTouchResponseChanged: ((event: JetElementCustomEvent["touchResponse"]>) => any) | null; + onZoomRendererChanged: ((event: JetElementCustomEvent["zoomRenderer"]>) => any) | null; + onZoomingChanged: ((event: JetElementCustomEvent["zooming"]>) => any) | null; + onOjBeforeCollapse: ((event: ojDiagram.ojBeforeCollapse) => any) | null; + onOjBeforeExpand: ((event: ojDiagram.ojBeforeExpand) => any) | null; + onOjCollapse: ((event: ojDiagram.ojCollapse) => any) | null; + onOjExpand: ((event: ojDiagram.ojExpand) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojDiagramEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojDiagram[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojDiagramSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojDiagramSettablePropertiesLenient): void; + getContextByNode(node: Element): object | null; + getLink(linkIndex: number): object | null; + getLinkCount(): number; + getNode(nodeIndex: number): object | null; + getNodeCount(): number; + getPromotedLink(startNodeIndex: number, endNodeIndex: number): object | null; +} +export namespace ojDiagram { + interface ojBeforeCollapse extends CustomEvent<{ + nodeId: any; + [propName: string]: any; + }> { + } + interface ojBeforeExpand extends CustomEvent<{ + nodeId: any; + [propName: string]: any; + }> { + } + interface ojCollapse extends CustomEvent<{ + nodeId: any; + [propName: string]: any; + }> { + } + interface ojExpand extends CustomEvent<{ + nodeId: any; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type RendererContext = { + parentElement: Element; + componentElement: Element; + data: object; + itemData: D1; + content: { + element: Element; + width: number; + height: number; + }; + state: { + hovered: boolean; + selected: boolean; + focused: boolean; + expanded: boolean; + zoom: number; + }; + previousState: { + hovered: boolean; + selected: boolean; + focused: boolean; + expanded: boolean; + zoom: number; + }; + id: K1; + type: string; + renderDefaultFocus: (() => void); + renderDefaultHover: (() => void); + renderDefaultSelection: (() => void); + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + parentElement: Element; + componentElement: Element; + id: K1 | K2; + type: string; + label: string; + data: object | object[]; + itemData: D1 | D2 | D2[]; + }; +} +export interface ojDiagramEventMap extends dvtBaseComponentEventMap> { + 'ojBeforeCollapse': ojDiagram.ojBeforeCollapse; + 'ojBeforeExpand': ojDiagram.ojBeforeExpand; + 'ojCollapse': ojDiagram.ojCollapse; + 'ojExpand': ojDiagram.ojExpand; + 'animationOnDataChangeChanged': JetElementCustomEvent["animationOnDataChange"]>; + 'animationOnDisplayChanged': JetElementCustomEvent["animationOnDisplay"]>; + 'asChanged': JetElementCustomEvent["as"]>; + 'dndChanged': JetElementCustomEvent["dnd"]>; + 'expandedChanged': JetElementCustomEvent["expanded"]>; + 'focusRendererChanged': JetElementCustomEvent["focusRenderer"]>; + 'hiddenCategoriesChanged': JetElementCustomEvent["hiddenCategories"]>; + 'highlightMatchChanged': JetElementCustomEvent["highlightMatch"]>; + 'highlightedCategoriesChanged': JetElementCustomEvent["highlightedCategories"]>; + 'hoverBehaviorChanged': JetElementCustomEvent["hoverBehavior"]>; + 'hoverRendererChanged': JetElementCustomEvent["hoverRenderer"]>; + 'layoutChanged': JetElementCustomEvent["layout"]>; + 'linkDataChanged': JetElementCustomEvent["linkData"]>; + 'linkHighlightModeChanged': JetElementCustomEvent["linkHighlightMode"]>; + 'maxZoomChanged': JetElementCustomEvent["maxZoom"]>; + 'minZoomChanged': JetElementCustomEvent["minZoom"]>; + 'nodeDataChanged': JetElementCustomEvent["nodeData"]>; + 'nodeHighlightModeChanged': JetElementCustomEvent["nodeHighlightMode"]>; + 'overviewChanged': JetElementCustomEvent["overview"]>; + 'panDirectionChanged': JetElementCustomEvent["panDirection"]>; + 'panningChanged': JetElementCustomEvent["panning"]>; + 'promotedLinkBehaviorChanged': JetElementCustomEvent["promotedLinkBehavior"]>; + 'rendererChanged': JetElementCustomEvent["renderer"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'selectionModeChanged': JetElementCustomEvent["selectionMode"]>; + 'selectionRendererChanged': JetElementCustomEvent["selectionRenderer"]>; + 'styleDefaultsChanged': JetElementCustomEvent["styleDefaults"]>; + 'tooltipChanged': JetElementCustomEvent["tooltip"]>; + 'touchResponseChanged': JetElementCustomEvent["touchResponse"]>; + 'zoomRendererChanged': JetElementCustomEvent["zoomRenderer"]>; + 'zoomingChanged': JetElementCustomEvent["zooming"]>; +} +export interface ojDiagramSettableProperties extends dvtBaseComponentSettableProperties { + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + as: string; + dnd: { + drag: { + nodes: { + dataTypes: string | string[]; + drag: ((param0: Event) => void); + dragEnd: ((param0: Event) => void); + dragStart: ((param0: Event, param1: object) => void); + }; + ports: { + dataTypes: string | string[]; + drag: ((param0: Event) => void); + dragEnd: ((param0: Event) => void); + dragStart: ((param0: Event, param1: object) => void); + linkStyle: ((param0: object) => void); + selector: string; + }; + }; + drop: { + background: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + links: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + nodes: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + ports: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + selector: string; + }; + }; + }; + expanded: KeySet; + focusRenderer: ((context: ojDiagram.RendererContext) => { + insert: SVGElement; + } | void) | null; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + hoverRenderer: ((context: ojDiagram.RendererContext) => { + insert: SVGElement; + } | void) | null; + layout: ((param0: DvtDiagramLayoutContext) => void); + linkData: DataProvider | null; + linkHighlightMode: 'linkAndNodes' | 'link'; + maxZoom: number; + minZoom: number; + nodeData: DataProvider | null; + nodeHighlightMode: 'nodeAndIncomingLinks' | 'nodeAndOutgoingLinks' | 'nodeAndLinks' | 'node'; + overview: { + halign: 'start' | 'end' | 'center'; + height: number; + rendered: 'on' | 'off'; + valign: 'top' | 'bottom' | 'middle'; + width: number; + }; + panDirection: 'x' | 'y' | 'auto'; + panning: 'auto' | 'none'; + promotedLinkBehavior: 'none' | 'full' | 'lazy'; + renderer: ((context: ojDiagram.RendererContext) => ({ + insert: SVGElement; + })); + selection: Array; + selectionMode: 'single' | 'multiple' | 'none'; + selectionRenderer: ((context: ojDiagram.RendererContext) => { + insert: SVGElement; + } | void) | null; + styleDefaults: { + animationDuration: number; + hoverBehaviorDelay: number; + linkDefaults: { + color: string; + endConnectorType: 'arrowOpen' | 'arrow' | 'arrowConcave' | 'circle' | 'rectangle' | 'rectangleRounded' | 'none'; + labelStyle: object; + startConnectorType: 'arrowOpen' | 'arrow' | 'arrowConcave' | 'circle' | 'rectangle' | 'rectangleRounded' | 'none'; + svgClassName: string; + svgStyle: object; + width: number; + }; + nodeDefaults: { + icon: { + borderColor: string; + borderRadius: string; + borderWidth: number; + color: string; + height: number; + pattern: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + source: string; + sourceHover: string; + sourceHoverSelected: string; + sourceSelected: string; + svgClassName: string; + svgStyle: object; + width: number; + }; + labelStyle: object; + showDisclosure: 'off' | 'on'; + }; + promotedLink: { + color: string; + endConnectorType: 'arrowOpen' | 'arrow' | 'arrowConcave' | 'circle' | 'rectangle' | 'rectangleRounded' | 'none'; + startConnectorType: 'arrowOpen' | 'arrow' | 'arrowConcave' | 'circle' | 'rectangle' | 'rectangleRounded' | 'none'; + svgClassName: string; + svgStyle: object; + width: number; + }; + }; + tooltip: { + renderer: ((context: ojDiagram.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + touchResponse: 'touchStart' | 'auto'; + zoomRenderer: ((context: ojDiagram.RendererContext) => { + insert: SVGElement; + } | void) | null; + zooming: 'auto' | 'none'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + promotedLink?: string; + promotedLinkAriaDesc?: string; + promotedLinks?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; +} +export interface ojDiagramSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojDiagramLink extends JetElement { + categories: string[]; + color?: string; + endConnectorType?: 'arrow' | 'arrowConcave' | 'arrowOpen' | 'circle' | 'none' | 'rectangle' | 'rectangleRounded'; + endNode: any; + label?: string; + labelStyle?: object | null; + selectable?: 'auto' | 'off'; + shortDesc?: string; + startConnectorType?: 'arrow' | 'arrowConcave' | 'arrowOpen' | 'circle' | 'none' | 'rectangle' | 'rectangleRounded'; + startNode: any; + svgClassName?: string; + svgStyle?: object; + width?: number; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onEndConnectorTypeChanged: ((event: JetElementCustomEvent) => any) | null; + onEndNodeChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onSelectableChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onStartConnectorTypeChanged: ((event: JetElementCustomEvent) => any) | null; + onStartNodeChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onWidthChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojDiagramLinkEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojDiagramLink[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojDiagramLinkSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojDiagramLinkSettablePropertiesLenient): void; +} +export interface ojDiagramLinkEventMap extends HTMLElementEventMap { + 'categoriesChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'endConnectorTypeChanged': JetElementCustomEvent; + 'endNodeChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; + 'labelStyleChanged': JetElementCustomEvent; + 'selectableChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'startConnectorTypeChanged': JetElementCustomEvent; + 'startNodeChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'widthChanged': JetElementCustomEvent; +} +export interface ojDiagramLinkSettableProperties extends JetSettableProperties { + categories: string[]; + color?: string; + endConnectorType?: 'arrow' | 'arrowConcave' | 'arrowOpen' | 'circle' | 'none' | 'rectangle' | 'rectangleRounded'; + endNode: any; + label?: string; + labelStyle?: object | null; + selectable?: 'auto' | 'off'; + shortDesc?: string; + startConnectorType?: 'arrow' | 'arrowConcave' | 'arrowOpen' | 'circle' | 'none' | 'rectangle' | 'rectangleRounded'; + startNode: any; + svgClassName?: string; + svgStyle?: object; + width?: number; +} +export interface ojDiagramLinkSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojDiagramNode extends JetElement { + categories?: string[]; + descendantsConnectivity?: 'connected' | 'disjoint' | 'unknown'; + icon?: { + borderColor?: string; + borderRadius?: string; + borderWidth?: number; + color?: string; + height?: number; + opacity?: number; + pattern?: 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none' | 'mallChecker' | 'smallCrosshatch' | + 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle'; + shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + source?: string; + sourceHover?: string; + sourceHoverSelected?: string; + sourceSelected?: string; + svgClassName?: string; + svgStyle?: object; + width?: number; + }; + label?: string; + labelStyle?: object | null; + overview?: { + icon?: { + shape?: 'inherit' | 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + svgClassName?: string; + svgStyle?: object; + }; + }; + selectable?: 'auto' | 'off'; + shortDesc?: string; + showDisclosure?: 'on' | 'off'; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onDescendantsConnectivityChanged: ((event: JetElementCustomEvent) => any) | null; + onIconChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onOverviewChanged: ((event: JetElementCustomEvent) => any) | null; + onSelectableChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onShowDisclosureChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojDiagramNodeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojDiagramNode[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojDiagramNodeSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojDiagramNodeSettablePropertiesLenient): void; +} +export interface ojDiagramNodeEventMap extends HTMLElementEventMap { + 'categoriesChanged': JetElementCustomEvent; + 'descendantsConnectivityChanged': JetElementCustomEvent; + 'iconChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; + 'labelStyleChanged': JetElementCustomEvent; + 'overviewChanged': JetElementCustomEvent; + 'selectableChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'showDisclosureChanged': JetElementCustomEvent; +} +export interface ojDiagramNodeSettableProperties extends JetSettableProperties { + categories?: string[]; + descendantsConnectivity?: 'connected' | 'disjoint' | 'unknown'; + icon?: { + borderColor?: string; + borderRadius?: string; + borderWidth?: number; + color?: string; + height?: number; + opacity?: number; + pattern?: 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none' | 'mallChecker' | 'smallCrosshatch' | + 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle'; + shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + source?: string; + sourceHover?: string; + sourceHoverSelected?: string; + sourceSelected?: string; + svgClassName?: string; + svgStyle?: object; + width?: number; + }; + label?: string; + labelStyle?: object | null; + overview?: { + icon?: { + shape?: 'inherit' | 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + svgClassName?: string; + svgStyle?: object; + }; + }; + selectable?: 'auto' | 'off'; + shortDesc?: string; + showDisclosure?: 'on' | 'off'; +} +export interface ojDiagramNodeSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojdialog/index.d.ts b/types/oraclejet/ojdialog/index.d.ts new file mode 100644 index 0000000000..42a8569bd4 --- /dev/null +++ b/types/oraclejet/ojdialog/index.d.ts @@ -0,0 +1,148 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojDialog extends baseComponent { + cancelBehavior: 'icon' | 'escape' | 'none'; + dragAffordance: 'title-bar' | 'none'; + initialVisibility: 'hide' | 'show'; + modality: 'modal' | 'modeless'; + position: ojDialog.Position; + resizeBehavior: 'resizable' | 'none'; + role: string; + translations: { + labelCloseIcon?: string; + }; + onCancelBehaviorChanged: ((event: JetElementCustomEvent) => any) | null; + onDragAffordanceChanged: ((event: JetElementCustomEvent) => any) | null; + onInitialVisibilityChanged: ((event: JetElementCustomEvent) => any) | null; + onModalityChanged: ((event: JetElementCustomEvent) => any) | null; + onPositionChanged: ((event: JetElementCustomEvent) => any) | null; + onResizeBehaviorChanged: ((event: JetElementCustomEvent) => any) | null; + onRoleChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojDialog.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojDialog.ojAnimateStart) => any) | null; + onOjBeforeClose: ((event: ojDialog.ojBeforeClose) => any) | null; + onOjBeforeOpen: ((event: ojDialog.ojBeforeOpen) => any) | null; + onOjClose: ((event: ojDialog.ojClose) => any) | null; + onOjFocus: ((event: ojDialog.ojFocus) => any) | null; + onOjOpen: ((event: ojDialog.ojOpen) => any) | null; + onOjResize: ((event: ojDialog.ojResize) => any) | null; + onOjResizeStart: ((event: ojDialog.ojResizeStart) => any) | null; + onOjResizeStop: ((event: ojDialog.ojResizeStop) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojDialogEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojDialog[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojDialogSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojDialogSettablePropertiesLenient): void; + close(): void; + isOpen(): boolean; + open(): void; + refresh(): void; +} +export namespace ojDialog { + interface ojAnimateEnd extends CustomEvent<{ + element: Element; + action: 'open' | 'close'; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: 'open' | 'close'; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } + interface ojBeforeClose extends CustomEvent<{ + event: Event; + [propName: string]: any; + }> { + } + interface ojBeforeOpen extends CustomEvent<{ + event: Event; + [propName: string]: any; + }> { + } + interface ojClose extends CustomEvent<{ + event: Event; + [propName: string]: any; + }> { + } + interface ojFocus extends CustomEvent<{ + event: Event; + [propName: string]: any; + }> { + } + interface ojOpen extends CustomEvent<{ + event: Event; + [propName: string]: any; + }> { + } + interface ojResize extends CustomEvent<{ + event: Event; + [propName: string]: any; + }> { + } + interface ojResizeStart extends CustomEvent<{ + event: Event; + [propName: string]: any; + }> { + } + interface ojResizeStop extends CustomEvent<{ + event: Event; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type Position = { + my?: PositionAlign; + at?: PositionAlign; + offset?: PositionPoint; + of?: string | PositionPoint; + collision?: 'flip' | 'fit' | 'flipfit' | 'none'; + }; + // tslint:disable-next-line interface-over-type-literal + type PositionAlign = { + vertical?: 'top' | 'bottom' | 'center'; + horizontal?: 'start' | 'end' | 'left' | 'center' | 'bottom'; + }; + // tslint:disable-next-line interface-over-type-literal + type PositionPoint = { + x?: number; + y?: number; + }; +} +export interface ojDialogEventMap extends baseComponentEventMap { + 'ojAnimateEnd': ojDialog.ojAnimateEnd; + 'ojAnimateStart': ojDialog.ojAnimateStart; + 'ojBeforeClose': ojDialog.ojBeforeClose; + 'ojBeforeOpen': ojDialog.ojBeforeOpen; + 'ojClose': ojDialog.ojClose; + 'ojFocus': ojDialog.ojFocus; + 'ojOpen': ojDialog.ojOpen; + 'ojResize': ojDialog.ojResize; + 'ojResizeStart': ojDialog.ojResizeStart; + 'ojResizeStop': ojDialog.ojResizeStop; + 'cancelBehaviorChanged': JetElementCustomEvent; + 'dragAffordanceChanged': JetElementCustomEvent; + 'initialVisibilityChanged': JetElementCustomEvent; + 'modalityChanged': JetElementCustomEvent; + 'positionChanged': JetElementCustomEvent; + 'resizeBehaviorChanged': JetElementCustomEvent; + 'roleChanged': JetElementCustomEvent; +} +export interface ojDialogSettableProperties extends baseComponentSettableProperties { + cancelBehavior: 'icon' | 'escape' | 'none'; + dragAffordance: 'title-bar' | 'none'; + initialVisibility: 'hide' | 'show'; + modality: 'modal' | 'modeless'; + position: ojDialog.Position; + resizeBehavior: 'resizable' | 'none'; + role: string; + translations: { + labelCloseIcon?: string; + }; +} +export interface ojDialogSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojdvt-base/index.d.ts b/types/oraclejet/ojdvt-base/index.d.ts new file mode 100644 index 0000000000..04e1cca484 --- /dev/null +++ b/types/oraclejet/ojdvt-base/index.d.ts @@ -0,0 +1,57 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface dvtBaseComponent extends baseComponent { + trackResize: 'on' | 'off'; + translations: { + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; + onTrackResizeChanged: ((event: JetElementCustomEvent["trackResize"]>) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: dvtBaseComponentEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): dvtBaseComponent[T]; + getProperty(property: string): any; + setProperty(property: T, value: dvtBaseComponentSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: dvtBaseComponentSettablePropertiesLenient): void; +} +export interface dvtBaseComponentEventMap extends baseComponentEventMap { + 'trackResizeChanged': JetElementCustomEvent["trackResize"]>; +} +export interface dvtBaseComponentSettableProperties extends baseComponentSettableProperties { + trackResize: 'on' | 'off'; + translations: { + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; +} +export interface dvtBaseComponentSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojeditablevalue/index.d.ts b/types/oraclejet/ojeditablevalue/index.d.ts new file mode 100644 index 0000000000..44f714b3a7 --- /dev/null +++ b/types/oraclejet/ojeditablevalue/index.d.ts @@ -0,0 +1,96 @@ +import Message = require('../ojmessaging'); +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface editableValue, SV = V, RV = V> extends baseComponent { + describedBy: string | null; + disabled: boolean; + displayOptions: { + converterHint: Array<'placeholder' | 'notewindow' | 'none'> | 'placeholder' | 'notewindow' | 'none'; + helpInstruction: Array<'notewindow' | 'none'> | 'notewindow' | 'none'; + messages: Array<'inline' | 'notewindow' | 'none'> | 'inline' | 'notewindow' | 'none'; + validatorHint: Array<'notewindow' | 'none'> | 'notewindow' | 'none'; + }; + help: { + instruction?: string; + }; + helpHints: { + definition?: string; + source?: string; + }; + labelHint: string; + messagesCustom: Message[]; + readonly valid: 'valid' | 'pending' | 'invalidHidden' | 'invalidShown'; + value: V; + onDescribedByChanged: ((event: JetElementCustomEvent["describedBy"]>) => any) | null; + onDisabledChanged: ((event: JetElementCustomEvent["disabled"]>) => any) | null; + onDisplayOptionsChanged: ((event: JetElementCustomEvent["displayOptions"]>) => any) | null; + onHelpChanged: ((event: JetElementCustomEvent["help"]>) => any) | null; + onHelpHintsChanged: ((event: JetElementCustomEvent["helpHints"]>) => any) | null; + onLabelHintChanged: ((event: JetElementCustomEvent["labelHint"]>) => any) | null; + onMessagesCustomChanged: ((event: JetElementCustomEvent["messagesCustom"]>) => any) | null; + onValidChanged: ((event: JetElementCustomEvent["valid"]>) => any) | null; + onValueChanged: ((event: JetElementCustomEvent["value"]>) => any) | null; + onOjAnimateEnd: ((event: editableValue.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: editableValue.ojAnimateStart) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: editableValueEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): editableValue[T]; + getProperty(property: string): any; + setProperty>(property: T, value: editableValueSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: editableValueSettablePropertiesLenient): void; + refresh(): void; + reset(): void; + showMessages(): void; +} +export namespace editableValue { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface editableValueEventMap, SV = V, RV = V> extends baseComponentEventMap { + 'ojAnimateEnd': editableValue.ojAnimateEnd; + 'ojAnimateStart': editableValue.ojAnimateStart; + 'describedByChanged': JetElementCustomEvent["describedBy"]>; + 'disabledChanged': JetElementCustomEvent["disabled"]>; + 'displayOptionsChanged': JetElementCustomEvent["displayOptions"]>; + 'helpChanged': JetElementCustomEvent["help"]>; + 'helpHintsChanged': JetElementCustomEvent["helpHints"]>; + 'labelHintChanged': JetElementCustomEvent["labelHint"]>; + 'messagesCustomChanged': JetElementCustomEvent["messagesCustom"]>; + 'validChanged': JetElementCustomEvent["valid"]>; + 'valueChanged': JetElementCustomEvent["value"]>; +} +export interface editableValueSettableProperties extends baseComponentSettableProperties { + describedBy: string | null; + disabled: boolean; + displayOptions: { + converterHint: Array<'placeholder' | 'notewindow' | 'none'> | 'placeholder' | 'notewindow' | 'none'; + helpInstruction: Array<'notewindow' | 'none'> | 'notewindow' | 'none'; + messages: Array<'inline' | 'notewindow' | 'none'> | 'inline' | 'notewindow' | 'none'; + validatorHint: Array<'notewindow' | 'none'> | 'notewindow' | 'none'; + }; + help: { + instruction?: string; + }; + helpHints: { + definition?: string; + source?: string; + }; + labelHint: string; + messagesCustom: Message[]; + readonly valid: 'valid' | 'pending' | 'invalidHidden' | 'invalidShown'; + value: SV; +} +export interface editableValueSettablePropertiesLenient extends Partial> { + [key: string]: any; +} diff --git a/types/oraclejet/ojexpressionutils/index.d.ts b/types/oraclejet/ojexpressionutils/index.d.ts new file mode 100644 index 0000000000..e8c48ff994 --- /dev/null +++ b/types/oraclejet/ojexpressionutils/index.d.ts @@ -0,0 +1,5 @@ +export function createGenericExpressionEvaluator(expressionText: string): (context: any) => any; +export function getExpressionInfo(expression: string): { + expr: (null | string); + downstreamOnly: boolean; +}; diff --git a/types/oraclejet/ojfilepicker/index.d.ts b/types/oraclejet/ojfilepicker/index.d.ts new file mode 100644 index 0000000000..69f63531fa --- /dev/null +++ b/types/oraclejet/ojfilepicker/index.d.ts @@ -0,0 +1,43 @@ +import { ProgressItem } from '../ojprogresslist'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface FileUploadTransport { + flush(): void; + queue(fileList: FileList): ProgressItem[]; +} +export interface ojFilePicker extends JetElement { + accept: string[] | null; + selectOn: 'auto' | 'click' | 'drop' | 'clickAndDrop'; + selectionMode: 'multiple' | 'single'; + onAcceptChanged: ((event: JetElementCustomEvent) => any) | null; + onSelectOnChanged: ((event: JetElementCustomEvent) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent) => any) | null; + onOjSelect: ((event: ojFilePicker.ojSelect) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojFilePickerEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojFilePicker[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojFilePickerSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojFilePickerSettablePropertiesLenient): void; +} +export namespace ojFilePicker { + interface ojSelect extends CustomEvent<{ + files: FileList; + [propName: string]: any; + }> { + } +} +export interface ojFilePickerEventMap extends HTMLElementEventMap { + 'ojSelect': ojFilePicker.ojSelect; + 'acceptChanged': JetElementCustomEvent; + 'selectOnChanged': JetElementCustomEvent; + 'selectionModeChanged': JetElementCustomEvent; +} +export interface ojFilePickerSettableProperties extends JetSettableProperties { + accept: string[] | null; + selectOn: 'auto' | 'click' | 'drop' | 'clickAndDrop'; + selectionMode: 'multiple' | 'single'; +} +export interface ojFilePickerSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojfilmstrip/index.d.ts b/types/oraclejet/ojfilmstrip/index.d.ts new file mode 100644 index 0000000000..35716daf3e --- /dev/null +++ b/types/oraclejet/ojfilmstrip/index.d.ts @@ -0,0 +1,63 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojFilmStrip extends baseComponent { + arrowPlacement: 'adjacent' | 'overlay'; + arrowVisibility: 'visible' | 'hidden' | 'hover' | 'auto'; + currentItem: { + id?: string; + index?: number; + }; + looping: 'off' | 'page'; + maxItemsPerPage: number; + orientation: 'horizontal' | 'vertical'; + translations: { + labelAccArrowNextPage?: string; + labelAccArrowPreviousPage?: string; + labelAccFilmStrip?: string; + tipArrowNextPage?: string; + tipArrowPreviousPage?: string; + }; + onArrowPlacementChanged: ((event: JetElementCustomEvent) => any) | null; + onArrowVisibilityChanged: ((event: JetElementCustomEvent) => any) | null; + onCurrentItemChanged: ((event: JetElementCustomEvent) => any) | null; + onLoopingChanged: ((event: JetElementCustomEvent) => any) | null; + onMaxItemsPerPageChanged: ((event: JetElementCustomEvent) => any) | null; + onOrientationChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojFilmStripEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojFilmStrip[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojFilmStripSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojFilmStripSettablePropertiesLenient): void; + getItemsPerPage(): number; + refresh(): void; +} +export interface ojFilmStripEventMap extends baseComponentEventMap { + 'arrowPlacementChanged': JetElementCustomEvent; + 'arrowVisibilityChanged': JetElementCustomEvent; + 'currentItemChanged': JetElementCustomEvent; + 'loopingChanged': JetElementCustomEvent; + 'maxItemsPerPageChanged': JetElementCustomEvent; + 'orientationChanged': JetElementCustomEvent; +} +export interface ojFilmStripSettableProperties extends baseComponentSettableProperties { + arrowPlacement: 'adjacent' | 'overlay'; + arrowVisibility: 'visible' | 'hidden' | 'hover' | 'auto'; + currentItem: { + id?: string; + index?: number; + }; + looping: 'off' | 'page'; + maxItemsPerPage: number; + orientation: 'horizontal' | 'vertical'; + translations: { + labelAccArrowNextPage?: string; + labelAccArrowPreviousPage?: string; + labelAccFilmStrip?: string; + tipArrowNextPage?: string; + tipArrowPreviousPage?: string; + }; +} +export interface ojFilmStripSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojformlayout/index.d.ts b/types/oraclejet/ojformlayout/index.d.ts new file mode 100644 index 0000000000..c9fe49b34a --- /dev/null +++ b/types/oraclejet/ojformlayout/index.d.ts @@ -0,0 +1,38 @@ +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojFormLayout extends JetElement { + direction: 'column' | 'row'; + labelEdge: 'start' | 'top'; + labelWidth: string; + labelWrapping: 'truncate' | 'wrap'; + maxColumns: number; + onDirectionChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelEdgeChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelWidthChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelWrappingChanged: ((event: JetElementCustomEvent) => any) | null; + onMaxColumnsChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojFormLayoutEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojFormLayout[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojFormLayoutSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojFormLayoutSettablePropertiesLenient): void; + refresh(): void; +} +export interface ojFormLayoutEventMap extends HTMLElementEventMap { + 'directionChanged': JetElementCustomEvent; + 'labelEdgeChanged': JetElementCustomEvent; + 'labelWidthChanged': JetElementCustomEvent; + 'labelWrappingChanged': JetElementCustomEvent; + 'maxColumnsChanged': JetElementCustomEvent; +} +export interface ojFormLayoutSettableProperties extends JetSettableProperties { + direction: 'column' | 'row'; + labelEdge: 'start' | 'top'; + labelWidth: string; + labelWrapping: 'truncate' | 'wrap'; + maxColumns: number; +} +export interface ojFormLayoutSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojgantt/index.d.ts b/types/oraclejet/ojgantt/index.d.ts new file mode 100644 index 0000000000..18ded2ebeb --- /dev/null +++ b/types/oraclejet/ojgantt/index.d.ts @@ -0,0 +1,679 @@ +import { ojTimeAxis } from '../ojtimeaxis'; +import { Converter } from '../ojvalidation-base'; +import { DataProvider } from '../ojdataprovider'; +import { dvtTimeComponent, dvtTimeComponentEventMap, dvtTimeComponentSettableProperties } from '../ojtime-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojGantt extends dvtTimeComponent> { + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + as: string; + axisPosition: 'bottom' | 'top'; + dependencyData?: (DataProvider); + dnd: { + move?: { + tasks?: 'disabled' | 'enabled'; + }; + }; + end: string; + gridlines: { + horizontal?: 'hidden' | 'visible' | 'auto'; + vertical?: 'hidden' | 'visible' | 'auto'; + }; + majorAxis: { + converter?: (ojTimeAxis.Converters | Converter); + height?: number; + scale: 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'quarters' | 'years'; + zoomOrder?: string[]; + }; + minorAxis: { + converter?: (ojTimeAxis.Converters | Converter); + height?: number; + scale: 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'quarters' | 'years'; + zoomOrder?: string[]; + }; + referenceObjects: ojGantt.ReferenceObject[]; + rowAxis: { + label?: { + renderer: ((context: ojGantt.RowAxisLabelRendererContext) => ({ + insert: Element; + })); + }; + maxWidth?: string; + rendered?: 'on' | 'off'; + width?: string; + }; + rowDefaults: { + height?: number; + }; + scrollPosition: { + offsetY?: number; + rowIndex?: number; + y?: number; + }; + selection: K2[]; + selectionMode: 'single' | 'multiple' | 'none'; + start: string; + taskData?: (DataProvider); + taskDefaults: { + baseline?: { + borderRadius?: string; + height?: number; + svgClassName?: string; + svgStyle?: object; + }; + borderRadius?: string; + height?: number; + labelPosition?: (string | string[]); + progress?: { + borderRadius?: string; + height?: string; + svgClassName?: string; + svgStyle?: object; + }; + svgClassName?: string; + svgStyle?: object; + type?: 'normal' | 'milestone' | 'summary' | 'auto'; + }; + tooltip: { + renderer: ((context: ojGantt.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + valueFormats: { + baselineDate?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + baselineEnd?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + baselineStart?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + date?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + end?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + label?: { + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + progress?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + row?: { + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + start?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + }; + viewportEnd: string; + viewportStart: string; + translations: { + accessibleDependencyInfo?: string; + accessiblePredecessorInfo?: string; + accessibleSuccessorInfo?: string; + accessibleTaskTypeMilestone?: string; + accessibleTaskTypeSummary?: string; + componentName?: string; + finishFinishDependencyAriaDesc?: string; + finishStartDependencyAriaDesc?: string; + labelAndValue?: string; + labelBaselineDate?: string; + labelBaselineEnd?: string; + labelBaselineStart?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelDate?: string; + labelEnd?: string; + labelInvalidData?: string; + labelLabel?: string; + labelMoveBy?: string; + labelNoData?: string; + labelProgress?: string; + labelRow?: string; + labelStart?: string; + startFinishDependencyAriaDesc?: string; + startStartDependencyAriaDesc?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + taskMoveCancelled?: string; + taskMoveFinalized?: string; + taskMoveInitiated?: string; + taskMoveInitiatedInstruction?: string; + taskMoveSelectionInfo?: string; + tooltipZoomIn?: string; + tooltipZoomOut?: string; + }; + onAnimationOnDataChangeChanged: ((event: JetElementCustomEvent["animationOnDataChange"]>) => any) | null; + onAnimationOnDisplayChanged: ((event: JetElementCustomEvent["animationOnDisplay"]>) => any) | null; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onAxisPositionChanged: ((event: JetElementCustomEvent["axisPosition"]>) => any) | null; + onDependencyDataChanged: ((event: JetElementCustomEvent["dependencyData"]>) => any) | null; + onDndChanged: ((event: JetElementCustomEvent["dnd"]>) => any) | null; + onEndChanged: ((event: JetElementCustomEvent["end"]>) => any) | null; + onGridlinesChanged: ((event: JetElementCustomEvent["gridlines"]>) => any) | null; + onMajorAxisChanged: ((event: JetElementCustomEvent["majorAxis"]>) => any) | null; + onMinorAxisChanged: ((event: JetElementCustomEvent["minorAxis"]>) => any) | null; + onReferenceObjectsChanged: ((event: JetElementCustomEvent["referenceObjects"]>) => any) | null; + onRowAxisChanged: ((event: JetElementCustomEvent["rowAxis"]>) => any) | null; + onRowDefaultsChanged: ((event: JetElementCustomEvent["rowDefaults"]>) => any) | null; + onScrollPositionChanged: ((event: JetElementCustomEvent["scrollPosition"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent["selectionMode"]>) => any) | null; + onStartChanged: ((event: JetElementCustomEvent["start"]>) => any) | null; + onTaskDataChanged: ((event: JetElementCustomEvent["taskData"]>) => any) | null; + onTaskDefaultsChanged: ((event: JetElementCustomEvent["taskDefaults"]>) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent["tooltip"]>) => any) | null; + onValueFormatsChanged: ((event: JetElementCustomEvent["valueFormats"]>) => any) | null; + onViewportEndChanged: ((event: JetElementCustomEvent["viewportEnd"]>) => any) | null; + onViewportStartChanged: ((event: JetElementCustomEvent["viewportStart"]>) => any) | null; + onOjMove: ((event: ojGantt.ojMove) => any) | null; + onOjViewportChange: ((event: ojGantt.ojViewportChange) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojGanttEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojGantt[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojGanttSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojGanttSettablePropertiesLenient): void; + getContextByNode(node: Element): { + subId: 'oj-gantt-row-label'; + index: number; + } | { + subId: 'oj-gantt-taskbar'; + rowIndex: number; + index: number; + } | null; +} +export namespace ojGantt { + interface ojMove extends CustomEvent<{ + taskContexts: Array<{ + data: RowTask; + rowData: Row; + itemData: D2 | null; + color: string; + }>; + value: string; + start: string; + end: string; + baselineStart: string; + baselineEnd: string; + rowContext: { + rowData: Row; + componentElement: Element; + }; + [propName: string]: any; + }> { + } + interface ojViewportChange extends CustomEvent<{ + viewportStart: string; + viewportEnd: string; + majorAxisScale: string; + minorAxisScale: string; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type Dependency = { + id: K1; + predecessorTaskId: K2; + shortDesc?: string; + successorTaskId: K2; + svgClassName?: string; + svgStyle?: object; + type?: 'startStart' | 'startFinish' | 'finishFinish' | 'finishStart'; + }; + // tslint:disable-next-line interface-over-type-literal + type ReferenceObject = { + svgClassName?: string; + svgStyle?: object; + value?: string; + }; + // tslint:disable-next-line interface-over-type-literal + type Row = { + id?: any; + label?: string; + labelStyle?: object; + tasks?: Array>; + }; + // tslint:disable-next-line interface-over-type-literal + type RowAxisLabelRendererContext = { + parentElement: Element; + rowData: Row; + itemData: D2[]; + componentElement: Element; + maxWidth: number; + maxHeight: number; + }; + // tslint:disable-next-line interface-over-type-literal + type RowTask = { + borderRadius?: string; + end?: string; + height?: number; + id: K2; + label?: string; + labelPosition?: string | string[]; + labelStyle?: object; + start?: string; + shortDesc?: string; + svgClassName?: string; + svgStyle?: object; + type?: 'normal' | 'milestone' | 'summary' | 'auto'; + progress?: { + borderRadius?: string; + height?: string; + svgClassName?: string; + svgStyle?: object; + value?: number; + }; + baseline?: { + borderRadius?: string; + end?: string; + height?: number; + start?: string; + svgClassName?: string; + svgStyle?: object; + }; + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + parentElement: Element; + data: RowTask; + rowData: Row; + itemData: D2; + componentElement: Element; + color: string; + }; +} +export interface ojGanttEventMap extends dvtTimeComponentEventMap> { + 'ojMove': ojGantt.ojMove; + 'ojViewportChange': ojGantt.ojViewportChange; + 'animationOnDataChangeChanged': JetElementCustomEvent["animationOnDataChange"]>; + 'animationOnDisplayChanged': JetElementCustomEvent["animationOnDisplay"]>; + 'asChanged': JetElementCustomEvent["as"]>; + 'axisPositionChanged': JetElementCustomEvent["axisPosition"]>; + 'dependencyDataChanged': JetElementCustomEvent["dependencyData"]>; + 'dndChanged': JetElementCustomEvent["dnd"]>; + 'endChanged': JetElementCustomEvent["end"]>; + 'gridlinesChanged': JetElementCustomEvent["gridlines"]>; + 'majorAxisChanged': JetElementCustomEvent["majorAxis"]>; + 'minorAxisChanged': JetElementCustomEvent["minorAxis"]>; + 'referenceObjectsChanged': JetElementCustomEvent["referenceObjects"]>; + 'rowAxisChanged': JetElementCustomEvent["rowAxis"]>; + 'rowDefaultsChanged': JetElementCustomEvent["rowDefaults"]>; + 'scrollPositionChanged': JetElementCustomEvent["scrollPosition"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'selectionModeChanged': JetElementCustomEvent["selectionMode"]>; + 'startChanged': JetElementCustomEvent["start"]>; + 'taskDataChanged': JetElementCustomEvent["taskData"]>; + 'taskDefaultsChanged': JetElementCustomEvent["taskDefaults"]>; + 'tooltipChanged': JetElementCustomEvent["tooltip"]>; + 'valueFormatsChanged': JetElementCustomEvent["valueFormats"]>; + 'viewportEndChanged': JetElementCustomEvent["viewportEnd"]>; + 'viewportStartChanged': JetElementCustomEvent["viewportStart"]>; +} +export interface ojGanttSettableProperties extends dvtTimeComponentSettableProperties { + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + as: string; + axisPosition: 'bottom' | 'top'; + dependencyData?: (DataProvider); + dnd: { + move?: { + tasks?: 'disabled' | 'enabled'; + }; + }; + end: string; + gridlines: { + horizontal?: 'hidden' | 'visible' | 'auto'; + vertical?: 'hidden' | 'visible' | 'auto'; + }; + majorAxis: { + converter?: (ojTimeAxis.Converters | Converter); + height?: number; + scale: 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'quarters' | 'years'; + zoomOrder?: string[]; + }; + minorAxis: { + converter?: (ojTimeAxis.Converters | Converter); + height?: number; + scale: 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'quarters' | 'years'; + zoomOrder?: string[]; + }; + referenceObjects: ojGantt.ReferenceObject[]; + rowAxis: { + label?: { + renderer: ((context: ojGantt.RowAxisLabelRendererContext) => ({ + insert: Element; + })); + }; + maxWidth?: string; + rendered?: 'on' | 'off'; + width?: string; + }; + rowDefaults: { + height?: number; + }; + scrollPosition: { + offsetY?: number; + rowIndex?: number; + y?: number; + }; + selection: K2[]; + selectionMode: 'single' | 'multiple' | 'none'; + start: string; + taskData?: (DataProvider); + taskDefaults: { + baseline?: { + borderRadius?: string; + height?: number; + svgClassName?: string; + svgStyle?: object; + }; + borderRadius?: string; + height?: number; + labelPosition?: (string | string[]); + progress?: { + borderRadius?: string; + height?: string; + svgClassName?: string; + svgStyle?: object; + }; + svgClassName?: string; + svgStyle?: object; + type?: 'normal' | 'milestone' | 'summary' | 'auto'; + }; + tooltip: { + renderer: ((context: ojGantt.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + valueFormats: { + baselineDate?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + baselineEnd?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + baselineStart?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + date?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + end?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + label?: { + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + progress?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + row?: { + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + start?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + }; + viewportEnd: string; + viewportStart: string; + translations: { + accessibleDependencyInfo?: string; + accessiblePredecessorInfo?: string; + accessibleSuccessorInfo?: string; + accessibleTaskTypeMilestone?: string; + accessibleTaskTypeSummary?: string; + componentName?: string; + finishFinishDependencyAriaDesc?: string; + finishStartDependencyAriaDesc?: string; + labelAndValue?: string; + labelBaselineDate?: string; + labelBaselineEnd?: string; + labelBaselineStart?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelDate?: string; + labelEnd?: string; + labelInvalidData?: string; + labelLabel?: string; + labelMoveBy?: string; + labelNoData?: string; + labelProgress?: string; + labelRow?: string; + labelStart?: string; + startFinishDependencyAriaDesc?: string; + startStartDependencyAriaDesc?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + taskMoveCancelled?: string; + taskMoveFinalized?: string; + taskMoveInitiated?: string; + taskMoveInitiatedInstruction?: string; + taskMoveSelectionInfo?: string; + tooltipZoomIn?: string; + tooltipZoomOut?: string; + }; +} +export interface ojGanttSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojGanttDependency extends JetElement { + predecessorTaskId: any; + shortDesc: string | null; + successorTaskId: any; + svgClassName: string; + svgStyle: object; + type: 'finishStart' | 'finishFinish' | 'startStart' | 'startFinish'; + onPredecessorTaskIdChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onSuccessorTaskIdChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onTypeChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojGanttDependencyEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojGanttDependency[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojGanttDependencySettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojGanttDependencySettablePropertiesLenient): void; +} +export interface ojGanttDependencyEventMap extends HTMLElementEventMap { + 'predecessorTaskIdChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'successorTaskIdChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'typeChanged': JetElementCustomEvent; +} +export interface ojGanttDependencySettableProperties extends JetSettableProperties { + predecessorTaskId: any; + shortDesc: string | null; + successorTaskId: any; + svgClassName: string; + svgStyle: object; + type: 'finishStart' | 'finishFinish' | 'startStart' | 'startFinish'; +} +export interface ojGanttDependencySettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojGanttRow extends JetElement { + label: string; + labelStyle: object; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelStyleChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojGanttRowEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojGanttRow[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojGanttRowSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojGanttRowSettablePropertiesLenient): void; +} +export interface ojGanttRowEventMap extends HTMLElementEventMap { + 'labelChanged': JetElementCustomEvent; + 'labelStyleChanged': JetElementCustomEvent; +} +export interface ojGanttRowSettableProperties extends JetSettableProperties { + label: string; + labelStyle: object; +} +export interface ojGanttRowSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojGanttTask extends JetElement { + baseline: { + borderRadius?: string; + end?: string; + height?: number; + start?: string; + svgClassName?: string; + svgStyle?: object; + }; + borderRadius: string; + end: string; + height: number | null; + label: string; + labelPosition: 'start' | 'innerCenter' | 'innerStart' | 'innerEnd' | 'end' | 'none'; + labelStyle: object; + progress: { + borderRadius?: string; + height?: string; + svgClassName?: string; + svgStyle?: object; + value?: number; + }; + rowId?: any; + shortDesc: string | null; + start: string; + svgClassName: string; + svgStyle: object; + type: 'normal' | 'milestone' | 'summary' | 'auto'; + onBaselineChanged: ((event: JetElementCustomEvent) => any) | null; + onBorderRadiusChanged: ((event: JetElementCustomEvent) => any) | null; + onEndChanged: ((event: JetElementCustomEvent) => any) | null; + onHeightChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelPositionChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onProgressChanged: ((event: JetElementCustomEvent) => any) | null; + onRowIdChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onStartChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onTypeChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojGanttTaskEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojGanttTask[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojGanttTaskSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojGanttTaskSettablePropertiesLenient): void; +} +export interface ojGanttTaskEventMap extends HTMLElementEventMap { + 'baselineChanged': JetElementCustomEvent; + 'borderRadiusChanged': JetElementCustomEvent; + 'endChanged': JetElementCustomEvent; + 'heightChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; + 'labelPositionChanged': JetElementCustomEvent; + 'labelStyleChanged': JetElementCustomEvent; + 'progressChanged': JetElementCustomEvent; + 'rowIdChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'startChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'typeChanged': JetElementCustomEvent; +} +export interface ojGanttTaskSettableProperties extends JetSettableProperties { + baseline: { + borderRadius?: string; + end?: string; + height?: number; + start?: string; + svgClassName?: string; + svgStyle?: object; + }; + borderRadius: string; + end: string; + height: number | null; + label: string; + labelPosition: 'start' | 'innerCenter' | 'innerStart' | 'innerEnd' | 'end' | 'none'; + labelStyle: object; + progress: { + borderRadius?: string; + height?: string; + svgClassName?: string; + svgStyle?: object; + value?: number; + }; + rowId?: any; + shortDesc: string | null; + start: string; + svgClassName: string; + svgStyle: object; + type: 'normal' | 'milestone' | 'summary' | 'auto'; +} +export interface ojGanttTaskSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojganttutils/index.d.ts b/types/oraclejet/ojganttutils/index.d.ts new file mode 100644 index 0000000000..0eb146049c --- /dev/null +++ b/types/oraclejet/ojganttutils/index.d.ts @@ -0,0 +1,4 @@ +export function computeTableColumnHeaderHeight(table: Element, gantt: Element, axisInfo: { + majorAxis: object; + minorAxis: object; +}): number; diff --git a/types/oraclejet/ojgauge/index.d.ts b/types/oraclejet/ojgauge/index.d.ts new file mode 100644 index 0000000000..d3ccbbd487 --- /dev/null +++ b/types/oraclejet/ojgauge/index.d.ts @@ -0,0 +1,574 @@ +import { Converter } from '../ojvalidation-base'; +import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface dvtBaseGauge extends dvtBaseComponent { + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; + addEventListener>(type: T, listener: (this: HTMLElement, ev: dvtBaseGaugeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): dvtBaseGauge[T]; + getProperty(property: string): any; + setProperty(property: T, value: dvtBaseGaugeSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: dvtBaseGaugeSettablePropertiesLenient): void; +} +// These interfaces are empty but required to keep the event chain intact. Avoid lint-rule +// tslint:disable-next-line no-empty-interface +export interface dvtBaseGaugeEventMap extends dvtBaseComponentEventMap { +} +export interface dvtBaseGaugeSettableProperties extends dvtBaseComponentSettableProperties { + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; +} +export interface dvtBaseGaugeSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojLedGauge extends dvtBaseGauge { + borderColor: string; + color: string; + label: { + style?: object; + text?: string; + }; + max: number; + metricLabel: { + converter?: Converter; + rendered?: 'on' | 'off'; + scaling?: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + style?: object; + text?: string; + textType?: 'percent' | 'number'; + }; + min: number; + rotation: 90 | 180 | 270 | 0; + size: number; + svgClassName: string; + svgStyle: object; + thresholds: ojLedGauge.Threshold[]; + tooltip: { + renderer: ((context: ojLedGauge.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + type: 'arrow' | 'diamond' | 'square' | 'rectangle' | 'triangle' | 'star' | 'human' | 'circle'; + value: number | null; + visualEffects: 'none' | 'auto'; + onBorderColorChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onMaxChanged: ((event: JetElementCustomEvent) => any) | null; + onMetricLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onMinChanged: ((event: JetElementCustomEvent) => any) | null; + onRotationChanged: ((event: JetElementCustomEvent) => any) | null; + onSizeChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onThresholdsChanged: ((event: JetElementCustomEvent) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent) => any) | null; + onTypeChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onVisualEffectsChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojLedGaugeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojLedGauge[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojLedGaugeSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojLedGaugeSettablePropertiesLenient): void; + getMetricLabel(): string; +} +export interface ojLedGaugeEventMap extends dvtBaseGaugeEventMap { + 'borderColorChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; + 'maxChanged': JetElementCustomEvent; + 'metricLabelChanged': JetElementCustomEvent; + 'minChanged': JetElementCustomEvent; + 'rotationChanged': JetElementCustomEvent; + 'sizeChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'thresholdsChanged': JetElementCustomEvent; + 'tooltipChanged': JetElementCustomEvent; + 'typeChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; + 'visualEffectsChanged': JetElementCustomEvent; +} +export interface ojLedGaugeSettableProperties extends dvtBaseGaugeSettableProperties { + borderColor: string; + color: string; + label: { + style?: object; + text?: string; + }; + max: number; + metricLabel: { + converter?: Converter; + rendered?: 'on' | 'off'; + scaling?: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + style?: object; + text?: string; + textType?: 'percent' | 'number'; + }; + min: number; + rotation: 90 | 180 | 270 | 0; + size: number; + svgClassName: string; + svgStyle: object; + thresholds: ojLedGauge.Threshold[]; + tooltip: { + renderer: ((context: ojLedGauge.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + type: 'arrow' | 'diamond' | 'square' | 'rectangle' | 'triangle' | 'star' | 'human' | 'circle'; + value: number | null; + visualEffects: 'none' | 'auto'; +} +export interface ojLedGaugeSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export namespace ojLedGauge { + // tslint:disable-next-line interface-over-type-literal + type Threshold = { + borderColor?: string; + color?: string; + max?: number; + shortDesc?: string; + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + color: string; + componentElement: Element; + label: string; + parentElement: Element; + }; +} +export interface ojRatingGauge extends dvtBaseGauge { + changed: boolean; + changedState: { + borderColor?: string; + color?: string; + shape?: 'circle' | 'diamond' | 'human' | 'square' | 'star' | 'triangle' | string; + source?: string; + svgClassName?: string; + svgStyle?: object; + }; + hoverState: { + borderColor?: string; + color?: string; + shape?: 'circle' | 'diamond' | 'human' | 'square' | 'star' | 'triangle' | string; + source?: string; + svgClassName?: string; + svgStyle?: object; + }; + max: number; + min: number; + orientation: 'vertical' | 'horizontal'; + preserveAspectRatio: 'none' | 'meet'; + readonly: boolean; + selectedState: { + borderColor?: string; + color?: string; + shape?: 'circle' | 'diamond' | 'human' | 'square' | 'star' | 'triangle' | string; + source?: string; + svgClassName?: string; + svgStyle?: object; + }; + step: 0.5 | 1; + thresholds: ojRatingGauge.Threshold[]; + tooltip: { + renderer: ((context: ojRatingGauge.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + readonly transientValue: number | null; + unselectedState: { + borderColor?: string; + color?: string; + shape?: 'circle' | 'diamond' | 'human' | 'square' | 'star' | 'triangle' | string; + source?: string; + svgClassName?: string; + svgStyle?: object; + }; + value: number | null; + visualEffects: 'none' | 'auto'; + onChangedChanged: ((event: JetElementCustomEvent) => any) | null; + onChangedStateChanged: ((event: JetElementCustomEvent) => any) | null; + onHoverStateChanged: ((event: JetElementCustomEvent) => any) | null; + onMaxChanged: ((event: JetElementCustomEvent) => any) | null; + onMinChanged: ((event: JetElementCustomEvent) => any) | null; + onOrientationChanged: ((event: JetElementCustomEvent) => any) | null; + onPreserveAspectRatioChanged: ((event: JetElementCustomEvent) => any) | null; + onReadonlyChanged: ((event: JetElementCustomEvent) => any) | null; + onSelectedStateChanged: ((event: JetElementCustomEvent) => any) | null; + onStepChanged: ((event: JetElementCustomEvent) => any) | null; + onThresholdsChanged: ((event: JetElementCustomEvent) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent) => any) | null; + onTransientValueChanged: ((event: JetElementCustomEvent) => any) | null; + onUnselectedStateChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onVisualEffectsChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojRatingGaugeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojRatingGauge[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojRatingGaugeSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojRatingGaugeSettablePropertiesLenient): void; +} +export interface ojRatingGaugeEventMap extends dvtBaseGaugeEventMap { + 'changedChanged': JetElementCustomEvent; + 'changedStateChanged': JetElementCustomEvent; + 'hoverStateChanged': JetElementCustomEvent; + 'maxChanged': JetElementCustomEvent; + 'minChanged': JetElementCustomEvent; + 'orientationChanged': JetElementCustomEvent; + 'preserveAspectRatioChanged': JetElementCustomEvent; + 'readonlyChanged': JetElementCustomEvent; + 'selectedStateChanged': JetElementCustomEvent; + 'stepChanged': JetElementCustomEvent; + 'thresholdsChanged': JetElementCustomEvent; + 'tooltipChanged': JetElementCustomEvent; + 'transientValueChanged': JetElementCustomEvent; + 'unselectedStateChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; + 'visualEffectsChanged': JetElementCustomEvent; +} +export interface ojRatingGaugeSettableProperties extends dvtBaseGaugeSettableProperties { + changed: boolean; + changedState: { + borderColor?: string; + color?: string; + shape?: 'circle' | 'diamond' | 'human' | 'square' | 'star' | 'triangle' | string; + source?: string; + svgClassName?: string; + svgStyle?: object; + }; + hoverState: { + borderColor?: string; + color?: string; + shape?: 'circle' | 'diamond' | 'human' | 'square' | 'star' | 'triangle' | string; + source?: string; + svgClassName?: string; + svgStyle?: object; + }; + max: number; + min: number; + orientation: 'vertical' | 'horizontal'; + preserveAspectRatio: 'none' | 'meet'; + readonly: boolean; + selectedState: { + borderColor?: string; + color?: string; + shape?: 'circle' | 'diamond' | 'human' | 'square' | 'star' | 'triangle' | string; + source?: string; + svgClassName?: string; + svgStyle?: object; + }; + step: 0.5 | 1; + thresholds: ojRatingGauge.Threshold[]; + tooltip: { + renderer: ((context: ojRatingGauge.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + readonly transientValue: number | null; + unselectedState: { + borderColor?: string; + color?: string; + shape?: 'circle' | 'diamond' | 'human' | 'square' | 'star' | 'triangle' | string; + source?: string; + svgClassName?: string; + svgStyle?: object; + }; + value: number | null; + visualEffects: 'none' | 'auto'; +} +export interface ojRatingGaugeSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export namespace ojRatingGauge { + // tslint:disable-next-line interface-over-type-literal + type Threshold = { + borderColor?: string; + color?: string; + max?: number; + shortDesc?: string; + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + color: string; + componentElement: Element; + label: string; + parentElement: Element; + }; +} +export interface ojStatusMeterGauge extends dvtBaseGauge { + angleExtent: number; + animationDuration?: number; + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + borderColor: string; + borderRadius: string; + center: { + renderer: ((context: ojStatusMeterGauge.CenterContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + color: string; + indicatorSize: number; + innerRadius: number; + label: { + position?: 'center' | 'start' | 'auto'; + style?: object; + text?: string; + }; + max: number; + metricLabel: { + converter?: Converter; + position?: 'center' | 'insideIndicatorEdge' | 'outsideIndicatorEdge' | 'outsidePlotArea' | 'withLabel' | 'auto'; + rendered?: 'on' | 'off' | 'auto'; + scaling?: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + style?: object; + text?: string; + textType?: 'percent' | 'number'; + }; + min: number; + orientation: 'circular' | 'vertical' | 'horizontal'; + plotArea: { + borderColor?: string; + borderRadius?: string; + color?: string; + rendered?: 'on' | 'off' | 'auto'; + svgClassName?: string; + svgStyle?: object; + }; + readonly: boolean; + referenceLines: ojStatusMeterGauge.ReferenceLine[]; + startAngle: number; + step: number | null; + svgClassName: string; + svgStyle: object; + thresholdDisplay: 'currentOnly' | 'all' | 'onIndicator'; + thresholds: ojStatusMeterGauge.Threshold[]; + tooltip: { + renderer: ((context: ojStatusMeterGauge.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + readonly transientValue: number | null; + value: number | null; + visualEffects: 'none' | 'auto'; + onAngleExtentChanged: ((event: JetElementCustomEvent) => any) | null; + onAnimationDurationChanged: ((event: JetElementCustomEvent) => any) | null; + onAnimationOnDataChangeChanged: ((event: JetElementCustomEvent) => any) | null; + onAnimationOnDisplayChanged: ((event: JetElementCustomEvent) => any) | null; + onBorderColorChanged: ((event: JetElementCustomEvent) => any) | null; + onBorderRadiusChanged: ((event: JetElementCustomEvent) => any) | null; + onCenterChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onIndicatorSizeChanged: ((event: JetElementCustomEvent) => any) | null; + onInnerRadiusChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onMaxChanged: ((event: JetElementCustomEvent) => any) | null; + onMetricLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onMinChanged: ((event: JetElementCustomEvent) => any) | null; + onOrientationChanged: ((event: JetElementCustomEvent) => any) | null; + onPlotAreaChanged: ((event: JetElementCustomEvent) => any) | null; + onReadonlyChanged: ((event: JetElementCustomEvent) => any) | null; + onReferenceLinesChanged: ((event: JetElementCustomEvent) => any) | null; + onStartAngleChanged: ((event: JetElementCustomEvent) => any) | null; + onStepChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onThresholdDisplayChanged: ((event: JetElementCustomEvent) => any) | null; + onThresholdsChanged: ((event: JetElementCustomEvent) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent) => any) | null; + onTransientValueChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onVisualEffectsChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojStatusMeterGaugeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojStatusMeterGauge[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojStatusMeterGaugeSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojStatusMeterGaugeSettablePropertiesLenient): void; + getMetricLabel(): string; +} +export interface ojStatusMeterGaugeEventMap extends dvtBaseGaugeEventMap { + 'angleExtentChanged': JetElementCustomEvent; + 'animationDurationChanged': JetElementCustomEvent; + 'animationOnDataChangeChanged': JetElementCustomEvent; + 'animationOnDisplayChanged': JetElementCustomEvent; + 'borderColorChanged': JetElementCustomEvent; + 'borderRadiusChanged': JetElementCustomEvent; + 'centerChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'indicatorSizeChanged': JetElementCustomEvent; + 'innerRadiusChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; + 'maxChanged': JetElementCustomEvent; + 'metricLabelChanged': JetElementCustomEvent; + 'minChanged': JetElementCustomEvent; + 'orientationChanged': JetElementCustomEvent; + 'plotAreaChanged': JetElementCustomEvent; + 'readonlyChanged': JetElementCustomEvent; + 'referenceLinesChanged': JetElementCustomEvent; + 'startAngleChanged': JetElementCustomEvent; + 'stepChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'thresholdDisplayChanged': JetElementCustomEvent; + 'thresholdsChanged': JetElementCustomEvent; + 'tooltipChanged': JetElementCustomEvent; + 'transientValueChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; + 'visualEffectsChanged': JetElementCustomEvent; +} +export interface ojStatusMeterGaugeSettableProperties extends dvtBaseGaugeSettableProperties { + angleExtent: number; + animationDuration?: number; + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + borderColor: string; + borderRadius: string; + center: { + renderer: ((context: ojStatusMeterGauge.CenterContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + color: string; + indicatorSize: number; + innerRadius: number; + label: { + position?: 'center' | 'start' | 'auto'; + style?: object; + text?: string; + }; + max: number; + metricLabel: { + converter?: Converter; + position?: 'center' | 'insideIndicatorEdge' | 'outsideIndicatorEdge' | 'outsidePlotArea' | 'withLabel' | 'auto'; + rendered?: 'on' | 'off' | 'auto'; + scaling?: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + style?: object; + text?: string; + textType?: 'percent' | 'number'; + }; + min: number; + orientation: 'circular' | 'vertical' | 'horizontal'; + plotArea: { + borderColor?: string; + borderRadius?: string; + color?: string; + rendered?: 'on' | 'off' | 'auto'; + svgClassName?: string; + svgStyle?: object; + }; + readonly: boolean; + referenceLines: ojStatusMeterGauge.ReferenceLine[]; + startAngle: number; + step: number | null; + svgClassName: string; + svgStyle: object; + thresholdDisplay: 'currentOnly' | 'all' | 'onIndicator'; + thresholds: ojStatusMeterGauge.Threshold[]; + tooltip: { + renderer: ((context: ojStatusMeterGauge.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + readonly transientValue: number | null; + value: number | null; + visualEffects: 'none' | 'auto'; +} +export interface ojStatusMeterGaugeSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export namespace ojStatusMeterGauge { + // tslint:disable-next-line interface-over-type-literal + type Bounds = { + x: number; + y: number; + width: number; + height: number; + }; + // tslint:disable-next-line interface-over-type-literal + type CenterContext = { + componentElement: Element; + innerBounds: Bounds; + metricLabel: string; + outerBounds: Bounds; + }; + // tslint:disable-next-line interface-over-type-literal + type ReferenceLine = { + color?: string; + value?: number; + }; + // tslint:disable-next-line interface-over-type-literal + type Threshold = { + borderColor?: string; + color?: string; + max?: number; + shortDesc?: string; + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + color: string; + componentElement: Element; + label: string; + parentElement: Element; + }; +} diff --git a/types/oraclejet/ojinputnumber/index.d.ts b/types/oraclejet/ojinputnumber/index.d.ts new file mode 100644 index 0000000000..533ec04873 --- /dev/null +++ b/types/oraclejet/ojinputnumber/index.d.ts @@ -0,0 +1,150 @@ +import { Converter, Validator, Validation, AsyncValidator } from '../ojvalidation-base'; +import { editableValue, editableValueEventMap, editableValueSettableProperties } from '../ojeditablevalue'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojInputNumber extends editableValue { + asyncValidators: Array>; + autocomplete: 'on' | 'off' | string; + autofocus: boolean; + converter: Converter | Validation.RegisteredConverter; + max: number | null; + min: number | null; + placeholder: string | null; + readonly rawValue: string; + readonly: boolean | null; + required: boolean; + step: number | null; + validators: Array | Validation.RegisteredValidator>; + value: number | null; + virtualKeyboard: 'auto' | 'number' | 'text'; + translations: { + numberRange?: { + hint?: { + exact?: string; + inRange?: string; + max?: string; + min?: string; + }; + messageDetail?: { + exact?: string; + rangeOverflow?: string; + rangeUnderflow?: string; + }; + messageSummary?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + }; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + tooltipDecrement?: string; + tooltipIncrement?: string; + }; + onAsyncValidatorsChanged: ((event: JetElementCustomEvent) => any) | null; + onAutocompleteChanged: ((event: JetElementCustomEvent) => any) | null; + onAutofocusChanged: ((event: JetElementCustomEvent) => any) | null; + onConverterChanged: ((event: JetElementCustomEvent) => any) | null; + onMaxChanged: ((event: JetElementCustomEvent) => any) | null; + onMinChanged: ((event: JetElementCustomEvent) => any) | null; + onPlaceholderChanged: ((event: JetElementCustomEvent) => any) | null; + onRawValueChanged: ((event: JetElementCustomEvent) => any) | null; + onReadonlyChanged: ((event: JetElementCustomEvent) => any) | null; + onRequiredChanged: ((event: JetElementCustomEvent) => any) | null; + onStepChanged: ((event: JetElementCustomEvent) => any) | null; + onValidatorsChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onVirtualKeyboardChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojInputNumber.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojInputNumber.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputNumberEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojInputNumber[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojInputNumberSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojInputNumberSettablePropertiesLenient): void; + refresh(): void; + stepDown(steps?: number): void; + stepUp(steps?: number): void; + validate(): Promise; +} +export namespace ojInputNumber { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojInputNumberEventMap extends editableValueEventMap { + 'ojAnimateEnd': ojInputNumber.ojAnimateEnd; + 'ojAnimateStart': ojInputNumber.ojAnimateStart; + 'asyncValidatorsChanged': JetElementCustomEvent; + 'autocompleteChanged': JetElementCustomEvent; + 'autofocusChanged': JetElementCustomEvent; + 'converterChanged': JetElementCustomEvent; + 'maxChanged': JetElementCustomEvent; + 'minChanged': JetElementCustomEvent; + 'placeholderChanged': JetElementCustomEvent; + 'rawValueChanged': JetElementCustomEvent; + 'readonlyChanged': JetElementCustomEvent; + 'requiredChanged': JetElementCustomEvent; + 'stepChanged': JetElementCustomEvent; + 'validatorsChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; + 'virtualKeyboardChanged': JetElementCustomEvent; +} +export interface ojInputNumberSettableProperties extends editableValueSettableProperties { + asyncValidators: Array>; + autocomplete: 'on' | 'off' | string; + autofocus: boolean; + converter: Converter | Validation.RegisteredConverter; + max: number | null; + min: number | null; + placeholder: string | null; + readonly rawValue: string; + readonly: boolean | null; + required: boolean; + step: number | null; + validators: Array | Validation.RegisteredValidator>; + value: number | null; + virtualKeyboard: 'auto' | 'number' | 'text'; + translations: { + numberRange?: { + hint?: { + exact?: string; + inRange?: string; + max?: string; + min?: string; + }; + messageDetail?: { + exact?: string; + rangeOverflow?: string; + rangeUnderflow?: string; + }; + messageSummary?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + }; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + tooltipDecrement?: string; + tooltipIncrement?: string; + }; +} +export interface ojInputNumberSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojinputtext/index.d.ts b/types/oraclejet/ojinputtext/index.d.ts new file mode 100644 index 0000000000..6caca00923 --- /dev/null +++ b/types/oraclejet/ojinputtext/index.d.ts @@ -0,0 +1,249 @@ +import { Converter, Validator, Validation, AsyncValidator } from '../ojvalidation-base'; +import { editableValue, editableValueEventMap, editableValueSettableProperties } from '../ojeditablevalue'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface inputBase, SV = V, RV = V> extends editableValue { + asyncValidators: Array>; + autocomplete: 'on' | 'off' | string; + autofocus: boolean; + placeholder: string; + readonly rawValue: RV; + readonly: boolean; + required: boolean; + validators: Array | Validation.RegisteredValidator> | null; + translations: { + regexp?: { + messageDetail?: string; + messageSummary?: string; + }; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + }; + onAsyncValidatorsChanged: ((event: JetElementCustomEvent["asyncValidators"]>) => any) | null; + onAutocompleteChanged: ((event: JetElementCustomEvent["autocomplete"]>) => any) | null; + onAutofocusChanged: ((event: JetElementCustomEvent["autofocus"]>) => any) | null; + onPlaceholderChanged: ((event: JetElementCustomEvent["placeholder"]>) => any) | null; + onRawValueChanged: ((event: JetElementCustomEvent["rawValue"]>) => any) | null; + onReadonlyChanged: ((event: JetElementCustomEvent["readonly"]>) => any) | null; + onRequiredChanged: ((event: JetElementCustomEvent["required"]>) => any) | null; + onValidatorsChanged: ((event: JetElementCustomEvent["validators"]>) => any) | null; + onOjAnimateEnd: ((event: inputBase.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: inputBase.ojAnimateStart) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: inputBaseEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): inputBase[T]; + getProperty(property: string): any; + setProperty>(property: T, value: inputBaseSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: inputBaseSettablePropertiesLenient): void; + refresh(): void; + validate(): Promise<'valid' | 'invalid'>; +} +export namespace inputBase { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface inputBaseEventMap, SV = V, RV = V> extends editableValueEventMap { + 'ojAnimateEnd': inputBase.ojAnimateEnd; + 'ojAnimateStart': inputBase.ojAnimateStart; + 'asyncValidatorsChanged': JetElementCustomEvent["asyncValidators"]>; + 'autocompleteChanged': JetElementCustomEvent["autocomplete"]>; + 'autofocusChanged': JetElementCustomEvent["autofocus"]>; + 'placeholderChanged': JetElementCustomEvent["placeholder"]>; + 'rawValueChanged': JetElementCustomEvent["rawValue"]>; + 'readonlyChanged': JetElementCustomEvent["readonly"]>; + 'requiredChanged': JetElementCustomEvent["required"]>; + 'validatorsChanged': JetElementCustomEvent["validators"]>; +} +export interface inputBaseSettableProperties extends editableValueSettableProperties { + asyncValidators: Array>; + autocomplete: 'on' | 'off' | string; + autofocus: boolean; + placeholder: string; + readonly rawValue: RV; + readonly: boolean; + required: boolean; + validators: Array | Validation.RegisteredValidator> | null; + translations: { + regexp?: { + messageDetail?: string; + messageSummary?: string; + }; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + }; +} +export interface inputBaseSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojInputPassword extends inputBase { + value: string | null; + translations: { + regexp?: { + messageDetail?: string; + messageSummary?: string; + }; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + }; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojInputPassword.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojInputPassword.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputPasswordEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojInputPassword[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojInputPasswordSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojInputPasswordSettablePropertiesLenient): void; +} +export namespace ojInputPassword { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojInputPasswordEventMap extends inputBaseEventMap { + 'ojAnimateEnd': ojInputPassword.ojAnimateEnd; + 'ojAnimateStart': ojInputPassword.ojAnimateStart; + 'valueChanged': JetElementCustomEvent; +} +export interface ojInputPasswordSettableProperties extends inputBaseSettableProperties { + value: string | null; + translations: { + regexp?: { + messageDetail?: string; + messageSummary?: string; + }; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + }; +} +export interface ojInputPasswordSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojInputText extends inputBase { + clearIcon: 'never' | 'always' | 'conditional'; + converter: Converter | Validation.RegisteredConverter | null; + list: string; + virtualKeyboard: 'auto' | 'email' | 'number' | 'search' | 'tel' | 'text' | 'url'; + onClearIconChanged: ((event: JetElementCustomEvent) => any) | null; + onConverterChanged: ((event: JetElementCustomEvent) => any) | null; + onListChanged: ((event: JetElementCustomEvent) => any) | null; + onVirtualKeyboardChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojInputText.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojInputText.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputTextEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojInputText[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojInputTextSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojInputTextSettablePropertiesLenient): void; +} +export namespace ojInputText { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojInputTextEventMap extends inputBaseEventMap { + 'ojAnimateEnd': ojInputText.ojAnimateEnd; + 'ojAnimateStart': ojInputText.ojAnimateStart; + 'clearIconChanged': JetElementCustomEvent; + 'converterChanged': JetElementCustomEvent; + 'listChanged': JetElementCustomEvent; + 'virtualKeyboardChanged': JetElementCustomEvent; +} +export interface ojInputTextSettableProperties extends inputBaseSettableProperties { + clearIcon: 'never' | 'always' | 'conditional'; + converter: Converter | Validation.RegisteredConverter | null; + list: string; + virtualKeyboard: 'auto' | 'email' | 'number' | 'search' | 'tel' | 'text' | 'url'; +} +export interface ojInputTextSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojTextArea extends inputBase { + converter: Converter | Validation.RegisteredConverter | null; + rows: number; + onConverterChanged: ((event: JetElementCustomEvent) => any) | null; + onRowsChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojTextArea.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojTextArea.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTextAreaEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojTextArea[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojTextAreaSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojTextAreaSettablePropertiesLenient): void; +} +export namespace ojTextArea { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojTextAreaEventMap extends inputBaseEventMap { + 'ojAnimateEnd': ojTextArea.ojAnimateEnd; + 'ojAnimateStart': ojTextArea.ojAnimateStart; + 'converterChanged': JetElementCustomEvent; + 'rowsChanged': JetElementCustomEvent; +} +export interface ojTextAreaSettableProperties extends inputBaseSettableProperties { + converter: Converter | Validation.RegisteredConverter | null; + rows: number; +} +export interface ojTextAreaSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojkeyset/index.d.ts b/types/oraclejet/ojkeyset/index.d.ts new file mode 100644 index 0000000000..7ffa8547b4 --- /dev/null +++ b/types/oraclejet/ojkeyset/index.d.ts @@ -0,0 +1,28 @@ +export class ExpandAllKeySet extends KeySet { + constructor(); + add(keys: Set | K[]): ExpandAllKeySet; + addAll(): ExpandAllKeySet; + clear(): ExpandedKeySet; + delete(keys: Set | K[]): ExpandAllKeySet; + deletedValues(): Set; + has(key: K): boolean; + isAddAll(): boolean; +} +export class ExpandedKeySet extends KeySet { + constructor(keys?: Set | K[]); + add(keys: Set | K[]): ExpandedKeySet; + addAll(): ExpandAllKeySet; + clear(): ExpandedKeySet; + delete(keys: Set | K[]): ExpandedKeySet; + has(key: K): boolean; + isAddAll(): boolean; + values(): Set; +} +export abstract class KeySet { + abstract add(keys: Set | K[]): KeySet; + abstract addAll(): KeySet; + abstract clear(): KeySet; + abstract delete(keys: Set | K[]): KeySet; + abstract has(key: K): boolean; + abstract isAddAll(): boolean; +} diff --git a/types/oraclejet/ojknockout-keyset/index.d.ts b/types/oraclejet/ojknockout-keyset/index.d.ts new file mode 100644 index 0000000000..55b1beebc0 --- /dev/null +++ b/types/oraclejet/ojknockout-keyset/index.d.ts @@ -0,0 +1,8 @@ +import { ExpandedKeySet, ExpandAllKeySet } from '../ojkeyset'; +export class ObservableExpandedKeySet { + constructor(initialValue?: ExpandedKeySet | ExpandAllKeySet); + add(keys: Set | K[]): ObservableExpandedKeySet; + addAll(): ObservableExpandedKeySet; + clear(): ObservableExpandedKeySet; + delete(keys: Set | K[]): ObservableExpandedKeySet; +} diff --git a/types/oraclejet/ojknockout-model/index.d.ts b/types/oraclejet/ojknockout-model/index.d.ts new file mode 100644 index 0000000000..f73c4773c7 --- /dev/null +++ b/types/oraclejet/ojknockout-model/index.d.ts @@ -0,0 +1,3 @@ +/// +/// +export function map(m: object, callback?: ((param0: object) => void), array?: boolean): Array> | KnockoutObservableArray; diff --git a/types/oraclejet/ojknockouttemplateutils/index.d.ts b/types/oraclejet/ojknockouttemplateutils/index.d.ts new file mode 100644 index 0000000000..3c307cb427 --- /dev/null +++ b/types/oraclejet/ojknockouttemplateutils/index.d.ts @@ -0,0 +1 @@ +export function getRenderer(template: string, bReplaceNode?: boolean): ((param0: object) => void); diff --git a/types/oraclejet/ojlabel/index.d.ts b/types/oraclejet/ojlabel/index.d.ts new file mode 100644 index 0000000000..f6b0de7c4f --- /dev/null +++ b/types/oraclejet/ojlabel/index.d.ts @@ -0,0 +1,48 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojLabel extends baseComponent { + for: string | null; + help: { + definition?: string | null; + source?: string | null; + }; + labelId: string | null; + showRequired: boolean | null; + translations: { + tooltipHelp?: string; + tooltipRequired?: string; + }; + onForChanged: ((event: JetElementCustomEvent) => any) | null; + onHelpChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelIdChanged: ((event: JetElementCustomEvent) => any) | null; + onShowRequiredChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojLabelEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojLabel[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojLabelSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojLabelSettablePropertiesLenient): void; + refresh(): void; +} +export interface ojLabelEventMap extends baseComponentEventMap { + 'forChanged': JetElementCustomEvent; + 'helpChanged': JetElementCustomEvent; + 'labelIdChanged': JetElementCustomEvent; + 'showRequiredChanged': JetElementCustomEvent; +} +export interface ojLabelSettableProperties extends baseComponentSettableProperties { + for: string | null; + help: { + definition?: string | null; + source?: string | null; + }; + labelId: string | null; + showRequired: boolean | null; + translations: { + tooltipHelp?: string; + tooltipRequired?: string; + }; +} +export interface ojLabelSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojlabelvalue/index.d.ts b/types/oraclejet/ojlabelvalue/index.d.ts new file mode 100644 index 0000000000..0f51f259a6 --- /dev/null +++ b/types/oraclejet/ojlabelvalue/index.d.ts @@ -0,0 +1,26 @@ +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojLabelValue extends JetElement { + labelEdge: 'start' | 'top' | 'inherit'; + labelWidth: string; + onLabelEdgeChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelWidthChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojLabelValueEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojLabelValue[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojLabelValueSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojLabelValueSettablePropertiesLenient): void; + refresh(): void; +} +export interface ojLabelValueEventMap extends HTMLElementEventMap { + 'labelEdgeChanged': JetElementCustomEvent; + 'labelWidthChanged': JetElementCustomEvent; +} +export interface ojLabelValueSettableProperties extends JetSettableProperties { + labelEdge: 'start' | 'top' | 'inherit'; + labelWidth: string; +} +export interface ojLabelValueSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojlegend/index.d.ts b/types/oraclejet/ojlegend/index.d.ts new file mode 100644 index 0000000000..609212c1a5 --- /dev/null +++ b/types/oraclejet/ojlegend/index.d.ts @@ -0,0 +1,286 @@ +import { KeySet } from '../ojkeyset'; +import { DataProvider } from '../ojdataprovider'; +import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojLegend extends dvtBaseComponent> { + as: string; + data: DataProvider | null; + drilling: 'on' | 'off'; + expanded: KeySet | null; + halign: 'center' | 'end' | 'start'; + hiddenCategories: string[]; + hideAndShowBehavior: 'on' | 'off'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + hoverBehaviorDelay: number; + orientation: 'horizontal' | 'vertical'; + scrolling: 'off' | 'asNeeded'; + symbolHeight: number; + symbolWidth: number; + textStyle?: object; + valign: 'middle' | 'bottom' | 'top'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onDrillingChanged: ((event: JetElementCustomEvent["drilling"]>) => any) | null; + onExpandedChanged: ((event: JetElementCustomEvent["expanded"]>) => any) | null; + onHalignChanged: ((event: JetElementCustomEvent["halign"]>) => any) | null; + onHiddenCategoriesChanged: ((event: JetElementCustomEvent["hiddenCategories"]>) => any) | null; + onHideAndShowBehaviorChanged: ((event: JetElementCustomEvent["hideAndShowBehavior"]>) => any) | null; + onHighlightedCategoriesChanged: ((event: JetElementCustomEvent["highlightedCategories"]>) => any) | null; + onHoverBehaviorChanged: ((event: JetElementCustomEvent["hoverBehavior"]>) => any) | null; + onHoverBehaviorDelayChanged: ((event: JetElementCustomEvent["hoverBehaviorDelay"]>) => any) | null; + onOrientationChanged: ((event: JetElementCustomEvent["orientation"]>) => any) | null; + onScrollingChanged: ((event: JetElementCustomEvent["scrolling"]>) => any) | null; + onSymbolHeightChanged: ((event: JetElementCustomEvent["symbolHeight"]>) => any) | null; + onSymbolWidthChanged: ((event: JetElementCustomEvent["symbolWidth"]>) => any) | null; + onTextStyleChanged: ((event: JetElementCustomEvent["textStyle"]>) => any) | null; + onValignChanged: ((event: JetElementCustomEvent["valign"]>) => any) | null; + onOjDrill: ((event: ojLegend.ojDrill) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojLegendEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojLegend[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojLegendSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojLegendSettablePropertiesLenient): void; + getContextByNode(node: Element): ojLegend.NodeContext | null; + getItem(subIdPath: any[]): ojLegend.ItemContext | null; + getPreferredSize(): ojLegend.PreferredSize | null; + getSection(subIdPath: any[]): ojLegend.SectionContext | null; +} +export namespace ojLegend { + interface ojDrill extends CustomEvent<{ + id: any; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type ItemContext = { + text: string; + }; + // tslint:disable-next-line interface-over-type-literal + type NodeContext = { + itemIndex: number; + sectionIndexPath: number[]; + subId: string; + }; + // tslint:disable-next-line interface-over-type-literal + type PreferredSize = { + width: number; + height: number; + }; + // tslint:disable-next-line interface-over-type-literal + type SectionContext = { + title: string; + sections: object[]; + items: object[]; + getSection: { + title: string; + sections: string; + items: boolean; + }; + getItems: { + text: string; + }; + }; +} +export interface ojLegendEventMap extends dvtBaseComponentEventMap> { + 'ojDrill': ojLegend.ojDrill; + 'asChanged': JetElementCustomEvent["as"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'drillingChanged': JetElementCustomEvent["drilling"]>; + 'expandedChanged': JetElementCustomEvent["expanded"]>; + 'halignChanged': JetElementCustomEvent["halign"]>; + 'hiddenCategoriesChanged': JetElementCustomEvent["hiddenCategories"]>; + 'hideAndShowBehaviorChanged': JetElementCustomEvent["hideAndShowBehavior"]>; + 'highlightedCategoriesChanged': JetElementCustomEvent["highlightedCategories"]>; + 'hoverBehaviorChanged': JetElementCustomEvent["hoverBehavior"]>; + 'hoverBehaviorDelayChanged': JetElementCustomEvent["hoverBehaviorDelay"]>; + 'orientationChanged': JetElementCustomEvent["orientation"]>; + 'scrollingChanged': JetElementCustomEvent["scrolling"]>; + 'symbolHeightChanged': JetElementCustomEvent["symbolHeight"]>; + 'symbolWidthChanged': JetElementCustomEvent["symbolWidth"]>; + 'textStyleChanged': JetElementCustomEvent["textStyle"]>; + 'valignChanged': JetElementCustomEvent["valign"]>; +} +export interface ojLegendSettableProperties extends dvtBaseComponentSettableProperties { + as: string; + data: DataProvider | null; + drilling: 'on' | 'off'; + expanded: KeySet | null; + halign: 'center' | 'end' | 'start'; + hiddenCategories: string[]; + hideAndShowBehavior: 'on' | 'off'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + hoverBehaviorDelay: number; + orientation: 'horizontal' | 'vertical'; + scrolling: 'off' | 'asNeeded'; + symbolHeight: number; + symbolWidth: number; + textStyle?: object; + valign: 'middle' | 'bottom' | 'top'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; +} +export interface ojLegendSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojLegendItem extends JetElement { + borderColor?: string; + categories?: string[]; + categoryVisibility?: 'hidden' | 'visible'; + color?: string; + drilling?: 'on' | 'off' | 'inherit'; + lineStyle?: 'dotted' | 'dashed' | 'solid'; + lineWidth?: number; + markerColor?: string; + markerShape: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + markerSvgClassName?: string; + markerSvgStyle?: object; + pattern?: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + shortDesc?: string; + source?: string; + svgClassName?: string; + svgStyle?: object; + symbolType?: 'line' | 'lineWithMarker' | 'image' | 'marker'; + text: string; + onBorderColorChanged: ((event: JetElementCustomEvent) => any) | null; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onCategoryVisibilityChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onDrillingChanged: ((event: JetElementCustomEvent) => any) | null; + onLineStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onLineWidthChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerColorChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerShapeChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onPatternChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onSymbolTypeChanged: ((event: JetElementCustomEvent) => any) | null; + onTextChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojLegendItemEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojLegendItem[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojLegendItemSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojLegendItemSettablePropertiesLenient): void; +} +export interface ojLegendItemEventMap extends HTMLElementEventMap { + 'borderColorChanged': JetElementCustomEvent; + 'categoriesChanged': JetElementCustomEvent; + 'categoryVisibilityChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'drillingChanged': JetElementCustomEvent; + 'lineStyleChanged': JetElementCustomEvent; + 'lineWidthChanged': JetElementCustomEvent; + 'markerColorChanged': JetElementCustomEvent; + 'markerShapeChanged': JetElementCustomEvent; + 'markerSvgClassNameChanged': JetElementCustomEvent; + 'markerSvgStyleChanged': JetElementCustomEvent; + 'patternChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'sourceChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'symbolTypeChanged': JetElementCustomEvent; + 'textChanged': JetElementCustomEvent; +} +export interface ojLegendItemSettableProperties extends JetSettableProperties { + borderColor?: string; + categories?: string[]; + categoryVisibility?: 'hidden' | 'visible'; + color?: string; + drilling?: 'on' | 'off' | 'inherit'; + lineStyle?: 'dotted' | 'dashed' | 'solid'; + lineWidth?: number; + markerColor?: string; + markerShape: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + markerSvgClassName?: string; + markerSvgStyle?: object; + pattern?: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + shortDesc?: string; + source?: string; + svgClassName?: string; + svgStyle?: object; + symbolType?: 'line' | 'lineWithMarker' | 'image' | 'marker'; + text: string; +} +export interface ojLegendItemSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojLegendSection extends JetElement { + collapsible?: 'on' | 'off'; + text?: string; + textHalign?: 'center' | 'end' | 'start'; + textStyle?: object; + onCollapsibleChanged: ((event: JetElementCustomEvent) => any) | null; + onTextChanged: ((event: JetElementCustomEvent) => any) | null; + onTextHalignChanged: ((event: JetElementCustomEvent) => any) | null; + onTextStyleChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojLegendSectionEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojLegendSection[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojLegendSectionSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojLegendSectionSettablePropertiesLenient): void; +} +export interface ojLegendSectionEventMap extends HTMLElementEventMap { + 'collapsibleChanged': JetElementCustomEvent; + 'textChanged': JetElementCustomEvent; + 'textHalignChanged': JetElementCustomEvent; + 'textStyleChanged': JetElementCustomEvent; +} +export interface ojLegendSectionSettableProperties extends JetSettableProperties { + collapsible?: 'on' | 'off'; + text?: string; + textHalign?: 'center' | 'end' | 'start'; + textStyle?: object; +} +export interface ojLegendSectionSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojlistdataproviderview/index.d.ts b/types/oraclejet/ojlistdataproviderview/index.d.ts new file mode 100644 index 0000000000..031611e08e --- /dev/null +++ b/types/oraclejet/ojlistdataproviderview/index.d.ts @@ -0,0 +1,25 @@ +import { DataProvider, SortCriterion, FetchByKeysParameters, ContainsKeysResults, FetchByKeysResults, FetchByOffsetParameters, FetchByOffsetResults, DataMapping, FetchListResult, + FetchListParameters } from '../ojdataprovider'; +declare class ListDataProviderView implements DataProvider { + dataMapping: DataMapping; + from: any; + offset: number; + sortCriteria: Array>; + constructor(dataProvider: DataProvider, options?: { + from?: object; + offset?: number; + sortCriteria?: Array>; + dataMapping?: DataMapping; + }); + addEventListener(eventType: string, listener: EventListener): void; + containsKeys(params: FetchByKeysParameters): Promise>; + dispatchEvent(evt: Event): boolean; + fetchByKeys(params: FetchByKeysParameters): Promise>; + fetchByOffset(params: FetchByOffsetParameters): Promise>; + fetchFirst(params?: FetchListParameters): AsyncIterable>; + getCapability(capabilityName: string): any; + getTotalSize(): Promise; + isEmpty(): 'yes' | 'no' | 'unknown'; + removeEventListener(eventType: string, listener: EventListener): void; +} +export = ListDataProviderView; diff --git a/types/oraclejet/ojlistview/index.d.ts b/types/oraclejet/ojlistview/index.d.ts new file mode 100644 index 0000000000..97a77c52ea --- /dev/null +++ b/types/oraclejet/ojlistview/index.d.ts @@ -0,0 +1,335 @@ +import { KeySet } from '../ojkeyset'; +import { DataProvider } from '../ojdataprovider'; +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojListView extends baseComponent> { + as: string; + currentItem: K; + data: DataProvider; + dnd: { + drag?: { + items: { + dataTypes?: string | string[]; + drag?: ((param0: Event) => void); + dragEnd?: ((param0: Event) => void); + dragStart?: ((param0: Event, param1: { + items: Element[]; + }) => void); + }; + }; + drop?: { + items: { + dataTypes?: string | string[]; + dragEnter?: ((param0: Event, param1: { + item: Element; + }) => void); + dragLeave?: ((param0: Event, param1: { + item: Element; + }) => void); + dragOver?: ((param0: Event, param1: { + item: Element; + }) => void); + drop?: ((param0: Event, param1: ojListView.ItemsDropContext) => void); + }; + }; + reorder: { + items: 'enabled' | 'disabled'; + }; + }; + drillMode: 'collapsible' | 'none'; + expanded: KeySet; + readonly firstSelectedItem: { + key: K; + data: D; + }; + groupHeaderPosition: 'static' | 'sticky'; + item: { + focusable?: ((param0: ojListView.ItemContext) => boolean) | boolean; + renderer?: ((param0: ojListView.ItemContext) => { + insert: Element | string; + } | undefined) | null; + selectable?: ((param0: ojListView.ItemContext) => boolean) | boolean; + }; + scrollPolicy: 'auto' | 'loadMoreOnScroll'; + scrollPolicyOptions: { + fetchSize?: number; + maxCount?: number; + scroller?: Element; + }; + scrollPosition: { + x?: number; + y?: number; + index?: number; + parent?: K; + key?: K; + offsetX?: number; + offsetY?: number; + }; + selection: K[]; + selectionMode: 'none' | 'single' | 'multiple'; + selectionRequired: boolean; + translations: { + accessibleNavigateSkipItems?: string; + accessibleReorderAfterItem?: string; + accessibleReorderBeforeItem?: string; + accessibleReorderInsideItem?: string; + accessibleReorderTouchInstructionText?: string; + indexerCharacters?: string; + labelCopy?: string; + labelCut?: string; + labelPaste?: string; + labelPasteAfter?: string; + labelPasteBefore?: string; + msgFetchingData?: string; + msgNoData?: string; + }; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onCurrentItemChanged: ((event: JetElementCustomEvent["currentItem"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onDndChanged: ((event: JetElementCustomEvent["dnd"]>) => any) | null; + onDrillModeChanged: ((event: JetElementCustomEvent["drillMode"]>) => any) | null; + onExpandedChanged: ((event: JetElementCustomEvent["expanded"]>) => any) | null; + onFirstSelectedItemChanged: ((event: JetElementCustomEvent["firstSelectedItem"]>) => any) | null; + onGroupHeaderPositionChanged: ((event: JetElementCustomEvent["groupHeaderPosition"]>) => any) | null; + onItemChanged: ((event: JetElementCustomEvent["item"]>) => any) | null; + onScrollPolicyChanged: ((event: JetElementCustomEvent["scrollPolicy"]>) => any) | null; + onScrollPolicyOptionsChanged: ((event: JetElementCustomEvent["scrollPolicyOptions"]>) => any) | null; + onScrollPositionChanged: ((event: JetElementCustomEvent["scrollPosition"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent["selectionMode"]>) => any) | null; + onSelectionRequiredChanged: ((event: JetElementCustomEvent["selectionRequired"]>) => any) | null; + onOjAnimateEnd: ((event: ojListView.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojListView.ojAnimateStart) => any) | null; + onOjBeforeCollapse: ((event: ojListView.ojBeforeCollapse) => any) | null; + onOjBeforeCurrentItem: ((event: ojListView.ojBeforeCurrentItem) => any) | null; + onOjBeforeExpand: ((event: ojListView.ojBeforeExpand) => any) | null; + onOjCollapse: ((event: ojListView.ojCollapse) => any) | null; + onOjCopy: ((event: ojListView.ojCopy) => any) | null; + onOjCut: ((event: ojListView.ojCut) => any) | null; + onOjExpand: ((event: ojListView.ojExpand) => any) | null; + onOjPaste: ((event: ojListView.ojPaste) => any) | null; + onOjReorder: ((event: ojListView.ojReorder) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojListViewEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojListView[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojListViewSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojListViewSettablePropertiesLenient): void; + getContextByNode(node: Element): ojListView.ContextByNode | null; + getDataForVisibleItem(context: { + key?: K; + index?: number; + parent?: Element; + }): D; + refresh(): void; + scrollToItem(item: { + key: K; + }): void; +} +export namespace ojListView { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } + interface ojBeforeCollapse extends CustomEvent<{ + key: K; + item: Element; + [propName: string]: any; + }> { + } + interface ojBeforeCurrentItem extends CustomEvent<{ + previousKey: K; + previousItem: Element; + key: K; + item: Element; + [propName: string]: any; + }> { + } + interface ojBeforeExpand extends CustomEvent<{ + key: K; + item: Element; + [propName: string]: any; + }> { + } + interface ojCollapse extends CustomEvent<{ + key: K; + item: Element; + [propName: string]: any; + }> { + } + interface ojCopy extends CustomEvent<{ + items: Element[]; + [propName: string]: any; + }> { + } + interface ojCut extends CustomEvent<{ + items: Element[]; + [propName: string]: any; + }> { + } + interface ojExpand extends CustomEvent<{ + key: K; + item: Element; + [propName: string]: any; + }> { + } + interface ojPaste extends CustomEvent<{ + item: Element; + [propName: string]: any; + }> { + } + interface ojReorder extends CustomEvent<{ + items: Element[]; + position: string; + reference: Element; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type ContextByNode = { + subId: string; + key: K; + index: number; + parent?: Element; + group?: boolean; + }; + // tslint:disable-next-line interface-over-type-literal + type ItemContext = { + datasource: DataProvider; + index: number; + key: K; + data: D; + parentElement: Element; + depth?: number; + parentKey?: K; + leaf?: boolean; + }; + // tslint:disable-next-line interface-over-type-literal + type ItemsDropContext = { + item: Element; + position: 'before' | 'after' | 'inside'; + reorder: boolean; + }; +} +export interface ojListViewEventMap extends baseComponentEventMap> { + 'ojAnimateEnd': ojListView.ojAnimateEnd; + 'ojAnimateStart': ojListView.ojAnimateStart; + 'ojBeforeCollapse': ojListView.ojBeforeCollapse; + 'ojBeforeCurrentItem': ojListView.ojBeforeCurrentItem; + 'ojBeforeExpand': ojListView.ojBeforeExpand; + 'ojCollapse': ojListView.ojCollapse; + 'ojCopy': ojListView.ojCopy; + 'ojCut': ojListView.ojCut; + 'ojExpand': ojListView.ojExpand; + 'ojPaste': ojListView.ojPaste; + 'ojReorder': ojListView.ojReorder; + 'asChanged': JetElementCustomEvent["as"]>; + 'currentItemChanged': JetElementCustomEvent["currentItem"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'dndChanged': JetElementCustomEvent["dnd"]>; + 'drillModeChanged': JetElementCustomEvent["drillMode"]>; + 'expandedChanged': JetElementCustomEvent["expanded"]>; + 'firstSelectedItemChanged': JetElementCustomEvent["firstSelectedItem"]>; + 'groupHeaderPositionChanged': JetElementCustomEvent["groupHeaderPosition"]>; + 'itemChanged': JetElementCustomEvent["item"]>; + 'scrollPolicyChanged': JetElementCustomEvent["scrollPolicy"]>; + 'scrollPolicyOptionsChanged': JetElementCustomEvent["scrollPolicyOptions"]>; + 'scrollPositionChanged': JetElementCustomEvent["scrollPosition"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'selectionModeChanged': JetElementCustomEvent["selectionMode"]>; + 'selectionRequiredChanged': JetElementCustomEvent["selectionRequired"]>; +} +export interface ojListViewSettableProperties extends baseComponentSettableProperties { + as: string; + currentItem: K; + data: DataProvider; + dnd: { + drag?: { + items: { + dataTypes?: string | string[]; + drag?: ((param0: Event) => void); + dragEnd?: ((param0: Event) => void); + dragStart?: ((param0: Event, param1: { + items: Element[]; + }) => void); + }; + }; + drop?: { + items: { + dataTypes?: string | string[]; + dragEnter?: ((param0: Event, param1: { + item: Element; + }) => void); + dragLeave?: ((param0: Event, param1: { + item: Element; + }) => void); + dragOver?: ((param0: Event, param1: { + item: Element; + }) => void); + drop?: ((param0: Event, param1: ojListView.ItemsDropContext) => void); + }; + }; + reorder: { + items: 'enabled' | 'disabled'; + }; + }; + drillMode: 'collapsible' | 'none'; + expanded: KeySet; + readonly firstSelectedItem: { + key: K; + data: D; + }; + groupHeaderPosition: 'static' | 'sticky'; + item: { + focusable?: ((param0: ojListView.ItemContext) => boolean) | boolean; + renderer?: ((param0: ojListView.ItemContext) => { + insert: Element | string; + } | undefined) | null; + selectable?: ((param0: ojListView.ItemContext) => boolean) | boolean; + }; + scrollPolicy: 'auto' | 'loadMoreOnScroll'; + scrollPolicyOptions: { + fetchSize?: number; + maxCount?: number; + scroller?: Element; + }; + scrollPosition: { + x?: number; + y?: number; + index?: number; + parent?: K; + key?: K; + offsetX?: number; + offsetY?: number; + }; + selection: K[]; + selectionMode: 'none' | 'single' | 'multiple'; + selectionRequired: boolean; + translations: { + accessibleNavigateSkipItems?: string; + accessibleReorderAfterItem?: string; + accessibleReorderBeforeItem?: string; + accessibleReorderInsideItem?: string; + accessibleReorderTouchInstructionText?: string; + indexerCharacters?: string; + labelCopy?: string; + labelCut?: string; + labelPaste?: string; + labelPasteAfter?: string; + labelPasteBefore?: string; + msgFetchingData?: string; + msgNoData?: string; + }; +} +export interface ojListViewSettablePropertiesLenient extends Partial> { + [key: string]: any; +} diff --git a/types/oraclejet/ojlocaledata/index.d.ts b/types/oraclejet/ojlocaledata/index.d.ts new file mode 100644 index 0000000000..980d4fa2de --- /dev/null +++ b/types/oraclejet/ojlocaledata/index.d.ts @@ -0,0 +1,7 @@ +export function getDayNames(type?: 'abbreviated' | 'narrow' | 'wide'): string[]; +export function getFirstDayOfWeek(): number; +export function getMonthNames(type?: 'abbreviated' | 'narrow' | 'wide'): string[]; +export function getWeekendEnd(): number; +export function getWeekendStart(): number; +export function isMonthPriorToYear(): boolean; +export function setBundle(bundle: object): void; diff --git a/types/oraclejet/ojlogger/index.d.ts b/types/oraclejet/ojlogger/index.d.ts new file mode 100644 index 0000000000..493f251f55 --- /dev/null +++ b/types/oraclejet/ojlogger/index.d.ts @@ -0,0 +1,10 @@ +export let LEVEL_ERROR: number; +export let LEVEL_INFO: number; +export let LEVEL_LOG: number; +export let LEVEL_NONE: number; +export let LEVEL_WARN: number; +export function error(...args: Array): void; +export function info(...args: Array): void; +export function log(...args: Array): void; +export function option(key?: object | string, value?: any): any; +export function warn(...args: Array): void; diff --git a/types/oraclejet/ojmasonrylayout/index.d.ts b/types/oraclejet/ojmasonrylayout/index.d.ts new file mode 100644 index 0000000000..0de1b7ccb7 --- /dev/null +++ b/types/oraclejet/ojmasonrylayout/index.d.ts @@ -0,0 +1,119 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojMasonryLayout extends baseComponent { + reorderHandle: string | null; + translations: { + labelCut?: string; + labelPasteAfter?: string; + labelPasteBefore?: string; + }; + onReorderHandleChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojMasonryLayout.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojMasonryLayout.ojAnimateStart) => any) | null; + onOjBeforeInsert: ((event: ojMasonryLayout.ojBeforeInsert) => any) | null; + onOjBeforeRemove: ((event: ojMasonryLayout.ojBeforeRemove) => any) | null; + onOjBeforeReorder: ((event: ojMasonryLayout.ojBeforeReorder) => any) | null; + onOjBeforeResize: ((event: ojMasonryLayout.ojBeforeResize) => any) | null; + onOjInsert: ((event: ojMasonryLayout.ojInsert) => any) | null; + onOjRemove: ((event: ojMasonryLayout.ojRemove) => any) | null; + onOjReorder: ((event: ojMasonryLayout.ojReorder) => any) | null; + onOjResize: ((event: ojMasonryLayout.ojResize) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojMasonryLayoutEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojMasonryLayout[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojMasonryLayoutSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojMasonryLayoutSettablePropertiesLenient): void; + insertTile(selector: string, index: number): void; + refresh(): void; + removeTile(selector: string): void; + resizeTile(selector: string, sizeStyleClass: string): void; +} +export namespace ojMasonryLayout { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } + interface ojBeforeInsert extends CustomEvent<{ + tile: Element; + index: number; + [propName: string]: any; + }> { + } + interface ojBeforeRemove extends CustomEvent<{ + tile: Element; + [propName: string]: any; + }> { + } + interface ojBeforeReorder extends CustomEvent<{ + tile: Element; + fromIndex: number; + [propName: string]: any; + }> { + } + interface ojBeforeResize extends CustomEvent<{ + tile: Element; + previousSizeStyleClass: string; + sizeStyleClass: string; + [propName: string]: any; + }> { + } + interface ojInsert extends CustomEvent<{ + tile: Element; + index: number; + [propName: string]: any; + }> { + } + interface ojRemove extends CustomEvent<{ + tile: Element; + [propName: string]: any; + }> { + } + interface ojReorder extends CustomEvent<{ + tile: Element; + fromIndex: number; + toIndex: number; + [propName: string]: any; + }> { + } + interface ojResize extends CustomEvent<{ + tile: Element; + previousSizeStyleClass: string; + sizeStyleClass: string; + [propName: string]: any; + }> { + } +} +export interface ojMasonryLayoutEventMap extends baseComponentEventMap { + 'ojAnimateEnd': ojMasonryLayout.ojAnimateEnd; + 'ojAnimateStart': ojMasonryLayout.ojAnimateStart; + 'ojBeforeInsert': ojMasonryLayout.ojBeforeInsert; + 'ojBeforeRemove': ojMasonryLayout.ojBeforeRemove; + 'ojBeforeReorder': ojMasonryLayout.ojBeforeReorder; + 'ojBeforeResize': ojMasonryLayout.ojBeforeResize; + 'ojInsert': ojMasonryLayout.ojInsert; + 'ojRemove': ojMasonryLayout.ojRemove; + 'ojReorder': ojMasonryLayout.ojReorder; + 'ojResize': ojMasonryLayout.ojResize; + 'reorderHandleChanged': JetElementCustomEvent; +} +export interface ojMasonryLayoutSettableProperties extends baseComponentSettableProperties { + reorderHandle: string | null; + translations: { + labelCut?: string; + labelPasteAfter?: string; + labelPasteBefore?: string; + }; +} +export interface ojMasonryLayoutSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojmenu/index.d.ts b/types/oraclejet/ojmenu/index.d.ts new file mode 100644 index 0000000000..b6b1c8a9cb --- /dev/null +++ b/types/oraclejet/ojmenu/index.d.ts @@ -0,0 +1,105 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojMenu extends baseComponent { + disabled: boolean; + openOptions: ojMenu.OpenOptions; + translations: { + ariaFocusSkipLink?: string; + labelCancel?: string; + }; + onDisabledChanged: ((event: JetElementCustomEvent) => any) | null; + onOpenOptionsChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAction: ((event: ojMenu.ojAction) => any) | null; + onOjAnimateEnd: ((event: ojMenu.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojMenu.ojAnimateStart) => any) | null; + onOjBeforeOpen: ((event: ojMenu.ojBeforeOpen) => any) | null; + onOjClose: ((event: ojMenu.ojClose) => any) | null; + onOjOpen: ((event: ojMenu.ojOpen) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojMenuEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojMenu[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojMenuSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojMenuSettablePropertiesLenient): void; + open(event?: object, openOptions?: ojMenu.OpenOptions): void; + refresh(): void; +} +export namespace ojMenu { + interface ojAction extends CustomEvent<{ + [propName: string]: any; + }> { + } + interface ojAnimateEnd extends CustomEvent<{ + element: Element; + action: 'open' | 'close'; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: 'open' | 'close'; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } + interface ojBeforeOpen extends CustomEvent<{ + [propName: string]: any; + }> { + } + interface ojClose extends CustomEvent<{ + event: Event; + [propName: string]: any; + }> { + } + interface ojOpen extends CustomEvent<{ + event: Event; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type OpenOptions = { + display?: string; + initialFocus?: string; + launcher?: string | Element; + position?: Position; + }; + // tslint:disable-next-line interface-over-type-literal + type Position = { + my?: PositionAlign; + at?: PositionAlign; + offset?: PositionPoint; + of?: string | PositionPoint; + collision?: 'flip' | 'fit' | 'flipfit' | 'flipcenter' | 'none'; + }; + // tslint:disable-next-line interface-over-type-literal + type PositionAlign = { + vertical?: 'top' | 'bottom' | 'center'; + horizontal?: 'start' | 'end' | 'left' | 'center' | 'bottom'; + }; + // tslint:disable-next-line interface-over-type-literal + type PositionPoint = { + x?: number; + y?: number; + }; +} +export interface ojMenuEventMap extends baseComponentEventMap { + 'ojAction': ojMenu.ojAction; + 'ojAnimateEnd': ojMenu.ojAnimateEnd; + 'ojAnimateStart': ojMenu.ojAnimateStart; + 'ojBeforeOpen': ojMenu.ojBeforeOpen; + 'ojClose': ojMenu.ojClose; + 'ojOpen': ojMenu.ojOpen; + 'disabledChanged': JetElementCustomEvent; + 'openOptionsChanged': JetElementCustomEvent; +} +export interface ojMenuSettableProperties extends baseComponentSettableProperties { + disabled: boolean; + openOptions: ojMenu.OpenOptions; + translations: { + ariaFocusSkipLink?: string; + labelCancel?: string; + }; +} +export interface ojMenuSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojmenuselectmany/index.d.ts b/types/oraclejet/ojmenuselectmany/index.d.ts new file mode 100644 index 0000000000..f79a0b985d --- /dev/null +++ b/types/oraclejet/ojmenuselectmany/index.d.ts @@ -0,0 +1,39 @@ +import { DataProvider } from '../ojdataprovider'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojMenuSelectMany extends JetElement { + disabled: boolean; + options: ojMenuSelectMany.Option[] | DataProvider | null; + value: any[]; + onDisabledChanged: ((event: JetElementCustomEvent) => any) | null; + onOptionsChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojMenuSelectManyEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojMenuSelectMany[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojMenuSelectManySettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojMenuSelectManySettablePropertiesLenient): void; +} +export interface ojMenuSelectManyEventMap extends HTMLElementEventMap { + 'disabledChanged': JetElementCustomEvent; + 'optionsChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojMenuSelectManySettableProperties extends JetSettableProperties { + disabled: boolean; + options: ojMenuSelectMany.Option[] | DataProvider | null; + value: any[]; +} +export interface ojMenuSelectManySettablePropertiesLenient extends Partial { + [key: string]: any; +} +export namespace ojMenuSelectMany { + // tslint:disable-next-line interface-over-type-literal + type Option = { + id?: string; + disabled?: boolean; + label: string; + value: any; + }; +} diff --git a/types/oraclejet/ojmessage/index.d.ts b/types/oraclejet/ojmessage/index.d.ts new file mode 100644 index 0000000000..55e905ba8d --- /dev/null +++ b/types/oraclejet/ojmessage/index.d.ts @@ -0,0 +1,80 @@ +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojMessage extends JetElement { + message: ojMessage.Message; + translations: { + categories?: { + confirmation?: string; + error?: string; + info?: string; + warning?: string; + }; + labelCloseIcon?: string; + }; + onMessageChanged: ((event: JetElementCustomEvent) => any) | null; + onTranslationsChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojMessage.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojMessage.ojAnimateStart) => any) | null; + onOjClose: ((event: ojMessage.ojClose) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojMessageEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojMessage[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojMessageSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojMessageSettablePropertiesLenient): void; + close(): void; +} +export namespace ojMessage { + interface ojAnimateEnd extends CustomEvent<{ + element: Element; + action: 'open' | 'close'; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + element: Element; + action: 'open' | 'close'; + endCallback: (() => void); + [propName: string]: any; + }> { + } + interface ojClose extends CustomEvent<{ + message: object; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type Message = { + icon?: string; + category?: string; + severity?: 'error' | 'warning' | 'confirmation' | 'info' | 'none'; + timestamp?: string; + summary?: string; + detail?: string; + autoTimeout?: number; + closeAffordance?: 'none' | 'defaults'; + sound?: string; + }; +} +export interface ojMessageEventMap extends HTMLElementEventMap { + 'ojAnimateEnd': ojMessage.ojAnimateEnd; + 'ojAnimateStart': ojMessage.ojAnimateStart; + 'ojClose': ojMessage.ojClose; + 'messageChanged': JetElementCustomEvent; + 'translationsChanged': JetElementCustomEvent; +} +export interface ojMessageSettableProperties extends JetSettableProperties { + message: ojMessage.Message; + translations: { + categories?: { + confirmation?: string; + error?: string; + info?: string; + warning?: string; + }; + labelCloseIcon?: string; + }; +} +export interface ojMessageSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojmessages/index.d.ts b/types/oraclejet/ojmessages/index.d.ts new file mode 100644 index 0000000000..0b410266a3 --- /dev/null +++ b/types/oraclejet/ojmessages/index.d.ts @@ -0,0 +1,73 @@ +import { DataProvider } from '../ojdataprovider'; +import { ojMessage } from '../ojmessage'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojMessages extends JetElement { + display: 'general' | 'notification'; + messages: ojMessage.Message[] | null | DataProvider; + position: ojMessages.Position | null; + translations: { + ariaLiveRegion?: { + navigationFromKeyboard?: string; + navigationToKeyboard?: string; + navigationToTouch?: string; + newMessage?: string; + }; + labelLandmark?: string; + }; + onDisplayChanged: ((event: JetElementCustomEvent) => any) | null; + onMessagesChanged: ((event: JetElementCustomEvent) => any) | null; + onPositionChanged: ((event: JetElementCustomEvent) => any) | null; + onTranslationsChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojMessagesEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojMessages[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojMessagesSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojMessagesSettablePropertiesLenient): void; + close(associated: object): void; + closeAll(closeFilter?: (message: ojMessage.Message) => boolean): void; +} +export interface ojMessagesEventMap extends HTMLElementEventMap { + 'displayChanged': JetElementCustomEvent; + 'messagesChanged': JetElementCustomEvent; + 'positionChanged': JetElementCustomEvent; + 'translationsChanged': JetElementCustomEvent; +} +export interface ojMessagesSettableProperties extends JetSettableProperties { + display: 'general' | 'notification'; + messages: ojMessage.Message[] | null | DataProvider; + position: ojMessages.Position | null; + translations: { + ariaLiveRegion?: { + navigationFromKeyboard?: string; + navigationToKeyboard?: string; + navigationToTouch?: string; + newMessage?: string; + }; + labelLandmark?: string; + }; +} +export interface ojMessagesSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export namespace ojMessages { + // tslint:disable-next-line interface-over-type-literal + type Position = { + my?: PositionAlign; + at?: PositionAlign; + offset?: PositionPoint; + of?: string | PositionPoint; + collision?: 'flip' | 'fit' | 'flipfit' | 'none'; + }; + // tslint:disable-next-line interface-over-type-literal + type PositionAlign = { + vertical?: 'top' | 'bottom' | 'center'; + horizontal?: 'start' | 'end' | 'left' | 'center' | 'bottom'; + }; + // tslint:disable-next-line interface-over-type-literal + type PositionPoint = { + x?: number; + y?: number; + }; +} diff --git a/types/oraclejet/ojmessaging/index.d.ts b/types/oraclejet/ojmessaging/index.d.ts new file mode 100644 index 0000000000..0af2305ef7 --- /dev/null +++ b/types/oraclejet/ojmessaging/index.d.ts @@ -0,0 +1,15 @@ +declare class Message { + detail: string; + severity: Message.SEVERITY_TYPE | Message.SEVERITY_LEVEL; + summary: string; + constructor(summary: string, detail: string, severity?: Message.SEVERITY_TYPE | Message.SEVERITY_LEVEL); + static getMaxSeverity(messages?: Message[]): Message.SEVERITY_LEVEL | -1; + static getSeverityLevel(severity?: Message.SEVERITY_TYPE | Message.SEVERITY_LEVEL): Message.SEVERITY_LEVEL; + static getSeverityType(level?: Message.SEVERITY_TYPE | Message.SEVERITY_LEVEL): Message.SEVERITY_TYPE; + static isValid(messages: Message[]): boolean; +} +declare namespace Message { + type SEVERITY_LEVEL = 5 | 4 | 3 | 2 | 1; + type SEVERITY_TYPE = "confirmation" | "info" | "warning" | "error" | "fatal"; +} +export = Message; diff --git a/types/oraclejet/ojmodel/index.d.ts b/types/oraclejet/ojmodel/index.d.ts new file mode 100644 index 0000000000..d2ffaf54f6 --- /dev/null +++ b/types/oraclejet/ojmodel/index.d.ts @@ -0,0 +1,280 @@ +export class Collection { + changes: number[]; + comparator: null | string | ((param0: Model, param1?: Model) => number); + customPagingOptions: ((response: object) => Collection.CustomPagingOptionsReturn | null) | null; + customURL: ((param0: string, param1: Collection, param2: object) => string | object | null) | null; + fetchSize: number; + hasMore: boolean; + lastFetchCount: number; + lastFetchSize: number; + length: number; + model: object; + modelLimit: number; + models: Model[]; + offset: number; + omitLanguageHeader: boolean; + parse: ((param0: object) => object); + sortDirection: number; + totalResults: number; + url: null | string | (() => string); + constructor(models?: Model[], options?: object); + static extend(properties?: { + parse?: (data: any) => any; + model?: Model; + url?: string; + initialize?: (models: Model[], options: object) => void; + comparator?: null | string | ((model1: Model, model2?: Model) => number); + fetchSize?: number; + modelLimit?: number; + [propName: string]: any; + }, classProperties?: object): any; + abort(): Promise; + add(m: Model | object | object[] | Model[], options?: { + silent?: boolean; + at?: number; + merge?: boolean; + sort?: boolean; + force?: boolean; + deferred?: boolean; + [propName: string]: any; + }): Promise | Model[]; + any(iterator: ((param0: object) => void), context?: object): boolean; + at(index: number, options?: { + fetchSize?: number; + deferred?: boolean; + [propName: string]: any; + }): Model | Promise | null; + clone(): Collection; + contains(model: object, options?: object): boolean | Promise; + create(attributes?: object, options?: { + silent?: boolean; + at?: number; + merge?: boolean; + sort?: boolean; + force?: boolean; + deferred?: boolean; + [propName: string]: any; + }): Model | boolean | Promise; + difference(...var_args: Model[][]): Model[]; + each(iterator: ((param0: Model) => void), context?: object): undefined; + fetch(options?: { + success?: (collection: Collection, response: any, options: object) => void; + error?: (collection: Collection, xhr: any, options: object) => void; + add?: boolean; + set?: boolean; + startIndex?: number; + startID?: any; + since?: any; + until?: any; + fetchSize?: number; + [propName: string]: any; + }): object; + filter(iterator: ((param0: Model) => void), context?: object): Model[]; + findWhere(attrs: object | object[], options?: { + deferred?: boolean; + [propName: string]: any; + }): Model | Promise; + first(n?: number, options?: object): Model[] | null | Promise; + get(id: object | string, options?: object): Model | null | Promise; + getByCid(clientId: string): Model | null; + groupBy(iterator: string | ((param0: Model) => object), context?: object): object; + include(model: object, options?: object): boolean | Promise; + indexBy(iterator: string | ((param0: Model) => void), context?: object): object; + indexOf(model: object, options?: object): number | Promise; + initial(n?: number): Model[]; + isEmpty(): boolean; + isRangeLocal(start: number, count: number): boolean; + last(n?: number, options?: object): Promise | Model[] | null; + lastIndexOf(model: Model, fromIndex?: number): number; + listenTo(otherObj: object, eventType: string, callback: (eventType: string, data: object) => void): undefined; + listenToOnce(otherObj: object, eventType: string, callback: (eventType: string, data: object) => void): undefined; + map(iterator: ((param0: Model) => object), context?: object): object[]; + max(iterator: ((param0: Model) => object), context?: object): object; + min(iterator: ((param0: object) => void), context?: object): object; + modelId(attrs: object): null | string; + next(n: number, options?: { + success?: (collection: Collection, response: any, options: object) => void; + error?: (collection: Collection, xhr: any, options: object) => void; + [propName: string]: any; + }): object | null; + off(eventType?: string | object, callback?: (eventType: string, data: object) => void, context?: object): undefined; + on(eventType: string | object, callback: (eventType: string, data: object) => void, context?: object): undefined; + once(eventType: string, callback: (eventType: string, data: object) => void, context?: object): undefined; + pluck(attr: string): object[]; + pop(options?: { + silent?: boolean; + deferred?: boolean; + [propName: string]: any; + }): Model | Promise; + previous(n: number, options?: { + success?: (collection: Collection, response: any, options: object) => void; + error?: (collection: Collection, xhr: any, options: object) => void; + [propName: string]: any; + }): object; + push(m: Model | object, options?: { + silent?: boolean; + at?: number; + merge?: boolean; + sort?: boolean; + force?: boolean; + deferred?: boolean; + [propName: string]: any; + }): Promise | undefined; + refresh(options?: { + silent?: boolean; + startIndex?: number; + [propName: string]: any; + }): Promise; + remove(m: Model | Model[], options?: object): Model[] | object; + reset(data?: object, options?: { + silent?: boolean; + [propName: string]: any; + }): Model | Model[]; + rest(n?: number, options?: object): object[] | Promise; + set(models: object, options?: { + add?: boolean; + remove?: boolean; + merge?: boolean; + silent?: boolean; + deferred?: boolean; + [propName: string]: any; + }): Promise | null; + setFetchSize(n: number): undefined; + setModelLimit(n: number): undefined; + setRangeLocal(start: number, count: number): Promise; + shift(options?: object): Model | Promise | null; + size(): number; + slice(start: number, end?: number, options?: object): Promise | Model[]; + sort(options?: { + silent?: boolean; + startIndex?: number; + [propName: string]: any; + }): Promise | null; + sortBy(iterator: string | ((param0: Model) => object), context?: object): Model[]; + sortedIndex(comparator: string | ((param0: Model, param1?: Model) => object)): number; + stopListening(otherObj?: object, eventType?: string, callback?: (eventType: string, data: object) => void): undefined; + sync(method: string, collection: Collection, options?: { + success?: (json?: any[]) => void; + error?: (xhr: any, status: any, error: any) => void; + [propName: string]: any; + }): object; + toJSON(): object[]; + trigger(eventType: string): undefined; + unshift(m: object, options?: { + silent?: boolean; + at?: number; + merge?: boolean; + sort?: boolean; + force?: boolean; + deferred?: boolean; + [propName: string]: any; + }): Promise | Model[]; + whenReady(): Promise; + where(attrs: object | object[], options?: object): Promise | Model[]; + whereToCollection(attrs: object | object[], options?: object): Collection | Promise; + without(...var_args: Model[]): Model[]; +} +export namespace Collection { + // tslint:disable-next-line interface-over-type-literal + type CustomPagingOptionsReturn = { + totalResults?: number; + limit?: number; + count?: number; + offset?: number; + hasMore?: boolean; + }; + // tslint:disable-next-line interface-over-type-literal + type SetRangeLocalPromise = { + start: number; + count: number; + models: Model[]; + }; +} +export class Model { + attributes: object; + customURL: ((param0: string, param1: Model, param2: object) => string | object | null) | null; + defaults: object; + id: string | null; + idAttribute: string | null; + omitLanguageHeader: boolean; + parse: ((param0: object) => object); + parseSave: ((param0: object) => object); + urlRoot: string | null; + validate: ((param0: object, param1: object) => string | object | null) | null; + validationError: string | object | null; + constructor(attributes?: object, options?: object); + static extend(properties?: { + parse?: (data: any) => any; + parseSave?: (data: any) => any; + urlRoot?: string; + initialize?: (models: Model[], options: object) => void; + validate?: null | object | string | ((attributes: object, options?: Model) => number); + [propName: string]: any; + }, classProperties?: object): any; + changedAttributes(attributes?: object): object | boolean; + clear(options?: object): Model | boolean; + clone(): Model; + destroy(options?: { + success?: (model: Model, response: any, options: object) => void; + error?: (model: Model, xhr: any, options: object) => void; + wait?: boolean; + [propName: string]: any; + }): boolean; + fetch(options?: { + success?: (model: Model, response: any, options: object) => void; + error?: (model: Model, xhr: any, options: object) => void; + [propName: string]: any; + }): object; + get(property: string): object; + has(property: string): boolean; + hasChanged(attribute?: string): boolean; + invert(): object; + isNew(): boolean; + isValid(): boolean; + keys(): object[]; + listenTo(otherObj: object, eventType: string, callback: (eventType: string, data: object) => void): undefined; + listenToOnce(otherObj: object, eventType: string, callback: (eventType: string, data: object) => void): undefined; + matches(attrs: object): ((param0: Model) => boolean); + off(eventType?: string | object, callback?: (eventType: string, data: object) => void, context?: object): undefined; + omit(keys: object[] | object): object; + on(eventType: string | object, callback: (eventType: string, data: object) => void, context?: object): undefined; + once(eventType: string, callback: (eventType: string, data: object) => void, context?: object): undefined; + pairs(): object; + pick(keys: object[] | object): object; + previous(attr: string): object; + previousAttributes(): object; + save(attributes?: object, options?: { + success?: (model: Model, response: any, options: object) => void; + error?: (model: Model, xhr: any, options: object) => void; + contentType?: string; + valdiate?: boolean; + wait?: boolean; + patch?: boolean; + attrs?: object; + [propName: string]: any; + }): object | boolean; + set(property: string | object, value?: object, options?: object): Model | boolean; + stopListening(otherObj?: object, eventType?: string, callback?: (eventType: string, data: object) => void): undefined; + sync(method: string, model: Model, options?: object): object; + toJSON(): object; + trigger(eventType: string): undefined; + unset(property: string, options?: object): boolean; + url(): string | null; + values(): object[]; +} +export class OAuth { + constructor(attributes: object, header: string); + cleanAccessTokenRequest(): undefined; + cleanAccessTokenResponse(): undefined; + clientCredentialGrant(): undefined; + getAccessTokenRequest(): object; + getAccessTokenResponse(): object; + getHeader(): object; + isInitialized(): boolean; + setAccessTokenRequest(data: object): undefined; + setAccessTokenResponse(data: object): undefined; +} +// tslint:disable-next-line no-unnecessary-class +export class URLError { + constructor(); +} diff --git a/types/oraclejet/ojmodule-element-utils/index.d.ts b/types/oraclejet/ojmodule-element-utils/index.d.ts new file mode 100644 index 0000000000..4489ac1f28 --- /dev/null +++ b/types/oraclejet/ojmodule-element-utils/index.d.ts @@ -0,0 +1,8 @@ +export function createView(options: { + viewPath: string; + require?: ((module: string) => any) | ((modules: string[], ready?: any, errback?: any) => void); +}): Promise; +export function createViewModel(options: { + viewModelPath: string; + require?: ((module: string) => any) | ((modules: string[], ready?: any, errback?: any) => void); +}): Promise; diff --git a/types/oraclejet/ojmodule-element/index.d.ts b/types/oraclejet/ojmodule-element/index.d.ts new file mode 100644 index 0000000000..693cb518f6 --- /dev/null +++ b/types/oraclejet/ojmodule-element/index.d.ts @@ -0,0 +1,89 @@ +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ModuleElementAnimation { + animate(context: { + node: Node; + isInitial: boolean; + oldViewModel: object; + newViewModel: object; + newViewParent: Node; + oldViewParent: Node; + removeOldView: () => undefined; + insertNewView: () => undefined; + oldDomNodes: any[]; + }): Promise; + canAnimate(context: { + node: Node; + isInitial: boolean; + oldViewModel: object; + newViewModel: object; + }): boolean; + prepareAnimation(context: { + node: Node; + isInitial: boolean; + oldViewModel: object; + newViewModel: object; + }): object; +} +export interface ojModule extends JetElement { + animation: object; + config: { + cleanupMode: 'onDisconnect' | 'none'; + view: Node[]; + viewModel: object; + }; + onAnimationChanged: ((event: JetElementCustomEvent) => any) | null; + onConfigChanged: ((event: JetElementCustomEvent) => any) | null; + onOjTransitionEnd: ((event: ojModule.ojTransitionEnd) => any) | null; + onOjTransitionStart: ((event: ojModule.ojTransitionStart) => any) | null; + onOjViewConnected: ((event: ojModule.ojViewConnected) => any) | null; + onOjViewDisconnected: ((event: ojModule.ojViewDisconnected) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojModuleEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojModule[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojModuleSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojModuleSettablePropertiesLenient): void; +} +export namespace ojModule { + interface ojTransitionEnd extends CustomEvent<{ + viewModel: object; + [propName: string]: any; + }> { + } + interface ojTransitionStart extends CustomEvent<{ + viewModel: object; + [propName: string]: any; + }> { + } + interface ojViewConnected extends CustomEvent<{ + viewModel: object; + [propName: string]: any; + }> { + } + interface ojViewDisconnected extends CustomEvent<{ + viewModel: object; + view: Node[]; + [propName: string]: any; + }> { + } +} +export interface ojModuleEventMap extends HTMLElementEventMap { + 'ojTransitionEnd': ojModule.ojTransitionEnd; + 'ojTransitionStart': ojModule.ojTransitionStart; + 'ojViewConnected': ojModule.ojViewConnected; + 'ojViewDisconnected': ojModule.ojViewDisconnected; + 'animationChanged': JetElementCustomEvent; + 'configChanged': JetElementCustomEvent; +} +export interface ojModuleSettableProperties extends JetSettableProperties { + animation: object; + config: { + cleanupMode: 'onDisconnect' | 'none'; + view: Node[]; + viewModel: object; + }; +} +export interface ojModuleSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojmoduleanimations/index.d.ts b/types/oraclejet/ojmoduleanimations/index.d.ts new file mode 100644 index 0000000000..65e98ba0a7 --- /dev/null +++ b/types/oraclejet/ojmoduleanimations/index.d.ts @@ -0,0 +1,34 @@ +import { ModuleElementAnimation } from '../ojmodule-element'; +import AnimationUtils = require('../ojanimation'); +export let coverStart: ModuleElementAnimation; +export let coverUp: ModuleElementAnimation; +export let fade: ModuleElementAnimation; +export let navChild: ModuleElementAnimation; +export let navParent: ModuleElementAnimation; +export let navSiblingEarlier: ModuleElementAnimation; +export let navSiblingLater: ModuleElementAnimation; +export let pushEnd: ModuleElementAnimation; +export let pushStart: ModuleElementAnimation; +export let revealDown: ModuleElementAnimation; +export let revealEnd: ModuleElementAnimation; +export let zoomIn: ModuleElementAnimation; +export let zoomOut: ModuleElementAnimation; +export function createAnimation(oldViewEffect: { + effect: AnimationUtils.AnimationMethods; + [key: string]: any; +} | AnimationUtils.AnimationMethods | null, newViewEffect: { + effect: AnimationUtils.AnimationMethods; + [key: string]: any; +} | AnimationUtils.AnimationMethods | null, newViewOnTop: boolean): ModuleElementAnimation; +export function switcher(callback: (param0: SwitcherCallBackParam) => Animations): ModuleElementAnimation; +// tslint:disable-next-line interface-over-type-literal +export type Animations = 'coverStart' | 'coverUp' | 'fade' | 'navChild' | 'navParent' | 'navSiblingEarlier' | 'navSiblingLater' | 'pushEnd' | 'pushStart' | 'revealDown' | 'revealEnd' | 'zoomIn' | + 'zoomOut'; +// tslint:disable-next-line interface-over-type-literal +export type SwitcherCallBackParam = { + node: Element; + valueAccessor: (() => any); + isInitial: boolean; + oldViewModel: any; + newViewModel: any; +}; diff --git a/types/oraclejet/ojnavigationlist/index.d.ts b/types/oraclejet/ojnavigationlist/index.d.ts new file mode 100644 index 0000000000..d18459c5ba --- /dev/null +++ b/types/oraclejet/ojnavigationlist/index.d.ts @@ -0,0 +1,360 @@ +import { KeySet } from '../ojkeyset'; +import { DataProvider } from '../ojdataprovider'; +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojNavigationList extends baseComponent> { + as: string; + currentItem: K; + data: DataProvider | null; + display: 'all' | 'icons'; + drillMode: 'none' | 'collapsible' | 'sliding'; + edge: 'top' | 'start'; + expanded: KeySet; + hierarchyMenuThreshold: number; + item: { + renderer?: (((context: ojNavigationList.ItemContext) => void) | null); + selectable?: (((context: ojNavigationList.ItemContext) => boolean) | boolean); + }; + overflow: 'popup' | 'hidden'; + rootLabel: string | null; + selection: K; + translations: { + defaultRootLabel?: string; + hierMenuBtnLabel?: string; + previousIcon?: string; + }; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onCurrentItemChanged: ((event: JetElementCustomEvent["currentItem"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onDisplayChanged: ((event: JetElementCustomEvent["display"]>) => any) | null; + onDrillModeChanged: ((event: JetElementCustomEvent["drillMode"]>) => any) | null; + onEdgeChanged: ((event: JetElementCustomEvent["edge"]>) => any) | null; + onExpandedChanged: ((event: JetElementCustomEvent["expanded"]>) => any) | null; + onHierarchyMenuThresholdChanged: ((event: JetElementCustomEvent["hierarchyMenuThreshold"]>) => any) | null; + onItemChanged: ((event: JetElementCustomEvent["item"]>) => any) | null; + onOverflowChanged: ((event: JetElementCustomEvent["overflow"]>) => any) | null; + onRootLabelChanged: ((event: JetElementCustomEvent["rootLabel"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onOjAnimateEnd: ((event: ojNavigationList.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojNavigationList.ojAnimateStart) => any) | null; + onOjBeforeCollapse: ((event: ojNavigationList.ojBeforeCollapse) => any) | null; + onOjBeforeCurrentItem: ((event: ojNavigationList.ojBeforeCurrentItem) => any) | null; + onOjBeforeExpand: ((event: ojNavigationList.ojBeforeExpand) => any) | null; + onOjBeforeSelect: ((event: ojNavigationList.ojBeforeSelect) => any) | null; + onOjCollapse: ((event: ojNavigationList.ojCollapse) => any) | null; + onOjExpand: ((event: ojNavigationList.ojExpand) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojNavigationListEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojNavigationList[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojNavigationListSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojNavigationListSettablePropertiesLenient): void; + getContextByNode(node: Element): ojNavigationList.NodeContext | null; + refresh(): void; +} +export namespace ojNavigationList { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } + interface ojBeforeCollapse extends CustomEvent<{ + key: any; + item: Element; + [propName: string]: any; + }> { + } + interface ojBeforeCurrentItem extends CustomEvent<{ + previousKey: any; + previousItem: Element; + key: any; + item: Element; + [propName: string]: any; + }> { + } + interface ojBeforeExpand extends CustomEvent<{ + key: any; + item: Element; + [propName: string]: any; + }> { + } + interface ojBeforeSelect extends CustomEvent<{ + key: any; + item: Element; + [propName: string]: any; + }> { + } + interface ojCollapse extends CustomEvent<{ + key: any; + item: Element; + [propName: string]: any; + }> { + } + interface ojExpand extends CustomEvent<{ + key: any; + item: Element; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type ItemContext = { + componentElement: Element; + datasource?: DataProvider; + index: number; + key: any; + data: any; + parentElement: Element; + }; + // tslint:disable-next-line interface-over-type-literal + type NodeContext = { + subId: string; + index: number; + key: K; + group: boolean; + parent?: Element; + }; +} +export interface ojNavigationListEventMap extends baseComponentEventMap> { + 'ojAnimateEnd': ojNavigationList.ojAnimateEnd; + 'ojAnimateStart': ojNavigationList.ojAnimateStart; + 'ojBeforeCollapse': ojNavigationList.ojBeforeCollapse; + 'ojBeforeCurrentItem': ojNavigationList.ojBeforeCurrentItem; + 'ojBeforeExpand': ojNavigationList.ojBeforeExpand; + 'ojBeforeSelect': ojNavigationList.ojBeforeSelect; + 'ojCollapse': ojNavigationList.ojCollapse; + 'ojExpand': ojNavigationList.ojExpand; + 'asChanged': JetElementCustomEvent["as"]>; + 'currentItemChanged': JetElementCustomEvent["currentItem"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'displayChanged': JetElementCustomEvent["display"]>; + 'drillModeChanged': JetElementCustomEvent["drillMode"]>; + 'edgeChanged': JetElementCustomEvent["edge"]>; + 'expandedChanged': JetElementCustomEvent["expanded"]>; + 'hierarchyMenuThresholdChanged': JetElementCustomEvent["hierarchyMenuThreshold"]>; + 'itemChanged': JetElementCustomEvent["item"]>; + 'overflowChanged': JetElementCustomEvent["overflow"]>; + 'rootLabelChanged': JetElementCustomEvent["rootLabel"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; +} +export interface ojNavigationListSettableProperties extends baseComponentSettableProperties { + as: string; + currentItem: K; + data: DataProvider | null; + display: 'all' | 'icons'; + drillMode: 'none' | 'collapsible' | 'sliding'; + edge: 'top' | 'start'; + expanded: KeySet; + hierarchyMenuThreshold: number; + item: { + renderer?: (((context: ojNavigationList.ItemContext) => void) | null); + selectable?: (((context: ojNavigationList.ItemContext) => boolean) | boolean); + }; + overflow: 'popup' | 'hidden'; + rootLabel: string | null; + selection: K; + translations: { + defaultRootLabel?: string; + hierMenuBtnLabel?: string; + previousIcon?: string; + }; +} +export interface ojNavigationListSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojTabBar extends baseComponent> { + as: string; + currentItem: any; + data: DataProvider | null; + display: 'all' | 'icons'; + edge: 'top' | 'bottom' | 'start' | 'end'; + item: { + renderer?: (((context: ojTabBar.ItemContext) => void) | null); + selectable?: (((context: ojTabBar.ItemContext) => boolean) | boolean); + }; + overflow: 'popup' | 'hidden'; + reorderable: 'enabled' | 'disabled'; + selection: any; + truncation: 'none' | 'progressive'; + translations: { + accessibleReorderAfterItem?: string; + accessibleReorderBeforeItem?: string; + accessibleReorderTouchInstructionText?: string; + labelCut?: string; + labelPasteAfter?: string; + labelPasteBefore?: string; + labelRemove?: string; + msgFetchingData?: string; + msgNoData?: string; + overflowItemLabel?: string; + removeCueText?: string; + selectedLabel?: string; + }; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onCurrentItemChanged: ((event: JetElementCustomEvent["currentItem"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onDisplayChanged: ((event: JetElementCustomEvent["display"]>) => any) | null; + onEdgeChanged: ((event: JetElementCustomEvent["edge"]>) => any) | null; + onItemChanged: ((event: JetElementCustomEvent["item"]>) => any) | null; + onOverflowChanged: ((event: JetElementCustomEvent["overflow"]>) => any) | null; + onReorderableChanged: ((event: JetElementCustomEvent["reorderable"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onTruncationChanged: ((event: JetElementCustomEvent["truncation"]>) => any) | null; + onOjAnimateEnd: ((event: ojTabBar.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojTabBar.ojAnimateStart) => any) | null; + onOjBeforeCurrentItem: ((event: ojTabBar.ojBeforeCurrentItem) => any) | null; + onOjBeforeDeselect: ((event: ojTabBar.ojBeforeDeselect) => any) | null; + onOjBeforeRemove: ((event: ojTabBar.ojBeforeRemove) => any) | null; + onOjBeforeSelect: ((event: ojTabBar.ojBeforeSelect) => any) | null; + onOjDeselect: ((event: ojTabBar.ojDeselect) => any) | null; + onOjRemove: ((event: ojTabBar.ojRemove) => any) | null; + onOjReorder: ((event: ojTabBar.ojReorder) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojTabBarEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojTabBar[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojTabBarSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojTabBarSettablePropertiesLenient): void; + getContextByNode(node: Element): ojTabBar.NodeContext | null; + refresh(): void; +} +export namespace ojTabBar { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } + interface ojBeforeCurrentItem extends CustomEvent<{ + previousKey: any; + previousItem: Element; + key: any; + item: Element; + [propName: string]: any; + }> { + } + interface ojBeforeDeselect extends CustomEvent<{ + fromKey: any; + fromItem: Element; + toKey: any; + toItem: Element; + [propName: string]: any; + }> { + } + interface ojBeforeRemove extends CustomEvent<{ + item: Element; + key: any; + [propName: string]: any; + }> { + } + interface ojBeforeSelect extends CustomEvent<{ + key: any; + item: Element; + [propName: string]: any; + }> { + } + interface ojDeselect extends CustomEvent<{ + fromKey: any; + fromItem: Element; + toKey: any; + toItem: Element; + [propName: string]: any; + }> { + } + interface ojRemove extends CustomEvent<{ + item: Element; + key: any; + [propName: string]: any; + }> { + } + interface ojReorder extends CustomEvent<{ + item: Element; + position: 'before' | 'after'; + reference: Element; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type ItemContext = { + componentElement: Element; + datasource?: DataProvider; + index: number; + key: K; + data: D; + parentElement: Element; + }; + // tslint:disable-next-line interface-over-type-literal + type NodeContext = { + subId: string; + index: number; + key: K; + }; +} +export interface ojTabBarEventMap extends baseComponentEventMap> { + 'ojAnimateEnd': ojTabBar.ojAnimateEnd; + 'ojAnimateStart': ojTabBar.ojAnimateStart; + 'ojBeforeCurrentItem': ojTabBar.ojBeforeCurrentItem; + 'ojBeforeDeselect': ojTabBar.ojBeforeDeselect; + 'ojBeforeRemove': ojTabBar.ojBeforeRemove; + 'ojBeforeSelect': ojTabBar.ojBeforeSelect; + 'ojDeselect': ojTabBar.ojDeselect; + 'ojRemove': ojTabBar.ojRemove; + 'ojReorder': ojTabBar.ojReorder; + 'asChanged': JetElementCustomEvent["as"]>; + 'currentItemChanged': JetElementCustomEvent["currentItem"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'displayChanged': JetElementCustomEvent["display"]>; + 'edgeChanged': JetElementCustomEvent["edge"]>; + 'itemChanged': JetElementCustomEvent["item"]>; + 'overflowChanged': JetElementCustomEvent["overflow"]>; + 'reorderableChanged': JetElementCustomEvent["reorderable"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'truncationChanged': JetElementCustomEvent["truncation"]>; +} +export interface ojTabBarSettableProperties extends baseComponentSettableProperties { + as: string; + currentItem: any; + data: DataProvider | null; + display: 'all' | 'icons'; + edge: 'top' | 'bottom' | 'start' | 'end'; + item: { + renderer?: (((context: ojTabBar.ItemContext) => void) | null); + selectable?: (((context: ojTabBar.ItemContext) => boolean) | boolean); + }; + overflow: 'popup' | 'hidden'; + reorderable: 'enabled' | 'disabled'; + selection: any; + truncation: 'none' | 'progressive'; + translations: { + accessibleReorderAfterItem?: string; + accessibleReorderBeforeItem?: string; + accessibleReorderTouchInstructionText?: string; + labelCut?: string; + labelPasteAfter?: string; + labelPasteBefore?: string; + labelRemove?: string; + msgFetchingData?: string; + msgNoData?: string; + overflowItemLabel?: string; + removeCueText?: string; + selectedLabel?: string; + }; +} +export interface ojTabBarSettablePropertiesLenient extends Partial> { + [key: string]: any; +} diff --git a/types/oraclejet/ojnbox/index.d.ts b/types/oraclejet/ojnbox/index.d.ts new file mode 100644 index 0000000000..9b7f31cdad --- /dev/null +++ b/types/oraclejet/ojnbox/index.d.ts @@ -0,0 +1,490 @@ +import { DataProvider } from '../ojdataprovider'; +import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojNBox extends dvtBaseComponent> { + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + as: string; + cellContent: 'counts' | 'auto'; + cellMaximize: 'off' | 'on'; + cells: Promise | null; + columns: Promise | null; + columnsTitle: string; + countLabel: ((context: ojNBox.CountLabelContext) => (string | null)); + data: DataProvider | null; + groupAttributes: 'color' | 'indicatorColor' | 'indicatorIconColor' | 'indicatorIconPattern' | 'indicatorIconShape'; + groupBehavior: 'acrossCells' | 'none' | 'withinCell'; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + labelTruncation: 'ifRequired' | 'on'; + maximizedColumn: string; + maximizedRow: string; + otherColor: string; + otherThreshold: number; + rows: Promise | null; + rowsTitle: string; + selection: K[]; + selectionMode: 'none' | 'single' | 'multiple'; + styleDefaults: { + animationDuration: number; + cellDefaults: { + labelHalign: 'center' | 'end' | 'start'; + labelStyle: object; + maximizedSvgStyle: object; + minimizedSvgStyle: object; + showCount: 'on' | 'off' | 'auto'; + svgStyle: object; + }; + columnLabelStyle: object; + columnsTitleStyle: object; + hoverBehaviorDelay: number; + nodeDefaults: { + borderColor: string; + borderWidth: number; + color: string; + iconDefaults: { + borderColor: string; + borderRadius: string; + borderWidth: number; + color: string; + height: number; + opacity: number; + pattern: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + shape: 'circle' | 'ellipse' | 'square' | 'plus' | 'diamond' | 'triangleUp' | 'triangleDown' | 'human' | 'rectangle' | 'star'; + source: string; + width: number; + }; + indicatorColor: string; + indicatorIconDefaults: { + borderColor: string; + borderRadius: string; + borderWidth: number; + color: string; + height: number; + opacity: number; + pattern: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + shape: 'circle' | 'ellipse' | 'square' | 'plus' | 'diamond' | 'triangleUp' | 'triangleDown' | 'human' | 'rectangle' | 'star'; + source: string; + width: number; + }; + labelStyle: object; + secondaryLabelStyle: object; + }; + rowLabelStyle: object; + rowsTitleStyle: object; + }; + tooltip: { + renderer: ((context: ojNBox.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })) | null; + }; + touchResponse: 'touchStart' | 'auto'; + translations: { + componentName?: string; + highlightedCount?: string; + labelAdditionalData?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelGroup?: string; + labelInvalidData?: string; + labelNoData?: string; + labelOther?: string; + labelSize?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; + onAnimationOnDataChangeChanged: ((event: JetElementCustomEvent["animationOnDataChange"]>) => any) | null; + onAnimationOnDisplayChanged: ((event: JetElementCustomEvent["animationOnDisplay"]>) => any) | null; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onCellContentChanged: ((event: JetElementCustomEvent["cellContent"]>) => any) | null; + onCellMaximizeChanged: ((event: JetElementCustomEvent["cellMaximize"]>) => any) | null; + onCellsChanged: ((event: JetElementCustomEvent["cells"]>) => any) | null; + onColumnsChanged: ((event: JetElementCustomEvent["columns"]>) => any) | null; + onColumnsTitleChanged: ((event: JetElementCustomEvent["columnsTitle"]>) => any) | null; + onCountLabelChanged: ((event: JetElementCustomEvent["countLabel"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onGroupAttributesChanged: ((event: JetElementCustomEvent["groupAttributes"]>) => any) | null; + onGroupBehaviorChanged: ((event: JetElementCustomEvent["groupBehavior"]>) => any) | null; + onHiddenCategoriesChanged: ((event: JetElementCustomEvent["hiddenCategories"]>) => any) | null; + onHighlightMatchChanged: ((event: JetElementCustomEvent["highlightMatch"]>) => any) | null; + onHighlightedCategoriesChanged: ((event: JetElementCustomEvent["highlightedCategories"]>) => any) | null; + onHoverBehaviorChanged: ((event: JetElementCustomEvent["hoverBehavior"]>) => any) | null; + onLabelTruncationChanged: ((event: JetElementCustomEvent["labelTruncation"]>) => any) | null; + onMaximizedColumnChanged: ((event: JetElementCustomEvent["maximizedColumn"]>) => any) | null; + onMaximizedRowChanged: ((event: JetElementCustomEvent["maximizedRow"]>) => any) | null; + onOtherColorChanged: ((event: JetElementCustomEvent["otherColor"]>) => any) | null; + onOtherThresholdChanged: ((event: JetElementCustomEvent["otherThreshold"]>) => any) | null; + onRowsChanged: ((event: JetElementCustomEvent["rows"]>) => any) | null; + onRowsTitleChanged: ((event: JetElementCustomEvent["rowsTitle"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent["selectionMode"]>) => any) | null; + onStyleDefaultsChanged: ((event: JetElementCustomEvent["styleDefaults"]>) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent["tooltip"]>) => any) | null; + onTouchResponseChanged: ((event: JetElementCustomEvent["touchResponse"]>) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojNBoxEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojNBox[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojNBoxSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojNBoxSettablePropertiesLenient): void; + getCell(rowValue: string, columnValue: string): object | null; + getColumn(columnValue: string): object | null; + getColumnCount(): number; + getColumnsTitle(): string; + getContextByNode(node: Element): object | null; + getDialog(): object | null; + getGroupBehavior(): string; + getGroupNode(groupCategory: string): object | null; + getRow(rowValue: string): object | null; + getRowCount(): number; + getRowsTitle(): string; +} +export interface ojNBoxEventMap extends dvtBaseComponentEventMap> { + 'animationOnDataChangeChanged': JetElementCustomEvent["animationOnDataChange"]>; + 'animationOnDisplayChanged': JetElementCustomEvent["animationOnDisplay"]>; + 'asChanged': JetElementCustomEvent["as"]>; + 'cellContentChanged': JetElementCustomEvent["cellContent"]>; + 'cellMaximizeChanged': JetElementCustomEvent["cellMaximize"]>; + 'cellsChanged': JetElementCustomEvent["cells"]>; + 'columnsChanged': JetElementCustomEvent["columns"]>; + 'columnsTitleChanged': JetElementCustomEvent["columnsTitle"]>; + 'countLabelChanged': JetElementCustomEvent["countLabel"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'groupAttributesChanged': JetElementCustomEvent["groupAttributes"]>; + 'groupBehaviorChanged': JetElementCustomEvent["groupBehavior"]>; + 'hiddenCategoriesChanged': JetElementCustomEvent["hiddenCategories"]>; + 'highlightMatchChanged': JetElementCustomEvent["highlightMatch"]>; + 'highlightedCategoriesChanged': JetElementCustomEvent["highlightedCategories"]>; + 'hoverBehaviorChanged': JetElementCustomEvent["hoverBehavior"]>; + 'labelTruncationChanged': JetElementCustomEvent["labelTruncation"]>; + 'maximizedColumnChanged': JetElementCustomEvent["maximizedColumn"]>; + 'maximizedRowChanged': JetElementCustomEvent["maximizedRow"]>; + 'otherColorChanged': JetElementCustomEvent["otherColor"]>; + 'otherThresholdChanged': JetElementCustomEvent["otherThreshold"]>; + 'rowsChanged': JetElementCustomEvent["rows"]>; + 'rowsTitleChanged': JetElementCustomEvent["rowsTitle"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'selectionModeChanged': JetElementCustomEvent["selectionMode"]>; + 'styleDefaultsChanged': JetElementCustomEvent["styleDefaults"]>; + 'tooltipChanged': JetElementCustomEvent["tooltip"]>; + 'touchResponseChanged': JetElementCustomEvent["touchResponse"]>; +} +export interface ojNBoxSettableProperties extends dvtBaseComponentSettableProperties { + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + as: string; + cellContent: 'counts' | 'auto'; + cellMaximize: 'off' | 'on'; + cells: ojNBox.Cell[] | Promise | null; + columns: ojNBox.Column[] | Promise | null; + columnsTitle: string; + countLabel: ((context: ojNBox.CountLabelContext) => (string | null)); + data: DataProvider | null; + groupAttributes: 'color' | 'indicatorColor' | 'indicatorIconColor' | 'indicatorIconPattern' | 'indicatorIconShape'; + groupBehavior: 'acrossCells' | 'none' | 'withinCell'; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + labelTruncation: 'ifRequired' | 'on'; + maximizedColumn: string; + maximizedRow: string; + otherColor: string; + otherThreshold: number; + rows: ojNBox.Row[] | Promise | null; + rowsTitle: string; + selection: K[]; + selectionMode: 'none' | 'single' | 'multiple'; + styleDefaults: { + animationDuration: number; + cellDefaults: { + labelHalign: 'center' | 'end' | 'start'; + labelStyle: object; + maximizedSvgStyle: object; + minimizedSvgStyle: object; + showCount: 'on' | 'off' | 'auto'; + svgStyle: object; + }; + columnLabelStyle: object; + columnsTitleStyle: object; + hoverBehaviorDelay: number; + nodeDefaults: { + borderColor: string; + borderWidth: number; + color: string; + iconDefaults: { + borderColor: string; + borderRadius: string; + borderWidth: number; + color: string; + height: number; + opacity: number; + pattern: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + shape: 'circle' | 'ellipse' | 'square' | 'plus' | 'diamond' | 'triangleUp' | 'triangleDown' | 'human' | 'rectangle' | 'star'; + source: string; + width: number; + }; + indicatorColor: string; + indicatorIconDefaults: { + borderColor: string; + borderRadius: string; + borderWidth: number; + color: string; + height: number; + opacity: number; + pattern: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + shape: 'circle' | 'ellipse' | 'square' | 'plus' | 'diamond' | 'triangleUp' | 'triangleDown' | 'human' | 'rectangle' | 'star'; + source: string; + width: number; + }; + labelStyle: object; + secondaryLabelStyle: object; + }; + rowLabelStyle: object; + rowsTitleStyle: object; + }; + tooltip: { + renderer: ((context: ojNBox.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })) | null; + }; + touchResponse: 'touchStart' | 'auto'; + translations: { + componentName?: string; + highlightedCount?: string; + labelAdditionalData?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelGroup?: string; + labelInvalidData?: string; + labelNoData?: string; + labelOther?: string; + labelSize?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; +} +export interface ojNBoxSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export namespace ojNBox { + // tslint:disable-next-line interface-over-type-literal + type Cell = { + label?: string; + column: string; + labelHalign?: string; + labelStyle?: object; + svgClassName?: string; + svgStyle?: object; + maximizedSvgStyle?: object; + maximizedSvgClassName?: string; + minimizedSvgStyle?: object; + minimizedSvgClassName?: string; + row: string; + showCount?: 'on' | 'off' | 'auto' | string; + shortDesc?: string; + }; + // tslint:disable-next-line interface-over-type-literal + type Column = { + id: string; + label?: string; + labelStyle?: object; + }; + // tslint:disable-next-line interface-over-type-literal + type CountLabelContext = { + row: string; + column: string; + nodeCount: number; + totalNodeCount: number; + highlightedNodeCount: number; + }; + // tslint:disable-next-line interface-over-type-literal + type Row = { + id: string; + label?: string; + labelStyle?: object; + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + parentElement: Element; + id: K; + label: string; + secondaryLabel: string; + row: string; + column: string; + color: string; + indicatorColor: string; + componentElement: Element; + }; +} +export interface ojNBoxNode extends JetElement { + borderColor: string; + borderWidth: number; + categories: string[]; + color?: string; + column: string; + groupCategory?: string; + icon?: { + borderColor?: string; + borderRadius?: string; + borderWidth: number; + color?: string; + height?: number | null; + opacity: number; + pattern?: 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none' | 'mallChecker' | 'smallCrosshatch' | + 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle'; + shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + source?: string; + svgClassName: string; + svgStyle?: object; + width?: number | null; + }; + indicatorColor?: string; + indicatorIcon?: { + borderColor?: string; + borderRadius?: string; + borderWidth: number; + color?: string; + height?: number | null; + opacity: number; + pattern?: 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none' | 'smallChecker' | 'smallCrosshatch' | + 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle'; + shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + source?: string | null; + svgClassName: string; + svgStyle?: object | null; + width?: number | null; + }; + label: string; + row: string; + secondaryLabel: string; + shortDesc: string; + svgClassName: string; + svgStyle: object | null; + xPercentage?: number | null; + yPercentage?: number | null; + onBorderColorChanged: ((event: JetElementCustomEvent) => any) | null; + onBorderWidthChanged: ((event: JetElementCustomEvent) => any) | null; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onColumnChanged: ((event: JetElementCustomEvent) => any) | null; + onGroupCategoryChanged: ((event: JetElementCustomEvent) => any) | null; + onIconChanged: ((event: JetElementCustomEvent) => any) | null; + onIndicatorColorChanged: ((event: JetElementCustomEvent) => any) | null; + onIndicatorIconChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onRowChanged: ((event: JetElementCustomEvent) => any) | null; + onSecondaryLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onXPercentageChanged: ((event: JetElementCustomEvent) => any) | null; + onYPercentageChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojNBoxNodeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojNBoxNode[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojNBoxNodeSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojNBoxNodeSettablePropertiesLenient): void; +} +export interface ojNBoxNodeEventMap extends HTMLElementEventMap { + 'borderColorChanged': JetElementCustomEvent; + 'borderWidthChanged': JetElementCustomEvent; + 'categoriesChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'columnChanged': JetElementCustomEvent; + 'groupCategoryChanged': JetElementCustomEvent; + 'iconChanged': JetElementCustomEvent; + 'indicatorColorChanged': JetElementCustomEvent; + 'indicatorIconChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; + 'rowChanged': JetElementCustomEvent; + 'secondaryLabelChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'xPercentageChanged': JetElementCustomEvent; + 'yPercentageChanged': JetElementCustomEvent; +} +export interface ojNBoxNodeSettableProperties extends JetSettableProperties { + borderColor: string; + borderWidth: number; + categories: string[]; + color?: string; + column: string; + groupCategory?: string; + icon?: { + borderColor?: string; + borderRadius?: string; + borderWidth: number; + color?: string; + height?: number | null; + opacity: number; + pattern?: 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none' | 'mallChecker' | 'smallCrosshatch' | + 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle'; + shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + source?: string; + svgClassName: string; + svgStyle?: object; + width?: number | null; + }; + indicatorColor?: string; + indicatorIcon?: { + borderColor?: string; + borderRadius?: string; + borderWidth: number; + color?: string; + height?: number | null; + opacity: number; + pattern?: 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none' | 'smallChecker' | 'smallCrosshatch' | + 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle'; + shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + source?: string | null; + svgClassName: string; + svgStyle?: object | null; + width?: number | null; + }; + label: string; + row: string; + secondaryLabel: string; + shortDesc: string; + svgClassName: string; + svgStyle: object | null; + xPercentage?: number | null; + yPercentage?: number | null; +} +export interface ojNBoxNodeSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojoptgroup/index.d.ts b/types/oraclejet/ojoptgroup/index.d.ts new file mode 100644 index 0000000000..af7d72e004 --- /dev/null +++ b/types/oraclejet/ojoptgroup/index.d.ts @@ -0,0 +1,26 @@ +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojOptgroup extends JetElement { + disabled: boolean; + label: string; + onDisabledChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojOptgroupEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojOptgroup[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojOptgroupSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojOptgroupSettablePropertiesLenient): void; + refresh(): void; +} +export interface ojOptgroupEventMap extends HTMLElementEventMap { + 'disabledChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; +} +export interface ojOptgroupSettableProperties extends JetSettableProperties { + disabled: boolean; + label: string; +} +export interface ojOptgroupSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojoption/index.d.ts b/types/oraclejet/ojoption/index.d.ts new file mode 100644 index 0000000000..f969e1e320 --- /dev/null +++ b/types/oraclejet/ojoption/index.d.ts @@ -0,0 +1,26 @@ +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojOption extends JetElement { + disabled: boolean; + value: any; + onDisabledChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojOptionEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojOption[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojOptionSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojOptionSettablePropertiesLenient): void; + refresh(): void; +} +export interface ojOptionEventMap extends HTMLElementEventMap { + 'disabledChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojOptionSettableProperties extends JetSettableProperties { + disabled: boolean; + value: any; +} +export interface ojOptionSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojpictochart/index.d.ts b/types/oraclejet/ojpictochart/index.d.ts new file mode 100644 index 0000000000..caf85f6dee --- /dev/null +++ b/types/oraclejet/ojpictochart/index.d.ts @@ -0,0 +1,268 @@ +import { DataProvider } from '../ojdataprovider'; +import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojPictoChart extends dvtBaseComponent> { + animationDuration?: number; + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'popIn' | 'alphaFade' | 'zoom' | 'none'; + as: string; + columnCount: number | null; + columnWidth: number | null; + data: DataProvider | null; + drilling: 'on' | 'off'; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + hoverBehaviorDelay: number; + layout: 'vertical' | 'horizontal'; + layoutOrigin: 'topEnd' | 'bottomStart' | 'bottomEnd' | 'topStart'; + rowCount: number | null; + rowHeight: number | null; + selection: K[]; + selectionMode: 'single' | 'multiple' | 'none'; + tooltip: { + renderer: ((context: ojPictoChart.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })) | null; + }; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; + onAnimationDurationChanged: ((event: JetElementCustomEvent["animationDuration"]>) => any) | null; + onAnimationOnDataChangeChanged: ((event: JetElementCustomEvent["animationOnDataChange"]>) => any) | null; + onAnimationOnDisplayChanged: ((event: JetElementCustomEvent["animationOnDisplay"]>) => any) | null; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onColumnCountChanged: ((event: JetElementCustomEvent["columnCount"]>) => any) | null; + onColumnWidthChanged: ((event: JetElementCustomEvent["columnWidth"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onDrillingChanged: ((event: JetElementCustomEvent["drilling"]>) => any) | null; + onHiddenCategoriesChanged: ((event: JetElementCustomEvent["hiddenCategories"]>) => any) | null; + onHighlightMatchChanged: ((event: JetElementCustomEvent["highlightMatch"]>) => any) | null; + onHighlightedCategoriesChanged: ((event: JetElementCustomEvent["highlightedCategories"]>) => any) | null; + onHoverBehaviorChanged: ((event: JetElementCustomEvent["hoverBehavior"]>) => any) | null; + onHoverBehaviorDelayChanged: ((event: JetElementCustomEvent["hoverBehaviorDelay"]>) => any) | null; + onLayoutChanged: ((event: JetElementCustomEvent["layout"]>) => any) | null; + onLayoutOriginChanged: ((event: JetElementCustomEvent["layoutOrigin"]>) => any) | null; + onRowCountChanged: ((event: JetElementCustomEvent["rowCount"]>) => any) | null; + onRowHeightChanged: ((event: JetElementCustomEvent["rowHeight"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent["selectionMode"]>) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent["tooltip"]>) => any) | null; + onOjDrill: ((event: ojPictoChart.ojDrill) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojPictoChartEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojPictoChart[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojPictoChartSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojPictoChartSettablePropertiesLenient): void; + getContextByNode(node: Element): ojPictoChart.NodeContext | null; + getItem(index: number): ojPictoChart.ItemContext | null; + getItemCount(): number; +} +export namespace ojPictoChart { + interface ojDrill extends CustomEvent<{ + id: any; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type ItemContext = { + color: string; + count: number; + id: K; + name: string; + selected: boolean; + tooltip: string; + }; + // tslint:disable-next-line interface-over-type-literal + type NodeContext = { + subId: string; + index: number; + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + parentElement: Element; + id: K; + name: string; + count: number; + color: string; + componentElement: Element; + }; +} +export interface ojPictoChartEventMap extends dvtBaseComponentEventMap> { + 'ojDrill': ojPictoChart.ojDrill; + 'animationDurationChanged': JetElementCustomEvent["animationDuration"]>; + 'animationOnDataChangeChanged': JetElementCustomEvent["animationOnDataChange"]>; + 'animationOnDisplayChanged': JetElementCustomEvent["animationOnDisplay"]>; + 'asChanged': JetElementCustomEvent["as"]>; + 'columnCountChanged': JetElementCustomEvent["columnCount"]>; + 'columnWidthChanged': JetElementCustomEvent["columnWidth"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'drillingChanged': JetElementCustomEvent["drilling"]>; + 'hiddenCategoriesChanged': JetElementCustomEvent["hiddenCategories"]>; + 'highlightMatchChanged': JetElementCustomEvent["highlightMatch"]>; + 'highlightedCategoriesChanged': JetElementCustomEvent["highlightedCategories"]>; + 'hoverBehaviorChanged': JetElementCustomEvent["hoverBehavior"]>; + 'hoverBehaviorDelayChanged': JetElementCustomEvent["hoverBehaviorDelay"]>; + 'layoutChanged': JetElementCustomEvent["layout"]>; + 'layoutOriginChanged': JetElementCustomEvent["layoutOrigin"]>; + 'rowCountChanged': JetElementCustomEvent["rowCount"]>; + 'rowHeightChanged': JetElementCustomEvent["rowHeight"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'selectionModeChanged': JetElementCustomEvent["selectionMode"]>; + 'tooltipChanged': JetElementCustomEvent["tooltip"]>; +} +export interface ojPictoChartSettableProperties extends dvtBaseComponentSettableProperties { + animationDuration?: number; + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'popIn' | 'alphaFade' | 'zoom' | 'none'; + as: string; + columnCount: number | null; + columnWidth: number | null; + data: DataProvider | null; + drilling: 'on' | 'off'; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + hoverBehaviorDelay: number; + layout: 'vertical' | 'horizontal'; + layoutOrigin: 'topEnd' | 'bottomStart' | 'bottomEnd' | 'topStart'; + rowCount: number | null; + rowHeight: number | null; + selection: K[]; + selectionMode: 'single' | 'multiple' | 'none'; + tooltip: { + renderer: ((context: ojPictoChart.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })) | null; + }; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; +} +export interface ojPictoChartSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojPictoChartItem extends JetElement { + borderColor: string; + borderWidth: number; + categories: string[]; + color: string; + columnSpan: number; + count: number; + drilling: 'inherit' | 'off' | 'on'; + name: string; + rowSpan: number; + shape?: 'circle' | 'diamond' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | 'none' | string; + shortDesc: string; + source: string; + sourceHover: string; + sourceHoverSelected: string; + sourceSelected: string; + svgClassName: string; + svgStyle: object; + onBorderColorChanged: ((event: JetElementCustomEvent) => any) | null; + onBorderWidthChanged: ((event: JetElementCustomEvent) => any) | null; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onColumnSpanChanged: ((event: JetElementCustomEvent) => any) | null; + onCountChanged: ((event: JetElementCustomEvent) => any) | null; + onDrillingChanged: ((event: JetElementCustomEvent) => any) | null; + onNameChanged: ((event: JetElementCustomEvent) => any) | null; + onRowSpanChanged: ((event: JetElementCustomEvent) => any) | null; + onShapeChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceHoverChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceHoverSelectedChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceSelectedChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojPictoChartItemEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojPictoChartItem[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojPictoChartItemSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojPictoChartItemSettablePropertiesLenient): void; +} +export interface ojPictoChartItemEventMap extends HTMLElementEventMap { + 'borderColorChanged': JetElementCustomEvent; + 'borderWidthChanged': JetElementCustomEvent; + 'categoriesChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'columnSpanChanged': JetElementCustomEvent; + 'countChanged': JetElementCustomEvent; + 'drillingChanged': JetElementCustomEvent; + 'nameChanged': JetElementCustomEvent; + 'rowSpanChanged': JetElementCustomEvent; + 'shapeChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'sourceChanged': JetElementCustomEvent; + 'sourceHoverChanged': JetElementCustomEvent; + 'sourceHoverSelectedChanged': JetElementCustomEvent; + 'sourceSelectedChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; +} +export interface ojPictoChartItemSettableProperties extends JetSettableProperties { + borderColor: string; + borderWidth: number; + categories: string[]; + color: string; + columnSpan: number; + count: number; + drilling: 'inherit' | 'off' | 'on'; + name: string; + rowSpan: number; + shape?: 'circle' | 'diamond' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | 'none' | string; + shortDesc: string; + source: string; + sourceHover: string; + sourceHoverSelected: string; + sourceSelected: string; + svgClassName: string; + svgStyle: object; +} +export interface ojPictoChartItemSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojpopup/index.d.ts b/types/oraclejet/ojpopup/index.d.ts new file mode 100644 index 0000000000..9ade7e2c21 --- /dev/null +++ b/types/oraclejet/ojpopup/index.d.ts @@ -0,0 +1,128 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojPopup extends baseComponent { + autoDismiss: 'none' | 'focusLoss'; + chrome: 'default' | 'none'; + initialFocus: 'auto' | 'none' | 'firstFocusable' | 'popup'; + modality: 'modeless' | 'modal'; + position: ojPopup.Position; + tail: 'none' | 'simple'; + translations: { + ariaCloseSkipLink?: string; + ariaFocusSkipLink?: string; + ariaLiveRegionInitialFocusFirstFocusable?: string; + ariaLiveRegionInitialFocusFirstFocusableTouch?: string; + ariaLiveRegionInitialFocusNone?: string; + ariaLiveRegionInitialFocusNoneTouch?: string; + }; + onAutoDismissChanged: ((event: JetElementCustomEvent) => any) | null; + onChromeChanged: ((event: JetElementCustomEvent) => any) | null; + onInitialFocusChanged: ((event: JetElementCustomEvent) => any) | null; + onModalityChanged: ((event: JetElementCustomEvent) => any) | null; + onPositionChanged: ((event: JetElementCustomEvent) => any) | null; + onTailChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojPopup.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojPopup.ojAnimateStart) => any) | null; + onOjBeforeClose: ((event: ojPopup.ojBeforeClose) => any) | null; + onOjBeforeOpen: ((event: ojPopup.ojBeforeOpen) => any) | null; + onOjClose: ((event: ojPopup.ojClose) => any) | null; + onOjFocus: ((event: ojPopup.ojFocus) => any) | null; + onOjOpen: ((event: ojPopup.ojOpen) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojPopupEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojPopup[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojPopupSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojPopupSettablePropertiesLenient): void; + close(): void; + isOpen(): boolean; + open(launcher: string | Element, position?: ojPopup.Position): void; + refresh(): void; +} +export namespace ojPopup { + interface ojAnimateEnd extends CustomEvent<{ + element: Element; + action: 'open' | 'close'; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: 'open' | 'close'; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } + interface ojBeforeClose extends CustomEvent<{ + [propName: string]: any; + }> { + } + interface ojBeforeOpen extends CustomEvent<{ + [propName: string]: any; + }> { + } + interface ojClose extends CustomEvent<{ + [propName: string]: any; + }> { + } + interface ojFocus extends CustomEvent<{ + [propName: string]: any; + }> { + } + interface ojOpen extends CustomEvent<{ + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type Position = { + my?: PositionAlign; + at?: PositionAlign; + offset?: PositionPoint; + of?: string | PositionPoint; + collision?: 'flip' | 'fit' | 'flipfit' | 'flipcenter' | 'none'; + }; + // tslint:disable-next-line interface-over-type-literal + type PositionAlign = { + vertical?: 'top' | 'bottom' | 'center'; + horizontal?: 'start' | 'end' | 'left' | 'center' | 'bottom'; + }; + // tslint:disable-next-line interface-over-type-literal + type PositionPoint = { + x?: number; + y?: number; + }; +} +export interface ojPopupEventMap extends baseComponentEventMap { + 'ojAnimateEnd': ojPopup.ojAnimateEnd; + 'ojAnimateStart': ojPopup.ojAnimateStart; + 'ojBeforeClose': ojPopup.ojBeforeClose; + 'ojBeforeOpen': ojPopup.ojBeforeOpen; + 'ojClose': ojPopup.ojClose; + 'ojFocus': ojPopup.ojFocus; + 'ojOpen': ojPopup.ojOpen; + 'autoDismissChanged': JetElementCustomEvent; + 'chromeChanged': JetElementCustomEvent; + 'initialFocusChanged': JetElementCustomEvent; + 'modalityChanged': JetElementCustomEvent; + 'positionChanged': JetElementCustomEvent; + 'tailChanged': JetElementCustomEvent; +} +export interface ojPopupSettableProperties extends baseComponentSettableProperties { + autoDismiss: 'none' | 'focusLoss'; + chrome: 'default' | 'none'; + initialFocus: 'auto' | 'none' | 'firstFocusable' | 'popup'; + modality: 'modeless' | 'modal'; + position: ojPopup.Position; + tail: 'none' | 'simple'; + translations: { + ariaCloseSkipLink?: string; + ariaFocusSkipLink?: string; + ariaLiveRegionInitialFocusFirstFocusable?: string; + ariaLiveRegionInitialFocusFirstFocusableTouch?: string; + ariaLiveRegionInitialFocusNone?: string; + ariaLiveRegionInitialFocusNoneTouch?: string; + }; +} +export interface ojPopupSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojprogress/index.d.ts b/types/oraclejet/ojprogress/index.d.ts new file mode 100644 index 0000000000..779031816c --- /dev/null +++ b/types/oraclejet/ojprogress/index.d.ts @@ -0,0 +1,35 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojProgress extends baseComponent { + max: number; + type: 'bar' | 'circle'; + value: number; + translations: { + ariaIndeterminateProgressText?: string; + }; + onMaxChanged: ((event: JetElementCustomEvent) => any) | null; + onTypeChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojProgressEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojProgress[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojProgressSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojProgressSettablePropertiesLenient): void; +} +export interface ojProgressEventMap extends baseComponentEventMap { + 'maxChanged': JetElementCustomEvent; + 'typeChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojProgressSettableProperties extends baseComponentSettableProperties { + max: number; + type: 'bar' | 'circle'; + value: number; + translations: { + ariaIndeterminateProgressText?: string; + }; +} +export interface ojProgressSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojprogresslist/index.d.ts b/types/oraclejet/ojprogresslist/index.d.ts new file mode 100644 index 0000000000..22e91c465d --- /dev/null +++ b/types/oraclejet/ojprogresslist/index.d.ts @@ -0,0 +1,30 @@ +import { DataProvider } from '../ojdataprovider'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojProgressList extends JetElement { + data: DataProvider | null; + onDataChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojProgressListEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojProgressList[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojProgressListSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojProgressListSettablePropertiesLenient): void; +} +export interface ojProgressListEventMap extends HTMLElementEventMap { + 'dataChanged': JetElementCustomEvent; +} +export interface ojProgressListSettableProperties extends JetSettableProperties { + data: DataProvider | null; +} +export interface ojProgressListSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ProgressItem { + addEventListener(eventType: ProgressItem.EventType, listener: EventListener): void; + removeEventListener(eventType: ProgressItem.EventType, listener: EventListener): void; +} +export namespace ProgressItem { + type EventType = "loadstart" | "progress" | "abort" | "error" | "load" | "timeout" | "loadend"; + type Status = "queued" | "loadstarted" | "aborted" | "errored" | "timedout" | "loaded"; +} diff --git a/types/oraclejet/ojpulltorefresh/index.d.ts b/types/oraclejet/ojpulltorefresh/index.d.ts new file mode 100644 index 0000000000..86db5b3db1 --- /dev/null +++ b/types/oraclejet/ojpulltorefresh/index.d.ts @@ -0,0 +1,6 @@ +export function setupPullToRefresh(element: Element, refreshFunc: (() => Promise), options?: { + threshold?: number; + primaryText?: string; + secondaryText?: string; +}): void; +export function tearDownPullToRefresh(element: Element): void; diff --git a/types/oraclejet/ojradioset/index.d.ts b/types/oraclejet/ojradioset/index.d.ts new file mode 100644 index 0000000000..4b910c22fd --- /dev/null +++ b/types/oraclejet/ojradioset/index.d.ts @@ -0,0 +1,69 @@ +import { editableValue, editableValueEventMap, editableValueSettableProperties } from '../ojeditablevalue'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojRadioset extends editableValue { + disabled: boolean; + labelledBy: string | null; + required: boolean; + value: any; + translations: { + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + }; + onDisabledChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelledByChanged: ((event: JetElementCustomEvent) => any) | null; + onRequiredChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojRadioset.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojRadioset.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojRadiosetEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojRadioset[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojRadiosetSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojRadiosetSettablePropertiesLenient): void; + refresh(): void; + validate(): Promise; +} +export namespace ojRadioset { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojRadiosetEventMap extends editableValueEventMap { + 'ojAnimateEnd': ojRadioset.ojAnimateEnd; + 'ojAnimateStart': ojRadioset.ojAnimateStart; + 'disabledChanged': JetElementCustomEvent; + 'labelledByChanged': JetElementCustomEvent; + 'requiredChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojRadiosetSettableProperties extends editableValueSettableProperties { + disabled: boolean; + labelledBy: string | null; + required: boolean; + value: any; + translations: { + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + }; +} +export interface ojRadiosetSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojrefresher/index.d.ts b/types/oraclejet/ojrefresher/index.d.ts new file mode 100644 index 0000000000..a80f9cc805 --- /dev/null +++ b/types/oraclejet/ojrefresher/index.d.ts @@ -0,0 +1,33 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojRefresher extends baseComponent { + refreshContent: (() => Promise); + target: Element; + text: string; + threshold: number; + onRefreshContentChanged: ((event: JetElementCustomEvent) => any) | null; + onTargetChanged: ((event: JetElementCustomEvent) => any) | null; + onTextChanged: ((event: JetElementCustomEvent) => any) | null; + onThresholdChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojRefresherEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojRefresher[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojRefresherSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojRefresherSettablePropertiesLenient): void; +} +export interface ojRefresherEventMap extends baseComponentEventMap { + 'refreshContentChanged': JetElementCustomEvent; + 'targetChanged': JetElementCustomEvent; + 'textChanged': JetElementCustomEvent; + 'thresholdChanged': JetElementCustomEvent; +} +export interface ojRefresherSettableProperties extends baseComponentSettableProperties { + refreshContent: (() => Promise); + target: Element; + text: string; + threshold: number; +} +export interface ojRefresherSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojresponsiveknockoututils/index.d.ts b/types/oraclejet/ojresponsiveknockoututils/index.d.ts new file mode 100644 index 0000000000..6969cc607c --- /dev/null +++ b/types/oraclejet/ojresponsiveknockoututils/index.d.ts @@ -0,0 +1,4 @@ +/// +/// +export function createMediaQueryObservable(queryString: string): KnockoutObservable; +export function createScreenRangeObservable(): KnockoutObservable; diff --git a/types/oraclejet/ojresponsiveutils/index.d.ts b/types/oraclejet/ojresponsiveutils/index.d.ts new file mode 100644 index 0000000000..3fa2d5dab5 --- /dev/null +++ b/types/oraclejet/ojresponsiveutils/index.d.ts @@ -0,0 +1,4 @@ +export function compare(size1: SCREEN_RANGE, size2: SCREEN_RANGE): number; +export function getFrameworkQuery(frameworkQueryKey: FRAMEWORK_QUERY_KEY): string | null; +export type FRAMEWORK_QUERY_KEY = "sm-up" | "md-up" | "lg-up" | "xl-up" | "xxl-up" | "sm-only" | "md-only" | "lg-only" | "xl-only" | "md-down" | "lg-down" | "xl-down" | "high-resolution"; +export type SCREEN_RANGE = "sm" | "md" | "lg" | "xl" | "xxl"; diff --git a/types/oraclejet/ojrouter/index.d.ts b/types/oraclejet/ojrouter/index.d.ts new file mode 100644 index 0000000000..afe93fb476 --- /dev/null +++ b/types/oraclejet/ojrouter/index.d.ts @@ -0,0 +1,131 @@ +/// +/// +declare class Router { + readonly currentState: (() => RouterState | undefined); + readonly currentValue: (() => string | undefined); + defaultStateId: string | undefined; + static defaults: { + urlAdapter?: Router.urlPathAdapter | Router.urlParamAdapter; + baseUrl?: string; + rootInstanceName?: string; + }; + readonly direction: string | undefined; + readonly moduleConfig: { + name: KnockoutObservable; + params: { + ojRouter: { + parentRouter: Router; + direction: string; + }; + }; + lifecycleListener: { + attached: ((param0: string) => void); + }; + }; + readonly name: string; + readonly observableModuleConfig: KnockoutObservable; + readonly parent: Router | undefined; + static readonly rootInstance: Router; + readonly stateId: ((param0?: string) => string); + readonly states: RouterState[] | null; + static readonly transitionedToState: object; + static sync(): Promise<{ + hasChanged: boolean; + }>; + configure(option: { + [key: string]: RouterState.ConfigOptions; + } | ((id: string) => RouterState | undefined | null)): any; + createChildRouter(name: string, parentStateId?: string): Router; + dispose(): undefined; + getChildRouter(name: string): Router | undefined; + getCurrentChildRouter(): Router | undefined; + getState(stateId: string): RouterState | undefined; + go(stateIdPath?: string | string[], options?: { + historyUpdate: string; + }): Promise<{ + hasChanged: boolean; + }>; + retrieve(): any; + store(data: object): undefined; +} +declare namespace Router { + // tslint:disable-next-line interface-over-type-literal + type ModuleConfigType = { + name: KnockoutObservable; + params: { + ojRouter: { + parentRouter: Router; + direction: string; + parameters: object; + }; + }; + lifecycleListener: { + attached: ((param0: object) => void); + }; + }; + // tslint:disable-next-line no-unnecessary-class + class urlParamAdapter { + constructor(); + } + // tslint:disable-next-line no-unnecessary-class + class urlPathAdapter { + constructor(); + } + interface RouterState { + canEnter: (() => boolean) | (() => Promise); + canExit: (() => boolean) | (() => Promise); + enter: (() => void) | (() => Promise); + exit: (() => void) | (() => Promise); + readonly id: string; + label: string | undefined; + parameters: object; + title: string | (() => string | undefined); + value: any; + // constructor(id: string, options?: RouterState.ConfigOptions, router?: Router); + go(): Promise<{ + hasChanged: boolean; + }>; + isCurrent(): boolean; + } + namespace RouterState { + // tslint:disable-next-line interface-over-type-literal + type ConfigOptions = { + label?: string; + value?: any; + isDefault?: boolean; + canEnter?: (() => boolean) | (() => Promise); + enter?: (() => void) | (() => Promise); + canExit?: (() => boolean) | (() => Promise); + exit?: (() => void) | (() => Promise); + }; + } +} +export = Router; +declare class RouterState { + canEnter: (() => boolean) | (() => Promise); + canExit: (() => boolean) | (() => Promise); + enter: (() => void) | (() => Promise); + exit: (() => void) | (() => Promise); + readonly id: string; + label: string | undefined; + parameters: object; + title: string | (() => string | undefined); + value: any; + constructor(id: string, options?: RouterState.ConfigOptions, router?: Router); + go(): Promise<{ + hasChanged: boolean; + }>; + isCurrent(): boolean; +} +declare namespace RouterState { + // tslint:disable-next-line interface-over-type-literal + type ConfigOptions = { + label?: string; + value?: any; + isDefault?: boolean; + canEnter?: (() => boolean) | (() => Promise); + enter?: (() => void) | (() => Promise); + canExit?: (() => boolean) | (() => Promise); + exit?: (() => void) | (() => Promise); + }; +} diff --git a/types/oraclejet/ojselectcombobox/index.d.ts b/types/oraclejet/ojselectcombobox/index.d.ts new file mode 100644 index 0000000000..2444c99c4c --- /dev/null +++ b/types/oraclejet/ojselectcombobox/index.d.ts @@ -0,0 +1,714 @@ +import { Converter, Validator, Validation, AsyncValidator } from '../ojvalidation-base'; +import { DataProvider } from '../ojdataprovider'; +import { editableValue, editableValueEventMap, editableValueSettableProperties } from '../ojeditablevalue'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojCombobox, SV = V, RV = V> extends editableValue { + onOjAnimateEnd: ((event: ojCombobox.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojCombobox.ojAnimateStart) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojComboboxEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojCombobox[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojComboboxSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojComboboxSettablePropertiesLenient): void; + refresh(): void; + validate(): Promise; +} +export namespace ojCombobox { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type Optgroup = { + disabled?: boolean; + label: string; + children: Array<(Option | Optgroup)>; + }; + // tslint:disable-next-line interface-over-type-literal + type Option = { + disabled?: boolean; + label?: string; + value: any; + }; + // tslint:disable-next-line interface-over-type-literal + type OptionContext = { + component: Element; + parent: Element; + index: number; + depth: number; + leaf: boolean; + data: object; + parentElement: Element; + }; + // tslint:disable-next-line interface-over-type-literal + type OptionsKeys = { + label?: string; + value?: string; + children?: string; + childKeys?: OptionsKeys; + }; +} +export interface ojComboboxEventMap, SV = V, RV = V> extends editableValueEventMap { + 'ojAnimateEnd': ojCombobox.ojAnimateEnd; + 'ojAnimateStart': ojCombobox.ojAnimateStart; +} +// These interfaces are empty but required to keep the component chain intact. Avoid lint-rule +// tslint:disable-next-line no-empty-interface +export interface ojComboboxSettableProperties extends editableValueSettableProperties { +} +export interface ojComboboxSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojComboboxMany extends ojCombobox, any[] | null, string> { + asyncValidators: Array>; + converter: Converter | Validation.RegisteredConverter | null; + minLength: number; + optionRenderer?: ((param0: ojCombobox.OptionContext) => { + insert: Element; + } | undefined) | null; + options: Array | DataProvider | null; + optionsKeys: { + childKeys: { + label?: string; + value?: string; + children?: string; + childKeys?: ojCombobox.OptionsKeys; + }; + children?: string; + label?: string; + value?: string; + }; + pickerAttributes: { + style?: string; + class?: string; + }; + placeholder: string | null; + readonly rawValue: string | null; + required: boolean; + validators: Array | Validation.RegisteredValidator> | null; + value: any[] | null; + valueOptions: Array<{ + value: any; + label?: string; + }> | null; + translations: { + filterFurther?: string; + noMatchesFound?: string; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + }; + onAsyncValidatorsChanged: ((event: JetElementCustomEvent["asyncValidators"]>) => any) | null; + onConverterChanged: ((event: JetElementCustomEvent["converter"]>) => any) | null; + onMinLengthChanged: ((event: JetElementCustomEvent["minLength"]>) => any) | null; + onOptionRendererChanged: ((event: JetElementCustomEvent["optionRenderer"]>) => any) | null; + onOptionsChanged: ((event: JetElementCustomEvent["options"]>) => any) | null; + onOptionsKeysChanged: ((event: JetElementCustomEvent["optionsKeys"]>) => any) | null; + onPickerAttributesChanged: ((event: JetElementCustomEvent["pickerAttributes"]>) => any) | null; + onPlaceholderChanged: ((event: JetElementCustomEvent["placeholder"]>) => any) | null; + onRawValueChanged: ((event: JetElementCustomEvent["rawValue"]>) => any) | null; + onRequiredChanged: ((event: JetElementCustomEvent["required"]>) => any) | null; + onValidatorsChanged: ((event: JetElementCustomEvent["validators"]>) => any) | null; + onValueChanged: ((event: JetElementCustomEvent["value"]>) => any) | null; + onValueOptionsChanged: ((event: JetElementCustomEvent["valueOptions"]>) => any) | null; + onOjAnimateEnd: ((event: ojComboboxMany.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojComboboxMany.ojAnimateStart) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojComboboxManyEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojComboboxMany[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojComboboxManySettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojComboboxManySettablePropertiesLenient): void; +} +export namespace ojComboboxMany { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojComboboxManyEventMap extends ojComboboxEventMap, any[] | null, string> { + 'ojAnimateEnd': ojComboboxMany.ojAnimateEnd; + 'ojAnimateStart': ojComboboxMany.ojAnimateStart; + 'asyncValidatorsChanged': JetElementCustomEvent["asyncValidators"]>; + 'converterChanged': JetElementCustomEvent["converter"]>; + 'minLengthChanged': JetElementCustomEvent["minLength"]>; + 'optionRendererChanged': JetElementCustomEvent["optionRenderer"]>; + 'optionsChanged': JetElementCustomEvent["options"]>; + 'optionsKeysChanged': JetElementCustomEvent["optionsKeys"]>; + 'pickerAttributesChanged': JetElementCustomEvent["pickerAttributes"]>; + 'placeholderChanged': JetElementCustomEvent["placeholder"]>; + 'rawValueChanged': JetElementCustomEvent["rawValue"]>; + 'requiredChanged': JetElementCustomEvent["required"]>; + 'validatorsChanged': JetElementCustomEvent["validators"]>; + 'valueChanged': JetElementCustomEvent["value"]>; + 'valueOptionsChanged': JetElementCustomEvent["valueOptions"]>; +} +export interface ojComboboxManySettableProperties extends ojComboboxSettableProperties { + asyncValidators: Array>; + converter: Converter | Validation.RegisteredConverter | null; + minLength: number; + optionRenderer?: ((param0: ojCombobox.OptionContext) => { + insert: Element; + } | undefined) | null; + options: Array | DataProvider | null; + optionsKeys: { + childKeys: { + label?: string; + value?: string; + children?: string; + childKeys?: ojCombobox.OptionsKeys; + }; + children?: string; + label?: string; + value?: string; + }; + pickerAttributes: { + style?: string; + class?: string; + }; + placeholder: string | null; + readonly rawValue: string | null; + required: boolean; + validators: Array | Validation.RegisteredValidator> | null; + value: any[] | null; + valueOptions: Array<{ + value: any; + label?: string; + }> | null; + translations: { + filterFurther?: string; + noMatchesFound?: string; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + }; +} +export interface ojComboboxManySettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojComboboxOne extends ojCombobox, any, string> { + asyncValidators: Array>; + converter: Converter | Validation.RegisteredConverter | null; + filterOnOpen: 'none' | 'rawValue'; + minLength: number; + optionRenderer?: ((param0: ojCombobox.OptionContext) => { + insert: Element; + } | undefined) | null; + options: Array | DataProvider | null; + optionsKeys: { + childKeys: { + label?: string; + value?: string; + children?: string; + childKeys?: ojCombobox.OptionsKeys; + }; + children?: string; + label?: string; + value?: string; + }; + pickerAttributes: { + style?: string; + class?: string; + }; + placeholder: string | null; + readonly rawValue: string | null; + required: boolean; + validators: Array | Validation.RegisteredValidator> | null; + value: any; + valueOption: { + value: any; + label?: string; + }; + translations: { + filterFurther?: string; + noMatchesFound?: string; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + }; + onAsyncValidatorsChanged: ((event: JetElementCustomEvent["asyncValidators"]>) => any) | null; + onConverterChanged: ((event: JetElementCustomEvent["converter"]>) => any) | null; + onFilterOnOpenChanged: ((event: JetElementCustomEvent["filterOnOpen"]>) => any) | null; + onMinLengthChanged: ((event: JetElementCustomEvent["minLength"]>) => any) | null; + onOptionRendererChanged: ((event: JetElementCustomEvent["optionRenderer"]>) => any) | null; + onOptionsChanged: ((event: JetElementCustomEvent["options"]>) => any) | null; + onOptionsKeysChanged: ((event: JetElementCustomEvent["optionsKeys"]>) => any) | null; + onPickerAttributesChanged: ((event: JetElementCustomEvent["pickerAttributes"]>) => any) | null; + onPlaceholderChanged: ((event: JetElementCustomEvent["placeholder"]>) => any) | null; + onRawValueChanged: ((event: JetElementCustomEvent["rawValue"]>) => any) | null; + onRequiredChanged: ((event: JetElementCustomEvent["required"]>) => any) | null; + onValidatorsChanged: ((event: JetElementCustomEvent["validators"]>) => any) | null; + onValueChanged: ((event: JetElementCustomEvent["value"]>) => any) | null; + onValueOptionChanged: ((event: JetElementCustomEvent["valueOption"]>) => any) | null; + onOjAnimateEnd: ((event: ojComboboxOne.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojComboboxOne.ojAnimateStart) => any) | null; + onOjValueUpdated: ((event: ojComboboxOne.ojValueUpdated) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojComboboxOneEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojComboboxOne[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojComboboxOneSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojComboboxOneSettablePropertiesLenient): void; +} +export namespace ojComboboxOne { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } + interface ojValueUpdated extends CustomEvent<{ + value: any; + previousValue: any; + [propName: string]: any; + }> { + } +} +export interface ojComboboxOneEventMap extends ojComboboxEventMap, any, string> { + 'ojAnimateEnd': ojComboboxOne.ojAnimateEnd; + 'ojAnimateStart': ojComboboxOne.ojAnimateStart; + 'ojValueUpdated': ojComboboxOne.ojValueUpdated; + 'asyncValidatorsChanged': JetElementCustomEvent["asyncValidators"]>; + 'converterChanged': JetElementCustomEvent["converter"]>; + 'filterOnOpenChanged': JetElementCustomEvent["filterOnOpen"]>; + 'minLengthChanged': JetElementCustomEvent["minLength"]>; + 'optionRendererChanged': JetElementCustomEvent["optionRenderer"]>; + 'optionsChanged': JetElementCustomEvent["options"]>; + 'optionsKeysChanged': JetElementCustomEvent["optionsKeys"]>; + 'pickerAttributesChanged': JetElementCustomEvent["pickerAttributes"]>; + 'placeholderChanged': JetElementCustomEvent["placeholder"]>; + 'rawValueChanged': JetElementCustomEvent["rawValue"]>; + 'requiredChanged': JetElementCustomEvent["required"]>; + 'validatorsChanged': JetElementCustomEvent["validators"]>; + 'valueChanged': JetElementCustomEvent["value"]>; + 'valueOptionChanged': JetElementCustomEvent["valueOption"]>; +} +export interface ojComboboxOneSettableProperties extends ojComboboxSettableProperties { + asyncValidators: Array>; + converter: Converter | Validation.RegisteredConverter | null; + filterOnOpen: 'none' | 'rawValue'; + minLength: number; + optionRenderer?: ((param0: ojCombobox.OptionContext) => { + insert: Element; + } | undefined) | null; + options: Array | DataProvider | null; + optionsKeys: { + childKeys: { + label?: string; + value?: string; + children?: string; + childKeys?: ojCombobox.OptionsKeys; + }; + children?: string; + label?: string; + value?: string; + }; + pickerAttributes: { + style?: string; + class?: string; + }; + placeholder: string | null; + readonly rawValue: string | null; + required: boolean; + validators: Array | Validation.RegisteredValidator> | null; + value: any; + valueOption: { + value: any; + label?: string; + }; + translations: { + filterFurther?: string; + noMatchesFound?: string; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + }; +} +export interface ojComboboxOneSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojSelect, SV = V> extends editableValue { + onOjAnimateEnd: ((event: ojSelect.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojSelect.ojAnimateStart) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojSelectEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojSelect[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojSelectSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojSelectSettablePropertiesLenient): void; + refresh(): void; + validate(): Promise; +} +export namespace ojSelect { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type Optgroup = { + disabled?: boolean; + label: string; + children: Array<(Option | Optgroup)>; + }; + // tslint:disable-next-line interface-over-type-literal + type Option = { + disabled?: boolean; + label?: string; + value: any; + }; + // tslint:disable-next-line interface-over-type-literal + type OptionContext = { + component: Element; + parent: Element; + index: number; + depth: number; + leaf: boolean; + data: object; + parentElement: Element; + }; + // tslint:disable-next-line interface-over-type-literal + type OptionsKeys = { + label?: string; + value?: string; + children?: string; + childKeys?: OptionsKeys; + }; +} +export interface ojSelectEventMap, SV = V> extends editableValueEventMap { + 'ojAnimateEnd': ojSelect.ojAnimateEnd; + 'ojAnimateStart': ojSelect.ojAnimateStart; +} +// These interfaces are empty but required to keep the component chain intact. Avoid lint-rule +// tslint:disable-next-line no-empty-interface +export interface ojSelectSettableProperties extends editableValueSettableProperties { +} +export interface ojSelectSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojSelectMany extends ojSelect> { + minimumResultsForSearch: number; + optionRenderer?: ((param0: ojSelect.OptionContext) => { + insert: Element; + } | undefined) | null; + options: Array | DataProvider | null; + optionsKeys: { + childKeys?: { + label?: string; + value?: string; + children?: string; + childKeys?: ojSelect.OptionsKeys; + }; + children?: string; + label?: string; + value?: string; + }; + pickerAttributes: { + style?: string; + class?: string; + }; + placeholder: string | null; + renderMode: 'jet' | 'native'; + required: boolean; + value: any[] | null; + valueOptions: Array<{ + value: any; + label?: string; + }> | null; + translations: { + filterFurther?: string; + moreMatchesFound?: string; + noMatchesFound?: string; + oneMatchesFound?: string; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + searchField?: string; + }; + onMinimumResultsForSearchChanged: ((event: JetElementCustomEvent["minimumResultsForSearch"]>) => any) | null; + onOptionRendererChanged: ((event: JetElementCustomEvent["optionRenderer"]>) => any) | null; + onOptionsChanged: ((event: JetElementCustomEvent["options"]>) => any) | null; + onOptionsKeysChanged: ((event: JetElementCustomEvent["optionsKeys"]>) => any) | null; + onPickerAttributesChanged: ((event: JetElementCustomEvent["pickerAttributes"]>) => any) | null; + onPlaceholderChanged: ((event: JetElementCustomEvent["placeholder"]>) => any) | null; + onRenderModeChanged: ((event: JetElementCustomEvent["renderMode"]>) => any) | null; + onRequiredChanged: ((event: JetElementCustomEvent["required"]>) => any) | null; + onValueChanged: ((event: JetElementCustomEvent["value"]>) => any) | null; + onValueOptionsChanged: ((event: JetElementCustomEvent["valueOptions"]>) => any) | null; + onOjAnimateEnd: ((event: ojSelectMany.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojSelectMany.ojAnimateStart) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojSelectManyEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojSelectMany[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojSelectManySettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojSelectManySettablePropertiesLenient): void; +} +export namespace ojSelectMany { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojSelectManyEventMap extends ojSelectEventMap> { + 'ojAnimateEnd': ojSelectMany.ojAnimateEnd; + 'ojAnimateStart': ojSelectMany.ojAnimateStart; + 'minimumResultsForSearchChanged': JetElementCustomEvent["minimumResultsForSearch"]>; + 'optionRendererChanged': JetElementCustomEvent["optionRenderer"]>; + 'optionsChanged': JetElementCustomEvent["options"]>; + 'optionsKeysChanged': JetElementCustomEvent["optionsKeys"]>; + 'pickerAttributesChanged': JetElementCustomEvent["pickerAttributes"]>; + 'placeholderChanged': JetElementCustomEvent["placeholder"]>; + 'renderModeChanged': JetElementCustomEvent["renderMode"]>; + 'requiredChanged': JetElementCustomEvent["required"]>; + 'valueChanged': JetElementCustomEvent["value"]>; + 'valueOptionsChanged': JetElementCustomEvent["valueOptions"]>; +} +export interface ojSelectManySettableProperties extends ojSelectSettableProperties { + minimumResultsForSearch: number; + optionRenderer?: ((param0: ojSelect.OptionContext) => { + insert: Element; + } | undefined) | null; + options: Array | DataProvider | null; + optionsKeys: { + childKeys?: { + label?: string; + value?: string; + children?: string; + childKeys?: ojSelect.OptionsKeys; + }; + children?: string; + label?: string; + value?: string; + }; + pickerAttributes: { + style?: string; + class?: string; + }; + placeholder: string | null; + renderMode: 'jet' | 'native'; + required: boolean; + value: any[] | null; + valueOptions: Array<{ + value: any; + label?: string; + }> | null; + translations: { + filterFurther?: string; + moreMatchesFound?: string; + noMatchesFound?: string; + oneMatchesFound?: string; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + searchField?: string; + }; +} +export interface ojSelectManySettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojSelectOne extends ojSelect> { + minimumResultsForSearch: number; + optionRenderer?: ((param0: ojSelect.OptionContext) => { + insert: Element; + } | undefined) | null; + options: Array | DataProvider | null; + optionsKeys: { + childKeys?: { + label?: string; + value?: string; + children?: string; + childKeys?: ojSelect.OptionsKeys; + }; + children?: string; + label?: string; + value?: string; + }; + pickerAttributes: { + style?: string; + class?: string; + }; + placeholder: string | null; + renderMode: 'jet' | 'native'; + required: boolean; + value: any; + valueOption: { + value: any; + label?: string; + }; + translations: { + filterFurther?: string; + moreMatchesFound?: string; + noMatchesFound?: string; + oneMatchesFound?: string; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + searchField?: string; + }; + onMinimumResultsForSearchChanged: ((event: JetElementCustomEvent["minimumResultsForSearch"]>) => any) | null; + onOptionRendererChanged: ((event: JetElementCustomEvent["optionRenderer"]>) => any) | null; + onOptionsChanged: ((event: JetElementCustomEvent["options"]>) => any) | null; + onOptionsKeysChanged: ((event: JetElementCustomEvent["optionsKeys"]>) => any) | null; + onPickerAttributesChanged: ((event: JetElementCustomEvent["pickerAttributes"]>) => any) | null; + onPlaceholderChanged: ((event: JetElementCustomEvent["placeholder"]>) => any) | null; + onRenderModeChanged: ((event: JetElementCustomEvent["renderMode"]>) => any) | null; + onRequiredChanged: ((event: JetElementCustomEvent["required"]>) => any) | null; + onValueChanged: ((event: JetElementCustomEvent["value"]>) => any) | null; + onValueOptionChanged: ((event: JetElementCustomEvent["valueOption"]>) => any) | null; + onOjAnimateEnd: ((event: ojSelectOne.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojSelectOne.ojAnimateStart) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojSelectOneEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojSelectOne[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojSelectOneSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojSelectOneSettablePropertiesLenient): void; +} +export namespace ojSelectOne { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojSelectOneEventMap extends ojSelectEventMap> { + 'ojAnimateEnd': ojSelectOne.ojAnimateEnd; + 'ojAnimateStart': ojSelectOne.ojAnimateStart; + 'minimumResultsForSearchChanged': JetElementCustomEvent["minimumResultsForSearch"]>; + 'optionRendererChanged': JetElementCustomEvent["optionRenderer"]>; + 'optionsChanged': JetElementCustomEvent["options"]>; + 'optionsKeysChanged': JetElementCustomEvent["optionsKeys"]>; + 'pickerAttributesChanged': JetElementCustomEvent["pickerAttributes"]>; + 'placeholderChanged': JetElementCustomEvent["placeholder"]>; + 'renderModeChanged': JetElementCustomEvent["renderMode"]>; + 'requiredChanged': JetElementCustomEvent["required"]>; + 'valueChanged': JetElementCustomEvent["value"]>; + 'valueOptionChanged': JetElementCustomEvent["valueOption"]>; +} +export interface ojSelectOneSettableProperties extends ojSelectSettableProperties { + minimumResultsForSearch: number; + optionRenderer?: ((param0: ojSelect.OptionContext) => { + insert: Element; + } | undefined) | null; + options: Array | DataProvider | null; + optionsKeys: { + childKeys?: { + label?: string; + value?: string; + children?: string; + childKeys?: ojSelect.OptionsKeys; + }; + children?: string; + label?: string; + value?: string; + }; + pickerAttributes: { + style?: string; + class?: string; + }; + placeholder: string | null; + renderMode: 'jet' | 'native'; + required: boolean; + value: any; + valueOption: { + value: any; + label?: string; + }; + translations: { + filterFurther?: string; + moreMatchesFound?: string; + noMatchesFound?: string; + oneMatchesFound?: string; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + searchField?: string; + }; +} +export interface ojSelectOneSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface Optgroup { + children: Array<(Option | Optgroup)>; + disabled?: boolean; + label: string; +} +export interface Option { + disabled?: boolean; + label?: string; + value: object; +} diff --git a/types/oraclejet/ojslider/index.d.ts b/types/oraclejet/ojslider/index.d.ts new file mode 100644 index 0000000000..37d98b11f4 --- /dev/null +++ b/types/oraclejet/ojslider/index.d.ts @@ -0,0 +1,83 @@ +import { editableValue, editableValueEventMap, editableValueSettableProperties } from '../ojeditablevalue'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojSlider extends editableValue { + disabled: boolean; + max: number | null; + min: number | null; + orientation: 'horizontal' | 'vertical'; + step: number | null; + readonly transientValue: number; + type: 'fromMin' | 'fromMax' | 'single'; + value: number | null; + translations: { + invalidStep?: string; + maxMin?: string; + noValue?: string; + optionNum?: string; + valueRange?: string; + }; + onDisabledChanged: ((event: JetElementCustomEvent) => any) | null; + onMaxChanged: ((event: JetElementCustomEvent) => any) | null; + onMinChanged: ((event: JetElementCustomEvent) => any) | null; + onOrientationChanged: ((event: JetElementCustomEvent) => any) | null; + onStepChanged: ((event: JetElementCustomEvent) => any) | null; + onTransientValueChanged: ((event: JetElementCustomEvent) => any) | null; + onTypeChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojSlider.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojSlider.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSliderEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojSlider[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojSliderSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojSliderSettablePropertiesLenient): void; +} +export namespace ojSlider { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojSliderEventMap extends editableValueEventMap { + 'ojAnimateEnd': ojSlider.ojAnimateEnd; + 'ojAnimateStart': ojSlider.ojAnimateStart; + 'disabledChanged': JetElementCustomEvent; + 'maxChanged': JetElementCustomEvent; + 'minChanged': JetElementCustomEvent; + 'orientationChanged': JetElementCustomEvent; + 'stepChanged': JetElementCustomEvent; + 'transientValueChanged': JetElementCustomEvent; + 'typeChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojSliderSettableProperties extends editableValueSettableProperties { + disabled: boolean; + max: number | null; + min: number | null; + orientation: 'horizontal' | 'vertical'; + step: number | null; + readonly transientValue: number; + type: 'fromMin' | 'fromMax' | 'single'; + value: number | null; + translations: { + invalidStep?: string; + maxMin?: string; + noValue?: string; + optionNum?: string; + valueRange?: string; + }; +} +export interface ojSliderSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojsunburst/index.d.ts b/types/oraclejet/ojsunburst/index.d.ts new file mode 100644 index 0000000000..ebe8b4968e --- /dev/null +++ b/types/oraclejet/ojsunburst/index.d.ts @@ -0,0 +1,407 @@ +import { KeySet } from '../ojkeyset'; +import { DataProvider } from '../ojdataprovider'; +import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojSunburst extends dvtBaseComponent> { + animationDuration: number; + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + animationUpdateColor: string; + as: string; + colorLabel: string; + data: DataProvider | null; + displayLevels: number; + drilling: 'on' | 'off'; + expanded: KeySet; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + hoverBehaviorDelay: number; + nodeDefaults: { + borderColor: string; + borderWidth: number; + hoverColor: string; + labelDisplay: 'horizontal' | 'rotated' | 'off' | 'auto'; + labelHalign: 'inner' | 'outer' | 'center'; + labelMinLength: number; + labelStyle: object; + selectedInnerColor: string; + selectedOuterColor: string; + showDisclosure: 'on' | 'off'; + }; + rootNode: any; + rootNodeContent: { + renderer: ((context: ojSunburst.RootNodeContext) => ({ + insert: Element | string; + })); + }; + rotation: 'off' | 'on'; + selection: any[]; + selectionMode: 'none' | 'single' | 'multiple'; + sizeLabel: string; + sorting: 'on' | 'off'; + startAngle: number; + tooltip: { + renderer: ((context: ojSunburst.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + touchResponse: 'touchStart' | 'auto'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelColor?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + labelSize?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + tooltipCollapse?: string; + tooltipExpand?: string; + }; + onAnimationDurationChanged: ((event: JetElementCustomEvent["animationDuration"]>) => any) | null; + onAnimationOnDataChangeChanged: ((event: JetElementCustomEvent["animationOnDataChange"]>) => any) | null; + onAnimationOnDisplayChanged: ((event: JetElementCustomEvent["animationOnDisplay"]>) => any) | null; + onAnimationUpdateColorChanged: ((event: JetElementCustomEvent["animationUpdateColor"]>) => any) | null; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onColorLabelChanged: ((event: JetElementCustomEvent["colorLabel"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onDisplayLevelsChanged: ((event: JetElementCustomEvent["displayLevels"]>) => any) | null; + onDrillingChanged: ((event: JetElementCustomEvent["drilling"]>) => any) | null; + onExpandedChanged: ((event: JetElementCustomEvent["expanded"]>) => any) | null; + onHiddenCategoriesChanged: ((event: JetElementCustomEvent["hiddenCategories"]>) => any) | null; + onHighlightMatchChanged: ((event: JetElementCustomEvent["highlightMatch"]>) => any) | null; + onHighlightedCategoriesChanged: ((event: JetElementCustomEvent["highlightedCategories"]>) => any) | null; + onHoverBehaviorChanged: ((event: JetElementCustomEvent["hoverBehavior"]>) => any) | null; + onHoverBehaviorDelayChanged: ((event: JetElementCustomEvent["hoverBehaviorDelay"]>) => any) | null; + onNodeDefaultsChanged: ((event: JetElementCustomEvent["nodeDefaults"]>) => any) | null; + onRootNodeChanged: ((event: JetElementCustomEvent["rootNode"]>) => any) | null; + onRootNodeContentChanged: ((event: JetElementCustomEvent["rootNodeContent"]>) => any) | null; + onRotationChanged: ((event: JetElementCustomEvent["rotation"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent["selectionMode"]>) => any) | null; + onSizeLabelChanged: ((event: JetElementCustomEvent["sizeLabel"]>) => any) | null; + onSortingChanged: ((event: JetElementCustomEvent["sorting"]>) => any) | null; + onStartAngleChanged: ((event: JetElementCustomEvent["startAngle"]>) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent["tooltip"]>) => any) | null; + onTouchResponseChanged: ((event: JetElementCustomEvent["touchResponse"]>) => any) | null; + onOjBeforeCollapse: ((event: ojSunburst.ojBeforeCollapse) => any) | null; + onOjBeforeDrill: ((event: ojSunburst.ojBeforeDrill) => any) | null; + onOjBeforeExpand: ((event: ojSunburst.ojBeforeExpand) => any) | null; + onOjCollapse: ((event: ojSunburst.ojCollapse) => any) | null; + onOjDrill: ((event: ojSunburst.ojDrill) => any) | null; + onOjExpand: ((event: ojSunburst.ojExpand) => any) | null; + onOjRotateInput: ((event: ojSunburst.ojRotateInput) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojSunburstEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojSunburst[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojSunburstSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojSunburstSettablePropertiesLenient): void; + getContextByNode(node: Element): ojSunburst.NodeContext | null; + getNode(subIdPath: any[]): ojSunburst.DataContext | null; +} +export namespace ojSunburst { + interface ojBeforeCollapse extends CustomEvent<{ + id: any; + data: object; + itemData: object; + [propName: string]: any; + }> { + } + interface ojBeforeDrill extends CustomEvent<{ + id: any; + data: object; + itemData: object; + [propName: string]: any; + }> { + } + interface ojBeforeExpand extends CustomEvent<{ + id: any; + data: object; + itemData: object; + [propName: string]: any; + }> { + } + interface ojCollapse extends CustomEvent<{ + id: any; + data: object; + itemData: object; + [propName: string]: any; + }> { + } + interface ojDrill extends CustomEvent<{ + id: any; + data: object; + itemData: object; + [propName: string]: any; + }> { + } + interface ojExpand extends CustomEvent<{ + id: any; + data: object; + itemData: object; + [propName: string]: any; + }> { + } + interface ojRotateInput extends CustomEvent<{ + value: number; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type DataContext = { + color: string; + label: string; + selected: boolean; + size: number; + tooltip: string; + }; + // tslint:disable-next-line interface-over-type-literal + type NodeContext = { + subId: string; + indexPath: number[]; + }; + // tslint:disable-next-line interface-over-type-literal + type RootNodeContext = { + outerBounds: { + x: number; + y: number; + width: number; + height: number; + }; + innerBounds: { + x: number; + y: number; + width: number; + height: number; + }; + id: K; + data: object; + itemData: D; + componentElement: Element; + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + parentElement: Element; + id: K; + label: string; + value: number; + radius: number; + color: string; + data: object; + itemData: D; + componentElement: Element; + }; +} +export interface ojSunburstEventMap extends dvtBaseComponentEventMap> { + 'ojBeforeCollapse': ojSunburst.ojBeforeCollapse; + 'ojBeforeDrill': ojSunburst.ojBeforeDrill; + 'ojBeforeExpand': ojSunburst.ojBeforeExpand; + 'ojCollapse': ojSunburst.ojCollapse; + 'ojDrill': ojSunburst.ojDrill; + 'ojExpand': ojSunburst.ojExpand; + 'ojRotateInput': ojSunburst.ojRotateInput; + 'animationDurationChanged': JetElementCustomEvent["animationDuration"]>; + 'animationOnDataChangeChanged': JetElementCustomEvent["animationOnDataChange"]>; + 'animationOnDisplayChanged': JetElementCustomEvent["animationOnDisplay"]>; + 'animationUpdateColorChanged': JetElementCustomEvent["animationUpdateColor"]>; + 'asChanged': JetElementCustomEvent["as"]>; + 'colorLabelChanged': JetElementCustomEvent["colorLabel"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'displayLevelsChanged': JetElementCustomEvent["displayLevels"]>; + 'drillingChanged': JetElementCustomEvent["drilling"]>; + 'expandedChanged': JetElementCustomEvent["expanded"]>; + 'hiddenCategoriesChanged': JetElementCustomEvent["hiddenCategories"]>; + 'highlightMatchChanged': JetElementCustomEvent["highlightMatch"]>; + 'highlightedCategoriesChanged': JetElementCustomEvent["highlightedCategories"]>; + 'hoverBehaviorChanged': JetElementCustomEvent["hoverBehavior"]>; + 'hoverBehaviorDelayChanged': JetElementCustomEvent["hoverBehaviorDelay"]>; + 'nodeDefaultsChanged': JetElementCustomEvent["nodeDefaults"]>; + 'rootNodeChanged': JetElementCustomEvent["rootNode"]>; + 'rootNodeContentChanged': JetElementCustomEvent["rootNodeContent"]>; + 'rotationChanged': JetElementCustomEvent["rotation"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'selectionModeChanged': JetElementCustomEvent["selectionMode"]>; + 'sizeLabelChanged': JetElementCustomEvent["sizeLabel"]>; + 'sortingChanged': JetElementCustomEvent["sorting"]>; + 'startAngleChanged': JetElementCustomEvent["startAngle"]>; + 'tooltipChanged': JetElementCustomEvent["tooltip"]>; + 'touchResponseChanged': JetElementCustomEvent["touchResponse"]>; +} +export interface ojSunburstSettableProperties extends dvtBaseComponentSettableProperties { + animationDuration: number; + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + animationUpdateColor: string; + as: string; + colorLabel: string; + data: DataProvider | null; + displayLevels: number; + drilling: 'on' | 'off'; + expanded: KeySet; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + hoverBehaviorDelay: number; + nodeDefaults: { + borderColor: string; + borderWidth: number; + hoverColor: string; + labelDisplay: 'horizontal' | 'rotated' | 'off' | 'auto'; + labelHalign: 'inner' | 'outer' | 'center'; + labelMinLength: number; + labelStyle: object; + selectedInnerColor: string; + selectedOuterColor: string; + showDisclosure: 'on' | 'off'; + }; + rootNode: any; + rootNodeContent: { + renderer: ((context: ojSunburst.RootNodeContext) => ({ + insert: Element | string; + })); + }; + rotation: 'off' | 'on'; + selection: any[]; + selectionMode: 'none' | 'single' | 'multiple'; + sizeLabel: string; + sorting: 'on' | 'off'; + startAngle: number; + tooltip: { + renderer: ((context: ojSunburst.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + touchResponse: 'touchStart' | 'auto'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelColor?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + labelSize?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + tooltipCollapse?: string; + tooltipExpand?: string; + }; +} +export interface ojSunburstSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojSunburstNode extends JetElement { + borderColor?: string; + borderWidth?: number; + categories?: string[]; + color?: string; + drilling?: 'on' | 'off' | 'inherit'; + label?: string; + labelDisplay?: 'horizontal' | 'rotated' | 'off' | 'auto'; + labelHalign?: 'inner' | 'outer' | 'center'; + labelStyle?: object; + pattern?: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + radius?: number; + selectable?: 'off' | 'auto'; + shortDesc?: string; + showDisclosure?: 'on' | 'off' | 'inherit'; + svgClassName?: string; + svgStyle?: object; + value: number; + onBorderColorChanged: ((event: JetElementCustomEvent) => any) | null; + onBorderWidthChanged: ((event: JetElementCustomEvent) => any) | null; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onDrillingChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelDisplayChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelHalignChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onPatternChanged: ((event: JetElementCustomEvent) => any) | null; + onRadiusChanged: ((event: JetElementCustomEvent) => any) | null; + onSelectableChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onShowDisclosureChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSunburstNodeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojSunburstNode[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojSunburstNodeSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojSunburstNodeSettablePropertiesLenient): void; +} +export interface ojSunburstNodeEventMap extends HTMLElementEventMap { + 'borderColorChanged': JetElementCustomEvent; + 'borderWidthChanged': JetElementCustomEvent; + 'categoriesChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'drillingChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; + 'labelDisplayChanged': JetElementCustomEvent; + 'labelHalignChanged': JetElementCustomEvent; + 'labelStyleChanged': JetElementCustomEvent; + 'patternChanged': JetElementCustomEvent; + 'radiusChanged': JetElementCustomEvent; + 'selectableChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'showDisclosureChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojSunburstNodeSettableProperties extends JetSettableProperties { + borderColor?: string; + borderWidth?: number; + categories?: string[]; + color?: string; + drilling?: 'on' | 'off' | 'inherit'; + label?: string; + labelDisplay?: 'horizontal' | 'rotated' | 'off' | 'auto'; + labelHalign?: 'inner' | 'outer' | 'center'; + labelStyle?: object; + pattern?: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + radius?: number; + selectable?: 'off' | 'auto'; + shortDesc?: string; + showDisclosure?: 'on' | 'off' | 'inherit'; + svgClassName?: string; + svgStyle?: object; + value: number; +} +export interface ojSunburstNodeSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojswipeactions/index.d.ts b/types/oraclejet/ojswipeactions/index.d.ts new file mode 100644 index 0000000000..cb309b2668 --- /dev/null +++ b/types/oraclejet/ojswipeactions/index.d.ts @@ -0,0 +1,36 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojSwipeActions extends baseComponent { + translations: { + ariaHideActionsDescription?: string; + ariaShowEndActionsDescription?: string; + ariaShowStartActionsDescription?: string; + }; + onOjAction: ((event: ojSwipeActions.ojAction) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSwipeActionsEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojSwipeActions[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojSwipeActionsSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojSwipeActionsSettablePropertiesLenient): void; + refresh(): void; +} +export namespace ojSwipeActions { + interface ojAction extends CustomEvent<{ + [propName: string]: any; + }> { + } +} +export interface ojSwipeActionsEventMap extends baseComponentEventMap { + 'ojAction': ojSwipeActions.ojAction; +} +export interface ojSwipeActionsSettableProperties extends baseComponentSettableProperties { + translations: { + ariaHideActionsDescription?: string; + ariaShowEndActionsDescription?: string; + ariaShowStartActionsDescription?: string; + }; +} +export interface ojSwipeActionsSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojswipetoreveal/index.d.ts b/types/oraclejet/ojswipetoreveal/index.d.ts new file mode 100644 index 0000000000..ec2587ee47 --- /dev/null +++ b/types/oraclejet/ojswipetoreveal/index.d.ts @@ -0,0 +1,4 @@ +export function setupSwipeActions(elem: Element, options?: { + threshold?: number; +}): void; +export function tearDownSwipeActions(elem: Element): void; diff --git a/types/oraclejet/ojswitch/index.d.ts b/types/oraclejet/ojswitch/index.d.ts new file mode 100644 index 0000000000..775bb8a1f9 --- /dev/null +++ b/types/oraclejet/ojswitch/index.d.ts @@ -0,0 +1,49 @@ +import { editableValue, editableValueEventMap, editableValueSettableProperties } from '../ojeditablevalue'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojSwitch extends editableValue { + disabled: boolean; + readonly: boolean; + value: boolean; + onDisabledChanged: ((event: JetElementCustomEvent) => any) | null; + onReadonlyChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojSwitch.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojSwitch.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSwitchEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojSwitch[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojSwitchSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojSwitchSettablePropertiesLenient): void; +} +export namespace ojSwitch { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojSwitchEventMap extends editableValueEventMap { + 'ojAnimateEnd': ojSwitch.ojAnimateEnd; + 'ojAnimateStart': ojSwitch.ojAnimateStart; + 'disabledChanged': JetElementCustomEvent; + 'readonlyChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojSwitchSettableProperties extends editableValueSettableProperties { + disabled: boolean; + readonly: boolean; + value: boolean; +} +export interface ojSwitchSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojswitcher/index.d.ts b/types/oraclejet/ojswitcher/index.d.ts new file mode 100644 index 0000000000..7d4ffc5bcd --- /dev/null +++ b/types/oraclejet/ojswitcher/index.d.ts @@ -0,0 +1,22 @@ +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojSwitcher extends JetElement { + value: string; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSwitcherEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojSwitcher[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojSwitcherSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojSwitcherSettablePropertiesLenient): void; + refresh(): void; +} +export interface ojSwitcherEventMap extends HTMLElementEventMap { + 'valueChanged': JetElementCustomEvent; +} +export interface ojSwitcherSettableProperties extends JetSettableProperties { + value: string; +} +export interface ojSwitcherSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojtable/index.d.ts b/types/oraclejet/ojtable/index.d.ts new file mode 100644 index 0000000000..4282815f2e --- /dev/null +++ b/types/oraclejet/ojtable/index.d.ts @@ -0,0 +1,595 @@ +import { DataProvider } from '../ojdataprovider'; +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojTable extends baseComponent> { + accessibility: { + rowHeader: string; + }; + as: string; + columns: Array<{ + className?: string | null; + field?: string | null; + footerClassName?: string | null; + footerRenderer?: ((context: ojTable.FooterRendererContext) => { + insert: HTMLElement | string; + } | void) | null; + footerStyle?: string | null; + footerTemplate?: { + componentElement: Element; + }; + headerClassName?: string | null; + headerRenderer?: ((context: ojTable.HeaderRendererContext) => { + insert: HTMLElement | string; + } | void) | null; + headerStyle?: string | null; + headerTemplate?: { + componentElement: Element; + data: object; + }; + headerText?: string | null; + id?: string | null; + renderer?: ((context: ojTable.ColumnsRendererContext) => { + insert: HTMLElement | string; + } | void) | null; + resizable?: 'enabled' | 'disabled'; + sortProperty?: string | null; + sortable?: 'auto' | 'enabled' | 'disabled'; + style?: string | null; + template?: { + componentElement: Element; + data: object; + row: object; + index: number; + columnIndex: number; + key: any; + mode: string; + }; + width?: number | null; + }> | null; + columnsDefault: { + className?: string | null; + field?: string | null; + footerClassName?: string | null; + footerRenderer?: ((context: ojTable.FooterRendererContext) => { + insert: HTMLElement | string; + } | void) | null; + footerStyle?: string | null; + footerTemplate?: { + componentElement: Element; + }; + headerClassName?: string | null; + headerRenderer?: ((context: ojTable.HeaderRendererContext) => { + insert: HTMLElement | string; + } | void) | null; + headerStyle?: string | null; + headerTemplate?: { + componentElement: Element; + data: object; + }; + headerText?: string | null; + renderer?: ((context: ojTable.ColumnsRendererContext) => { + insert: HTMLElement | string; + } | void) | null; + resizable?: 'enabled' | 'disabled'; + sortProperty?: string | null; + sortable?: 'auto' | 'enabled' | 'disabled'; + style?: string | null; + template?: { + componentElement: Element; + data: object; + row: object; + index: number; + columnIndex: number; + key: any; + mode: string; + }; + width?: number | null; + }; + currentRow: ojTable.CurrentRow | null; + data: DataProvider | null; + display: 'list' | 'grid'; + dnd: { + drag: { + rows: { + dataTypes?: string | string[]; + dragStart?: ((param0: DragEvent, param1: ojTable.DragRowContext) => void); + drag?: ((param0: DragEvent) => void); + dragEnd?: ((param0: DragEvent) => void); + }; + }; + drop: { + columns: { + dataTypes: string | string[]; + dragEnter?: ((param0: DragEvent, param1: ojTable.DropColumnContext) => void); + dragOver?: ((param0: DragEvent, param1: ojTable.DropColumnContext) => void); + dragLeave?: ((param0: DragEvent, param1: ojTable.DropColumnContext) => void); + drop: ((param0: DragEvent, param1: ojTable.DropColumnContext) => void); + }; + rows: { + dataTypes: string | string[]; + dragEnter?: ((param0: DragEvent, param1: ojTable.DropRowContext) => void); + dragOver?: ((param0: DragEvent, param1: ojTable.DropRowContext) => void); + dragLeave?: ((param0: DragEvent, param1: ojTable.DropRowContext) => void); + drop: ((param0: DragEvent, param1: ojTable.DropRowContext) => void); + }; + }; + reorder: { + columns: 'enabled' | 'disabled'; + }; + }; + editMode: 'none' | 'rowEdit'; + readonly firstSelectedRow: object; + horizontalGridVisible: 'auto' | 'enabled' | 'disabled'; + rowRenderer: ((context: ojTable.RowRendererContext) => string | HTMLElement | void) | null; + scrollPolicy: 'auto' | 'loadMoreOnScroll'; + scrollPolicyOptions: { + fetchSize: number; + maxCount: number; + }; + scrollPosition: { + x?: number; + y?: number; + columnIndex?: number; + rowIndex?: number; + columnKey?: any; + rowKey?: any; + offsetX?: number; + offsetY?: number; + }; + selection: Array & ojTable.RowSelectionEnd> | Array & ojTable.ColumnSelectionEnd>; + selectionMode: { + column: 'single' | 'multiple'; + row: 'single' | 'multiple'; + }; + selectionRequired: boolean; + verticalGridVisible: 'auto' | 'enabled' | 'disabled'; + translations: { + labelAccSelectionAffordanceBottom?: string; + labelAccSelectionAffordanceTop?: string; + labelDisableNonContiguousSelection?: string; + labelEditRow?: string; + labelEnableNonContiguousSelection?: string; + labelResize?: string; + labelResizePopupSpinner?: string; + labelResizePopupSubmit?: string; + labelSelectAndEditRow?: string; + labelSelectColum?: string; + labelSelectRow?: string; + labelSort?: string; + labelSortAsc?: string; + labelSortDsc?: string; + msgColumnResizeWidthValidation?: string; + msgFetchingData?: string; + msgInitializing?: string; + msgNoData?: string; + msgScrollPolicyMaxCountDetail?: string; + msgScrollPolicyMaxCountSummary?: string; + msgStatusSortAscending?: string; + msgStatusSortDescending?: string; + }; + onAccessibilityChanged: ((event: JetElementCustomEvent["accessibility"]>) => any) | null; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onColumnsChanged: ((event: JetElementCustomEvent["columns"]>) => any) | null; + onColumnsDefaultChanged: ((event: JetElementCustomEvent["columnsDefault"]>) => any) | null; + onCurrentRowChanged: ((event: JetElementCustomEvent["currentRow"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onDisplayChanged: ((event: JetElementCustomEvent["display"]>) => any) | null; + onDndChanged: ((event: JetElementCustomEvent["dnd"]>) => any) | null; + onEditModeChanged: ((event: JetElementCustomEvent["editMode"]>) => any) | null; + onFirstSelectedRowChanged: ((event: JetElementCustomEvent["firstSelectedRow"]>) => any) | null; + onHorizontalGridVisibleChanged: ((event: JetElementCustomEvent["horizontalGridVisible"]>) => any) | null; + onRowRendererChanged: ((event: JetElementCustomEvent["rowRenderer"]>) => any) | null; + onScrollPolicyChanged: ((event: JetElementCustomEvent["scrollPolicy"]>) => any) | null; + onScrollPolicyOptionsChanged: ((event: JetElementCustomEvent["scrollPolicyOptions"]>) => any) | null; + onScrollPositionChanged: ((event: JetElementCustomEvent["scrollPosition"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent["selectionMode"]>) => any) | null; + onSelectionRequiredChanged: ((event: JetElementCustomEvent["selectionRequired"]>) => any) | null; + onVerticalGridVisibleChanged: ((event: JetElementCustomEvent["verticalGridVisible"]>) => any) | null; + onOjAnimateEnd: ((event: ojTable.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojTable.ojAnimateStart) => any) | null; + onOjBeforeCurrentRow: ((event: ojTable.ojBeforeCurrentRow) => any) | null; + onOjBeforeRowEdit: ((event: ojTable.ojBeforeRowEdit) => any) | null; + onOjBeforeRowEditEnd: ((event: ojTable.ojBeforeRowEditEnd) => any) | null; + onOjSort: ((event: ojTable.ojSort) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojTableEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojTable[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojTableSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojTableSettablePropertiesLenient): void; + getContextByNode(node: Element): { + subId: 'oj-table-cell'; + rowIndex: number; + columnIndex: number; + key: string; + } | { + subId: 'oj-table-footer' | 'oj-table-header'; + index: number; + }; + getDataForVisibleRow(rowIndex: number): { + data: D; + index: number; + key: K; + } | null; + refresh(): void; + refreshRow(rowIdx: number): Promise; +} +export namespace ojTable { + interface ojAnimateEnd extends CustomEvent<{ + action: 'add' | 'remove' | 'update'; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: 'add' | 'remove' | 'update'; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } + interface ojBeforeCurrentRow extends CustomEvent<{ + currentRow: CurrentRow; + previousCurrentRow: CurrentRow; + [propName: string]: any; + }> { + } + interface ojBeforeRowEdit extends CustomEvent<{ + rowContext: object; + [propName: string]: any; + }> { + } + interface ojBeforeRowEditEnd extends CustomEvent<{ + rowContext: object; + cancelEdit: object; + [propName: string]: any; + }> { + } + interface ojSort extends CustomEvent<{ + header: Element; + direction: 'ascending' | 'descending'; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type ColumnSelectionEnd = { + endIndex: { + column: number; + }; + endKey?: { + column: K; + }; + } | { + endIndex?: { + column: number; + }; + endKey: { + column: K; + }; + }; + // tslint:disable-next-line interface-over-type-literal + type ColumnSelectionStart = { + startIndex: { + column: number; + }; + startKey?: { + column: K; + }; + } | { + startIndex?: { + column: number; + }; + startKey: { + column: K; + }; + }; + // tslint:disable-next-line interface-over-type-literal + type ColumnsRendererContext = { + cellContext: { + datasource: DataProvider | null; + mode: 'edit' | 'navigation'; + status: ContextStatus; + }; + columnIndex: number; + componentElement: Element; + data: D; + parentElement: Element; + row: { + [name: string]: any; + }; + }; + // tslint:disable-next-line interface-over-type-literal + type ContextStatus = { + rowIndex: number; + rowKey: K; + currentRow: CurrentRow; + }; + // tslint:disable-next-line interface-over-type-literal + type CurrentRow = { + rowIndex: number; + rowKey?: K; + } | { + rowIndex?: number; + rowKey: K; + }; + // tslint:disable-next-line interface-over-type-literal + type DragRowContext = { + rows: Array<{ + data: D; + index: number; + key: K; + }>; + }; + // tslint:disable-next-line interface-over-type-literal + type DropColumnContext = { + columnIndex: number; + }; + // tslint:disable-next-line interface-over-type-literal + type DropRowContext = { + rowIndex: number; + }; + // tslint:disable-next-line interface-over-type-literal + type FooterRendererContext = { + columnIndex: number; + componentElement: Element; + footerContext: { + datasource: DataProvider | null; + }; + parentElement: Element; + }; + // tslint:disable-next-line interface-over-type-literal + type HeaderRendererContext = { + columnIndex: number; + columnHeaderDefaultRenderer?: ((param0: object, param1: ((param0: object) => void)) => void); + columnHeaderSortableIconRenderer?: ((param0: object, param1: ((param0: object) => void)) => void); + componentElement: Element; + data: string; + headerContext: { + datasource: DataProvider | null; + }; + parentElement: Element; + }; + // tslint:disable-next-line interface-over-type-literal + type RowRendererContext = { + componentElement: Element; + data: { + [name: string]: any; + }; + parentElement: Element; + rowContext: { + datasource: DataProvider | null; + mode: 'edit' | 'navigation'; + status: ContextStatus; + }; + }; + // tslint:disable-next-line interface-over-type-literal + type RowSelectionEnd = { + endIndex: { + row: number; + }; + endKey?: { + row: K; + }; + } | { + endIndex?: { + row: number; + }; + endKey: { + row: K; + }; + }; + // tslint:disable-next-line interface-over-type-literal + type RowSelectionStart = { + startIndex: { + row: number; + }; + startKey?: { + row: K; + }; + } | { + startIndex?: { + row: number; + }; + startKey: { + row: K; + }; + }; +} +export interface ojTableEventMap extends baseComponentEventMap> { + 'ojAnimateEnd': ojTable.ojAnimateEnd; + 'ojAnimateStart': ojTable.ojAnimateStart; + 'ojBeforeCurrentRow': ojTable.ojBeforeCurrentRow; + 'ojBeforeRowEdit': ojTable.ojBeforeRowEdit; + 'ojBeforeRowEditEnd': ojTable.ojBeforeRowEditEnd; + 'ojSort': ojTable.ojSort; + 'accessibilityChanged': JetElementCustomEvent["accessibility"]>; + 'asChanged': JetElementCustomEvent["as"]>; + 'columnsChanged': JetElementCustomEvent["columns"]>; + 'columnsDefaultChanged': JetElementCustomEvent["columnsDefault"]>; + 'currentRowChanged': JetElementCustomEvent["currentRow"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'displayChanged': JetElementCustomEvent["display"]>; + 'dndChanged': JetElementCustomEvent["dnd"]>; + 'editModeChanged': JetElementCustomEvent["editMode"]>; + 'firstSelectedRowChanged': JetElementCustomEvent["firstSelectedRow"]>; + 'horizontalGridVisibleChanged': JetElementCustomEvent["horizontalGridVisible"]>; + 'rowRendererChanged': JetElementCustomEvent["rowRenderer"]>; + 'scrollPolicyChanged': JetElementCustomEvent["scrollPolicy"]>; + 'scrollPolicyOptionsChanged': JetElementCustomEvent["scrollPolicyOptions"]>; + 'scrollPositionChanged': JetElementCustomEvent["scrollPosition"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'selectionModeChanged': JetElementCustomEvent["selectionMode"]>; + 'selectionRequiredChanged': JetElementCustomEvent["selectionRequired"]>; + 'verticalGridVisibleChanged': JetElementCustomEvent["verticalGridVisible"]>; +} +export interface ojTableSettableProperties extends baseComponentSettableProperties { + accessibility: { + rowHeader: string; + }; + as: string; + columns: Array<{ + className?: string | null; + field?: string | null; + footerClassName?: string | null; + footerRenderer?: ((context: ojTable.FooterRendererContext) => { + insert: HTMLElement | string; + } | void) | null; + footerStyle?: string | null; + footerTemplate?: { + componentElement: Element; + }; + headerClassName?: string | null; + headerRenderer?: ((context: ojTable.HeaderRendererContext) => { + insert: HTMLElement | string; + } | void) | null; + headerStyle?: string | null; + headerTemplate?: { + componentElement: Element; + data: object; + }; + headerText?: string | null; + id?: string | null; + renderer?: ((context: ojTable.ColumnsRendererContext) => { + insert: HTMLElement | string; + } | void) | null; + resizable?: 'enabled' | 'disabled'; + sortProperty?: string | null; + sortable?: 'auto' | 'enabled' | 'disabled'; + style?: string | null; + template?: { + componentElement: Element; + data: object; + row: object; + index: number; + columnIndex: number; + key: any; + mode: string; + }; + width?: number | null; + }> | null; + columnsDefault: { + className?: string | null; + field?: string | null; + footerClassName?: string | null; + footerRenderer?: ((context: ojTable.FooterRendererContext) => { + insert: HTMLElement | string; + } | void) | null; + footerStyle?: string | null; + footerTemplate?: { + componentElement: Element; + }; + headerClassName?: string | null; + headerRenderer?: ((context: ojTable.HeaderRendererContext) => { + insert: HTMLElement | string; + } | void) | null; + headerStyle?: string | null; + headerTemplate?: { + componentElement: Element; + data: object; + }; + headerText?: string | null; + renderer?: ((context: ojTable.ColumnsRendererContext) => { + insert: HTMLElement | string; + } | void) | null; + resizable?: 'enabled' | 'disabled'; + sortProperty?: string | null; + sortable?: 'auto' | 'enabled' | 'disabled'; + style?: string | null; + template?: { + componentElement: Element; + data: object; + row: object; + index: number; + columnIndex: number; + key: any; + mode: string; + }; + width?: number | null; + }; + currentRow: ojTable.CurrentRow | null; + data: DataProvider | null; + display: 'list' | 'grid'; + dnd: { + drag: { + rows: { + dataTypes?: string | string[]; + dragStart?: ((param0: DragEvent, param1: ojTable.DragRowContext) => void); + drag?: ((param0: DragEvent) => void); + dragEnd?: ((param0: DragEvent) => void); + }; + }; + drop: { + columns: { + dataTypes: string | string[]; + dragEnter?: ((param0: DragEvent, param1: ojTable.DropColumnContext) => void); + dragOver?: ((param0: DragEvent, param1: ojTable.DropColumnContext) => void); + dragLeave?: ((param0: DragEvent, param1: ojTable.DropColumnContext) => void); + drop: ((param0: DragEvent, param1: ojTable.DropColumnContext) => void); + }; + rows: { + dataTypes: string | string[]; + dragEnter?: ((param0: DragEvent, param1: ojTable.DropRowContext) => void); + dragOver?: ((param0: DragEvent, param1: ojTable.DropRowContext) => void); + dragLeave?: ((param0: DragEvent, param1: ojTable.DropRowContext) => void); + drop: ((param0: DragEvent, param1: ojTable.DropRowContext) => void); + }; + }; + reorder: { + columns: 'enabled' | 'disabled'; + }; + }; + editMode: 'none' | 'rowEdit'; + readonly firstSelectedRow: object; + horizontalGridVisible: 'auto' | 'enabled' | 'disabled'; + rowRenderer: ((context: ojTable.RowRendererContext) => string | HTMLElement | void) | null; + scrollPolicy: 'auto' | 'loadMoreOnScroll'; + scrollPolicyOptions: { + fetchSize: number; + maxCount: number; + }; + scrollPosition: { + x?: number; + y?: number; + columnIndex?: number; + rowIndex?: number; + columnKey?: any; + rowKey?: any; + offsetX?: number; + offsetY?: number; + }; + selection: Array & ojTable.RowSelectionEnd> | Array & ojTable.ColumnSelectionEnd>; + selectionMode: { + column: 'single' | 'multiple'; + row: 'single' | 'multiple'; + }; + selectionRequired: boolean; + verticalGridVisible: 'auto' | 'enabled' | 'disabled'; + translations: { + labelAccSelectionAffordanceBottom?: string; + labelAccSelectionAffordanceTop?: string; + labelDisableNonContiguousSelection?: string; + labelEditRow?: string; + labelEnableNonContiguousSelection?: string; + labelResize?: string; + labelResizePopupSpinner?: string; + labelResizePopupSubmit?: string; + labelSelectAndEditRow?: string; + labelSelectColum?: string; + labelSelectRow?: string; + labelSort?: string; + labelSortAsc?: string; + labelSortDsc?: string; + msgColumnResizeWidthValidation?: string; + msgFetchingData?: string; + msgInitializing?: string; + msgNoData?: string; + msgScrollPolicyMaxCountDetail?: string; + msgScrollPolicyMaxCountSummary?: string; + msgStatusSortAscending?: string; + msgStatusSortDescending?: string; + }; +} +export interface ojTableSettablePropertiesLenient extends Partial> { + [key: string]: any; +} diff --git a/types/oraclejet/ojtagcloud/index.d.ts b/types/oraclejet/ojtagcloud/index.d.ts new file mode 100644 index 0000000000..17bc2397a5 --- /dev/null +++ b/types/oraclejet/ojtagcloud/index.d.ts @@ -0,0 +1,208 @@ +import { DataProvider } from '../ojdataprovider'; +import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojTagCloud extends dvtBaseComponent> { + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + as: string; + data: DataProvider | null; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + layout: 'cloud' | 'rectangular'; + selection: K[]; + selectionMode: 'single' | 'multiple' | 'none'; + styleDefaults: { + animationDuration?: number; + hoverBehaviorDelay?: number; + svgStyle?: object; + }; + tooltip: { + renderer: ((context: ojTagCloud.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + touchResponse: 'touchStart' | 'auto'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; + onAnimationOnDataChangeChanged: ((event: JetElementCustomEvent["animationOnDataChange"]>) => any) | null; + onAnimationOnDisplayChanged: ((event: JetElementCustomEvent["animationOnDisplay"]>) => any) | null; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onHiddenCategoriesChanged: ((event: JetElementCustomEvent["hiddenCategories"]>) => any) | null; + onHighlightMatchChanged: ((event: JetElementCustomEvent["highlightMatch"]>) => any) | null; + onHighlightedCategoriesChanged: ((event: JetElementCustomEvent["highlightedCategories"]>) => any) | null; + onHoverBehaviorChanged: ((event: JetElementCustomEvent["hoverBehavior"]>) => any) | null; + onLayoutChanged: ((event: JetElementCustomEvent["layout"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent["selectionMode"]>) => any) | null; + onStyleDefaultsChanged: ((event: JetElementCustomEvent["styleDefaults"]>) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent["tooltip"]>) => any) | null; + onTouchResponseChanged: ((event: JetElementCustomEvent["touchResponse"]>) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojTagCloudEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojTagCloud[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojTagCloudSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojTagCloudSettablePropertiesLenient): void; + getContextByNode(node: Element): ojTagCloud.NodeContext | null; + getItem(index: number): ojTagCloud.ItemContext | null; + getItemCount(): number; +} +export interface ojTagCloudEventMap extends dvtBaseComponentEventMap> { + 'animationOnDataChangeChanged': JetElementCustomEvent["animationOnDataChange"]>; + 'animationOnDisplayChanged': JetElementCustomEvent["animationOnDisplay"]>; + 'asChanged': JetElementCustomEvent["as"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'hiddenCategoriesChanged': JetElementCustomEvent["hiddenCategories"]>; + 'highlightMatchChanged': JetElementCustomEvent["highlightMatch"]>; + 'highlightedCategoriesChanged': JetElementCustomEvent["highlightedCategories"]>; + 'hoverBehaviorChanged': JetElementCustomEvent["hoverBehavior"]>; + 'layoutChanged': JetElementCustomEvent["layout"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'selectionModeChanged': JetElementCustomEvent["selectionMode"]>; + 'styleDefaultsChanged': JetElementCustomEvent["styleDefaults"]>; + 'tooltipChanged': JetElementCustomEvent["tooltip"]>; + 'touchResponseChanged': JetElementCustomEvent["touchResponse"]>; +} +export interface ojTagCloudSettableProperties extends dvtBaseComponentSettableProperties { + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + as: string; + data: DataProvider | null; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + layout: 'cloud' | 'rectangular'; + selection: K[]; + selectionMode: 'single' | 'multiple' | 'none'; + styleDefaults: { + animationDuration?: number; + hoverBehaviorDelay?: number; + svgStyle?: object; + }; + tooltip: { + renderer: ((context: ojTagCloud.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + touchResponse: 'touchStart' | 'auto'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; +} +export interface ojTagCloudSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export namespace ojTagCloud { + // tslint:disable-next-line interface-over-type-literal + type ItemContext = { + color: string; + label: string; + selected: boolean; + tooltip: string; + value: number; + }; + // tslint:disable-next-line interface-over-type-literal + type NodeContext = { + subId: string; + index: number; + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + color: string; + componentElement: Element; + id: K; + label: string; + parentElement: Element; + value: number; + }; +} +export interface ojTagCloudItem extends JetElement { + categories: string[]; + color?: string; + label: string; + shortDesc: string; + svgClassName: string; + svgStyle: object; + url: string; + value: number | null; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onUrlChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTagCloudItemEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojTagCloudItem[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojTagCloudItemSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojTagCloudItemSettablePropertiesLenient): void; +} +export interface ojTagCloudItemEventMap extends HTMLElementEventMap { + 'categoriesChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'urlChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojTagCloudItemSettableProperties extends JetSettableProperties { + categories: string[]; + color?: string; + label: string; + shortDesc: string; + svgClassName: string; + svgStyle: object; + url: string; + value: number | null; +} +export interface ojTagCloudItemSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojthematicmap/index.d.ts b/types/oraclejet/ojthematicmap/index.d.ts new file mode 100644 index 0000000000..45bbd3b907 --- /dev/null +++ b/types/oraclejet/ojthematicmap/index.d.ts @@ -0,0 +1,576 @@ +import { DataProvider } from '../ojdataprovider'; +import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojThematicMap extends dvtBaseComponent> { + animationDuration: number; + animationOnDisplay: 'auto' | 'none'; + areaData: DataProvider | null; + as: string; + focusRenderer: ((context: ojThematicMap.RendererContext) => { + insert: SVGElement; + } | void) | null; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + hoverRenderer: ((context: ojThematicMap.RendererContext) => { + insert: SVGElement; + } | void) | null; + initialZooming: 'auto' | 'none'; + isolatedItem: K1; + labelDisplay: 'on' | 'off' | 'auto'; + labelType: 'long' | 'short'; + linkData: DataProvider | null; + mapProvider: { + geo: object; + propertiesKeys: { + id: string; + longLabel?: string; + shortLabel?: string; + }; + }; + markerData: DataProvider | null; + markerZoomBehavior: 'zoom' | 'fixed'; + maxZoom: number; + panning: 'auto' | 'none'; + renderer: ((context: ojThematicMap.RendererContext) => { + insert: SVGElement; + } | void) | null; + selection: Array; + selectionMode: 'single' | 'multiple' | 'none'; + selectionRenderer: ((context: ojThematicMap.RendererContext) => { + insert: SVGElement; + } | void) | null; + styleDefaults: { + areaSvgStyle?: object; + dataAreaDefaults?: { + borderColor?: string; + hoverColor?: string; + selectedInnerColor?: string; + selectedOuterColor?: string; + }; + dataMarkerDefaults?: { + borderColor?: string; + borderStyle?: 'none' | 'solid'; + borderWidth?: number; + color?: string; + height?: number; + labelStyle?: object; + opacity?: number; + shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + width?: number; + }; + hoverBehaviorDelay?: number; + labelStyle?: object; + linkDefaults?: { + color?: string; + width?: number; + }; + }; + tooltip: { + renderer: ((context: ojThematicMap.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + tooltipDisplay: 'auto' | 'labelAndShortDesc' | 'none' | 'shortDesc'; + touchResponse: 'touchStart' | 'auto'; + zooming: 'auto' | 'none'; + translations: { + areasRegion?: string; + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + linksRegion?: string; + markersRegion?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; + onAnimationDurationChanged: ((event: JetElementCustomEvent["animationDuration"]>) => any) | null; + onAnimationOnDisplayChanged: ((event: JetElementCustomEvent["animationOnDisplay"]>) => any) | null; + onAreaDataChanged: ((event: JetElementCustomEvent["areaData"]>) => any) | null; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onFocusRendererChanged: ((event: JetElementCustomEvent["focusRenderer"]>) => any) | null; + onHiddenCategoriesChanged: ((event: JetElementCustomEvent["hiddenCategories"]>) => any) | null; + onHighlightMatchChanged: ((event: JetElementCustomEvent["highlightMatch"]>) => any) | null; + onHighlightedCategoriesChanged: ((event: JetElementCustomEvent["highlightedCategories"]>) => any) | null; + onHoverBehaviorChanged: ((event: JetElementCustomEvent["hoverBehavior"]>) => any) | null; + onHoverRendererChanged: ((event: JetElementCustomEvent["hoverRenderer"]>) => any) | null; + onInitialZoomingChanged: ((event: JetElementCustomEvent["initialZooming"]>) => any) | null; + onIsolatedItemChanged: ((event: JetElementCustomEvent["isolatedItem"]>) => any) | null; + onLabelDisplayChanged: ((event: JetElementCustomEvent["labelDisplay"]>) => any) | null; + onLabelTypeChanged: ((event: JetElementCustomEvent["labelType"]>) => any) | null; + onLinkDataChanged: ((event: JetElementCustomEvent["linkData"]>) => any) | null; + onMapProviderChanged: ((event: JetElementCustomEvent["mapProvider"]>) => any) | null; + onMarkerDataChanged: ((event: JetElementCustomEvent["markerData"]>) => any) | null; + onMarkerZoomBehaviorChanged: ((event: JetElementCustomEvent["markerZoomBehavior"]>) => any) | null; + onMaxZoomChanged: ((event: JetElementCustomEvent["maxZoom"]>) => any) | null; + onPanningChanged: ((event: JetElementCustomEvent["panning"]>) => any) | null; + onRendererChanged: ((event: JetElementCustomEvent["renderer"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent["selectionMode"]>) => any) | null; + onSelectionRendererChanged: ((event: JetElementCustomEvent["selectionRenderer"]>) => any) | null; + onStyleDefaultsChanged: ((event: JetElementCustomEvent["styleDefaults"]>) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent["tooltip"]>) => any) | null; + onTooltipDisplayChanged: ((event: JetElementCustomEvent["tooltipDisplay"]>) => any) | null; + onTouchResponseChanged: ((event: JetElementCustomEvent["touchResponse"]>) => any) | null; + onZoomingChanged: ((event: JetElementCustomEvent["zooming"]>) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojThematicMapEventMap[T]) => any, + useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojThematicMap[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojThematicMapSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojThematicMapSettablePropertiesLenient): void; + getArea(index: number): ojThematicMap.DataContext | null; + getContextByNode(node: Element): ojThematicMap.NodeContext | null; + getLink(index: number): ojThematicMap.DataContext | null; + getMarker(index: number): ojThematicMap.DataContext | null; +} +export interface ojThematicMapEventMap extends dvtBaseComponentEventMap> { + 'animationDurationChanged': JetElementCustomEvent["animationDuration"]>; + 'animationOnDisplayChanged': JetElementCustomEvent["animationOnDisplay"]>; + 'areaDataChanged': JetElementCustomEvent["areaData"]>; + 'asChanged': JetElementCustomEvent["as"]>; + 'focusRendererChanged': JetElementCustomEvent["focusRenderer"]>; + 'hiddenCategoriesChanged': JetElementCustomEvent["hiddenCategories"]>; + 'highlightMatchChanged': JetElementCustomEvent["highlightMatch"]>; + 'highlightedCategoriesChanged': JetElementCustomEvent["highlightedCategories"]>; + 'hoverBehaviorChanged': JetElementCustomEvent["hoverBehavior"]>; + 'hoverRendererChanged': JetElementCustomEvent["hoverRenderer"]>; + 'initialZoomingChanged': JetElementCustomEvent["initialZooming"]>; + 'isolatedItemChanged': JetElementCustomEvent["isolatedItem"]>; + 'labelDisplayChanged': JetElementCustomEvent["labelDisplay"]>; + 'labelTypeChanged': JetElementCustomEvent["labelType"]>; + 'linkDataChanged': JetElementCustomEvent["linkData"]>; + 'mapProviderChanged': JetElementCustomEvent["mapProvider"]>; + 'markerDataChanged': JetElementCustomEvent["markerData"]>; + 'markerZoomBehaviorChanged': JetElementCustomEvent["markerZoomBehavior"]>; + 'maxZoomChanged': JetElementCustomEvent["maxZoom"]>; + 'panningChanged': JetElementCustomEvent["panning"]>; + 'rendererChanged': JetElementCustomEvent["renderer"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'selectionModeChanged': JetElementCustomEvent["selectionMode"]>; + 'selectionRendererChanged': JetElementCustomEvent["selectionRenderer"]>; + 'styleDefaultsChanged': JetElementCustomEvent["styleDefaults"]>; + 'tooltipChanged': JetElementCustomEvent["tooltip"]>; + 'tooltipDisplayChanged': JetElementCustomEvent["tooltipDisplay"]>; + 'touchResponseChanged': JetElementCustomEvent["touchResponse"]>; + 'zoomingChanged': JetElementCustomEvent["zooming"]>; +} +export interface ojThematicMapSettableProperties extends dvtBaseComponentSettableProperties { + animationDuration: number; + animationOnDisplay: 'auto' | 'none'; + areaData: DataProvider | null; + as: string; + focusRenderer: ((context: ojThematicMap.RendererContext) => { + insert: SVGElement; + } | void) | null; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + hoverRenderer: ((context: ojThematicMap.RendererContext) => { + insert: SVGElement; + } | void) | null; + initialZooming: 'auto' | 'none'; + isolatedItem: K1; + labelDisplay: 'on' | 'off' | 'auto'; + labelType: 'long' | 'short'; + linkData: DataProvider | null; + mapProvider: { + geo: object; + propertiesKeys: { + id: string; + longLabel?: string; + shortLabel?: string; + }; + }; + markerData: DataProvider | null; + markerZoomBehavior: 'zoom' | 'fixed'; + maxZoom: number; + panning: 'auto' | 'none'; + renderer: ((context: ojThematicMap.RendererContext) => { + insert: SVGElement; + } | void) | null; + selection: Array; + selectionMode: 'single' | 'multiple' | 'none'; + selectionRenderer: ((context: ojThematicMap.RendererContext) => { + insert: SVGElement; + } | void) | null; + styleDefaults: { + areaSvgStyle?: object; + dataAreaDefaults?: { + borderColor?: string; + hoverColor?: string; + selectedInnerColor?: string; + selectedOuterColor?: string; + }; + dataMarkerDefaults?: { + borderColor?: string; + borderStyle?: 'none' | 'solid'; + borderWidth?: number; + color?: string; + height?: number; + labelStyle?: object; + opacity?: number; + shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + width?: number; + }; + hoverBehaviorDelay?: number; + labelStyle?: object; + linkDefaults?: { + color?: string; + width?: number; + }; + }; + tooltip: { + renderer: ((context: ojThematicMap.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + tooltipDisplay: 'auto' | 'labelAndShortDesc' | 'none' | 'shortDesc'; + touchResponse: 'touchStart' | 'auto'; + zooming: 'auto' | 'none'; + translations: { + areasRegion?: string; + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + linksRegion?: string; + markersRegion?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; +} +export interface ojThematicMapSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export namespace ojThematicMap { + // tslint:disable-next-line interface-over-type-literal + type DataContext = { + color: string; + label: string; + selected: boolean; + tooltip: string; + }; + // tslint:disable-next-line interface-over-type-literal + type NodeContext = { + subId: string; + index: number; + }; + // tslint:disable-next-line interface-over-type-literal + type RendererContext = { + color: string; + componentElement: Element; + data: object; + id: K1 | K2 | K3; + itemData: D1 | D2 | D3; + label: string; + location: string | null; + parentElement: Element; + previousState: { + hovered: boolean; + selected: boolean; + focused: boolean; + }; + renderDefaultFocus: (() => void); + renderDefaultHover: (() => void); + renderDefaultSelection: (() => void); + root: Element | null; + state: { + hovered: boolean; + selected: boolean; + focused: boolean; + }; + x: number | null; + y: number | null; + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + color: string | null; + componentElement: Element; + data: object | null; + id: K1 | K2 | K3; + itemData: D1 | D2 | D3; + label: string | null; + location: string | null; + locationName: string | null; + parentElement: Element; + tooltip: string; + x: number; + y: number; + }; +} +export interface ojThematicMapArea extends JetElement { + categories: string[]; + color: string; + label: string; + labelStyle: object; + location: string; + opacity: number; + selectable: 'auto' | 'off'; + shortDesc: string; + svgClassName: string; + svgStyle: object; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onLocationChanged: ((event: JetElementCustomEvent) => any) | null; + onOpacityChanged: ((event: JetElementCustomEvent) => any) | null; + onSelectableChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojThematicMapAreaEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojThematicMapArea[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojThematicMapAreaSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojThematicMapAreaSettablePropertiesLenient): void; +} +export interface ojThematicMapAreaEventMap extends HTMLElementEventMap { + 'categoriesChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; + 'labelStyleChanged': JetElementCustomEvent; + 'locationChanged': JetElementCustomEvent; + 'opacityChanged': JetElementCustomEvent; + 'selectableChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; +} +export interface ojThematicMapAreaSettableProperties extends JetSettableProperties { + categories: string[]; + color: string; + label: string; + labelStyle: object; + location: string; + opacity: number; + selectable: 'auto' | 'off'; + shortDesc: string; + svgClassName: string; + svgStyle: object; +} +export interface ojThematicMapAreaSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojThematicMapLink extends JetElement { + categories: string[]; + color: string; + endLocation: { + id?: any; + location?: string; + x?: number; + y?: number; + }; + selectable: 'auto' | 'off'; + shortDesc: string; + startLocation: { + id?: any; + location?: string; + x?: number; + y?: number; + }; + svgClassName: string; + svgStyle: object; + width: number; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onEndLocationChanged: ((event: JetElementCustomEvent) => any) | null; + onSelectableChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onStartLocationChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onWidthChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojThematicMapLinkEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojThematicMapLink[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojThematicMapLinkSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojThematicMapLinkSettablePropertiesLenient): void; +} +export interface ojThematicMapLinkEventMap extends HTMLElementEventMap { + 'categoriesChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'endLocationChanged': JetElementCustomEvent; + 'selectableChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'startLocationChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'widthChanged': JetElementCustomEvent; +} +export interface ojThematicMapLinkSettableProperties extends JetSettableProperties { + categories: string[]; + color: string; + endLocation: { + id?: any; + location?: string; + x?: number; + y?: number; + }; + selectable: 'auto' | 'off'; + shortDesc: string; + startLocation: { + id?: any; + location?: string; + x?: number; + y?: number; + }; + svgClassName: string; + svgStyle: object; + width: number; +} +export interface ojThematicMapLinkSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojThematicMapMarker extends JetElement { + borderColor: string; + borderStyle: 'solid' | 'none'; + borderWidth: number; + categories: string[]; + color: string; + height: number; + label: string; + labelPosition: 'bottom' | 'center' | 'top'; + labelStyle: object; + location: string; + opacity: number; + rotation: number; + selectable: 'auto' | 'off'; + shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + shortDesc: string; + source: string; + sourceHover: string; + sourceHoverSelected: string; + sourceSelected: string; + svgClassName: string; + svgStyle: object; + value: number; + width: number; + x: number | null; + y: number | null; + onBorderColorChanged: ((event: JetElementCustomEvent) => any) | null; + onBorderStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onBorderWidthChanged: ((event: JetElementCustomEvent) => any) | null; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onHeightChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelPositionChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onLocationChanged: ((event: JetElementCustomEvent) => any) | null; + onOpacityChanged: ((event: JetElementCustomEvent) => any) | null; + onRotationChanged: ((event: JetElementCustomEvent) => any) | null; + onSelectableChanged: ((event: JetElementCustomEvent) => any) | null; + onShapeChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceHoverChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceHoverSelectedChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceSelectedChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onWidthChanged: ((event: JetElementCustomEvent) => any) | null; + onXChanged: ((event: JetElementCustomEvent) => any) | null; + onYChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojThematicMapMarkerEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojThematicMapMarker[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojThematicMapMarkerSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojThematicMapMarkerSettablePropertiesLenient): void; +} +export interface ojThematicMapMarkerEventMap extends HTMLElementEventMap { + 'borderColorChanged': JetElementCustomEvent; + 'borderStyleChanged': JetElementCustomEvent; + 'borderWidthChanged': JetElementCustomEvent; + 'categoriesChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'heightChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; + 'labelPositionChanged': JetElementCustomEvent; + 'labelStyleChanged': JetElementCustomEvent; + 'locationChanged': JetElementCustomEvent; + 'opacityChanged': JetElementCustomEvent; + 'rotationChanged': JetElementCustomEvent; + 'selectableChanged': JetElementCustomEvent; + 'shapeChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'sourceChanged': JetElementCustomEvent; + 'sourceHoverChanged': JetElementCustomEvent; + 'sourceHoverSelectedChanged': JetElementCustomEvent; + 'sourceSelectedChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; + 'widthChanged': JetElementCustomEvent; + 'xChanged': JetElementCustomEvent; + 'yChanged': JetElementCustomEvent; +} +export interface ojThematicMapMarkerSettableProperties extends JetSettableProperties { + borderColor: string; + borderStyle: 'solid' | 'none'; + borderWidth: number; + categories: string[]; + color: string; + height: number; + label: string; + labelPosition: 'bottom' | 'center' | 'top'; + labelStyle: object; + location: string; + opacity: number; + rotation: number; + selectable: 'auto' | 'off'; + shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + shortDesc: string; + source: string; + sourceHover: string; + sourceHoverSelected: string; + sourceSelected: string; + svgClassName: string; + svgStyle: object; + value: number; + width: number; + x: number | null; + y: number | null; +} +export interface ojThematicMapMarkerSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojthemeutils/index.d.ts b/types/oraclejet/ojthemeutils/index.d.ts new file mode 100644 index 0000000000..de718ebef9 --- /dev/null +++ b/types/oraclejet/ojthemeutils/index.d.ts @@ -0,0 +1,4 @@ +export function clearCache(): void; +export function getThemeName(): string | null; +export function getThemeTargetPlatform(): string | null; +export function parseJSONFromFontFamily(selector: string): any; diff --git a/types/oraclejet/ojtime-base/index.d.ts b/types/oraclejet/ojtime-base/index.d.ts new file mode 100644 index 0000000000..c5841cd8ec --- /dev/null +++ b/types/oraclejet/ojtime-base/index.d.ts @@ -0,0 +1,22 @@ +import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface dvtTimeComponent extends dvtBaseComponent { + addEventListener>(type: T, listener: (this: HTMLElement, ev: dvtTimeComponentEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): dvtTimeComponent[T]; + getProperty(property: string): any; + setProperty(property: T, value: dvtTimeComponentSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: dvtTimeComponentSettablePropertiesLenient): void; +} +// These interfaces are empty but required to keep the event chain intact. Avoid lint-rule +// tslint:disable-next-line no-empty-interface +export interface dvtTimeComponentEventMap extends dvtBaseComponentEventMap { +} +// These interfaces are empty but required to keep the component chain intact. Avoid lint-rule +// tslint:disable-next-line no-empty-interface +export interface dvtTimeComponentSettableProperties extends dvtBaseComponentSettableProperties { +} +export interface dvtTimeComponentSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojtimeaxis/index.d.ts b/types/oraclejet/ojtimeaxis/index.d.ts new file mode 100644 index 0000000000..2505fef16f --- /dev/null +++ b/types/oraclejet/ojtimeaxis/index.d.ts @@ -0,0 +1,87 @@ +import { Converter } from '../ojvalidation-base'; +import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojTimeAxis extends dvtBaseComponent { + converter: ojTimeAxis.Converters | Converter; + end: string; + scale: 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'quarters' | 'years'; + start: string; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; + onConverterChanged: ((event: JetElementCustomEvent) => any) | null; + onEndChanged: ((event: JetElementCustomEvent) => any) | null; + onScaleChanged: ((event: JetElementCustomEvent) => any) | null; + onStartChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTimeAxisEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojTimeAxis[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojTimeAxisSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojTimeAxisSettablePropertiesLenient): void; +} +export interface ojTimeAxisEventMap extends dvtBaseComponentEventMap { + 'converterChanged': JetElementCustomEvent; + 'endChanged': JetElementCustomEvent; + 'scaleChanged': JetElementCustomEvent; + 'startChanged': JetElementCustomEvent; +} +export interface ojTimeAxisSettableProperties extends dvtBaseComponentSettableProperties { + converter: ojTimeAxis.Converters | Converter; + end: string; + scale: 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'quarters' | 'years'; + start: string; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; +} +export interface ojTimeAxisSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export namespace ojTimeAxis { + // tslint:disable-next-line interface-over-type-literal + type Converters = { + default?: Converter; + seconds?: Converter; + minutes?: Converter; + hours?: Converter; + days?: Converter; + weeks?: Converter; + months?: Converter; + quarters?: Converter; + years?: Converter; + }; +} diff --git a/types/oraclejet/ojtimeutils/index.d.ts b/types/oraclejet/ojtimeutils/index.d.ts new file mode 100644 index 0000000000..a77d0f4d36 --- /dev/null +++ b/types/oraclejet/ojtimeutils/index.d.ts @@ -0,0 +1,3 @@ +export function getDate(pos: number, rangeStartTime: Date | string | number, rangeEndTime: Date | string | number, rangeWidth: number): number; +export function getLength(startTime: Date | string | number, endTime: Date | string | number, rangeStartTime: Date | string | number, rangeEndTime: Date | string | number, rangeWidth: number): number; +export function getPosition(time: Date | string | number, rangeStartTime: Date | string | number, rangeEndTime: Date | string | number, rangeWidth: number): number; diff --git a/types/oraclejet/ojtoolbar/index.d.ts b/types/oraclejet/ojtoolbar/index.d.ts new file mode 100644 index 0000000000..c310c831c7 --- /dev/null +++ b/types/oraclejet/ojtoolbar/index.d.ts @@ -0,0 +1,22 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojToolbar extends baseComponent { + chroming: 'full' | 'half' | 'outlined'; + onChromingChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojToolbarEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojToolbar[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojToolbarSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojToolbarSettablePropertiesLenient): void; + refresh(): void; +} +export interface ojToolbarEventMap extends baseComponentEventMap { + 'chromingChanged': JetElementCustomEvent; +} +export interface ojToolbarSettableProperties extends baseComponentSettableProperties { + chroming: 'full' | 'half' | 'outlined'; +} +export interface ojToolbarSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojtrain/index.d.ts b/types/oraclejet/ojtrain/index.d.ts new file mode 100644 index 0000000000..233592fd61 --- /dev/null +++ b/types/oraclejet/ojtrain/index.d.ts @@ -0,0 +1,78 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojTrain extends baseComponent { + selectedStep: string; + steps: ojTrain.Step[]; + onSelectedStepChanged: ((event: JetElementCustomEvent) => any) | null; + onStepsChanged: ((event: JetElementCustomEvent) => any) | null; + onOjBeforeDeselect: ((event: ojTrain.ojBeforeDeselect) => any) | null; + onOjBeforeSelect: ((event: ojTrain.ojBeforeSelect) => any) | null; + onOjDeselect: ((event: ojTrain.ojDeselect) => any) | null; + onOjSelect: ((event: ojTrain.ojSelect) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTrainEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojTrain[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojTrainSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojTrainSettablePropertiesLenient): void; + getNextSelectableStep(): string | null; + getPreviousSelectableStep(): string | null; + getStep(id: string): ojTrain.Step | null; + refresh(): void; + updateStep(id: string, stepProperties: { + id?: string; + label?: string; + disabled?: boolean; + visited?: boolean; + messageType?: 'info' | 'error' | 'fatal' | 'warning'; + }): void; +} +export namespace ojTrain { + interface ojBeforeDeselect extends CustomEvent<{ + toStep: string; + fromStep: string; + [propName: string]: any; + }> { + } + interface ojBeforeSelect extends CustomEvent<{ + toStep: string; + fromStep: string; + [propName: string]: any; + }> { + } + interface ojDeselect extends CustomEvent<{ + toStep: string; + fromStep: string; + [propName: string]: any; + }> { + } + interface ojSelect extends CustomEvent<{ + toStep: string; + fromStep: string; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type Step = { + id: string; + label: string; + disabled?: boolean; + visited?: boolean; + messageType?: 'info' | 'error' | 'fatal' | 'warning'; + }; +} +export interface ojTrainEventMap extends baseComponentEventMap { + 'ojBeforeDeselect': ojTrain.ojBeforeDeselect; + 'ojBeforeSelect': ojTrain.ojBeforeSelect; + 'ojDeselect': ojTrain.ojDeselect; + 'ojSelect': ojTrain.ojSelect; + 'selectedStepChanged': JetElementCustomEvent; + 'stepsChanged': JetElementCustomEvent; +} +export interface ojTrainSettableProperties extends baseComponentSettableProperties { + selectedStep: string; + steps: ojTrain.Step[]; +} +export interface ojTrainSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojtranslation/index.d.ts b/types/oraclejet/ojtranslation/index.d.ts new file mode 100644 index 0000000000..69957f1980 --- /dev/null +++ b/types/oraclejet/ojtranslation/index.d.ts @@ -0,0 +1,5 @@ +export function applyParameters(pattern: string, parameters: object | any[]): string | null; +export function getComponentTranslations(componentName: string): object; +export function getResource(key: string): object | string | null; +export function getTranslatedString(key: string, ...var_args: Array): string; +export function setBundle(bundle: object): void; diff --git a/types/oraclejet/ojtreedataprovider/index.d.ts b/types/oraclejet/ojtreedataprovider/index.d.ts new file mode 100644 index 0000000000..88d877d363 --- /dev/null +++ b/types/oraclejet/ojtreedataprovider/index.d.ts @@ -0,0 +1,5 @@ +import { DataProvider } from '../ojdataprovider'; +interface TreeDataProvider extends DataProvider { + getChildDataProvider(parentKey: any): TreeDataProvider; +} +export = TreeDataProvider; diff --git a/types/oraclejet/ojtreemap/index.d.ts b/types/oraclejet/ojtreemap/index.d.ts new file mode 100644 index 0000000000..56bfb35de9 --- /dev/null +++ b/types/oraclejet/ojtreemap/index.d.ts @@ -0,0 +1,392 @@ +import { DataProvider } from '../ojdataprovider'; +import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojTreemap extends dvtBaseComponent> { + animationDuration: number; + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + animationUpdateColor: string; + as: string; + colorLabel: string; + data: DataProvider | null; + displayLevels: number; + drilling: 'on' | 'off'; + groupGaps: 'all' | 'none' | 'outer'; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + hoverBehaviorDelay: number; + isolatedNode: any; + layout: 'sliceAndDiceHorizontal' | 'sliceAndDiceVertical' | 'squarified'; + nodeContent: { + renderer: ((context: ojTreemap.NodeContentContext) => ({ + insert: Element | string; + })); + }; + nodeDefaults: { + groupLabelDisplay: 'node' | 'off' | 'header'; + header: { + backgroundColor: string; + borderColor: string; + hoverBackgroundColor: string; + hoverInnerColor: string; + hoverOuterColor: string; + isolate: 'off' | 'on'; + labelHalign: 'center' | 'end' | 'start'; + labelStyle: object; + selectedBackgroundColor: string; + selectedInnerColor: string; + selectedOuterColor: string; + useNodeColor: 'on' | 'off'; + }; + hoverColor: string; + labelDisplay: 'off' | 'node'; + labelHalign: 'start' | 'end' | 'center'; + labelMinLength: number; + labelStyle: object; + labelValign: 'top' | 'bottom' | 'center'; + selectedInnerColor: string; + selectedOuterColor: string; + }; + nodeSeparators: 'bevels' | 'gaps'; + rootNode: any; + selection: any[]; + selectionMode: 'none' | 'single' | 'multiple'; + sizeLabel: string; + sorting: 'on' | 'off'; + tooltip: { + renderer: ((context: ojTreemap.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + touchResponse: 'touchStart' | 'auto'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelColor?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + labelSize?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + tooltipIsolate?: string; + tooltipRestore?: string; + }; + onAnimationDurationChanged: ((event: JetElementCustomEvent["animationDuration"]>) => any) | null; + onAnimationOnDataChangeChanged: ((event: JetElementCustomEvent["animationOnDataChange"]>) => any) | null; + onAnimationOnDisplayChanged: ((event: JetElementCustomEvent["animationOnDisplay"]>) => any) | null; + onAnimationUpdateColorChanged: ((event: JetElementCustomEvent["animationUpdateColor"]>) => any) | null; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onColorLabelChanged: ((event: JetElementCustomEvent["colorLabel"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onDisplayLevelsChanged: ((event: JetElementCustomEvent["displayLevels"]>) => any) | null; + onDrillingChanged: ((event: JetElementCustomEvent["drilling"]>) => any) | null; + onGroupGapsChanged: ((event: JetElementCustomEvent["groupGaps"]>) => any) | null; + onHiddenCategoriesChanged: ((event: JetElementCustomEvent["hiddenCategories"]>) => any) | null; + onHighlightMatchChanged: ((event: JetElementCustomEvent["highlightMatch"]>) => any) | null; + onHighlightedCategoriesChanged: ((event: JetElementCustomEvent["highlightedCategories"]>) => any) | null; + onHoverBehaviorChanged: ((event: JetElementCustomEvent["hoverBehavior"]>) => any) | null; + onHoverBehaviorDelayChanged: ((event: JetElementCustomEvent["hoverBehaviorDelay"]>) => any) | null; + onIsolatedNodeChanged: ((event: JetElementCustomEvent["isolatedNode"]>) => any) | null; + onLayoutChanged: ((event: JetElementCustomEvent["layout"]>) => any) | null; + onNodeContentChanged: ((event: JetElementCustomEvent["nodeContent"]>) => any) | null; + onNodeDefaultsChanged: ((event: JetElementCustomEvent["nodeDefaults"]>) => any) | null; + onNodeSeparatorsChanged: ((event: JetElementCustomEvent["nodeSeparators"]>) => any) | null; + onRootNodeChanged: ((event: JetElementCustomEvent["rootNode"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent["selectionMode"]>) => any) | null; + onSizeLabelChanged: ((event: JetElementCustomEvent["sizeLabel"]>) => any) | null; + onSortingChanged: ((event: JetElementCustomEvent["sorting"]>) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent["tooltip"]>) => any) | null; + onTouchResponseChanged: ((event: JetElementCustomEvent["touchResponse"]>) => any) | null; + onOjBeforeDrill: ((event: ojTreemap.ojBeforeDrill) => any) | null; + onOjDrill: ((event: ojTreemap.ojDrill) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojTreemapEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojTreemap[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojTreemapSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojTreemapSettablePropertiesLenient): void; + getContextByNode(node: Element): ojTreemap.NodeContext | null; + getNode(subIdPath: any[]): ojTreemap.DataContext | null; +} +export namespace ojTreemap { + interface ojBeforeDrill extends CustomEvent<{ + id: any; + data: object; + itemData: object; + [propName: string]: any; + }> { + } + interface ojDrill extends CustomEvent<{ + id: any; + data: object; + itemData: object; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type DataContext = { + color: string; + label: string; + selected: boolean; + size: number; + tooltip: string; + }; + // tslint:disable-next-line interface-over-type-literal + type NodeContentContext = { + bounds: { + x: number; + y: number; + width: number; + height: number; + }; + id: K; + data: object; + itemData: D; + componentElement: Element; + }; + // tslint:disable-next-line interface-over-type-literal + type NodeContext = { + subId: string; + indexPath: number[]; + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + parentElement: Element; + id: K; + label: string; + value: number; + color: string; + data: object; + itemData: D; + componentElement: Element; + }; +} +export interface ojTreemapEventMap extends dvtBaseComponentEventMap> { + 'ojBeforeDrill': ojTreemap.ojBeforeDrill; + 'ojDrill': ojTreemap.ojDrill; + 'animationDurationChanged': JetElementCustomEvent["animationDuration"]>; + 'animationOnDataChangeChanged': JetElementCustomEvent["animationOnDataChange"]>; + 'animationOnDisplayChanged': JetElementCustomEvent["animationOnDisplay"]>; + 'animationUpdateColorChanged': JetElementCustomEvent["animationUpdateColor"]>; + 'asChanged': JetElementCustomEvent["as"]>; + 'colorLabelChanged': JetElementCustomEvent["colorLabel"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'displayLevelsChanged': JetElementCustomEvent["displayLevels"]>; + 'drillingChanged': JetElementCustomEvent["drilling"]>; + 'groupGapsChanged': JetElementCustomEvent["groupGaps"]>; + 'hiddenCategoriesChanged': JetElementCustomEvent["hiddenCategories"]>; + 'highlightMatchChanged': JetElementCustomEvent["highlightMatch"]>; + 'highlightedCategoriesChanged': JetElementCustomEvent["highlightedCategories"]>; + 'hoverBehaviorChanged': JetElementCustomEvent["hoverBehavior"]>; + 'hoverBehaviorDelayChanged': JetElementCustomEvent["hoverBehaviorDelay"]>; + 'isolatedNodeChanged': JetElementCustomEvent["isolatedNode"]>; + 'layoutChanged': JetElementCustomEvent["layout"]>; + 'nodeContentChanged': JetElementCustomEvent["nodeContent"]>; + 'nodeDefaultsChanged': JetElementCustomEvent["nodeDefaults"]>; + 'nodeSeparatorsChanged': JetElementCustomEvent["nodeSeparators"]>; + 'rootNodeChanged': JetElementCustomEvent["rootNode"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'selectionModeChanged': JetElementCustomEvent["selectionMode"]>; + 'sizeLabelChanged': JetElementCustomEvent["sizeLabel"]>; + 'sortingChanged': JetElementCustomEvent["sorting"]>; + 'tooltipChanged': JetElementCustomEvent["tooltip"]>; + 'touchResponseChanged': JetElementCustomEvent["touchResponse"]>; +} +export interface ojTreemapSettableProperties extends dvtBaseComponentSettableProperties { + animationDuration: number; + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + animationUpdateColor: string; + as: string; + colorLabel: string; + data: DataProvider | null; + displayLevels: number; + drilling: 'on' | 'off'; + groupGaps: 'all' | 'none' | 'outer'; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + hoverBehaviorDelay: number; + isolatedNode: any; + layout: 'sliceAndDiceHorizontal' | 'sliceAndDiceVertical' | 'squarified'; + nodeContent: { + renderer: ((context: ojTreemap.NodeContentContext) => ({ + insert: Element | string; + })); + }; + nodeDefaults: { + groupLabelDisplay: 'node' | 'off' | 'header'; + header: { + backgroundColor: string; + borderColor: string; + hoverBackgroundColor: string; + hoverInnerColor: string; + hoverOuterColor: string; + isolate: 'off' | 'on'; + labelHalign: 'center' | 'end' | 'start'; + labelStyle: object; + selectedBackgroundColor: string; + selectedInnerColor: string; + selectedOuterColor: string; + useNodeColor: 'on' | 'off'; + }; + hoverColor: string; + labelDisplay: 'off' | 'node'; + labelHalign: 'start' | 'end' | 'center'; + labelMinLength: number; + labelStyle: object; + labelValign: 'top' | 'bottom' | 'center'; + selectedInnerColor: string; + selectedOuterColor: string; + }; + nodeSeparators: 'bevels' | 'gaps'; + rootNode: any; + selection: any[]; + selectionMode: 'none' | 'single' | 'multiple'; + sizeLabel: string; + sorting: 'on' | 'off'; + tooltip: { + renderer: ((context: ojTreemap.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + touchResponse: 'touchStart' | 'auto'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelColor?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + labelSize?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + tooltipIsolate?: string; + tooltipRestore?: string; + }; +} +export interface ojTreemapSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojTreemapNode extends JetElement { + categories?: string[]; + color?: string; + drilling?: 'on' | 'off' | 'inherit'; + groupLabelDisplay?: 'node' | 'off' | 'header'; + header?: { + isolate?: 'off' | 'on'; + labelHalign?: 'center' | 'end' | 'start'; + labelStyle?: object; + useNodeColor?: 'on' | 'off'; + }; + label?: string; + labelDisplay?: 'off' | 'node'; + labelHalign?: 'start' | 'end' | 'center'; + labelStyle?: object; + labelValign?: 'top' | 'bottom' | 'center'; + pattern?: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + selectable?: 'off' | 'auto'; + shortDesc?: string; + svgClassName?: string; + svgStyle?: object; + value: number; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onDrillingChanged: ((event: JetElementCustomEvent) => any) | null; + onGroupLabelDisplayChanged: ((event: JetElementCustomEvent) => any) | null; + onHeaderChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelDisplayChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelHalignChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelValignChanged: ((event: JetElementCustomEvent) => any) | null; + onPatternChanged: ((event: JetElementCustomEvent) => any) | null; + onSelectableChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTreemapNodeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojTreemapNode[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojTreemapNodeSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojTreemapNodeSettablePropertiesLenient): void; +} +export interface ojTreemapNodeEventMap extends HTMLElementEventMap { + 'categoriesChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'drillingChanged': JetElementCustomEvent; + 'groupLabelDisplayChanged': JetElementCustomEvent; + 'headerChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; + 'labelDisplayChanged': JetElementCustomEvent; + 'labelHalignChanged': JetElementCustomEvent; + 'labelStyleChanged': JetElementCustomEvent; + 'labelValignChanged': JetElementCustomEvent; + 'patternChanged': JetElementCustomEvent; + 'selectableChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojTreemapNodeSettableProperties extends JetSettableProperties { + categories?: string[]; + color?: string; + drilling?: 'on' | 'off' | 'inherit'; + groupLabelDisplay?: 'node' | 'off' | 'header'; + header?: { + isolate?: 'off' | 'on'; + labelHalign?: 'center' | 'end' | 'start'; + labelStyle?: object; + useNodeColor?: 'on' | 'off'; + }; + label?: string; + labelDisplay?: 'off' | 'node'; + labelHalign?: 'start' | 'end' | 'center'; + labelStyle?: object; + labelValign?: 'top' | 'bottom' | 'center'; + pattern?: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + selectable?: 'off' | 'auto'; + shortDesc?: string; + svgClassName?: string; + svgStyle?: object; + value: number; +} +export interface ojTreemapNodeSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojvalidation-base/index.d.ts b/types/oraclejet/ojvalidation-base/index.d.ts new file mode 100644 index 0000000000..83a20555db --- /dev/null +++ b/types/oraclejet/ojvalidation-base/index.d.ts @@ -0,0 +1,144 @@ +import Message = require('../ojmessaging'); +import Color = require('../ojcolor'); +export interface AsyncValidator { + hint: Promise; + validate(value: V): Promise; +} +export class ColorConverter implements Converter { + constructor(options?: ColorConverter.ConverterOptions); + format(color: Color): string | null; + getHint(): string; + parse(value: string): Color; + resolvedOptions(): ColorConverter.ConverterOptions; +} +export namespace ColorConverter { + // tslint:disable-next-line interface-over-type-literal + type ConverterOptions = { + format?: 'rgb' | 'hsl' | 'hsv' | 'hex' | 'hex3'; + }; +} +export interface ColorConverterFactory { + createConverter(options?: ColorConverter.ConverterOptions): ColorConverter; +} +export interface Converter { + format(value: V): string | null; + getHint?(): string | null; + getOptions?(): object; + parse(value: string): V | null; + resolvedOptions?(): object; +} +export interface ConverterError { + // constructor(summary: string, detail: string); + getMessage(): Message; +} +export interface ConverterFactory { + // static CONVERTER_TYPE_COLOR: string; + // static CONVERTER_TYPE_DATETIME: string; + // static CONVERTER_TYPE_NUMBER: string; + createConverter(options: object | null): Converter; +} +export namespace IntlConverterUtils { + function dateToLocalIso(date: Date): string; + function getConverterInstance(converterOption: string | Validation.RegisteredConverter | Converter): Converter | null; + function getInitials(firstName?: string, lastName?: string): string | undefined; + function getLocalTimeZoneOffset(): string; + function isoToDate(isoString: string): Date; + function isoToLocalDate(isoString: string): Date; +} +export class LengthValidator implements Validator { + static defaults: { + countBy: string; + }; + constructor(options?: LengthValidator.ValidatorOptions); + getHint(): string | null; + validate(value: string | number): void; +} +export namespace LengthValidator { + // tslint:disable-next-line interface-over-type-literal + type ValidatorOptions = { + countBy?: 'codeUnit' | 'codePoint'; + min?: number; + max?: number; + hint?: { + max?: string; + min?: string; + inRange?: string; + exact?: string; + }; + messageDetail?: { + tooLong?: string; + tooShort?: string; + }; + messageSummary?: { + tooLong?: string; + tooShort?: string; + }; + }; +} +export interface LengthValidatorFactory { + createValidator(options?: LengthValidator.ValidatorOptions): LengthValidator; +} +export class RegExpValidator implements Validator { + constructor(options?: RegExpValidator.ValidatorOptions); + getHint(): string | null; + validate(value: string | number): void; +} +export namespace RegExpValidator { + // tslint:disable-next-line interface-over-type-literal + type ValidatorOptions = { + pattern?: string; + hint?: string; + messageSummary?: string; + messageDetail?: string; + }; +} +export interface RegExpValidatorFactory { + createValidator(options: RegExpValidator.ValidatorOptions): RegExpValidator; +} +export class RequiredValidator implements Validator { + constructor(options?: RequiredValidator.ValidatorOptions); + getHint(): string | null; + validate(value: object | string | number): void; +} +export namespace RequiredValidator { + // tslint:disable-next-line interface-over-type-literal + type ValidatorOptions = { + hint?: string; + messageSummary?: string; + messageDetail?: string; + }; +} +export interface RequiredValidatorFactory { + createValidator(options?: RequiredValidator.ValidatorOptions): RequiredValidator; +} +export namespace Validation { + function converterFactory>(type: 'number' | 'color' | 'datetime' | string, instance?: CF): CF | null; + function validatorFactory>(type: 'required' | 'regexp' | 'numberRange' | 'length' | 'dateTimeRange' | 'dateRestriction' | string, instance?: VF): VF | null; + // tslint:disable-next-line interface-over-type-literal + type RegisteredConverter = { + type: string; + options?: object; + }; + // tslint:disable-next-line interface-over-type-literal + type RegisteredValidator = { + type: string; + options?: object; + }; +} +export interface Validator { + getHint?(): string | null; + validate(value: V): void; +} +export interface ValidatorError { + // constructor(summary: string, detail: string); + getMessage(): Message; +} +export interface ValidatorFactory { + // static VALIDATOR_TYPE_DATERESTRICTION: string; + // static VALIDATOR_TYPE_DATETIMERANGE: string; + // static VALIDATOR_TYPE_LENGTH: string; + // static VALIDATOR_TYPE_NUMBERRANGE: string; + // static VALIDATOR_TYPE_REGEXP: string; + // static VALIDATOR_TYPE_REQUIRED: string; + createValidator(options: object | null): Validator; +} diff --git a/types/oraclejet/ojvalidation-datetime/index.d.ts b/types/oraclejet/ojvalidation-datetime/index.d.ts new file mode 100644 index 0000000000..976969a002 --- /dev/null +++ b/types/oraclejet/ojvalidation-datetime/index.d.ts @@ -0,0 +1,130 @@ +import { Converter, Validator, Validation } from '../ojvalidation-base'; +export class DateRestrictionValidator implements Validator { + constructor(options?: DateRestrictionValidator.ValidatorOptions); + getHint(): string | null; + validate(value: string): void; +} +export namespace DateRestrictionValidator { + // tslint:disable-next-line interface-over-type-literal + type DayFormatterInput = { + fullYear: number; + month: number; + date: number; + }; + // tslint:disable-next-line interface-over-type-literal + type DayFormatterOutput = { + disabled?: boolean; + className?: string; + tooltip?: string; + }; + // tslint:disable-next-line interface-over-type-literal + type ValidatorOptions = { + dayFormatter?: ((param0: DayFormatterInput) => DayFormatterOutput | null | 'all'); + messageSummary?: string; + messageDetail?: string; + }; +} +export interface DateRestrictionValidatorFactory { + createValidator(options?: DateRestrictionValidator.ValidatorOptions): DateRestrictionValidator; +} +export abstract class DateTimeConverter implements Converter { + abstract calculateWeek(value: string): number | undefined; + compareISODates(isoStr: string, isoStr2: string): number; + format(value: string): string | null; + getAvailableTimeZones(): any[]; + abstract isDayNameSet(): boolean; + abstract isDaySet(): boolean; + abstract isHourInAMPMSet(): boolean; + abstract isHourInDaySet(): boolean; + abstract isMilliSecondSet(): boolean; + abstract isMinuteSet(): boolean; + abstract isMonthSet(): boolean; + abstract isSecondSet(): boolean; + abstract isYearSet(): boolean; + parse(value: string): string | null; +} +export interface DateTimeConverterFactory { + createConverter(options?: IntlDateTimeConverter.ConverterOptions): IntlDateTimeConverter; +} +export class DateTimeRangeValidator implements Validator { + constructor(options?: DateTimeRangeValidator.ValidatorOptions); + getHint(): string | null; + validate(value: string): void; +} +export namespace DateTimeRangeValidator { + // tslint:disable-next-line interface-over-type-literal + type ValidatorOptions = { + converter: DateTimeConverter; + min?: string; + max?: string; + hint?: { + max?: string; + min?: string; + inRange?: string; + }; + translationKey?: string; + messageDetail?: { + rangeUnderflow?: string; + rangeOverflow?: string; + }; + messageSummary?: { + rangeUnderflow?: string; + rangeOverflow?: string; + }; + }; +} +export interface DateTimeRangeValidatorFactory { + createValidator(options?: DateTimeRangeValidator.ValidatorOptions): DateTimeRangeValidator; +} +export class IntlDateTimeConverter extends DateTimeConverter { + constructor(options?: IntlDateTimeConverter.ConverterOptions); + calculateWeek(value: string): number; + compareISODates(isoStr: string, isoStr2: string): number; + format(value: string): string | null; + formatRelative(value: string, relativeOptions?: { + formatUsing?: string; + dateField?: string; + relativeTime?: string; + dateOnly?: boolean; + timeZone?: string; + }): string | null; + getAvailableTimeZones(): any[]; + getHint(): null; + getOptions(): IntlDateTimeConverter.ConverterOptions; + isDayNameSet(): boolean; + isDaySet(): boolean; + isHourInAMPMSet(): boolean; + isHourInDaySet(): boolean; + isMilliSecondSet(): boolean; + isMinuteSet(): boolean; + isMonthSet(): boolean; + isSecondSet(): boolean; + isYearSet(): boolean; + parse(value: string): string | null; + resolvedOptions(): IntlDateTimeConverter.ConverterOptions; +} +export namespace IntlDateTimeConverter { + // tslint:disable-next-line interface-over-type-literal + type ConverterOptions = { + year?: '2-digit' | 'numeric'; + 'two-digit-year-start'?: number; + month?: '2-digit' | 'numeric' | 'narrow' | 'short' | 'long'; + day?: '2-digit' | 'numeric'; + hour?: '2-digit' | 'numeric'; + minute?: '2-digit' | 'numeric'; + second?: '2-digit' | 'numeric'; + millisecond?: 'numeric'; + weekday?: 'narrow' | 'short' | 'long'; + era?: 'narrow' | 'short' | 'long'; + timeZoneName?: 'short' | 'long'; + timeZone?: string; + isoStrFormat?: 'offset' | 'zulu' | 'local' | 'auto'; + dst?: boolean; + hour12?: boolean; + pattern?: string; + formatType?: 'date' | 'time' | 'datetime'; + dateFormat?: 'short' | 'medium' | 'long' | 'full'; + timeFormat?: 'short' | 'medium' | 'long' | 'full'; + lenientParse?: 'full' | 'none'; + }; +} diff --git a/types/oraclejet/ojvalidation-number/index.d.ts b/types/oraclejet/ojvalidation-number/index.d.ts new file mode 100644 index 0000000000..09addc6522 --- /dev/null +++ b/types/oraclejet/ojvalidation-number/index.d.ts @@ -0,0 +1,67 @@ +import { Converter, Validator, Validation } from '../ojvalidation-base'; +export class IntlNumberConverter extends NumberConverter { + constructor(options?: IntlNumberConverter.ConverterOptions); + format(value: number): string; + getHint(): null; + getOptions(): IntlNumberConverter.ConverterOptions; + parse(value: string): number | null; + resolvedOptions(): IntlNumberConverter.ConverterOptions; +} +export namespace IntlNumberConverter { + // tslint:disable-next-line interface-over-type-literal + type ConverterOptions = { + style?: 'decimal' | 'currency' | 'percent' | 'unit'; + currency?: string; + unit?: 'byte' | 'bit'; + currencyDisplay?: 'code' | 'symbol' | 'name'; + decimalFormat?: 'standard' | 'short' | 'long'; + currencyFormat?: 'standard' | 'short' | 'long'; + minimumIntegerDigits?: number; + minimumFractionDigits?: number; + maximumFractionDigits?: number; + useGrouping?: boolean; + pattern?: string; + roundingMode?: 'HALF_UP' | 'HALF_DOWN' | 'HALF_EVEN'; + roundDuringParse?: boolean; + separators?: object; + lenientParse?: 'full' | 'none'; + }; +} +export class NumberConverter implements Converter { + format(value: number): string | null; + parse(value: string): number | null; +} +export interface NumberConverterFactory { + createConverter(options?: IntlNumberConverter.ConverterOptions): IntlNumberConverter; +} +export class NumberRangeValidator implements Validator { + constructor(options?: NumberRangeValidator.ValidatorOptions); + getHint(): string | null; + validate(value: string | number): void; +} +export namespace NumberRangeValidator { + // tslint:disable-next-line interface-over-type-literal + type ValidatorOptions = { + converter?: NumberConverter; + min?: number; + max?: number; + hint?: { + max?: string; + min?: string; + inRange?: string; + exact?: string; + }; + messageDetail?: { + rangeUnderflow?: string; + rangeOverflow?: string; + exact?: string; + }; + messageSummary?: { + rangeUnderflow?: string; + rangeOverflow?: string; + }; + }; +} +export interface NumberRangeValidatorFactory { + createValidator(options?: NumberRangeValidator.ValidatorOptions): NumberRangeValidator; +} diff --git a/types/oraclejet/ojvalidationgroup/index.d.ts b/types/oraclejet/ojvalidationgroup/index.d.ts new file mode 100644 index 0000000000..e5dceb249a --- /dev/null +++ b/types/oraclejet/ojvalidationgroup/index.d.ts @@ -0,0 +1,23 @@ +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojValidationGroup extends JetElement { + readonly valid: 'valid' | 'pending' | 'invalidHidden' | 'invalidShown'; + onValidChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojValidationGroupEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojValidationGroup[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojValidationGroupSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojValidationGroupSettablePropertiesLenient): void; + focusOn(key?: '@firstInvalidShown'): void; + showMessages(): void; +} +export interface ojValidationGroupEventMap extends HTMLElementEventMap { + 'validChanged': JetElementCustomEvent; +} +export interface ojValidationGroupSettableProperties extends JetSettableProperties { + readonly valid: 'valid' | 'pending' | 'invalidHidden' | 'invalidShown'; +} +export interface ojValidationGroupSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/test.ts b/types/oraclejet/test.ts new file mode 100644 index 0000000000..265c0d4856 --- /dev/null +++ b/types/oraclejet/test.ts @@ -0,0 +1,113 @@ +// Since all the definitions are auto generated from jsdoc doclets and internally tested through application, +// add some basic tests here. +import { ojAccordion } from "oraclejet/ojaccordion"; +import AnimationUtils = require("oraclejet/ojanimation"); +import ArrayDataProvider = require("oraclejet/ojarraydataprovider"); +import ArrayTreeDataProvider = require("oraclejet/ojarraytreedataprovider"); +import { AttributeGroupHandler, ColorAttributeGroupHandler, ShapeAttributeGroupHandler } from 'oraclejet/ojattributegrouphandler'; +import { ojAvatar } from "oraclejet/ojavatar"; +import { ojButton, ojButtonsetMany, ojButtonsetOne } from "oraclejet/ojbutton"; +import { ojChart, ojChartGroup, ojChartItem, ojChartSeries, ojSparkChart, ojSparkChartItem } from "oraclejet/ojchart"; +import { ojCheckboxset } from "oraclejet/ojcheckboxset"; +import { ojCollapsible } from "oraclejet/ojcollapsible"; +import CollectionDataprovider = require("oraclejet/ojcollectiondataprovider"); +import Color = require("oraclejet/ojcolor"); +import { ojColorPalette } from "oraclejet/ojcolorpalette"; +import { ojColorSpectrum } from "oraclejet/ojcolorspectrum"; +import Components = require("oraclejet/ojcomponentcore"); +import Composite = require("oraclejet/ojcomposite"); +import Config = require('oraclejet/ojconfig'); +import Context = require("oraclejet/ojcontext"); +import { ojConveyorBelt } from "oraclejet/ojconveyorbelt"; +import { ojDataGrid } from "oraclejet/ojdatagrid"; +import { DataMapping, DataProvider, DataProviderAddOperationEventDetail, DataProviderMutationEventDetail, DataProviderOperationEventDetail } from "oraclejet/ojdataprovider"; +import { ojDatePicker, ojDateTimePicker, ojInputDate, ojInputDateTime, ojInputTime } from "oraclejet/ojdatetimepicker"; +import { ojDefer } from "oraclejet/ojdefer"; +import DeferredDataprovider = require("oraclejet/ojdeferreddataprovider"); +import { ojDiagram, ojDiagramLink, ojDiagramNode } from "oraclejet/ojdiagram"; +import { ojDialog } from "oraclejet/ojdialog"; +import { dvtBaseComponent } from "oraclejet/ojdvt-base"; +import { editableValue } from "oraclejet/ojeditablevalue"; +import ExpressionUtils = require('oraclejet/ojexpressionutils'); +import { ojFilePicker, FileUploadTransport } from "oraclejet/ojfilepicker"; +import { ojFilmStrip } from "oraclejet/ojfilmstrip"; +import { ojFormLayout } from "oraclejet/ojformlayout"; +import { ojGantt, ojGanttRow, ojGanttTask, ojGanttDependency } from "oraclejet/ojgantt"; +import GanttUtils = require ('oraclejet/ojganttutils'); +import { ojLedGauge, ojRatingGauge, ojStatusMeterGauge } from "oraclejet/ojgauge"; +import { ojInputNumber } from "oraclejet/ojinputnumber"; +import { ojInputPassword, ojInputText, ojTextArea } from "oraclejet/ojinputtext"; +import { KeySet, ExpandAllKeySet, ExpandedKeySet } from "oraclejet/ojkeyset"; +import { ObservableExpandedKeySet } from "oraclejet/ojknockout-keyset"; +import KnockoutUtils = require("oraclejet/ojknockout-model"); +import KnockoutTemplateUtils = require('oraclejet/ojknockouttemplateutils'); +import { ojLabel } from "oraclejet/ojlabel"; +import { ojLabelValue } from "oraclejet/ojlabelvalue"; +import { ojLegend } from "oraclejet/ojlegend"; +import ListDataProviderView = require("oraclejet/ojlistdataproviderview"); +import { ojListView } from "oraclejet/ojlistview"; +import LocaleData = require('oraclejet/ojlocaledata'); +import Logger = require('oraclejet/ojlogger'); +import { ojMasonryLayout } from "oraclejet/ojmasonrylayout"; +import { ojMenu } from "oraclejet/ojmenu"; +import { ojMenuSelectMany } from "oraclejet/ojmenuselectmany"; +import { ojMessages } from "oraclejet/ojmessages"; +import { ojMessage } from "oraclejet/ojmessage"; +import Message = require("oraclejet/ojmessaging"); +import { Collection, Model, URLError, OAuth } from "oraclejet/ojmodel"; +import { ojModule } from "oraclejet/ojmodule-element"; +import ModuleElementUtils = require("oraclejet/ojmodule-element-utils"); +import ModuleAnimations = require("oraclejet/ojmoduleanimations") ; +import { ojNavigationList, ojTabBar } from "oraclejet/ojnavigationlist"; +import { ojNBox } from "oraclejet/ojnbox"; +import { ojOptgroup } from "oraclejet/ojoptgroup"; +import { ojOption } from "oraclejet/ojoption"; +import { ojPictoChart, ojPictoChartItem } from "oraclejet/ojpictochart"; +import { ojPopup } from "oraclejet/ojpopup"; +import { ojProgress } from "oraclejet/ojprogress"; +import { ojProgressList, ProgressItem } from "oraclejet/ojprogresslist"; +import PullToRefreshUtils = require("oraclejet/ojpulltorefresh"); +import { ojRadioset } from "oraclejet/ojradioset"; +import { ojRefresher } from "oraclejet/ojrefresher"; +import ResponsiveKnockoutUtils = require('oraclejet/ojresponsiveknockoututils'); +import ResponsiveUtils = require('oraclejet/ojresponsiveutils'); +import Router = require("oraclejet/ojrouter"); +import { ojComboboxOne, ojComboboxMany, ojSelectOne, ojSelectMany } from "oraclejet/ojselectcombobox"; +import { ojSlider } from "oraclejet/ojslider"; +import { ojSunburst } from "oraclejet/ojsunburst"; +import { ojSwipeActions } from "oraclejet/ojswipeactions"; +import SwipeToRevealUtils = require("oraclejet/ojswipetoreveal"); +import { ojSwitch } from "oraclejet/ojswitch"; +import { ojSwitcher } from "oraclejet/ojswitcher"; +import { ojTable } from "oraclejet/ojtable"; +import { ojTagCloud } from "oraclejet/ojtagcloud"; +import { ojThematicMap } from "oraclejet/ojthematicmap"; +import ThemeUtils = require('oraclejet/ojthemeutils'); +import { dvtTimeComponent } from "oraclejet/ojtime-base"; +import { ojTimeAxis } from "oraclejet/ojtimeaxis"; +import TimeUtils = require("oraclejet/ojtimeutils"); +import { ojToolbar } from "oraclejet/ojtoolbar"; +import { ojTrain } from "oraclejet/ojtrain"; +import Translations = require("oraclejet/ojtranslation"); +import TreeDataProvider = require("oraclejet/ojtreedataprovider"); +import { ojTreemap } from "oraclejet/ojtreemap"; +import { Validation, Validator, ValidatorError, ValidatorFactory, + AsyncValidator, LengthValidator, LengthValidatorFactory, RegExpValidator, RegExpValidatorFactory, RequiredValidator, RequiredValidatorFactory } from "oraclejet/ojvalidation-base"; +import { DateRestrictionValidator, DateRestrictionValidatorFactory, DateTimeRangeValidator, DateTimeRangeValidatorFactory } from "oraclejet/ojvalidation-datetime"; +import { NumberRangeValidator, NumberRangeValidatorFactory } from "oraclejet/ojvalidation-number"; +import { ojValidationGroup } from "oraclejet/ojvalidationgroup"; + +const onChangedCallback = (event: CustomEvent) => { +}; +const myHTMLElement = document.getElementById('myelement'); +const accordionElement = myHTMLElement as ojAccordion; +accordionElement.multiple = true; +accordionElement.onMultipleChanged = onChangedCallback; + +const avatarElement = myHTMLElement as ojAvatar; +avatarElement.size = "xxs"; +avatarElement.set("initials", "I"); +avatarElement.unset("src"); + +const button = myHTMLElement as ojButtonsetOne; +button.chroming = 'half'; diff --git a/types/@oracle/tsconfig.json b/types/oraclejet/tsconfig.json similarity index 68% rename from types/@oracle/tsconfig.json rename to types/oraclejet/tsconfig.json index 812f56815d..ec0aacc788 100644 --- a/types/@oracle/tsconfig.json +++ b/types/oraclejet/tsconfig.json @@ -1,20 +1,23 @@ { "compileOnSave": true, "compilerOptions": { - "module": "amd", + "module": "commonjs", "lib": ["dom","es5","scripthost", "es2015.core","es2015.collection","es2015","esnext.asynciterable"], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, "strictFunctionTypes": true, - "types": ["knockout"], + "types": [], "forceConsistentCasingInFileNames": true, "noEmit": true, "target": "es5", - "typeRoots": ["../","./oraclejet/","./oraclejet/ojs/"] + "baseUrl": "../", + "typeRoots": [ + "../" + ] }, "include": [ - "/tests/oraclejet/@oraclejet-tests.ts", - "./oraclejet/**/*" + "/test.ts", + "./**/*" ] } \ No newline at end of file diff --git a/types/oraclejet/tslint.json b/types/oraclejet/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/oraclejet/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} From 3748e4ecbf9ac5489708e661b03b6bd304670480 Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Mon, 1 Oct 2018 19:34:08 -0700 Subject: [PATCH 003/160] npm test fail fix --- types/oraclejet/tsconfig.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/types/oraclejet/tsconfig.json b/types/oraclejet/tsconfig.json index ec0aacc788..bd455a55c1 100644 --- a/types/oraclejet/tsconfig.json +++ b/types/oraclejet/tsconfig.json @@ -15,9 +15,5 @@ "typeRoots": [ "../" ] - }, - "include": [ - "/test.ts", - "./**/*" - ] + } } \ No newline at end of file From e0149686eb0f9be448e59ea917039e732189bd74 Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Mon, 1 Oct 2018 20:16:07 -0700 Subject: [PATCH 004/160] fix npm test error --- types/oraclejet/tsconfig.json | 101 +++++++++++++++++++++++++++++++++- 1 file changed, 100 insertions(+), 1 deletion(-) diff --git a/types/oraclejet/tsconfig.json b/types/oraclejet/tsconfig.json index bd455a55c1..fc0ac3ac23 100644 --- a/types/oraclejet/tsconfig.json +++ b/types/oraclejet/tsconfig.json @@ -15,5 +15,104 @@ "typeRoots": [ "../" ] - } + }, + "files": [ + "test.ts", + "index.d.ts", + "ojaccordion/index.d.ts", + "ojanimation/index.d.ts", + "ojarraydataprovider/index.d.ts", + "ojarraytreedataprovider/index.d.ts", + "ojattributegrouphandler/index.d.ts", + "ojavatar/index.d.ts", + "ojbutton/index.d.ts", + "ojchart/index.d.ts", + "ojcheckboxset/index.d.ts", + "ojcollapsible/index.d.ts", + "ojcollectiondataprovider/index.d.ts", + "ojcolor/index.d.ts", + "ojcolorpalette/index.d.ts", + "ojcolorspectrum/index.d.ts", + "ojcomponentcore/index.d.ts", + "ojcomposite/index.d.ts", + "ojconfig/index.d.ts", + "ojcontext/index.d.ts", + "ojconveyorbelt/index.d.ts", + "ojdatagrid/index.d.ts", + "ojdataprovider/index.d.ts", + "ojdatetimepicker/index.d.ts", + "ojdefer/index.d.ts", + "ojdeferreddataprovider/index.d.ts", + "ojdiagram/index.d.ts", + "ojdialog/index.d.ts", + "ojdvt-base/index.d.ts", + "ojeditablevalue/index.d.ts", + "ojexpressionutils/index.d.ts", + "ojfilepicker/index.d.ts", + "ojfilmstrip/index.d.ts", + "ojformlayout/index.d.ts", + "ojgantt/index.d.ts", + "ojganttutils/index.d.ts", + "ojgauge/index.d.ts", + "ojinputnumber/index.d.ts", + "ojinputtext/index.d.ts", + "ojkeyset/index.d.ts", + "ojknockout-keyset/index.d.ts", + "ojknockout-model/index.d.ts", + "ojknockouttemplateutils/index.d.ts", + "ojlabel/index.d.ts", + "ojlabelvalue/index.d.ts", + "ojlegend/index.d.ts", + "ojlistdataproviderview/index.d.ts", + "ojlistview/index.d.ts", + "ojlocaledata/index.d.ts", + "ojlogger/index.d.ts", + "ojmasonrylayout/index.d.ts", + "ojmenu/index.d.ts", + "ojmenuselectmany/index.d.ts", + "ojmessage/index.d.ts", + "ojmessages/index.d.ts", + "ojmessaging/index.d.ts", + "ojmodel/index.d.ts", + "ojmodule-element/index.d.ts", + "ojmodule-element-utils/index.d.ts", + "ojmoduleanimations/index.d.ts", + "ojnavigationlist/index.d.ts", + "ojnbox/index.d.ts", + "ojoptgroup/index.d.ts", + "ojoption/index.d.ts", + "ojpictochart/index.d.ts", + "ojpopup/index.d.ts", + "ojprogress/index.d.ts", + "ojprogresslist/index.d.ts", + "ojpulltorefresh/index.d.ts", + "ojradioset/index.d.ts", + "ojrefresher/index.d.ts", + "ojresponsiveknockoututils/index.d.ts", + "ojresponsiveutils/index.d.ts", + "ojrouter/index.d.ts", + "ojselectcombobox/index.d.ts", + "ojslider/index.d.ts", + "ojsunburst/index.d.ts", + "ojswipeactions/index.d.ts", + "ojswipetoreveal/index.d.ts", + "ojswitch/index.d.ts", + "ojswitcher/index.d.ts", + "ojtable/index.d.ts", + "ojtagcloud/index.d.ts", + "ojthematicmap/index.d.ts", + "ojthemeutils/index.d.ts", + "ojtime-base/index.d.ts", + "ojtimeaxis/index.d.ts", + "ojtimeutils/index.d.ts", + "ojtoolbar/index.d.ts", + "ojtrain/index.d.ts", + "ojtranslation/index.d.ts", + "ojtreedataprovider/index.d.ts", + "ojtreemap/index.d.ts", + "ojvalidation-base/index.d.ts", + "ojvalidation-datetime/index.d.ts", + "ojvalidation-number/index.d.ts", + "ojvalidationgroup/index.d.ts" + ] } \ No newline at end of file From 9ec87fc09a4292fd38029de16e898320e72acc71 Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Mon, 1 Oct 2018 20:24:04 -0700 Subject: [PATCH 005/160] fix npm test --- types/oraclejet/{test.ts => oraclejetTests.ts} | 0 types/oraclejet/tsconfig.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename types/oraclejet/{test.ts => oraclejetTests.ts} (100%) diff --git a/types/oraclejet/test.ts b/types/oraclejet/oraclejetTests.ts similarity index 100% rename from types/oraclejet/test.ts rename to types/oraclejet/oraclejetTests.ts diff --git a/types/oraclejet/tsconfig.json b/types/oraclejet/tsconfig.json index fc0ac3ac23..3cecf0fb1d 100644 --- a/types/oraclejet/tsconfig.json +++ b/types/oraclejet/tsconfig.json @@ -17,7 +17,7 @@ ] }, "files": [ - "test.ts", + "oraclejetTests.ts", "index.d.ts", "ojaccordion/index.d.ts", "ojanimation/index.d.ts", From aac14f48d35b44015170cfd4e97d8d10e3fbcf10 Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Mon, 1 Oct 2018 20:25:34 -0700 Subject: [PATCH 006/160] fix npm test --- types/oraclejet/{oraclejetTests.ts => oraclejet-tests.ts} | 0 types/oraclejet/tsconfig.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename types/oraclejet/{oraclejetTests.ts => oraclejet-tests.ts} (100%) diff --git a/types/oraclejet/oraclejetTests.ts b/types/oraclejet/oraclejet-tests.ts similarity index 100% rename from types/oraclejet/oraclejetTests.ts rename to types/oraclejet/oraclejet-tests.ts diff --git a/types/oraclejet/tsconfig.json b/types/oraclejet/tsconfig.json index 3cecf0fb1d..e914883a1c 100644 --- a/types/oraclejet/tsconfig.json +++ b/types/oraclejet/tsconfig.json @@ -17,7 +17,7 @@ ] }, "files": [ - "oraclejetTests.ts", + "oraclejet-tests.ts", "index.d.ts", "ojaccordion/index.d.ts", "ojanimation/index.d.ts", From 9ce6b338d104bee241beceae99f488ea416ea011 Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Mon, 1 Oct 2018 20:57:31 -0700 Subject: [PATCH 007/160] test. move to scoped --- types/{oraclejet => oracle__oraclejet}/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojaccordion/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojanimation/index.d.ts | 0 .../ojarraydataprovider/index.d.ts | 0 .../ojarraytreedataprovider/index.d.ts | 0 .../ojattributegrouphandler/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojavatar/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojbutton/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojchart/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojcheckboxset/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojcollapsible/index.d.ts | 0 .../ojcollectiondataprovider/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojcolor/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojcolorpalette/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojcolorspectrum/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojcomponentcore/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojcomposite/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojconfig/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojcontext/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojconveyorbelt/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojdatagrid/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojdataprovider/index.d.ts | 0 .../{oraclejet => oracle__oraclejet}/ojdatetimepicker/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojdefer/index.d.ts | 0 .../ojdeferreddataprovider/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojdiagram/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojdialog/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojdvt-base/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojeditablevalue/index.d.ts | 0 .../{oraclejet => oracle__oraclejet}/ojexpressionutils/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojfilepicker/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojfilmstrip/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojformlayout/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojgantt/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojganttutils/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojgauge/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojinputnumber/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojinputtext/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojkeyset/index.d.ts | 0 .../{oraclejet => oracle__oraclejet}/ojknockout-keyset/index.d.ts | 0 .../{oraclejet => oracle__oraclejet}/ojknockout-model/index.d.ts | 0 .../ojknockouttemplateutils/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojlabel/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojlabelvalue/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojlegend/index.d.ts | 0 .../ojlistdataproviderview/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojlistview/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojlocaledata/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojlogger/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojmasonrylayout/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojmenu/index.d.ts | 0 .../{oraclejet => oracle__oraclejet}/ojmenuselectmany/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojmessage/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojmessages/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojmessaging/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojmodel/index.d.ts | 0 .../ojmodule-element-utils/index.d.ts | 0 .../{oraclejet => oracle__oraclejet}/ojmodule-element/index.d.ts | 0 .../ojmoduleanimations/index.d.ts | 0 .../{oraclejet => oracle__oraclejet}/ojnavigationlist/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojnbox/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojoptgroup/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojoption/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojpictochart/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojpopup/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojprogress/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojprogresslist/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojpulltorefresh/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojradioset/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojrefresher/index.d.ts | 0 .../ojresponsiveknockoututils/index.d.ts | 0 .../{oraclejet => oracle__oraclejet}/ojresponsiveutils/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojrouter/index.d.ts | 0 .../{oraclejet => oracle__oraclejet}/ojselectcombobox/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojslider/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojsunburst/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojswipeactions/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojswipetoreveal/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojswitch/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojswitcher/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojtable/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojtagcloud/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojthematicmap/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojthemeutils/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojtime-base/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojtimeaxis/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojtimeutils/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojtoolbar/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojtrain/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojtranslation/index.d.ts | 0 .../ojtreedataprovider/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojtreemap/index.d.ts | 0 .../{oraclejet => oracle__oraclejet}/ojvalidation-base/index.d.ts | 0 .../ojvalidation-datetime/index.d.ts | 0 .../ojvalidation-number/index.d.ts | 0 .../{oraclejet => oracle__oraclejet}/ojvalidationgroup/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/oraclejet-tests.ts | 0 types/{oraclejet => oracle__oraclejet}/tsconfig.json | 0 types/{oraclejet => oracle__oraclejet}/tslint.json | 0 99 files changed, 0 insertions(+), 0 deletions(-) rename types/{oraclejet => oracle__oraclejet}/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojaccordion/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojanimation/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojarraydataprovider/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojarraytreedataprovider/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojattributegrouphandler/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojavatar/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojbutton/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojchart/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojcheckboxset/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojcollapsible/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojcollectiondataprovider/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojcolor/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojcolorpalette/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojcolorspectrum/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojcomponentcore/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojcomposite/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojconfig/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojcontext/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojconveyorbelt/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojdatagrid/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojdataprovider/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojdatetimepicker/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojdefer/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojdeferreddataprovider/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojdiagram/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojdialog/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojdvt-base/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojeditablevalue/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojexpressionutils/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojfilepicker/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojfilmstrip/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojformlayout/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojgantt/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojganttutils/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojgauge/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojinputnumber/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojinputtext/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojkeyset/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojknockout-keyset/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojknockout-model/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojknockouttemplateutils/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojlabel/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojlabelvalue/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojlegend/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojlistdataproviderview/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojlistview/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojlocaledata/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojlogger/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojmasonrylayout/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojmenu/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojmenuselectmany/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojmessage/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojmessages/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojmessaging/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojmodel/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojmodule-element-utils/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojmodule-element/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojmoduleanimations/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojnavigationlist/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojnbox/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojoptgroup/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojoption/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojpictochart/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojpopup/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojprogress/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojprogresslist/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojpulltorefresh/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojradioset/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojrefresher/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojresponsiveknockoututils/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojresponsiveutils/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojrouter/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojselectcombobox/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojslider/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojsunburst/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojswipeactions/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojswipetoreveal/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojswitch/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojswitcher/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojtable/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojtagcloud/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojthematicmap/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojthemeutils/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojtime-base/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojtimeaxis/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojtimeutils/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojtoolbar/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojtrain/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojtranslation/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojtreedataprovider/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojtreemap/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojvalidation-base/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojvalidation-datetime/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojvalidation-number/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojvalidationgroup/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/oraclejet-tests.ts (100%) rename types/{oraclejet => oracle__oraclejet}/tsconfig.json (100%) rename types/{oraclejet => oracle__oraclejet}/tslint.json (100%) diff --git a/types/oraclejet/index.d.ts b/types/oracle__oraclejet/index.d.ts similarity index 100% rename from types/oraclejet/index.d.ts rename to types/oracle__oraclejet/index.d.ts diff --git a/types/oraclejet/ojaccordion/index.d.ts b/types/oracle__oraclejet/ojaccordion/index.d.ts similarity index 100% rename from types/oraclejet/ojaccordion/index.d.ts rename to types/oracle__oraclejet/ojaccordion/index.d.ts diff --git a/types/oraclejet/ojanimation/index.d.ts b/types/oracle__oraclejet/ojanimation/index.d.ts similarity index 100% rename from types/oraclejet/ojanimation/index.d.ts rename to types/oracle__oraclejet/ojanimation/index.d.ts diff --git a/types/oraclejet/ojarraydataprovider/index.d.ts b/types/oracle__oraclejet/ojarraydataprovider/index.d.ts similarity index 100% rename from types/oraclejet/ojarraydataprovider/index.d.ts rename to types/oracle__oraclejet/ojarraydataprovider/index.d.ts diff --git a/types/oraclejet/ojarraytreedataprovider/index.d.ts b/types/oracle__oraclejet/ojarraytreedataprovider/index.d.ts similarity index 100% rename from types/oraclejet/ojarraytreedataprovider/index.d.ts rename to types/oracle__oraclejet/ojarraytreedataprovider/index.d.ts diff --git a/types/oraclejet/ojattributegrouphandler/index.d.ts b/types/oracle__oraclejet/ojattributegrouphandler/index.d.ts similarity index 100% rename from types/oraclejet/ojattributegrouphandler/index.d.ts rename to types/oracle__oraclejet/ojattributegrouphandler/index.d.ts diff --git a/types/oraclejet/ojavatar/index.d.ts b/types/oracle__oraclejet/ojavatar/index.d.ts similarity index 100% rename from types/oraclejet/ojavatar/index.d.ts rename to types/oracle__oraclejet/ojavatar/index.d.ts diff --git a/types/oraclejet/ojbutton/index.d.ts b/types/oracle__oraclejet/ojbutton/index.d.ts similarity index 100% rename from types/oraclejet/ojbutton/index.d.ts rename to types/oracle__oraclejet/ojbutton/index.d.ts diff --git a/types/oraclejet/ojchart/index.d.ts b/types/oracle__oraclejet/ojchart/index.d.ts similarity index 100% rename from types/oraclejet/ojchart/index.d.ts rename to types/oracle__oraclejet/ojchart/index.d.ts diff --git a/types/oraclejet/ojcheckboxset/index.d.ts b/types/oracle__oraclejet/ojcheckboxset/index.d.ts similarity index 100% rename from types/oraclejet/ojcheckboxset/index.d.ts rename to types/oracle__oraclejet/ojcheckboxset/index.d.ts diff --git a/types/oraclejet/ojcollapsible/index.d.ts b/types/oracle__oraclejet/ojcollapsible/index.d.ts similarity index 100% rename from types/oraclejet/ojcollapsible/index.d.ts rename to types/oracle__oraclejet/ojcollapsible/index.d.ts diff --git a/types/oraclejet/ojcollectiondataprovider/index.d.ts b/types/oracle__oraclejet/ojcollectiondataprovider/index.d.ts similarity index 100% rename from types/oraclejet/ojcollectiondataprovider/index.d.ts rename to types/oracle__oraclejet/ojcollectiondataprovider/index.d.ts diff --git a/types/oraclejet/ojcolor/index.d.ts b/types/oracle__oraclejet/ojcolor/index.d.ts similarity index 100% rename from types/oraclejet/ojcolor/index.d.ts rename to types/oracle__oraclejet/ojcolor/index.d.ts diff --git a/types/oraclejet/ojcolorpalette/index.d.ts b/types/oracle__oraclejet/ojcolorpalette/index.d.ts similarity index 100% rename from types/oraclejet/ojcolorpalette/index.d.ts rename to types/oracle__oraclejet/ojcolorpalette/index.d.ts diff --git a/types/oraclejet/ojcolorspectrum/index.d.ts b/types/oracle__oraclejet/ojcolorspectrum/index.d.ts similarity index 100% rename from types/oraclejet/ojcolorspectrum/index.d.ts rename to types/oracle__oraclejet/ojcolorspectrum/index.d.ts diff --git a/types/oraclejet/ojcomponentcore/index.d.ts b/types/oracle__oraclejet/ojcomponentcore/index.d.ts similarity index 100% rename from types/oraclejet/ojcomponentcore/index.d.ts rename to types/oracle__oraclejet/ojcomponentcore/index.d.ts diff --git a/types/oraclejet/ojcomposite/index.d.ts b/types/oracle__oraclejet/ojcomposite/index.d.ts similarity index 100% rename from types/oraclejet/ojcomposite/index.d.ts rename to types/oracle__oraclejet/ojcomposite/index.d.ts diff --git a/types/oraclejet/ojconfig/index.d.ts b/types/oracle__oraclejet/ojconfig/index.d.ts similarity index 100% rename from types/oraclejet/ojconfig/index.d.ts rename to types/oracle__oraclejet/ojconfig/index.d.ts diff --git a/types/oraclejet/ojcontext/index.d.ts b/types/oracle__oraclejet/ojcontext/index.d.ts similarity index 100% rename from types/oraclejet/ojcontext/index.d.ts rename to types/oracle__oraclejet/ojcontext/index.d.ts diff --git a/types/oraclejet/ojconveyorbelt/index.d.ts b/types/oracle__oraclejet/ojconveyorbelt/index.d.ts similarity index 100% rename from types/oraclejet/ojconveyorbelt/index.d.ts rename to types/oracle__oraclejet/ojconveyorbelt/index.d.ts diff --git a/types/oraclejet/ojdatagrid/index.d.ts b/types/oracle__oraclejet/ojdatagrid/index.d.ts similarity index 100% rename from types/oraclejet/ojdatagrid/index.d.ts rename to types/oracle__oraclejet/ojdatagrid/index.d.ts diff --git a/types/oraclejet/ojdataprovider/index.d.ts b/types/oracle__oraclejet/ojdataprovider/index.d.ts similarity index 100% rename from types/oraclejet/ojdataprovider/index.d.ts rename to types/oracle__oraclejet/ojdataprovider/index.d.ts diff --git a/types/oraclejet/ojdatetimepicker/index.d.ts b/types/oracle__oraclejet/ojdatetimepicker/index.d.ts similarity index 100% rename from types/oraclejet/ojdatetimepicker/index.d.ts rename to types/oracle__oraclejet/ojdatetimepicker/index.d.ts diff --git a/types/oraclejet/ojdefer/index.d.ts b/types/oracle__oraclejet/ojdefer/index.d.ts similarity index 100% rename from types/oraclejet/ojdefer/index.d.ts rename to types/oracle__oraclejet/ojdefer/index.d.ts diff --git a/types/oraclejet/ojdeferreddataprovider/index.d.ts b/types/oracle__oraclejet/ojdeferreddataprovider/index.d.ts similarity index 100% rename from types/oraclejet/ojdeferreddataprovider/index.d.ts rename to types/oracle__oraclejet/ojdeferreddataprovider/index.d.ts diff --git a/types/oraclejet/ojdiagram/index.d.ts b/types/oracle__oraclejet/ojdiagram/index.d.ts similarity index 100% rename from types/oraclejet/ojdiagram/index.d.ts rename to types/oracle__oraclejet/ojdiagram/index.d.ts diff --git a/types/oraclejet/ojdialog/index.d.ts b/types/oracle__oraclejet/ojdialog/index.d.ts similarity index 100% rename from types/oraclejet/ojdialog/index.d.ts rename to types/oracle__oraclejet/ojdialog/index.d.ts diff --git a/types/oraclejet/ojdvt-base/index.d.ts b/types/oracle__oraclejet/ojdvt-base/index.d.ts similarity index 100% rename from types/oraclejet/ojdvt-base/index.d.ts rename to types/oracle__oraclejet/ojdvt-base/index.d.ts diff --git a/types/oraclejet/ojeditablevalue/index.d.ts b/types/oracle__oraclejet/ojeditablevalue/index.d.ts similarity index 100% rename from types/oraclejet/ojeditablevalue/index.d.ts rename to types/oracle__oraclejet/ojeditablevalue/index.d.ts diff --git a/types/oraclejet/ojexpressionutils/index.d.ts b/types/oracle__oraclejet/ojexpressionutils/index.d.ts similarity index 100% rename from types/oraclejet/ojexpressionutils/index.d.ts rename to types/oracle__oraclejet/ojexpressionutils/index.d.ts diff --git a/types/oraclejet/ojfilepicker/index.d.ts b/types/oracle__oraclejet/ojfilepicker/index.d.ts similarity index 100% rename from types/oraclejet/ojfilepicker/index.d.ts rename to types/oracle__oraclejet/ojfilepicker/index.d.ts diff --git a/types/oraclejet/ojfilmstrip/index.d.ts b/types/oracle__oraclejet/ojfilmstrip/index.d.ts similarity index 100% rename from types/oraclejet/ojfilmstrip/index.d.ts rename to types/oracle__oraclejet/ojfilmstrip/index.d.ts diff --git a/types/oraclejet/ojformlayout/index.d.ts b/types/oracle__oraclejet/ojformlayout/index.d.ts similarity index 100% rename from types/oraclejet/ojformlayout/index.d.ts rename to types/oracle__oraclejet/ojformlayout/index.d.ts diff --git a/types/oraclejet/ojgantt/index.d.ts b/types/oracle__oraclejet/ojgantt/index.d.ts similarity index 100% rename from types/oraclejet/ojgantt/index.d.ts rename to types/oracle__oraclejet/ojgantt/index.d.ts diff --git a/types/oraclejet/ojganttutils/index.d.ts b/types/oracle__oraclejet/ojganttutils/index.d.ts similarity index 100% rename from types/oraclejet/ojganttutils/index.d.ts rename to types/oracle__oraclejet/ojganttutils/index.d.ts diff --git a/types/oraclejet/ojgauge/index.d.ts b/types/oracle__oraclejet/ojgauge/index.d.ts similarity index 100% rename from types/oraclejet/ojgauge/index.d.ts rename to types/oracle__oraclejet/ojgauge/index.d.ts diff --git a/types/oraclejet/ojinputnumber/index.d.ts b/types/oracle__oraclejet/ojinputnumber/index.d.ts similarity index 100% rename from types/oraclejet/ojinputnumber/index.d.ts rename to types/oracle__oraclejet/ojinputnumber/index.d.ts diff --git a/types/oraclejet/ojinputtext/index.d.ts b/types/oracle__oraclejet/ojinputtext/index.d.ts similarity index 100% rename from types/oraclejet/ojinputtext/index.d.ts rename to types/oracle__oraclejet/ojinputtext/index.d.ts diff --git a/types/oraclejet/ojkeyset/index.d.ts b/types/oracle__oraclejet/ojkeyset/index.d.ts similarity index 100% rename from types/oraclejet/ojkeyset/index.d.ts rename to types/oracle__oraclejet/ojkeyset/index.d.ts diff --git a/types/oraclejet/ojknockout-keyset/index.d.ts b/types/oracle__oraclejet/ojknockout-keyset/index.d.ts similarity index 100% rename from types/oraclejet/ojknockout-keyset/index.d.ts rename to types/oracle__oraclejet/ojknockout-keyset/index.d.ts diff --git a/types/oraclejet/ojknockout-model/index.d.ts b/types/oracle__oraclejet/ojknockout-model/index.d.ts similarity index 100% rename from types/oraclejet/ojknockout-model/index.d.ts rename to types/oracle__oraclejet/ojknockout-model/index.d.ts diff --git a/types/oraclejet/ojknockouttemplateutils/index.d.ts b/types/oracle__oraclejet/ojknockouttemplateutils/index.d.ts similarity index 100% rename from types/oraclejet/ojknockouttemplateutils/index.d.ts rename to types/oracle__oraclejet/ojknockouttemplateutils/index.d.ts diff --git a/types/oraclejet/ojlabel/index.d.ts b/types/oracle__oraclejet/ojlabel/index.d.ts similarity index 100% rename from types/oraclejet/ojlabel/index.d.ts rename to types/oracle__oraclejet/ojlabel/index.d.ts diff --git a/types/oraclejet/ojlabelvalue/index.d.ts b/types/oracle__oraclejet/ojlabelvalue/index.d.ts similarity index 100% rename from types/oraclejet/ojlabelvalue/index.d.ts rename to types/oracle__oraclejet/ojlabelvalue/index.d.ts diff --git a/types/oraclejet/ojlegend/index.d.ts b/types/oracle__oraclejet/ojlegend/index.d.ts similarity index 100% rename from types/oraclejet/ojlegend/index.d.ts rename to types/oracle__oraclejet/ojlegend/index.d.ts diff --git a/types/oraclejet/ojlistdataproviderview/index.d.ts b/types/oracle__oraclejet/ojlistdataproviderview/index.d.ts similarity index 100% rename from types/oraclejet/ojlistdataproviderview/index.d.ts rename to types/oracle__oraclejet/ojlistdataproviderview/index.d.ts diff --git a/types/oraclejet/ojlistview/index.d.ts b/types/oracle__oraclejet/ojlistview/index.d.ts similarity index 100% rename from types/oraclejet/ojlistview/index.d.ts rename to types/oracle__oraclejet/ojlistview/index.d.ts diff --git a/types/oraclejet/ojlocaledata/index.d.ts b/types/oracle__oraclejet/ojlocaledata/index.d.ts similarity index 100% rename from types/oraclejet/ojlocaledata/index.d.ts rename to types/oracle__oraclejet/ojlocaledata/index.d.ts diff --git a/types/oraclejet/ojlogger/index.d.ts b/types/oracle__oraclejet/ojlogger/index.d.ts similarity index 100% rename from types/oraclejet/ojlogger/index.d.ts rename to types/oracle__oraclejet/ojlogger/index.d.ts diff --git a/types/oraclejet/ojmasonrylayout/index.d.ts b/types/oracle__oraclejet/ojmasonrylayout/index.d.ts similarity index 100% rename from types/oraclejet/ojmasonrylayout/index.d.ts rename to types/oracle__oraclejet/ojmasonrylayout/index.d.ts diff --git a/types/oraclejet/ojmenu/index.d.ts b/types/oracle__oraclejet/ojmenu/index.d.ts similarity index 100% rename from types/oraclejet/ojmenu/index.d.ts rename to types/oracle__oraclejet/ojmenu/index.d.ts diff --git a/types/oraclejet/ojmenuselectmany/index.d.ts b/types/oracle__oraclejet/ojmenuselectmany/index.d.ts similarity index 100% rename from types/oraclejet/ojmenuselectmany/index.d.ts rename to types/oracle__oraclejet/ojmenuselectmany/index.d.ts diff --git a/types/oraclejet/ojmessage/index.d.ts b/types/oracle__oraclejet/ojmessage/index.d.ts similarity index 100% rename from types/oraclejet/ojmessage/index.d.ts rename to types/oracle__oraclejet/ojmessage/index.d.ts diff --git a/types/oraclejet/ojmessages/index.d.ts b/types/oracle__oraclejet/ojmessages/index.d.ts similarity index 100% rename from types/oraclejet/ojmessages/index.d.ts rename to types/oracle__oraclejet/ojmessages/index.d.ts diff --git a/types/oraclejet/ojmessaging/index.d.ts b/types/oracle__oraclejet/ojmessaging/index.d.ts similarity index 100% rename from types/oraclejet/ojmessaging/index.d.ts rename to types/oracle__oraclejet/ojmessaging/index.d.ts diff --git a/types/oraclejet/ojmodel/index.d.ts b/types/oracle__oraclejet/ojmodel/index.d.ts similarity index 100% rename from types/oraclejet/ojmodel/index.d.ts rename to types/oracle__oraclejet/ojmodel/index.d.ts diff --git a/types/oraclejet/ojmodule-element-utils/index.d.ts b/types/oracle__oraclejet/ojmodule-element-utils/index.d.ts similarity index 100% rename from types/oraclejet/ojmodule-element-utils/index.d.ts rename to types/oracle__oraclejet/ojmodule-element-utils/index.d.ts diff --git a/types/oraclejet/ojmodule-element/index.d.ts b/types/oracle__oraclejet/ojmodule-element/index.d.ts similarity index 100% rename from types/oraclejet/ojmodule-element/index.d.ts rename to types/oracle__oraclejet/ojmodule-element/index.d.ts diff --git a/types/oraclejet/ojmoduleanimations/index.d.ts b/types/oracle__oraclejet/ojmoduleanimations/index.d.ts similarity index 100% rename from types/oraclejet/ojmoduleanimations/index.d.ts rename to types/oracle__oraclejet/ojmoduleanimations/index.d.ts diff --git a/types/oraclejet/ojnavigationlist/index.d.ts b/types/oracle__oraclejet/ojnavigationlist/index.d.ts similarity index 100% rename from types/oraclejet/ojnavigationlist/index.d.ts rename to types/oracle__oraclejet/ojnavigationlist/index.d.ts diff --git a/types/oraclejet/ojnbox/index.d.ts b/types/oracle__oraclejet/ojnbox/index.d.ts similarity index 100% rename from types/oraclejet/ojnbox/index.d.ts rename to types/oracle__oraclejet/ojnbox/index.d.ts diff --git a/types/oraclejet/ojoptgroup/index.d.ts b/types/oracle__oraclejet/ojoptgroup/index.d.ts similarity index 100% rename from types/oraclejet/ojoptgroup/index.d.ts rename to types/oracle__oraclejet/ojoptgroup/index.d.ts diff --git a/types/oraclejet/ojoption/index.d.ts b/types/oracle__oraclejet/ojoption/index.d.ts similarity index 100% rename from types/oraclejet/ojoption/index.d.ts rename to types/oracle__oraclejet/ojoption/index.d.ts diff --git a/types/oraclejet/ojpictochart/index.d.ts b/types/oracle__oraclejet/ojpictochart/index.d.ts similarity index 100% rename from types/oraclejet/ojpictochart/index.d.ts rename to types/oracle__oraclejet/ojpictochart/index.d.ts diff --git a/types/oraclejet/ojpopup/index.d.ts b/types/oracle__oraclejet/ojpopup/index.d.ts similarity index 100% rename from types/oraclejet/ojpopup/index.d.ts rename to types/oracle__oraclejet/ojpopup/index.d.ts diff --git a/types/oraclejet/ojprogress/index.d.ts b/types/oracle__oraclejet/ojprogress/index.d.ts similarity index 100% rename from types/oraclejet/ojprogress/index.d.ts rename to types/oracle__oraclejet/ojprogress/index.d.ts diff --git a/types/oraclejet/ojprogresslist/index.d.ts b/types/oracle__oraclejet/ojprogresslist/index.d.ts similarity index 100% rename from types/oraclejet/ojprogresslist/index.d.ts rename to types/oracle__oraclejet/ojprogresslist/index.d.ts diff --git a/types/oraclejet/ojpulltorefresh/index.d.ts b/types/oracle__oraclejet/ojpulltorefresh/index.d.ts similarity index 100% rename from types/oraclejet/ojpulltorefresh/index.d.ts rename to types/oracle__oraclejet/ojpulltorefresh/index.d.ts diff --git a/types/oraclejet/ojradioset/index.d.ts b/types/oracle__oraclejet/ojradioset/index.d.ts similarity index 100% rename from types/oraclejet/ojradioset/index.d.ts rename to types/oracle__oraclejet/ojradioset/index.d.ts diff --git a/types/oraclejet/ojrefresher/index.d.ts b/types/oracle__oraclejet/ojrefresher/index.d.ts similarity index 100% rename from types/oraclejet/ojrefresher/index.d.ts rename to types/oracle__oraclejet/ojrefresher/index.d.ts diff --git a/types/oraclejet/ojresponsiveknockoututils/index.d.ts b/types/oracle__oraclejet/ojresponsiveknockoututils/index.d.ts similarity index 100% rename from types/oraclejet/ojresponsiveknockoututils/index.d.ts rename to types/oracle__oraclejet/ojresponsiveknockoututils/index.d.ts diff --git a/types/oraclejet/ojresponsiveutils/index.d.ts b/types/oracle__oraclejet/ojresponsiveutils/index.d.ts similarity index 100% rename from types/oraclejet/ojresponsiveutils/index.d.ts rename to types/oracle__oraclejet/ojresponsiveutils/index.d.ts diff --git a/types/oraclejet/ojrouter/index.d.ts b/types/oracle__oraclejet/ojrouter/index.d.ts similarity index 100% rename from types/oraclejet/ojrouter/index.d.ts rename to types/oracle__oraclejet/ojrouter/index.d.ts diff --git a/types/oraclejet/ojselectcombobox/index.d.ts b/types/oracle__oraclejet/ojselectcombobox/index.d.ts similarity index 100% rename from types/oraclejet/ojselectcombobox/index.d.ts rename to types/oracle__oraclejet/ojselectcombobox/index.d.ts diff --git a/types/oraclejet/ojslider/index.d.ts b/types/oracle__oraclejet/ojslider/index.d.ts similarity index 100% rename from types/oraclejet/ojslider/index.d.ts rename to types/oracle__oraclejet/ojslider/index.d.ts diff --git a/types/oraclejet/ojsunburst/index.d.ts b/types/oracle__oraclejet/ojsunburst/index.d.ts similarity index 100% rename from types/oraclejet/ojsunburst/index.d.ts rename to types/oracle__oraclejet/ojsunburst/index.d.ts diff --git a/types/oraclejet/ojswipeactions/index.d.ts b/types/oracle__oraclejet/ojswipeactions/index.d.ts similarity index 100% rename from types/oraclejet/ojswipeactions/index.d.ts rename to types/oracle__oraclejet/ojswipeactions/index.d.ts diff --git a/types/oraclejet/ojswipetoreveal/index.d.ts b/types/oracle__oraclejet/ojswipetoreveal/index.d.ts similarity index 100% rename from types/oraclejet/ojswipetoreveal/index.d.ts rename to types/oracle__oraclejet/ojswipetoreveal/index.d.ts diff --git a/types/oraclejet/ojswitch/index.d.ts b/types/oracle__oraclejet/ojswitch/index.d.ts similarity index 100% rename from types/oraclejet/ojswitch/index.d.ts rename to types/oracle__oraclejet/ojswitch/index.d.ts diff --git a/types/oraclejet/ojswitcher/index.d.ts b/types/oracle__oraclejet/ojswitcher/index.d.ts similarity index 100% rename from types/oraclejet/ojswitcher/index.d.ts rename to types/oracle__oraclejet/ojswitcher/index.d.ts diff --git a/types/oraclejet/ojtable/index.d.ts b/types/oracle__oraclejet/ojtable/index.d.ts similarity index 100% rename from types/oraclejet/ojtable/index.d.ts rename to types/oracle__oraclejet/ojtable/index.d.ts diff --git a/types/oraclejet/ojtagcloud/index.d.ts b/types/oracle__oraclejet/ojtagcloud/index.d.ts similarity index 100% rename from types/oraclejet/ojtagcloud/index.d.ts rename to types/oracle__oraclejet/ojtagcloud/index.d.ts diff --git a/types/oraclejet/ojthematicmap/index.d.ts b/types/oracle__oraclejet/ojthematicmap/index.d.ts similarity index 100% rename from types/oraclejet/ojthematicmap/index.d.ts rename to types/oracle__oraclejet/ojthematicmap/index.d.ts diff --git a/types/oraclejet/ojthemeutils/index.d.ts b/types/oracle__oraclejet/ojthemeutils/index.d.ts similarity index 100% rename from types/oraclejet/ojthemeutils/index.d.ts rename to types/oracle__oraclejet/ojthemeutils/index.d.ts diff --git a/types/oraclejet/ojtime-base/index.d.ts b/types/oracle__oraclejet/ojtime-base/index.d.ts similarity index 100% rename from types/oraclejet/ojtime-base/index.d.ts rename to types/oracle__oraclejet/ojtime-base/index.d.ts diff --git a/types/oraclejet/ojtimeaxis/index.d.ts b/types/oracle__oraclejet/ojtimeaxis/index.d.ts similarity index 100% rename from types/oraclejet/ojtimeaxis/index.d.ts rename to types/oracle__oraclejet/ojtimeaxis/index.d.ts diff --git a/types/oraclejet/ojtimeutils/index.d.ts b/types/oracle__oraclejet/ojtimeutils/index.d.ts similarity index 100% rename from types/oraclejet/ojtimeutils/index.d.ts rename to types/oracle__oraclejet/ojtimeutils/index.d.ts diff --git a/types/oraclejet/ojtoolbar/index.d.ts b/types/oracle__oraclejet/ojtoolbar/index.d.ts similarity index 100% rename from types/oraclejet/ojtoolbar/index.d.ts rename to types/oracle__oraclejet/ojtoolbar/index.d.ts diff --git a/types/oraclejet/ojtrain/index.d.ts b/types/oracle__oraclejet/ojtrain/index.d.ts similarity index 100% rename from types/oraclejet/ojtrain/index.d.ts rename to types/oracle__oraclejet/ojtrain/index.d.ts diff --git a/types/oraclejet/ojtranslation/index.d.ts b/types/oracle__oraclejet/ojtranslation/index.d.ts similarity index 100% rename from types/oraclejet/ojtranslation/index.d.ts rename to types/oracle__oraclejet/ojtranslation/index.d.ts diff --git a/types/oraclejet/ojtreedataprovider/index.d.ts b/types/oracle__oraclejet/ojtreedataprovider/index.d.ts similarity index 100% rename from types/oraclejet/ojtreedataprovider/index.d.ts rename to types/oracle__oraclejet/ojtreedataprovider/index.d.ts diff --git a/types/oraclejet/ojtreemap/index.d.ts b/types/oracle__oraclejet/ojtreemap/index.d.ts similarity index 100% rename from types/oraclejet/ojtreemap/index.d.ts rename to types/oracle__oraclejet/ojtreemap/index.d.ts diff --git a/types/oraclejet/ojvalidation-base/index.d.ts b/types/oracle__oraclejet/ojvalidation-base/index.d.ts similarity index 100% rename from types/oraclejet/ojvalidation-base/index.d.ts rename to types/oracle__oraclejet/ojvalidation-base/index.d.ts diff --git a/types/oraclejet/ojvalidation-datetime/index.d.ts b/types/oracle__oraclejet/ojvalidation-datetime/index.d.ts similarity index 100% rename from types/oraclejet/ojvalidation-datetime/index.d.ts rename to types/oracle__oraclejet/ojvalidation-datetime/index.d.ts diff --git a/types/oraclejet/ojvalidation-number/index.d.ts b/types/oracle__oraclejet/ojvalidation-number/index.d.ts similarity index 100% rename from types/oraclejet/ojvalidation-number/index.d.ts rename to types/oracle__oraclejet/ojvalidation-number/index.d.ts diff --git a/types/oraclejet/ojvalidationgroup/index.d.ts b/types/oracle__oraclejet/ojvalidationgroup/index.d.ts similarity index 100% rename from types/oraclejet/ojvalidationgroup/index.d.ts rename to types/oracle__oraclejet/ojvalidationgroup/index.d.ts diff --git a/types/oraclejet/oraclejet-tests.ts b/types/oracle__oraclejet/oraclejet-tests.ts similarity index 100% rename from types/oraclejet/oraclejet-tests.ts rename to types/oracle__oraclejet/oraclejet-tests.ts diff --git a/types/oraclejet/tsconfig.json b/types/oracle__oraclejet/tsconfig.json similarity index 100% rename from types/oraclejet/tsconfig.json rename to types/oracle__oraclejet/tsconfig.json diff --git a/types/oraclejet/tslint.json b/types/oracle__oraclejet/tslint.json similarity index 100% rename from types/oraclejet/tslint.json rename to types/oracle__oraclejet/tslint.json From 5d325b1ff2d45d055ff27daaffd7d1d7b0d8faf2 Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Mon, 1 Oct 2018 20:59:36 -0700 Subject: [PATCH 008/160] move to scoped --- .../{oraclejet-tests.ts => oracle__oraclejet-tests.ts} | 0 types/oracle__oraclejet/tsconfig.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename types/oracle__oraclejet/{oraclejet-tests.ts => oracle__oraclejet-tests.ts} (100%) diff --git a/types/oracle__oraclejet/oraclejet-tests.ts b/types/oracle__oraclejet/oracle__oraclejet-tests.ts similarity index 100% rename from types/oracle__oraclejet/oraclejet-tests.ts rename to types/oracle__oraclejet/oracle__oraclejet-tests.ts diff --git a/types/oracle__oraclejet/tsconfig.json b/types/oracle__oraclejet/tsconfig.json index e914883a1c..bcad93a766 100644 --- a/types/oracle__oraclejet/tsconfig.json +++ b/types/oracle__oraclejet/tsconfig.json @@ -17,7 +17,7 @@ ] }, "files": [ - "oraclejet-tests.ts", + "oracle__oraclejet-tests.ts", "index.d.ts", "ojaccordion/index.d.ts", "ojanimation/index.d.ts", From 3e270542b9fac5dad56382f7f2d1ab02ae718ad9 Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Mon, 1 Oct 2018 21:12:40 -0700 Subject: [PATCH 009/160] move to scoped location --- .../oracle__oraclejet-tests.ts | 190 +++++++++--------- types/oracle__oraclejet/tsconfig.json | 7 +- 2 files changed, 101 insertions(+), 96 deletions(-) diff --git a/types/oracle__oraclejet/oracle__oraclejet-tests.ts b/types/oracle__oraclejet/oracle__oraclejet-tests.ts index 265c0d4856..e71977ee39 100644 --- a/types/oracle__oraclejet/oracle__oraclejet-tests.ts +++ b/types/oracle__oraclejet/oracle__oraclejet-tests.ts @@ -1,101 +1,101 @@ // Since all the definitions are auto generated from jsdoc doclets and internally tested through application, // add some basic tests here. -import { ojAccordion } from "oraclejet/ojaccordion"; -import AnimationUtils = require("oraclejet/ojanimation"); -import ArrayDataProvider = require("oraclejet/ojarraydataprovider"); -import ArrayTreeDataProvider = require("oraclejet/ojarraytreedataprovider"); -import { AttributeGroupHandler, ColorAttributeGroupHandler, ShapeAttributeGroupHandler } from 'oraclejet/ojattributegrouphandler'; -import { ojAvatar } from "oraclejet/ojavatar"; -import { ojButton, ojButtonsetMany, ojButtonsetOne } from "oraclejet/ojbutton"; -import { ojChart, ojChartGroup, ojChartItem, ojChartSeries, ojSparkChart, ojSparkChartItem } from "oraclejet/ojchart"; -import { ojCheckboxset } from "oraclejet/ojcheckboxset"; -import { ojCollapsible } from "oraclejet/ojcollapsible"; -import CollectionDataprovider = require("oraclejet/ojcollectiondataprovider"); -import Color = require("oraclejet/ojcolor"); -import { ojColorPalette } from "oraclejet/ojcolorpalette"; -import { ojColorSpectrum } from "oraclejet/ojcolorspectrum"; -import Components = require("oraclejet/ojcomponentcore"); -import Composite = require("oraclejet/ojcomposite"); -import Config = require('oraclejet/ojconfig'); -import Context = require("oraclejet/ojcontext"); -import { ojConveyorBelt } from "oraclejet/ojconveyorbelt"; -import { ojDataGrid } from "oraclejet/ojdatagrid"; -import { DataMapping, DataProvider, DataProviderAddOperationEventDetail, DataProviderMutationEventDetail, DataProviderOperationEventDetail } from "oraclejet/ojdataprovider"; -import { ojDatePicker, ojDateTimePicker, ojInputDate, ojInputDateTime, ojInputTime } from "oraclejet/ojdatetimepicker"; -import { ojDefer } from "oraclejet/ojdefer"; -import DeferredDataprovider = require("oraclejet/ojdeferreddataprovider"); -import { ojDiagram, ojDiagramLink, ojDiagramNode } from "oraclejet/ojdiagram"; -import { ojDialog } from "oraclejet/ojdialog"; -import { dvtBaseComponent } from "oraclejet/ojdvt-base"; -import { editableValue } from "oraclejet/ojeditablevalue"; -import ExpressionUtils = require('oraclejet/ojexpressionutils'); -import { ojFilePicker, FileUploadTransport } from "oraclejet/ojfilepicker"; -import { ojFilmStrip } from "oraclejet/ojfilmstrip"; -import { ojFormLayout } from "oraclejet/ojformlayout"; -import { ojGantt, ojGanttRow, ojGanttTask, ojGanttDependency } from "oraclejet/ojgantt"; -import GanttUtils = require ('oraclejet/ojganttutils'); -import { ojLedGauge, ojRatingGauge, ojStatusMeterGauge } from "oraclejet/ojgauge"; -import { ojInputNumber } from "oraclejet/ojinputnumber"; -import { ojInputPassword, ojInputText, ojTextArea } from "oraclejet/ojinputtext"; -import { KeySet, ExpandAllKeySet, ExpandedKeySet } from "oraclejet/ojkeyset"; -import { ObservableExpandedKeySet } from "oraclejet/ojknockout-keyset"; -import KnockoutUtils = require("oraclejet/ojknockout-model"); -import KnockoutTemplateUtils = require('oraclejet/ojknockouttemplateutils'); -import { ojLabel } from "oraclejet/ojlabel"; -import { ojLabelValue } from "oraclejet/ojlabelvalue"; -import { ojLegend } from "oraclejet/ojlegend"; -import ListDataProviderView = require("oraclejet/ojlistdataproviderview"); -import { ojListView } from "oraclejet/ojlistview"; -import LocaleData = require('oraclejet/ojlocaledata'); -import Logger = require('oraclejet/ojlogger'); -import { ojMasonryLayout } from "oraclejet/ojmasonrylayout"; -import { ojMenu } from "oraclejet/ojmenu"; -import { ojMenuSelectMany } from "oraclejet/ojmenuselectmany"; -import { ojMessages } from "oraclejet/ojmessages"; -import { ojMessage } from "oraclejet/ojmessage"; -import Message = require("oraclejet/ojmessaging"); -import { Collection, Model, URLError, OAuth } from "oraclejet/ojmodel"; -import { ojModule } from "oraclejet/ojmodule-element"; -import ModuleElementUtils = require("oraclejet/ojmodule-element-utils"); -import ModuleAnimations = require("oraclejet/ojmoduleanimations") ; -import { ojNavigationList, ojTabBar } from "oraclejet/ojnavigationlist"; -import { ojNBox } from "oraclejet/ojnbox"; -import { ojOptgroup } from "oraclejet/ojoptgroup"; -import { ojOption } from "oraclejet/ojoption"; -import { ojPictoChart, ojPictoChartItem } from "oraclejet/ojpictochart"; -import { ojPopup } from "oraclejet/ojpopup"; -import { ojProgress } from "oraclejet/ojprogress"; -import { ojProgressList, ProgressItem } from "oraclejet/ojprogresslist"; -import PullToRefreshUtils = require("oraclejet/ojpulltorefresh"); -import { ojRadioset } from "oraclejet/ojradioset"; -import { ojRefresher } from "oraclejet/ojrefresher"; -import ResponsiveKnockoutUtils = require('oraclejet/ojresponsiveknockoututils'); -import ResponsiveUtils = require('oraclejet/ojresponsiveutils'); -import Router = require("oraclejet/ojrouter"); -import { ojComboboxOne, ojComboboxMany, ojSelectOne, ojSelectMany } from "oraclejet/ojselectcombobox"; -import { ojSlider } from "oraclejet/ojslider"; -import { ojSunburst } from "oraclejet/ojsunburst"; -import { ojSwipeActions } from "oraclejet/ojswipeactions"; -import SwipeToRevealUtils = require("oraclejet/ojswipetoreveal"); -import { ojSwitch } from "oraclejet/ojswitch"; -import { ojSwitcher } from "oraclejet/ojswitcher"; -import { ojTable } from "oraclejet/ojtable"; -import { ojTagCloud } from "oraclejet/ojtagcloud"; -import { ojThematicMap } from "oraclejet/ojthematicmap"; -import ThemeUtils = require('oraclejet/ojthemeutils'); -import { dvtTimeComponent } from "oraclejet/ojtime-base"; -import { ojTimeAxis } from "oraclejet/ojtimeaxis"; -import TimeUtils = require("oraclejet/ojtimeutils"); -import { ojToolbar } from "oraclejet/ojtoolbar"; -import { ojTrain } from "oraclejet/ojtrain"; -import Translations = require("oraclejet/ojtranslation"); -import TreeDataProvider = require("oraclejet/ojtreedataprovider"); -import { ojTreemap } from "oraclejet/ojtreemap"; +import { ojAccordion } from "ojs/ojaccordion"; +import AnimationUtils = require("ojs/ojanimation"); +import ArrayDataProvider = require("ojs/ojarraydataprovider"); +import ArrayTreeDataProvider = require("ojs/ojarraytreedataprovider"); +import { AttributeGroupHandler, ColorAttributeGroupHandler, ShapeAttributeGroupHandler } from 'ojs/ojattributegrouphandler'; +import { ojAvatar } from "ojs/ojavatar"; +import { ojButton, ojButtonsetMany, ojButtonsetOne } from "ojs/ojbutton"; +import { ojChart, ojChartGroup, ojChartItem, ojChartSeries, ojSparkChart, ojSparkChartItem } from "ojs/ojchart"; +import { ojCheckboxset } from "ojs/ojcheckboxset"; +import { ojCollapsible } from "ojs/ojcollapsible"; +import CollectionDataprovider = require("ojs/ojcollectiondataprovider"); +import Color = require("ojs/ojcolor"); +import { ojColorPalette } from "ojs/ojcolorpalette"; +import { ojColorSpectrum } from "ojs/ojcolorspectrum"; +import Components = require("ojs/ojcomponentcore"); +import Composite = require("ojs/ojcomposite"); +import Config = require('ojs/ojconfig'); +import Context = require("ojs/ojcontext"); +import { ojConveyorBelt } from "ojs/ojconveyorbelt"; +import { ojDataGrid } from "ojs/ojdatagrid"; +import { DataMapping, DataProvider, DataProviderAddOperationEventDetail, DataProviderMutationEventDetail, DataProviderOperationEventDetail } from "ojs/ojdataprovider"; +import { ojDatePicker, ojDateTimePicker, ojInputDate, ojInputDateTime, ojInputTime } from "ojs/ojdatetimepicker"; +import { ojDefer } from "ojs/ojdefer"; +import DeferredDataprovider = require("ojs/ojdeferreddataprovider"); +import { ojDiagram, ojDiagramLink, ojDiagramNode } from "ojs/ojdiagram"; +import { ojDialog } from "ojs/ojdialog"; +import { dvtBaseComponent } from "ojs/ojdvt-base"; +import { editableValue } from "ojs/ojeditablevalue"; +import ExpressionUtils = require('ojs/ojexpressionutils'); +import { ojFilePicker, FileUploadTransport } from "ojs/ojfilepicker"; +import { ojFilmStrip } from "ojs/ojfilmstrip"; +import { ojFormLayout } from "ojs/ojformlayout"; +import { ojGantt, ojGanttRow, ojGanttTask, ojGanttDependency } from "ojs/ojgantt"; +import GanttUtils = require ('ojs/ojganttutils'); +import { ojLedGauge, ojRatingGauge, ojStatusMeterGauge } from "ojs/ojgauge"; +import { ojInputNumber } from "ojs/ojinputnumber"; +import { ojInputPassword, ojInputText, ojTextArea } from "ojs/ojinputtext"; +import { KeySet, ExpandAllKeySet, ExpandedKeySet } from "ojs/ojkeyset"; +import { ObservableExpandedKeySet } from "ojs/ojknockout-keyset"; +import KnockoutUtils = require("ojs/ojknockout-model"); +import KnockoutTemplateUtils = require('ojs/ojknockouttemplateutils'); +import { ojLabel } from "ojs/ojlabel"; +import { ojLabelValue } from "ojs/ojlabelvalue"; +import { ojLegend } from "ojs/ojlegend"; +import ListDataProviderView = require("ojs/ojlistdataproviderview"); +import { ojListView } from "ojs/ojlistview"; +import LocaleData = require('ojs/ojlocaledata'); +import Logger = require('ojs/ojlogger'); +import { ojMasonryLayout } from "ojs/ojmasonrylayout"; +import { ojMenu } from "ojs/ojmenu"; +import { ojMenuSelectMany } from "ojs/ojmenuselectmany"; +import { ojMessages } from "ojs/ojmessages"; +import { ojMessage } from "ojs/ojmessage"; +import Message = require("ojs/ojmessaging"); +import { Collection, Model, URLError, OAuth } from "ojs/ojmodel"; +import { ojModule } from "ojs/ojmodule-element"; +import ModuleElementUtils = require("ojs/ojmodule-element-utils"); +import ModuleAnimations = require("ojs/ojmoduleanimations") ; +import { ojNavigationList, ojTabBar } from "ojs/ojnavigationlist"; +import { ojNBox } from "ojs/ojnbox"; +import { ojOptgroup } from "ojs/ojoptgroup"; +import { ojOption } from "ojs/ojoption"; +import { ojPictoChart, ojPictoChartItem } from "ojs/ojpictochart"; +import { ojPopup } from "ojs/ojpopup"; +import { ojProgress } from "ojs/ojprogress"; +import { ojProgressList, ProgressItem } from "ojs/ojprogresslist"; +import PullToRefreshUtils = require("ojs/ojpulltorefresh"); +import { ojRadioset } from "ojs/ojradioset"; +import { ojRefresher } from "ojs/ojrefresher"; +import ResponsiveKnockoutUtils = require('ojs/ojresponsiveknockoututils'); +import ResponsiveUtils = require('ojs/ojresponsiveutils'); +import Router = require("ojs/ojrouter"); +import { ojComboboxOne, ojComboboxMany, ojSelectOne, ojSelectMany } from "ojs/ojselectcombobox"; +import { ojSlider } from "ojs/ojslider"; +import { ojSunburst } from "ojs/ojsunburst"; +import { ojSwipeActions } from "ojs/ojswipeactions"; +import SwipeToRevealUtils = require("ojs/ojswipetoreveal"); +import { ojSwitch } from "ojs/ojswitch"; +import { ojSwitcher } from "ojs/ojswitcher"; +import { ojTable } from "ojs/ojtable"; +import { ojTagCloud } from "ojs/ojtagcloud"; +import { ojThematicMap } from "ojs/ojthematicmap"; +import ThemeUtils = require('ojs/ojthemeutils'); +import { dvtTimeComponent } from "ojs/ojtime-base"; +import { ojTimeAxis } from "ojs/ojtimeaxis"; +import TimeUtils = require("ojs/ojtimeutils"); +import { ojToolbar } from "ojs/ojtoolbar"; +import { ojTrain } from "ojs/ojtrain"; +import Translations = require("ojs/ojtranslation"); +import TreeDataProvider = require("ojs/ojtreedataprovider"); +import { ojTreemap } from "ojs/ojtreemap"; import { Validation, Validator, ValidatorError, ValidatorFactory, - AsyncValidator, LengthValidator, LengthValidatorFactory, RegExpValidator, RegExpValidatorFactory, RequiredValidator, RequiredValidatorFactory } from "oraclejet/ojvalidation-base"; -import { DateRestrictionValidator, DateRestrictionValidatorFactory, DateTimeRangeValidator, DateTimeRangeValidatorFactory } from "oraclejet/ojvalidation-datetime"; -import { NumberRangeValidator, NumberRangeValidatorFactory } from "oraclejet/ojvalidation-number"; -import { ojValidationGroup } from "oraclejet/ojvalidationgroup"; + AsyncValidator, LengthValidator, LengthValidatorFactory, RegExpValidator, RegExpValidatorFactory, RequiredValidator, RequiredValidatorFactory } from "ojs/ojvalidation-base"; +import { DateRestrictionValidator, DateRestrictionValidatorFactory, DateTimeRangeValidator, DateTimeRangeValidatorFactory } from "ojs/ojvalidation-datetime"; +import { NumberRangeValidator, NumberRangeValidatorFactory } from "ojs/ojvalidation-number"; +import { ojValidationGroup } from "ojs/ojvalidationgroup"; const onChangedCallback = (event: CustomEvent) => { }; diff --git a/types/oracle__oraclejet/tsconfig.json b/types/oracle__oraclejet/tsconfig.json index bcad93a766..16185df100 100644 --- a/types/oracle__oraclejet/tsconfig.json +++ b/types/oracle__oraclejet/tsconfig.json @@ -14,7 +14,12 @@ "baseUrl": "../", "typeRoots": [ "../" - ] + ], + "paths": { + "ojs/*": [ + "oracle__oraclejet/*" + ] + } }, "files": [ "oracle__oraclejet-tests.ts", From 38f49e7e670f6fdb3a4ec0768b7816693189adf8 Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Mon, 1 Oct 2018 21:14:50 -0700 Subject: [PATCH 010/160] update for scoped --- types/oracle__oraclejet/tsconfig.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types/oracle__oraclejet/tsconfig.json b/types/oracle__oraclejet/tsconfig.json index 16185df100..6119a97403 100644 --- a/types/oracle__oraclejet/tsconfig.json +++ b/types/oracle__oraclejet/tsconfig.json @@ -16,6 +16,9 @@ "../" ], "paths": { + "ojs": [ + "oracle__oraclejet" + ], "ojs/*": [ "oracle__oraclejet/*" ] From 460a128c6535fa7e48cae4805b16fd8ed6096855 Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Mon, 1 Oct 2018 21:20:16 -0700 Subject: [PATCH 011/160] Update for scoped --- .../oracle__oraclejet-tests.ts | 190 +++++++++--------- types/oracle__oraclejet/tsconfig.json | 4 +- 2 files changed, 97 insertions(+), 97 deletions(-) diff --git a/types/oracle__oraclejet/oracle__oraclejet-tests.ts b/types/oracle__oraclejet/oracle__oraclejet-tests.ts index e71977ee39..41c645e679 100644 --- a/types/oracle__oraclejet/oracle__oraclejet-tests.ts +++ b/types/oracle__oraclejet/oracle__oraclejet-tests.ts @@ -1,101 +1,101 @@ // Since all the definitions are auto generated from jsdoc doclets and internally tested through application, // add some basic tests here. -import { ojAccordion } from "ojs/ojaccordion"; -import AnimationUtils = require("ojs/ojanimation"); -import ArrayDataProvider = require("ojs/ojarraydataprovider"); -import ArrayTreeDataProvider = require("ojs/ojarraytreedataprovider"); -import { AttributeGroupHandler, ColorAttributeGroupHandler, ShapeAttributeGroupHandler } from 'ojs/ojattributegrouphandler'; -import { ojAvatar } from "ojs/ojavatar"; -import { ojButton, ojButtonsetMany, ojButtonsetOne } from "ojs/ojbutton"; -import { ojChart, ojChartGroup, ojChartItem, ojChartSeries, ojSparkChart, ojSparkChartItem } from "ojs/ojchart"; -import { ojCheckboxset } from "ojs/ojcheckboxset"; -import { ojCollapsible } from "ojs/ojcollapsible"; -import CollectionDataprovider = require("ojs/ojcollectiondataprovider"); -import Color = require("ojs/ojcolor"); -import { ojColorPalette } from "ojs/ojcolorpalette"; -import { ojColorSpectrum } from "ojs/ojcolorspectrum"; -import Components = require("ojs/ojcomponentcore"); -import Composite = require("ojs/ojcomposite"); -import Config = require('ojs/ojconfig'); -import Context = require("ojs/ojcontext"); -import { ojConveyorBelt } from "ojs/ojconveyorbelt"; -import { ojDataGrid } from "ojs/ojdatagrid"; -import { DataMapping, DataProvider, DataProviderAddOperationEventDetail, DataProviderMutationEventDetail, DataProviderOperationEventDetail } from "ojs/ojdataprovider"; -import { ojDatePicker, ojDateTimePicker, ojInputDate, ojInputDateTime, ojInputTime } from "ojs/ojdatetimepicker"; -import { ojDefer } from "ojs/ojdefer"; -import DeferredDataprovider = require("ojs/ojdeferreddataprovider"); -import { ojDiagram, ojDiagramLink, ojDiagramNode } from "ojs/ojdiagram"; -import { ojDialog } from "ojs/ojdialog"; -import { dvtBaseComponent } from "ojs/ojdvt-base"; -import { editableValue } from "ojs/ojeditablevalue"; -import ExpressionUtils = require('ojs/ojexpressionutils'); -import { ojFilePicker, FileUploadTransport } from "ojs/ojfilepicker"; -import { ojFilmStrip } from "ojs/ojfilmstrip"; -import { ojFormLayout } from "ojs/ojformlayout"; -import { ojGantt, ojGanttRow, ojGanttTask, ojGanttDependency } from "ojs/ojgantt"; -import GanttUtils = require ('ojs/ojganttutils'); -import { ojLedGauge, ojRatingGauge, ojStatusMeterGauge } from "ojs/ojgauge"; -import { ojInputNumber } from "ojs/ojinputnumber"; -import { ojInputPassword, ojInputText, ojTextArea } from "ojs/ojinputtext"; -import { KeySet, ExpandAllKeySet, ExpandedKeySet } from "ojs/ojkeyset"; -import { ObservableExpandedKeySet } from "ojs/ojknockout-keyset"; -import KnockoutUtils = require("ojs/ojknockout-model"); -import KnockoutTemplateUtils = require('ojs/ojknockouttemplateutils'); -import { ojLabel } from "ojs/ojlabel"; -import { ojLabelValue } from "ojs/ojlabelvalue"; -import { ojLegend } from "ojs/ojlegend"; -import ListDataProviderView = require("ojs/ojlistdataproviderview"); -import { ojListView } from "ojs/ojlistview"; -import LocaleData = require('ojs/ojlocaledata'); -import Logger = require('ojs/ojlogger'); -import { ojMasonryLayout } from "ojs/ojmasonrylayout"; -import { ojMenu } from "ojs/ojmenu"; -import { ojMenuSelectMany } from "ojs/ojmenuselectmany"; -import { ojMessages } from "ojs/ojmessages"; -import { ojMessage } from "ojs/ojmessage"; -import Message = require("ojs/ojmessaging"); -import { Collection, Model, URLError, OAuth } from "ojs/ojmodel"; -import { ojModule } from "ojs/ojmodule-element"; -import ModuleElementUtils = require("ojs/ojmodule-element-utils"); -import ModuleAnimations = require("ojs/ojmoduleanimations") ; -import { ojNavigationList, ojTabBar } from "ojs/ojnavigationlist"; -import { ojNBox } from "ojs/ojnbox"; -import { ojOptgroup } from "ojs/ojoptgroup"; -import { ojOption } from "ojs/ojoption"; -import { ojPictoChart, ojPictoChartItem } from "ojs/ojpictochart"; -import { ojPopup } from "ojs/ojpopup"; -import { ojProgress } from "ojs/ojprogress"; -import { ojProgressList, ProgressItem } from "ojs/ojprogresslist"; -import PullToRefreshUtils = require("ojs/ojpulltorefresh"); -import { ojRadioset } from "ojs/ojradioset"; -import { ojRefresher } from "ojs/ojrefresher"; -import ResponsiveKnockoutUtils = require('ojs/ojresponsiveknockoututils'); -import ResponsiveUtils = require('ojs/ojresponsiveutils'); -import Router = require("ojs/ojrouter"); -import { ojComboboxOne, ojComboboxMany, ojSelectOne, ojSelectMany } from "ojs/ojselectcombobox"; -import { ojSlider } from "ojs/ojslider"; -import { ojSunburst } from "ojs/ojsunburst"; -import { ojSwipeActions } from "ojs/ojswipeactions"; -import SwipeToRevealUtils = require("ojs/ojswipetoreveal"); -import { ojSwitch } from "ojs/ojswitch"; -import { ojSwitcher } from "ojs/ojswitcher"; -import { ojTable } from "ojs/ojtable"; -import { ojTagCloud } from "ojs/ojtagcloud"; -import { ojThematicMap } from "ojs/ojthematicmap"; -import ThemeUtils = require('ojs/ojthemeutils'); -import { dvtTimeComponent } from "ojs/ojtime-base"; -import { ojTimeAxis } from "ojs/ojtimeaxis"; -import TimeUtils = require("ojs/ojtimeutils"); -import { ojToolbar } from "ojs/ojtoolbar"; -import { ojTrain } from "ojs/ojtrain"; -import Translations = require("ojs/ojtranslation"); -import TreeDataProvider = require("ojs/ojtreedataprovider"); -import { ojTreemap } from "ojs/ojtreemap"; +import { ojAccordion } from "@oracle/oraclejet/ojaccordion"; +import AnimationUtils = require("@oracle/oraclejet/ojanimation"); +import ArrayDataProvider = require("@oracle/oraclejet/ojarraydataprovider"); +import ArrayTreeDataProvider = require("@oracle/oraclejet/ojarraytreedataprovider"); +import { AttributeGroupHandler, ColorAttributeGroupHandler, ShapeAttributeGroupHandler } from '@oracle/oraclejet/ojattributegrouphandler'; +import { ojAvatar } from "@oracle/oraclejet/ojavatar"; +import { ojButton, ojButtonsetMany, ojButtonsetOne } from "@oracle/oraclejet/ojbutton"; +import { ojChart, ojChartGroup, ojChartItem, ojChartSeries, ojSparkChart, ojSparkChartItem } from "@oracle/oraclejet/ojchart"; +import { ojCheckboxset } from "@oracle/oraclejet/ojcheckboxset"; +import { ojCollapsible } from "@oracle/oraclejet/ojcollapsible"; +import CollectionDataprovider = require("@oracle/oraclejet/ojcollectiondataprovider"); +import Color = require("@oracle/oraclejet/ojcolor"); +import { ojColorPalette } from "@oracle/oraclejet/ojcolorpalette"; +import { ojColorSpectrum } from "@oracle/oraclejet/ojcolorspectrum"; +import Components = require("@oracle/oraclejet/ojcomponentcore"); +import Composite = require("@oracle/oraclejet/ojcomposite"); +import Config = require('@oracle/oraclejet/ojconfig'); +import Context = require("@oracle/oraclejet/ojcontext"); +import { ojConveyorBelt } from "@oracle/oraclejet/ojconveyorbelt"; +import { ojDataGrid } from "@oracle/oraclejet/ojdatagrid"; +import { DataMapping, DataProvider, DataProviderAddOperationEventDetail, DataProviderMutationEventDetail, DataProviderOperationEventDetail } from "@oracle/oraclejet/ojdataprovider"; +import { ojDatePicker, ojDateTimePicker, ojInputDate, ojInputDateTime, ojInputTime } from "@oracle/oraclejet/ojdatetimepicker"; +import { ojDefer } from "@oracle/oraclejet/ojdefer"; +import DeferredDataprovider = require("@oracle/oraclejet/ojdeferreddataprovider"); +import { ojDiagram, ojDiagramLink, ojDiagramNode } from "@oracle/oraclejet/ojdiagram"; +import { ojDialog } from "@oracle/oraclejet/ojdialog"; +import { dvtBaseComponent } from "@oracle/oraclejet/ojdvt-base"; +import { editableValue } from "@oracle/oraclejet/ojeditablevalue"; +import ExpressionUtils = require('@oracle/oraclejet/ojexpressionutils'); +import { ojFilePicker, FileUploadTransport } from "@oracle/oraclejet/ojfilepicker"; +import { ojFilmStrip } from "@oracle/oraclejet/ojfilmstrip"; +import { ojFormLayout } from "@oracle/oraclejet/ojformlayout"; +import { ojGantt, ojGanttRow, ojGanttTask, ojGanttDependency } from "@oracle/oraclejet/ojgantt"; +import GanttUtils = require ('@oracle/oraclejet/ojganttutils'); +import { ojLedGauge, ojRatingGauge, ojStatusMeterGauge } from "@oracle/oraclejet/ojgauge"; +import { ojInputNumber } from "@oracle/oraclejet/ojinputnumber"; +import { ojInputPassword, ojInputText, ojTextArea } from "@oracle/oraclejet/ojinputtext"; +import { KeySet, ExpandAllKeySet, ExpandedKeySet } from "@oracle/oraclejet/ojkeyset"; +import { ObservableExpandedKeySet } from "@oracle/oraclejet/ojknockout-keyset"; +import KnockoutUtils = require("@oracle/oraclejet/ojknockout-model"); +import KnockoutTemplateUtils = require('@oracle/oraclejet/ojknockouttemplateutils'); +import { ojLabel } from "@oracle/oraclejet/ojlabel"; +import { ojLabelValue } from "@oracle/oraclejet/ojlabelvalue"; +import { ojLegend } from "@oracle/oraclejet/ojlegend"; +import ListDataProviderView = require("@oracle/oraclejet/ojlistdataproviderview"); +import { ojListView } from "@oracle/oraclejet/ojlistview"; +import LocaleData = require('@oracle/oraclejet/ojlocaledata'); +import Logger = require('@oracle/oraclejet/ojlogger'); +import { ojMasonryLayout } from "@oracle/oraclejet/ojmasonrylayout"; +import { ojMenu } from "@oracle/oraclejet/ojmenu"; +import { ojMenuSelectMany } from "@oracle/oraclejet/ojmenuselectmany"; +import { ojMessages } from "@oracle/oraclejet/ojmessages"; +import { ojMessage } from "@oracle/oraclejet/ojmessage"; +import Message = require("@oracle/oraclejet/ojmessaging"); +import { Collection, Model, URLError, OAuth } from "@oracle/oraclejet/ojmodel"; +import { ojModule } from "@oracle/oraclejet/ojmodule-element"; +import ModuleElementUtils = require("@oracle/oraclejet/ojmodule-element-utils"); +import ModuleAnimations = require("@oracle/oraclejet/ojmoduleanimations") ; +import { ojNavigationList, ojTabBar } from "@oracle/oraclejet/ojnavigationlist"; +import { ojNBox } from "@oracle/oraclejet/ojnbox"; +import { ojOptgroup } from "@oracle/oraclejet/ojoptgroup"; +import { ojOption } from "@oracle/oraclejet/ojoption"; +import { ojPictoChart, ojPictoChartItem } from "@oracle/oraclejet/ojpictochart"; +import { ojPopup } from "@oracle/oraclejet/ojpopup"; +import { ojProgress } from "@oracle/oraclejet/ojprogress"; +import { ojProgressList, ProgressItem } from "@oracle/oraclejet/ojprogresslist"; +import PullToRefreshUtils = require("@oracle/oraclejet/ojpulltorefresh"); +import { ojRadioset } from "@oracle/oraclejet/ojradioset"; +import { ojRefresher } from "@oracle/oraclejet/ojrefresher"; +import ResponsiveKnockoutUtils = require('@oracle/oraclejet/ojresponsiveknockoututils'); +import ResponsiveUtils = require('@oracle/oraclejet/ojresponsiveutils'); +import Router = require("@oracle/oraclejet/ojrouter"); +import { ojComboboxOne, ojComboboxMany, ojSelectOne, ojSelectMany } from "@oracle/oraclejet/ojselectcombobox"; +import { ojSlider } from "@oracle/oraclejet/ojslider"; +import { ojSunburst } from "@oracle/oraclejet/ojsunburst"; +import { ojSwipeActions } from "@oracle/oraclejet/ojswipeactions"; +import SwipeToRevealUtils = require("@oracle/oraclejet/ojswipetoreveal"); +import { ojSwitch } from "@oracle/oraclejet/ojswitch"; +import { ojSwitcher } from "@oracle/oraclejet/ojswitcher"; +import { ojTable } from "@oracle/oraclejet/ojtable"; +import { ojTagCloud } from "@oracle/oraclejet/ojtagcloud"; +import { ojThematicMap } from "@oracle/oraclejet/ojthematicmap"; +import ThemeUtils = require('@oracle/oraclejet/ojthemeutils'); +import { dvtTimeComponent } from "@oracle/oraclejet/ojtime-base"; +import { ojTimeAxis } from "@oracle/oraclejet/ojtimeaxis"; +import TimeUtils = require("@oracle/oraclejet/ojtimeutils"); +import { ojToolbar } from "@oracle/oraclejet/ojtoolbar"; +import { ojTrain } from "@oracle/oraclejet/ojtrain"; +import Translations = require("@oracle/oraclejet/ojtranslation"); +import TreeDataProvider = require("@oracle/oraclejet/ojtreedataprovider"); +import { ojTreemap } from "@oracle/oraclejet/ojtreemap"; import { Validation, Validator, ValidatorError, ValidatorFactory, - AsyncValidator, LengthValidator, LengthValidatorFactory, RegExpValidator, RegExpValidatorFactory, RequiredValidator, RequiredValidatorFactory } from "ojs/ojvalidation-base"; -import { DateRestrictionValidator, DateRestrictionValidatorFactory, DateTimeRangeValidator, DateTimeRangeValidatorFactory } from "ojs/ojvalidation-datetime"; -import { NumberRangeValidator, NumberRangeValidatorFactory } from "ojs/ojvalidation-number"; -import { ojValidationGroup } from "ojs/ojvalidationgroup"; + AsyncValidator, LengthValidator, LengthValidatorFactory, RegExpValidator, RegExpValidatorFactory, RequiredValidator, RequiredValidatorFactory } from "@oracle/oraclejet/ojvalidation-base"; +import { DateRestrictionValidator, DateRestrictionValidatorFactory, DateTimeRangeValidator, DateTimeRangeValidatorFactory } from "@oracle/oraclejet/ojvalidation-datetime"; +import { NumberRangeValidator, NumberRangeValidatorFactory } from "@oracle/oraclejet/ojvalidation-number"; +import { ojValidationGroup } from "@oracle/oraclejet/ojvalidationgroup"; const onChangedCallback = (event: CustomEvent) => { }; diff --git a/types/oracle__oraclejet/tsconfig.json b/types/oracle__oraclejet/tsconfig.json index 6119a97403..737bb98852 100644 --- a/types/oracle__oraclejet/tsconfig.json +++ b/types/oracle__oraclejet/tsconfig.json @@ -16,10 +16,10 @@ "../" ], "paths": { - "ojs": [ + "@oracle/oraclejet": [ "oracle__oraclejet" ], - "ojs/*": [ + "@oracle/oraclejet/*": [ "oracle__oraclejet/*" ] } From 1433a0c327ffa2fa99ca9816db5cb2fba437a3bc Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Mon, 1 Oct 2018 21:36:58 -0700 Subject: [PATCH 012/160] Remove trailing space --- types/oracle__oraclejet/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/oracle__oraclejet/tsconfig.json b/types/oracle__oraclejet/tsconfig.json index 737bb98852..5f529007f8 100644 --- a/types/oracle__oraclejet/tsconfig.json +++ b/types/oracle__oraclejet/tsconfig.json @@ -22,7 +22,7 @@ "@oracle/oraclejet/*": [ "oracle__oraclejet/*" ] - } + } }, "files": [ "oracle__oraclejet-tests.ts", From a767c5576dbcb86c629d080cb419adbda04e6f20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Bruus=20Frank?= Date: Wed, 19 Dec 2018 13:58:45 +0100 Subject: [PATCH 013/160] added context prop to provider + exposed ReactReduxContext from react-redux. --- types/react-redux/index.d.ts | 43 +++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/types/react-redux/index.d.ts b/types/react-redux/index.d.ts index bcbcced0bd..1a62ed6b56 100644 --- a/types/react-redux/index.d.ts +++ b/types/react-redux/index.d.ts @@ -31,7 +31,8 @@ import { Component, ComponentClass, ComponentType, - StatelessComponent + StatelessComponent, + Context } from 'react'; import { @@ -66,10 +67,10 @@ export type AdvancedComponentDecorator = */ export type Matching = { [P in keyof DecorationTargetProps]: P extends keyof InjectedProps - ? InjectedProps[P] extends DecorationTargetProps[P] - ? DecorationTargetProps[P] - : InjectedProps[P] - : DecorationTargetProps[P]; + ? InjectedProps[P] extends DecorationTargetProps[P] + ? DecorationTargetProps[P] + : InjectedProps[P] + : DecorationTargetProps[P]; }; /** @@ -114,22 +115,22 @@ export type InferableComponentEnhancer = export type InferThunkActionCreatorType any> = TActionCreator extends (...args: infer TParams) => (...args: any[]) => infer TReturn - ? (...args: TParams) => TReturn - : TActionCreator; + ? (...args: TParams) => TReturn + : TActionCreator; export type HandleThunkActionCreator = TActionCreator extends (...args: any[]) => any - ? InferThunkActionCreatorType - : TActionCreator; + ? InferThunkActionCreatorType + : TActionCreator; // redux-thunk middleware returns thunk's return value from dispatch call // https://github.com/reduxjs/redux-thunk#composition export type ResolveThunks = TDispatchProps extends { [key: string]: any } - ? { - [C in keyof TDispatchProps]: HandleThunkActionCreator - } - : TDispatchProps; + ? { + [C in keyof TDispatchProps]: HandleThunkActionCreator + } + : TDispatchProps; /** * Connects a React component to a Redux store. @@ -390,11 +391,21 @@ export interface ConnectOptions { withRef?: boolean; } +export interface ReactReduxContextType { + store: Store; + storeState: SS; +} + export interface ProviderProps { /** * The single Redux store in your application. */ store: Store; + /** + * Optional context to be used internally in react-redux. Initial value doesn't matter, as it is overwritten with the + * internal state of Provider. + */ + context?: Context>; } /** @@ -410,3 +421,9 @@ export class Provider extends Component; From 3fe641a47dd4d1a869b7a6af3ad45c3cf8cd6b74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Bruus=20Frank?= Date: Wed, 19 Dec 2018 14:17:54 +0100 Subject: [PATCH 014/160] Changed context prop of Provider to Context to reflect that initial context doesn't matter, as it is overwritten internally in Provider on instantiation. --- types/react-redux/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/react-redux/index.d.ts b/types/react-redux/index.d.ts index 1a62ed6b56..101c34dea0 100644 --- a/types/react-redux/index.d.ts +++ b/types/react-redux/index.d.ts @@ -402,10 +402,10 @@ export interface ProviderProps { */ store: Store; /** - * Optional context to be used internally in react-redux. Initial value doesn't matter, as it is overwritten with the - * internal state of Provider. + * Optional context to be used internally in react-redux. Use React.createContext() to create a context to be used. + * Initial value doesn't matter, as it is overwritten with the internal state of Provider. */ - context?: Context>; + context?: Context; } /** From 502924bc077aa7d7525a73dfcf03ced125494a48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Bruus=20Frank?= Date: Wed, 19 Dec 2018 14:18:16 +0100 Subject: [PATCH 015/160] Added tests for provider with context. --- types/react-redux/react-redux-tests.tsx | 98 +++++++++++++++---------- 1 file changed, 61 insertions(+), 37 deletions(-) diff --git a/types/react-redux/react-redux-tests.tsx b/types/react-redux/react-redux-tests.tsx index 554ace09ff..80545fbcb8 100644 --- a/types/react-redux/react-redux-tests.tsx +++ b/types/react-redux/react-redux-tests.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import { Store, Dispatch, AnyAction, ActionCreator, createStore, bindActionCreators, ActionCreatorsMapObject, Reducer } from 'redux'; -import { Connect, connect, createProvider, Provider, DispatchProp, MapStateToProps, Options } from 'react-redux'; +import { Connect, connect, createProvider, Provider, DispatchProp, MapStateToProps, Options, ReactReduxContext } from 'react-redux'; import objectAssign = require('object-assign'); // @@ -18,7 +18,7 @@ function Empty() { foo: string; } - class TestComponent extends React.Component {} + class TestComponent extends React.Component { } const Test = connect()(TestComponent); @@ -29,7 +29,7 @@ function MapState() { interface OwnProps { foo: string; } interface StateProps { bar: number; } - class TestComponent extends React.Component {} + class TestComponent extends React.Component { } const mapStateToProps = (_: any) => ({ bar: 1 @@ -46,7 +46,7 @@ function MapStateWithDispatchProp() { interface OwnProps { foo: string; } interface StateProps { bar: number; dispatch: Dispatch; } - class TestComponent extends React.Component {} + class TestComponent extends React.Component { } const mapStateToProps = (_: any) => ({ bar: 1 @@ -63,7 +63,7 @@ function MapStateFactory() { interface OwnProps { foo: string; } interface StateProps { bar: number; } - class TestComponent extends React.Component {} + class TestComponent extends React.Component { } const mapStateToProps = () => () => ({ bar: 1 @@ -80,10 +80,10 @@ function MapDispatch() { interface OwnProps { foo: string; } interface DispatchProps { onClick: () => void; } - class TestComponent extends React.Component {} + class TestComponent extends React.Component { } const mapDispatchToProps = () => ({ - onClick: () => {} + onClick: () => { } }); const TestNull = connect( @@ -117,8 +117,8 @@ function MapDispatchWithThunkActionCreators() { interface TestComponentProps extends OwnProps { simpleAction: typeof simpleAction; thunkAction(param1: number, param2: string): Promise; - } - class TestComponent extends React.Component {} + } + class TestComponent extends React.Component { } const mapStateToProps = ({ foo }: { foo: string }) => ({ foo }); const mapDispatchToProps = { simpleAction, thunkAction }; @@ -145,7 +145,7 @@ function MapManualDispatchThatLooksLikeThunk() { } interface TestComponentProps extends OwnProps { remove: (item: string) => () => object; - } + } class TestComponent extends React.Component { render() { return
; @@ -192,7 +192,7 @@ function MapStateAndDispatchObject() { bar: 1 }); - class TestComponent extends React.Component {} + class TestComponent extends React.Component { } const Test = connect( mapStateToProps, @@ -206,10 +206,10 @@ function MapDispatchFactory() { interface OwnProps { foo: string; } interface DispatchProps { onClick: () => void; } - class TestComponent extends React.Component {} + class TestComponent extends React.Component { } const mapDispatchToPropsFactory = () => () => ({ - onClick: () => {} + onClick: () => { } }); const TestNull = connect( @@ -232,14 +232,14 @@ function MapStateAndDispatch() { interface StateProps { bar: number; } interface DispatchProps { onClick: () => void; } - class TestComponent extends React.Component {} + class TestComponent extends React.Component { } const mapStateToProps = () => ({ bar: 1 }); const mapDispatchToProps = () => ({ - onClick: () => {} + onClick: () => { } }); const Test = connect( @@ -260,10 +260,10 @@ function MapStateFactoryAndDispatch() { }); const mapDispatchToProps = () => ({ - onClick: () => {} + onClick: () => { } }); - class TestComponent extends React.Component {} + class TestComponent extends React.Component { } const Test = connect( mapStateToPropsFactory, @@ -283,10 +283,10 @@ function MapStateFactoryAndDispatchFactory() { }); const mapDispatchToPropsFactory = () => () => ({ - onClick: () => {} + onClick: () => { } }); - class TestComponent extends React.Component {} + class TestComponent extends React.Component { } const Test = connect( mapStateToPropsFactory, @@ -301,14 +301,14 @@ function MapStateAndDispatchAndMerge() { interface StateProps { bar: number; } interface DispatchProps { onClick: () => void; } - class TestComponent extends React.Component {} + class TestComponent extends React.Component { } const mapStateToProps = () => ({ bar: 1 }); const mapDispatchToProps = () => ({ - onClick: () => {} + onClick: () => { } }); const mergeProps = (stateProps: StateProps, dispatchProps: DispatchProps) => ( @@ -330,7 +330,7 @@ function MapStateAndOptions() { interface StateProps { bar: number; } interface DispatchProps { dispatch: Dispatch; } - class TestComponent extends React.Component {} + class TestComponent extends React.Component { } const mapStateToProps = (state: State) => ({ bar: 1 @@ -444,9 +444,9 @@ ReactDOM.render(( declare var store: Store; class MyRootComponent extends React.Component { } -class TodoApp extends React.Component {} +class TodoApp extends React.Component { } interface TodoState { - todos: string[]|string; + todos: string[] | string; } interface TodoProps { userId: number; @@ -629,7 +629,7 @@ function TestTOwnPropsInference() { class OwnPropsComponent extends React.Component { render() { - return
; + return
; } } @@ -667,7 +667,7 @@ function TestTOwnPropsInference() { class AllPropsComponent extends React.Component { render() { - return
; + return
; } } @@ -701,7 +701,7 @@ function TestMergedPropsInference() { class MergedPropsComponent extends React.Component { render() { - return
; + return
; } } @@ -747,7 +747,7 @@ function Issue16652() { comments: Array<({ id: string } | undefined)>; } - class CommentList extends React.Component {} + class CommentList extends React.Component { } const mapStateToProps = (state: any, ownProps: PassedProps): GeneratedStateProps => { return { @@ -861,7 +861,7 @@ function TestInferredFunctionalComponentWithExplicitOwnProps() { const Header = connect( ( - { app: { title }}: { app: { title: string }}, + { app: { title } }: { app: { title: string } }, { extraText }: { extraText: string } ) => ({ title, @@ -873,7 +873,7 @@ function TestInferredFunctionalComponentWithExplicitOwnProps() { )(({ title, extraText, onClick }: Props) => { return

{title} {extraText}

; }); -
; +
; } function TestInferredFunctionalComponentWithImplicitOwnProps() { @@ -885,7 +885,7 @@ function TestInferredFunctionalComponentWithImplicitOwnProps() { const Header = connect( ( - { app: { title }}: { app: { title: string }}, + { app: { title } }: { app: { title: string } }, ) => ({ title, }), @@ -895,7 +895,7 @@ function TestInferredFunctionalComponentWithImplicitOwnProps() { )(({ title, extraText, onClick }: Props) => { return

{title} {extraText}

; }); -
; +
; } function TestWrappedComponent() { @@ -1082,7 +1082,7 @@ function TestOptionalPropsMergedCorrectly() { function mapDispatchToProps(dispatch: any): MapDispatchProps { return { - dependsOnDispatch: () => {} + dependsOnDispatch: () => { } }; } @@ -1126,7 +1126,7 @@ function TestMoreGeneralDecorationProps() { function mapDispatchToProps(dispatch: any): MapDispatchProps { return { - dependsOnDispatch: () => {} + dependsOnDispatch: () => { } }; } @@ -1165,7 +1165,7 @@ function TestFailsMoreSpecificInjectedProps() { function mapDispatchToProps(dispatch: any): MapDispatchProps { return { - dependsOnDispatch: () => {} + dependsOnDispatch: () => { } }; } @@ -1205,8 +1205,32 @@ function TestLibraryManagedAttributes() { } const ConnectedComponent = connect(mapStateToProps)(Component); - {}} />; + { }} />; const ConnectedComponent2 = connect(mapStateToProps)(Component); - {}} />; + { }} />; +} + +function TestProviderContext() { + + //Internally in react-redux, null is used initially and overwritten in Provider with store and storeState. + const context = React.createContext(null); + + class ComponentWithOwnContext extends React.Component { + public static contextType = context; + } + + + ; + + + class ComponentWithDefaultContext extends React.Component { + public static contextType = ReactReduxContext; + } + + + + ; + + // $ExpectError } From 197e49c7663542eb5a841c2dc50a48bf387f3a38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Bruus=20Frank?= Date: Wed, 19 Dec 2018 14:38:58 +0100 Subject: [PATCH 016/160] Revert editor auto-indentation. --- types/react-redux/index.d.ts | 20 +++---- types/react-redux/react-redux-tests.tsx | 72 ++++++++++++------------- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/types/react-redux/index.d.ts b/types/react-redux/index.d.ts index 101c34dea0..1ba25ddd43 100644 --- a/types/react-redux/index.d.ts +++ b/types/react-redux/index.d.ts @@ -67,10 +67,10 @@ export type AdvancedComponentDecorator = */ export type Matching = { [P in keyof DecorationTargetProps]: P extends keyof InjectedProps - ? InjectedProps[P] extends DecorationTargetProps[P] - ? DecorationTargetProps[P] - : InjectedProps[P] - : DecorationTargetProps[P]; + ? InjectedProps[P] extends DecorationTargetProps[P] + ? DecorationTargetProps[P] + : InjectedProps[P] + : DecorationTargetProps[P]; }; /** @@ -115,8 +115,8 @@ export type InferableComponentEnhancer = export type InferThunkActionCreatorType any> = TActionCreator extends (...args: infer TParams) => (...args: any[]) => infer TReturn - ? (...args: TParams) => TReturn - : TActionCreator; + ? (...args: TParams) => TReturn + : TActionCreator; export type HandleThunkActionCreator = TActionCreator extends (...args: any[]) => any @@ -127,10 +127,10 @@ export type HandleThunkActionCreator = // https://github.com/reduxjs/redux-thunk#composition export type ResolveThunks = TDispatchProps extends { [key: string]: any } - ? { - [C in keyof TDispatchProps]: HandleThunkActionCreator - } - : TDispatchProps; + ? { + [C in keyof TDispatchProps]: HandleThunkActionCreator + } + : TDispatchProps; /** * Connects a React component to a Redux store. diff --git a/types/react-redux/react-redux-tests.tsx b/types/react-redux/react-redux-tests.tsx index 80545fbcb8..110d53cc1a 100644 --- a/types/react-redux/react-redux-tests.tsx +++ b/types/react-redux/react-redux-tests.tsx @@ -18,7 +18,7 @@ function Empty() { foo: string; } - class TestComponent extends React.Component { } + class TestComponent extends React.Component {} const Test = connect()(TestComponent); @@ -29,7 +29,7 @@ function MapState() { interface OwnProps { foo: string; } interface StateProps { bar: number; } - class TestComponent extends React.Component { } + class TestComponent extends React.Component {} const mapStateToProps = (_: any) => ({ bar: 1 @@ -46,7 +46,7 @@ function MapStateWithDispatchProp() { interface OwnProps { foo: string; } interface StateProps { bar: number; dispatch: Dispatch; } - class TestComponent extends React.Component { } + class TestComponent extends React.Component {} const mapStateToProps = (_: any) => ({ bar: 1 @@ -63,7 +63,7 @@ function MapStateFactory() { interface OwnProps { foo: string; } interface StateProps { bar: number; } - class TestComponent extends React.Component { } + class TestComponent extends React.Component {} const mapStateToProps = () => () => ({ bar: 1 @@ -80,10 +80,10 @@ function MapDispatch() { interface OwnProps { foo: string; } interface DispatchProps { onClick: () => void; } - class TestComponent extends React.Component { } + class TestComponent extends React.Component {} const mapDispatchToProps = () => ({ - onClick: () => { } + onClick: () => {} }); const TestNull = connect( @@ -117,8 +117,8 @@ function MapDispatchWithThunkActionCreators() { interface TestComponentProps extends OwnProps { simpleAction: typeof simpleAction; thunkAction(param1: number, param2: string): Promise; - } - class TestComponent extends React.Component { } + } + class TestComponent extends React.Component {} const mapStateToProps = ({ foo }: { foo: string }) => ({ foo }); const mapDispatchToProps = { simpleAction, thunkAction }; @@ -145,7 +145,7 @@ function MapManualDispatchThatLooksLikeThunk() { } interface TestComponentProps extends OwnProps { remove: (item: string) => () => object; - } + } class TestComponent extends React.Component { render() { return
; @@ -192,7 +192,7 @@ function MapStateAndDispatchObject() { bar: 1 }); - class TestComponent extends React.Component { } + class TestComponent extends React.Component {} const Test = connect( mapStateToProps, @@ -206,10 +206,10 @@ function MapDispatchFactory() { interface OwnProps { foo: string; } interface DispatchProps { onClick: () => void; } - class TestComponent extends React.Component { } + class TestComponent extends React.Component {} const mapDispatchToPropsFactory = () => () => ({ - onClick: () => { } + onClick: () => {} }); const TestNull = connect( @@ -232,14 +232,14 @@ function MapStateAndDispatch() { interface StateProps { bar: number; } interface DispatchProps { onClick: () => void; } - class TestComponent extends React.Component { } + class TestComponent extends React.Component {} const mapStateToProps = () => ({ bar: 1 }); const mapDispatchToProps = () => ({ - onClick: () => { } + onClick: () => {} }); const Test = connect( @@ -260,10 +260,10 @@ function MapStateFactoryAndDispatch() { }); const mapDispatchToProps = () => ({ - onClick: () => { } + onClick: () => {} }); - class TestComponent extends React.Component { } + class TestComponent extends React.Component {} const Test = connect( mapStateToPropsFactory, @@ -283,10 +283,10 @@ function MapStateFactoryAndDispatchFactory() { }); const mapDispatchToPropsFactory = () => () => ({ - onClick: () => { } + onClick: () => {} }); - class TestComponent extends React.Component { } + class TestComponent extends React.Component {} const Test = connect( mapStateToPropsFactory, @@ -301,14 +301,14 @@ function MapStateAndDispatchAndMerge() { interface StateProps { bar: number; } interface DispatchProps { onClick: () => void; } - class TestComponent extends React.Component { } + class TestComponent extends React.Component {} const mapStateToProps = () => ({ bar: 1 }); const mapDispatchToProps = () => ({ - onClick: () => { } + onClick: () => {} }); const mergeProps = (stateProps: StateProps, dispatchProps: DispatchProps) => ( @@ -330,7 +330,7 @@ function MapStateAndOptions() { interface StateProps { bar: number; } interface DispatchProps { dispatch: Dispatch; } - class TestComponent extends React.Component { } + class TestComponent extends React.Component {} const mapStateToProps = (state: State) => ({ bar: 1 @@ -444,9 +444,9 @@ ReactDOM.render(( declare var store: Store; class MyRootComponent extends React.Component { } -class TodoApp extends React.Component { } +class TodoApp extends React.Component {} interface TodoState { - todos: string[] | string; + todos: string[]|string; } interface TodoProps { userId: number; @@ -629,7 +629,7 @@ function TestTOwnPropsInference() { class OwnPropsComponent extends React.Component { render() { - return
; + return
; } } @@ -667,7 +667,7 @@ function TestTOwnPropsInference() { class AllPropsComponent extends React.Component { render() { - return
; + return
; } } @@ -701,7 +701,7 @@ function TestMergedPropsInference() { class MergedPropsComponent extends React.Component { render() { - return
; + return
; } } @@ -747,7 +747,7 @@ function Issue16652() { comments: Array<({ id: string } | undefined)>; } - class CommentList extends React.Component { } + class CommentList extends React.Component {} const mapStateToProps = (state: any, ownProps: PassedProps): GeneratedStateProps => { return { @@ -861,7 +861,7 @@ function TestInferredFunctionalComponentWithExplicitOwnProps() { const Header = connect( ( - { app: { title } }: { app: { title: string } }, + { app: { title }}: { app: { title: string }}, { extraText }: { extraText: string } ) => ({ title, @@ -873,7 +873,7 @@ function TestInferredFunctionalComponentWithExplicitOwnProps() { )(({ title, extraText, onClick }: Props) => { return

{title} {extraText}

; }); -
; +
; } function TestInferredFunctionalComponentWithImplicitOwnProps() { @@ -885,7 +885,7 @@ function TestInferredFunctionalComponentWithImplicitOwnProps() { const Header = connect( ( - { app: { title } }: { app: { title: string } }, + { app: { title }}: { app: { title: string }}, ) => ({ title, }), @@ -895,7 +895,7 @@ function TestInferredFunctionalComponentWithImplicitOwnProps() { )(({ title, extraText, onClick }: Props) => { return

{title} {extraText}

; }); -
; +
; } function TestWrappedComponent() { @@ -1082,7 +1082,7 @@ function TestOptionalPropsMergedCorrectly() { function mapDispatchToProps(dispatch: any): MapDispatchProps { return { - dependsOnDispatch: () => { } + dependsOnDispatch: () => {} }; } @@ -1126,7 +1126,7 @@ function TestMoreGeneralDecorationProps() { function mapDispatchToProps(dispatch: any): MapDispatchProps { return { - dependsOnDispatch: () => { } + dependsOnDispatch: () => {} }; } @@ -1165,7 +1165,7 @@ function TestFailsMoreSpecificInjectedProps() { function mapDispatchToProps(dispatch: any): MapDispatchProps { return { - dependsOnDispatch: () => { } + dependsOnDispatch: () => {} }; } @@ -1205,10 +1205,10 @@ function TestLibraryManagedAttributes() { } const ConnectedComponent = connect(mapStateToProps)(Component); - { }} />; + {}} />; const ConnectedComponent2 = connect(mapStateToProps)(Component); - { }} />; + {}} />; } function TestProviderContext() { From 8b5375508616f03d99524e9249ddd7a3acb5d24d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Bruus=20Frank?= Date: Wed, 19 Dec 2018 14:38:58 +0100 Subject: [PATCH 017/160] Revert editor auto-indentation. --- types/react-redux/index.d.ts | 24 ++++----- types/react-redux/react-redux-tests.tsx | 72 ++++++++++++------------- 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/types/react-redux/index.d.ts b/types/react-redux/index.d.ts index 101c34dea0..8ff3352ecb 100644 --- a/types/react-redux/index.d.ts +++ b/types/react-redux/index.d.ts @@ -67,10 +67,10 @@ export type AdvancedComponentDecorator = */ export type Matching = { [P in keyof DecorationTargetProps]: P extends keyof InjectedProps - ? InjectedProps[P] extends DecorationTargetProps[P] - ? DecorationTargetProps[P] - : InjectedProps[P] - : DecorationTargetProps[P]; + ? InjectedProps[P] extends DecorationTargetProps[P] + ? DecorationTargetProps[P] + : InjectedProps[P] + : DecorationTargetProps[P]; }; /** @@ -115,22 +115,22 @@ export type InferableComponentEnhancer = export type InferThunkActionCreatorType any> = TActionCreator extends (...args: infer TParams) => (...args: any[]) => infer TReturn - ? (...args: TParams) => TReturn - : TActionCreator; + ? (...args: TParams) => TReturn + : TActionCreator; export type HandleThunkActionCreator = TActionCreator extends (...args: any[]) => any - ? InferThunkActionCreatorType - : TActionCreator; + ? InferThunkActionCreatorType + : TActionCreator; // redux-thunk middleware returns thunk's return value from dispatch call // https://github.com/reduxjs/redux-thunk#composition export type ResolveThunks = TDispatchProps extends { [key: string]: any } - ? { - [C in keyof TDispatchProps]: HandleThunkActionCreator - } - : TDispatchProps; + ? { + [C in keyof TDispatchProps]: HandleThunkActionCreator + } + : TDispatchProps; /** * Connects a React component to a Redux store. diff --git a/types/react-redux/react-redux-tests.tsx b/types/react-redux/react-redux-tests.tsx index 80545fbcb8..110d53cc1a 100644 --- a/types/react-redux/react-redux-tests.tsx +++ b/types/react-redux/react-redux-tests.tsx @@ -18,7 +18,7 @@ function Empty() { foo: string; } - class TestComponent extends React.Component { } + class TestComponent extends React.Component {} const Test = connect()(TestComponent); @@ -29,7 +29,7 @@ function MapState() { interface OwnProps { foo: string; } interface StateProps { bar: number; } - class TestComponent extends React.Component { } + class TestComponent extends React.Component {} const mapStateToProps = (_: any) => ({ bar: 1 @@ -46,7 +46,7 @@ function MapStateWithDispatchProp() { interface OwnProps { foo: string; } interface StateProps { bar: number; dispatch: Dispatch; } - class TestComponent extends React.Component { } + class TestComponent extends React.Component {} const mapStateToProps = (_: any) => ({ bar: 1 @@ -63,7 +63,7 @@ function MapStateFactory() { interface OwnProps { foo: string; } interface StateProps { bar: number; } - class TestComponent extends React.Component { } + class TestComponent extends React.Component {} const mapStateToProps = () => () => ({ bar: 1 @@ -80,10 +80,10 @@ function MapDispatch() { interface OwnProps { foo: string; } interface DispatchProps { onClick: () => void; } - class TestComponent extends React.Component { } + class TestComponent extends React.Component {} const mapDispatchToProps = () => ({ - onClick: () => { } + onClick: () => {} }); const TestNull = connect( @@ -117,8 +117,8 @@ function MapDispatchWithThunkActionCreators() { interface TestComponentProps extends OwnProps { simpleAction: typeof simpleAction; thunkAction(param1: number, param2: string): Promise; - } - class TestComponent extends React.Component { } + } + class TestComponent extends React.Component {} const mapStateToProps = ({ foo }: { foo: string }) => ({ foo }); const mapDispatchToProps = { simpleAction, thunkAction }; @@ -145,7 +145,7 @@ function MapManualDispatchThatLooksLikeThunk() { } interface TestComponentProps extends OwnProps { remove: (item: string) => () => object; - } + } class TestComponent extends React.Component { render() { return
; @@ -192,7 +192,7 @@ function MapStateAndDispatchObject() { bar: 1 }); - class TestComponent extends React.Component { } + class TestComponent extends React.Component {} const Test = connect( mapStateToProps, @@ -206,10 +206,10 @@ function MapDispatchFactory() { interface OwnProps { foo: string; } interface DispatchProps { onClick: () => void; } - class TestComponent extends React.Component { } + class TestComponent extends React.Component {} const mapDispatchToPropsFactory = () => () => ({ - onClick: () => { } + onClick: () => {} }); const TestNull = connect( @@ -232,14 +232,14 @@ function MapStateAndDispatch() { interface StateProps { bar: number; } interface DispatchProps { onClick: () => void; } - class TestComponent extends React.Component { } + class TestComponent extends React.Component {} const mapStateToProps = () => ({ bar: 1 }); const mapDispatchToProps = () => ({ - onClick: () => { } + onClick: () => {} }); const Test = connect( @@ -260,10 +260,10 @@ function MapStateFactoryAndDispatch() { }); const mapDispatchToProps = () => ({ - onClick: () => { } + onClick: () => {} }); - class TestComponent extends React.Component { } + class TestComponent extends React.Component {} const Test = connect( mapStateToPropsFactory, @@ -283,10 +283,10 @@ function MapStateFactoryAndDispatchFactory() { }); const mapDispatchToPropsFactory = () => () => ({ - onClick: () => { } + onClick: () => {} }); - class TestComponent extends React.Component { } + class TestComponent extends React.Component {} const Test = connect( mapStateToPropsFactory, @@ -301,14 +301,14 @@ function MapStateAndDispatchAndMerge() { interface StateProps { bar: number; } interface DispatchProps { onClick: () => void; } - class TestComponent extends React.Component { } + class TestComponent extends React.Component {} const mapStateToProps = () => ({ bar: 1 }); const mapDispatchToProps = () => ({ - onClick: () => { } + onClick: () => {} }); const mergeProps = (stateProps: StateProps, dispatchProps: DispatchProps) => ( @@ -330,7 +330,7 @@ function MapStateAndOptions() { interface StateProps { bar: number; } interface DispatchProps { dispatch: Dispatch; } - class TestComponent extends React.Component { } + class TestComponent extends React.Component {} const mapStateToProps = (state: State) => ({ bar: 1 @@ -444,9 +444,9 @@ ReactDOM.render(( declare var store: Store; class MyRootComponent extends React.Component { } -class TodoApp extends React.Component { } +class TodoApp extends React.Component {} interface TodoState { - todos: string[] | string; + todos: string[]|string; } interface TodoProps { userId: number; @@ -629,7 +629,7 @@ function TestTOwnPropsInference() { class OwnPropsComponent extends React.Component { render() { - return
; + return
; } } @@ -667,7 +667,7 @@ function TestTOwnPropsInference() { class AllPropsComponent extends React.Component { render() { - return
; + return
; } } @@ -701,7 +701,7 @@ function TestMergedPropsInference() { class MergedPropsComponent extends React.Component { render() { - return
; + return
; } } @@ -747,7 +747,7 @@ function Issue16652() { comments: Array<({ id: string } | undefined)>; } - class CommentList extends React.Component { } + class CommentList extends React.Component {} const mapStateToProps = (state: any, ownProps: PassedProps): GeneratedStateProps => { return { @@ -861,7 +861,7 @@ function TestInferredFunctionalComponentWithExplicitOwnProps() { const Header = connect( ( - { app: { title } }: { app: { title: string } }, + { app: { title }}: { app: { title: string }}, { extraText }: { extraText: string } ) => ({ title, @@ -873,7 +873,7 @@ function TestInferredFunctionalComponentWithExplicitOwnProps() { )(({ title, extraText, onClick }: Props) => { return

{title} {extraText}

; }); -
; +
; } function TestInferredFunctionalComponentWithImplicitOwnProps() { @@ -885,7 +885,7 @@ function TestInferredFunctionalComponentWithImplicitOwnProps() { const Header = connect( ( - { app: { title } }: { app: { title: string } }, + { app: { title }}: { app: { title: string }}, ) => ({ title, }), @@ -895,7 +895,7 @@ function TestInferredFunctionalComponentWithImplicitOwnProps() { )(({ title, extraText, onClick }: Props) => { return

{title} {extraText}

; }); -
; +
; } function TestWrappedComponent() { @@ -1082,7 +1082,7 @@ function TestOptionalPropsMergedCorrectly() { function mapDispatchToProps(dispatch: any): MapDispatchProps { return { - dependsOnDispatch: () => { } + dependsOnDispatch: () => {} }; } @@ -1126,7 +1126,7 @@ function TestMoreGeneralDecorationProps() { function mapDispatchToProps(dispatch: any): MapDispatchProps { return { - dependsOnDispatch: () => { } + dependsOnDispatch: () => {} }; } @@ -1165,7 +1165,7 @@ function TestFailsMoreSpecificInjectedProps() { function mapDispatchToProps(dispatch: any): MapDispatchProps { return { - dependsOnDispatch: () => { } + dependsOnDispatch: () => {} }; } @@ -1205,10 +1205,10 @@ function TestLibraryManagedAttributes() { } const ConnectedComponent = connect(mapStateToProps)(Component); - { }} />; + {}} />; const ConnectedComponent2 = connect(mapStateToProps)(Component); - { }} />; + {}} />; } function TestProviderContext() { From ffb95adb2717d637da0459705cae7b5411df7667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Bruus=20Frank?= Date: Wed, 19 Dec 2018 15:19:28 +0100 Subject: [PATCH 018/160] Added context to connectAdvanced options. --- types/react-redux/index.d.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/types/react-redux/index.d.ts b/types/react-redux/index.d.ts index 8ff3352ecb..914505b2a9 100644 --- a/types/react-redux/index.d.ts +++ b/types/react-redux/index.d.ts @@ -389,13 +389,21 @@ export interface ConnectOptions { * @default false */ withRef?: boolean; + /** + * The react context to get the store from. + * + * @default ReactReduxContext + */ + context?: Context; } -export interface ReactReduxContextType { +export interface ReactReduxContextObject { store: Store; storeState: SS; } +export type ReactReduxContextType = Context> + export interface ProviderProps { /** * The single Redux store in your application. @@ -403,7 +411,8 @@ export interface ProviderProps { store: Store; /** * Optional context to be used internally in react-redux. Use React.createContext() to create a context to be used. - * Initial value doesn't matter, as it is overwritten with the internal state of Provider. + * If this is used, generate own connect HOC by using connectAdvanced, supplying the same context provided to the + * Provider. Initial value doesn't matter, as it is overwritten with the internal state of Provider. */ context?: Context; } @@ -426,4 +435,4 @@ export function createProvider(storeKey: string): typeof Provider; * Exposes the internal context used in react-redux. It is generally advised to use the connect HOC to connect to the * redux store instead of this approeach. */ -export const ReactReduxContext: Context; +export const ReactReduxContext: ReactReduxContextType; From e93e7d6d8d5945efab20a47417c0acdf1bba6ea8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Bruus=20Frank?= Date: Thu, 20 Dec 2018 08:14:10 +0100 Subject: [PATCH 019/160] Fixed lint errors. --- types/react-redux/index.d.ts | 6 +++--- types/react-redux/react-redux-tests.tsx | 11 +++++------ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/types/react-redux/index.d.ts b/types/react-redux/index.d.ts index 914505b2a9..a182c15526 100644 --- a/types/react-redux/index.d.ts +++ b/types/react-redux/index.d.ts @@ -391,7 +391,7 @@ export interface ConnectOptions { withRef?: boolean; /** * The react context to get the store from. - * + * * @default ReactReduxContext */ context?: Context; @@ -402,7 +402,7 @@ export interface ReactReduxContextObject storeState: SS; } -export type ReactReduxContextType = Context> +export type ReactReduxContextType = Context>; export interface ProviderProps { /** @@ -411,7 +411,7 @@ export interface ProviderProps { store: Store; /** * Optional context to be used internally in react-redux. Use React.createContext() to create a context to be used. - * If this is used, generate own connect HOC by using connectAdvanced, supplying the same context provided to the + * If this is used, generate own connect HOC by using connectAdvanced, supplying the same context provided to the * Provider. Initial value doesn't matter, as it is overwritten with the internal state of Provider. */ context?: Context; diff --git a/types/react-redux/react-redux-tests.tsx b/types/react-redux/react-redux-tests.tsx index 110d53cc1a..ba42d57f28 100644 --- a/types/react-redux/react-redux-tests.tsx +++ b/types/react-redux/react-redux-tests.tsx @@ -1212,25 +1212,24 @@ function TestLibraryManagedAttributes() { } function TestProviderContext() { - - //Internally in react-redux, null is used initially and overwritten in Provider with store and storeState. + // Internally in react-redux, null is used initially and overwritten in Provider with store and storeState. const context = React.createContext(null); class ComponentWithOwnContext extends React.Component { - public static contextType = context; + static contextType = context; } ; - + ; class ComponentWithDefaultContext extends React.Component { - public static contextType = ReactReduxContext; + static contextType = ReactReduxContext; } ; - // $ExpectError + ; // $ExpectError } From 9bbad69ad25892b481b1a0511d8964c675513e37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Bruus=20Frank?= Date: Fri, 21 Dec 2018 10:06:32 +0100 Subject: [PATCH 020/160] Added type requirements to context supplied to Provider. --- types/react-redux/index.d.ts | 32 ++++----- types/react-redux/react-redux-tests.tsx | 93 +++++++++++++------------ 2 files changed, 63 insertions(+), 62 deletions(-) diff --git a/types/react-redux/index.d.ts b/types/react-redux/index.d.ts index a182c15526..352c72d7a7 100644 --- a/types/react-redux/index.d.ts +++ b/types/react-redux/index.d.ts @@ -67,10 +67,10 @@ export type AdvancedComponentDecorator = */ export type Matching = { [P in keyof DecorationTargetProps]: P extends keyof InjectedProps - ? InjectedProps[P] extends DecorationTargetProps[P] - ? DecorationTargetProps[P] - : InjectedProps[P] - : DecorationTargetProps[P]; + ? InjectedProps[P] extends DecorationTargetProps[P] + ? DecorationTargetProps[P] + : InjectedProps[P] + : DecorationTargetProps[P]; }; /** @@ -115,22 +115,22 @@ export type InferableComponentEnhancer = export type InferThunkActionCreatorType any> = TActionCreator extends (...args: infer TParams) => (...args: any[]) => infer TReturn - ? (...args: TParams) => TReturn - : TActionCreator; + ? (...args: TParams) => TReturn + : TActionCreator; export type HandleThunkActionCreator = TActionCreator extends (...args: any[]) => any - ? InferThunkActionCreatorType - : TActionCreator; + ? InferThunkActionCreatorType + : TActionCreator; // redux-thunk middleware returns thunk's return value from dispatch call // https://github.com/reduxjs/redux-thunk#composition export type ResolveThunks = TDispatchProps extends { [key: string]: any } - ? { - [C in keyof TDispatchProps]: HandleThunkActionCreator - } - : TDispatchProps; + ? { + [C in keyof TDispatchProps]: HandleThunkActionCreator + } + : TDispatchProps; /** * Connects a React component to a Redux store. @@ -394,7 +394,7 @@ export interface ConnectOptions { * * @default ReactReduxContext */ - context?: Context; + context?: Context; } export interface ReactReduxContextObject { @@ -402,8 +402,6 @@ export interface ReactReduxContextObject storeState: SS; } -export type ReactReduxContextType = Context>; - export interface ProviderProps { /** * The single Redux store in your application. @@ -414,7 +412,7 @@ export interface ProviderProps { * If this is used, generate own connect HOC by using connectAdvanced, supplying the same context provided to the * Provider. Initial value doesn't matter, as it is overwritten with the internal state of Provider. */ - context?: Context; + context?: Context; } /** @@ -435,4 +433,4 @@ export function createProvider(storeKey: string): typeof Provider; * Exposes the internal context used in react-redux. It is generally advised to use the connect HOC to connect to the * redux store instead of this approeach. */ -export const ReactReduxContext: ReactReduxContextType; +export const ReactReduxContext: Context; diff --git a/types/react-redux/react-redux-tests.tsx b/types/react-redux/react-redux-tests.tsx index ba42d57f28..e7c7bca3ce 100644 --- a/types/react-redux/react-redux-tests.tsx +++ b/types/react-redux/react-redux-tests.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import { Store, Dispatch, AnyAction, ActionCreator, createStore, bindActionCreators, ActionCreatorsMapObject, Reducer } from 'redux'; -import { Connect, connect, createProvider, Provider, DispatchProp, MapStateToProps, Options, ReactReduxContext } from 'react-redux'; +import { Connect, connect, createProvider, Provider, DispatchProp, MapStateToProps, Options, ReactReduxContext, ReactReduxContextObject } from 'react-redux'; import objectAssign = require('object-assign'); // @@ -18,7 +18,7 @@ function Empty() { foo: string; } - class TestComponent extends React.Component {} + class TestComponent extends React.Component { } const Test = connect()(TestComponent); @@ -29,7 +29,7 @@ function MapState() { interface OwnProps { foo: string; } interface StateProps { bar: number; } - class TestComponent extends React.Component {} + class TestComponent extends React.Component { } const mapStateToProps = (_: any) => ({ bar: 1 @@ -46,7 +46,7 @@ function MapStateWithDispatchProp() { interface OwnProps { foo: string; } interface StateProps { bar: number; dispatch: Dispatch; } - class TestComponent extends React.Component {} + class TestComponent extends React.Component { } const mapStateToProps = (_: any) => ({ bar: 1 @@ -63,7 +63,7 @@ function MapStateFactory() { interface OwnProps { foo: string; } interface StateProps { bar: number; } - class TestComponent extends React.Component {} + class TestComponent extends React.Component { } const mapStateToProps = () => () => ({ bar: 1 @@ -80,10 +80,10 @@ function MapDispatch() { interface OwnProps { foo: string; } interface DispatchProps { onClick: () => void; } - class TestComponent extends React.Component {} + class TestComponent extends React.Component { } const mapDispatchToProps = () => ({ - onClick: () => {} + onClick: () => { } }); const TestNull = connect( @@ -117,8 +117,8 @@ function MapDispatchWithThunkActionCreators() { interface TestComponentProps extends OwnProps { simpleAction: typeof simpleAction; thunkAction(param1: number, param2: string): Promise; - } - class TestComponent extends React.Component {} + } + class TestComponent extends React.Component { } const mapStateToProps = ({ foo }: { foo: string }) => ({ foo }); const mapDispatchToProps = { simpleAction, thunkAction }; @@ -145,7 +145,7 @@ function MapManualDispatchThatLooksLikeThunk() { } interface TestComponentProps extends OwnProps { remove: (item: string) => () => object; - } + } class TestComponent extends React.Component { render() { return
; @@ -192,7 +192,7 @@ function MapStateAndDispatchObject() { bar: 1 }); - class TestComponent extends React.Component {} + class TestComponent extends React.Component { } const Test = connect( mapStateToProps, @@ -206,10 +206,10 @@ function MapDispatchFactory() { interface OwnProps { foo: string; } interface DispatchProps { onClick: () => void; } - class TestComponent extends React.Component {} + class TestComponent extends React.Component { } const mapDispatchToPropsFactory = () => () => ({ - onClick: () => {} + onClick: () => { } }); const TestNull = connect( @@ -232,14 +232,14 @@ function MapStateAndDispatch() { interface StateProps { bar: number; } interface DispatchProps { onClick: () => void; } - class TestComponent extends React.Component {} + class TestComponent extends React.Component { } const mapStateToProps = () => ({ bar: 1 }); const mapDispatchToProps = () => ({ - onClick: () => {} + onClick: () => { } }); const Test = connect( @@ -260,10 +260,10 @@ function MapStateFactoryAndDispatch() { }); const mapDispatchToProps = () => ({ - onClick: () => {} + onClick: () => { } }); - class TestComponent extends React.Component {} + class TestComponent extends React.Component { } const Test = connect( mapStateToPropsFactory, @@ -283,10 +283,10 @@ function MapStateFactoryAndDispatchFactory() { }); const mapDispatchToPropsFactory = () => () => ({ - onClick: () => {} + onClick: () => { } }); - class TestComponent extends React.Component {} + class TestComponent extends React.Component { } const Test = connect( mapStateToPropsFactory, @@ -301,14 +301,14 @@ function MapStateAndDispatchAndMerge() { interface StateProps { bar: number; } interface DispatchProps { onClick: () => void; } - class TestComponent extends React.Component {} + class TestComponent extends React.Component { } const mapStateToProps = () => ({ bar: 1 }); const mapDispatchToProps = () => ({ - onClick: () => {} + onClick: () => { } }); const mergeProps = (stateProps: StateProps, dispatchProps: DispatchProps) => ( @@ -330,7 +330,7 @@ function MapStateAndOptions() { interface StateProps { bar: number; } interface DispatchProps { dispatch: Dispatch; } - class TestComponent extends React.Component {} + class TestComponent extends React.Component { } const mapStateToProps = (state: State) => ({ bar: 1 @@ -444,9 +444,9 @@ ReactDOM.render(( declare var store: Store; class MyRootComponent extends React.Component { } -class TodoApp extends React.Component {} +class TodoApp extends React.Component { } interface TodoState { - todos: string[]|string; + todos: string[] | string; } interface TodoProps { userId: number; @@ -629,7 +629,7 @@ function TestTOwnPropsInference() { class OwnPropsComponent extends React.Component { render() { - return
; + return
; } } @@ -667,7 +667,7 @@ function TestTOwnPropsInference() { class AllPropsComponent extends React.Component { render() { - return
; + return
; } } @@ -701,7 +701,7 @@ function TestMergedPropsInference() { class MergedPropsComponent extends React.Component { render() { - return
; + return
; } } @@ -747,7 +747,7 @@ function Issue16652() { comments: Array<({ id: string } | undefined)>; } - class CommentList extends React.Component {} + class CommentList extends React.Component { } const mapStateToProps = (state: any, ownProps: PassedProps): GeneratedStateProps => { return { @@ -861,7 +861,7 @@ function TestInferredFunctionalComponentWithExplicitOwnProps() { const Header = connect( ( - { app: { title }}: { app: { title: string }}, + { app: { title } }: { app: { title: string } }, { extraText }: { extraText: string } ) => ({ title, @@ -873,7 +873,7 @@ function TestInferredFunctionalComponentWithExplicitOwnProps() { )(({ title, extraText, onClick }: Props) => { return

{title} {extraText}

; }); -
; +
; } function TestInferredFunctionalComponentWithImplicitOwnProps() { @@ -885,7 +885,7 @@ function TestInferredFunctionalComponentWithImplicitOwnProps() { const Header = connect( ( - { app: { title }}: { app: { title: string }}, + { app: { title } }: { app: { title: string } }, ) => ({ title, }), @@ -895,7 +895,7 @@ function TestInferredFunctionalComponentWithImplicitOwnProps() { )(({ title, extraText, onClick }: Props) => { return

{title} {extraText}

; }); -
; +
; } function TestWrappedComponent() { @@ -1082,7 +1082,7 @@ function TestOptionalPropsMergedCorrectly() { function mapDispatchToProps(dispatch: any): MapDispatchProps { return { - dependsOnDispatch: () => {} + dependsOnDispatch: () => { } }; } @@ -1126,7 +1126,7 @@ function TestMoreGeneralDecorationProps() { function mapDispatchToProps(dispatch: any): MapDispatchProps { return { - dependsOnDispatch: () => {} + dependsOnDispatch: () => { } }; } @@ -1165,7 +1165,7 @@ function TestFailsMoreSpecificInjectedProps() { function mapDispatchToProps(dispatch: any): MapDispatchProps { return { - dependsOnDispatch: () => {} + dependsOnDispatch: () => { } }; } @@ -1205,24 +1205,26 @@ function TestLibraryManagedAttributes() { } const ConnectedComponent = connect(mapStateToProps)(Component); - {}} />; + { }} />; const ConnectedComponent2 = connect(mapStateToProps)(Component); - {}} />; + { }} />; } function TestProviderContext() { - // Internally in react-redux, null is used initially and overwritten in Provider with store and storeState. - const context = React.createContext(null); + const store: Store = createStore((state = {}) => state); + const nullContext = React.createContext(null); - class ComponentWithOwnContext extends React.Component { - static contextType = context; - } + // To ensure type safety when consuming the context in an app, a null-context does not suffice. + ; // $ExpectError - - ; - ; + // Providing a an object of the correct type ensures type safety when consuming the context. + const initialContextValue: ReactReduxContextObject = { storeState: null, store }; + const context = React.createContext(initialContextValue); + ; + + // react-redux exports a default context used internally if none is supplied, used as shown below. class ComponentWithDefaultContext extends React.Component { static contextType = ReactReduxContext; } @@ -1231,5 +1233,6 @@ function TestProviderContext() { ; + // Null is not a valid value for the context. ; // $ExpectError } From 1ce633c3083281d001498478f8fb5f1c40b1b077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Bruus=20Frank?= Date: Fri, 21 Dec 2018 10:06:58 +0100 Subject: [PATCH 021/160] Bumped version to 7.0. --- types/react-redux/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-redux/index.d.ts b/types/react-redux/index.d.ts index 352c72d7a7..fc06356465 100644 --- a/types/react-redux/index.d.ts +++ b/types/react-redux/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-redux 6.0 +// Type definitions for react-redux 7.0 // Project: https://github.com/reduxjs/react-redux // Definitions by: Qubo , // Kenzie Togami , From d710b22e3094588089d84572297796cf43c9f298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Bruus=20Frank?= Date: Fri, 21 Dec 2018 10:18:45 +0100 Subject: [PATCH 022/160] Removed explicit default type parameter. --- types/react-redux/react-redux-tests.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-redux/react-redux-tests.tsx b/types/react-redux/react-redux-tests.tsx index e7c7bca3ce..017ba61d30 100644 --- a/types/react-redux/react-redux-tests.tsx +++ b/types/react-redux/react-redux-tests.tsx @@ -1212,7 +1212,7 @@ function TestLibraryManagedAttributes() { } function TestProviderContext() { - const store: Store = createStore((state = {}) => state); + const store: Store = createStore((state = {}) => state); const nullContext = React.createContext(null); // To ensure type safety when consuming the context in an app, a null-context does not suffice. From 9a1e55c1e889fb7fae8caf86830a05ad8a630047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Bruus=20Frank?= Date: Fri, 21 Dec 2018 12:04:25 +0100 Subject: [PATCH 023/160] Reverted autoformatting. --- types/react-redux/index.d.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/types/react-redux/index.d.ts b/types/react-redux/index.d.ts index fc06356465..408ef1ad9a 100644 --- a/types/react-redux/index.d.ts +++ b/types/react-redux/index.d.ts @@ -67,10 +67,10 @@ export type AdvancedComponentDecorator = */ export type Matching = { [P in keyof DecorationTargetProps]: P extends keyof InjectedProps - ? InjectedProps[P] extends DecorationTargetProps[P] - ? DecorationTargetProps[P] - : InjectedProps[P] - : DecorationTargetProps[P]; + ? InjectedProps[P] extends DecorationTargetProps[P] + ? DecorationTargetProps[P] + : InjectedProps[P] + : DecorationTargetProps[P]; }; /** @@ -115,22 +115,22 @@ export type InferableComponentEnhancer = export type InferThunkActionCreatorType any> = TActionCreator extends (...args: infer TParams) => (...args: any[]) => infer TReturn - ? (...args: TParams) => TReturn - : TActionCreator; + ? (...args: TParams) => TReturn + : TActionCreator; export type HandleThunkActionCreator = TActionCreator extends (...args: any[]) => any - ? InferThunkActionCreatorType - : TActionCreator; + ? InferThunkActionCreatorType + : TActionCreator; // redux-thunk middleware returns thunk's return value from dispatch call // https://github.com/reduxjs/redux-thunk#composition export type ResolveThunks = TDispatchProps extends { [key: string]: any } - ? { - [C in keyof TDispatchProps]: HandleThunkActionCreator - } - : TDispatchProps; + ? { + [C in keyof TDispatchProps]: HandleThunkActionCreator + } + : TDispatchProps; /** * Connects a React component to a Redux store. From 85b12f89297674c6a1768959da6a97c3486c808d Mon Sep 17 00:00:00 2001 From: Hugues Stefanski Date: Thu, 3 Jan 2019 15:27:26 +0100 Subject: [PATCH 024/160] d3-geo : added geoEqualEarth and geoEqualEarthRaw Updated version number to 1.11.3 --- types/d3-geo/d3-geo-tests.ts | 2 ++ types/d3-geo/index.d.ts | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/types/d3-geo/d3-geo-tests.ts b/types/d3-geo/d3-geo-tests.ts index 6e824e8e69..36c4debbe3 100644 --- a/types/d3-geo/d3-geo-tests.ts +++ b/types/d3-geo/d3-geo-tests.ts @@ -371,6 +371,7 @@ const gnomonicRaw: d3Geo.GeoRawProjection = d3Geo.geoGnomonicRaw(); const mercatorRaw: d3Geo.GeoRawProjection = d3Geo.geoMercatorRaw(); const orthographicRaw: d3Geo.GeoRawProjection = d3Geo.geoOrthographicRaw(); const stereographicRaw: d3Geo.GeoRawProjection = d3Geo.geoStereographicRaw(); +const equalEarthRaw: d3Geo.GeoRawProjection = d3Geo.geoEqualEarthRaw(); const transverseMercatorRaw: d3Geo.GeoRawProjection = d3Geo.geoTransverseMercatorRaw(); const naturalEarth1Raw: d3Geo.GeoRawProjection = d3Geo.geoNaturalEarth1Raw(); @@ -398,6 +399,7 @@ const gnomonic: d3Geo.GeoProjection = d3Geo.geoGnomonic(); const mercator: d3Geo.GeoProjection = d3Geo.geoMercator(); const orthographic: d3Geo.GeoProjection = d3Geo.geoOrthographic(); const stereographic: d3Geo.GeoProjection = d3Geo.geoStereographic(); +const equalEarth: d3Geo.GeoProjection = d3Geo.geoEqualEarth(); const transverseMercator: d3Geo.GeoProjection = d3Geo.geoTransverseMercator(); const naturalEarth1: d3Geo.GeoProjection = d3Geo.geoNaturalEarth1(); diff --git a/types/d3-geo/index.d.ts b/types/d3-geo/index.d.ts index 8f22503d71..16c51dfae6 100644 --- a/types/d3-geo/index.d.ts +++ b/types/d3-geo/index.d.ts @@ -1,10 +1,10 @@ -// Type definitions for D3JS d3-geo module 1.10 +// Type definitions for D3JS d3-geo module 1.11 // Project: https://github.com/d3/d3-geo/ // Definitions by: Hugues Stefanski , Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -// Last module patch version validated against: 1.10.0 +// Last module patch version validated against: 1.11.3 import * as GeoJSON from 'geojson'; @@ -1345,11 +1345,22 @@ export function geoOrthographicRaw(): GeoRawProjection; * The stereographic projection. */ export function geoStereographic(): GeoProjection; + /** * The raw stereographic projection. */ export function geoStereographicRaw(): GeoRawProjection; +/** + * The Equal Eartch projection, by Bojan Šavrič et al., 2018. + */ +export function geoEqualEarth(): GeoProjection; + +/** + * The raw Equal Earth projection, by Bojan Šavrič et al., 2018. + */ +export function geoEqualEarthRaw(): GeoRawProjection; + // Composite Projections --------------------------------------------------- /** From 7fac46a11656933abba29e4b7e7e7f54648d1abf Mon Sep 17 00:00:00 2001 From: Hugues Stefanski Date: Thu, 3 Jan 2019 15:38:59 +0100 Subject: [PATCH 025/160] d3 : Updated global bundle version --- types/d3/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/d3/index.d.ts b/types/d3/index.d.ts index 43c264f280..9b62c1e025 100644 --- a/types/d3/index.d.ts +++ b/types/d3/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for D3JS d3 standard bundle 5.5 +// Type definitions for D3JS d3 standard bundle 5.7 // Project: https://github.com/d3/d3 // Definitions by: Tom Wanzek // Alex Ford @@ -7,7 +7,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -// Last module patch version validated against: 5.5.0 +// Last module patch version validated against: 5.7.0 // NOTE TO MAINTAINERS: Review D3 v4.x module dependencies (see v4 sub-folder) and update its path-mappings in tsconfig (v4 folder), // if new MAJOR version of D3 v4 modules are released!!! From 557311808b61a27857db6aa9a77859f33ccda84b Mon Sep 17 00:00:00 2001 From: Eric Chmielewski Date: Thu, 3 Jan 2019 14:13:08 -0500 Subject: [PATCH 026/160] [react-bootstrap-table] Correct TableHeaderColumnProps.autovalue to be TableHeaderColumnProps.autoValue --- types/react-bootstrap-table/index.d.ts | 2 +- types/react-bootstrap-table/react-bootstrap-table-tests.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/types/react-bootstrap-table/index.d.ts b/types/react-bootstrap-table/index.d.ts index 1284162778..226bdf1606 100644 --- a/types/react-bootstrap-table/index.d.ts +++ b/types/react-bootstrap-table/index.d.ts @@ -1291,7 +1291,7 @@ export interface TableHeaderColumnProps extends Props { * generated automatically after a row insertion. If a function given, you can customize the value by yourself and * remember to return the value for the cell from the function. */ - autovalue?: boolean | (() => any); + autoValue?: boolean | (() => any); /** * False to disable search functionality on column, default is true. */ diff --git a/types/react-bootstrap-table/react-bootstrap-table-tests.tsx b/types/react-bootstrap-table/react-bootstrap-table-tests.tsx index 39422f2152..e742e41145 100644 --- a/types/react-bootstrap-table/react-bootstrap-table-tests.tsx +++ b/types/react-bootstrap-table/react-bootstrap-table-tests.tsx @@ -1222,7 +1222,7 @@ class HideOnInsertTable extends React.Component { }; return ( - Job ID + Job ID Job Name Job Type Active From 5c8bc25ecaf949bbcc9c4ea4d99cdfd2d8a25824 Mon Sep 17 00:00:00 2001 From: Philip Peitsch Date: Fri, 4 Jan 2019 15:36:30 +1100 Subject: [PATCH 027/160] Update cordova-plugin-ble-central to 1.2.2 (latest) Types were found via direct code inspection of plugin. --- .../cordova-plugin-ble-central-tests.ts | 16 ++-- types/cordova-plugin-ble-central/index.d.ts | 89 +++++++++++++------ 2 files changed, 72 insertions(+), 33 deletions(-) diff --git a/types/cordova-plugin-ble-central/cordova-plugin-ble-central-tests.ts b/types/cordova-plugin-ble-central/cordova-plugin-ble-central-tests.ts index 6e4317ac9d..41bcf59865 100644 --- a/types/cordova-plugin-ble-central/cordova-plugin-ble-central-tests.ts +++ b/types/cordova-plugin-ble-central/cordova-plugin-ble-central-tests.ts @@ -62,10 +62,10 @@ var demoExtendedData : BLECentralPlugin.PeripheralDataExtended = { //get updates about the bluethooth states ble.startStateNotifications((state) => log(`BLE state ${state}`)); -ble.isEnabled(()=> log(`bluetooth is enabled`), ()=>log(`bluetooth is not enabled`)); +ble.isEnabled(()=> log(`bluetooth is enabled`), err =>log(`bluetooth is not enabled: ${err}`)); //here we try to enable bluetooth -ble.enable(() => log(`yes it worked, or it was already enabled `), () => log(`nope it didn't work, the user pressed cancel, or we are in iOS`)); +ble.enable(() => log(`yes it worked, or it was already enabled `), err => log(`nope it didn't work, the user pressed cancel, or we are in iOS: ${err}`)); ble.showBluetoothSettings(() => log(`yes it worked`), () => log(`nope it didn't work`)) @@ -73,13 +73,14 @@ ble.showBluetoothSettings(() => log(`yes it worked`), () => log(`nope it didn't ble.stopStateNotifications() //scan 5 seconds -ble.scan([], 5000, (data) => { devices.push(data); }, ()=> log('couldn\'t connect') ); +ble.scan([], 5000, (data) => { devices.push(data); }, () => log(`couldn't connect`) ); +ble.scan([], 5000, (data) => { devices.push(data); }, err => log(`couldn't connect: ${err}`) ); //scan continously ble.startScan([], (data) => { devices.push(data); }, ()=> log('couldn\'t connect') ) ////scan continously -ble.startScanWithOptions([], {reportDuplicates:false }, (data) => { devices.push(data); }, ()=> log('couldn\'t connect') ) +ble.startScanWithOptions([], {reportDuplicates:false }, (data) => { devices.push(data); }, err => log(`couldn't connect: ${err}`) ) //stop scanning ble.stopScan(()=> log('all good'), ()=> log('couldn\'t stop scanning')); @@ -89,18 +90,19 @@ ble.isConnected(demoDevice.id, () => log(`already connected to this device`), () //connect to a specific device var extendedData : BLECentralPlugin.PeripheralDataExtended; -ble.connect(demoDevice.id, (data)=> extendedData = data, () => log(`couldn't connect to the device`) ); +ble.connect(demoDevice.id, (data)=> extendedData = data, err => log(`couldn't connect to the device: ${err}`) ); //read some data from a characteristic var charsOfOneOfItsServices = demoExtendedData.characteristics.filter((value) => value.service == demoExtendedData.services[0]); ble.read(demoDevice.id, charsOfOneOfItsServices[0].service, charsOfOneOfItsServices[0].characteristic, (data) => log(`we've received some data`), ()=> log(`couldn't read any data`)); //read the rssi -ble.readRSSI(demoDevice.id, (rssi)=>log(`Device ${demoDevice.name} has an RSSI of ${rssi}`)); +ble.readRSSI(demoDevice.id, (rssi)=>log(`Device ${demoDevice.name} has an RSSI of ${rssi}`), err => log(`Unable to read RSSI: ${err}`)); var notificationsReceived : number = 0; //get notified of changes for that characteristic -ble.startNotification(demoDevice.id, charsOfOneOfItsServices[0].service, charsOfOneOfItsServices[0].characteristic, (data)=> notificationsReceived++, ()=> log(`darn`)); +ble.startNotification(demoDevice.id, charsOfOneOfItsServices[0].service, charsOfOneOfItsServices[0].characteristic, + (data)=> notificationsReceived++, err => log(`darn: ${err}`)); //write some data ble.write(demoDevice.id, charsOfOneOfItsServices[0].service, charsOfOneOfItsServices[0].characteristic, new ArrayBuffer(40), ()=> log(`all good`), ()=> log(`could't write`)); diff --git a/types/cordova-plugin-ble-central/index.d.ts b/types/cordova-plugin-ble-central/index.d.ts index ccf2396833..0beb5d25e5 100644 --- a/types/cordova-plugin-ble-central/index.d.ts +++ b/types/cordova-plugin-ble-central/index.d.ts @@ -1,12 +1,13 @@ -// Type definitions for cordova-plugin-ble-central 1.1.2 +// Type definitions for cordova-plugin-ble-central 1.2.2 // Project: https://github.com/don/cordova-plugin-ble-central // Definitions by: Gidon Junge +// Philip Peitsch // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace BLECentralPlugin { - interface PeripheralCharacteristic { + interface PeripheralCharacteristic { service: string; characteristic: string; properties: string[]; @@ -26,7 +27,12 @@ declare namespace BLECentralPlugin { characteristics: PeripheralCharacteristic[] } - + + interface BLEError { + name: string; + id: string; + errorMessage: string; + } interface StartScanOptions { @@ -35,74 +41,105 @@ declare namespace BLECentralPlugin { export interface BLECentralPluginStatic { scan(services: string[], seconds: number, success : (data: PeripheralData) => any): void; - scan(services: string[], seconds: number, success : (data: PeripheralData) => any, failure : () => any): void; - + scan(services: string[], seconds: number, success : (data: PeripheralData) => any, failure : (error: string) => any): void; + startScan(services: string[], success: (data: PeripheralData) => any): void; - startScan(services: string[], success: (data: PeripheralData) => any, failure: () => any): void; + startScan(services: string[], success: (data: PeripheralData) => any, failure: (error: string|BLEError) => any): void; startScanWithOptions(services: string[], options: StartScanOptions, success: (data: PeripheralData) => any): void; - startScanWithOptions(services: string[], options: StartScanOptions, success: (data: PeripheralData) => any, failure: () => any): void; + startScanWithOptions(services: string[], options: StartScanOptions, success: (data: PeripheralData) => any, failure: (error: string) => any): void; stopScan(): void; stopScan(success: () => any): void; stopScan(success: () => any, failure: () => any): void; - - connect(device_id:string, success: (data: PeripheralDataExtended) => any, failure: () => any): void; + + connect(device_id:string, success: (data: PeripheralDataExtended) => any, failure: (error: string|BLEError) => any): void; + + /* Automatically connect to a device when it is in range of the phone + [iOS] background notifications on ios must be enabled if you want to run in the background + [Android] this relies on the autoConnect argument of BluetoothDevice.connectGatt(). Not all Android devices implement this feature correctly. */ + autoConnect(device_id:string, success: (data: PeripheralDataExtended) => any, failure: (error: string|BLEError) => any): void; disconnect(device_id:string): void; disconnect(device_id:string, success: () => any): void; - disconnect(device_id:string, success: () => any, failure: () => any): void; + disconnect(device_id:string, success: () => any, failure: (error: string|BLEError) => any): void; read(device_id: string, service_uuid:string, characteristic_uuid:string): void; read(device_id: string, service_uuid:string, characteristic_uuid:string, success: (rawData: ArrayBuffer) => any): void; - read(device_id: string, service_uuid:string, characteristic_uuid:string, success: (rawData: ArrayBuffer) => any, failure: () => any): void; + read(device_id: string, service_uuid:string, characteristic_uuid:string, success: (rawData: ArrayBuffer) => any, failure: (error: string|BLEError) => any): void; write(device_id: string, service_uuid:string, characteristic_uuid:string, data: ArrayBuffer): void; write(device_id: string, service_uuid:string, characteristic_uuid:string, data: ArrayBuffer, success : () => any): void; - write(device_id: string, service_uuid:string, characteristic_uuid:string, data: ArrayBuffer, success : () => any, failure: () => any): void; + write(device_id: string, service_uuid:string, characteristic_uuid:string, data: ArrayBuffer, success : () => any, failure: (error: string|BLEError) => any): void; - /* Writes data to a characteristic without a response from the peripheral. You are not notified if the write fails in the BLE stack. + /* Writes data to a characteristic without a response from the peripheral. You are not notified if the write fails in the BLE stack. The success callback is be called when the characteristic is written.*/ writeWithoutResponse(device_id: string, service_uuid:string, characteristic_uuid:string, data: ArrayBuffer): void; writeWithoutResponse(device_id: string, service_uuid:string, characteristic_uuid:string, data: ArrayBuffer, success : () => any): void; - writeWithoutResponse(device_id: string, service_uuid:string, characteristic_uuid:string, data: ArrayBuffer, success : () => any, failure: () => any): void; + writeWithoutResponse(device_id: string, service_uuid:string, characteristic_uuid:string, data: ArrayBuffer, success : () => any, failure: (error: string) => any): void; /* Register to be notified when the value of a characteristic changes. */ startNotification(device_id: string, service_uuid:string, characteristic_uuid:string, success: (rawData: ArrayBuffer) => any): void; - startNotification(device_id: string, service_uuid:string, characteristic_uuid:string, success: (rawData: ArrayBuffer) => any, failure: () => any): void; - + startNotification(device_id: string, service_uuid:string, characteristic_uuid:string, success: (rawData: ArrayBuffer) => any, failure: (error: string|BLEError) => any): void; + stopNotification(device_id: string, service_uuid:string, characteristic_uuid:string): void; stopNotification(device_id: string, service_uuid:string, characteristic_uuid:string, success: () => any): void; - stopNotification(device_id: string, service_uuid:string, characteristic_uuid:string, success: () => any, failure: () => any): void; + stopNotification(device_id: string, service_uuid:string, characteristic_uuid:string, success: () => any, failure: (error: string|BLEError) => any): void; /* Reports if bluetooth is enabled. */ - isEnabled(success: () => any , failure: () => any): void; + isEnabled(success: () => any , failure: (error: string) => any): void; /* Calls the success callback when the peripheral is connected and the failure callback when not connected. */ isConnected(device_id: string, success: () => any): void; - isConnected(device_id: string, success: () => any, failure: () => any): void; + isConnected(device_id: string, success: () => any, failure: (error: string) => any): void; + + /* May be used to request (on Android) a larger MTU size to be able to send more data at once + [iOS] requestMtu is not supported on iOS. */ + requestMtu(device_id: string, mtu: number): void; + requestMtu(device_id: string, mtu: number, success: () => any): void; + requestMtu(device_id: string, mtu: number, success: () => any, failure: () => any): void; + + /* Clears cached services and characteristics info for some poorly behaved devices. Uses an undocumented API, + so it is not guaranteed to work. + [iOS] refreshDeviceCache is not supported on iOS. */ + refreshDeviceCache(device_id: string, timeout_millis: number): void; + refreshDeviceCache(device_id: string, timeout_millis: number, success: (data: PeripheralDataExtended) => any): void; + refreshDeviceCache(device_id: string, timeout_millis: number, success: (data: PeripheralDataExtended) => any, failure: (error: string|BLEError) => any): void; startStateNotifications(success: (state: string) => any): void; - startStateNotifications(success: (state: string) => any, failure: () => any): void; + startStateNotifications(success: (state: string) => any, failure: (error: string) => any): void; stopStateNotifications(): void; stopStateNotifications(success: () => any): void; stopStateNotifications(success: () => any, failure: () => any): void; - + /* Opens the Bluetooth settings for the operating systems. [iOS] showBluetoothSettings is not supported on iOS. */ showBluetoothSettings(): void; showBluetoothSettings(success: () => any): void; showBluetoothSettings(success: () => any, failure: () => any): void; - + /* Enable Bluetooth on the device. [iOS] enable is not supported on iOS. */ - enable(success: () => any, failure: () => any): void; - + enable(success: () => any, failure: (error: string) => any): void; readRSSI(device_id:string, success: (rssi: number) => any): void; - readRSSI(device_id:string, success: (rssi: number) => any, failure: () => any): void; + readRSSI(device_id:string, success: (rssi: number) => any, failure: (error: string) => any): void; + + /* Find connected peripherals offering the listed service UUIDs. + This function wraps CBCentralManager.retrieveConnectedPeripheralsWithServices. + [Android] peripheralsWithIdentifiers is not supported on Android. */ + connectedPeripheralsWithServices(services: string[], success: (data: PeripheralData[]) => any, failure: () => any): void; + + /* Find known (but not necessarily connected) peripherals offering the listed service UUIDs. + This function wraps CBCentralManager.retrievePeripheralsWithIdentifiers + [Android] peripheralsWithIdentifiers is not supported on Android. */ + peripheralsWithIdentifiers(services: string[], success: (data: PeripheralData[]) => any, failure: () => any): void; + + /* Find the bonded devices. + [iOS] bondedDevices is not supported on iOS. */ + bondedDevices(success: (data: PeripheralData[]) => any, failure: () => any): void; } } -declare var ble: BLECentralPlugin.BLECentralPluginStatic; \ No newline at end of file +declare var ble: BLECentralPlugin.BLECentralPluginStatic; From 511c202dce506ae593082c8295005df075180d26 Mon Sep 17 00:00:00 2001 From: Terry Mun Date: Fri, 4 Jan 2019 20:59:58 +0100 Subject: [PATCH 028/160] Exporting the Snap.set() function, added new tests --- types/snapsvg/index.d.ts | 6 ++- types/snapsvg/test/4.ts | 92 +++++++++++++++++++++++++++++++++++++ types/snapsvg/tsconfig.json | 3 +- 3 files changed, 99 insertions(+), 2 deletions(-) create mode 100644 types/snapsvg/test/4.ts diff --git a/types/snapsvg/index.d.ts b/types/snapsvg/index.d.ts index 85f1eda7b8..8c2e22ce73 100644 --- a/types/snapsvg/index.d.ts +++ b/types/snapsvg/index.d.ts @@ -1,6 +1,9 @@ // Type definitions for Snap-SVG 0.4.1 // Project: https://github.com/adobe-webplatform/Snap.svg -// Definitions by: Lars Klein , Mattanja Kern , Andrey Kurdyumov +// Definitions by: Lars Klein , +// Mattanja Kern , +// Andrey Kurdyumov , +// Terry Mun // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -31,6 +34,7 @@ declare namespace Snap { export function plugin(f:Function):void; export function select(query:string):Snap.Element; export function selectAll(query:string):any; + export function set(...args:Snap.Element[]): Snap.Set; export function snapTo(values:Array|number,value:number,tolerance?:number):number; export function animate(from:number|number[],to:number|number[],updater:(n:number)=>void,duration:number,easing?:(num:number)=>number,callback?:()=>void):mina.MinaAnimation; diff --git a/types/snapsvg/test/4.ts b/types/snapsvg/test/4.ts new file mode 100644 index 0000000000..fe15e6110f --- /dev/null +++ b/types/snapsvg/test/4.ts @@ -0,0 +1,92 @@ +// Tests by Terry Mun +// Checks that Snap.set() is properly typed + +const s = Snap(200, 500); +s.attr({ + viewBox: '0 0 200 500' +}); + +// Create multiple elements to be added to set +const rect1 = s.rect(0,0,50,50); +const rect2 = s.rect(0,100,50,50); +const rect3 = s.rect(0,200,50,50); +const rect4 = s.rect(0,300,50,50); +let rect5 = null; + +// Create new set +const rectSet = Snap.set(rect1, rect2); + +// Add missing rectangles to set +rectSet.push(rect3, rect4); + +// Set all attributes +rectSet.attr({ fill: 'steelblue' }); + +// Animate all elements in set +function animateTest() { + return new Promise(resolve => { + rectSet.animate({ x: 50 }, 500, mina.bounce, resolve); + }); +} + +// Animate elements individually +function forEachTest() { + const colors = ['red', 'green', 'blue']; + return new Promise(resolve => { + rectSet.forEach((element, idx) => element.attr({ fill: colors[idx] || '#aaa' })); + resolve(); + }); +} + +// Exclude rect4 from set +function excludeTest() { + return new Promise(resolve => { + rectSet.exclude(rect4); + rectSet.animate({ x: 100 }, 500, mina.bounce, resolve); + }); +} + +// Remove rect2 from set (it has index of 1) +// Add new rect5 to set +async function spliceTest() { + rectSet.splice(1, 1); + rectSet.attr({ fill: '#000' }); + + rect5 = s.rect(100, 400, 50, 50); + rectSet.splice(1, 0, rect5); + return; +} + +// Clear set. Rectangles should not go back to x=0 +function clearTest() { + return new Promise(resolve => { + rectSet.clear(); + + // SHOULD NOT WORK + rectSet.animate({ x: 0 }, 500, mina.bounce, resolve); + + // Re-add rects to set + rectSet.push(rect1, rect2, rect3, rect4, rect5); + resolve(); + }); +} + +// Remove all elements from DOM that are present in set +async function removeTest() { + rectSet.remove(); + return; +} + +// Start test +async function startTest() { + await animateTest(); + await forEachTest(); + await excludeTest(); + await spliceTest(); + await clearTest(); + await removeTest(); + + return; +} + +startTest(); \ No newline at end of file diff --git a/types/snapsvg/tsconfig.json b/types/snapsvg/tsconfig.json index 7ee69cd259..23101593c7 100644 --- a/types/snapsvg/tsconfig.json +++ b/types/snapsvg/tsconfig.json @@ -21,6 +21,7 @@ "index.d.ts", "test/1.ts", "test/2.ts", - "test/3.ts" + "test/3.ts", + "test/4.ts" ] } \ No newline at end of file From e7f993ee3e429253b381d1a51c849ce6e4bc3cdc Mon Sep 17 00:00:00 2001 From: Terry Mun Date: Fri, 4 Jan 2019 21:08:00 +0100 Subject: [PATCH 029/160] Updated SnapSVG version to 0.5.1 --- types/snapsvg/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/snapsvg/index.d.ts b/types/snapsvg/index.d.ts index 8c2e22ce73..7a05c8d0bc 100644 --- a/types/snapsvg/index.d.ts +++ b/types/snapsvg/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Snap-SVG 0.4.1 +// Type definitions for Snap-SVG 0.5.1 // Project: https://github.com/adobe-webplatform/Snap.svg // Definitions by: Lars Klein , // Mattanja Kern , From b40e204bbf8ef4bb74e6fd482e835f85315ec19c Mon Sep 17 00:00:00 2001 From: Terry Mun Date: Fri, 4 Jan 2019 21:31:10 +0100 Subject: [PATCH 030/160] Further updated `Snap.set()` typings, fixed issues with scoping in test file --- types/snapsvg/index.d.ts | 12 +-- types/snapsvg/test/4.ts | 160 ++++++++++++++++++++------------------- 2 files changed, 87 insertions(+), 85 deletions(-) diff --git a/types/snapsvg/index.d.ts b/types/snapsvg/index.d.ts index 7a05c8d0bc..0931ceda65 100644 --- a/types/snapsvg/index.d.ts +++ b/types/snapsvg/index.d.ts @@ -303,9 +303,9 @@ declare namespace Snap { } export interface Set { - animate(attrs:{[attr:string]:string|number|boolean|any},duration:number,easing?:(num:number)=>number,callback?:()=>void):Snap.Element; - animate(...params:Array<{attrs:any,duration:number,easing:(num:number)=>number,callback?:()=>void}>):Snap.Element; - attr(params: {[attr:string]:string|number|boolean|BBox|any}): Snap.Element; + animate(attrs:{[attr:string]:string|number|boolean|any},duration:number,easing?:(num:number)=>number,callback?:()=>void):Snap.Set; + animate(...params:Array<{attrs:any,duration:number,easing:(num:number)=>number,callback?:()=>void}>):Snap.Set; + attr(params: {[attr:string]:string|number|boolean|BBox|any}): Snap.Set; attr(param: "viewBox"): BBox; attr(param: string): string; bind(attr: string, callback: Function): Snap.Set; @@ -315,10 +315,10 @@ declare namespace Snap { exclude(element:Snap.Element):boolean; forEach(callback:Function,thisArg?:Object):Snap.Set; pop():Snap.Element; - push(el:Snap.Element):Snap.Element; - push(els:Snap.Element[]):Snap.Element; + push(el:Snap.Element):Snap.Set; + push(...els:Snap.element[]):Snap.Set; remove(): Snap.Set; - splice(index:number,count:number,insertion?:Object[]):Snap.Element[]; + splice(index:number,count:number,...insertion:Snap.Element[]):Snap.Set; } interface Filter { diff --git a/types/snapsvg/test/4.ts b/types/snapsvg/test/4.ts index fe15e6110f..6e7e0728f2 100644 --- a/types/snapsvg/test/4.ts +++ b/types/snapsvg/test/4.ts @@ -1,92 +1,94 @@ -// Tests by Terry Mun -// Checks that Snap.set() is properly typed +(() => { + // Tests by Terry Mun + // Checks that Snap.set() is properly typed -const s = Snap(200, 500); -s.attr({ - viewBox: '0 0 200 500' -}); + const s = Snap(200, 500); + s.attr({ + viewBox: '0 0 200 500' + }); -// Create multiple elements to be added to set -const rect1 = s.rect(0,0,50,50); -const rect2 = s.rect(0,100,50,50); -const rect3 = s.rect(0,200,50,50); -const rect4 = s.rect(0,300,50,50); -let rect5 = null; + // Create multiple elements to be added to set + const rect1 = s.rect(0,0,50,50); + const rect2 = s.rect(0,100,50,50); + const rect3 = s.rect(0,200,50,50); + const rect4 = s.rect(0,300,50,50); + let rect5: Snap.Element; -// Create new set -const rectSet = Snap.set(rect1, rect2); + // Create new set + const rectSet = Snap.set(rect1, rect2); -// Add missing rectangles to set -rectSet.push(rect3, rect4); + // Add missing rectangles to set + rectSet.push(rect3, rect4); -// Set all attributes -rectSet.attr({ fill: 'steelblue' }); + // Set all attributes + rectSet.attr({ fill: 'steelblue' }); -// Animate all elements in set -function animateTest() { - return new Promise(resolve => { - rectSet.animate({ x: 50 }, 500, mina.bounce, resolve); - }); -} + // Animate all elements in set + function animateTest() { + return new Promise(resolve => { + rectSet.animate({ x: 50 }, 500, mina.bounce, resolve); + }); + } -// Animate elements individually -function forEachTest() { - const colors = ['red', 'green', 'blue']; - return new Promise(resolve => { - rectSet.forEach((element, idx) => element.attr({ fill: colors[idx] || '#aaa' })); - resolve(); - }); -} + // Animate elements individually + function forEachTest() { + const colors = ['red', 'green', 'blue']; + return new Promise(resolve => { + rectSet.forEach((element, idx) => element.attr({ fill: colors[idx] || '#aaa' })); + resolve(); + }); + } -// Exclude rect4 from set -function excludeTest() { - return new Promise(resolve => { - rectSet.exclude(rect4); - rectSet.animate({ x: 100 }, 500, mina.bounce, resolve); - }); -} + // Exclude rect4 from set + function excludeTest() { + return new Promise(resolve => { + rectSet.exclude(rect4); + rectSet.animate({ x: 100 }, 500, mina.bounce, resolve); + }); + } -// Remove rect2 from set (it has index of 1) -// Add new rect5 to set -async function spliceTest() { - rectSet.splice(1, 1); - rectSet.attr({ fill: '#000' }); - - rect5 = s.rect(100, 400, 50, 50); - rectSet.splice(1, 0, rect5); - return; -} + // Remove rect2 from set (it has index of 1) + // Add new rect5 to set + async function spliceTest() { + rectSet.splice(1, 1); + rectSet.attr({ fill: '#000' }); + + rect5 = s.rect(100, 400, 50, 50); + rectSet.splice(1, 0, rect5); + return; + } -// Clear set. Rectangles should not go back to x=0 -function clearTest() { - return new Promise(resolve => { - rectSet.clear(); - - // SHOULD NOT WORK - rectSet.animate({ x: 0 }, 500, mina.bounce, resolve); - - // Re-add rects to set - rectSet.push(rect1, rect2, rect3, rect4, rect5); - resolve(); - }); -} + // Clear set. Rectangles should not go back to x=0 + function clearTest() { + return new Promise(resolve => { + rectSet.clear(); + + // SHOULD NOT WORK + rectSet.animate({ x: 0 }, 500, mina.bounce, resolve); + + // Re-add rects to set + rectSet.push(rect1, rect2, rect3, rect4, rect5); + resolve(); + }); + } -// Remove all elements from DOM that are present in set -async function removeTest() { - rectSet.remove(); - return; -} + // Remove all elements from DOM that are present in set + async function removeTest() { + rectSet.remove(); + return; + } -// Start test -async function startTest() { - await animateTest(); - await forEachTest(); - await excludeTest(); - await spliceTest(); - await clearTest(); - await removeTest(); - - return; -} + // Start test + async function startTest() { + await animateTest(); + await forEachTest(); + await excludeTest(); + await spliceTest(); + await clearTest(); + await removeTest(); + + return; + } -startTest(); \ No newline at end of file + startTest(); +})(); \ No newline at end of file From 2ff95235fb829970a733dde7ed516e96ebdd7c4a Mon Sep 17 00:00:00 2001 From: Terry Mun Date: Fri, 4 Jan 2019 21:40:24 +0100 Subject: [PATCH 031/160] Updated typing for callback in `Set.forEach()` --- types/snapsvg/index.d.ts | 4 ++-- types/snapsvg/test/4.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/snapsvg/index.d.ts b/types/snapsvg/index.d.ts index 0931ceda65..05d69b3d57 100644 --- a/types/snapsvg/index.d.ts +++ b/types/snapsvg/index.d.ts @@ -313,10 +313,10 @@ declare namespace Snap { bind(attr:string,element:Snap.Element,eattr:string):Snap.Set; clear():Snap.Set; exclude(element:Snap.Element):boolean; - forEach(callback:Function,thisArg?:Object):Snap.Set; + forEach(callback:(el:Snap.Element,index?:number)=>void|boolean),thisArg?:Object):Snap.Set; pop():Snap.Element; push(el:Snap.Element):Snap.Set; - push(...els:Snap.element[]):Snap.Set; + push(...els:Snap.Element[]):Snap.Set; remove(): Snap.Set; splice(index:number,count:number,...insertion:Snap.Element[]):Snap.Set; } diff --git a/types/snapsvg/test/4.ts b/types/snapsvg/test/4.ts index 6e7e0728f2..01f3747c5e 100644 --- a/types/snapsvg/test/4.ts +++ b/types/snapsvg/test/4.ts @@ -34,7 +34,7 @@ function forEachTest() { const colors = ['red', 'green', 'blue']; return new Promise(resolve => { - rectSet.forEach((element, idx) => element.attr({ fill: colors[idx] || '#aaa' })); + rectSet.forEach((element,idx) => element.attr({ fill: colors[idx] || '#aaa' })); resolve(); }); } From 66cc864a9a8016ddcf3a84b0d040976981362433 Mon Sep 17 00:00:00 2001 From: Terry Mun Date: Fri, 4 Jan 2019 21:45:37 +0100 Subject: [PATCH 032/160] Removed extraenous closing parenthesis --- types/snapsvg/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/snapsvg/index.d.ts b/types/snapsvg/index.d.ts index 05d69b3d57..9080b358df 100644 --- a/types/snapsvg/index.d.ts +++ b/types/snapsvg/index.d.ts @@ -313,7 +313,7 @@ declare namespace Snap { bind(attr:string,element:Snap.Element,eattr:string):Snap.Set; clear():Snap.Set; exclude(element:Snap.Element):boolean; - forEach(callback:(el:Snap.Element,index?:number)=>void|boolean),thisArg?:Object):Snap.Set; + forEach(callback:(el:Snap.Element,index?:number)=>void|boolean,thisArg?:Object):Snap.Set; pop():Snap.Element; push(el:Snap.Element):Snap.Set; push(...els:Snap.Element[]):Snap.Set; From 98c484fd96d6b6e05058d77798775be339ac3cd5 Mon Sep 17 00:00:00 2001 From: Terry Mun Date: Fri, 4 Jan 2019 21:56:12 +0100 Subject: [PATCH 033/160] Added minimum requirement for TS2.1, fixed test --- types/snapsvg/index.d.ts | 1 + types/snapsvg/test/4.ts | 180 +++++++++++++++++++++------------------ 2 files changed, 98 insertions(+), 83 deletions(-) diff --git a/types/snapsvg/index.d.ts b/types/snapsvg/index.d.ts index 9080b358df..0bd6c573ff 100644 --- a/types/snapsvg/index.d.ts +++ b/types/snapsvg/index.d.ts @@ -5,6 +5,7 @@ // Andrey Kurdyumov , // Terry Mun // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 /// export = Snap; diff --git a/types/snapsvg/test/4.ts b/types/snapsvg/test/4.ts index 01f3747c5e..6fcf8a2a95 100644 --- a/types/snapsvg/test/4.ts +++ b/types/snapsvg/test/4.ts @@ -1,94 +1,108 @@ (() => { - // Tests by Terry Mun - // Checks that Snap.set() is properly typed + // Tests by Terry Mun + // Checks that Snap.set() is properly typed - const s = Snap(200, 500); - s.attr({ - viewBox: '0 0 200 500' + const s = Snap(200, 500); + s.attr({ + viewBox: '0 0 200 500' + }); + + // Create multiple elements to be added to set + const rect1 = s.rect(0, 0, 50, 50); + const rect2 = s.rect(0, 100, 50, 50); + const rect3 = s.rect(0, 200, 50, 50); + const rect4 = s.rect(0, 300, 50, 50); + let rect5: Snap.Element; + + // Create new set + const rectSet = Snap.set(rect1, rect2); + + // Add missing rectangles to set + rectSet.push(rect3, rect4); + + // Set all attributes + rectSet.attr({ + fill: 'steelblue' + }); + + // Animate all elements in set + function animateTest() { + return new Promise(resolve => { + rectSet.animate({ + x: 50 + }, 500, mina.bounce, resolve); + }); + } + + // Animate elements individually + function forEachTest() { + const colors = ['red', 'green', 'blue']; + return new Promise(resolve => { + rectSet.forEach((element, idx) => { + element.attr({ + fill: colors[idx] || '#aaa' + }); + }); + resolve(); + }); + } + + // Exclude rect4 from set + function excludeTest() { + return new Promise(resolve => { + rectSet.exclude(rect4); + rectSet.animate({ + x: 100 + }, 500, mina.bounce, resolve); + }); + } + + // Remove rect2 from set (it has index of 1) + // Add new rect5 to set + async function spliceTest() { + rectSet.splice(1, 1); + rectSet.attr({ + fill: '#000' }); - // Create multiple elements to be added to set - const rect1 = s.rect(0,0,50,50); - const rect2 = s.rect(0,100,50,50); - const rect3 = s.rect(0,200,50,50); - const rect4 = s.rect(0,300,50,50); - let rect5: Snap.Element; + rect5 = s.rect(100, 400, 50, 50); + rectSet.splice(1, 0, rect5); + return; + } - // Create new set - const rectSet = Snap.set(rect1, rect2); + // Clear set. Rectangles should not go back to x=0 + function clearTest() { + return new Promise(resolve => { + rectSet.clear(); - // Add missing rectangles to set - rectSet.push(rect3, rect4); + // SHOULD NOT WORK + rectSet.animate({ + x: 0 + }, 500, mina.bounce, resolve); - // Set all attributes - rectSet.attr({ fill: 'steelblue' }); + // Re-add rects to set + rectSet.push(rect1, rect2, rect3, rect4, rect5); + resolve(); + }); + } - // Animate all elements in set - function animateTest() { - return new Promise(resolve => { - rectSet.animate({ x: 50 }, 500, mina.bounce, resolve); - }); - } + // Remove all elements from DOM that are present in set + async function removeTest() { + rectSet.remove(); + return; + } - // Animate elements individually - function forEachTest() { - const colors = ['red', 'green', 'blue']; - return new Promise(resolve => { - rectSet.forEach((element,idx) => element.attr({ fill: colors[idx] || '#aaa' })); - resolve(); - }); - } + // Start test + async function startTest() { + await animateTest(); + await forEachTest(); + await excludeTest(); + await spliceTest(); + await clearTest(); + await removeTest(); - // Exclude rect4 from set - function excludeTest() { - return new Promise(resolve => { - rectSet.exclude(rect4); - rectSet.animate({ x: 100 }, 500, mina.bounce, resolve); - }); - } + return; + } - // Remove rect2 from set (it has index of 1) - // Add new rect5 to set - async function spliceTest() { - rectSet.splice(1, 1); - rectSet.attr({ fill: '#000' }); - - rect5 = s.rect(100, 400, 50, 50); - rectSet.splice(1, 0, rect5); - return; - } - - // Clear set. Rectangles should not go back to x=0 - function clearTest() { - return new Promise(resolve => { - rectSet.clear(); - - // SHOULD NOT WORK - rectSet.animate({ x: 0 }, 500, mina.bounce, resolve); - - // Re-add rects to set - rectSet.push(rect1, rect2, rect3, rect4, rect5); - resolve(); - }); - } - - // Remove all elements from DOM that are present in set - async function removeTest() { - rectSet.remove(); - return; - } - - // Start test - async function startTest() { - await animateTest(); - await forEachTest(); - await excludeTest(); - await spliceTest(); - await clearTest(); - await removeTest(); - - return; - } - - startTest(); -})(); \ No newline at end of file + startTest(); +})(); From c38f3d2767f154dc0f425541e004ce5ada484f7e Mon Sep 17 00:00:00 2001 From: Terry Mun Date: Sat, 5 Jan 2019 12:53:07 +0100 Subject: [PATCH 034/160] Minor spelling changes, whitespace removal, and improvement to Snap.set() API This commit includes ensuring methods exposed by the Set API is typed in a consistent manner as per documentation: * `.attr()` always returns `Snap.set` * `.getBBox()`, `.insertAfter()` is added --- types/snapsvg/index.d.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/types/snapsvg/index.d.ts b/types/snapsvg/index.d.ts index 0bd6c573ff..ca08eb1eff 100644 --- a/types/snapsvg/index.d.ts +++ b/types/snapsvg/index.d.ts @@ -35,7 +35,7 @@ declare namespace Snap { export function plugin(f:Function):void; export function select(query:string):Snap.Element; export function selectAll(query:string):any; - export function set(...args:Snap.Element[]): Snap.Set; + export function set(...els:Snap.Element[]):Snap.Set; export function snapTo(values:Array|number,value:number,tolerance?:number):number; export function animate(from:number|number[],to:number|number[],updater:(n:number)=>void,duration:number,easing?:(num:number)=>number,callback?:()=>void):mina.MinaAnimation; @@ -306,19 +306,21 @@ declare namespace Snap { export interface Set { animate(attrs:{[attr:string]:string|number|boolean|any},duration:number,easing?:(num:number)=>number,callback?:()=>void):Snap.Set; animate(...params:Array<{attrs:any,duration:number,easing:(num:number)=>number,callback?:()=>void}>):Snap.Set; - attr(params: {[attr:string]:string|number|boolean|BBox|any}): Snap.Set; - attr(param: "viewBox"): BBox; - attr(param: string): string; - bind(attr: string, callback: Function): Snap.Set; + attr(params:{[attr:string]:string|number|boolean|BBox|any}):Snap.Set; + attr(param:"viewBox"):Snap.Set; + attr(param:string):Snap.Set; + bind(attr:string,callback:Function):Snap.Set; bind(attr:string,element:Snap.Element):Snap.Set; bind(attr:string,element:Snap.Element,eattr:string):Snap.Set; - clear():Snap.Set; - exclude(element:Snap.Element):boolean; + clear():void; + exclude(el:Snap.Element):boolean; forEach(callback:(el:Snap.Element,index?:number)=>void|boolean,thisArg?:Object):Snap.Set; + getBBox():BBox; + insertAfter():Snap.Set; pop():Snap.Element; push(el:Snap.Element):Snap.Set; push(...els:Snap.Element[]):Snap.Set; - remove(): Snap.Set; + remove():Snap.Set; splice(index:number,count:number,...insertion:Snap.Element[]):Snap.Set; } From 76eda5dc1b4792450ae1a0f5e53e810cf4d1a0d3 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Sat, 5 Jan 2019 11:40:02 -0500 Subject: [PATCH 035/160] Refactor GeoJSON to make Geometry = GeometryObject --- types/geojson/geojson-tests.ts | 28 +++++++++++++++++++++--- types/geojson/index.d.ts | 39 ++++++++++++++++------------------ 2 files changed, 43 insertions(+), 24 deletions(-) diff --git a/types/geojson/geojson-tests.ts b/types/geojson/geojson-tests.ts index 4ea0f57a6f..2cb9fce33f 100644 --- a/types/geojson/geojson-tests.ts +++ b/types/geojson/geojson-tests.ts @@ -1,10 +1,11 @@ import { BBox, - Feature, FeatureCollection, GeometryCollection, LineString, - MultiLineString, MultiPoint, MultiPolygon, Point, Polygon, GeometryObject + Feature, FeatureCollection, Geometry, GeometryCollection, LineString, + MultiLineString, MultiPoint, MultiPolygon, Point, Polygon, GeoJsonGeometryTypes, + GeometryObject, GeoJsonProperties } from "geojson"; -let featureCollection: FeatureCollection = { +let featureCollection: FeatureCollection = { type: "FeatureCollection", features: [ { @@ -53,6 +54,11 @@ let featureCollection: FeatureCollection = { type: "Feature", bbox: [-180.0, -90.0, 180.0, 90.0], @@ -65,6 +71,11 @@ const featureWithPolygon: Feature = { properties: null }; +featureWithPolygon.type; // $ExpectType "Feature" +featureWithPolygon.geometry; // $ExpectType Polygon +featureWithPolygon.geometry.type; // $ExpectType "Polygon" +featureWithPolygon.geometry.coordinates; // $ExpectType number[][][] + const point: Point = { type: "Point", coordinates: [100.0, 0.0] @@ -135,6 +146,8 @@ let feature: Feature = { properties: null }; +feature.properties; // $ExpectType GeoJsonProperties + feature = { type: "Feature", geometry: polygon, @@ -275,12 +288,16 @@ const featureGeometryNull: Feature = { geometry: null }; +featureGeometryNull.properties.foo; // $ExpectType "bar" | "baz" + const featureNoNull: Feature = { type: "Feature", properties: testProps, geometry: point }; +featureNoNull.geometry.type; // $ExpectType "Point" + const collectionAllNull: FeatureCollection = { type: "FeatureCollection", features: [featureAllNull], @@ -301,6 +318,8 @@ const collectionGeometryMaybeNull: FeatureCollection features: [featureGeometryNull, featureNoNull], }; +collectionGeometryMaybeNull.features[0].geometry; // $ExpectType Point | null + const collectionNoNull: FeatureCollection = { type: "FeatureCollection", features: [featureNoNull], @@ -311,6 +330,9 @@ const collectionDefault: FeatureCollection = { features: [] }; +collectionDefault.features[0].geometry; // $ExpectType Geometry +collectionDefault.features[0].properties!.foo; // $ExpectType any + isNull = featureAllNull.geometry; isPoint = featurePropertyNull.geometry; isNull = featureAllNull.properties; diff --git a/types/geojson/index.d.ts b/types/geojson/index.d.ts index 93f66d3f27..db8074e242 100644 --- a/types/geojson/index.d.ts +++ b/types/geojson/index.d.ts @@ -4,6 +4,7 @@ // Arne Schubert // Jeff Jacobson // Ilia Choly +// Dan Vanderkam // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -16,14 +17,13 @@ export as namespace GeoJSON; * The valid values for the "type" property of GeoJSON geometry objects. * https://tools.ietf.org/html/rfc7946#section-1.4 */ -export type GeoJsonGeometryTypes = "Point" | "LineString" | "MultiPoint" | "Polygon" | "MultiLineString" | - "MultiPolygon" | "GeometryCollection"; +export type GeoJsonGeometryTypes = Geometry['type']; /** * The value values for the "type" property of GeoJSON Objects. * https://tools.ietf.org/html/rfc7946#section-1.4 */ -export type GeoJsonTypes = "FeatureCollection" | "Feature" | GeoJsonGeometryTypes; +export type GeoJsonTypes = GeoJSON['type']; /** * Bounding box @@ -58,6 +58,10 @@ export interface GeoJsonObject { type: GeoJsonTypes; /** * Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections. + * The value of the bbox member is an array of length 2*n where n is the number of dimensions + * represented in the contained geometries, with all axes of the most southwesterly point + * followed by all axes of the more northeasterly point. + * The axes order of a bbox follows the axes order of geometries. * https://tools.ietf.org/html/rfc7946#section-5 */ bbox?: BBox; @@ -69,24 +73,17 @@ export interface GeoJsonObject { export type GeoJSON = Geometry | Feature | FeatureCollection; /** - * A geometry object. - * https://tools.ietf.org/html/rfc7946#section-3 - */ -export interface GeometryObject extends GeoJsonObject { - type: GeoJsonGeometryTypes; -} - -/** - * Union of geometry objects. + * Geometry object. * https://tools.ietf.org/html/rfc7946#section-3 */ export type Geometry = Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon | GeometryCollection; +export type GeometryObject = Geometry; /** * Point geometry object. * https://tools.ietf.org/html/rfc7946#section-3.1.2 */ -export interface Point extends GeometryObject { +export interface Point extends GeoJsonObject { type: "Point"; coordinates: Position; } @@ -95,7 +92,7 @@ export interface Point extends GeometryObject { * MultiPoint geometry object. * https://tools.ietf.org/html/rfc7946#section-3.1.3 */ -export interface MultiPoint extends GeometryObject { +export interface MultiPoint extends GeoJsonObject { type: "MultiPoint"; coordinates: Position[]; } @@ -104,7 +101,7 @@ export interface MultiPoint extends GeometryObject { * LineString geometry object. * https://tools.ietf.org/html/rfc7946#section-3.1.4 */ -export interface LineString extends GeometryObject { +export interface LineString extends GeoJsonObject { type: "LineString"; coordinates: Position[]; } @@ -113,7 +110,7 @@ export interface LineString extends GeometryObject { * MultiLineString geometry object. * https://tools.ietf.org/html/rfc7946#section-3.1.5 */ -export interface MultiLineString extends GeometryObject { +export interface MultiLineString extends GeoJsonObject { type: "MultiLineString"; coordinates: Position[][]; } @@ -122,7 +119,7 @@ export interface MultiLineString extends GeometryObject { * Polygon geometry object. * https://tools.ietf.org/html/rfc7946#section-3.1.6 */ -export interface Polygon extends GeometryObject { +export interface Polygon extends GeoJsonObject { type: "Polygon"; coordinates: Position[][]; } @@ -131,7 +128,7 @@ export interface Polygon extends GeometryObject { * MultiPolygon geometry object. * https://tools.ietf.org/html/rfc7946#section-3.1.7 */ -export interface MultiPolygon extends GeometryObject { +export interface MultiPolygon extends GeoJsonObject { type: "MultiPolygon"; coordinates: Position[][][]; } @@ -140,7 +137,7 @@ export interface MultiPolygon extends GeometryObject { * Geometry Collection * https://tools.ietf.org/html/rfc7946#section-3.1.8 */ -export interface GeometryCollection extends GeometryObject { +export interface GeometryCollection extends GeoJsonObject { type: "GeometryCollection"; geometries: Geometry[]; } @@ -151,7 +148,7 @@ export type GeoJsonProperties = { [name: string]: any; } | null; * A feature object which contains a geometry and associated properties. * https://tools.ietf.org/html/rfc7946#section-3.2 */ -export interface Feature extends GeoJsonObject { +export interface Feature extends GeoJsonObject { type: "Feature"; /** * The feature's geometry @@ -172,7 +169,7 @@ export interface Feature extends GeoJsonObject { +export interface FeatureCollection extends GeoJsonObject { type: "FeatureCollection"; features: Array>; } From 58e01e780d39cf25fd5a9241b9d271b4e035f3a2 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Sat, 5 Jan 2019 16:26:04 -0500 Subject: [PATCH 036/160] Add test for type aliases --- types/geojson/geojson-tests.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/types/geojson/geojson-tests.ts b/types/geojson/geojson-tests.ts index 2cb9fce33f..20d058b2dc 100644 --- a/types/geojson/geojson-tests.ts +++ b/types/geojson/geojson-tests.ts @@ -1,8 +1,7 @@ import { - BBox, - Feature, FeatureCollection, Geometry, GeometryCollection, LineString, + Feature, FeatureCollection, GeometryCollection, LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon, GeoJsonGeometryTypes, - GeometryObject, GeoJsonProperties + GeoJsonTypes, GeometryObject } from "geojson"; let featureCollection: FeatureCollection = { @@ -59,6 +58,9 @@ featureCollection.features[0].type; // $ExpectType "Feature" featureCollection.features[0].geometry; // $ExpectType Geometry featureCollection.features[0].geometry.type; // $ExpectType "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon" | "GeometryCollection" +declare let tg: GeoJsonGeometryTypes; // $ExpectType "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon" | "GeometryCollection" +declare let t: GeoJsonTypes; // $ExpectType "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon" | "GeometryCollection" | "Feature" | "FeatureCollection" + const featureWithPolygon: Feature = { type: "Feature", bbox: [-180.0, -90.0, 180.0, 90.0], From 4103015e81f58f9e90231009c61087b49ba3ce07 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Sat, 5 Jan 2019 21:42:50 -0500 Subject: [PATCH 037/160] rework test --- types/geojson/geojson-tests.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/types/geojson/geojson-tests.ts b/types/geojson/geojson-tests.ts index 20d058b2dc..6c83334d15 100644 --- a/types/geojson/geojson-tests.ts +++ b/types/geojson/geojson-tests.ts @@ -58,8 +58,10 @@ featureCollection.features[0].type; // $ExpectType "Feature" featureCollection.features[0].geometry; // $ExpectType Geometry featureCollection.features[0].geometry.type; // $ExpectType "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon" | "GeometryCollection" -declare let tg: GeoJsonGeometryTypes; // $ExpectType "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon" | "GeometryCollection" -declare let t: GeoJsonTypes; // $ExpectType "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon" | "GeometryCollection" | "Feature" | "FeatureCollection" +function testLiteralTypes(geojsonTypes: GeoJsonTypes, geometryTypes: GeoJsonGeometryTypes) { + geometryTypes; // $ExpectType "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon" | "GeometryCollection" + geojsonTypes; // $ExpectType "FeatureCollection" | "Feature" | "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon" | "GeometryCollection" +} const featureWithPolygon: Feature = { type: "Feature", From f991d75a0a03c82e6aaed1acda8580e278f3c39e Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Sat, 5 Jan 2019 21:51:54 -0500 Subject: [PATCH 038/160] simplify test --- types/geojson/geojson-tests.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/types/geojson/geojson-tests.ts b/types/geojson/geojson-tests.ts index 6c83334d15..82787c8c36 100644 --- a/types/geojson/geojson-tests.ts +++ b/types/geojson/geojson-tests.ts @@ -58,10 +58,11 @@ featureCollection.features[0].type; // $ExpectType "Feature" featureCollection.features[0].geometry; // $ExpectType Geometry featureCollection.features[0].geometry.type; // $ExpectType "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon" | "GeometryCollection" -function testLiteralTypes(geojsonTypes: GeoJsonTypes, geometryTypes: GeoJsonGeometryTypes) { - geometryTypes; // $ExpectType "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon" | "GeometryCollection" - geojsonTypes; // $ExpectType "FeatureCollection" | "Feature" | "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon" | "GeometryCollection" -} +declare let geometryTypes: GeoJsonGeometryTypes; +geometryTypes; // $ExpectType "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon" | "GeometryCollection" + +declare let geojsonTypes: GeoJsonTypes; +geojsonTypes; // $ExpectType "FeatureCollection" | "Feature" | "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon" | "GeometryCollection" const featureWithPolygon: Feature = { type: "Feature", From d1023c2e81c99e0c5dd540c600e1104e2db27266 Mon Sep 17 00:00:00 2001 From: Zhicheng WANG Date: Sun, 6 Jan 2019 11:36:19 +0800 Subject: [PATCH 039/160] fix: add parameter `HTMLParser` to makeMarkdown --- types/showdown/index.d.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/types/showdown/index.d.ts b/types/showdown/index.d.ts index 21075fd6c7..f98c2c4692 100644 --- a/types/showdown/index.d.ts +++ b/types/showdown/index.d.ts @@ -296,11 +296,12 @@ declare namespace Showdown { /** * Converts an HTML string into a markdown string - * + * * @param src The input text (HTML) + * @param [HTMLParser] A WHATWG DOM and HTML parser, such as JSDOM. If none is supplied, window.document will be used. * @returns The output markdown */ - makeMarkdown(src: string): string; + makeMarkdown(src: string, HTMLParser?: HTMLDocument): string; /** * Setting a "local" option only affects the specified Converter object. From 79d1731c9ab4d33270dcd54c3ec9503c5c6d14d1 Mon Sep 17 00:00:00 2001 From: Oskar Lindgren Date: Mon, 7 Jan 2019 11:35:49 +0900 Subject: [PATCH 040/160] change browserName to optional webdriverio Capabiliy browserName is not mandatory when using appium for mobile testing --- types/webdriverio/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/webdriverio/index.d.ts b/types/webdriverio/index.d.ts index 4a1f585808..67fe0454db 100644 --- a/types/webdriverio/index.d.ts +++ b/types/webdriverio/index.d.ts @@ -171,7 +171,7 @@ declare namespace WebdriverIO { } interface Capabilities { - browserName: string; + browserName?: string; acceptInsecureCerts?: boolean; browserVersion?: string; platformName?: string; From 034e6e8e62595317c33ef3a4227be3bc81401c08 Mon Sep 17 00:00:00 2001 From: Terry Mun Date: Mon, 7 Jan 2019 09:40:23 +0100 Subject: [PATCH 041/160] The Set.Animate requires support for optional tuples, TS3.0 required --- types/snapsvg/index.d.ts | 4 ++-- types/snapsvg/test/4.ts | 17 +++++++++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/types/snapsvg/index.d.ts b/types/snapsvg/index.d.ts index ca08eb1eff..cc9c4f3627 100644 --- a/types/snapsvg/index.d.ts +++ b/types/snapsvg/index.d.ts @@ -5,7 +5,7 @@ // Andrey Kurdyumov , // Terry Mun // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 3.0 /// export = Snap; @@ -305,7 +305,7 @@ declare namespace Snap { export interface Set { animate(attrs:{[attr:string]:string|number|boolean|any},duration:number,easing?:(num:number)=>number,callback?:()=>void):Snap.Set; - animate(...params:Array<{attrs:any,duration:number,easing:(num:number)=>number,callback?:()=>void}>):Snap.Set; + animate(...attrs:[{[attr:string]:string|number|boolean|any},number?,((num:number)=>number)?,(()=>void)?][]):Snap.Element; attr(params:{[attr:string]:string|number|boolean|BBox|any}):Snap.Set; attr(param:"viewBox"):Snap.Set; attr(param:string):Snap.Set; diff --git a/types/snapsvg/test/4.ts b/types/snapsvg/test/4.ts index 6fcf8a2a95..cfe9b40b14 100644 --- a/types/snapsvg/test/4.ts +++ b/types/snapsvg/test/4.ts @@ -2,7 +2,7 @@ // Tests by Terry Mun // Checks that Snap.set() is properly typed - const s = Snap(200, 500); + const s = Snap(300, 500); s.attr({ viewBox: '0 0 200 500' }); @@ -34,6 +34,18 @@ }); } + // Animate elements individually + function animateMultipleTest() { + return new Promise(resolve => { + rectSet.animate( + [{ x: 100 }, 500, mina.linear], + [{ x: 100 }, 1000, mina.linear], + [{ x: 100 }, 1500, mina.linear], + [{ x: 100 }, 2000, mina.linear, resolve] + ); + }); + } + // Animate elements individually function forEachTest() { const colors = ['red', 'green', 'blue']; @@ -52,7 +64,7 @@ return new Promise(resolve => { rectSet.exclude(rect4); rectSet.animate({ - x: 100 + x: 150 }, 500, mina.bounce, resolve); }); } @@ -95,6 +107,7 @@ // Start test async function startTest() { await animateTest(); + await animateMultipleTest(); await forEachTest(); await excludeTest(); await spliceTest(); From a65dcd6f408e70df9440b09e90df716bfce7df9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Bruus=20Frank?= Date: Mon, 7 Jan 2019 11:48:33 +0100 Subject: [PATCH 042/160] Removed createProvider function. --- types/react-redux/index.d.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/types/react-redux/index.d.ts b/types/react-redux/index.d.ts index 408ef1ad9a..ff69f6b33d 100644 --- a/types/react-redux/index.d.ts +++ b/types/react-redux/index.d.ts @@ -420,15 +420,6 @@ export interface ProviderProps { */ export class Provider extends Component> { } -/** - * Creates a new which will set the Redux Store on the passed key of the context. You probably only need this - * if you are in the inadvisable position of having multiple stores. You will also need to pass the same storeKey to the - * options argument of connect. - * - * @param storeKey The key of the context on which to set the store. - */ -export function createProvider(storeKey: string): typeof Provider; - /** * Exposes the internal context used in react-redux. It is generally advised to use the connect HOC to connect to the * redux store instead of this approeach. From d1bd470288cd98dbe3049d061b31192911881b24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Bruus=20Frank?= Date: Mon, 7 Jan 2019 11:51:52 +0100 Subject: [PATCH 043/160] Renamed type of inner value of context. --- types/react-redux/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/react-redux/index.d.ts b/types/react-redux/index.d.ts index ff69f6b33d..ef39b6d87c 100644 --- a/types/react-redux/index.d.ts +++ b/types/react-redux/index.d.ts @@ -394,10 +394,10 @@ export interface ConnectOptions { * * @default ReactReduxContext */ - context?: Context; + context?: Context; } -export interface ReactReduxContextObject { +export interface ReactReduxContextValue { store: Store; storeState: SS; } @@ -412,7 +412,7 @@ export interface ProviderProps { * If this is used, generate own connect HOC by using connectAdvanced, supplying the same context provided to the * Provider. Initial value doesn't matter, as it is overwritten with the internal state of Provider. */ - context?: Context; + context?: Context; } /** @@ -424,4 +424,4 @@ export class Provider extends Component; +export const ReactReduxContext: Context; From 1bf6e46582c2754f4e2e81b63e72255abd195854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Bruus=20Frank?= Date: Mon, 7 Jan 2019 11:52:07 +0100 Subject: [PATCH 044/160] Adapted tests to changes. --- types/react-redux/react-redux-tests.tsx | 48 ++----------------------- 1 file changed, 2 insertions(+), 46 deletions(-) diff --git a/types/react-redux/react-redux-tests.tsx b/types/react-redux/react-redux-tests.tsx index 017ba61d30..36cbe588ec 100644 --- a/types/react-redux/react-redux-tests.tsx +++ b/types/react-redux/react-redux-tests.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import { Store, Dispatch, AnyAction, ActionCreator, createStore, bindActionCreators, ActionCreatorsMapObject, Reducer } from 'redux'; -import { Connect, connect, createProvider, Provider, DispatchProp, MapStateToProps, Options, ReactReduxContext, ReactReduxContextObject } from 'react-redux'; +import { Connect, connect, Provider, DispatchProp, MapStateToProps, Options, ReactReduxContext, ReactReduxContextValue } from 'react-redux'; import objectAssign = require('object-assign'); // @@ -920,50 +920,6 @@ function TestWrappedComponent() { const TestConnected = (props: any) => ; } -function TestCreateProvider() { - const STORE_KEY = 'myStore'; - - const MyStoreProvider = createProvider(STORE_KEY); - - const myStoreConnect: Connect = ( - mapStateToProps?: any, - mapDispatchToProps?: any, - mergeProps?: any, - options: Options = {}, - ) => { - options.storeKey = STORE_KEY; - return connect( - mapStateToProps, - mapDispatchToProps, - mergeProps, - options, - ); - }; - - interface State { a: number; } - const store = createStore(() => ({ a: 1 })); - const myStore = createStore(() => ({ a: 2 })); - - interface AProps { a: number; } - const A = (props: AProps) => (

A is {props.a}

); - const A1 = connect(state => state)(A); - const A2 = myStoreConnect(state => state)(A); - - const Combined = () => ( - - - - - - - ); - - // This renders: - //

A is 1

- //

A is 2

- ReactDOM.render(, document.body); -} - function TestWithoutTOwnPropsDecoratedInference() { interface ForwardedProps { forwarded: string; @@ -1219,7 +1175,7 @@ function TestProviderContext() { ; // $ExpectError // Providing a an object of the correct type ensures type safety when consuming the context. - const initialContextValue: ReactReduxContextObject = { storeState: null, store }; + const initialContextValue: ReactReduxContextValue = { storeState: null, store }; const context = React.createContext(initialContextValue); ; From 18cad92afed85e7a911d4ea714771048667ed577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Bruus=20Frank?= Date: Mon, 7 Jan 2019 12:00:18 +0100 Subject: [PATCH 045/160] Added files from v6 folder with files from version 6.0. --- types/react-redux/v6/index.d.ts | 412 +++++++ types/react-redux/v6/package.json | 6 + types/react-redux/v6/react-redux-tests.tsx | 1212 ++++++++++++++++++++ types/react-redux/v6/tsconfig.json | 26 + types/react-redux/v6/tslint.json | 3 + 5 files changed, 1659 insertions(+) create mode 100644 types/react-redux/v6/index.d.ts create mode 100644 types/react-redux/v6/package.json create mode 100644 types/react-redux/v6/react-redux-tests.tsx create mode 100644 types/react-redux/v6/tsconfig.json create mode 100644 types/react-redux/v6/tslint.json diff --git a/types/react-redux/v6/index.d.ts b/types/react-redux/v6/index.d.ts new file mode 100644 index 0000000000..bcbcced0bd --- /dev/null +++ b/types/react-redux/v6/index.d.ts @@ -0,0 +1,412 @@ +// Type definitions for react-redux 6.0 +// Project: https://github.com/reduxjs/react-redux +// Definitions by: Qubo , +// Kenzie Togami , +// Curits Layne +// Frank Tan +// Nicholas Boll +// Dibyo Majumdar +// Prashant Deva +// Thomas Charlat +// Valentin Descamps +// Johann Rakotoharisoa +// Anatoli Papirovski +// Boris Sergeyev +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.0 + +// Known Issue: +// There is a known issue in TypeScript, which doesn't allow decorators to change the signature of the classes +// they are decorating. Due to this, if you are using @connect() decorator in your code, +// you will see a bunch of errors from TypeScript. The current workaround is to use connect() as a function call on +// a separate line instead of as a decorator. Discussed in this github issue: +// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/20796 + +// NOTE about the wrong react-redux version in the header comment: +// The actual react-redux version is not 6.0.0, but we had to increase the major version +// to update this type definitions for redux@4.x from redux@3.x. +// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/25321 + +import { + Component, + ComponentClass, + ComponentType, + StatelessComponent +} from 'react'; + +import { + Action, + ActionCreator, + AnyAction, + Dispatch, + Store +} from 'redux'; + +// Omit taken from https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html +export type Omit = Pick>; + +export interface DispatchProp
{ + dispatch: Dispatch; +} + +export type AdvancedComponentDecorator = + (component: ComponentType) => ComponentClass; + +/** + * A property P will be present if: + * - it is present in DecorationTargetProps + * + * Its value will be dependent on the following conditions + * - if property P is present in InjectedProps and its definition extends the definition + * in DecorationTargetProps, then its definition will be that of DecorationTargetProps[P] + * - if property P is not present in InjectedProps then its definition will be that of + * DecorationTargetProps[P] + * - if property P is present in InjectedProps but does not extend the + * DecorationTargetProps[P] definition, its definition will be that of InjectedProps[P] + */ +export type Matching = { + [P in keyof DecorationTargetProps]: P extends keyof InjectedProps + ? InjectedProps[P] extends DecorationTargetProps[P] + ? DecorationTargetProps[P] + : InjectedProps[P] + : DecorationTargetProps[P]; +}; + +/** + * a property P will be present if : + * - it is present in both DecorationTargetProps and InjectedProps + * - InjectedProps[P] can satisfy DecorationTargetProps[P] + * ie: decorated component can accept more types than decorator is injecting + * + * For decoration, inject props or ownProps are all optionally + * required by the decorated (right hand side) component. + * But any property required by the decorated component must be satisfied by the injected property. + */ +export type Shared< + InjectedProps, + DecorationTargetProps extends Shared + > = { + [P in Extract]?: InjectedProps[P] extends DecorationTargetProps[P] ? DecorationTargetProps[P] : never; + }; + +// Infers prop type from component C +export type GetProps = C extends ComponentType ? P : never; + +// Applies LibraryManagedAttributes (proper handling of defaultProps +// and propTypes), as well as defines WrappedComponent. +export type ConnectedComponentClass = ComponentClass> & { + WrappedComponent: C; +}; + +// Injects props and removes them from the prop requirements. +// Will not pass through the injected props if they are passed in during +// render. Also adds new prop requirements from TNeedsProps. +export type InferableComponentEnhancerWithProps = + >>>( + component: C + ) => ConnectedComponentClass, keyof Shared>> & TNeedsProps>; + +// Injects props and removes them from the prop requirements. +// Will not pass through the injected props if they are passed in during +// render. +export type InferableComponentEnhancer = + InferableComponentEnhancerWithProps; + +export type InferThunkActionCreatorType any> = + TActionCreator extends (...args: infer TParams) => (...args: any[]) => infer TReturn + ? (...args: TParams) => TReturn + : TActionCreator; + +export type HandleThunkActionCreator = + TActionCreator extends (...args: any[]) => any + ? InferThunkActionCreatorType + : TActionCreator; + +// redux-thunk middleware returns thunk's return value from dispatch call +// https://github.com/reduxjs/redux-thunk#composition +export type ResolveThunks = + TDispatchProps extends { [key: string]: any } + ? { + [C in keyof TDispatchProps]: HandleThunkActionCreator + } + : TDispatchProps; + +/** + * Connects a React component to a Redux store. + * + * - Without arguments, just wraps the component, without changing the behavior / props + * + * - If 2 params are passed (3rd param, mergeProps, is skipped), default behavior + * is to override ownProps (as stated in the docs), so what remains is everything that's + * not a state or dispatch prop + * + * - When 3rd param is passed, we don't know if ownProps propagate and whether they + * should be valid component props, because it depends on mergeProps implementation. + * As such, it is the user's responsibility to extend ownProps interface from state or + * dispatch props or both when applicable + * + * @param mapStateToProps + * @param mapDispatchToProps + * @param mergeProps + * @param options + */ +export interface Connect { + // tslint:disable:no-unnecessary-generics + (): InferableComponentEnhancer; + + ( + mapStateToProps: MapStateToPropsParam + ): InferableComponentEnhancerWithProps; + + ( + mapStateToProps: null | undefined, + mapDispatchToProps: MapDispatchToPropsNonObject + ): InferableComponentEnhancerWithProps; + + ( + mapStateToProps: null | undefined, + mapDispatchToProps: TDispatchProps, + ): InferableComponentEnhancerWithProps< + ResolveThunks, + TOwnProps + >; + + ( + mapStateToProps: MapStateToPropsParam, + mapDispatchToProps: MapDispatchToPropsNonObject + ): InferableComponentEnhancerWithProps; + + ( + mapStateToProps: MapStateToPropsParam, + mapDispatchToProps: TDispatchProps, + ): InferableComponentEnhancerWithProps< + TStateProps & ResolveThunks, + TOwnProps + >; + + ( + mapStateToProps: MapStateToPropsParam, + mapDispatchToProps: null | undefined, + mergeProps: MergeProps, + ): InferableComponentEnhancerWithProps; + + ( + mapStateToProps: null | undefined, + mapDispatchToProps: MapDispatchToPropsParam, + mergeProps: MergeProps, + ): InferableComponentEnhancerWithProps; + + ( + mapStateToProps: null | undefined, + mapDispatchToProps: null | undefined, + mergeProps: MergeProps, + ): InferableComponentEnhancerWithProps; + + ( + mapStateToProps: MapStateToPropsParam, + mapDispatchToProps: MapDispatchToPropsParam, + mergeProps: MergeProps, + options?: Options + ): InferableComponentEnhancerWithProps; + + ( + mapStateToProps: MapStateToPropsParam, + mapDispatchToProps: null | undefined, + mergeProps: null | undefined, + options: Options + ): InferableComponentEnhancerWithProps; + + ( + mapStateToProps: null | undefined, + mapDispatchToProps: MapDispatchToPropsNonObject, + mergeProps: null | undefined, + options: Options<{}, TStateProps, TOwnProps> + ): InferableComponentEnhancerWithProps; + + ( + mapStateToProps: null | undefined, + mapDispatchToProps: TDispatchProps, + mergeProps: null | undefined, + options: Options<{}, TStateProps, TOwnProps> + ): InferableComponentEnhancerWithProps< + ResolveThunks, + TOwnProps + >; + + ( + mapStateToProps: MapStateToPropsParam, + mapDispatchToProps: MapDispatchToPropsNonObject, + mergeProps: null | undefined, + options: Options + ): InferableComponentEnhancerWithProps; + + ( + mapStateToProps: MapStateToPropsParam, + mapDispatchToProps: TDispatchProps, + mergeProps: null | undefined, + options: Options + ): InferableComponentEnhancerWithProps< + TStateProps & ResolveThunks, + TOwnProps + >; + // tslint:enable:no-unnecessary-generics +} + +/** + * The connect function. See {@type Connect} for details. + */ +export const connect: Connect; + +export type MapStateToProps = + (state: State, ownProps: TOwnProps) => TStateProps; + +export type MapStateToPropsFactory = + (initialState: State, ownProps: TOwnProps) => MapStateToProps; + +export type MapStateToPropsParam = MapStateToPropsFactory | MapStateToProps | null | undefined; + +export type MapDispatchToPropsFunction = + (dispatch: Dispatch, ownProps: TOwnProps) => TDispatchProps; + +export type MapDispatchToProps = + MapDispatchToPropsFunction | TDispatchProps; + +export type MapDispatchToPropsFactory = + (dispatch: Dispatch, ownProps: TOwnProps) => MapDispatchToPropsFunction; + +export type MapDispatchToPropsParam = MapDispatchToPropsFactory | MapDispatchToProps; + +export type MapDispatchToPropsNonObject = MapDispatchToPropsFactory | MapDispatchToPropsFunction; + +export type MergeProps = + (stateProps: TStateProps, dispatchProps: TDispatchProps, ownProps: TOwnProps) => TMergedProps; + +export interface Options extends ConnectOptions { + /** + * If true, implements shouldComponentUpdate and shallowly compares the result of mergeProps, + * preventing unnecessary updates, assuming that the component is a “pure” component + * and does not rely on any input or state other than its props and the selected Redux store’s state. + * Defaults to true. + * @default true + */ + pure?: boolean; + + /** + * When pure, compares incoming store state to its previous value. + * @default strictEqual + */ + areStatesEqual?: (nextState: State, prevState: State) => boolean; + + /** + * When pure, compares incoming props to its previous value. + * @default shallowEqual + */ + areOwnPropsEqual?: (nextOwnProps: TOwnProps, prevOwnProps: TOwnProps) => boolean; + + /** + * When pure, compares the result of mapStateToProps to its previous value. + * @default shallowEqual + */ + areStatePropsEqual?: (nextStateProps: TStateProps, prevStateProps: TStateProps) => boolean; + + /** + * When pure, compares the result of mergeProps to its previous value. + * @default shallowEqual + */ + areMergedPropsEqual?: (nextMergedProps: TMergedProps, prevMergedProps: TMergedProps) => boolean; +} + +/** + * Connects a React component to a Redux store. It is the base for {@link connect} but is less opinionated about + * how to combine state, props, and dispatch into your final props. It makes no + * assumptions about defaults or memoization of results, leaving those responsibilities to the caller.It does not + * modify the component class passed to it; instead, it returns a new, connected component class for you to use. + * + * @param selectorFactory The selector factory. See SelectorFactory type for details. + * @param connectOptions If specified, further customizes the behavior of the connector. Additionally, any extra + * options will be passed through to your selectorFactory in the factoryOptions argument. + */ +export function connectAdvanced( + // tslint:disable-next-line no-unnecessary-generics + selectorFactory: SelectorFactory, + connectOptions?: ConnectOptions & TFactoryOptions +): AdvancedComponentDecorator; + +/** + * Initializes a selector function (during each instance's constructor). That selector function is called any time the + * connector component needs to compute new props, as a result of a store state change or receiving new props. The + * result of selector is expected to be a plain object, which is passed as the props to the wrapped + * component. If a consecutive call to selector returns the same object (===) as its previous + * call, the component will not be re-rendered. It's the responsibility of selector to return that + * previous object when appropriate. + */ +export type SelectorFactory = + (dispatch: Dispatch, factoryOptions: TFactoryOptions) => Selector; + +export type Selector = (state: S, ownProps: TOwnProps) => TProps; + +export interface ConnectOptions { + /** + * Computes the connector component's displayName property relative to that of the wrapped component. Usually + * overridden by wrapper functions. + * + * @default name => 'ConnectAdvanced('+name+')' + * @param componentName + */ + getDisplayName?: (componentName: string) => string; + /** + * Shown in error messages. Usually overridden by wrapper functions. + * + * @default 'connectAdvanced' + */ + methodName?: string; + /** + * If defined, a property named this value will be added to the props passed to the wrapped component. Its value + * will be the number of times the component has been rendered, which can be useful for tracking down unnecessary + * re-renders. + * + * @default undefined + */ + renderCountProp?: string; + /** + * Controls whether the connector component subscribes to redux store state changes. If set to false, it will only + * re-render on componentWillReceiveProps. + * + * @default true + */ + shouldHandleStateChanges?: boolean; + /** + * The key of props/context to get the store. You probably only need this if you are in the inadvisable position of + * having multiple stores. + * + * @default 'store' + */ + storeKey?: string; + /** + * If true, stores a ref to the wrapped component instance and makes it available via getWrappedInstance() method. + * + * @default false + */ + withRef?: boolean; +} + +export interface ProviderProps { + /** + * The single Redux store in your application. + */ + store: Store; +} + +/** + * Makes the Redux store available to the connect() calls in the component hierarchy below. + */ +export class Provider extends Component> { } + +/** + * Creates a new which will set the Redux Store on the passed key of the context. You probably only need this + * if you are in the inadvisable position of having multiple stores. You will also need to pass the same storeKey to the + * options argument of connect. + * + * @param storeKey The key of the context on which to set the store. + */ +export function createProvider(storeKey: string): typeof Provider; diff --git a/types/react-redux/v6/package.json b/types/react-redux/v6/package.json new file mode 100644 index 0000000000..7f5b19d45b --- /dev/null +++ b/types/react-redux/v6/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "redux": "^4.0.0" + } +} diff --git a/types/react-redux/v6/react-redux-tests.tsx b/types/react-redux/v6/react-redux-tests.tsx new file mode 100644 index 0000000000..554ace09ff --- /dev/null +++ b/types/react-redux/v6/react-redux-tests.tsx @@ -0,0 +1,1212 @@ +import * as React from 'react'; +import * as ReactDOM from 'react-dom'; +import { Store, Dispatch, AnyAction, ActionCreator, createStore, bindActionCreators, ActionCreatorsMapObject, Reducer } from 'redux'; +import { Connect, connect, createProvider, Provider, DispatchProp, MapStateToProps, Options } from 'react-redux'; +import objectAssign = require('object-assign'); + +// +// Quick Start +// https://github.com/rackt/react-redux/blob/master/docs/quick-start.md#quick-start +// + +// Test cases written in a way to isolate types and variables and verify the +// output of `connect` to make sure the signature is what is expected + +function Empty() { + interface OwnProps { + dispatch: Dispatch; + foo: string; + } + + class TestComponent extends React.Component {} + + const Test = connect()(TestComponent); + + const verify = ; +} + +function MapState() { + interface OwnProps { foo: string; } + interface StateProps { bar: number; } + + class TestComponent extends React.Component {} + + const mapStateToProps = (_: any) => ({ + bar: 1 + }); + + const Test = connect( + mapStateToProps + )(TestComponent); + + const verify = ; +} + +function MapStateWithDispatchProp() { + interface OwnProps { foo: string; } + interface StateProps { bar: number; dispatch: Dispatch; } + + class TestComponent extends React.Component {} + + const mapStateToProps = (_: any) => ({ + bar: 1 + }); + + const Test = connect( + mapStateToProps + )(TestComponent); + + const verify = ; +} + +function MapStateFactory() { + interface OwnProps { foo: string; } + interface StateProps { bar: number; } + + class TestComponent extends React.Component {} + + const mapStateToProps = () => () => ({ + bar: 1 + }); + + const Test = connect( + mapStateToProps + )(TestComponent); + + const verify = ; +} + +function MapDispatch() { + interface OwnProps { foo: string; } + interface DispatchProps { onClick: () => void; } + + class TestComponent extends React.Component {} + + const mapDispatchToProps = () => ({ + onClick: () => {} + }); + + const TestNull = connect( + null, + mapDispatchToProps, + )(TestComponent); + + const verifyNull = ; + + const TestUndefined = connect( + undefined, + mapDispatchToProps, + )(TestComponent); + + const verifyUndefined = ; +} + +function MapDispatchWithThunkActionCreators() { + const simpleAction = (payload: boolean) => ({ + type: 'SIMPLE_ACTION', + payload, + }); + const thunkAction = (param1: number, param2: string) => ( + async (dispatch: Dispatch, { foo }: OwnProps) => { + return foo; + } + ); + interface OwnProps { + foo: string; + } + interface TestComponentProps extends OwnProps { + simpleAction: typeof simpleAction; + thunkAction(param1: number, param2: string): Promise; + } + class TestComponent extends React.Component {} + + const mapStateToProps = ({ foo }: { foo: string }) => ({ foo }); + const mapDispatchToProps = { simpleAction, thunkAction }; + + const Test1 = connect(null, mapDispatchToProps)(TestComponent); + const Test2 = connect(mapStateToProps, mapDispatchToProps)(TestComponent); + const Test3 = connect( + null, mapDispatchToProps, null, { storeKey: 'somekey' } + )(TestComponent); + const Test4 = connect( + mapStateToProps, mapDispatchToProps, null, { storeKey: 'somekey' } + )(TestComponent); + const verify =
+ ; + + ; + +
; +} + +function MapManualDispatchThatLooksLikeThunk() { + interface OwnProps { + foo: string; + } + interface TestComponentProps extends OwnProps { + remove: (item: string) => () => object; + } + class TestComponent extends React.Component { + render() { + return
; + } + } + + const mapStateToProps = ({ foo }: { foo: string }) => ({ foo }); + function mapDispatchToProps(dispatch: Dispatch) { + return { + remove(item: string) { + return () => dispatch({ type: 'REMOVE_ITEM', item }); + } + }; + } + + const Test1 = connect(null, mapDispatchToProps)(TestComponent); + const Test2 = connect(mapStateToProps, mapDispatchToProps)(TestComponent); + const Test3 = connect( + null, mapDispatchToProps, null, { storeKey: 'somekey' } + )(TestComponent); + const Test4 = connect( + mapStateToProps, mapDispatchToProps, null, { storeKey: 'somekey' } + )(TestComponent); + const verify =
+ ; + + ; + +
; +} + +function MapStateAndDispatchObject() { + interface ClickPayload { count: number; } + const onClick: ActionCreator = () => ({ count: 1 }); + const dispatchToProps = { + onClick, + }; + + interface OwnProps { foo: string; } + interface StateProps { bar: number; } + interface DispatchProps { onClick: ActionCreator; } + + const mapStateToProps = (_: any, __: OwnProps): StateProps => ({ + bar: 1 + }); + + class TestComponent extends React.Component {} + + const Test = connect( + mapStateToProps, + dispatchToProps, + )(TestComponent); + + const verify = ; +} + +function MapDispatchFactory() { + interface OwnProps { foo: string; } + interface DispatchProps { onClick: () => void; } + + class TestComponent extends React.Component {} + + const mapDispatchToPropsFactory = () => () => ({ + onClick: () => {} + }); + + const TestNull = connect( + null, + mapDispatchToPropsFactory, + )(TestComponent); + + const verifyNull = ; + + const TestUndefined = connect( + undefined, + mapDispatchToPropsFactory, + )(TestComponent); + + const verifyUndefined = ; +} + +function MapStateAndDispatch() { + interface OwnProps { foo: string; } + interface StateProps { bar: number; } + interface DispatchProps { onClick: () => void; } + + class TestComponent extends React.Component {} + + const mapStateToProps = () => ({ + bar: 1 + }); + + const mapDispatchToProps = () => ({ + onClick: () => {} + }); + + const Test = connect( + mapStateToProps, + mapDispatchToProps, + )(TestComponent); + + const verify = ; +} + +function MapStateFactoryAndDispatch() { + interface OwnProps { foo: string; } + interface StateProps { bar: number; } + interface DispatchProps { onClick: () => void; } + + const mapStateToPropsFactory = () => () => ({ + bar: 1 + }); + + const mapDispatchToProps = () => ({ + onClick: () => {} + }); + + class TestComponent extends React.Component {} + + const Test = connect( + mapStateToPropsFactory, + mapDispatchToProps, + )(TestComponent); + + const verify = ; +} + +function MapStateFactoryAndDispatchFactory() { + interface OwnProps { foo: string; } + interface StateProps { bar: number; } + interface DispatchProps { onClick: () => void; } + + const mapStateToPropsFactory = () => () => ({ + bar: 1 + }); + + const mapDispatchToPropsFactory = () => () => ({ + onClick: () => {} + }); + + class TestComponent extends React.Component {} + + const Test = connect( + mapStateToPropsFactory, + mapDispatchToPropsFactory, + )(TestComponent); + + const verify = ; +} + +function MapStateAndDispatchAndMerge() { + interface OwnProps { foo: string; } + interface StateProps { bar: number; } + interface DispatchProps { onClick: () => void; } + + class TestComponent extends React.Component {} + + const mapStateToProps = () => ({ + bar: 1 + }); + + const mapDispatchToProps = () => ({ + onClick: () => {} + }); + + const mergeProps = (stateProps: StateProps, dispatchProps: DispatchProps) => ( + { ...stateProps, ...dispatchProps } + ); + + const Test = connect( + mapStateToProps, + mapDispatchToProps, + mergeProps, + )(TestComponent); + + const verify = ; +} + +function MapStateAndOptions() { + interface State { state: string; } + interface OwnProps { foo: string; } + interface StateProps { bar: number; } + interface DispatchProps { dispatch: Dispatch; } + + class TestComponent extends React.Component {} + + const mapStateToProps = (state: State) => ({ + bar: 1 + }); + + const areStatePropsEqual = (next: StateProps, current: StateProps) => true; + + const Test = connect( + mapStateToProps, + null, + null, + { + pure: true, + areStatePropsEqual, + } + )(TestComponent); + + const verify = ; +} + +interface CounterState { + counter: number; +} +declare var increment: () => { type: string }; + +class Counter extends React.Component { + render() { + return ( + + ); + } +} + +function mapStateToProps(state: CounterState) { + return { + value: state.counter + }; +} + +// Which action creators does it want to receive by props? +function mapDispatchToProps(dispatch: Dispatch) { + return { + onIncrement: () => dispatch(increment()) + }; +} + +connect( + mapStateToProps, + mapDispatchToProps +)(Counter); + +@connect(mapStateToProps) +class CounterContainer extends React.Component { +} + +// Ensure connect's first two arguments can be replaced by wrapper functions +interface CounterStateProps { + value: number; +} +interface CounterDispatchProps { + onIncrement: () => void; +} +// with higher order functions +connect( + () => mapStateToProps, + () => mapDispatchToProps +)(Counter); +// with higher order functions using parameters +connect( + (initialState: CounterState, ownProps) => mapStateToProps, + (dispatch: Dispatch, ownProps) => mapDispatchToProps +)(Counter); +// only first argument +connect( + () => mapStateToProps +)(Counter); +// wrap only one argument +connect( + mapStateToProps, + () => mapDispatchToProps +)(Counter); +// with extra arguments +connect( + () => mapStateToProps, + () => mapDispatchToProps, + (s: CounterStateProps, d: CounterDispatchProps) => + objectAssign({}, s, d), + { pure: true } +)(Counter); + +class App extends React.Component { + render() { + return null; + } +} + +const targetEl = document.getElementById('root'); + +ReactDOM.render(( + + {() => } + +), targetEl); + +// +// API +// https://github.com/rackt/react-redux/blob/master/docs/api.md +// +declare var store: Store; +class MyRootComponent extends React.Component { +} +class TodoApp extends React.Component {} +interface TodoState { + todos: string[]|string; +} +interface TodoProps { + userId: number; +} +interface DispatchProps { + addTodo(userId: number, text: string): void; + action: () => any; +} +declare var actionCreators: () => { + action: () => any; +}; +declare var dispatchActionCreators: () => DispatchProps; +declare var addTodo: () => { type: string; }; +declare var todoActionCreators: { [type: string]: (...args: any[]) => any; }; +declare var counterActionCreators: { [type: string]: (...args: any[]) => any; }; + +ReactDOM.render( + + {() => } + , + document.body +); + +// Inject just dispatch and don't listen to store + +const AppWrap = (props: DispatchProp & { children?: React.ReactNode }) =>
; +const WrappedApp = connect()(AppWrap); + +; + +// Inject dispatch and every field in the global state + +connect((state: TodoState) => state)(TodoApp); + +// Inject dispatch and todos + +function mapStateToProps2(state: TodoState) { + return { todos: state.todos }; +} + +export default connect(mapStateToProps2)(TodoApp); + +connect(mapStateToProps2, actionCreators)(TodoApp); + +function mapDispatchToProps2(dispatch: Dispatch) { + return { actions: bindActionCreators(actionCreators, dispatch) }; +} + +connect(mapStateToProps2, mapDispatchToProps2)(TodoApp); + +// Inject todos and a specific action creator (addTodo) + +function mapDispatchToProps3(dispatch: Dispatch) { + return bindActionCreators({ addTodo }, dispatch); +} + +connect(mapStateToProps2, mapDispatchToProps3)(TodoApp); + +// Inject todos, todoActionCreators as todoActions, and counterActionCreators as counterActions + +function mapDispatchToProps4(dispatch: Dispatch) { + return { + todoActions: bindActionCreators(todoActionCreators, dispatch), + counterActions: bindActionCreators(counterActionCreators, dispatch) + }; +} + +connect(mapStateToProps2, mapDispatchToProps4)(TodoApp); + +// Inject todos, and todoActionCreators and counterActionCreators together as actions + +function mapDispatchToProps5(dispatch: Dispatch) { + return { + actions: bindActionCreators(objectAssign({}, todoActionCreators, counterActionCreators), dispatch) + }; +} + +connect(mapStateToProps2, mapDispatchToProps5)(TodoApp); + +// Inject todos, and all todoActionCreators and counterActionCreators directly as props + +function mapDispatchToProps6(dispatch: Dispatch) { + return bindActionCreators(objectAssign({}, todoActionCreators, counterActionCreators), dispatch); +} + +connect(mapStateToProps2, mapDispatchToProps6)(TodoApp); + +// Inject todos of a specific user depending on props + +function mapStateToProps3(state: TodoState, ownProps: TodoProps): TodoState { + return { todos: state.todos[ownProps.userId] }; +} + +connect(mapStateToProps3)(TodoApp); + +// Inject todos of a specific user depending on props, and inject props.userId into the action + +function mergeProps(stateProps: TodoState, dispatchProps: DispatchProps, ownProps: TodoProps): DispatchProps & TodoState & TodoProps { + return objectAssign({}, ownProps, dispatchProps, { + todos: stateProps.todos[ownProps.userId], + addTodo: (text: string) => dispatchProps.addTodo(ownProps.userId, text) + }); +} + +connect(mapStateToProps2, dispatchActionCreators, mergeProps)(MyRootComponent); + +// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/14622#issuecomment-279820358 +// Allow for undefined mapStateToProps +connect(undefined, mapDispatchToProps6)(TodoApp); + +interface TestProp { + property1: number; + someOtherProperty?: string; +} +interface TestState { + isLoaded: boolean; + state1: number; +} +class TestComponent extends React.Component { } +const WrappedTestComponent = connect()(TestComponent); + +// return value of the connect()(TestComponent) is assignable to a ComponentClass +// ie: DispatchProp has been removed through decoration +const ADecoratedTestComponent: React.ComponentClass = WrappedTestComponent; +; + +const ATestComponent: React.ComponentClass = TestComponent; // $ExpectError + +// stateless functions +interface HelloMessageProps { + dispatch: Dispatch; + name: string; +} +const HelloMessage: React.StatelessComponent = (props) => { + return
Hello {props.name}
; +}; +const ConnectedHelloMessage = connect()(HelloMessage); +ReactDOM.render(, document.getElementById('content')); + +// stateless functions that uses mapStateToProps and mapDispatchToProps +function TestStatelessFunctionWithMapArguments() { + interface GreetingProps { + name: string; + onClick: () => void; + } + + function Greeting(props: GreetingProps) { + return
Hello {props.name}
; + } + + const mapStateToProps = (state: any, ownProps: GreetingProps) => { + return { + name: 'Connected! ' + ownProps.name + }; + }; + + const mapDispatchToProps = (dispatch: Dispatch, ownProps: GreetingProps) => { + return { + onClick: () => { + dispatch({ type: 'GREETING', name: ownProps.name }); + } + }; + }; + + const ConnectedGreeting = connect( + mapStateToProps, + mapDispatchToProps + )(Greeting); +} + +// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/8787 +function TestTOwnPropsInference() { + interface OwnProps { + own: string; + } + + interface StateProps { + state: string; + } + + class OwnPropsComponent extends React.Component { + render() { + return
; + } + } + + function mapStateToPropsWithoutOwnProps(state: any): StateProps { + return { state: 'string' }; + } + + function mapStateToPropsWithOwnProps(state: any, ownProps: OwnProps): StateProps { + return { state: 'string' }; + } + + const ConnectedWithoutOwnProps = connect(mapStateToPropsWithoutOwnProps)(OwnPropsComponent); + const ConnectedWithOwnProps = connect(mapStateToPropsWithOwnProps)(OwnPropsComponent); + const ConnectedWithTypeHint = connect(mapStateToPropsWithoutOwnProps)(OwnPropsComponent); + + // This should not compile, which is good. + // React.createElement(ConnectedWithoutOwnProps, { anything: 'goes!' }); + + // This compiles, as expected. + React.createElement(ConnectedWithOwnProps, { own: 'string' }); + + // This should not compile, which is good. + // React.createElement(ConnectedWithOwnProps, { anything: 'goes!' }); + + // This compiles, as expected. + React.createElement(ConnectedWithTypeHint, { own: 'string' }); + + // This should not compile, which is good. + // React.createElement(ConnectedWithTypeHint, { anything: 'goes!' }); + + interface AllProps { + own: string; + state: string; + } + + class AllPropsComponent extends React.Component { + render() { + return
; + } + } + + type PickedOwnProps = Pick; + type PickedStateProps = Pick; + + const mapStateToPropsForPicked: MapStateToProps = (state: any): PickedStateProps => { + return { state: "string" }; + }; + const ConnectedWithPickedOwnProps = connect(mapStateToPropsForPicked)(AllPropsComponent); + ; +} + +// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/16021 +function TestMergedPropsInference() { + interface StateProps { + state: string; + } + + interface DispatchProps { + dispatch: string; + } + + interface OwnProps { + own: string; + } + + interface MergedProps { + merged: string; + } + + class MergedPropsComponent extends React.Component { + render() { + return
; + } + } + + function mapStateToProps(state: any): StateProps { + return { state: 'string' }; + } + + function mapDispatchToProps(dispatch: Dispatch): DispatchProps { + return { dispatch: 'string' }; + } + + const ConnectedWithOwnAndState: React.ComponentClass = connect( + mapStateToProps, + undefined, + (stateProps: StateProps) => ({ + merged: "merged", + }), + )(MergedPropsComponent); + + const ConnectedWithOwnAndDispatch: React.ComponentClass = connect( + undefined, + mapDispatchToProps, + (stateProps: undefined, dispatchProps: DispatchProps) => ({ + merged: "merged", + }), + )(MergedPropsComponent); + + const ConnectedWithOwn: React.ComponentClass = connect( + undefined, + undefined, + () => ({ + merged: "merged", + }), + )(MergedPropsComponent); +} + +function Issue16652() { + interface PassedProps { + commentIds: string[]; + } + + interface GeneratedStateProps { + comments: Array<({ id: string } | undefined)>; + } + + class CommentList extends React.Component {} + + const mapStateToProps = (state: any, ownProps: PassedProps): GeneratedStateProps => { + return { + comments: ownProps.commentIds.map(id => ({ id })), + }; + }; + + const ConnectedCommentList = connect(mapStateToProps)( + CommentList + ); + + ; +} + +function Issue15463() { + interface SpinnerProps { + showGlobalSpinner: boolean; + } + + class SpinnerClass extends React.Component { + render() { + return (
); + } + } + + const Spinner = connect((state: any) => { + return { showGlobalSpinner: true }; + })(SpinnerClass); + + ; +} + +function RemoveInjectedAndPassOnRest() { + interface TProps { + showGlobalSpinner: boolean; + foo: string; + } + class SpinnerClass extends React.Component { + render() { + return (
); + } + } + + const Spinner = connect((state: any) => { + return { showGlobalSpinner: true }; + })(SpinnerClass); + + ; +} + +function TestControlledComponentWithoutDispatchProp() { + interface MyState { + count: number; + } + + interface MyProps { + label: string; + // `dispatch` is optional, but setting it to anything + // other than Dispatch will cause an error + // + // dispatch: Dispatch; // OK + // dispatch: number; // ERROR + } + + function mapStateToProps(state: MyState) { + return { + label: `The count is ${state.count}`, + }; + } + + class MyComponent extends React.Component { + render() { + return {this.props.label}; + } + } + + const MyFuncComponent = (props: MyProps) => ( + {props.label} + ); + + const MyControlledComponent = connect(mapStateToProps)(MyComponent); + const MyControlledFuncComponent = connect(mapStateToProps)(MyFuncComponent); +} + +function TestDispatchToPropsAsObject() { + const onClick: ActionCreator<{}> = () => ({}); + const mapStateToProps = (state: any) => { + return { + title: state.app.title as string, + }; + }; + const dispatchToProps = { + onClick, + }; + + type Props = { title: string; } & typeof dispatchToProps; + const HeaderComponent: React.StatelessComponent = (props) => { + return

{props.title}

; + }; + + const Header = connect(mapStateToProps, dispatchToProps)(HeaderComponent); +
; +} + +function TestInferredFunctionalComponentWithExplicitOwnProps() { + interface Props { + title: string; + extraText: string; + onClick: () => void; + } + + const Header = connect( + ( + { app: { title }}: { app: { title: string }}, + { extraText }: { extraText: string } + ) => ({ + title, + extraText + }), + (dispatch) => ({ + onClick: () => dispatch({ type: 'test' }) + }) + )(({ title, extraText, onClick }: Props) => { + return

{title} {extraText}

; + }); +
; +} + +function TestInferredFunctionalComponentWithImplicitOwnProps() { + interface Props { + title: string; + extraText: string; + onClick: () => void; + } + + const Header = connect( + ( + { app: { title }}: { app: { title: string }}, + ) => ({ + title, + }), + (dispatch) => ({ + onClick: () => dispatch({ type: 'test' }) + }) + )(({ title, extraText, onClick }: Props) => { + return

{title} {extraText}

; + }); +
; +} + +function TestWrappedComponent() { + interface InnerProps { + name: string; + } + const Inner: React.StatelessComponent = (props) => { + return

{props.name}

; + }; + + const mapStateToProps = (state: any) => { + return { + name: "Connected", + }; + }; + const Connected = connect(mapStateToProps)(Inner); + + // `Inner` and `Connected.WrappedComponent` require explicit `name` prop + const TestInner = (props: any) => ; + const TestWrapped = (props: any) => ; + // `Connected` does not require explicit `name` prop + const TestConnected = (props: any) => ; +} + +function TestCreateProvider() { + const STORE_KEY = 'myStore'; + + const MyStoreProvider = createProvider(STORE_KEY); + + const myStoreConnect: Connect = ( + mapStateToProps?: any, + mapDispatchToProps?: any, + mergeProps?: any, + options: Options = {}, + ) => { + options.storeKey = STORE_KEY; + return connect( + mapStateToProps, + mapDispatchToProps, + mergeProps, + options, + ); + }; + + interface State { a: number; } + const store = createStore(() => ({ a: 1 })); + const myStore = createStore(() => ({ a: 2 })); + + interface AProps { a: number; } + const A = (props: AProps) => (

A is {props.a}

); + const A1 = connect(state => state)(A); + const A2 = myStoreConnect(state => state)(A); + + const Combined = () => ( + + + + + + + ); + + // This renders: + //

A is 1

+ //

A is 2

+ ReactDOM.render(, document.body); +} + +function TestWithoutTOwnPropsDecoratedInference() { + interface ForwardedProps { + forwarded: string; + } + + interface OwnProps { + own: string; + } + + interface StateProps { + state: string; + } + + class WithoutOwnPropsComponentClass extends React.Component> { + render() { + return
; + } + } + + const WithoutOwnPropsComponentStateless: React.StatelessComponent> = () => (
); + + function mapStateToProps4(state: any, ownProps: OwnProps): StateProps { + return { state: 'string' }; + } + + // these decorations should compile, it is perfectly acceptable to receive props and ignore them + const ConnectedWithOwnPropsClass = connect(mapStateToProps4)(WithoutOwnPropsComponentClass); + const ConnectedWithOwnPropsStateless = connect(mapStateToProps4)(WithoutOwnPropsComponentStateless); + const ConnectedWithTypeHintClass = connect(mapStateToProps4)(WithoutOwnPropsComponentClass); + const ConnectedWithTypeHintStateless = connect(mapStateToProps4)(WithoutOwnPropsComponentStateless); + + // This should compile + React.createElement(ConnectedWithOwnPropsClass, { own: 'string', forwarded: 'string' }); + React.createElement(ConnectedWithOwnPropsClass, { own: 'string', forwarded: 'string' }); + + // This should not compile, it is missing ForwardedProps + React.createElement(ConnectedWithOwnPropsClass, { own: 'string' }); // $ExpectError + React.createElement(ConnectedWithOwnPropsStateless, { own: 'string' }); // $ExpectError + + // This should compile + React.createElement(ConnectedWithOwnPropsClass, { own: 'string', forwarded: 'string' }); + React.createElement(ConnectedWithOwnPropsStateless, { own: 'string', forwarded: 'string' }); + + // This should not compile, it is missing ForwardedProps + React.createElement(ConnectedWithTypeHintClass, { own: 'string' }); // $ExpectError + React.createElement(ConnectedWithTypeHintStateless, { own: 'string' }); // $ExpectError + + interface AllProps { + own: string; + state: string; + } + + class AllPropsComponent extends React.Component> { + render() { + return
; + } + } + + type PickedOwnProps = Pick; + type PickedStateProps = Pick; + + const mapStateToPropsForPicked: MapStateToProps = (state: any): PickedStateProps => { + return { state: "string" }; + }; + const ConnectedWithPickedOwnProps = connect(mapStateToPropsForPicked)(AllPropsComponent); + ; +} + +// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/25321#issuecomment-387659500 +function ProviderAcceptsStoreWithCustomAction() { + const reducer: Reducer< + { foo: number } | undefined, + { type: "foo"; payload: number } + > = state => state; + + const store = createStore(reducer); + + const Whatever = () => ( + +
Whatever
+
+ ); +} + +function TestOptionalPropsMergedCorrectly() { + interface OptionalDecorationProps { + foo: string; + bar: number; + optionalProp?: boolean; + dependsOnDispatch?: () => void; + } + + class Component extends React.Component { + render() { + return
; + } + } + + interface MapStateProps { + foo: string; + bar: number; + optionalProp: boolean; + } + + interface MapDispatchProps { + dependsOnDispatch: () => void; + } + + function mapStateToProps(state: any): MapStateProps { + return { + foo: 'foo', + bar: 42, + optionalProp: true, + }; + } + + function mapDispatchToProps(dispatch: any): MapDispatchProps { + return { + dependsOnDispatch: () => {} + }; + } + + connect(mapStateToProps, mapDispatchToProps)(Component); +} + +function TestMoreGeneralDecorationProps() { + // connect() should support decoration props that are more permissive + // than the injected props, as long as the injected props can satisfy + // the decoration props. + interface MoreGeneralDecorationProps { + foo: string | number; + bar: number | 'foo'; + optionalProp?: boolean | object; + dependsOnDispatch?: () => void; + } + + class Component extends React.Component { + render() { + return
; + } + } + + interface MapStateProps { + foo: string; + bar: number; + optionalProp: boolean; + } + + interface MapDispatchProps { + dependsOnDispatch: () => void; + } + + function mapStateToProps(state: any): MapStateProps { + return { + foo: 'foo', + bar: 42, + optionalProp: true, + }; + } + + function mapDispatchToProps(dispatch: any): MapDispatchProps { + return { + dependsOnDispatch: () => {} + }; + } + + connect(mapStateToProps, mapDispatchToProps)(Component); +} + +function TestFailsMoreSpecificInjectedProps() { + interface MoreSpecificDecorationProps { + foo: string; + bar: number; + dependsOnDispatch: () => void; + } + + class Component extends React.Component { + render() { + return
; + } + } + + interface MapStateProps { + foo: string | number; + bar: number | 'foo'; + dependsOnDispatch?: () => void; + } + + interface MapDispatchProps { + dependsOnDispatch?: () => void; + } + + function mapStateToProps(state: any): MapStateProps { + return { + foo: 'foo', + bar: 42, + }; + } + + function mapDispatchToProps(dispatch: any): MapDispatchProps { + return { + dependsOnDispatch: () => {} + }; + } + + // Since it is possible the injected props could fail to satisfy the decoration props, + // the following line should fail to compile. + connect(mapStateToProps, mapDispatchToProps)(Component); // $ExpectError + + // Confirm that this also fails with functional components + const FunctionalComponent = (props: MoreSpecificDecorationProps) => null; + connect(mapStateToProps, mapDispatchToProps)(Component); // $ExpectError +} + +function TestLibraryManagedAttributes() { + interface OwnProps { + bar: number; + fn: () => void; + } + + interface MapStateProps { + foo: string; + } + + class Component extends React.Component { + static defaultProps = { + bar: 0, + }; + + render() { + return
; + } + } + + function mapStateToProps(state: any): MapStateProps { + return { + foo: 'foo', + }; + } + + const ConnectedComponent = connect(mapStateToProps)(Component); + {}} />; + + const ConnectedComponent2 = connect(mapStateToProps)(Component); + {}} />; +} diff --git a/types/react-redux/v6/tsconfig.json b/types/react-redux/v6/tsconfig.json new file mode 100644 index 0000000000..5fa4508cd8 --- /dev/null +++ b/types/react-redux/v6/tsconfig.json @@ -0,0 +1,26 @@ +{ + "files": [ + "index.d.ts", + "react-redux-tests.tsx" + ], + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "jsx": "react", + "experimentalDecorators": true, + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + } +} \ No newline at end of file diff --git a/types/react-redux/v6/tslint.json b/types/react-redux/v6/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/react-redux/v6/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} From c3652f1370bbd035df63d43dfe6102b824f031ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Bruus=20Frank?= Date: Mon, 7 Jan 2019 12:10:27 +0100 Subject: [PATCH 046/160] Fixed path mapping for v6. --- types/react-redux/v6/tsconfig.json | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/types/react-redux/v6/tsconfig.json b/types/react-redux/v6/tsconfig.json index 5fa4508cd8..ad66941f90 100644 --- a/types/react-redux/v6/tsconfig.json +++ b/types/react-redux/v6/tsconfig.json @@ -11,16 +11,21 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": true, + "strictNullChecks": false, "strictFunctionTypes": true, - "baseUrl": "../", + "baseUrl": "../../", "jsx": "react", "experimentalDecorators": true, "typeRoots": [ - "../" + "../../" ], + "paths": { + "react-redux": [ + "react-redux/v6" + ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true } -} \ No newline at end of file +} From 15c3901e688afed16c5dd300891b7c9710d08aaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Bruus=20Frank?= Date: Mon, 7 Jan 2019 12:58:21 +0100 Subject: [PATCH 047/160] tsconfig. --- types/react-redux/v6/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-redux/v6/tsconfig.json b/types/react-redux/v6/tsconfig.json index ad66941f90..82085150da 100644 --- a/types/react-redux/v6/tsconfig.json +++ b/types/react-redux/v6/tsconfig.json @@ -11,7 +11,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../../", "jsx": "react", From 327548b8300ff2c930bc42bc9d60f7205b569147 Mon Sep 17 00:00:00 2001 From: Sibelius Seraphini Date: Mon, 7 Jan 2019 11:34:22 -0200 Subject: [PATCH 048/160] feat(graphql): add tsource and tcontext type parameters to graphql, fix #31941 --- types/graphql/execution/execute.d.ts | 6 ++-- types/graphql/type/definition.d.ts | 32 +++++++++---------- types/graphql/type/introspection.d.ts | 12 +++---- types/graphql/type/schema.d.ts | 16 +++++----- .../utilities/getOperationRootType.d.ts | 2 +- 5 files changed, 34 insertions(+), 34 deletions(-) diff --git a/types/graphql/execution/execute.d.ts b/types/graphql/execution/execute.d.ts index fc6ad898d1..aff0cc0dd3 100644 --- a/types/graphql/execution/execute.d.ts +++ b/types/graphql/execution/execute.d.ts @@ -136,7 +136,7 @@ export function buildExecutionContext( */ export function collectFields( exeContext: ExecutionContext, - runtimeType: GraphQLObjectType, + runtimeType: GraphQLObjectType, selectionSet: SelectionSetNode, fields: { [key: string]: Array }, visitedFragmentNames: { [key: string]: boolean } @@ -146,7 +146,7 @@ export function buildResolveInfo( exeContext: ExecutionContext, fieldDef: GraphQLField, fieldNodes: ReadonlyArray, - parentType: GraphQLObjectType, + parentType: GraphQLObjectType, path: ResponsePath ): GraphQLResolveInfo; @@ -180,6 +180,6 @@ export const defaultFieldResolver: GraphQLFieldResolver; */ export function getFieldDef( schema: GraphQLSchema, - parentType: GraphQLObjectType, + parentType: GraphQLObjectType, fieldName: string ): Maybe>; diff --git a/types/graphql/type/definition.d.ts b/types/graphql/type/definition.d.ts index 1df7c85690..a33c81cd3b 100644 --- a/types/graphql/type/definition.d.ts +++ b/types/graphql/type/definition.d.ts @@ -28,7 +28,7 @@ import { GraphQLSchema } from "./schema"; */ export type GraphQLType = | GraphQLScalarType - | GraphQLObjectType + | GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | GraphQLEnumType @@ -44,9 +44,9 @@ export function isScalarType(type: any): type is GraphQLScalarType; export function assertScalarType(type: any): GraphQLScalarType; -export function isObjectType(type: any): type is GraphQLObjectType; +export function isObjectType(type: any): type is GraphQLObjectType; -export function assertObjectType(type: any): GraphQLObjectType; +export function assertObjectType(type: any): GraphQLObjectType; export function isInterfaceType(type: any): type is GraphQLInterfaceType; @@ -91,14 +91,14 @@ export function assertInputType(type: any): GraphQLInputType; */ export type GraphQLOutputType = | GraphQLScalarType - | GraphQLObjectType + | GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | GraphQLEnumType | GraphQLList | GraphQLNonNull< | GraphQLScalarType - | GraphQLObjectType + | GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | GraphQLEnumType @@ -121,7 +121,7 @@ export function assertLeafType(type: any): GraphQLLeafType; /** * These types may describe the parent context of a selection set. */ -export type GraphQLCompositeType = GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType; +export type GraphQLCompositeType = GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType; export function isCompositeType(type: any): type is GraphQLCompositeType; @@ -214,7 +214,7 @@ export function assertWrappingType(type: any): GraphQLWrappingType; */ export type GraphQLNullableType = | GraphQLScalarType - | GraphQLObjectType + | GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | GraphQLEnumType @@ -234,7 +234,7 @@ export function getNullableType(type: GraphQLNonN */ export type GraphQLNamedType = | GraphQLScalarType - | GraphQLObjectType + | GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | GraphQLEnumType @@ -342,15 +342,15 @@ export interface GraphQLScalarTypeConfig { * }); * */ -export class GraphQLObjectType { +export class GraphQLObjectType { name: string; description: Maybe; astNode: Maybe; extensionASTNodes: Maybe>; - isTypeOf: Maybe>; + isTypeOf: Maybe>; - constructor(config: GraphQLObjectTypeConfig); - getFields(): GraphQLFieldMap; + constructor(config: GraphQLObjectTypeConfig); + getFields(): GraphQLFieldMap; getInterfaces(): GraphQLInterfaceType[]; toString(): string; toJSON(): string; @@ -371,7 +371,7 @@ export type GraphQLTypeResolver = ( value: TSource, context: TContext, info: GraphQLResolveInfo -) => MaybePromise>; +) => MaybePromise | string>>; export type GraphQLIsTypeOfFn = ( source: TSource, @@ -390,7 +390,7 @@ export interface GraphQLResolveInfo { readonly fieldName: string; readonly fieldNodes: ReadonlyArray; readonly returnType: GraphQLOutputType; - readonly parentType: GraphQLObjectType; + readonly parentType: GraphQLObjectType; readonly path: ResponsePath; readonly schema: GraphQLSchema; readonly fragments: { [key: string]: FragmentDefinitionNode }; @@ -533,7 +533,7 @@ export class GraphQLUnionType { constructor(config: GraphQLUnionTypeConfig); - getTypes(): GraphQLObjectType[]; + getTypes(): GraphQLObjectType[]; toString(): string; toJSON(): string; @@ -542,7 +542,7 @@ export class GraphQLUnionType { export interface GraphQLUnionTypeConfig { name: string; - types: Thunk; + types: Thunk[]>; /** * Optionally provide a custom type resolver function. If one is not provided, * the default implementation will call `isTypeOf` on each implementing diff --git a/types/graphql/type/introspection.d.ts b/types/graphql/type/introspection.d.ts index beed0ebeb2..6047f7a3bd 100644 --- a/types/graphql/type/introspection.d.ts +++ b/types/graphql/type/introspection.d.ts @@ -10,13 +10,13 @@ import { } from "./definition"; import { GraphQLField } from "./definition"; -export const __Schema: GraphQLObjectType; -export const __Directive: GraphQLObjectType; +export const __Schema: GraphQLObjectType; +export const __Directive: GraphQLObjectType; export const __DirectiveLocation: GraphQLEnumType; -export const __Type: GraphQLObjectType; -export const __Field: GraphQLObjectType; -export const __InputValue: GraphQLObjectType; -export const __EnumValue: GraphQLObjectType; +export const __Type: GraphQLObjectType; +export const __Field: GraphQLObjectType; +export const __InputValue: GraphQLObjectType; +export const __EnumValue: GraphQLObjectType; export const TypeKind: { SCALAR: "SCALAR"; diff --git a/types/graphql/type/schema.d.ts b/types/graphql/type/schema.d.ts index 7ccb390dbe..5d5a409af2 100644 --- a/types/graphql/type/schema.d.ts +++ b/types/graphql/type/schema.d.ts @@ -41,14 +41,14 @@ export class GraphQLSchema { constructor(config: GraphQLSchemaConfig); - getQueryType(): Maybe; - getMutationType(): Maybe; - getSubscriptionType(): Maybe; + getQueryType(): Maybe>; + getMutationType(): Maybe>; + getSubscriptionType(): Maybe>; getTypeMap(): TypeMap; getType(name: string): Maybe; - getPossibleTypes(abstractType: GraphQLAbstractType): ReadonlyArray; + getPossibleTypes(abstractType: GraphQLAbstractType): ReadonlyArray>; - isPossibleType(abstractType: GraphQLAbstractType, possibleType: GraphQLObjectType): boolean; + isPossibleType(abstractType: GraphQLAbstractType, possibleType: GraphQLObjectType): boolean; getDirectives(): ReadonlyArray; getDirective(name: string): Maybe; @@ -77,9 +77,9 @@ export interface GraphQLSchemaValidationOptions { } export interface GraphQLSchemaConfig extends GraphQLSchemaValidationOptions { - query: Maybe; - mutation?: Maybe; - subscription?: Maybe; + query: Maybe>; + mutation?: Maybe>; + subscription?: Maybe>; types?: Maybe; directives?: Maybe; astNode?: Maybe; diff --git a/types/graphql/utilities/getOperationRootType.d.ts b/types/graphql/utilities/getOperationRootType.d.ts index e1f88e7e13..b1ec93d02e 100644 --- a/types/graphql/utilities/getOperationRootType.d.ts +++ b/types/graphql/utilities/getOperationRootType.d.ts @@ -8,4 +8,4 @@ import { GraphQLObjectType } from "../type/definition"; export function getOperationRootType( schema: GraphQLSchema, operation: OperationDefinitionNode | OperationTypeDefinitionNode -): GraphQLObjectType; +): GraphQLObjectType; From 2950e9c28d11fb82802e07cb8f31996c499492ca Mon Sep 17 00:00:00 2001 From: Sibelius Seraphini Date: Mon, 7 Jan 2019 12:46:42 -0200 Subject: [PATCH 049/160] feat(types): make graphql type parameters not required --- .../graphql-query-complexity/dist/QueryComplexity.d.ts | 2 +- types/graphql-relay/graphql-relay-tests.ts | 4 ++-- types/graphql-relay/index.d.ts | 10 +++++----- types/graphql/type/definition.d.ts | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/types/graphql-query-complexity/dist/QueryComplexity.d.ts b/types/graphql-query-complexity/dist/QueryComplexity.d.ts index 898e2023bb..d092151f91 100644 --- a/types/graphql-query-complexity/dist/QueryComplexity.d.ts +++ b/types/graphql-query-complexity/dist/QueryComplexity.d.ts @@ -20,7 +20,7 @@ export default class QueryComplexity { onOperationDefinitionEnter(operation: OperationDefinitionNode): void; onOperationDefinitionLeave(): GraphQLError | undefined; nodeComplexity(node: FieldNode | FragmentDefinitionNode | InlineFragmentNode | - OperationDefinitionNode, typeDef: GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType, complexity?: number): number; + OperationDefinitionNode, typeDef: GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType, complexity?: number): number; createError(): GraphQLError; getDefaultComplexity(args: object, childScore: number): number; } diff --git a/types/graphql-relay/graphql-relay-tests.ts b/types/graphql-relay/graphql-relay-tests.ts index e490329b65..860fe1075f 100644 --- a/types/graphql-relay/graphql-relay-tests.ts +++ b/types/graphql-relay/graphql-relay-tests.ts @@ -49,8 +49,8 @@ const resolve: GraphQLFieldResolver = (source, args, context, info) => context.flag = "f"; }; const fields: GraphQLFieldConfigMap = {}; -let t: GraphQLObjectType; -let e: GraphQLObjectType; +let t: GraphQLObjectType; +let e: GraphQLObjectType; const def = connectionDefinitions({ connectionFields: fields, edgeFields: fields, diff --git a/types/graphql-relay/index.d.ts b/types/graphql-relay/index.d.ts index 67edfa3df0..a484429ed7 100644 --- a/types/graphql-relay/index.d.ts +++ b/types/graphql-relay/index.d.ts @@ -56,7 +56,7 @@ export const connectionArgs: GraphQLFieldConfigArgumentMap & ForwardConnectionAr export type ConnectionConfigNodeTypeNullable = | GraphQLScalarType - | GraphQLObjectType + | GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | GraphQLEnumType; @@ -75,8 +75,8 @@ export interface ConnectionConfig { } export interface GraphQLConnectionDefinitions { - edgeType: GraphQLObjectType; - connectionType: GraphQLObjectType; + edgeType: GraphQLObjectType; + connectionType: GraphQLObjectType; } /** @@ -256,8 +256,8 @@ export interface GraphQLNodeDefinitions { nodesField: GraphQLFieldConfig; } -export type typeResolverFn = ((any: any) => GraphQLObjectType) | - ((any: any) => Promise); +export type typeResolverFn = ((any: any) => GraphQLObjectType) | + ((any: any) => Promise>); /** * Given a function to map from an ID to an underlying object, and a function diff --git a/types/graphql/type/definition.d.ts b/types/graphql/type/definition.d.ts index a33c81cd3b..42851d2f56 100644 --- a/types/graphql/type/definition.d.ts +++ b/types/graphql/type/definition.d.ts @@ -342,7 +342,7 @@ export interface GraphQLScalarTypeConfig { * }); * */ -export class GraphQLObjectType { +export class GraphQLObjectType { name: string; description: Maybe; astNode: Maybe; From 80a57fc00a05230db44460f3a241d14664e53476 Mon Sep 17 00:00:00 2001 From: Sibelius Seraphini Date: Mon, 7 Jan 2019 12:56:09 -0200 Subject: [PATCH 050/160] feat(types): simplify types --- .../dist/QueryComplexity.d.ts | 2 +- types/graphql-relay/graphql-relay-tests.ts | 4 ++-- types/graphql-relay/index.d.ts | 10 ++++----- types/graphql/execution/execute.d.ts | 6 ++--- types/graphql/type/definition.d.ts | 22 +++++++++---------- types/graphql/type/introspection.d.ts | 12 +++++----- types/graphql/type/schema.d.ts | 16 +++++++------- .../utilities/getOperationRootType.d.ts | 2 +- 8 files changed, 37 insertions(+), 37 deletions(-) diff --git a/types/graphql-query-complexity/dist/QueryComplexity.d.ts b/types/graphql-query-complexity/dist/QueryComplexity.d.ts index d092151f91..898e2023bb 100644 --- a/types/graphql-query-complexity/dist/QueryComplexity.d.ts +++ b/types/graphql-query-complexity/dist/QueryComplexity.d.ts @@ -20,7 +20,7 @@ export default class QueryComplexity { onOperationDefinitionEnter(operation: OperationDefinitionNode): void; onOperationDefinitionLeave(): GraphQLError | undefined; nodeComplexity(node: FieldNode | FragmentDefinitionNode | InlineFragmentNode | - OperationDefinitionNode, typeDef: GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType, complexity?: number): number; + OperationDefinitionNode, typeDef: GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType, complexity?: number): number; createError(): GraphQLError; getDefaultComplexity(args: object, childScore: number): number; } diff --git a/types/graphql-relay/graphql-relay-tests.ts b/types/graphql-relay/graphql-relay-tests.ts index 860fe1075f..e490329b65 100644 --- a/types/graphql-relay/graphql-relay-tests.ts +++ b/types/graphql-relay/graphql-relay-tests.ts @@ -49,8 +49,8 @@ const resolve: GraphQLFieldResolver = (source, args, context, info) => context.flag = "f"; }; const fields: GraphQLFieldConfigMap = {}; -let t: GraphQLObjectType; -let e: GraphQLObjectType; +let t: GraphQLObjectType; +let e: GraphQLObjectType; const def = connectionDefinitions({ connectionFields: fields, edgeFields: fields, diff --git a/types/graphql-relay/index.d.ts b/types/graphql-relay/index.d.ts index a484429ed7..67edfa3df0 100644 --- a/types/graphql-relay/index.d.ts +++ b/types/graphql-relay/index.d.ts @@ -56,7 +56,7 @@ export const connectionArgs: GraphQLFieldConfigArgumentMap & ForwardConnectionAr export type ConnectionConfigNodeTypeNullable = | GraphQLScalarType - | GraphQLObjectType + | GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | GraphQLEnumType; @@ -75,8 +75,8 @@ export interface ConnectionConfig { } export interface GraphQLConnectionDefinitions { - edgeType: GraphQLObjectType; - connectionType: GraphQLObjectType; + edgeType: GraphQLObjectType; + connectionType: GraphQLObjectType; } /** @@ -256,8 +256,8 @@ export interface GraphQLNodeDefinitions { nodesField: GraphQLFieldConfig; } -export type typeResolverFn = ((any: any) => GraphQLObjectType) | - ((any: any) => Promise>); +export type typeResolverFn = ((any: any) => GraphQLObjectType) | + ((any: any) => Promise); /** * Given a function to map from an ID to an underlying object, and a function diff --git a/types/graphql/execution/execute.d.ts b/types/graphql/execution/execute.d.ts index aff0cc0dd3..fc6ad898d1 100644 --- a/types/graphql/execution/execute.d.ts +++ b/types/graphql/execution/execute.d.ts @@ -136,7 +136,7 @@ export function buildExecutionContext( */ export function collectFields( exeContext: ExecutionContext, - runtimeType: GraphQLObjectType, + runtimeType: GraphQLObjectType, selectionSet: SelectionSetNode, fields: { [key: string]: Array }, visitedFragmentNames: { [key: string]: boolean } @@ -146,7 +146,7 @@ export function buildResolveInfo( exeContext: ExecutionContext, fieldDef: GraphQLField, fieldNodes: ReadonlyArray, - parentType: GraphQLObjectType, + parentType: GraphQLObjectType, path: ResponsePath ): GraphQLResolveInfo; @@ -180,6 +180,6 @@ export const defaultFieldResolver: GraphQLFieldResolver; */ export function getFieldDef( schema: GraphQLSchema, - parentType: GraphQLObjectType, + parentType: GraphQLObjectType, fieldName: string ): Maybe>; diff --git a/types/graphql/type/definition.d.ts b/types/graphql/type/definition.d.ts index 42851d2f56..97c16f305c 100644 --- a/types/graphql/type/definition.d.ts +++ b/types/graphql/type/definition.d.ts @@ -28,7 +28,7 @@ import { GraphQLSchema } from "./schema"; */ export type GraphQLType = | GraphQLScalarType - | GraphQLObjectType + | GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | GraphQLEnumType @@ -44,9 +44,9 @@ export function isScalarType(type: any): type is GraphQLScalarType; export function assertScalarType(type: any): GraphQLScalarType; -export function isObjectType(type: any): type is GraphQLObjectType; +export function isObjectType(type: any): type is GraphQLObjectType; -export function assertObjectType(type: any): GraphQLObjectType; +export function assertObjectType(type: any): GraphQLObjectType; export function isInterfaceType(type: any): type is GraphQLInterfaceType; @@ -91,14 +91,14 @@ export function assertInputType(type: any): GraphQLInputType; */ export type GraphQLOutputType = | GraphQLScalarType - | GraphQLObjectType + | GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | GraphQLEnumType | GraphQLList | GraphQLNonNull< | GraphQLScalarType - | GraphQLObjectType + | GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | GraphQLEnumType @@ -121,7 +121,7 @@ export function assertLeafType(type: any): GraphQLLeafType; /** * These types may describe the parent context of a selection set. */ -export type GraphQLCompositeType = GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType; +export type GraphQLCompositeType = GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType; export function isCompositeType(type: any): type is GraphQLCompositeType; @@ -214,7 +214,7 @@ export function assertWrappingType(type: any): GraphQLWrappingType; */ export type GraphQLNullableType = | GraphQLScalarType - | GraphQLObjectType + | GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | GraphQLEnumType @@ -234,7 +234,7 @@ export function getNullableType(type: GraphQLNonN */ export type GraphQLNamedType = | GraphQLScalarType - | GraphQLObjectType + | GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | GraphQLEnumType @@ -390,7 +390,7 @@ export interface GraphQLResolveInfo { readonly fieldName: string; readonly fieldNodes: ReadonlyArray; readonly returnType: GraphQLOutputType; - readonly parentType: GraphQLObjectType; + readonly parentType: GraphQLObjectType; readonly path: ResponsePath; readonly schema: GraphQLSchema; readonly fragments: { [key: string]: FragmentDefinitionNode }; @@ -533,7 +533,7 @@ export class GraphQLUnionType { constructor(config: GraphQLUnionTypeConfig); - getTypes(): GraphQLObjectType[]; + getTypes(): GraphQLObjectType[]; toString(): string; toJSON(): string; @@ -542,7 +542,7 @@ export class GraphQLUnionType { export interface GraphQLUnionTypeConfig { name: string; - types: Thunk[]>; + types: Thunk; /** * Optionally provide a custom type resolver function. If one is not provided, * the default implementation will call `isTypeOf` on each implementing diff --git a/types/graphql/type/introspection.d.ts b/types/graphql/type/introspection.d.ts index 6047f7a3bd..beed0ebeb2 100644 --- a/types/graphql/type/introspection.d.ts +++ b/types/graphql/type/introspection.d.ts @@ -10,13 +10,13 @@ import { } from "./definition"; import { GraphQLField } from "./definition"; -export const __Schema: GraphQLObjectType; -export const __Directive: GraphQLObjectType; +export const __Schema: GraphQLObjectType; +export const __Directive: GraphQLObjectType; export const __DirectiveLocation: GraphQLEnumType; -export const __Type: GraphQLObjectType; -export const __Field: GraphQLObjectType; -export const __InputValue: GraphQLObjectType; -export const __EnumValue: GraphQLObjectType; +export const __Type: GraphQLObjectType; +export const __Field: GraphQLObjectType; +export const __InputValue: GraphQLObjectType; +export const __EnumValue: GraphQLObjectType; export const TypeKind: { SCALAR: "SCALAR"; diff --git a/types/graphql/type/schema.d.ts b/types/graphql/type/schema.d.ts index 5d5a409af2..7ccb390dbe 100644 --- a/types/graphql/type/schema.d.ts +++ b/types/graphql/type/schema.d.ts @@ -41,14 +41,14 @@ export class GraphQLSchema { constructor(config: GraphQLSchemaConfig); - getQueryType(): Maybe>; - getMutationType(): Maybe>; - getSubscriptionType(): Maybe>; + getQueryType(): Maybe; + getMutationType(): Maybe; + getSubscriptionType(): Maybe; getTypeMap(): TypeMap; getType(name: string): Maybe; - getPossibleTypes(abstractType: GraphQLAbstractType): ReadonlyArray>; + getPossibleTypes(abstractType: GraphQLAbstractType): ReadonlyArray; - isPossibleType(abstractType: GraphQLAbstractType, possibleType: GraphQLObjectType): boolean; + isPossibleType(abstractType: GraphQLAbstractType, possibleType: GraphQLObjectType): boolean; getDirectives(): ReadonlyArray; getDirective(name: string): Maybe; @@ -77,9 +77,9 @@ export interface GraphQLSchemaValidationOptions { } export interface GraphQLSchemaConfig extends GraphQLSchemaValidationOptions { - query: Maybe>; - mutation?: Maybe>; - subscription?: Maybe>; + query: Maybe; + mutation?: Maybe; + subscription?: Maybe; types?: Maybe; directives?: Maybe; astNode?: Maybe; diff --git a/types/graphql/utilities/getOperationRootType.d.ts b/types/graphql/utilities/getOperationRootType.d.ts index b1ec93d02e..e1f88e7e13 100644 --- a/types/graphql/utilities/getOperationRootType.d.ts +++ b/types/graphql/utilities/getOperationRootType.d.ts @@ -8,4 +8,4 @@ import { GraphQLObjectType } from "../type/definition"; export function getOperationRootType( schema: GraphQLSchema, operation: OperationDefinitionNode | OperationTypeDefinitionNode -): GraphQLObjectType; +): GraphQLObjectType; From 8bc60d4de59ef475240509c96e5f1b181702f29f Mon Sep 17 00:00:00 2001 From: chenc Date: Tue, 8 Jan 2019 01:11:47 +0800 Subject: [PATCH 051/160] add node-xlsx .d.ts --- types/node-xlsx/index.d.ts | 31 ++++++++++++++++++++++++++++++ types/node-xlsx/node-xlsx-tests.ts | 8 ++++++++ types/node-xlsx/tsconfig.json | 22 +++++++++++++++++++++ types/node-xlsx/tslint.json | 1 + 4 files changed, 62 insertions(+) create mode 100644 types/node-xlsx/index.d.ts create mode 100644 types/node-xlsx/node-xlsx-tests.ts create mode 100644 types/node-xlsx/tsconfig.json create mode 100644 types/node-xlsx/tslint.json diff --git a/types/node-xlsx/index.d.ts b/types/node-xlsx/index.d.ts new file mode 100644 index 0000000000..6840f90592 --- /dev/null +++ b/types/node-xlsx/index.d.ts @@ -0,0 +1,31 @@ +// Type definitions for node-xlsx 0.12 +// Project: https://github.com/mgcrea/node-xlsx#readme +// Definitions by: chenc +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * parsing a xlsx from file/buffer, outputs an object of worksheets + * @param mixed file or buffer + * @param options options is for xlsx + * @returns worksheets data, like: [{ name, data: [] }] + */ +export declare function parse( + mixed: any, + options?: {} + ): { + name: string; + data: {}[]; + }[]; + + /** + * building a xlsx + * @param worksheets worksheets data, like:[[1,2,3],['1', '2','word']] + * @param options spannig multiple rows A1:A4 + * @returns returns a buffer of worksheets + */ + export declare function build(worksheets: any, options?: {}): any; + declare const _default: { + parse: typeof parse; + build: typeof build; + }; + export default _default; diff --git a/types/node-xlsx/node-xlsx-tests.ts b/types/node-xlsx/node-xlsx-tests.ts new file mode 100644 index 0000000000..f9dffcad47 --- /dev/null +++ b/types/node-xlsx/node-xlsx-tests.ts @@ -0,0 +1,8 @@ +import { build } from 'node-xlsx'; +const data = [ + [1, 2, 3], + [true, false, null, 'sheetjs'], + ['foo', 'bar', new Date('2014-02-19T14:30Z'), '0.3'], + ['baz', null, 'qux'], +]; +const buffer = build([{ name: 'mySheetName', data }]); diff --git a/types/node-xlsx/tsconfig.json b/types/node-xlsx/tsconfig.json new file mode 100644 index 0000000000..355898caaf --- /dev/null +++ b/types/node-xlsx/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "node-xlsx-tests.ts" + ] +} diff --git a/types/node-xlsx/tslint.json b/types/node-xlsx/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/node-xlsx/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 75a42d225ed54157a90278e62359501ed68792ec Mon Sep 17 00:00:00 2001 From: chenc Date: Tue, 8 Jan 2019 01:52:47 +0800 Subject: [PATCH 052/160] change tsconfig.js --- types/node-xlsx/tsconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/node-xlsx/tsconfig.json b/types/node-xlsx/tsconfig.json index 355898caaf..168c454276 100644 --- a/types/node-xlsx/tsconfig.json +++ b/types/node-xlsx/tsconfig.json @@ -13,7 +13,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": false }, "files": [ "index.d.ts", From 517fcb3e2d464ac7961007988b6bffcce5686779 Mon Sep 17 00:00:00 2001 From: chenc Date: Tue, 8 Jan 2019 01:55:07 +0800 Subject: [PATCH 053/160] Use 'Array' to instead T[] --- types/node-xlsx/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/node-xlsx/index.d.ts b/types/node-xlsx/index.d.ts index 6840f90592..9f447202bf 100644 --- a/types/node-xlsx/index.d.ts +++ b/types/node-xlsx/index.d.ts @@ -12,10 +12,10 @@ export declare function parse( mixed: any, options?: {} - ): { + ): Array<{ name: string; data: {}[]; - }[]; + }>; /** * building a xlsx From bfc5ff013be07248bd779ad4b04542a965e1b0d9 Mon Sep 17 00:00:00 2001 From: chenc Date: Tue, 8 Jan 2019 01:59:30 +0800 Subject: [PATCH 054/160] fix lint error --- types/node-xlsx/index.d.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/types/node-xlsx/index.d.ts b/types/node-xlsx/index.d.ts index 9f447202bf..1262be153b 100644 --- a/types/node-xlsx/index.d.ts +++ b/types/node-xlsx/index.d.ts @@ -2,19 +2,20 @@ // Project: https://github.com/mgcrea/node-xlsx#readme // Definitions by: chenc // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.0 /** * parsing a xlsx from file/buffer, outputs an object of worksheets * @param mixed file or buffer * @param options options is for xlsx - * @returns worksheets data, like: [{ name, data: [] }] + * @returns worksheets data, like: [{ name, data: [[]] }] */ export declare function parse( mixed: any, options?: {} ): Array<{ name: string; - data: {}[]; + data: Array<[]>; }>; /** From 61b4e9d8537c8baaccf6c6100f4e2843dee0d3d2 Mon Sep 17 00:00:00 2001 From: chenc Date: Tue, 8 Jan 2019 02:06:01 +0800 Subject: [PATCH 055/160] set strictFunctionTypes to true --- types/node-xlsx/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/node-xlsx/tsconfig.json b/types/node-xlsx/tsconfig.json index 168c454276..915d266284 100644 --- a/types/node-xlsx/tsconfig.json +++ b/types/node-xlsx/tsconfig.json @@ -14,7 +14,7 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, - "strictFunctionTypes": false + "strictFunctionTypes": true }, "files": [ "index.d.ts", From f6d46c5dac36366f90e3ca7e199f0bd2214070ad Mon Sep 17 00:00:00 2001 From: chenc Date: Tue, 8 Jan 2019 02:23:24 +0800 Subject: [PATCH 056/160] Add comments and improve return values --- types/node-xlsx/index.d.ts | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/types/node-xlsx/index.d.ts b/types/node-xlsx/index.d.ts index 1262be153b..45c1173be3 100644 --- a/types/node-xlsx/index.d.ts +++ b/types/node-xlsx/index.d.ts @@ -6,27 +6,30 @@ /** * parsing a xlsx from file/buffer, outputs an object of worksheets - * @param mixed file or buffer + * @param mixed file path or buffer * @param options options is for xlsx - * @returns worksheets data, like: [{ name, data: [[]] }] + * @returns worksheets data, like: { name: 'worksheets', data: [[1,2,3],['1', '2','word']] } */ export declare function parse( - mixed: any, + mixed: string | ArrayBuffer, options?: {} - ): Array<{ +): Array<{ name: string; data: Array<[]>; - }>; +}>; - /** - * building a xlsx - * @param worksheets worksheets data, like:[[1,2,3],['1', '2','word']] - * @param options spannig multiple rows A1:A4 - * @returns returns a buffer of worksheets - */ - export declare function build(worksheets: any, options?: {}): any; - declare const _default: { +/** + * building a xlsx + * @param worksheets worksheets data, like:{ name: 'worksheets', data: [[1,2,3],['1', '2','word']] } + * @param options spannig multiple rows A1:A4 + * @returns returns a buffer of worksheets + */ +export declare function build( + worksheets: Array<{ name: string; data: Array }>, + options?: {} +): ArrayBuffer; +declare const _default: { parse: typeof parse; build: typeof build; - }; - export default _default; +}; +export default _default; From 1aba60e3f7b2b3209ab6b7fbae7b0ef64d3f76e4 Mon Sep 17 00:00:00 2001 From: chenc Date: Tue, 8 Jan 2019 02:25:35 +0800 Subject: [PATCH 057/160] fix lint err --- types/node-xlsx/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/node-xlsx/index.d.ts b/types/node-xlsx/index.d.ts index 45c1173be3..bd500d8a4e 100644 --- a/types/node-xlsx/index.d.ts +++ b/types/node-xlsx/index.d.ts @@ -25,7 +25,7 @@ export declare function parse( * @returns returns a buffer of worksheets */ export declare function build( - worksheets: Array<{ name: string; data: Array }>, + worksheets: Array<{ name: string; data: any[][] }>, options?: {} ): ArrayBuffer; declare const _default: { From 3ca0032c6aa4bc2ebe6a9386feaaab070c2ad41a Mon Sep 17 00:00:00 2001 From: Florian Keller Date: Mon, 7 Jan 2019 22:09:30 +0100 Subject: [PATCH 058/160] Add types for exif --- types/exif/exif-tests.ts | 18 +++++ types/exif/index.d.ts | 143 +++++++++++++++++++++++++++++++++++++++ types/exif/tsconfig.json | 23 +++++++ types/exif/tslint.json | 1 + 4 files changed, 185 insertions(+) create mode 100644 types/exif/exif-tests.ts create mode 100644 types/exif/index.d.ts create mode 100644 types/exif/tsconfig.json create mode 100644 types/exif/tslint.json diff --git a/types/exif/exif-tests.ts b/types/exif/exif-tests.ts new file mode 100644 index 0000000000..57d29fc80b --- /dev/null +++ b/types/exif/exif-tests.ts @@ -0,0 +1,18 @@ +import Exif = require('exif'); +const ExifImage = Exif.ExifImage; + +new ExifImage({ image: 'myImage.jpg' }, (error, exifData) => { + if (error) { + console.log(`Error: ${error.message}`); + } else { + console.log(exifData); + } +}); + +Exif('myImage.jpg', (error, exifData, dataPath) => { + if (error) { + console.log(`Error: ${error.message}`); + } else { + console.log(exifData, dataPath); + } +}); diff --git a/types/exif/index.d.ts b/types/exif/index.d.ts new file mode 100644 index 0000000000..78a1859517 --- /dev/null +++ b/types/exif/index.d.ts @@ -0,0 +1,143 @@ +// Type definitions for exif 0.6 +// Project: https://github.com/gomfunkel/node-exif#readme +// Definitions by: Florian Keller +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace Exif { + interface ExifData { + image: { + Copyright?: string; + ExifOffset?: number; + ImageHeight?: number; + ImageWidth?: number; + Make?: string; + Model?: string; + ModifyDate?: string; + Orientation?: number; + ResolutionUnit?: number; + Software?: string; + XResolution?: number; + YCbCrPositioning?: number; + YResolution?: number; + }; + thumbnail: { + Compression?: number; + Orientation?: number; + ResolutionUnit?: number; + ThumbnailLength?: number; + ThumbnailOffset?: number; + XResolution?: number; + YCbCrPositioning?: number; + YResolution?: number; + }; + exif: { + ApertureValue?: number; + BrightnessValue?: number; + ColorSpace?: number; + ComponentsConfiguration?: Buffer; + CompressedBitsPerPixel?: number; + CreateDate?: string; + DateTimeOriginal?: string; + ExifImageHeight?: number; + ExifImageWidth?: number; + ExifVersion?: Buffer; + ExposureCompensation?: number; + ExposureMode?: number; + ExposureProgram?: number; + ExposureTime?: number; + FileSource?: Buffer; + Flash?: number; + FlashpixVersion?: Buffer; + FNumber?: number; + FocalLength?: number; + FocalLengthIn35mmFormat?: number; + FocalPlaneResolutionUnit?: number; + FocalPlaneXResolution?: number; + FocalPlaneYResolution?: number; + ImageUniqueID?: string; + InteropOffset?: number; + ISO?: number; + MakerNote?: Buffer; + MaxApertureValue?: number; + MeteringMode?: number; + SceneCaptureType?: number; + SceneType?: Buffer; + SensingMethod?: number; + ShutterSpeedValue?: number; + UserComment?: Buffer; + WhiteBalance?: number; + }; + gps: { + GPSAltitude?: number; + GPSAltitudeRef?: number; + GPSDateStamp?: string; + GPSLatitude?: number[]; + GPSLatitudeRef?: string; + GPSLongitude?: number[]; + GPSLongitudeRef?: string; + GPSTimeStamp?: number[]; + GPSVersionId?: number[]; + }; + interoperability: { + InteropIndex?: string; + InteropVersion?: Buffer; + }; + makernote: { + AutoBracketing?: number; + BlurWarning?: number; + ExposureWarning?: number; + error?: string; + FlashExposureComp?: number; + FocusMode?: number; + FocusWarning?: number; + FujiFlashMode?: number; + Macro?: number; + Quality?: string; + Sharpness?: number; + SlowSync?: number; + Version?: Buffer; + WhiteBalance?: number; + }; + } + + interface ExifOptions { + agfaMaxEntries?: number; + epsonMaxEntries?: number; + /** node-exif corrects the thumbnail offset in order to have an offset from the start of the buffer/file. */ + fixThumbnailOffset?: boolean; + fujifilmMaxEntries?: number; + ifd0MaxEntries?: number; + ifd1MaxEntries?: number; + /** + * The image to get Exif data from can be either a filesystem path or a Buffer. + * + * If `image` is not specified, the developer must call `loadImage()` to parse the image. + */ + image?: string | Buffer; + /** Specifies the maximum entries to be parsed */ + maxEntries?: number; + maxGpsEntries?: number; + maxInteroperabilityEntries?: number; + noPadding?: boolean; + olympusMaxEntries?: number; + panasonicMaxEntries?: number; + sanyoMaxEntries?: number; + /** An object named "offsets" is added to exifData and contains lot of offsets needed to get thumbnail and other things. */ + tiffOffsets?: number; + } + + type ExifImageCallback = (error: Error | null, data: ExifData) => void; + type ExifCallback = (error: Error | null, data: ExifData, dataPath: string) => void; + + class ExifImage { + constructor(options: ExifOptions | string | Buffer, callback: ExifImageCallback); + constructor(); + loadImage(file: string | Buffer, callback: ExifImageCallback): void; + } +} + +declare function Exif(path: string, callback: Exif.ExifCallback): void; + +export = Exif; diff --git a/types/exif/tsconfig.json b/types/exif/tsconfig.json new file mode 100644 index 0000000000..4c0c12d69a --- /dev/null +++ b/types/exif/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "exif-tests.ts" + ] +} diff --git a/types/exif/tslint.json b/types/exif/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/exif/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 694bcf0030747a08b0701a56f82296de371a903c Mon Sep 17 00:00:00 2001 From: Chives Date: Mon, 7 Jan 2019 17:41:38 -0800 Subject: [PATCH 059/160] Add definitions for CustomEvent in jQuery --- types/jquery/v2/index.d.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/types/jquery/v2/index.d.ts b/types/jquery/v2/index.d.ts index 2643960e6d..068bbfc991 100644 --- a/types/jquery/v2/index.d.ts +++ b/types/jquery/v2/index.d.ts @@ -603,6 +603,14 @@ interface BaseJQueryEventObject extends Event { metaKey: boolean; } +interface JQueryCustomEventObject extends BaseJQueryEventObject { + /** + * @see {@link https://api.jquery.com/category/events/event-object/} + * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent} + */ + detail?: any; +} + interface JQueryInputEventObject extends BaseJQueryEventObject { altKey: boolean; ctrlKey: boolean; @@ -632,7 +640,7 @@ interface JQueryKeyEventObject extends JQueryInputEventObject { keyCode: number; } -interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject{ +interface JQueryEventObject extends BaseJQueryEventObject, JQueryCustomEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject { } /** From 009ff6e86be96fe5c8b9f8300e6359351a847637 Mon Sep 17 00:00:00 2001 From: Benjamin Makus Date: Tue, 8 Jan 2019 02:46:49 +0100 Subject: [PATCH 060/160] add typings for spected --- types/spected/index.d.ts | 26 ++++++++++++++++++++++++++ types/spected/spected-tests.ts | 0 types/spected/tsconfig.json | 22 ++++++++++++++++++++++ types/spected/tslint.json | 1 + 4 files changed, 49 insertions(+) create mode 100644 types/spected/index.d.ts create mode 100644 types/spected/spected-tests.ts create mode 100644 types/spected/tsconfig.json create mode 100644 types/spected/tslint.json diff --git a/types/spected/index.d.ts b/types/spected/index.d.ts new file mode 100644 index 0000000000..3c97ed98b4 --- /dev/null +++ b/types/spected/index.d.ts @@ -0,0 +1,26 @@ +// Type definitions for yup 0.26 +// Project: https://github.com/25th-floor/spected +// Definitions by: Benjamin Makus , +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.2 + +declare var spected: Spected; + +export type Spected = (spec: Spec, input: any) => Result + +export type Predicate = (value: any, inputs: any) => boolean + +export type ErrorMsg = + | string + | ((value: any, field: string) => string) + +export type Spec = {[key: string]: SpecValue } + +export type SpecValue = + | ReadonlyArray<[Predicate, ErrorMsg]> + | ((value: any) => any) + | Spec + +export type Result = {[key: string]: true | Array | Result} + +export default spected; \ No newline at end of file diff --git a/types/spected/spected-tests.ts b/types/spected/spected-tests.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/types/spected/tsconfig.json b/types/spected/tsconfig.json new file mode 100644 index 0000000000..637a75fb12 --- /dev/null +++ b/types/spected/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "spected-tests.ts" + ] +} diff --git a/types/spected/tslint.json b/types/spected/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/spected/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From a98d67071b66c7606975888aeb60c41aee2a7657 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Tue, 8 Jan 2019 02:56:44 +0100 Subject: [PATCH 061/160] [loopbench] Add types --- types/loopbench/index.d.ts | 71 ++++++++++++++++++++++++++++++ types/loopbench/loopbench-tests.ts | 11 +++++ types/loopbench/tsconfig.json | 23 ++++++++++ types/loopbench/tslint.json | 1 + 4 files changed, 106 insertions(+) create mode 100644 types/loopbench/index.d.ts create mode 100644 types/loopbench/loopbench-tests.ts create mode 100644 types/loopbench/tsconfig.json create mode 100644 types/loopbench/tslint.json diff --git a/types/loopbench/index.d.ts b/types/loopbench/index.d.ts new file mode 100644 index 0000000000..bd5e61d3e2 --- /dev/null +++ b/types/loopbench/index.d.ts @@ -0,0 +1,71 @@ +// Type definitions for loopbench 1.2 +// Project: https://github.com/mcollina/loopbench#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import { EventEmitter } from 'events'; + +export = loopbench; + +/** + * Creates a new instance of loopbench. + */ +declare function loopbench(options?: loopbench.Options): loopbench.LoopBench; + +declare namespace loopbench { + interface Options { + /** + * The interval at which the eventLoop should be sampled, defaults to `5`. + */ + sampleInterval?: number; + /** + * The maximum amount of delay that is tolerated before `overLimit` becomes true, + * and the `load` event is emitted, defaults to `42`. + */ + limit?: number; + } + + /** + * Events: + * - `load`, emitted when `instance.delay > instance.limit` + * - `unload`, emitted when `overLimit` goes from `true` and `false` + */ + interface LoopBench extends EventEmitter { + /** + * The delay in milliseconds (and fractions) from the expected run. It might be negative (in older nodes). + */ + readonly delay: number; + + /** + * The maximum amount of delay that is tolerated before `overLimit` becomes true, + * and the `load` event is emitted. + */ + readonly limit: number; + + /** + * Is `true` if the `instance.delay > instance.limit`. + */ + readonly overLimit: boolean; + + /** + * Stops the sampling. + */ + stop(): void; + + addListener(event: 'load' | 'unload', listener: () => void): this; + on(event: 'load' | 'unload', listener: () => void): this; + once(event: 'load' | 'unload', listener: () => void): this; + removeListener(event: 'load' | 'unload', listener: () => void): this; + off(event: 'load' | 'unload', listener: () => void): this; + removeAllListeners(event?: 'load' | 'unload'): this; + listeners(event: 'load' | 'unload'): Array<() => void>; + rawListeners(event: 'load' | 'unload'): Array<() => void>; + emit(event: 'load' | 'unload'): boolean; + listenerCount(type: 'load' | 'unload'): number; + prependListener(event: 'load' | 'unload', listener: () => void): this; + prependOnceListener(event: 'load' | 'unload', listener: () => void): this; + eventNames(): Array<'load' | 'unload'>; + } +} diff --git a/types/loopbench/loopbench-tests.ts b/types/loopbench/loopbench-tests.ts new file mode 100644 index 0000000000..e78a22e08a --- /dev/null +++ b/types/loopbench/loopbench-tests.ts @@ -0,0 +1,11 @@ +import loopbench = require('loopbench'); + +const inst = loopbench(); +inst; // $ExpectType LoopBench +loopbench({ sampleInterval: 1 }); // $ExpectType LoopBench +loopbench({ limit: 1 }); // $ExpectType LoopBench + +inst.delay; // $ExpectType number +inst.limit; // $ExpectType number +inst.overLimit; // $ExpectType boolean +inst.stop(); diff --git a/types/loopbench/tsconfig.json b/types/loopbench/tsconfig.json new file mode 100644 index 0000000000..05e37ab0fa --- /dev/null +++ b/types/loopbench/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "loopbench-tests.ts" + ] +} diff --git a/types/loopbench/tslint.json b/types/loopbench/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/loopbench/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 7c8b923faac7b2df41ef407988d487a302849fcf Mon Sep 17 00:00:00 2001 From: Benjamin Makus Date: Tue, 8 Jan 2019 03:09:00 +0100 Subject: [PATCH 062/160] add typings for spected --- types/spected/index.d.ts | 26 +++++++++++++++----------- types/spected/spected-tests.ts | 0 types/spected/tsconfig.json | 4 ++-- 3 files changed, 17 insertions(+), 13 deletions(-) delete mode 100644 types/spected/spected-tests.ts diff --git a/types/spected/index.d.ts b/types/spected/index.d.ts index 3c97ed98b4..13b46ddd22 100644 --- a/types/spected/index.d.ts +++ b/types/spected/index.d.ts @@ -1,26 +1,30 @@ -// Type definitions for yup 0.26 +// Type definitions for spected 0.26 // Project: https://github.com/25th-floor/spected -// Definitions by: Benjamin Makus , +// Definitions by: Benjamin Makus // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.2 +// TypeScript Version: 2.1 declare var spected: Spected; -export type Spected = (spec: Spec, input: any) => Result +export type Spected = (spec: Spec, input: any) => Result; -export type Predicate = (value: any, inputs: any) => boolean +export type Predicate = (value: any, inputs: any) => boolean; export type ErrorMsg = | string - | ((value: any, field: string) => string) + | ((value: any, field: string) => string); -export type Spec = {[key: string]: SpecValue } +export interface Spec { + [key: string]: SpecValue; +} -export type SpecValue = +export type SpecValue = | ReadonlyArray<[Predicate, ErrorMsg]> | ((value: any) => any) - | Spec + | Spec; -export type Result = {[key: string]: true | Array | Result} +export interface Result { + [key: string]: true | string[] | Result; +} -export default spected; \ No newline at end of file +export default spected; diff --git a/types/spected/spected-tests.ts b/types/spected/spected-tests.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/spected/tsconfig.json b/types/spected/tsconfig.json index 637a75fb12..ecc22c8314 100644 --- a/types/spected/tsconfig.json +++ b/types/spected/tsconfig.json @@ -7,6 +7,7 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, + "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ "../" @@ -16,7 +17,6 @@ "forceConsistentCasingInFileNames": true }, "files": [ - "index.d.ts", - "spected-tests.ts" + "index.d.ts" ] } From 7d60e899640b1b0e1ea496ebce3ad465cff98ae8 Mon Sep 17 00:00:00 2001 From: Malash Date: Tue, 8 Jan 2019 12:44:45 +0800 Subject: [PATCH 063/160] remove unsupported functional data --- types/weixin-app/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/weixin-app/index.d.ts b/types/weixin-app/index.d.ts index 2e2eb35481..89910bd9ba 100644 --- a/types/weixin-app/index.d.ts +++ b/types/weixin-app/index.d.ts @@ -3756,7 +3756,7 @@ declare namespace wx { Methods, Props > = object & - ComponentOptions Data), Methods, Props> & + ComponentOptions & ThisType>>; interface ComponentRelation { From 0249264be7687e2971ff09cf26456c1f7e3623a0 Mon Sep 17 00:00:00 2001 From: Nitesh Phadatare Date: Tue, 8 Jan 2019 11:40:20 +0530 Subject: [PATCH 064/160] [Ramda] Added innerJoin definition --- types/ramda/es/innerJoin.d.ts | 2 ++ types/ramda/index.d.ts | 19 +++++++++++++++++++ types/ramda/ramda-tests.ts | 20 ++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 types/ramda/es/innerJoin.d.ts diff --git a/types/ramda/es/innerJoin.d.ts b/types/ramda/es/innerJoin.d.ts new file mode 100644 index 0000000000..de01332837 --- /dev/null +++ b/types/ramda/es/innerJoin.d.ts @@ -0,0 +1,2 @@ +import { innerJoin } from '../index'; +export default innerJoin; diff --git a/types/ramda/index.d.ts b/types/ramda/index.d.ts index 4832a13fdd..d84c148d96 100644 --- a/types/ramda/index.d.ts +++ b/types/ramda/index.d.ts @@ -25,6 +25,7 @@ // Ryan McCuaig // Drew Wyatt // John Ottenlips +// Nitesh Phadatare // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -110,6 +111,7 @@ /// /// /// +/// /// /// /// @@ -1167,6 +1169,23 @@ declare namespace R { init(list: ReadonlyArray): T[]; init(list: string): string; + /** + * Takes a predicate `pred`, a list `xs`, and a list `ys`, and returns a list + * `xs'` comprising each of the elements of `xs` which is equal to one or more + * elements of `ys` according to `pred`. + * + * `pred` must be a binary function expecting an element from each list. + * + * `xs`, `ys`, and `xs'` are treated as sets, semantically, so ordering should + * not be significant, but since `xs'` is ordered the implementation guarantees + * that its values are in the same order as they appear in `xs`. Duplicates are + * not removed, so `xs'` may contain duplicates if `xs` contains duplicates. + */ + + innerJoin(pred: (a: T1, b: T2) => boolean, list1: ReadonlyArray, list2: ReadonlyArray): T1[]; + innerJoin(pred: (a: T1, b: T2) => boolean): (list1: ReadonlyArray, list2: ReadonlyArray) => T1[]; + innerJoin(pred: (a: T1, b: T2) => boolean, list1: ReadonlyArray): (list2: ReadonlyArray) => T1[]; + /** * Inserts the supplied element into the list, at index index. Note that * this is not destructive: it returns a copy of the list with the changes. diff --git a/types/ramda/ramda-tests.ts b/types/ramda/ramda-tests.ts index 362948adda..b1c0a43b39 100644 --- a/types/ramda/ramda-tests.ts +++ b/types/ramda/ramda-tests.ts @@ -2521,6 +2521,26 @@ class Rectangle { R.symmetricDifferenceWith(eqL)(l1, l2); // => ['dddd', 'c'] }; +() => { + const list1 = [ + {id: 1, name: 'One'}, + {id: 2, name: 'Two'}, + {id: 3, name: 'Three'}, + {id: 4, name: 'Four'}, + {id: 5, name: 'Five'} + ]; + + const list2 = [5, 4, 6]; + function matchId(record: any, id: number): boolean { + return record.id === id; + } + + R.innerJoin(matchId, list1, list2); // [{"id": 4, "name": "Four"}, {"id": 5, "name": "Five"}] + + const innerJoinCurried = R.innerJoin(matchId); + innerJoinCurried(list1, list2); // [{"id": 4, "name": "Four"}, {"id": 5, "name": "Five"}] +}; + /***************************************************************** * String category */ From a827d39967141a9b4515300f3f7b98a4db7f151c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Bruus=20Frank?= Date: Tue, 8 Jan 2019 07:33:48 +0100 Subject: [PATCH 065/160] Added to list of authors. --- types/react-redux/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/react-redux/index.d.ts b/types/react-redux/index.d.ts index ef39b6d87c..667d6ee2f8 100644 --- a/types/react-redux/index.d.ts +++ b/types/react-redux/index.d.ts @@ -12,6 +12,7 @@ // Johann Rakotoharisoa // Anatoli Papirovski // Boris Sergeyev +// Søren Bruus Frank // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 3.0 From faaea9d6ab87da5db155cf42c9deb6e266c6e968 Mon Sep 17 00:00:00 2001 From: Malash Date: Tue, 8 Jan 2019 17:26:44 +0800 Subject: [PATCH 066/160] remove wx.ExtendedComponent --- types/weixin-app/index.d.ts | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/types/weixin-app/index.d.ts b/types/weixin-app/index.d.ts index 2e2eb35481..350a2969f6 100644 --- a/types/weixin-app/index.d.ts +++ b/types/weixin-app/index.d.ts @@ -3700,13 +3700,6 @@ declare namespace wx { type DefaultProps = object | Record; - type ExtendedComponent< - Instance extends Component, - Data, - Methods, - Props - > = CombinedInstance & Component; - // CombinedInstance models the `this`, i.e. instance type for (user defined) component type CombinedInstance< Instance extends Component, @@ -3870,7 +3863,7 @@ declare namespace wx { * 类似于mixins和traits的组件间代码复用机制 * 参见 [behaviors](https://mp.weixin.qq.com/debug/wxadoc/dev/framework/custom-component/behaviors.html) */ - behaviors?: Array<(ComponentOptions>) | string>; + behaviors?: string[]; /** * 组件生命周期声明对象,组件的生命周期:created、attached、ready、moved、detached将收归到lifetimes字段内进行声明, @@ -4198,7 +4191,7 @@ declare function Component( M, P > -): wx.ExtendedComponent, D, M, P>; +): string; /** * behaviors 是用于组件间代码共享的特性 * 类似于一些编程语言中的“mixins”或“traits” @@ -4214,7 +4207,7 @@ declare function Behavior( M, P > -): wx.ExtendedComponent, D, M, P>; +): string; // #endregion // #region Page /** From dae946c356bc3606ae3503c62e3d7dd823b00590 Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Tue, 8 Jan 2019 13:38:11 +0100 Subject: [PATCH 067/160] react-is: sort exports --- types/react-is/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/react-is/index.d.ts b/types/react-is/index.d.ts index 35d4b4db12..59de5135f0 100644 --- a/types/react-is/index.d.ts +++ b/types/react-is/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-is 16.5 +// Type definitions for react-is 16.7 // Project: https://reactjs.org/ // Definitions by: Avi Vahl // Christian Chown @@ -22,8 +22,8 @@ export function isPortal(value: any): value is ReactElement; export function isStrictMode(value: any): value is ReactElement; export const AsyncMode: symbol; -export const ContextProvider: symbol; export const ContextConsumer: symbol; +export const ContextProvider: symbol; export const Element: symbol; export const ForwardRef: symbol; export const Fragment: symbol; From 8347dc7f1586ca6b2c139a71160019512045be28 Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Tue, 8 Jan 2019 14:00:46 +0100 Subject: [PATCH 068/160] react-is: fix forward ref test --- types/react-is/react-is-tests.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/react-is/react-is-tests.tsx b/types/react-is/react-is-tests.tsx index 3b41e9d06f..3c8031e759 100644 --- a/types/react-is/react-is-tests.tsx +++ b/types/react-is/react-is-tests.tsx @@ -74,5 +74,5 @@ ReactIs.typeOf(null) === undefined; ReactIs.typeOf(undefined) === undefined; // ForwardRef -const forwardRef = React.forwardRef((props, ref) =>
); -ReactIs.isForwardRef(forwardRef); // true +ReactIs.isForwardRef(); // true +ReactIs.typeOf() === ReactIs.ForwardRef; // true From b4994d69dea56edd8827f25decee5134cc531b9a Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Tue, 8 Jan 2019 14:11:56 +0100 Subject: [PATCH 069/160] react-is: Add lazy, memo and suspsense types --- types/react-is/index.d.ts | 7 +++++++ types/react-is/react-is-tests.tsx | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/types/react-is/index.d.ts b/types/react-is/index.d.ts index 59de5135f0..b7cce65e18 100644 --- a/types/react-is/index.d.ts +++ b/types/react-is/index.d.ts @@ -2,6 +2,7 @@ // Project: https://reactjs.org/ // Definitions by: Avi Vahl // Christian Chown +// Sebastian Silbermann // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -17,9 +18,12 @@ export function isContextProvider(value: any): value is ReactElement; export function isElement(value: any): value is ReactElement; export function isForwardRef(value: any): value is ReactElement; export function isFragment(value: any): value is ReactElement; +export function isLazy(value: any): value is ReactElement; +export function isMemo(value: any): value is ReactElement; export function isProfiler(value: any): value is ReactElement; export function isPortal(value: any): value is ReactElement; export function isStrictMode(value: any): value is ReactElement; +export function isSuspense(value: any): value is ReactElement; export const AsyncMode: symbol; export const ContextConsumer: symbol; @@ -27,6 +31,9 @@ export const ContextProvider: symbol; export const Element: symbol; export const ForwardRef: symbol; export const Fragment: symbol; +export const Lazy: symbol; +export const Memo: symbol; export const Portal: symbol; export const Profiler: symbol; export const StrictMode: symbol; +export const Suspense: symbol; diff --git a/types/react-is/react-is-tests.tsx b/types/react-is/react-is-tests.tsx index 3c8031e759..f11ded70a6 100644 --- a/types/react-is/react-is-tests.tsx +++ b/types/react-is/react-is-tests.tsx @@ -22,6 +22,12 @@ const ForwardRefComponent = React.forwardRef((props, ref) => React.createElement(ClassComponent, { forwardedRef: ref, ...props }) ); +const LazyComponent = React.lazy(() => + Promise.resolve({ default: ForwardRefComponent }) +); + +const MemoComponent = React.memo(StatelessComponent); + const Context = React.createContext(false); ReactIs.isValidElementType('div'); // true @@ -31,6 +37,8 @@ ReactIs.isValidElementType(ForwardRefComponent); // true ReactIs.isValidElementType(Context.Provider); // true ReactIs.isValidElementType(Context.Consumer); // true ReactIs.isValidElementType(React.createFactory('div')); // true +ReactIs.isValidElementType(LazyComponent); +ReactIs.isValidElementType(MemoComponent); // Determining an Element's Type @@ -76,3 +84,15 @@ ReactIs.typeOf(undefined) === undefined; // ForwardRef ReactIs.isForwardRef(); // true ReactIs.typeOf() === ReactIs.ForwardRef; // true + +// Lazy +ReactIs.isLazy(); // true +ReactIs.typeOf() === ReactIs.Lazy; // true + +// Memo +ReactIs.isMemo(); // true +ReactIs.typeOf() === ReactIs.Memo; // true + +// Suspense +ReactIs.isForwardRef(); // true +ReactIs.typeOf() === ReactIs.Suspense; // true From a762d4c1816f2ec6ba36273033a4eed00ff6860f Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Tue, 8 Jan 2019 15:14:21 +0100 Subject: [PATCH 070/160] react-is: fix lazy and memo tests --- types/react-is/react-is-tests.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/react-is/react-is-tests.tsx b/types/react-is/react-is-tests.tsx index f11ded70a6..afbf0aabb6 100644 --- a/types/react-is/react-is-tests.tsx +++ b/types/react-is/react-is-tests.tsx @@ -86,12 +86,12 @@ ReactIs.isForwardRef(); // true ReactIs.typeOf() === ReactIs.ForwardRef; // true // Lazy -ReactIs.isLazy(); // true -ReactIs.typeOf() === ReactIs.Lazy; // true +ReactIs.isLazy(LazyComponent); // true +ReactIs.typeOf(LazyComponent) === ReactIs.Lazy; // true // Memo -ReactIs.isMemo(); // true -ReactIs.typeOf() === ReactIs.Memo; // true +ReactIs.isMemo(MemoComponent); // true +ReactIs.typeOf(MemoComponent) === ReactIs.Memo; // true // Suspense ReactIs.isForwardRef(); // true From 788657acbe38b19f2356d7b1a4326fc5e9639b55 Mon Sep 17 00:00:00 2001 From: Corey Psoinos Date: Tue, 8 Jan 2019 10:50:31 -0500 Subject: [PATCH 071/160] fix typo: UsageRecordSummarys -> UsageRecordSummaries Changes the spelling of UsageRecordSummarys to UsageRecordSummaries ref: https://github.com/stripe/stripe-node/issues/503 docs: https://stripe.com/docs/api/usage_records/subscription_item_summary_list --- types/stripe/index.d.ts | 19 ++++++++++--------- types/stripe/stripe-tests.ts | 4 ++-- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/types/stripe/index.d.ts b/types/stripe/index.d.ts index 93a9b13300..501a7255b3 100644 --- a/types/stripe/index.d.ts +++ b/types/stripe/index.d.ts @@ -15,6 +15,7 @@ // Ifiok Jr. // Simon Schick // Slava Yultyyev Schick +// Corey Psoinos // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -76,7 +77,7 @@ declare class Stripe { webhooks: Stripe.resources.WebHooks; ephemeralKeys: Stripe.resources.EphemeralKeys; usageRecords: Stripe.resources.UsageRecords; - usageRecordSummarys: Stripe.resources.UsageRecordSummarys; + usageRecordSummaries: Stripe.resources.UsageRecordSummaries; setHost(host: string): void; setHost(host: string, port: string|number): void; @@ -5324,17 +5325,17 @@ declare namespace Stripe { } } - namespace usageRecordSummarys { + namespace usageRecordSummaries { /** * A object with a data property that contains an array of up to limit summaries, * starting after summary starting_after. Each entry in the array is a separate summary object. * If no more summaries are available, the resulting array is empty. */ - interface IUsageRecordSummarys extends IList { - object: 'list'; + interface IUsageRecordSummaries extends IList{ + object: 'list' } - interface IUsageRecordSummarysItem { + interface IUsageRecordSummariesItem { id: string; object: string; invoice: string; @@ -5344,7 +5345,7 @@ declare namespace Stripe { total_usage: number; } - interface IUsageRecordSummarysListOptions extends IListOptions { + interface IUsageRecordSummariesListOptions extends IListOptions{ /** * Only summary items for the given subscription item. */ @@ -5371,12 +5372,12 @@ declare namespace Stripe { create(subscription: string, data: usageRecords.IUsageRecordCreationOptions, response?: IResponseFn): Promise; } - class UsageRecordSummarys extends StripeResource { + class UsageRecordSummaries extends StripeResource { /** * Creates a usage record for a specified subscription item and date, and fills it with a quantity. */ - list(data: usageRecordSummarys.IUsageRecordSummarysListOptions, options: HeaderOptions, response?: IResponseFn): Promise; - list(data: usageRecordSummarys.IUsageRecordSummarysListOptions, response?: IResponseFn): Promise; + list(data: usageRecordSummaries.IUsageRecordSummariesListOptions, options: HeaderOptions, response?: IResponseFn): Promise; + list(data: usageRecordSummaries.IUsageRecordSummariesListOptions, response?: IResponseFn): Promise; } class Accounts extends StripeResource { diff --git a/types/stripe/stripe-tests.ts b/types/stripe/stripe-tests.ts index 30e454f6dc..627b6bb7bb 100644 --- a/types/stripe/stripe-tests.ts +++ b/types/stripe/stripe-tests.ts @@ -1332,8 +1332,8 @@ stripe.ephemeralKeys.create({ customer: "cus_5rfJKDJkuxzh5Q" }, { stripe_version stripe.usageRecords.create('sub_8QwCiwZ9tmMSpt', { action: 'set', quantity: 10000, timestamp: 1537006853 }).then((usageRecord: Stripe.usageRecords.IUsageRecord) => {}); stripe.usageRecords.create('sub_8QwCiwZ9tmMSpt', { action: 'set', quantity: 10000, timestamp: 1537006853 }, (err, usageRecord: Stripe.usageRecords.IUsageRecord) => {}); -stripe.usageRecordSummarys.list({ subscription_item: 'si_C9gimdd2l9qvCU', limit: 10 }).then((usageRecordSummarys: Stripe.usageRecordSummarys.IUsageRecordSummarys) => {}); -stripe.usageRecordSummarys.list({ subscription_item: 'si_C9gimdd2l9qvCU', limit: 10 }, (err, usageRecordSummarys: Stripe.usageRecordSummarys.IUsageRecordSummarys) => {}); +stripe.usageRecordSummaries.list({ subscription_item: 'si_C9gimdd2l9qvCU', limit: 10 }).then((usageRecordSummaries: Stripe.usageRecordSummaries.IUsageRecordSummaries) => { }); +stripe.usageRecordSummaries.list({ subscription_item: 'si_C9gimdd2l9qvCU', limit: 10 }, (err, usageRecordSummaries: Stripe.usageRecordSummaries.IUsageRecordSummaries) => { }); //#region Errors // ################################################################################## From cc9a6a98f2995f68a96f742f3f22cf09f9bb765c Mon Sep 17 00:00:00 2001 From: Corey Psoinos Date: Tue, 8 Jan 2019 12:48:45 -0500 Subject: [PATCH 072/160] address missing spaces caught by travis --- types/stripe/index.d.ts | 4 ++-- types/stripe/stripe-tests.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/types/stripe/index.d.ts b/types/stripe/index.d.ts index 501a7255b3..81a1ffd78d 100644 --- a/types/stripe/index.d.ts +++ b/types/stripe/index.d.ts @@ -5331,7 +5331,7 @@ declare namespace Stripe { * starting after summary starting_after. Each entry in the array is a separate summary object. * If no more summaries are available, the resulting array is empty. */ - interface IUsageRecordSummaries extends IList{ + interface IUsageRecordSummaries extends IList { object: 'list' } @@ -5345,7 +5345,7 @@ declare namespace Stripe { total_usage: number; } - interface IUsageRecordSummariesListOptions extends IListOptions{ + interface IUsageRecordSummariesListOptions extends IListOptions { /** * Only summary items for the given subscription item. */ diff --git a/types/stripe/stripe-tests.ts b/types/stripe/stripe-tests.ts index 627b6bb7bb..154a5e0a58 100644 --- a/types/stripe/stripe-tests.ts +++ b/types/stripe/stripe-tests.ts @@ -1332,8 +1332,8 @@ stripe.ephemeralKeys.create({ customer: "cus_5rfJKDJkuxzh5Q" }, { stripe_version stripe.usageRecords.create('sub_8QwCiwZ9tmMSpt', { action: 'set', quantity: 10000, timestamp: 1537006853 }).then((usageRecord: Stripe.usageRecords.IUsageRecord) => {}); stripe.usageRecords.create('sub_8QwCiwZ9tmMSpt', { action: 'set', quantity: 10000, timestamp: 1537006853 }, (err, usageRecord: Stripe.usageRecords.IUsageRecord) => {}); -stripe.usageRecordSummaries.list({ subscription_item: 'si_C9gimdd2l9qvCU', limit: 10 }).then((usageRecordSummaries: Stripe.usageRecordSummaries.IUsageRecordSummaries) => { }); -stripe.usageRecordSummaries.list({ subscription_item: 'si_C9gimdd2l9qvCU', limit: 10 }, (err, usageRecordSummaries: Stripe.usageRecordSummaries.IUsageRecordSummaries) => { }); +stripe.usageRecordSummaries.list({ subscription_item: 'si_C9gimdd2l9qvCU', limit: 10 }).then((usageRecordSummaries: Stripe.usageRecordSummaries.IUsageRecordSummaries) => {}); +stripe.usageRecordSummaries.list({ subscription_item: 'si_C9gimdd2l9qvCU', limit: 10 }, (err, usageRecordSummaries: Stripe.usageRecordSummaries.IUsageRecordSummaries) => {}); //#region Errors // ################################################################################## From b27342b1c6d5000da39fffd38b8231a294be682e Mon Sep 17 00:00:00 2001 From: Corey Psoinos Date: Tue, 8 Jan 2019 14:27:52 -0500 Subject: [PATCH 073/160] add missing semicolon --- types/stripe/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/stripe/index.d.ts b/types/stripe/index.d.ts index 81a1ffd78d..9f30067495 100644 --- a/types/stripe/index.d.ts +++ b/types/stripe/index.d.ts @@ -5332,7 +5332,7 @@ declare namespace Stripe { * If no more summaries are available, the resulting array is empty. */ interface IUsageRecordSummaries extends IList { - object: 'list' + object: 'list'; } interface IUsageRecordSummariesItem { From 2b59ec43297e987f39a4b46eed4f8adcf7656771 Mon Sep 17 00:00:00 2001 From: Nitesh Phadatare Date: Wed, 9 Jan 2019 09:52:02 +0530 Subject: [PATCH 074/160] [Ramda] innerJoin definition - code review comments --- types/ramda/index.d.ts | 2 +- types/ramda/ramda-tests.ts | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/types/ramda/index.d.ts b/types/ramda/index.d.ts index d84c148d96..8993d59a28 100644 --- a/types/ramda/index.d.ts +++ b/types/ramda/index.d.ts @@ -1179,7 +1179,7 @@ declare namespace R { * `xs`, `ys`, and `xs'` are treated as sets, semantically, so ordering should * not be significant, but since `xs'` is ordered the implementation guarantees * that its values are in the same order as they appear in `xs`. Duplicates are - * not removed, so `xs'` may contain duplicates if `xs` contains duplicates. + * not removed, so `xs` may contain duplicates if `xs` contains duplicates. */ innerJoin(pred: (a: T1, b: T2) => boolean, list1: ReadonlyArray, list2: ReadonlyArray): T1[]; diff --git a/types/ramda/ramda-tests.ts b/types/ramda/ramda-tests.ts index b1c0a43b39..c67ef3944d 100644 --- a/types/ramda/ramda-tests.ts +++ b/types/ramda/ramda-tests.ts @@ -2531,9 +2531,7 @@ class Rectangle { ]; const list2 = [5, 4, 6]; - function matchId(record: any, id: number): boolean { - return record.id === id; - } + const matchId = (record: { id: number, name: string }, id: number): boolean => record.id === id; R.innerJoin(matchId, list1, list2); // [{"id": 4, "name": "Four"}, {"id": 5, "name": "Five"}] From 64a54feb95a74d860c470f9124f2fe71e93c41d3 Mon Sep 17 00:00:00 2001 From: Nitesh Phadatare Date: Wed, 9 Jan 2019 09:58:46 +0530 Subject: [PATCH 075/160] [Ramda] innerJoin definition - Updated code comment --- types/ramda/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/ramda/index.d.ts b/types/ramda/index.d.ts index 8993d59a28..d84c148d96 100644 --- a/types/ramda/index.d.ts +++ b/types/ramda/index.d.ts @@ -1179,7 +1179,7 @@ declare namespace R { * `xs`, `ys`, and `xs'` are treated as sets, semantically, so ordering should * not be significant, but since `xs'` is ordered the implementation guarantees * that its values are in the same order as they appear in `xs`. Duplicates are - * not removed, so `xs` may contain duplicates if `xs` contains duplicates. + * not removed, so `xs'` may contain duplicates if `xs` contains duplicates. */ innerJoin(pred: (a: T1, b: T2) => boolean, list1: ReadonlyArray, list2: ReadonlyArray): T1[]; From 3f04bdfc94fab9b1eafc65528b10deaeb82bc56c Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 9 Jan 2019 20:03:18 +0100 Subject: [PATCH 076/160] [new-github-release-url] Add types --- types/new-github-release-url/index.d.ts | 63 +++++++++++++++++++ .../new-github-release-url-tests.ts | 44 +++++++++++++ types/new-github-release-url/tsconfig.json | 23 +++++++ types/new-github-release-url/tslint.json | 1 + 4 files changed, 131 insertions(+) create mode 100644 types/new-github-release-url/index.d.ts create mode 100644 types/new-github-release-url/new-github-release-url-tests.ts create mode 100644 types/new-github-release-url/tsconfig.json create mode 100644 types/new-github-release-url/tslint.json diff --git a/types/new-github-release-url/index.d.ts b/types/new-github-release-url/index.d.ts new file mode 100644 index 0000000000..3b1be4b7f2 --- /dev/null +++ b/types/new-github-release-url/index.d.ts @@ -0,0 +1,63 @@ +// Type definitions for new-github-release-url 0.1 +// Project: https://github.com/sindresorhus/new-github-release-url#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +export = newGithubReleaseUrl; + +/** + * Returns a URL string. + */ +declare function newGithubReleaseUrl(options: newGithubReleaseUrl.Options): string; + +declare namespace newGithubReleaseUrl { + type Without = { [P in Exclude]?: never }; + type XOR = (T | U) extends object ? (Without & U) | (Without & T) : T | U; + + type Options = XOR; + + interface BaseOptions { + /** + * The tag name of the release. + */ + tag?: string; + /** + * The branch name or commit SHA to point the release's tag at, if the tag doesn't already exist. + * @default The default branch + */ + target?: string; + /** + * The title of the release. + * GitHub shows the `tag` name when not specified. + */ + title?: string; + /** + * The description text of the release. + */ + body?: string; + /** + * Whether the release should be marked as a pre-release. + * @default false + */ + isPrerelease?: boolean; + } + + interface RepoUrlOptions extends BaseOptions { + /** + * The full URL to the repo. + */ + repoUrl: string; + } + + interface UserRepoOptions extends BaseOptions { + /** + * GitHub username or organization. + */ + user: string; + /** + * GitHub repo. + */ + repo: string; + } +} diff --git a/types/new-github-release-url/new-github-release-url-tests.ts b/types/new-github-release-url/new-github-release-url-tests.ts new file mode 100644 index 0000000000..9efe4e83db --- /dev/null +++ b/types/new-github-release-url/new-github-release-url-tests.ts @@ -0,0 +1,44 @@ +import newGithubReleaseUrl = require('new-github-release-url'); + +// $ExpectType string +newGithubReleaseUrl({ + repoUrl: 'https://github.com/sindresorhus/new-github-release-url.git', +}); +// $ExpectType string +newGithubReleaseUrl({ + user: 'sindresorhus', + repo: 'new-github-release-url', +}); +// $ExpectError +newGithubReleaseUrl({ + user: 'sindresorhus', +}); +// $ExpectError +newGithubReleaseUrl({ + repo: 'new-github-release-url', +}); +// $ExpectType string +newGithubReleaseUrl({ + repoUrl: 'https://github.com/sindresorhus/new-github-release-url.git', + tag: 'foo', +}); +// $ExpectType string +newGithubReleaseUrl({ + repoUrl: 'https://github.com/sindresorhus/new-github-release-url.git', + target: 'foo', +}); +// $ExpectType string +newGithubReleaseUrl({ + repoUrl: 'https://github.com/sindresorhus/new-github-release-url.git', + title: 'foo', +}); +// $ExpectType string +newGithubReleaseUrl({ + repoUrl: 'https://github.com/sindresorhus/new-github-release-url.git', + body: 'foo', +}); +// $ExpectType string +newGithubReleaseUrl({ + repoUrl: 'https://github.com/sindresorhus/new-github-release-url.git', + isPrerelease: true, +}); diff --git a/types/new-github-release-url/tsconfig.json b/types/new-github-release-url/tsconfig.json new file mode 100644 index 0000000000..62cf729db4 --- /dev/null +++ b/types/new-github-release-url/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "new-github-release-url-tests.ts" + ] +} diff --git a/types/new-github-release-url/tslint.json b/types/new-github-release-url/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/new-github-release-url/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 1424b551719a8b17367b47aaef4400d274c8694c Mon Sep 17 00:00:00 2001 From: Alex Jerabek Date: Wed, 9 Jan 2019 11:14:49 -0800 Subject: [PATCH 077/160] Refreshing Excel preview APIs --- types/office-js-preview/index.d.ts | 2778 +++++++++++++++++++++++++--- 1 file changed, 2567 insertions(+), 211 deletions(-) diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index dec070dad5..8a9904d462 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -17753,6 +17753,107 @@ declare namespace OfficeCore { //////////////////////////////////////////////////////////////// declare namespace Excel { + /** Represents which cell properties to load, when used as part of a "range.getCellProperties" method. */ + interface CellPropertiesLoadOptions { + address?: boolean; + addressLocal?: boolean; + format?: Excel.CellPropertiesFormatLoadOptions; + hasSpill?: boolean; + hidden?: boolean; + hyperlink?: boolean; + style?: boolean; + } + /** Represents which row properties to load, when used as part of a "range.getRowProperties" method. */ + interface RowPropertiesLoadOptions extends CellPropertiesLoadOptions { + rowHidden?: boolean; + rowIndex?: boolean; + format?: Excel.CellPropertiesFormatLoadOptions & { + rowHeight?: boolean; + }; + } + /** Represents which column properties to load, when used as part of a "range.getColumnProperties" method. */ + interface ColumnPropertiesLoadOptions extends CellPropertiesLoadOptions { + columnIndex?: boolean; + columnHidden?: boolean; + format?: Excel.CellPropertiesFormatLoadOptions & { + columnWidth?: boolean; + }; + } + /** Represents which properties to load on the format object. */ + interface CellPropertiesFormatLoadOptions { + autoIndent?: boolean; + borders?: Excel.CellPropertiesBorderLoadOptions; + fill?: Excel.CellPropertiesFillLoadOptions; + font?: Excel.CellPropertiesFontLoadOptions; + horizontalAlignment?: boolean; + indentLevel?: boolean; + protection?: boolean; + readingOrder?: boolean; + shrinkToFit?: boolean; + textOrientation?: boolean; + useStandardHeight?: boolean; + useStandardWidth?: boolean; + verticalAlignment?: boolean; + wrapText?: boolean; + } + /** Represents the input parameter of setCellProperties. */ + interface SettableCellProperties { + format?: Excel.CellPropertiesFormat; + hyperlink?: Excel.RangeHyperlink; + style?: string; + } + /** Represents the returned properties of getCellProperties. */ + interface CellProperties extends SettableCellProperties { + address?: string; + addressLocal?: string; + hasSpill?: boolean; + hidden?: boolean; + } + /** Represents the input parameter of setRowProperties. */ + interface SettableRowProperties extends SettableCellProperties { + rowHidden?: boolean; + format?: Excel.CellPropertiesFormat & { + rowHeight?: number; + }; + } + /** Represents the returned properties of getRowProperties. */ + interface RowProperties extends SettableRowProperties { + rowIndex?: number; + address?: string; + addressLocal?: string; + hasSpill?: boolean; + } + /** Represents the input parameter of setColumnProperties. */ + interface SettableColumnProperties extends SettableCellProperties { + columnHidden?: boolean; + format?: Excel.CellPropertiesFormat & { + columnWidth?: number; + }; + } + /** Represents the returned properties of getColumnProperties. */ + interface ColumnProperties extends SettableColumnProperties { + columnIndex?: number; + address?: string; + addressLocal?: string; + hasSpill?: boolean; + } + /** Represents the returned format properties of getCellProperties or format input parameter of setCellProperties. */ + interface CellPropertiesFormat { + autoIndent?: boolean; + borders?: Excel.CellBorderCollection; + fill?: Excel.CellPropertiesFill; + font?: Excel.CellPropertiesFont; + horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; + indentLevel?: number; + protection?: Excel.CellPropertiesProtection; + readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; + shrinkToFit?: boolean; + textOrientation?: number; + useStandardHeight?: boolean; + useStandardWidth?: boolean; + verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + wrapText?: boolean; + } /** * * Creates and opens a new workbook. Optionally, the workbook can be pre-populated with a base64-encoded .xlsx file. @@ -17761,7 +17862,7 @@ declare namespace Excel { * * @param base64File Optional. The base64 encoded .xlsx file. The default value is null. */ - function createWorkbook(base64?: string): Promise; + function createWorkbook(base64?: string): Promise; interface ThreeArrowsSet { [index: number]: Icon; redDownArrow: Icon; @@ -17994,6 +18095,8 @@ declare namespace Excel { * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Excel application. Since the Office add-in and the Excel application run in two different processes, the RequestContext is required to get access to the Excel object model from the add-in. */ function run(context: OfficeExtension.ClientRequestContext, batch: (context: Excel.RequestContext) => Promise): Promise; + function postprocessBindingDescriptor(response: any): any; + function getDataCommonPostprocess(response: any, callArgs: any): any; /** * * Provides information about the binding that raised the SelectionChanged event. @@ -18826,7 +18929,7 @@ declare namespace Excel { context: RequestContext; /** * - * Turn on/off JavaScript events in current taskpane or content add-in. + * Toggle JavaScript events in the current task pane or content add-in. * * [Api set: ExcelApi 1.8] */ @@ -19150,6 +19253,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.4] */ readonly settings: Excel.SettingCollection; + /** + * + * Represents a collection of Slicers associated with the workbook. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly slicers: Excel.SlicerCollection; /** * * Represents a collection of styles associated with the workbook. Read-only. @@ -19300,6 +19411,22 @@ declare namespace Excel { * @beta */ getActiveChartOrNullObject(): Excel.Chart; + /** + * + * Gets the currently active slicer in the workbook. If there is no active slicer, will throw exception when invoke this statement. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getActiveSlicer(): Excel.Slicer; + /** + * + * Gets the currently active slicer in the workbook. If there is no active slicer, will return null object + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getActiveSlicerOrNullObject(): Excel.Slicer; /** * * True if the workbook is being edited by multiple users (co-authoring). @@ -19383,6 +19510,15 @@ declare namespace Excel { * @eventproperty */ readonly onSelectionChanged: OfficeExtension.EventHandlers; + /** + * + * Occurs when a WAC operation occurs. + * + * [Api set: WACOperationEvents 1.1] + * + * @eventproperty + * @beta + */ /** * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) * Whereas the original Excel.Workbook object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorkbookData`) that contains shallow copies of any loaded child properties from the original object. @@ -19509,6 +19645,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ readonly charts: Excel.ChartCollection; + /** + * + * Returns a collection of all the Comments objects on the worksheet. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly comments: Excel.CommentCollection; /** * * Gets an object that can be used to manipulate frozen panes on the worksheet. Read-only. @@ -19561,6 +19705,14 @@ declare namespace Excel { * @beta */ readonly shapes: Excel.ShapeCollection; + /** + * + * Returns collection of slicers that are part of the worksheet. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly slicers: Excel.SlicerCollection; /** * * Collection of tables that are part of the worksheet. Read-only. @@ -20621,6 +20773,8 @@ declare namespace Excel { set(properties: Interfaces.RangeUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.Range): void; + autoFill(destinationRange: Range | string, autoFillType?: Excel.AutoFillType): void; + autoFill(destinationRange: Range | string, autoFillType?: "FillDefault" | "FillCopy" | "FillSeries" | "FillFormats" | "FillValues" | "FillDays" | "FillWeekdays" | "FillMonths" | "FillYears" | "LinearTrend" | "GrowthTrend" | "FlashFill"): void; /** * * Calculates a range of cells on a worksheet. @@ -20766,6 +20920,14 @@ declare namespace Excel { * @param column Column number of the cell to be retrieved. Zero-indexed. */ getCell(row: number, column: number): Excel.Range; + /** + * + * Returns a 2D array, encapsulating the data for each cell's font, fill, borders, alignment, and other properties. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getCellProperties(cellPropertiesLoadOptions: CellPropertiesLoadOptions): OfficeExtension.ClientResult; /** * * Gets a column contained in the range. @@ -20775,6 +20937,14 @@ declare namespace Excel { * @param column Column number of the range to be retrieved. Zero-indexed. */ getColumn(column: number): Excel.Range; + /** + * + * Returns a single-dimensional array, encapsulating the data for each column's font, fill, borders, alignment, and other properties. For properties that are not consistent across each cell within a given column, null will be returned. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getColumnProperties(columnPropertiesLoadOptions: ColumnPropertiesLoadOptions): OfficeExtension.ClientResult; /** * * Gets a certain number of columns to the right of the current Range object. @@ -20882,6 +21052,14 @@ declare namespace Excel { * @param row Row number of the range to be retrieved. Zero-indexed. */ getRow(row: number): Excel.Range; + /** + * + * Returns a single-dimensional array, encapsulating the data for each row's font, fill, borders, alignment, and other properties. For properties that are not consistent across each cell within a given row, null will be returned. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getRowProperties(rowPropertiesLoadOptions: RowPropertiesLoadOptions): OfficeExtension.ClientResult; /** * * Gets a certain number of rows above the current Range object. @@ -21063,6 +21241,22 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ select(): void; + /** + * + * Updates the range based on a 2D array of cell properties , encapsulating things like font, fill, borders, alignment, and so forth. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + setCellProperties(cellPropertiesData: SettableCellProperties[][]): void; + /** + * + * Updates the range based on a single-dimensional array of column properties, encapsulating things like font, fill, borders, alignment, and so forth. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + setColumnProperties(columnPropertiesData: SettableColumnProperties[]): void; /** * * Set a range to be recalculated when the next recalculation occurs. @@ -21071,6 +21265,14 @@ declare namespace Excel { * @beta */ setDirty(): void; + /** + * + * Updates the range based on a single-dimensional array of row properties, encapsulating things like font, fill, borders, alignment, and so forth. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + setRowProperties(rowPropertiesData: SettableRowProperties[]): void; /** * * Displays the card for an active cell if it has rich value content. @@ -21617,6 +21819,126 @@ declare namespace Excel { */ matchCase?: boolean; } + /** + * + * Represents which properties to load on the format.fill object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface CellPropertiesFillLoadOptions { + color?: boolean; + pattern?: boolean; + patternColor?: boolean; + patternTintAndShade?: boolean; + tintAndShade?: boolean; + } + /** + * + * Represents which properties to load on the format.font object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface CellPropertiesFontLoadOptions { + bold?: boolean; + color?: boolean; + italic?: boolean; + name?: boolean; + size?: boolean; + strikethrough?: boolean; + subscript?: boolean; + superscript?: boolean; + tintAndShade?: boolean; + underline?: boolean; + } + /** + * + * Represents which properties to load on the format.borders object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface CellPropertiesBorderLoadOptions { + color?: boolean; + style?: boolean; + tintAndShade?: boolean; + weight?: boolean; + } + /** + * + * Represents the returned format.protection properties of getCell/Row/ColumnProperties or format.protection input parameter of setCell/Row/ColumnProperties. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface CellPropertiesProtection { + formulaHidden?: boolean; + locked?: boolean; + } + /** + * + * Represents the returned format.fill properties of getCell/Row/ColumnProperties or format.fill input parameter of setCell/Row/ColumnProperties. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface CellPropertiesFill { + color?: string; + pattern?: Excel.FillPattern | "None" | "Solid" | "Gray50" | "Gray75" | "Gray25" | "Horizontal" | "Vertical" | "Down" | "Up" | "Checker" | "SemiGray75" | "LightHorizontal" | "LightVertical" | "LightDown" | "LightUp" | "Grid" | "CrissCross" | "Gray16" | "Gray8" | "LinearGradient" | "RectangularGradient"; + patternColor?: string; + patternTintAndShade?: number; + tintAndShade?: number; + } + /** + * + * Represents the returned format.font properties of getCell/Row/ColumnProperties or format.font input parameter of setCell/Row/ColumnProperties. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface CellPropertiesFont { + bold?: boolean; + color?: string; + italic?: boolean; + name?: string; + size?: number; + strikethrough?: boolean; + subscript?: boolean; + superscript?: boolean; + tintAndShade?: number; + underline?: Excel.RangeUnderlineStyle | "None" | "Single" | "Double" | "SingleAccountant" | "DoubleAccountant"; + } + /** + * + * Represents the returned format.borders properties of getCell/Row/ColumnProperties or format.borders input parameter of setCell/Row/ColumnProperties. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface CellBorderCollection { + bottom?: Excel.CellBorder; + diagonalDown?: Excel.CellBorder; + diagonalUp?: Excel.CellBorder; + horizontal?: Excel.CellBorder; + left?: Excel.CellBorder; + right?: Excel.CellBorder; + top?: Excel.CellBorder; + vertical?: Excel.CellBorder; + } + /** + * + * Represents the returned single border properties of getCell/Row/ColumnProperties or border property input parameter of setCell/Row/ColumnProperties. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface CellBorder { + color?: string; + style?: Excel.BorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Double" | "SlantDashDot"; + tintAndShade?: number; + weight?: Excel.BorderWeight | "Hairline" | "Thin" | "Medium" | "Thick"; + } /** * * RangeView represents a set of visible cells of the parent range. @@ -21899,7 +22221,7 @@ declare namespace Excel { context: RequestContext; private static DateJSONPrefix; private static DateJSONSuffix; - private static replaceStringDateWithDate(value); + private static replaceStringDateWithDate; /** * * Returns the key that represents the id of the Setting. Read-only. @@ -23324,7 +23646,7 @@ declare namespace Excel { prompt: Excel.DataValidationPrompt; /** * - * Data Validation rule that contains different type of data validation criteria. + * Data validation rule that contains different type of data validation criteria. * * [Api set: ExcelApi 1.8] */ @@ -23528,7 +23850,8 @@ declare namespace Excel { interface BasicDataValidation { /** * - * Gets or sets the Formula1, i.e. minimum value or value depending of the operator. + * Specifies the right-hand operand when the operator property is set to a binary operator such as GreaterThan (the left-hand operand is the value the user tries to enter in the cell). With the ternary operators Between and NotBetween, specifies the lower bound operand. + For example, setting formula1 to 10 and operator to GreaterThan means that valid data for the range must be greater than 10. When setting the value, it can be passed in as a number, a range object, or a string formula (where the string is either a stringified number, a cell reference like "=A1", or a formula like "=MIN(A1, B1)"). When retrieving the value, it will always be returned as a string formula, for example: "=10", "=A1", "=SUM(A1:B5)", etc. * @@ -23537,7 +23860,7 @@ declare namespace Excel { formula1: string | number | Range; /** * - * Gets or sets the Formula2, i.e. maximum value or value depending of the operator. + * With the ternary operators Between and NotBetween, specifies the upper bound operand. Is not used with the binary operators, such as GreaterThan. When setting the value, it can be passed in as a number, a range object, or a string formula (where the string is either a stringified number, a cell reference like "=A1", or a formula like "=MIN(A1, B1)"). When retrieving the value, it will always be returned as a string formula, for example: "=10", "=A1", "=SUM(A1:B5)", etc. * @@ -23561,7 +23884,7 @@ declare namespace Excel { interface DateTimeDataValidation { /** * - * Gets or sets the Formula1, i.e. minimum value or value depending of the operator. + * Specifies the right-hand operand when the operator property is set to a binary operator such as GreaterThan (the left-hand operand is the value the user tries to enter in the cell). With the ternary operators Between and NotBetween, specifies the lower bound operand. When setting the value, it can be passed in as a Date, a Range object, or a string formula (where the string is either a stringified date/time in ISO8601 format, a cell reference like "=A1", or a formula like "=MIN(A1, B1)"). When retrieving the value, it will always be returned as a string formula, for example: "=10", "=A1", "=SUM(A1:B5)", etc. * @@ -23570,7 +23893,7 @@ declare namespace Excel { formula1: string | Date | Range; /** * - * Gets or sets the Formula2, i.e. maximum value or value depending of the operator. + * With the ternary operators Between and NotBetween, specifies the upper bound operand. Is not used with the binary operators, such as GreaterThan. When setting the value, it can be passed in as a Date, a Range object, or a string (where the string is either a stringified date/time in ISO8601 format, a cell reference like "=A1", or a formula like "=MIN(A1, B1)"). When retrieving the value, it will always be returned as a string formula, for example: "=10", "=A1", "=SUM(A1:B5)", etc. * @@ -23617,7 +23940,7 @@ declare namespace Excel { interface CustomDataValidation { /** * - * Custom data validation formula, it is to create special rules, such as preventing duplicates, or limiting the total in a range of cells. + * A custom data validation formula. This creates special input rules, such as preventing duplicates, or limiting the total in a range of cells. * * [Api set: ExcelApi 1.8] */ @@ -23639,14 +23962,14 @@ declare namespace Excel { message: string; /** * - * It determines show error alert dialog or not when users enter invalid data, it defaults to true. + * Determines whether to show an error alert dialog or not when a user enters invalid data. The default is true. * * [Api set: ExcelApi 1.8] */ showAlert: boolean; /** * - * Represents Data validation alert type, please see Excel.DataValidationAlertStyle for details. + * Represents data validation alert type, please see Excel.DataValidationAlertStyle for details. * * [Api set: ExcelApi 1.8] */ @@ -23675,7 +23998,7 @@ declare namespace Excel { message: string; /** * - * It determines showing the prompt or not when user selects a cell with the data validation. + * Determines whether or not to show the prompt when user selects a cell with data validation. * * [Api set: ExcelApi 1.8] */ @@ -23951,7 +24274,7 @@ declare namespace Excel { context: RequestContext; /** * - * HTML color code representing the color of the background, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange") + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange") * * [Api set: ExcelApi 1.1] */ @@ -24532,7 +24855,7 @@ declare namespace Excel { readonly series: Excel.ChartSeriesCollection; /** * - * Represents the title of the specified chart, including the text, visibility, position, and formating of the title. Read-only. + * Represents the title of the specified chart, including the text, visibility, position, and formatting of the title. Read-only. * * [Api set: ExcelApi 1.1] */ @@ -24625,7 +24948,7 @@ declare namespace Excel { showAllFieldButtons: boolean; /** * - * Represents whether to to show the data labels when the value is greater than the maximum value on the value axis. + * Represents whether to show the data labels when the value is greater than the maximum value on the value axis. If value axis became smaller than the size of data points, you can use this property to set whether to show the data labels. This property applies to 2-D charts only. * @@ -25295,7 +25618,7 @@ declare namespace Excel { name: string; /** * - * Specifies how bars and columns are positioned. Can be a value between – 100 and 100. Applies only to 2-D bar and 2-D column charts. Read/Write. + * Specifies how bars and columns are positioned. Can be a value between –100 and 100. Applies only to 2-D bar and 2-D column charts. Read/Write. * * [Api set: ExcelApi 1.8] */ @@ -25460,7 +25783,7 @@ declare namespace Excel { context: RequestContext; /** * - * Represents the fill format of a chart series, which includes background formating information. Read-only. + * Represents the fill format of a chart series, which includes background formatting information. Read-only. * * [Api set: ExcelApi 1.1] */ @@ -25695,7 +26018,7 @@ declare namespace Excel { readonly border: Excel.ChartBorder; /** * - * Represents the fill format of a chart, which includes background formating information. Read-only. + * Represents the fill format of a chart, which includes background formatting information. Read-only. * * [Api set: ExcelApi 1.1] */ @@ -26033,7 +26356,7 @@ declare namespace Excel { position: Excel.ChartAxisPosition | "Automatic" | "Maximum" | "Minimum" | "Custom"; /** * - * Represents the specified axis position where the other axis crosses at. Read Only. Set to this property should use SetPositionAt(double) method. + * Represents the specified axis position where the other axis crosses at. You should use the SetPositionAt(double) method to set this property. * * [Api set: ExcelApi 1.8] */ @@ -26423,7 +26746,7 @@ declare namespace Excel { readonly format: Excel.ChartDataLabelFormat; /** * - * Represents whether data labels automatically generates appropriate text based on context. + * Represents whether data labels automatically generate appropriate text based on context. * * [Api set: ExcelApi 1.8] */ @@ -27236,14 +27559,14 @@ declare namespace Excel { context: RequestContext; /** * - * Represents the height of the legendEntry on the chart Legend. + * Represents the height of the legendEntry on the chart legend. * * [Api set: ExcelApi 1.8] */ readonly height: number; /** * - * Represents the index of the LegendEntry in the Chart Legend. + * Represents the index of the legendEntry in the chart legend. * * [Api set: ExcelApi 1.8] */ @@ -27386,7 +27709,7 @@ declare namespace Excel { readonly border: Excel.ChartBorder; /** * - * Represents the fill format of an object, which includes background formating information. Read-only. + * Represents the fill format of an object, which includes background formatting information. Read-only. * * [Api set: ExcelApi 1.1] */ @@ -27749,7 +28072,7 @@ declare namespace Excel { readonly border: Excel.ChartBorder; /** * - * Represents the fill format of an object, which includes background formating information. Read-only. + * Represents the fill format of an object, which includes background formatting information. Read-only. * * [Api set: ExcelApi 1.1] */ @@ -27828,7 +28151,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.1] * - * @param color HTML color code representing the color of the background, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * @param color HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). */ setSolidColor(color: string): void; /** @@ -28898,7 +29221,7 @@ declare namespace Excel { readonly border: Excel.ChartBorder; /** * - * Represents the fill format of an object, which includes background formating information. + * Represents the fill format of an object, which includes background formatting information. * * [Api set: ExcelApi 1.8] */ @@ -29908,6 +30231,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.3] */ readonly worksheet: Excel.Worksheet; + /** + * + * True if the PivotTable should use custom lists when sorting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enableDataValueEditing: boolean; /** * * Id of the PivotTable. Read-only. @@ -29994,6 +30325,14 @@ declare namespace Excel { class PivotLayout extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; + /** + * + * True if formatting will be automatically formatted when it’s refreshed or when fields are moved + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoFormat: boolean; /** * * True if the field list should be shown or hidden from the UI. @@ -30009,6 +30348,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ layoutType: Excel.PivotLayoutType | "Compact" | "Tabular" | "Outline"; + /** + * + * True if formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + preserveFormatting: boolean; /** * * True if the PivotTable report shows grand totals for columns. @@ -30752,7 +31099,7 @@ declare namespace Excel { position: number; /** * - * Determines whether the data should be sown as a specific summary calculation or not. + * Determines whether the data should be shown as a specific summary calculation or not. * * [Api set: ExcelApi 1.8] */ @@ -30818,14 +31165,14 @@ declare namespace Excel { interface ShowAsRule { /** * - * The Base PivotField to base the ShowAs calculation, if applicable based on the ShowAsCalculation type, else null. + * The base PivotField to base the ShowAs calculation, if applicable based on the ShowAsCalculation type, else null. * * [Api set: ExcelApi 1.8] */ baseField?: Excel.PivotField; /** * - * The Base Item to base the ShowAs calculation on, if applicable based on the ShowAsCalculation type, else null. + * The base Item to base the ShowAs calculation on, if applicable based on the ShowAsCalculation type, else null. * * [Api set: ExcelApi 1.8] */ @@ -31201,7 +31548,7 @@ declare namespace Excel { topSum = "TopSum", bottomItems = "BottomItems", bottomPercent = "BottomPercent", - bottomSum = "BottomSum", + bottomSum = "BottomSum" } /** * @@ -31221,7 +31568,7 @@ declare namespace Excel { * Descending sort. Largest to smallest or Z to A. * */ - descending = "Descending", + descending = "Descending" } /** * @@ -31307,7 +31654,7 @@ declare namespace Excel { * Aggregate using the variance of the data, equivalent to the VARP function. * */ - varianceP = "VarianceP", + varianceP = "VarianceP" } /** * @@ -31412,7 +31759,7 @@ declare namespace Excel { ((value in cell) x (Grand Total of Grand Totals)) / ((Grand Row Total) x (Grand Column Total)) * */ - index = "Index", + index = "Index" } /** * @@ -31451,7 +31798,7 @@ declare namespace Excel { * The filter axis. * */ - filter = "Filter", + filter = "Filter" } /** * @@ -32703,7 +33050,7 @@ declare namespace Excel { formula?: string; /** * - * What the icon conditional formula should be based on. + * What the criterion conditional formula should be based on. * * [Api set: ExcelApi 1.6] */ @@ -33688,6 +34035,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ class StyleCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.Style[]; /** @@ -33699,6 +34048,14 @@ declare namespace Excel { * @param name Name of the style to be added. */ add(name: string): void; + /** + * + * Gets the number of styles in the collection. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getCount(): OfficeExtension.ClientResult; /** * * Gets a style by name. @@ -33708,6 +34065,16 @@ declare namespace Excel { * @param name Name of the style to be retrieved. */ getItem(name: string): Excel.Style; + /** + * + * Gets a style based on its position in the collection. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.Style; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. * @@ -33726,6 +34093,10 @@ declare namespace Excel { load(option?: Excel.Interfaces.StyleCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.StyleCollection; load(option?: string | string[]): Excel.StyleCollection; load(option?: OfficeExtension.LoadOption): Excel.StyleCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.StyleCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.StyleCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.StyleCollectionData; } /** @@ -34554,6 +34925,30 @@ declare namespace Excel { context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.Comment[]; + /** + * + * Creates a new comment(comment thread) based on the cell location and content. Invalid argument will be thrown if the location is larger than one cell. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param content The comment content. + * @param cellAddress Cell to insert comment to. May be an Excel Range object, or a string. If string, must contain the full address, including the sheet name + * @param contentType Optional. Type of the comment content + */ + add(content: string, cellAddress: Range | string, contentType?: Excel.ContentType): Excel.Comment; + /** + * + * Creates a new comment(comment thread) based on the cell location and content. Invalid argument will be thrown if the location is larger than one cell. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param content The comment content. + * @param cellAddress Cell to insert comment to. May be an Excel Range object, or a string. If string, must contain the full address, including the sheet name + * @param contentType Optional. Type of the comment content + */ + add(content: string, cellAddress: Range | string, contentType?: "Plain"): Excel.Comment; /** * * Gets the number of comments in the collection. @@ -34582,6 +34977,26 @@ declare namespace Excel { * @param index Index value of the object to be retrieved. Zero-indexed. */ getItemAt(index: number): Excel.Comment; + /** + * + * Gets a comment on the specific cell in the collection. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param cellAddress Cell which the comment is on. May be an Excel Range object, or a string. If string, must contain the full address, including the sheet name + */ + getItemByCell(cellAddress: Range | string): Excel.Comment; + /** + * + * Gets a comment related to its reply ID in the collection. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param replyId The identifier of comment reply. + */ + getItemByReplyId(replyId: string): Excel.Comment; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. * @@ -34624,6 +35039,14 @@ declare namespace Excel { * @beta */ readonly replies: Excel.CommentReplyCollection; + /** + * + * Get/Set the content. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + content: string; /** * * Represents the comment identifier. Read-only. @@ -34640,6 +35063,28 @@ declare namespace Excel { * @beta */ readonly isParent: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.Comment): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.CommentUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.Comment): void; + /** + * + * Deletes the comment thread. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + delete(): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. * @@ -34701,6 +35146,14 @@ declare namespace Excel { * @param contentType Optional. Type of the comment content */ add(content: string, contentType?: "Plain"): Excel.CommentReply; + /** + * + * Gets the number of comment replies in the collection. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getCount(): OfficeExtension.ClientResult; /** * * Returns a comment reply identified by its ID. Read-only. @@ -34711,6 +35164,16 @@ declare namespace Excel { * @param commentReplyId The identifier for the comment reply. */ getItem(commentReplyId: string): Excel.CommentReply; + /** + * + * Gets a comment reply based on its position in the collection. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.CommentReply; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. * @@ -34745,6 +35208,14 @@ declare namespace Excel { class CommentReply extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; + /** + * + * Get/Set the content. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + content: string; /** * * Represents the comment reply identifier. Read-only. @@ -34761,6 +35232,20 @@ declare namespace Excel { * @beta */ readonly isParent: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.CommentReply): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.CommentReplyUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.CommentReply): void; /** * * Deletes the comment reply. @@ -34769,6 +35254,14 @@ declare namespace Excel { * @beta */ delete(): void; + /** + * + * Get its parent comment of this reply. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getParentComment(): Excel.Comment; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. * @@ -34856,6 +35349,34 @@ declare namespace Excel { * @param base64ImageString A base64 encoded image in JPEG or PNG formats. */ addImage(base64ImageString: string): Excel.Shape; + /** + * + * Adds a line to worksheet. Returns a Shape object that represents the new line. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param startLeft The distance, in points, from the start left of the line to the left side of the worksheet. + * @param startTop The distance, in points, from the start top of the line to the top of the worksheet. + * @param endLeft The distance, in points, from the end left of the line to the left of the worksheet. + * @param endTop The distance, in points, from the end top of the line to the top of the worksheet. + * @param connectorType Represents the connector type. See Excel.ConnectorType for details. + */ + addLine(startLeft: number, startTop: number, endLeft: number, endTop: number, connectorType?: Excel.ConnectorType): Excel.Shape; + /** + * + * Adds a line to worksheet. Returns a Shape object that represents the new line. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param startLeft The distance, in points, from the start left of the line to the left side of the worksheet. + * @param startTop The distance, in points, from the start top of the line to the top of the worksheet. + * @param endLeft The distance, in points, from the end left of the line to the left of the worksheet. + * @param endTop The distance, in points, from the end top of the line to the top of the worksheet. + * @param connectorType Represents the connector type. See Excel.ConnectorType for details. + */ + addLine(startLeft: number, startTop: number, endLeft: number, endTop: number, connectorType?: "Straight" | "Elbow" | "Curve"): Excel.Shape; /** * * Creates an SVG from a XML string and adds it to worksheet. Returns a Shape object that represents the new Image. @@ -34886,14 +35407,24 @@ declare namespace Excel { getCount(): OfficeExtension.ClientResult; /** * - * Returns a shape identified by the shape id. Read-only. + * Gets a shape using its name. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta * - * @param shapeId The identifier for the shape. + * @param name Name of the shape to be retrieved. */ - getItem(shapeId: string): Excel.Shape; + getItem(name: string): Excel.Shape; + /** + * + * Gets a shape based on its position in the collection. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.Shape; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. * @@ -34960,6 +35491,30 @@ declare namespace Excel { * @beta */ readonly image: Excel.Image; + /** + * + * Returns the line object for the shape object. Error will be thrown, if the shape object is other shape type (Like, GeometricShape, SmartArt, etc.) rather than Image. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly line: Excel.Line; + /** + * + * Returns the line formatting of the shape object. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly lineFormat: Excel.ShapeLineFormat; + /** + * + * Represents the parent group of the specified shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly parentGroup: Excel.Shape; /** * * Returns the textFrame object of a shape. Read only. @@ -35018,6 +35573,14 @@ declare namespace Excel { * @beta */ left: number; + /** + * + * Represents the level of the specified shape. Level 0 means the shape is not part of any group, level 1 means the shape is part of a top-level group, etc. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly level: number; /** * * Represents if the aspect ratio locked, in boolean, of the shape. @@ -35028,12 +35591,12 @@ declare namespace Excel { lockAspectRatio: boolean; /** * - * Represents the name of the shape. Read-only. + * Represents the name of the shape. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta */ - readonly name: string; + name: string; /** * * Represents the placment, value that represents the way the object is attached to the cells below it. @@ -35066,7 +35629,7 @@ declare namespace Excel { * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta */ - readonly type: Excel.ShapeType | "Unknown" | "Image" | "GeometricShape" | "Group"; + readonly type: Excel.ShapeType | "Unknown" | "Image" | "GeometricShape" | "Group" | "Line"; /** * * Represents the visibility, in boolean, of the specified shape. @@ -35481,14 +36044,24 @@ declare namespace Excel { getCount(): OfficeExtension.ClientResult; /** * - * Returns a shape identified by the shape id. Read-only. + * Gets a shape using its name. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta * - * @param shapeId The identifier for the shape. + * @param name Name of the shape to be retrieved. */ - getItem(shapeId: string): Excel.Shape; + getItem(name: string): Excel.Shape; + /** + * + * Gets a shape based on its position in the collection. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.Shape; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. * @@ -35513,6 +36086,81 @@ declare namespace Excel { */ toJSON(): Excel.Interfaces.GroupShapeCollectionData; } + /** + * + * Represents a Line object inside a worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class Line extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Returns the shape object for the line. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly shape: Excel.Shape; + /** + * + * Represents the shape identifier. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly id: string; + /** + * + * Represents the connector type for the line. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + connectorType: Excel.ConnectorType | "Straight" | "Elbow" | "Curve"; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.Line): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.LineUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.Line): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.Line` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.Line` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.Line` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.LineLoadOptions): Excel.Line; + load(option?: string | string[]): Excel.Line; + load(option?: { + select?: string; + expand?: string; + }): Excel.Line; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.Line object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.LineData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.LineData; + } /** * * Represents the fill formatting for a shape object. @@ -35606,6 +36254,105 @@ declare namespace Excel { */ toJSON(): Excel.Interfaces.ShapeFillData; } + /** + * + * Represents the line formatting for the shape object. For picture and geometric shape, line formatting represents the border of shape object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class ShapeLineFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Represents the line color in HTML color format, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + color: string; + /** + * + * Represents the line style of the shape. Returns null when line is not visible or has mixed line dash style property (e.g. group type of shape). See Excel.ShapeLineStyle for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dashStyle: Excel.ShapeLineDashStyle | "Dash" | "DashDot" | "DashDotDot" | "LongDash" | "LongDashDot" | "RoundDot" | "Solid" | "SquareDot" | "LongDashDotDot" | "SystemDash" | "SystemDot" | "SystemDashDot"; + /** + * + * Represents the line style of the shape object. Returns null when line is not visible or has mixed line visible property (e.g. group type of shape). See Excel.ShapeLineStyle for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + style: Excel.ShapeLineStyle | "Single" | "ThickBetweenThin" | "ThickThin" | "ThinThick" | "ThinThin"; + /** + * + * Represents the degree of transparency of the specified line as a value from 0.0 (opaque) through 1.0 (clear). Returns null when the shape has mixed line transparency property (e.g. group type of shape). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + transparency: number; + /** + * + * Represents whether the line formatting of a shape element is visible. Returns null when the shape has mixed line visible property (e.g. group type of shape). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + visible: boolean; + /** + * + * Represents weight of the line, in points. Returns null when the line is not visible or has mixed line weight property (e.g. group type of shape). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + weight: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ShapeLineFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ShapeLineFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ShapeLineFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ShapeLineFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ShapeLineFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ShapeLineFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ShapeLineFormatLoadOptions): Excel.ShapeLineFormat; + load(option?: string | string[]): Excel.ShapeLineFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ShapeLineFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ShapeLineFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ShapeLineFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.ShapeLineFormatData; + } /** * * Represents the text frame for a shape object. @@ -35936,6 +36683,444 @@ declare namespace Excel { */ toJSON(): Excel.Interfaces.ShapeFontData; } + /** + * + * Represents a slicer object in the workbook. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class Slicer extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Represents the collection of SlicerItems that are part of the slicer. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly slicerItems: Excel.SlicerItemCollection; + /** + * + * Represents the worksheet containing the slicer. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly worksheet: Excel.Worksheet; + /** + * + * Represents the caption of slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + caption: string; + /** + * + * Represents the height, in points, of the slicer. + Throws an invalid argument exception when set with negative value or zero as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + height: number; + /** + * + * Represents the unique id of slicer. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly id: string; + /** + * + * True if all filters currently applied on the slicer is cleared. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly isFilterCleared: boolean; + /** + * + * Represents the distance, in points, from the left side of the slicer to the left of the worksheet. + Throws an invalid argument exception when set with negative value as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + left: number; + /** + * + * Represents the name of slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name: string; + /** + * + * Represents the name used in the formula. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + nameInFormula: string; + /** + * + * Represents the sort order of the items in the slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + sortBy: Excel.SlicerSortType | "DataSourceOrder" | "Ascending" | "Descending"; + /** + * + * Constant value that represents the Slicer style. Possible values are: SlicerStyleLight1 thru SlicerStyleLight6, TableStyleOther1 thru TableStyleOther2, SlicerStyleDark1 thru SlicerStyleDark6. A custom user-defined style present in the workbook can also be specified. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + style: string; + /** + * + * Represents the distance, in points, from the top edge of the slicer to the right of the worksheet. + Throws an invalid argument exception when set with negative value as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + top: number; + /** + * + * Represents the width, in points, of the slicer. + Throws an invalid argument exception when set with negative value or zero as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + width: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.Slicer): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.SlicerUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.Slicer): void; + /** + * + * Clears all the filters currently applied on the slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + clearFilters(): void; + /** + * + * Deletes the slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + delete(): void; + /** + * + * Returns an array of selected items' names. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getSelectedItems(): OfficeExtension.ClientResult; + /** + * + * Select slicer items based on their names. Previous selection will be cleared. + All items will be deselected if the array is empty. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param items Optional. The specified slicer item names to be selected. + */ + selectItems(items?: string[]): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.Slicer` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.Slicer` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.Slicer` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.SlicerLoadOptions): Excel.Slicer; + load(option?: string | string[]): Excel.Slicer; + load(option?: { + select?: string; + expand?: string; + }): Excel.Slicer; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.Slicer object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SlicerData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.SlicerData; + } + /** + * + * Represents a collection of all the slicer objects on the workbook or a worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class SlicerCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Excel.Slicer[]; + /** + * + * Adds a new slicer to the workbook. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param slicerSource The data source that the new slicer will be based on. It can be a PivotTable object, a Table object or a string. When a PivotTable object is passed, the data source is the source of the PivotTable object. When a Table object is passed, the data source is the Table object. When a string is passed, it is interpreted as the name/id of a PivotTable/Table. + * @param sourceField The field in the data source to filter by. It can be a PivotField object, a TableColumn object, the id of a PivotField or the id/name of TableColumn. + * @param slicerDestination Optional. The worksheet where the new slicer will be created in. It can be a Worksheet object or the name/id of a worksheet. This parameter can be omitted if the slicer collection is retrieved from worksheet. + * @returns The new slicer. + */ + add(slicerSource: string | PivotTable | Table, sourceField: string | PivotField | number | TableColumn, slicerDestination?: string | Worksheet): Excel.Slicer; + /** + * + * Returns the number of slicers in the collection. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a slicer object using its name or id. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param key The name or id of the slicer. + */ + getItem(key: string): Excel.Slicer; + /** + * + * Gets a slicer based on its position in the collection. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.Slicer; + /** + * + * Gets a slicer using its name or id. If the slicer does not exist, will return a null object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param key Name or Id of the slicer to be retrieved. + */ + getItemOrNullObject(key: string): Excel.Slicer; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.SlicerCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.SlicerCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.SlicerCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.SlicerCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.SlicerCollection; + load(option?: string | string[]): Excel.SlicerCollection; + load(option?: OfficeExtension.LoadOption): Excel.SlicerCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.SlicerCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SlicerCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.SlicerCollectionData; + } + /** + * + * Represents a slicer item in a slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class SlicerItem extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * True if the slicer item has data. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly hasData: boolean; + /** + * + * True if the slicer item is selected. Setting this value will not clear other SlicerItems' selected state. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isSelected: boolean; + /** + * + * Represents the unique value representing the slicer item. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly key: string; + /** + * + * Represents the value displayed on UI. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly name: string; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.SlicerItem): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.SlicerItemUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.SlicerItem): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.SlicerItem` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.SlicerItem` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.SlicerItem` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.SlicerItemLoadOptions): Excel.SlicerItem; + load(option?: string | string[]): Excel.SlicerItem; + load(option?: { + select?: string; + expand?: string; + }): Excel.SlicerItem; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.SlicerItem object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SlicerItemData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.SlicerItemData; + } + /** + * + * Represents a collection of all the slicer item objects on the slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class SlicerItemCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Excel.SlicerItem[]; + /** + * + * Returns the number of slicer items in the slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a slicer item object using its key or name. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param key The key or name of the slicer item. + */ + getItem(key: string): Excel.SlicerItem; + /** + * + * Gets a slicer item based on its position in the collection. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.SlicerItem; + /** + * + * Gets a slicer item using its key or name. If the slicer item does not exist, will return a null object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param key Key or name of the slicer to be retrieved. + */ + getItemOrNullObject(key: string): Excel.SlicerItem; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.SlicerItemCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.SlicerItemCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.SlicerItemCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.SlicerItemCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.SlicerItemCollection; + load(option?: string | string[]): Excel.SlicerItemCollection; + load(option?: OfficeExtension.LoadOption): Excel.SlicerItemCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.SlicerItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SlicerItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.SlicerItemCollectionData; + } /** * [Api set: ExcelApi 1.7] */ @@ -35958,21 +37143,21 @@ declare namespace Excel { * Axis displays data series. * */ - series = "Series", + series = "Series" } /** * [Api set: ExcelApi 1.7] */ enum ChartAxisGroup { primary = "Primary", - secondary = "Secondary", + secondary = "Secondary" } /** * [Api set: ExcelApi 1.7] */ enum ChartAxisScaleType { linear = "Linear", - logarithmic = "Logarithmic", + logarithmic = "Logarithmic" } /** * [Api set: ExcelApi 1.7] @@ -35981,7 +37166,7 @@ declare namespace Excel { automatic = "Automatic", maximum = "Maximum", minimum = "Minimum", - custom = "Custom", + custom = "Custom" } /** * [Api set: ExcelApi 1.7] @@ -35990,7 +37175,7 @@ declare namespace Excel { none = "None", cross = "Cross", inside = "Inside", - outside = "Outside", + outside = "Outside" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -35999,7 +37184,7 @@ declare namespace Excel { enum CalculationState { done = "Done", calculating = "Calculating", - pending = "Pending", + pending = "Pending" } /** * [Api set: ExcelApi 1.7] @@ -36008,7 +37193,7 @@ declare namespace Excel { nextToAxis = "NextToAxis", high = "High", low = "Low", - none = "None", + none = "None" } /** * [Api set: ExcelApi 1.7] @@ -36079,7 +37264,7 @@ declare namespace Excel { * This will set the axis in units of custom value. * */ - custom = "Custom", + custom = "Custom" } /** * @@ -36090,7 +37275,7 @@ declare namespace Excel { enum ChartAxisTimeUnit { days = "Days", months = "Months", - years = "Years", + years = "Years" } /** * @@ -36101,7 +37286,7 @@ declare namespace Excel { */ enum ChartBoxQuartileCalculation { inclusive = "Inclusive", - exclusive = "Exclusive", + exclusive = "Exclusive" } /** * @@ -36127,7 +37312,7 @@ declare namespace Excel { * Axis groups data on a time scale. * */ - dateAxis = "DateAxis", + dateAxis = "DateAxis" } /** * @@ -36140,7 +37325,7 @@ declare namespace Excel { category = "Category", auto = "Auto", binWidth = "BinWidth", - binCount = "BinCount", + binCount = "BinCount" } /** * [Api set: ExcelApi 1.7] @@ -36156,7 +37341,7 @@ declare namespace Excel { grey50 = "Grey50", grey75 = "Grey75", automatic = "Automatic", - roundDot = "RoundDot", + roundDot = "RoundDot" } /** * [Api set: ExcelApi 1.1] @@ -36173,7 +37358,7 @@ declare namespace Excel { top = "Top", bottom = "Bottom", bestFit = "BestFit", - callout = "Callout", + callout = "Callout" } /** * @@ -36185,7 +37370,7 @@ declare namespace Excel { enum ChartErrorBarsInclude { both = "Both", minusValues = "MinusValues", - plusValues = "PlusValues", + plusValues = "PlusValues" } /** * @@ -36199,7 +37384,7 @@ declare namespace Excel { percent = "Percent", stDev = "StDev", stError = "StError", - custom = "Custom", + custom = "Custom" } /** * @@ -36216,7 +37401,7 @@ declare namespace Excel { state = "State", country = "Country", continent = "Continent", - world = "World", + world = "World" } /** * @@ -36227,7 +37412,7 @@ declare namespace Excel { */ enum ChartGradientStyle { twoPhaseColor = "TwoPhaseColor", - threePhaseColor = "ThreePhaseColor", + threePhaseColor = "ThreePhaseColor" } /** * @@ -36239,7 +37424,7 @@ declare namespace Excel { enum ChartGradientStyleType { extremeValue = "ExtremeValue", number = "Number", - percent = "Percent", + percent = "Percent" } /** * @@ -36252,7 +37437,7 @@ declare namespace Excel { top = "Top", bottom = "Bottom", left = "Left", - right = "Right", + right = "Right" } /** * [Api set: ExcelApi 1.1] @@ -36264,7 +37449,7 @@ declare namespace Excel { left = "Left", right = "Right", corner = "Corner", - custom = "Custom", + custom = "Custom" } /** * [Api set: ExcelApi 1.7] @@ -36282,14 +37467,14 @@ declare namespace Excel { dash = "Dash", circle = "Circle", plus = "Plus", - picture = "Picture", + picture = "Picture" } /** * [Api set: ExcelApi 1.8] */ enum ChartPlotAreaPosition { automatic = "Automatic", - custom = "Custom", + custom = "Custom" } /** * @@ -36301,7 +37486,7 @@ declare namespace Excel { enum ChartMapLabelStrategy { none = "None", bestFit = "BestFit", - showAll = "ShowAll", + showAll = "ShowAll" } /** * @@ -36315,7 +37500,7 @@ declare namespace Excel { mercator = "Mercator", miller = "Miller", robinson = "Robinson", - albers = "Albers", + albers = "Albers" } /** * @@ -36327,7 +37512,7 @@ declare namespace Excel { enum ChartParentLabelStrategy { none = "None", banner = "Banner", - overlapping = "Overlapping", + overlapping = "Overlapping" } /** * @@ -36343,7 +37528,7 @@ declare namespace Excel { */ auto = "Auto", columns = "Columns", - rows = "Rows", + rows = "Rows" } /** * @@ -36356,7 +37541,7 @@ declare namespace Excel { left = "Left", right = "Right", justify = "Justify", - distributed = "Distributed", + distributed = "Distributed" } /** * @@ -36369,7 +37554,7 @@ declare namespace Excel { bottom = "Bottom", top = "Top", justify = "Justify", - distributed = "Distributed", + distributed = "Distributed" } /** * [Api set: ExcelApi 1.8] @@ -36377,7 +37562,7 @@ declare namespace Excel { enum ChartTickLabelAlignment { center = "Center", left = "Left", - right = "Right", + right = "Right" } /** * [Api set: ExcelApi 1.1] @@ -36464,14 +37649,14 @@ declare namespace Excel { treemap = "Treemap", waterfall = "Waterfall", sunburst = "Sunburst", - funnel = "Funnel", + funnel = "Funnel" } /** * [Api set: ExcelApi 1.1] */ enum ChartUnderlineStyle { none = "None", - single = "Single", + single = "Single" } /** * [Api set: ExcelApi 1.8] @@ -36479,14 +37664,14 @@ declare namespace Excel { enum ChartDisplayBlanksAs { notPlotted = "NotPlotted", zero = "Zero", - interplotted = "Interplotted", + interplotted = "Interplotted" } /** * [Api set: ExcelApi 1.8] */ enum ChartPlotBy { rows = "Rows", - columns = "Columns", + columns = "Columns" } /** * [Api set: ExcelApi 1.8] @@ -36495,7 +37680,7 @@ declare namespace Excel { splitByPosition = "SplitByPosition", splitByValue = "SplitByValue", splitByPercentValue = "SplitByPercentValue", - splitByCustomSplit = "SplitByCustomSplit", + splitByCustomSplit = "SplitByCustomSplit" } /** * [Api set: ExcelApi 1.8] @@ -36517,7 +37702,7 @@ declare namespace Excel { monochromaticPalette10 = "MonochromaticPalette10", monochromaticPalette11 = "MonochromaticPalette11", monochromaticPalette12 = "MonochromaticPalette12", - monochromaticPalette13 = "MonochromaticPalette13", + monochromaticPalette13 = "MonochromaticPalette13" } /** * [Api set: ExcelApi 1.7] @@ -36528,7 +37713,7 @@ declare namespace Excel { logarithmic = "Logarithmic", movingAverage = "MovingAverage", polynomial = "Polynomial", - power = "Power", + power = "Power" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -36538,7 +37723,7 @@ declare namespace Excel { bringToFront = "BringToFront", bringForward = "BringForward", sendToBack = "SendToBack", - sendBackward = "SendBackward", + sendBackward = "SendBackward" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -36549,6 +37734,7 @@ declare namespace Excel { image = "Image", geometricShape = "GeometricShape", group = "Group", + line = "Line" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -36556,7 +37742,7 @@ declare namespace Excel { */ enum ShapeScaleType { currentSize = "CurrentSize", - originalSize = "OriginalSize", + originalSize = "OriginalSize" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -36565,7 +37751,7 @@ declare namespace Excel { enum ShapeScaleFrom { scaleFromTopLeft = "ScaleFromTopLeft", scaleFromMiddle = "ScaleFromMiddle", - scaleFromBottomRight = "ScaleFromBottomRight", + scaleFromBottomRight = "ScaleFromBottomRight" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -36577,7 +37763,7 @@ declare namespace Excel { gradient = "Gradient", pattern = "Pattern", pictureAndTexture = "PictureAndTexture", - mixed = "Mixed", + mixed = "Mixed" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -36600,7 +37786,7 @@ declare namespace Excel { dotDotDashHeavy = "DotDotDashHeavy", wavy = "Wavy", wavyHeavy = "WavyHeavy", - wavyDouble = "WavyDouble", + wavyDouble = "WavyDouble" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -36612,7 +37798,36 @@ declare namespace Excel { jpeg = "JPEG", gif = "GIF", png = "PNG", - svg = "SVG", + svg = "SVG" + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ShapeLineStyle { + single = "Single", + thickBetweenThin = "ThickBetweenThin", + thickThin = "ThickThin", + thinThick = "ThinThick", + thinThin = "ThinThin" + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ShapeLineDashStyle { + dash = "Dash", + dashDot = "DashDot", + dashDotDot = "DashDotDot", + longDash = "LongDash", + longDashDot = "LongDashDot", + roundDot = "RoundDot", + solid = "Solid", + squareDot = "SquareDot", + longDashDotDot = "LongDashDotDot", + systemDash = "SystemDash", + systemDot = "SystemDot", + systemDashDot = "SystemDashDot" } /** * [Api set: ExcelApi 1.1] @@ -36620,7 +37835,7 @@ declare namespace Excel { enum BindingType { range = "Range", table = "Table", - text = "Text", + text = "Text" } /** * [Api set: ExcelApi 1.1] @@ -36633,7 +37848,7 @@ declare namespace Excel { insideVertical = "InsideVertical", insideHorizontal = "InsideHorizontal", diagonalDown = "DiagonalDown", - diagonalUp = "DiagonalUp", + diagonalUp = "DiagonalUp" } /** * [Api set: ExcelApi 1.1] @@ -36646,7 +37861,7 @@ declare namespace Excel { dashDotDot = "DashDotDot", dot = "Dot", double = "Double", - slantDashDot = "SlantDashDot", + slantDashDot = "SlantDashDot" } /** * [Api set: ExcelApi 1.1] @@ -36655,15 +37870,30 @@ declare namespace Excel { hairline = "Hairline", thin = "Thin", medium = "Medium", - thick = "Thick", + thick = "Thick" } /** * [Api set: ExcelApi 1.1] */ enum CalculationMode { + /** + * + * The default recalculation behavior where Excel calculates new formula results every time the relevant data is changed. + * + */ automatic = "Automatic", + /** + * + * Calculates new formula results every time the relevant data is changed, unless the formula is in a data table. + * + */ automaticExceptTables = "AutomaticExceptTables", - manual = "Manual", + /** + * + * Calculations only occur when the user or add-in requests them. + * + */ + manual = "Manual" } /** * [Api set: ExcelApi 1.1] @@ -36686,7 +37916,7 @@ declare namespace Excel { * This will rebuild the full dependency chain, mark all cells as dirty and then recalculate them. * */ - fullRebuild = "FullRebuild", + fullRebuild = "FullRebuild" } /** * [Api set: ExcelApi 1.1 for All/Formats/Contents, 1.7 for Hyperlinks & HyperlinksAndFormats.] @@ -36716,7 +37946,7 @@ declare namespace Excel { * Removes hyperlinks and formatting for the cell but leaves content, conditional formats, and data validation intact. * */ - removeHyperlinks = "RemoveHyperlinks", + removeHyperlinks = "RemoveHyperlinks" } /** * @@ -36727,7 +37957,7 @@ declare namespace Excel { enum ConditionalDataBarAxisFormat { automatic = "Automatic", none = "None", - cellMidPoint = "CellMidPoint", + cellMidPoint = "CellMidPoint" } /** * @@ -36738,7 +37968,7 @@ declare namespace Excel { enum ConditionalDataBarDirection { context = "Context", leftToRight = "LeftToRight", - rightToLeft = "RightToLeft", + rightToLeft = "RightToLeft" } /** * @@ -36748,7 +37978,7 @@ declare namespace Excel { */ enum ConditionalFormatDirection { top = "Top", - bottom = "Bottom", + bottom = "Bottom" } /** * [Api set: ExcelApi 1.6] @@ -36761,7 +37991,7 @@ declare namespace Excel { topBottom = "TopBottom", presetCriteria = "PresetCriteria", containsText = "ContainsText", - cellValue = "CellValue", + cellValue = "CellValue" } /** * @@ -36777,7 +38007,7 @@ declare namespace Excel { number = "Number", percent = "Percent", formula = "Formula", - percentile = "Percentile", + percentile = "Percentile" } /** * @@ -36790,7 +38020,7 @@ declare namespace Excel { number = "Number", percent = "Percent", formula = "Formula", - percentile = "Percentile", + percentile = "Percentile" } /** * @@ -36805,7 +38035,7 @@ declare namespace Excel { number = "Number", percent = "Percent", formula = "Formula", - percentile = "Percentile", + percentile = "Percentile" } /** * @@ -36818,7 +38048,7 @@ declare namespace Excel { topItems = "TopItems", topPercent = "TopPercent", bottomItems = "BottomItems", - bottomPercent = "BottomPercent", + bottomPercent = "BottomPercent" } /** * @@ -36853,7 +38083,7 @@ declare namespace Excel { threeStdDevAboveAverage = "ThreeStdDevAboveAverage", threeStdDevBelowAverage = "ThreeStdDevBelowAverage", uniqueValues = "UniqueValues", - duplicateValues = "DuplicateValues", + duplicateValues = "DuplicateValues" } /** * @@ -36866,7 +38096,7 @@ declare namespace Excel { contains = "Contains", notContains = "NotContains", beginsWith = "BeginsWith", - endsWith = "EndsWith", + endsWith = "EndsWith" } /** * @@ -36883,7 +38113,7 @@ declare namespace Excel { greaterThan = "GreaterThan", lessThan = "LessThan", greaterThanOrEqual = "GreaterThanOrEqual", - lessThanOrEqual = "LessThanOrEqual", + lessThanOrEqual = "LessThanOrEqual" } /** * @@ -36894,7 +38124,7 @@ declare namespace Excel { enum ConditionalIconCriterionOperator { invalid = "Invalid", greaterThan = "GreaterThan", - greaterThanOrEqual = "GreaterThanOrEqual", + greaterThanOrEqual = "GreaterThanOrEqual" } /** * [Api set: ExcelApi 1.6] @@ -36903,7 +38133,7 @@ declare namespace Excel { edgeTop = "EdgeTop", edgeBottom = "EdgeBottom", edgeLeft = "EdgeLeft", - edgeRight = "EdgeRight", + edgeRight = "EdgeRight" } /** * [Api set: ExcelApi 1.6] @@ -36914,7 +38144,7 @@ declare namespace Excel { dash = "Dash", dashDot = "DashDot", dashDotDot = "DashDotDot", - dot = "Dot", + dot = "Dot" } /** * [Api set: ExcelApi 1.6] @@ -36922,7 +38152,7 @@ declare namespace Excel { enum ConditionalRangeFontUnderlineStyle { none = "None", single = "Single", - double = "Double", + double = "Double" } /** * [Api set: CustomFunctions 1.1] @@ -36931,7 +38161,7 @@ declare namespace Excel { enum CustomFunctionType { invalid = "Invalid", script = "Script", - webService = "WebService", + webService = "WebService" } /** * [Api set: CustomFunctions 1.1] @@ -36939,7 +38169,7 @@ declare namespace Excel { */ enum CustomFunctionMetadataFormat { invalid = "Invalid", - openApi = "OpenApi", + openApi = "OpenApi" } /** * @@ -37007,7 +38237,7 @@ declare namespace Excel { * MixedCriteria means that the range has data validation present on some but not all cells * */ - mixedCriteria = "MixedCriteria", + mixedCriteria = "MixedCriteria" } /** * @@ -37023,7 +38253,7 @@ declare namespace Excel { greaterThan = "GreaterThan", lessThan = "LessThan", greaterThanOrEqualTo = "GreaterThanOrEqualTo", - lessThanOrEqualTo = "LessThanOrEqualTo", + lessThanOrEqualTo = "LessThanOrEqualTo" } /** * @@ -37034,14 +38264,14 @@ declare namespace Excel { enum DataValidationAlertStyle { stop = "Stop", warning = "Warning", - information = "Information", + information = "Information" } /** * [Api set: ExcelApi 1.1] */ enum DeleteShiftDirection { up = "Up", - left = "Left", + left = "Left" } /** * [Api set: ExcelApi 1.2] @@ -37081,7 +38311,7 @@ declare namespace Excel { today = "Today", tomorrow = "Tomorrow", yearToDate = "YearToDate", - yesterday = "Yesterday", + yesterday = "Yesterday" } /** * [Api set: ExcelApi 1.2] @@ -37092,7 +38322,7 @@ declare namespace Excel { day = "Day", hour = "Hour", minute = "Minute", - second = "Second", + second = "Second" } /** * [Api set: ExcelApi 1.2] @@ -37107,14 +38337,14 @@ declare namespace Excel { topItems = "TopItems", topPercent = "TopPercent", icon = "Icon", - custom = "Custom", + custom = "Custom" } /** * [Api set: ExcelApi 1.2] */ enum FilterOperator { and = "And", - or = "Or", + or = "Or" } /** * [Api set: ExcelApi 1.1] @@ -37127,7 +38357,7 @@ declare namespace Excel { fill = "Fill", justify = "Justify", centerAcrossSelection = "CenterAcrossSelection", - distributed = "Distributed", + distributed = "Distributed" } /** * [Api set: ExcelApi 1.2] @@ -37155,7 +38385,7 @@ declare namespace Excel { threeTriangles = "ThreeTriangles", fiveBoxes = "FiveBoxes", linkedEntityFinanceIcon = "LinkedEntityFinanceIcon", - linkedEntityMapIcon = "LinkedEntityMapIcon", + linkedEntityMapIcon = "LinkedEntityMapIcon" } /** * [Api set: ExcelApi 1.2] @@ -37163,21 +38393,21 @@ declare namespace Excel { enum ImageFittingMode { fit = "Fit", fitAndCenter = "FitAndCenter", - fill = "Fill", + fill = "Fill" } /** * [Api set: ExcelApi 1.1] */ enum InsertShiftDirection { down = "Down", - right = "Right", + right = "Right" } /** * [Api set: ExcelApi 1.4] */ enum NamedItemScope { worksheet = "Worksheet", - workbook = "Workbook", + workbook = "Workbook" } /** * [Api set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array] @@ -37189,7 +38419,7 @@ declare namespace Excel { boolean = "Boolean", range = "Range", error = "Error", - array = "Array", + array = "Array" } /** * [Api set: ExcelApi 1.1] @@ -37199,7 +38429,7 @@ declare namespace Excel { single = "Single", double = "Double", singleAccountant = "SingleAccountant", - doubleAccountant = "DoubleAccountant", + doubleAccountant = "DoubleAccountant" } /** * [Api set: ExcelApi 1.1] @@ -37207,7 +38437,7 @@ declare namespace Excel { enum SheetVisibility { visible = "Visible", hidden = "Hidden", - veryHidden = "VeryHidden", + veryHidden = "VeryHidden" } /** * [Api set: ExcelApi 1.1 for Unknown, Empty, String, Integer, Double, Boolean, Error. 1.7 for RichValue] @@ -37220,7 +38450,7 @@ declare namespace Excel { double = "Double", boolean = "Boolean", error = "Error", - richValue = "RichValue", + richValue = "RichValue" } /** * @@ -37241,14 +38471,14 @@ declare namespace Excel { * Search in reverse order. * */ - backwards = "Backwards", + backwards = "Backwards" } /** * [Api set: ExcelApi 1.2] */ enum SortOrientation { rows = "Rows", - columns = "Columns", + columns = "Columns" } /** * [Api set: ExcelApi 1.2] @@ -37257,21 +38487,21 @@ declare namespace Excel { value = "Value", cellColor = "CellColor", fontColor = "FontColor", - icon = "Icon", + icon = "Icon" } /** * [Api set: ExcelApi 1.2] */ enum SortDataOption { normal = "Normal", - textAsNumber = "TextAsNumber", + textAsNumber = "TextAsNumber" } /** * [Api set: ExcelApi 1.2] */ enum SortMethod { pinYin = "PinYin", - strokeCount = "StrokeCount", + strokeCount = "StrokeCount" } /** * [Api set: ExcelApi 1.1] @@ -37281,7 +38511,7 @@ declare namespace Excel { center = "Center", bottom = "Bottom", justify = "Justify", - distributed = "Distributed", + distributed = "Distributed" } /** * [Api set: ExcelApi 1.7] @@ -37291,7 +38521,7 @@ declare namespace Excel { boolean = "Boolean", date = "Date", string = "String", - float = "Float", + float = "Float" } /** * [Api set: ExcelApi 1.7] @@ -37308,7 +38538,7 @@ declare namespace Excel { * Remote means event comes from remote user session. * */ - remote = "Remote", + remote = "Remote" } /** * [Api set: ExcelApi 1.7] @@ -37361,7 +38591,7 @@ declare namespace Excel { * CellDeleted represents the data change event is triggered by deleting cells. * */ - cellDeleted = "CellDeleted", + cellDeleted = "CellDeleted" } /** * [Api set: ExcelApi 1.7] @@ -37511,6 +38741,7 @@ declare namespace Excel { * */ worksheetFormatChanged = "WorksheetFormatChanged", + wacoperationEvent = "WACOperationEvent" } /** * [Api set: ExcelApi 1.7] @@ -37531,7 +38762,7 @@ declare namespace Excel { category = "Category", format = "Format", manager = "Manager", - company = "Company", + company = "Company" } /** * [Api set: ExcelApi 1.8] @@ -37554,7 +38785,7 @@ declare namespace Excel { * Subtotals are off. * */ - off = "Off", + off = "Off" } /** * [Api set: ExcelApi 1.8] @@ -37577,7 +38808,7 @@ declare namespace Excel { * Inner fields' items are on same row as outer fields' items and subtotals are always on the bottom. * */ - outline = "Outline", + outline = "Outline" } /** * [Api set: ExcelApi 1.7] @@ -37600,14 +38831,14 @@ declare namespace Excel { * Selection is not allowed for all cells. * */ - none = "None", + none = "None" } /** * [Api set: ExcelApi 1.7] */ enum PageOrientation { portrait = "Portrait", - landscape = "Landscape", + landscape = "Landscape" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -37654,7 +38885,7 @@ declare namespace Excel { envelopePersonal = "EnvelopePersonal", fanfoldUS = "FanfoldUS", fanfoldStdGerman = "FanfoldStdGerman", - fanfoldLegalGerman = "FanfoldLegalGerman", + fanfoldLegalGerman = "FanfoldLegalGerman" } /** * [Api set: ExcelApi 1.7] @@ -37679,7 +38910,7 @@ declare namespace Excel { * Right to left reading order * */ - rightToLeft = "RightToLeft", + rightToLeft = "RightToLeft" } /** * [Api set: ExcelApi 1.7] @@ -37736,7 +38967,7 @@ declare namespace Excel { accent6_20 = "Accent6_20", accent6_40 = "Accent6_40", accent6_60 = "Accent6_60", - explanatoryText = "ExplanatoryText", + explanatoryText = "ExplanatoryText" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -37746,7 +38977,7 @@ declare namespace Excel { asDisplayed = "AsDisplayed", blank = "Blank", dash = "Dash", - notAvailable = "NotAvailable", + notAvailable = "NotAvailable" } /** * [Api set: ExcelApi 1.7] @@ -37756,7 +38987,7 @@ declare namespace Excel { before = "Before", after = "After", beginning = "Beginning", - end = "End", + end = "End" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -37780,7 +39011,7 @@ declare namespace Excel { * Comments will be printed where they were inserted in the worksheet. * */ - inPlace = "InPlace", + inPlace = "InPlace" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -37798,7 +39029,7 @@ declare namespace Excel { * Process across pages or page fields to the right before moving down the rows. * */ - overThenDown = "OverThenDown", + overThenDown = "OverThenDown" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -37822,7 +39053,7 @@ declare namespace Excel { * Assign the page margins in centimeters. * */ - centimeters = "Centimeters", + centimeters = "Centimeters" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -37852,7 +39083,25 @@ declare namespace Excel { * There is a separate first page header/footer, then there is a separate header/footer for odd and even pages. * */ - firstOddAndEven = "FirstOddAndEven", + firstOddAndEven = "FirstOddAndEven" + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum AutoFillType { + fillDefault = "FillDefault", + fillCopy = "FillCopy", + fillSeries = "FillSeries", + fillFormats = "FillFormats", + fillValues = "FillValues", + fillDays = "FillDays", + fillWeekdays = "FillWeekdays", + fillMonths = "FillMonths", + fillYears = "FillYears", + linearTrend = "LinearTrend", + growthTrend = "GrowthTrend", + flashFill = "FlashFill" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -37862,7 +39111,7 @@ declare namespace Excel { all = "All", formulas = "Formulas", values = "Values", - formats = "Formats", + formats = "Formats" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -37873,7 +39122,7 @@ declare namespace Excel { validLinkedData = "ValidLinkedData", disambiguationNeeded = "DisambiguationNeeded", brokenLinkedData = "BrokenLinkedData", - fetchingData = "FetchingData", + fetchingData = "FetchingData" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -38056,7 +39305,16 @@ declare namespace Excel { plaqueTabs = "PlaqueTabs", chartX = "ChartX", chartStar = "ChartStar", - chartPlus = "ChartPlus", + chartPlus = "ChartPlus" + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ConnectorType { + straight = "Straight", + elbow = "Elbow", + curve = "Curve" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -38068,7 +39326,7 @@ declare namespace Excel { * Indicates plain format type of the comment content. * */ - plain = "Plain", + plain = "Plain" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -38128,7 +39386,7 @@ declare namespace Excel { * Cells that are visible. * */ - visible = "Visible", + visible = "Visible" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -38224,7 +39482,7 @@ declare namespace Excel { * Cells that have a string value. * */ - text = "Text", + text = "Text" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -38233,7 +39491,7 @@ declare namespace Excel { enum Placement { twoCell = "TwoCell", oneCell = "OneCell", - absolute = "Absolute", + absolute = "Absolute" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -38260,7 +39518,7 @@ declare namespace Excel { gray16 = "Gray16", gray8 = "Gray8", linearGradient = "LinearGradient", - rectangularGradient = "RectangularGradient", + rectangularGradient = "RectangularGradient" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -38274,7 +39532,7 @@ declare namespace Excel { justifyLow = "JustifyLow", distributed = "Distributed", thaiDistributed = "ThaiDistributed", - shapeTextHorizontalAlignType_MaxEnumIDs = "ShapeTextHorizontalAlignType_MaxEnumIDs", + shapeTextHorizontalAlignType_MaxEnumIDs = "ShapeTextHorizontalAlignType_MaxEnumIDs" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -38286,7 +39544,7 @@ declare namespace Excel { bottom = "Bottom", justified = "Justified", distributed = "Distributed", - shapeTextVerticalAlignType_MaxEnumIDs = "ShapeTextVerticalAlignType_MaxEnumIDs", + shapeTextVerticalAlignType_MaxEnumIDs = "ShapeTextVerticalAlignType_MaxEnumIDs" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -38296,7 +39554,7 @@ declare namespace Excel { overflow = "Overflow", ellipsis = "Ellipsis", clip = "Clip", - shapeTextVertOverflowType_MaxEnumIDs = "ShapeTextVertOverflowType_MaxEnumIDs", + shapeTextVertOverflowType_MaxEnumIDs = "ShapeTextVertOverflowType_MaxEnumIDs" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -38305,7 +39563,7 @@ declare namespace Excel { enum ShapeTextHorzOverflowType { overflow = "Overflow", clip = "Clip", - shapeTextHorzOverflowType_MaxEnumIDs = "ShapeTextHorzOverflowType_MaxEnumIDs", + shapeTextHorzOverflowType_MaxEnumIDs = "ShapeTextHorzOverflowType_MaxEnumIDs" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -38313,7 +39571,7 @@ declare namespace Excel { */ enum ShapeTextReadingOrder { ltr = "LTR", - rtl = "RTL", + rtl = "RTL" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -38327,7 +39585,7 @@ declare namespace Excel { eastAsianVertical = "EastAsianVertical", mongolianVertical = "MongolianVertical", wordArtVerticalRTL = "WordArtVerticalRTL", - shapeTextOrientationType_MaxEnumIDs = "ShapeTextOrientationType_MaxEnumIDs", + shapeTextOrientationType_MaxEnumIDs = "ShapeTextOrientationType_MaxEnumIDs" } /** * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -38337,7 +39595,7 @@ declare namespace Excel { autoSizeNone = "AutoSizeNone", autoSizeTextToFitShape = "AutoSizeTextToFitShape", autoSizeShapeToFitText = "AutoSizeShapeToFitText", - autoSizeMixed = "AutoSizeMixed", + autoSizeMixed = "AutoSizeMixed" } /** * @@ -38358,7 +39616,7 @@ declare namespace Excel { * Discard the possible changes when closing the workbook. * */ - skipSave = "SkipSave", + skipSave = "SkipSave" } /** * @@ -38381,7 +39639,16 @@ declare namespace Excel { Ignored if the workbook was previously saved. * */ - prompt = "Prompt", + prompt = "Prompt" + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum SlicerSortType { + dataSourceOrder = "DataSourceOrder", + ascending = "Ascending", + descending = "Descending" } /** * @@ -42202,7 +43469,7 @@ declare namespace Excel { nonBlankCellOffSheet = "NonBlankCellOffSheet", notImplemented = "NotImplemented", unsupportedOperation = "UnsupportedOperation", - invalidOperationInCellEditMode = "InvalidOperationInCellEditMode", + invalidOperationInCellEditMode = "InvalidOperationInCellEditMode" } module Interfaces { /** @@ -42222,7 +43489,7 @@ declare namespace Excel { interface RuntimeUpdateData { /** * - * Turn on/off JavaScript events in current taskpane or content add-in. + * Toggle JavaScript events in the current task pane or content add-in. * * [Api set: ExcelApi 1.8] */ @@ -42744,7 +44011,7 @@ declare namespace Excel { prompt?: Excel.DataValidationPrompt; /** * - * Data Validation rule that contains different type of data validation criteria. + * Data validation rule that contains different type of data validation criteria. * * [Api set: ExcelApi 1.8] */ @@ -42898,7 +44165,7 @@ declare namespace Excel { interface RangeFillUpdateData { /** * - * HTML color code representing the color of the background, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange") + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange") * * [Api set: ExcelApi 1.1] */ @@ -43121,7 +44388,7 @@ declare namespace Excel { plotArea?: Excel.Interfaces.ChartPlotAreaUpdateData; /** * - * Represents the title of the specified chart, including the text, visibility, position, and formating of the title. + * Represents the title of the specified chart, including the text, visibility, position, and formatting of the title. * * [Api set: ExcelApi 1.1] */ @@ -43200,7 +44467,7 @@ declare namespace Excel { showAllFieldButtons?: boolean; /** * - * Represents whether to to show the data labels when the value is greater than the maximum value on the value axis. + * Represents whether to show the data labels when the value is greater than the maximum value on the value axis. If value axis became smaller than the size of data points, you can use this property to set whether to show the data labels. This property applies to 2-D charts only. * @@ -43556,7 +44823,7 @@ declare namespace Excel { name?: string; /** * - * Specifies how bars and columns are positioned. Can be a value between – 100 and 100. Applies only to 2-D bar and 2-D column charts. Read/Write. + * Specifies how bars and columns are positioned. Can be a value between –100 and 100. Applies only to 2-D bar and 2-D column charts. Read/Write. * * [Api set: ExcelApi 1.8] */ @@ -44026,7 +45293,7 @@ declare namespace Excel { format?: Excel.Interfaces.ChartDataLabelFormatUpdateData; /** * - * Represents whether data labels automatically generates appropriate text based on context. + * Represents whether data labels automatically generate appropriate text based on context. * * [Api set: ExcelApi 1.8] */ @@ -45080,6 +46347,14 @@ declare namespace Excel { } /** An interface for updating data on the PivotTable object, for use in "pivotTable.set({ ... })". */ interface PivotTableUpdateData { + /** + * + * True if the PivotTable should use custom lists when sorting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enableDataValueEditing?: boolean; /** * * Name of the PivotTable. @@ -45098,6 +46373,14 @@ declare namespace Excel { } /** An interface for updating data on the PivotLayout object, for use in "pivotLayout.set({ ... })". */ interface PivotLayoutUpdateData { + /** + * + * True if formatting will be automatically formatted when it’s refreshed or when fields are moved + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoFormat?: boolean; /** * * True if the field list should be shown or hidden from the UI. @@ -45113,6 +46396,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ layoutType?: Excel.PivotLayoutType | "Compact" | "Tabular" | "Outline"; + /** + * + * True if formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + preserveFormatting?: boolean; /** * * True if the PivotTable report shows grand totals for columns. @@ -45234,7 +46525,7 @@ declare namespace Excel { position?: number; /** * - * Determines whether the data should be sown as a specific summary calculation or not. + * Determines whether the data should be shown as a specific summary calculation or not. * * [Api set: ExcelApi 1.8] */ @@ -46367,10 +47658,32 @@ declare namespace Excel { interface CommentCollectionUpdateData { items?: Excel.Interfaces.CommentData[]; } + /** An interface for updating data on the Comment object, for use in "comment.set({ ... })". */ + interface CommentUpdateData { + /** + * + * Get/Set the content. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + content?: string; + } /** An interface for updating data on the CommentReplyCollection object, for use in "commentReplyCollection.set({ ... })". */ interface CommentReplyCollectionUpdateData { items?: Excel.Interfaces.CommentReplyData[]; } + /** An interface for updating data on the CommentReply object, for use in "commentReply.set({ ... })". */ + interface CommentReplyUpdateData { + /** + * + * Get/Set the content. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + content?: string; + } /** An interface for updating data on the ShapeCollection object, for use in "shapeCollection.set({ ... })". */ interface ShapeCollectionUpdateData { items?: Excel.Interfaces.ShapeData[]; @@ -46385,6 +47698,14 @@ declare namespace Excel { * @beta */ fill?: Excel.Interfaces.ShapeFillUpdateData; + /** + * + * Returns the line formatting of the shape object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + lineFormat?: Excel.Interfaces.ShapeLineFormatUpdateData; /** * * Returns or sets the alternative descriptive text string for a Shape object when the object is saved to a Web page. @@ -46435,6 +47756,14 @@ declare namespace Excel { * @beta */ lockAspectRatio?: boolean; + /** + * + * Represents the name of the shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name?: string; /** * * Represents the placment, value that represents the way the object is attached to the cells below it. @@ -46482,6 +47811,17 @@ declare namespace Excel { interface GroupShapeCollectionUpdateData { items?: Excel.Interfaces.ShapeData[]; } + /** An interface for updating data on the Line object, for use in "line.set({ ... })". */ + interface LineUpdateData { + /** + * + * Represents the connector type for the line. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + connectorType?: Excel.ConnectorType | "Straight" | "Elbow" | "Curve"; + } /** An interface for updating data on the ShapeFill object, for use in "shapeFill.set({ ... })". */ interface ShapeFillUpdateData { /** @@ -46501,6 +47841,57 @@ declare namespace Excel { */ transparency?: number; } + /** An interface for updating data on the ShapeLineFormat object, for use in "shapeLineFormat.set({ ... })". */ + interface ShapeLineFormatUpdateData { + /** + * + * Represents the line color in HTML color format, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + color?: string; + /** + * + * Represents the line style of the shape. Returns null when line is not visible or has mixed line dash style property (e.g. group type of shape). See Excel.ShapeLineStyle for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dashStyle?: Excel.ShapeLineDashStyle | "Dash" | "DashDot" | "DashDotDot" | "LongDash" | "LongDashDot" | "RoundDot" | "Solid" | "SquareDot" | "LongDashDotDot" | "SystemDash" | "SystemDot" | "SystemDashDot"; + /** + * + * Represents the line style of the shape object. Returns null when line is not visible or has mixed line visible property (e.g. group type of shape). See Excel.ShapeLineStyle for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + style?: Excel.ShapeLineStyle | "Single" | "ThickBetweenThin" | "ThickThin" | "ThinThick" | "ThinThin"; + /** + * + * Represents the degree of transparency of the specified line as a value from 0.0 (opaque) through 1.0 (clear). Returns null when the shape has mixed line transparency property (e.g. group type of shape). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + transparency?: number; + /** + * + * Represents whether the line formatting of a shape element is visible. Returns null when the shape has mixed line visible property (e.g. group type of shape). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + visible?: boolean; + /** + * + * Represents weight of the line, in points. Returns null when the line is not visible or has mixed line weight property (e.g. group type of shape). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + weight?: number; + } /** An interface for updating data on the TextFrame object, for use in "textFrame.set({ ... })". */ interface TextFrameUpdateData { /** @@ -46662,11 +48053,117 @@ declare namespace Excel { */ underline?: Excel.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble"; } + /** An interface for updating data on the Slicer object, for use in "slicer.set({ ... })". */ + interface SlicerUpdateData { + /** + * + * Represents the worksheet containing the slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + worksheet?: Excel.Interfaces.WorksheetUpdateData; + /** + * + * Represents the caption of slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + caption?: string; + /** + * + * Represents the height, in points, of the slicer. + Throws an invalid argument exception when set with negative value or zero as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + height?: number; + /** + * + * Represents the distance, in points, from the left side of the slicer to the left of the worksheet. + Throws an invalid argument exception when set with negative value as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + left?: number; + /** + * + * Represents the name of slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name?: string; + /** + * + * Represents the name used in the formula. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + nameInFormula?: string; + /** + * + * Represents the sort order of the items in the slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + sortBy?: Excel.SlicerSortType | "DataSourceOrder" | "Ascending" | "Descending"; + /** + * + * Constant value that represents the Slicer style. Possible values are: SlicerStyleLight1 thru SlicerStyleLight6, TableStyleOther1 thru TableStyleOther2, SlicerStyleDark1 thru SlicerStyleDark6. A custom user-defined style present in the workbook can also be specified. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + style?: string; + /** + * + * Represents the distance, in points, from the top edge of the slicer to the right of the worksheet. + Throws an invalid argument exception when set with negative value as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + top?: number; + /** + * + * Represents the width, in points, of the slicer. + Throws an invalid argument exception when set with negative value or zero as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + width?: number; + } + /** An interface for updating data on the SlicerCollection object, for use in "slicerCollection.set({ ... })". */ + interface SlicerCollectionUpdateData { + items?: Excel.Interfaces.SlicerData[]; + } + /** An interface for updating data on the SlicerItem object, for use in "slicerItem.set({ ... })". */ + interface SlicerItemUpdateData { + /** + * + * True if the slicer item is selected. Setting this value will not clear other SlicerItems' selected state. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isSelected?: boolean; + } + /** An interface for updating data on the SlicerItemCollection object, for use in "slicerItemCollection.set({ ... })". */ + interface SlicerItemCollectionUpdateData { + items?: Excel.Interfaces.SlicerItemData[]; + } /** An interface describing the data returned by calling "runtime.toJSON()". */ interface RuntimeData { /** * - * Turn on/off JavaScript events in current taskpane or content add-in. + * Toggle JavaScript events in the current task pane or content add-in. * * [Api set: ExcelApi 1.8] */ @@ -46796,6 +48293,14 @@ declare namespace Excel { settings?: Excel.Interfaces.SettingData[]; /** * + * Represents a collection of Slicers associated with the workbook. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + slicers?: Excel.Interfaces.SlicerData[]; + /** + * * Represents a collection of styles associated with the workbook. Read-only. * * [Api set: ExcelApi 1.7] @@ -46921,6 +48426,14 @@ declare namespace Excel { charts?: Excel.Interfaces.ChartData[]; /** * + * Returns a collection of all the Comments objects on the worksheet. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + comments?: Excel.Interfaces.CommentData[]; + /** + * * Gets the horizontal page break collection for the worksheet. This collection only contains manual page breaks. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -46966,6 +48479,14 @@ declare namespace Excel { shapes?: Excel.Interfaces.ShapeData[]; /** * + * Returns collection of slicers that are part of the worksheet. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + slicers?: Excel.Interfaces.SlicerData[]; + /** + * * Collection of tables that are part of the worksheet. Read-only. * * [Api set: ExcelApi 1.1] @@ -47793,7 +49314,7 @@ declare namespace Excel { prompt?: Excel.DataValidationPrompt; /** * - * Data Validation rule that contains different type of data validation criteria. + * Data validation rule that contains different type of data validation criteria. * * [Api set: ExcelApi 1.8] */ @@ -47982,7 +49503,7 @@ declare namespace Excel { interface RangeFillData { /** * - * HTML color code representing the color of the background, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange") + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange") * * [Api set: ExcelApi 1.1] */ @@ -48210,7 +49731,7 @@ declare namespace Excel { series?: Excel.Interfaces.ChartSeriesData[]; /** * - * Represents the title of the specified chart, including the text, visibility, position, and formating of the title. Read-only. + * Represents the title of the specified chart, including the text, visibility, position, and formatting of the title. Read-only. * * [Api set: ExcelApi 1.1] */ @@ -48296,7 +49817,7 @@ declare namespace Excel { showAllFieldButtons?: boolean; /** * - * Represents whether to to show the data labels when the value is greater than the maximum value on the value axis. + * Represents whether to show the data labels when the value is greater than the maximum value on the value axis. If value axis became smaller than the size of data points, you can use this property to set whether to show the data labels. This property applies to 2-D charts only. * @@ -48666,7 +50187,7 @@ declare namespace Excel { name?: string; /** * - * Specifies how bars and columns are positioned. Can be a value between – 100 and 100. Applies only to 2-D bar and 2-D column charts. Read/Write. + * Specifies how bars and columns are positioned. Can be a value between –100 and 100. Applies only to 2-D bar and 2-D column charts. Read/Write. * * [Api set: ExcelApi 1.8] */ @@ -49047,7 +50568,7 @@ declare namespace Excel { position?: Excel.ChartAxisPosition | "Automatic" | "Maximum" | "Minimum" | "Custom"; /** * - * Represents the specified axis position where the other axis crosses at. Read Only. Set to this property should use SetPositionAt(double) method. + * Represents the specified axis position where the other axis crosses at. You should use the SetPositionAt(double) method to set this property. * * [Api set: ExcelApi 1.8] */ @@ -49199,7 +50720,7 @@ declare namespace Excel { format?: Excel.Interfaces.ChartDataLabelFormatData; /** * - * Represents whether data labels automatically generates appropriate text based on context. + * Represents whether data labels automatically generate appropriate text based on context. * * [Api set: ExcelApi 1.8] */ @@ -49627,14 +51148,14 @@ declare namespace Excel { interface ChartLegendEntryData { /** * - * Represents the height of the legendEntry on the chart Legend. + * Represents the height of the legendEntry on the chart legend. * * [Api set: ExcelApi 1.8] */ height?: number; /** * - * Represents the index of the LegendEntry in the Chart Legend. + * Represents the index of the legendEntry in the chart legend. * * [Api set: ExcelApi 1.8] */ @@ -50450,6 +51971,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ rowHierarchies?: Excel.Interfaces.RowColumnPivotHierarchyData[]; + /** + * + * True if the PivotTable should use custom lists when sorting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enableDataValueEditing?: boolean; /** * * Id of the PivotTable. Read-only. @@ -50475,6 +52004,14 @@ declare namespace Excel { } /** An interface describing the data returned by calling "pivotLayout.toJSON()". */ interface PivotLayoutData { + /** + * + * True if formatting will be automatically formatted when it’s refreshed or when fields are moved + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoFormat?: boolean; /** * * True if the field list should be shown or hidden from the UI. @@ -50490,6 +52027,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ layoutType?: Excel.PivotLayoutType | "Compact" | "Tabular" | "Outline"; + /** + * + * True if formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + preserveFormatting?: boolean; /** * * True if the PivotTable report shows grand totals for columns. @@ -50660,7 +52205,7 @@ declare namespace Excel { position?: number; /** * - * Determines whether the data should be sown as a specific summary calculation or not. + * Determines whether the data should be shown as a specific summary calculation or not. * * [Api set: ExcelApi 1.8] */ @@ -51892,6 +53437,14 @@ declare namespace Excel { * @beta */ replies?: Excel.Interfaces.CommentReplyData[]; + /** + * + * Get/Set the content. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + content?: string; /** * * Represents the comment identifier. Read-only. @@ -51915,6 +53468,14 @@ declare namespace Excel { } /** An interface describing the data returned by calling "commentReply.toJSON()". */ interface CommentReplyData { + /** + * + * Get/Set the content. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + content?: string; /** * * Represents the comment reply identifier. Read-only. @@ -51946,6 +53507,14 @@ declare namespace Excel { * @beta */ fill?: Excel.Interfaces.ShapeFillData; + /** + * + * Returns the line formatting of the shape object. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + lineFormat?: Excel.Interfaces.ShapeLineFormatData; /** * * Returns or sets the alternative descriptive text string for a Shape object when the object is saved to a Web page. @@ -51996,6 +53565,14 @@ declare namespace Excel { * @beta */ left?: number; + /** + * + * Represents the level of the specified shape. Level 0 means the shape is not part of any group, level 1 means the shape is part of a top-level group, etc. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + level?: number; /** * * Represents if the aspect ratio locked, in boolean, of the shape. @@ -52006,7 +53583,7 @@ declare namespace Excel { lockAspectRatio?: boolean; /** * - * Represents the name of the shape. Read-only. + * Represents the name of the shape. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -52044,7 +53621,7 @@ declare namespace Excel { * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta */ - type?: Excel.ShapeType | "Unknown" | "Image" | "GeometricShape" | "Group"; + type?: Excel.ShapeType | "Unknown" | "Image" | "GeometricShape" | "Group" | "Line"; /** * * Represents the visibility, in boolean, of the specified shape. @@ -52124,6 +53701,25 @@ declare namespace Excel { interface GroupShapeCollectionData { items?: Excel.Interfaces.ShapeData[]; } + /** An interface describing the data returned by calling "line.toJSON()". */ + interface LineData { + /** + * + * Represents the shape identifier. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: string; + /** + * + * Represents the connector type for the line. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + connectorType?: Excel.ConnectorType | "Straight" | "Elbow" | "Curve"; + } /** An interface describing the data returned by calling "shapeFill.toJSON()". */ interface ShapeFillData { /** @@ -52151,6 +53747,57 @@ declare namespace Excel { */ type?: Excel.ShapeFillType | "NoFill" | "Solid" | "Gradient" | "Pattern" | "PictureAndTexture" | "Mixed"; } + /** An interface describing the data returned by calling "shapeLineFormat.toJSON()". */ + interface ShapeLineFormatData { + /** + * + * Represents the line color in HTML color format, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + color?: string; + /** + * + * Represents the line style of the shape. Returns null when line is not visible or has mixed line dash style property (e.g. group type of shape). See Excel.ShapeLineStyle for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dashStyle?: Excel.ShapeLineDashStyle | "Dash" | "DashDot" | "DashDotDot" | "LongDash" | "LongDashDot" | "RoundDot" | "Solid" | "SquareDot" | "LongDashDotDot" | "SystemDash" | "SystemDot" | "SystemDashDot"; + /** + * + * Represents the line style of the shape object. Returns null when line is not visible or has mixed line visible property (e.g. group type of shape). See Excel.ShapeLineStyle for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + style?: Excel.ShapeLineStyle | "Single" | "ThickBetweenThin" | "ThickThin" | "ThinThick" | "ThinThin"; + /** + * + * Represents the degree of transparency of the specified line as a value from 0.0 (opaque) through 1.0 (clear). Returns null when the shape has mixed line transparency property (e.g. group type of shape). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + transparency?: number; + /** + * + * Represents whether the line formatting of a shape element is visible. Returns null when the shape has mixed line visible property (e.g. group type of shape). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + visible?: boolean; + /** + * + * Represents weight of the line, in points. Returns null when the line is not visible or has mixed line weight property (e.g. group type of shape). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + weight?: number; + } /** An interface describing the data returned by calling "textFrame.toJSON()". */ interface TextFrameData { /** @@ -52320,6 +53967,160 @@ declare namespace Excel { */ underline?: Excel.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble"; } + /** An interface describing the data returned by calling "slicer.toJSON()". */ + interface SlicerData { + /** + * + * Represents the collection of SlicerItems that are part of the slicer. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + slicerItems?: Excel.Interfaces.SlicerItemData[]; + /** + * + * Represents the worksheet containing the slicer. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + worksheet?: Excel.Interfaces.WorksheetData; + /** + * + * Represents the caption of slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + caption?: string; + /** + * + * Represents the height, in points, of the slicer. + Throws an invalid argument exception when set with negative value or zero as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + height?: number; + /** + * + * Represents the unique id of slicer. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: string; + /** + * + * True if all filters currently applied on the slicer is cleared. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isFilterCleared?: boolean; + /** + * + * Represents the distance, in points, from the left side of the slicer to the left of the worksheet. + Throws an invalid argument exception when set with negative value as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + left?: number; + /** + * + * Represents the name of slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name?: string; + /** + * + * Represents the name used in the formula. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + nameInFormula?: string; + /** + * + * Represents the sort order of the items in the slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + sortBy?: Excel.SlicerSortType | "DataSourceOrder" | "Ascending" | "Descending"; + /** + * + * Constant value that represents the Slicer style. Possible values are: SlicerStyleLight1 thru SlicerStyleLight6, TableStyleOther1 thru TableStyleOther2, SlicerStyleDark1 thru SlicerStyleDark6. A custom user-defined style present in the workbook can also be specified. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + style?: string; + /** + * + * Represents the distance, in points, from the top edge of the slicer to the right of the worksheet. + Throws an invalid argument exception when set with negative value as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + top?: number; + /** + * + * Represents the width, in points, of the slicer. + Throws an invalid argument exception when set with negative value or zero as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + width?: number; + } + /** An interface describing the data returned by calling "slicerCollection.toJSON()". */ + interface SlicerCollectionData { + items?: Excel.Interfaces.SlicerData[]; + } + /** An interface describing the data returned by calling "slicerItem.toJSON()". */ + interface SlicerItemData { + /** + * + * True if the slicer item has data. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + hasData?: boolean; + /** + * + * True if the slicer item is selected. Setting this value will not clear other SlicerItems' selected state. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isSelected?: boolean; + /** + * + * Represents the unique value representing the slicer item. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + key?: string; + /** + * + * Represents the value displayed on UI. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name?: string; + } + /** An interface describing the data returned by calling "slicerItemCollection.toJSON()". */ + interface SlicerItemCollectionData { + items?: Excel.Interfaces.SlicerItemData[]; + } /** An interface describing the data returned by calling "functionResult.toJSON()". */ interface FunctionResultData { /** @@ -52347,7 +54148,7 @@ declare namespace Excel { $all?: boolean; /** * - * Turn on/off JavaScript events in current taskpane or content add-in. + * Toggle JavaScript events in the current task pane or content add-in. * * [Api set: ExcelApi 1.8] */ @@ -54120,7 +55921,7 @@ declare namespace Excel { prompt?: boolean; /** * - * Data Validation rule that contains different type of data validation criteria. + * Data validation rule that contains different type of data validation criteria. * * [Api set: ExcelApi 1.8] */ @@ -54334,7 +56135,7 @@ declare namespace Excel { $all?: boolean; /** * - * HTML color code representing the color of the background, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange") + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange") * * [Api set: ExcelApi 1.1] */ @@ -54618,7 +56419,7 @@ declare namespace Excel { series?: Excel.Interfaces.ChartSeriesCollectionLoadOptions; /** * - * For EACH ITEM in the collection: Represents the title of the specified chart, including the text, visibility, position, and formating of the title. + * For EACH ITEM in the collection: Represents the title of the specified chart, including the text, visibility, position, and formatting of the title. * * [Api set: ExcelApi 1.1] */ @@ -54711,7 +56512,7 @@ declare namespace Excel { showAllFieldButtons?: boolean; /** * - * For EACH ITEM in the collection: Represents whether to to show the data labels when the value is greater than the maximum value on the value axis. + * For EACH ITEM in the collection: Represents whether to show the data labels when the value is greater than the maximum value on the value axis. If value axis became smaller than the size of data points, you can use this property to set whether to show the data labels. This property applies to 2-D charts only. * @@ -54800,7 +56601,7 @@ declare namespace Excel { series?: Excel.Interfaces.ChartSeriesCollectionLoadOptions; /** * - * Represents the title of the specified chart, including the text, visibility, position, and formating of the title. + * Represents the title of the specified chart, including the text, visibility, position, and formatting of the title. * * [Api set: ExcelApi 1.1] */ @@ -54893,7 +56694,7 @@ declare namespace Excel { showAllFieldButtons?: boolean; /** * - * Represents whether to to show the data labels when the value is greater than the maximum value on the value axis. + * Represents whether to show the data labels when the value is greater than the maximum value on the value axis. If value axis became smaller than the size of data points, you can use this property to set whether to show the data labels. This property applies to 2-D charts only. * @@ -55271,7 +57072,7 @@ declare namespace Excel { name?: boolean; /** * - * For EACH ITEM in the collection: Specifies how bars and columns are positioned. Can be a value between – 100 and 100. Applies only to 2-D bar and 2-D column charts. Read/Write. + * For EACH ITEM in the collection: Specifies how bars and columns are positioned. Can be a value between –100 and 100. Applies only to 2-D bar and 2-D column charts. Read/Write. * * [Api set: ExcelApi 1.8] */ @@ -55618,7 +57419,7 @@ declare namespace Excel { name?: boolean; /** * - * Specifies how bars and columns are positioned. Can be a value between – 100 and 100. Applies only to 2-D bar and 2-D column charts. Read/Write. + * Specifies how bars and columns are positioned. Can be a value between –100 and 100. Applies only to 2-D bar and 2-D column charts. Read/Write. * * [Api set: ExcelApi 1.8] */ @@ -56104,7 +57905,7 @@ declare namespace Excel { position?: boolean; /** * - * Represents the specified axis position where the other axis crosses at. Read Only. Set to this property should use SetPositionAt(double) method. + * Represents the specified axis position where the other axis crosses at. You should use the SetPositionAt(double) method to set this property. * * [Api set: ExcelApi 1.8] */ @@ -56280,7 +58081,7 @@ declare namespace Excel { format?: Excel.Interfaces.ChartDataLabelFormatLoadOptions; /** * - * Represents whether data labels automatically generates appropriate text based on context. + * Represents whether data labels automatically generate appropriate text based on context. * * [Api set: ExcelApi 1.8] */ @@ -56751,14 +58552,14 @@ declare namespace Excel { $all?: boolean; /** * - * Represents the height of the legendEntry on the chart Legend. + * Represents the height of the legendEntry on the chart legend. * * [Api set: ExcelApi 1.8] */ height?: boolean; /** * - * Represents the index of the LegendEntry in the Chart Legend. + * Represents the index of the legendEntry in the chart legend. * * [Api set: ExcelApi 1.8] */ @@ -56802,14 +58603,14 @@ declare namespace Excel { $all?: boolean; /** * - * For EACH ITEM in the collection: Represents the height of the legendEntry on the chart Legend. + * For EACH ITEM in the collection: Represents the height of the legendEntry on the chart legend. * * [Api set: ExcelApi 1.8] */ height?: boolean; /** * - * For EACH ITEM in the collection: Represents the index of the LegendEntry in the Chart Legend. + * For EACH ITEM in the collection: Represents the index of the legendEntry in the chart legend. * * [Api set: ExcelApi 1.8] */ @@ -57848,6 +59649,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.3] */ worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * For EACH ITEM in the collection: True if the PivotTable should use custom lists when sorting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enableDataValueEditing?: boolean; /** * * For EACH ITEM in the collection: Id of the PivotTable. Read-only. @@ -57893,6 +59702,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.3] */ worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * True if the PivotTable should use custom lists when sorting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enableDataValueEditing?: boolean; /** * * Id of the PivotTable. Read-only. @@ -57924,6 +59741,14 @@ declare namespace Excel { */ interface PivotLayoutLoadOptions { $all?: boolean; + /** + * + * True if formatting will be automatically formatted when it’s refreshed or when fields are moved + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoFormat?: boolean; /** * * True if the field list should be shown or hidden from the UI. @@ -57939,6 +59764,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ layoutType?: boolean; + /** + * + * True if formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + preserveFormatting?: boolean; /** * * True if the PivotTable report shows grand totals for columns. @@ -58186,7 +60019,7 @@ declare namespace Excel { position?: boolean; /** * - * For EACH ITEM in the collection: Determines whether the data should be sown as a specific summary calculation or not. + * For EACH ITEM in the collection: Determines whether the data should be shown as a specific summary calculation or not. * * [Api set: ExcelApi 1.8] */ @@ -58244,7 +60077,7 @@ declare namespace Excel { position?: boolean; /** * - * Determines whether the data should be sown as a specific summary calculation or not. + * Determines whether the data should be shown as a specific summary calculation or not. * * [Api set: ExcelApi 1.8] */ @@ -60262,6 +62095,14 @@ declare namespace Excel { */ interface CommentCollectionLoadOptions { $all?: boolean; + /** + * + * For EACH ITEM in the collection: Get/Set the content. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + content?: boolean; /** * * For EACH ITEM in the collection: Represents the comment identifier. Read-only. @@ -60288,6 +62129,14 @@ declare namespace Excel { */ interface CommentLoadOptions { $all?: boolean; + /** + * + * Get/Set the content. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + content?: boolean; /** * * Represents the comment identifier. Read-only. @@ -60314,6 +62163,14 @@ declare namespace Excel { */ interface CommentReplyCollectionLoadOptions { $all?: boolean; + /** + * + * For EACH ITEM in the collection: Get/Set the content. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + content?: boolean; /** * * For EACH ITEM in the collection: Represents the comment reply identifier. Read-only. @@ -60340,6 +62197,14 @@ declare namespace Excel { */ interface CommentReplyLoadOptions { $all?: boolean; + /** + * + * Get/Set the content. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + content?: boolean; /** * * Represents the comment reply identifier. Read-only. @@ -60400,6 +62265,30 @@ declare namespace Excel { image?: Excel.Interfaces.ImageLoadOptions; /** * + * For EACH ITEM in the collection: Returns the line object for the shape object. Error will be thrown, if the shape object is other shape type (Like, GeometricShape, SmartArt, etc.) rather than Image. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + line?: Excel.Interfaces.LineLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the line formatting of the shape object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + lineFormat?: Excel.Interfaces.ShapeLineFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the parent group of the specified shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + parentGroup?: Excel.Interfaces.ShapeLoadOptions; + /** + * * For EACH ITEM in the collection: Returns the textFrame object of a shape. Read only. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -60456,6 +62345,14 @@ declare namespace Excel { * @beta */ left?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the level of the specified shape. Level 0 means the shape is not part of any group, level 1 means the shape is part of a top-level group, etc. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + level?: boolean; /** * * For EACH ITEM in the collection: Represents if the aspect ratio locked, in boolean, of the shape. @@ -60466,7 +62363,7 @@ declare namespace Excel { lockAspectRatio?: boolean; /** * - * For EACH ITEM in the collection: Represents the name of the shape. Read-only. + * For EACH ITEM in the collection: Represents the name of the shape. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -60574,6 +62471,30 @@ declare namespace Excel { image?: Excel.Interfaces.ImageLoadOptions; /** * + * Returns the line object for the shape object. Error will be thrown, if the shape object is other shape type (Like, GeometricShape, SmartArt, etc.) rather than Image. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + line?: Excel.Interfaces.LineLoadOptions; + /** + * + * Returns the line formatting of the shape object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + lineFormat?: Excel.Interfaces.ShapeLineFormatLoadOptions; + /** + * + * Represents the parent group of the specified shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + parentGroup?: Excel.Interfaces.ShapeLoadOptions; + /** + * * Returns the textFrame object of a shape. Read only. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -60630,6 +62551,14 @@ declare namespace Excel { * @beta */ left?: boolean; + /** + * + * Represents the level of the specified shape. Level 0 means the shape is not part of any group, level 1 means the shape is part of a top-level group, etc. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + level?: boolean; /** * * Represents if the aspect ratio locked, in boolean, of the shape. @@ -60640,7 +62569,7 @@ declare namespace Excel { lockAspectRatio?: boolean; /** * - * Represents the name of the shape. Read-only. + * Represents the name of the shape. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -60834,6 +62763,30 @@ declare namespace Excel { image?: Excel.Interfaces.ImageLoadOptions; /** * + * For EACH ITEM in the collection: Returns the line object for the shape object. Error will be thrown, if the shape object is other shape type (Like, GeometricShape, SmartArt, etc.) rather than Image. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + line?: Excel.Interfaces.LineLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the line formatting of the shape object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + lineFormat?: Excel.Interfaces.ShapeLineFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the parent group of the specified shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + parentGroup?: Excel.Interfaces.ShapeLoadOptions; + /** + * * For EACH ITEM in the collection: Returns the textFrame object of a shape. Read only. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -60890,6 +62843,14 @@ declare namespace Excel { * @beta */ left?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the level of the specified shape. Level 0 means the shape is not part of any group, level 1 means the shape is part of a top-level group, etc. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + level?: boolean; /** * * For EACH ITEM in the collection: Represents if the aspect ratio locked, in boolean, of the shape. @@ -60900,7 +62861,7 @@ declare namespace Excel { lockAspectRatio?: boolean; /** * - * For EACH ITEM in the collection: Represents the name of the shape. Read-only. + * For EACH ITEM in the collection: Represents the name of the shape. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -60965,6 +62926,40 @@ declare namespace Excel { */ zorderPosition?: boolean; } + /** + * + * Represents a Line object inside a worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface LineLoadOptions { + $all?: boolean; + /** + * + * Returns the shape object for the line. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + shape?: Excel.Interfaces.ShapeLoadOptions; + /** + * + * Represents the shape identifier. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + /** + * + * Represents the connector type for the line. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + connectorType?: boolean; + } /** * * Represents the fill formatting for a shape object. @@ -60999,6 +62994,64 @@ declare namespace Excel { */ type?: boolean; } + /** + * + * Represents the line formatting for the shape object. For picture and geometric shape, line formatting represents the border of shape object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ShapeLineFormatLoadOptions { + $all?: boolean; + /** + * + * Represents the line color in HTML color format, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + color?: boolean; + /** + * + * Represents the line style of the shape. Returns null when line is not visible or has mixed line dash style property (e.g. group type of shape). See Excel.ShapeLineStyle for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dashStyle?: boolean; + /** + * + * Represents the line style of the shape object. Returns null when line is not visible or has mixed line visible property (e.g. group type of shape). See Excel.ShapeLineStyle for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + style?: boolean; + /** + * + * Represents the degree of transparency of the specified line as a value from 0.0 (opaque) through 1.0 (clear). Returns null when the shape has mixed line transparency property (e.g. group type of shape). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + transparency?: boolean; + /** + * + * Represents whether the line formatting of a shape element is visible. Returns null when the shape has mixed line visible property (e.g. group type of shape). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + visible?: boolean; + /** + * + * Represents weight of the line, in points. Returns null when the line is not visible or has mixed line weight property (e.g. group type of shape). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + weight?: boolean; + } /** * * Represents the text frame for a shape object. @@ -61187,6 +63240,310 @@ declare namespace Excel { */ underline?: boolean; } + /** + * + * Represents a slicer object in the workbook. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface SlicerLoadOptions { + $all?: boolean; + /** + * + * Represents the worksheet containing the slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * Represents the caption of slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + caption?: boolean; + /** + * + * Represents the height, in points, of the slicer. + Throws an invalid argument exception when set with negative value or zero as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + height?: boolean; + /** + * + * Represents the unique id of slicer. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + /** + * + * True if all filters currently applied on the slicer is cleared. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isFilterCleared?: boolean; + /** + * + * Represents the distance, in points, from the left side of the slicer to the left of the worksheet. + Throws an invalid argument exception when set with negative value as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + left?: boolean; + /** + * + * Represents the name of slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name?: boolean; + /** + * + * Represents the name used in the formula. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + nameInFormula?: boolean; + /** + * + * Represents the sort order of the items in the slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + sortBy?: boolean; + /** + * + * Constant value that represents the Slicer style. Possible values are: SlicerStyleLight1 thru SlicerStyleLight6, TableStyleOther1 thru TableStyleOther2, SlicerStyleDark1 thru SlicerStyleDark6. A custom user-defined style present in the workbook can also be specified. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + style?: boolean; + /** + * + * Represents the distance, in points, from the top edge of the slicer to the right of the worksheet. + Throws an invalid argument exception when set with negative value as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + top?: boolean; + /** + * + * Represents the width, in points, of the slicer. + Throws an invalid argument exception when set with negative value or zero as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + width?: boolean; + } + /** + * + * Represents a collection of all the slicer objects on the workbook or a worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface SlicerCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the worksheet containing the slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the caption of slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + caption?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the height, in points, of the slicer. + Throws an invalid argument exception when set with negative value or zero as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + height?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the unique id of slicer. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: True if all filters currently applied on the slicer is cleared. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isFilterCleared?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the distance, in points, from the left side of the slicer to the left of the worksheet. + Throws an invalid argument exception when set with negative value as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + left?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the name of slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the name used in the formula. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + nameInFormula?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the sort order of the items in the slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + sortBy?: boolean; + /** + * + * For EACH ITEM in the collection: Constant value that represents the Slicer style. Possible values are: SlicerStyleLight1 thru SlicerStyleLight6, TableStyleOther1 thru TableStyleOther2, SlicerStyleDark1 thru SlicerStyleDark6. A custom user-defined style present in the workbook can also be specified. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + style?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the distance, in points, from the top edge of the slicer to the right of the worksheet. + Throws an invalid argument exception when set with negative value as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + top?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the width, in points, of the slicer. + Throws an invalid argument exception when set with negative value or zero as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + width?: boolean; + } + /** + * + * Represents a slicer item in a slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface SlicerItemLoadOptions { + $all?: boolean; + /** + * + * True if the slicer item has data. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + hasData?: boolean; + /** + * + * True if the slicer item is selected. Setting this value will not clear other SlicerItems' selected state. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isSelected?: boolean; + /** + * + * Represents the unique value representing the slicer item. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + key?: boolean; + /** + * + * Represents the value displayed on UI. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name?: boolean; + } + /** + * + * Represents a collection of all the slicer item objects on the slicer. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface SlicerItemCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: True if the slicer item has data. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + hasData?: boolean; + /** + * + * For EACH ITEM in the collection: True if the slicer item is selected. Setting this value will not clear other SlicerItems' selected state. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isSelected?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the unique value representing the slicer item. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + key?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the value displayed on UI. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name?: boolean; + } /** * * An object containing the result of a function-evaluation operation @@ -61213,7 +63570,6 @@ declare namespace Excel { } } - //////////////////////////////////////////////////////////////// //////////////////////// End Excel APIs //////////////////////// //////////////////////////////////////////////////////////////// From b0fcc8c3e08cd091692e95fb02fffb21b6a9cbca Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 9 Jan 2019 20:16:53 +0100 Subject: [PATCH 078/160] [new-github-issue-url] Add types --- types/new-github-issue-url/index.d.ts | 81 +++++++++++++++++++ .../new-github-issue-url-tests.ts | 54 +++++++++++++ types/new-github-issue-url/tsconfig.json | 23 ++++++ types/new-github-issue-url/tslint.json | 1 + 4 files changed, 159 insertions(+) create mode 100644 types/new-github-issue-url/index.d.ts create mode 100644 types/new-github-issue-url/new-github-issue-url-tests.ts create mode 100644 types/new-github-issue-url/tsconfig.json create mode 100644 types/new-github-issue-url/tslint.json diff --git a/types/new-github-issue-url/index.d.ts b/types/new-github-issue-url/index.d.ts new file mode 100644 index 0000000000..f784a0d85d --- /dev/null +++ b/types/new-github-issue-url/index.d.ts @@ -0,0 +1,81 @@ +// Type definitions for new-github-issue-url 0.1 +// Project: https://github.com/sindresorhus/new-github-issue-url#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +export = newGithubIssueUrl; + +/** + * Returns a URL string. + */ +declare function newGithubIssueUrl(options: newGithubIssueUrl.Options): string; + +declare namespace newGithubIssueUrl { + type Without = { [P in Exclude]?: never }; + type XOR = (T | U) extends object ? (Without & U) | (Without & T) : T | U; + + type Options = XOR; + + interface BaseOptions { + /** + * The issue body. + */ + body?: string; + /** + * The issue title. + */ + title?: string; + /** + * Use an [issue template](https://help.github.com/articles/manually-creating-a-single-issue-template-for-your-repository). + * + * For example, if you want to use a template at `ISSUE_TEMPLATE/unicorn.md`, you would specify `unicorn.md` here. + */ + template?: string; + /** + * The labels for the issue. + * + * *Requires the user to have the permission to add labels.* + */ + labels?: string[]; + /** + * The milestone for the issue. + * + * *Requires the user to have the permission to add milestone.* + */ + milestone?: string; + /** + * The user to assign to the issue. + * + * *Requires the user to have the permission to add assignee.* + */ + assignee?: string; + /** + * The projects to add the issue to. + * + * The project reference format is `user/`, for example, if the URL to the project + * is `https://github.com/sindresorhus/some-repo/projects/3`, the project reference would be `some-repo/3`. + * + * *Requires the user to have the permission to add projects.* + */ + projects?: string[]; + } + + interface RepoUrlOptions extends BaseOptions { + /** + * The full URL to the repo. + */ + repoUrl: string; + } + + interface UserRepoOptions extends BaseOptions { + /** + * GitHub username or organization. + */ + user: string; + /** + * GitHub repo. + */ + repo: string; + } +} diff --git a/types/new-github-issue-url/new-github-issue-url-tests.ts b/types/new-github-issue-url/new-github-issue-url-tests.ts new file mode 100644 index 0000000000..c64b1aaa61 --- /dev/null +++ b/types/new-github-issue-url/new-github-issue-url-tests.ts @@ -0,0 +1,54 @@ +import newGithubIssueUrl = require('new-github-issue-url'); + +// $ExpectType string +newGithubIssueUrl({ + repoUrl: 'https://github.com/sindresorhus/new-github-issue-url.git', +}); +// $ExpectType string +newGithubIssueUrl({ + user: 'sindresorhus', + repo: 'new-github-issue-url', +}); +// $ExpectError +newGithubIssueUrl({ + user: 'sindresorhus', +}); +// $ExpectError +newGithubIssueUrl({ + repo: 'new-github-issue-url', +}); +// $ExpectType string +newGithubIssueUrl({ + repoUrl: 'https://github.com/sindresorhus/new-github-release-url.git', + body: 'foo', +}); +// $ExpectType string +newGithubIssueUrl({ + repoUrl: 'https://github.com/sindresorhus/new-github-release-url.git', + title: 'foo', +}); +// $ExpectType string +newGithubIssueUrl({ + repoUrl: 'https://github.com/sindresorhus/new-github-release-url.git', + template: 'unicorn.md', +}); +// $ExpectType string +newGithubIssueUrl({ + repoUrl: 'https://github.com/sindresorhus/new-github-release-url.git', + labels: ['foo', 'bar'], +}); +// $ExpectType string +newGithubIssueUrl({ + repoUrl: 'https://github.com/sindresorhus/new-github-release-url.git', + milestone: 'foo', +}); +// $ExpectType string +newGithubIssueUrl({ + repoUrl: 'https://github.com/sindresorhus/new-github-release-url.git', + assignee: 'sindresorhus', +}); +// $ExpectType string +newGithubIssueUrl({ + repoUrl: 'https://github.com/sindresorhus/new-github-release-url.git', + projects: ['some-repo/3'], +}); diff --git a/types/new-github-issue-url/tsconfig.json b/types/new-github-issue-url/tsconfig.json new file mode 100644 index 0000000000..3b1da7ee63 --- /dev/null +++ b/types/new-github-issue-url/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "new-github-issue-url-tests.ts" + ] +} diff --git a/types/new-github-issue-url/tslint.json b/types/new-github-issue-url/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/new-github-issue-url/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From f61e047579989394203e074e8c54064fabe56fab Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Thu, 10 Jan 2019 08:50:14 +0100 Subject: [PATCH 079/160] react-is: fix type guard return type --- types/react-is/index.d.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/types/react-is/index.d.ts b/types/react-is/index.d.ts index b7cce65e18..962d3e1a13 100644 --- a/types/react-is/index.d.ts +++ b/types/react-is/index.d.ts @@ -8,7 +8,12 @@ export as namespace ReactIs; -import { ReactElement, ReactType } from 'react'; +import { + LazyExoticComponent, + MemoExoticComponent, + ReactElement, + ReactType +} from "react"; export function typeOf(value: any): symbol | undefined; export function isValidElementType(value: any): value is ReactType; @@ -18,8 +23,8 @@ export function isContextProvider(value: any): value is ReactElement; export function isElement(value: any): value is ReactElement; export function isForwardRef(value: any): value is ReactElement; export function isFragment(value: any): value is ReactElement; -export function isLazy(value: any): value is ReactElement; -export function isMemo(value: any): value is ReactElement; +export function isLazy(value: any): value is LazyExoticComponent; +export function isMemo(value: any): value is MemoExoticComponent; export function isProfiler(value: any): value is ReactElement; export function isPortal(value: any): value is ReactElement; export function isStrictMode(value: any): value is ReactElement; From 9d2b982eaa6fb6a8bd71b693a9c21febcc48ccad Mon Sep 17 00:00:00 2001 From: Luminos MacBook Pro Date: Thu, 10 Jan 2019 11:29:17 +0200 Subject: [PATCH 080/160] Add priority to react-native-push-nottification --- types/react-native-push-notification/index.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/types/react-native-push-notification/index.d.ts b/types/react-native-push-notification/index.d.ts index 4f58cd7385..825d5d11e6 100644 --- a/types/react-native-push-notification/index.d.ts +++ b/types/react-native-push-notification/index.d.ts @@ -14,7 +14,7 @@ export interface PushNotificationPermissions { export interface PushNotification { foreground: boolean; userInteraction: boolean; - message: string|object; + message: string | object; data: object; badge: number; alert: object; @@ -23,7 +23,7 @@ export interface PushNotification { } export interface PushNotificationOptions { - onRegister?: (token: { os: string, token: string }) => void; + onRegister?: (token: { os: string; token: string }) => void; onNotification?: (notification: PushNotification) => void; senderID?: string; permissions?: PushNotificationPermissions; @@ -31,6 +31,7 @@ export interface PushNotificationOptions { requestPermissions?: boolean; } +export type PriorityType = 'max' | 'high' | 'low' | 'min' | 'default'; export type RepeatType = 'week' | 'day' | 'hour' | 'minute' | 'time'; export class PushNotificationObject { @@ -48,6 +49,7 @@ export class PushNotificationObject { tag?: string; group?: string; ongoing?: boolean; + priority?: PriorityType; /* iOS only properties */ alertAction?: any; From fc55fdb2067908c54ee18c3bac900201fe7f86a1 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Thu, 10 Jan 2019 21:01:12 +0100 Subject: [PATCH 081/160] [is-online] Add types --- types/is-online/index.d.ts | 34 ++++++++++++++++++++++++++++++ types/is-online/is-online-tests.ts | 6 ++++++ types/is-online/tsconfig.json | 23 ++++++++++++++++++++ types/is-online/tslint.json | 1 + 4 files changed, 64 insertions(+) create mode 100644 types/is-online/index.d.ts create mode 100644 types/is-online/is-online-tests.ts create mode 100644 types/is-online/tsconfig.json create mode 100644 types/is-online/tslint.json diff --git a/types/is-online/index.d.ts b/types/is-online/index.d.ts new file mode 100644 index 0000000000..04fa123c44 --- /dev/null +++ b/types/is-online/index.d.ts @@ -0,0 +1,34 @@ +// Type definitions for is-online 8.0 +// Project: https://github.com/sindresorhus/is-online#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = isOnline; + +/** + * Check if the internet connection is up. + * + * The following checks are run in parallel: + * - Retrieve [icanhazip.com](https://github.com/major/icanhaz) via HTTPS + * - Query `myip.opendns.com` on OpenDNS (Node.js only) + * - Retrieve Apple's Captive Portal test page (Node.js only) + * + * When the first check succeeds, the returned Promise is resolved to `true`. + */ +declare function isOnline(options?: isOnline.Options): Promise; + +declare namespace isOnline { + interface Options { + /** + * Milliseconds to wait for a server to respond. + * @default 5000 + */ + timeout?: number; + /** + * Internet Protocol version to use. This is an advanced option that is usually not necessary to be set, + * but it can prove useful to specifically assert IPv6 connectivity. + * @default 'v4' + */ + version?: 'v4' | 'v6'; + } +} diff --git a/types/is-online/is-online-tests.ts b/types/is-online/is-online-tests.ts new file mode 100644 index 0000000000..74dbda5efa --- /dev/null +++ b/types/is-online/is-online-tests.ts @@ -0,0 +1,6 @@ +import isOnline = require('is-online'); + +isOnline(); // $ExpectType Promise +isOnline({ timeout: 10 }); // $ExpectType Promise +isOnline({ version: 'v4' }); // $ExpectType Promise +isOnline({ version: 'v6' }); // $ExpectType Promise diff --git a/types/is-online/tsconfig.json b/types/is-online/tsconfig.json new file mode 100644 index 0000000000..7009c26024 --- /dev/null +++ b/types/is-online/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "is-online-tests.ts" + ] +} diff --git a/types/is-online/tslint.json b/types/is-online/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/is-online/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 41b13522b9c14183f8b9090302e6adf38dbf3577 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Thu, 10 Jan 2019 21:14:52 +0100 Subject: [PATCH 082/160] [is-reachable] Add types --- types/is-reachable/index.d.ts | 39 ++++++++++++++++++++++++ types/is-reachable/is-reachable-tests.ts | 4 +++ types/is-reachable/tsconfig.json | 23 ++++++++++++++ types/is-reachable/tslint.json | 1 + 4 files changed, 67 insertions(+) create mode 100644 types/is-reachable/index.d.ts create mode 100644 types/is-reachable/is-reachable-tests.ts create mode 100644 types/is-reachable/tsconfig.json create mode 100644 types/is-reachable/tslint.json diff --git a/types/is-reachable/index.d.ts b/types/is-reachable/index.d.ts new file mode 100644 index 0000000000..6e2ea2d62f --- /dev/null +++ b/types/is-reachable/index.d.ts @@ -0,0 +1,39 @@ +// Type definitions for is-reachable 3.0 +// Project: https://github.com/sindresorhus/is-reachable#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = isReachable; + +/** + * Check if servers are reachable. + * + * The Node.js version will do a TCP handshake with the target's port. It attempts to detect cases where a router + * redirects the request to itself. + * + * The browser version is limited by the fact that browsers cannot connect to arbitrary ports. It only supports + * HTTP and HTTPS and the check relies on the `/favicon.ico` path being present. + * + * @param targets One or more targets to check. Can either be a full [URL](https://nodejs.org/api/url.html) + * like `https://hostname`, `hostname:port` or just `hostname`. When the protocol is missing from a target + * `http` is assumed. + * + * [Well-known protocols](http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml) + * are supported (e.g. `ftp://`, `mysql://`, `redis://` and more). + * + * @returns A `Promise` for a `boolean` which is `true` if any of the `targets` are reachable. + */ +declare function isReachable( + targets: string | string[], + options?: isReachable.Options +): Promise; + +declare namespace isReachable { + interface Options { + /** + * Timeout in milliseconds after which a request is considered failed. + * @default 5000 + */ + timeout?: number; + } +} diff --git a/types/is-reachable/is-reachable-tests.ts b/types/is-reachable/is-reachable-tests.ts new file mode 100644 index 0000000000..d497d004f2 --- /dev/null +++ b/types/is-reachable/is-reachable-tests.ts @@ -0,0 +1,4 @@ +import isReachable = require('is-reachable'); + +isReachable('sindresorhus.com'); // $ExpectType Promise +isReachable('google.com:80', { timeout: 10 }); // $ExpectType Promise diff --git a/types/is-reachable/tsconfig.json b/types/is-reachable/tsconfig.json new file mode 100644 index 0000000000..c30236ebd5 --- /dev/null +++ b/types/is-reachable/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "is-reachable-tests.ts" + ] +} diff --git a/types/is-reachable/tslint.json b/types/is-reachable/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/is-reachable/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 041ce08d6b1d766783a6edb2ef78ba326af3543c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gaul?= Date: Thu, 10 Jan 2019 21:22:47 +0100 Subject: [PATCH 083/160] fix(mongodb): make $where condition optional --- types/mongodb/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/mongodb/index.d.ts b/types/mongodb/index.d.ts index 15e21d2b43..a3725382e4 100644 --- a/types/mongodb/index.d.ts +++ b/types/mongodb/index.d.ts @@ -1022,7 +1022,7 @@ export type Condition = { $caseSensitive?: boolean; $diacraticSensitive?: boolean; }; - $where: Object; + $where?: Object; $geoIntersects?: Object; $geoWithin?: Object; $near?: Object; From f39fd15de185b5d1c9cb2d3cd1faaed235c9f7df Mon Sep 17 00:00:00 2001 From: Florian Keller Date: Thu, 10 Jan 2019 22:17:54 +0100 Subject: [PATCH 084/160] Add types for jsonabc --- types/jsonabc/index.d.ts | 20 ++++++++++++++++++++ types/jsonabc/jsonabc-tests.ts | 9 +++++++++ types/jsonabc/tsconfig.json | 23 +++++++++++++++++++++++ types/jsonabc/tslint.json | 1 + 4 files changed, 53 insertions(+) create mode 100644 types/jsonabc/index.d.ts create mode 100644 types/jsonabc/jsonabc-tests.ts create mode 100644 types/jsonabc/tsconfig.json create mode 100644 types/jsonabc/tslint.json diff --git a/types/jsonabc/index.d.ts b/types/jsonabc/index.d.ts new file mode 100644 index 0000000000..41a785d015 --- /dev/null +++ b/types/jsonabc/index.d.ts @@ -0,0 +1,20 @@ +// Type definitions for jsonabc 2.3 +// Project: http://novicelab.org/jsonabc +// Definitions by: Florian Keller +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +/** + * Sort the JSON (clean, parse, sort, stringify). + * @param noArray Sort or don't sort arrays + */ +export function sort(inputStr: string, noArray?: boolean): string; + +/** + * Sort the JSON (clean, parse, sort, stringify). + * @param noArray Sort or don't sort arrays + */ +export function sortObj(input: object, noArray?: boolean): object; + +/** Remove trailing commas */ +export function cleanJSON(input: string): string; diff --git a/types/jsonabc/jsonabc-tests.ts b/types/jsonabc/jsonabc-tests.ts new file mode 100644 index 0000000000..8d51d94bac --- /dev/null +++ b/types/jsonabc/jsonabc-tests.ts @@ -0,0 +1,9 @@ +import * as myJsonAbc from 'jsonabc'; + +myJsonAbc.sortObj({ c: 0, b: 1, a: 0 }); +myJsonAbc.sortObj({ c: 0, b: 1, a: 0 }, false); + +myJsonAbc.sort('{ c: 0, b: 1, a: 0 }'); +myJsonAbc.sort('{ c: 0, b: 1, a: 0 }', true); + +myJsonAbc.cleanJSON('{ c: 0, b: 1, a: 0 }'); diff --git a/types/jsonabc/tsconfig.json b/types/jsonabc/tsconfig.json new file mode 100644 index 0000000000..072c667a18 --- /dev/null +++ b/types/jsonabc/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jsonabc-tests.ts" + ] +} diff --git a/types/jsonabc/tslint.json b/types/jsonabc/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/jsonabc/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 6f34bce22f2222a2d83a23e3cb33e26a40fd5a0d Mon Sep 17 00:00:00 2001 From: Jonathan Viney Date: Fri, 11 Jan 2019 11:32:34 +1300 Subject: [PATCH 085/160] fix video.js: add nativeControlsForTouch to player options --- types/video.js/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/video.js/index.d.ts b/types/video.js/index.d.ts index 09f9b28d0d..62bbf83362 100644 --- a/types/video.js/index.d.ts +++ b/types/video.js/index.d.ts @@ -4613,6 +4613,7 @@ declare namespace videojs { languages?: { [code: string]: LanguageTranslations }; loop?: boolean; muted?: boolean; + nativeControlsForTouch?: boolean; notSupportedMessage?: string; playbackRates?: number[]; plugins?: any; From 0b03528b263ed24f398d4c7f9c3743fa7b398d96 Mon Sep 17 00:00:00 2001 From: Ifiok Jr Date: Wed, 12 Dec 2018 17:37:59 +0000 Subject: [PATCH 086/160] add types for mangopay2-nodejs-sdk --- types/mangopay2-nodejs-sdk/index.d.ts | 4383 +++++++++++++++++ .../mangopay2-nodejs-sdk-tests.ts | 721 +++ types/mangopay2-nodejs-sdk/tsconfig.json | 20 + types/mangopay2-nodejs-sdk/tslint.json | 10 + types/mangopay2-nodejs-sdk/types.d.ts | 565 +++ 5 files changed, 5699 insertions(+) create mode 100644 types/mangopay2-nodejs-sdk/index.d.ts create mode 100644 types/mangopay2-nodejs-sdk/mangopay2-nodejs-sdk-tests.ts create mode 100644 types/mangopay2-nodejs-sdk/tsconfig.json create mode 100644 types/mangopay2-nodejs-sdk/tslint.json create mode 100644 types/mangopay2-nodejs-sdk/types.d.ts diff --git a/types/mangopay2-nodejs-sdk/index.d.ts b/types/mangopay2-nodejs-sdk/index.d.ts new file mode 100644 index 0000000000..e0c5d5c0e2 --- /dev/null +++ b/types/mangopay2-nodejs-sdk/index.d.ts @@ -0,0 +1,4383 @@ +// Type definitions for mangopay2-nodejs-sdk 1.9 +// Project: https://github.com/MangoPay/mangopay2-nodejs-sdk +// Definitions by: Ifiok Jr. +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.0 + +/// + +import { + ApiMethod, + CountryISO, + CurrencyISO, + MakeKeysRequired, + Omit, + OmitType, + PickPartialRequired, + ValueOf, + PickPartial, + DeepPartial +} from "./types"; + +export = MangoPay; + +declare class MangoPay { + constructor(config: MangoPay.Config); + config: MangoPay.Config; + requestOptions: MangoPay.RequestOptions; + Users: MangoPay.Users; + BankAccounts: MangoPay.BankAccounts; + BankingAliases: MangoPay.BankingAliases; + DisputeDocuments: MangoPay.DisputeDocuments; + Wallets: MangoPay.Wallets; + KycDocuments: MangoPay.KycDocuments; + UboDeclarations: MangoPay.UboDeclarations; + Cards: MangoPay.Cards; + CardRegistrations: MangoPay.CardRegistrations; + CardPreAuthorizations: MangoPay.CardPreAuthorizations; + PayIns: MangoPay.PayIns; + Transfers: MangoPay.Transfers; + PayOuts: MangoPay.PayOuts; + Refunds: MangoPay.Refunds; + Clients: MangoPay.Clients; + Disputes: MangoPay.Disputes; + Repudiations: MangoPay.Repudiations; + Events: MangoPay.Events; + Responses: MangoPay.Responses; + Mandates: MangoPay.Mandates; + Hooks: MangoPay.Hooks; + Reports: MangoPay.Reports; + + models: typeof MangoPay.models; + + Log(...args: any[]): void; + authorize(callback: (data: MangoPay.AuthorizationData) => void): void; + authorize(): Promise; + buildRequestData(entity: any): any; + canReadSubRequestData(entity: any, propertyName: any): boolean; + isExpired(): boolean; + method( + method: ApiMethod, + callback: (...args: any[]) => void, + options: MangoPay.RequestOptions + ): any; +} + +declare namespace MangoPay { + interface AuthorizationData { + access_token: string; + token_type: string; + expires_in: number; + } + + interface Headers { + "Content-Type": string; + "User-Agent": string; + "Idempotency-Key": string; + Authorization: string; + [header: string]: string | undefined; + } + + /** A UTC timestamp in seconds */ + type Timestamp = number; + type ColumnAndDirection = "ASC" | "DESC"; + type AVSResult = + | "NO_CHECK" + | "NO_MATCH" + | "ADDRESS_MATCH_ONLY" + | "POSTAL_CODE_MATCH_ONLY" + | "FULL_MATCH"; + type SecureMode = "DEFAULT" | "FORCE"; + type PreAuthorizationExecutionType = "DIRECT"; + type PaymentStatus = "WAITING" | "CANCELED" | "EXPIRED" | "VALIDATED"; + type PreAuthorizationStatus = "CREATED" | "SUCCEEDED" | "FAILED"; + interface BillingData { + Address: models.Address | address.AddressData | string; + } + + interface SecurityInfoData { + AVSResult: AVSResult; + } + + interface MoneyData { + /** + * The currency - should be ISO_4217 format + */ + Currency: CurrencyISO; + + /** + * An amount of money in the smallest sub-division of the currency, e.g. 12.60 EUR would be represented as 1260 whereas 12 JPY would be represented as just 12) + */ + Amount: number; + } + + interface WithResponse { + statusCode: number; + body: T; + headers: Headers; + } + + interface NoArgMethodOverload { + (options: MethodOptionWithResponse): Promise>; + (options?: MethodOptionWithoutResponse): Promise; + ( + callback: (data: WithResponse) => void, + options?: MethodOptionWithResponse + ): void; + (callback: (data: R) => void, options?: MethodOptionWithoutResponse): void; + } + + interface MethodOverload { + (data: T, options: MethodOptionWithResponse): Promise>; + (data: T, options?: MethodOptionWithoutResponse): Promise; + ( + data: T, + callback: (data: WithResponse) => void, + options: MethodOptionWithResponse + ): void; + ( + data: T, + callback: (data: R) => void, + options?: MethodOptionWithoutResponse + ): void; + } + + interface TwoArgsMethodOverload { + (data: T, extra: U, options: MethodOptionWithResponse): Promise< + WithResponse + >; + (data: T, extra: U, options?: MethodOptionWithoutResponse): Promise; + ( + data: T, + extra: U, + callback: (data: WithResponse) => void, + options?: MethodOptionWithResponse + ): void; + ( + data: T, + extra: U, + callback: (data: R) => void, + options?: MethodOptionWithoutResponse + ): void; + } + + interface ThreeArgsMethodOverload { + (data: T, extra: U, lastArg: V, options: MethodOptionWithResponse): Promise< + WithResponse + >; + ( + data: T, + extra: U, + lastArg: V, + options?: MethodOptionWithoutResponse + ): Promise; + ( + data: T, + extra: U, + lastArg: V, + callback: (data: WithResponse) => void, + options?: MethodOptionWithResponse + ): void; + ( + data: T, + extra: U, + lastArg: V, + callback: (data: R) => void, + options?: MethodOptionWithoutResponse + ): void; + } + + interface Config { + /** + * API Client Id + */ + clientId: string; + + /** + * API Client Api Key + */ + clientApiKey: string; + + /** + * API Base URL.The fault base value points to sandbox. + * Production is 'https://api.mangopay.com' + * + * @default "https://api.sandbox.mangopay.com" + */ + baseUrl?: string; + + /** + * Active debugging + * @default false + */ + debugMode?: boolean; + + /** + * Log function to be used for debug + * @default `console.log` + */ + logClass?(...args: any[]): void; + + /** + * Set the connection timeout limit(in milliseconds) + * @default 30000 + */ + connectionTimeout?: number; + + /** + * Set the response timeout limit(in milliseconds) + * @default 80000 + */ + responseTimeout?: number; + + /** + * API Version + * @default 'v2.01' + */ + apiVersion?: string; + + /** + * Set a custom error handler + * @default `console.error` + */ + errorHandler?(options: any, err: any): void; + } + + interface RequestOptions { + requestConfig: { + timeout: number; + }; + responseConfig: { + timeout: number; + }; + + /** + * Path options are replacing the ${placeholders} from apiMethods + */ + path: { + clientId: string; + apiVersion: string; + readonly id: string; + }; + headers: Partial; + } + + type WithToJson = T & { toJSON(): any }; + + // Determines the shape of the response + interface ReadResponseHeaders { + readResponseHeaders: true; + } + + interface PaginationOptions { + /** + * The page number of results you wish to return + * @default 1 + */ + Page?: number; + + /** + * The number of results to return per page: Max 100; + * @default 10 + */ + Per_Page?: number; + } + + interface FilterOptions extends Record { + /** + * The column to sort against and direction - only CreationDate (or Date for the events) is available and ASC or DESC for the direction + */ + Sort?: ColumnAndDirection; + + /** + * To return only resources that have CreationDate BEFORE this date + */ + BeforeDate?: Timestamp; + + /** + * To return only resources that have CreationDate AFTER this date + */ + AfterDate?: Timestamp; + } + + interface MethodOptions extends DeepPartial { + data?: WithToJson | string; + parameters?: FilterOptions & PaginationOptions; + } + + interface MethodOptionWithResponse extends MethodOptions { + readResponseHeaders: true; + } + + interface MethodOptionWithoutResponse extends MethodOptions { + readResponseHeaders?: false; + } + + interface DependsObject { + dependsPropertyName: string; + propertyName: string; + propertyValueMapping: Record; + } + + interface ModelMethods { + initialize(): void; + + /** + * Returns object property value + * @param attribute + */ + getData(attribute: K): T[K]; + + /** + * @param attribute - attribute's value to be set or hash of properties with values + * @param value - value to be set + */ + setData(attribute: K, value: T[K]): this; + setData(attribute: Partial): this; + + getReadOnlyProperties(): Array; + getDependsObjects(): DependsObject[]; + parse(): void; + } + + namespace models { + const PayInExecutionType: IPayInExecutionType; + const PayInPaymentType: IPayInPaymentType; + const MandateStatus: IMandateStatus; + const LegalPersonType: ILegalPersonType; + const PersonType: IPersonType; + const BankAccountType: IBankAccountType; + const DeclaredUboStatus: IDeclaredUboStatus; + const KycDocumentStatus: IKycDocumentStatus; + const KycDocumentType: IKycDocumentType; + const PayOutPaymentType: IPayOutPaymentType; + const PlatformType: IPlatformType; + const UboDeclarationRefusedReasonType: IUboDeclarationRefusedReasonType; + const UboDeclarationStatus: IUboDeclarationStatus; + const UboRefusedReasonType: IUboRefusedReasonType; + const UserNaturalCapacity: IUserNaturalCapacity; + class DeclaredUbo extends Model { + constructor(data: Partial); + } + + class Model implements ModelMethods { + initialize(): void; + getData(attribute: K): T[K]; + setData(attribute: K, value: T[K]): this; + setData(attribute: Partial): this; + setData(attribute: any, value?: any): this; + getReadOnlyProperties(): Array; + getDependsObjects(): DependsObject[]; + parse(): void; + constructor(data: T); + } + + class EntityBase extends Model { + initialize(): void; + + /** + * Returns object property value + */ + getData(attribute: K): T[K]; + + /** + * @param attribute - attribute's value to be set or hash of properties with values + * @param value - value to be set + */ + setData(attribute: K, value: T[K]): this; + setData(attribute: Partial): this; + + getReadOnlyProperties(): Array; + getDependsObjects(): DependsObject[]; + parse(): void; + toJSON(): any; + } + + class Money extends EntityBase { + constructor(data: MoneyData); + } + + class Billing extends EntityBase { + constructor(data: BillingData); + } + + class Address extends EntityBase { + constructor(data: Partial); + } + + interface Address extends address.AddressData {} + + class BankingAlias extends EntityBase { + constructor(data: Partial); + } + + class BankingAliasIBAN extends BankingAlias {} + + interface BankingAlias extends bankingAlias.IBANBankingAliasData {} + + class BankAccount extends EntityBase { + constructor(data: bankAccount.CreationDetails); + } + interface BankAccount extends bankAccount.DataIntersection {} + + class BankAccountDetails { + constructor(data: any); + } + + class BankAccountDetailsCA extends BankAccountDetails { + constructor(data: any); + } + + interface BankAccountDetailsCA extends bankAccount.CADetails {} + + class BankAccountDetailsOther extends BankAccountDetails { + constructor(data: any); + } + + interface BankAccountDetailsOther extends bankAccount.OtherDetails {} + + class BankAccountDetailsGB extends BankAccountDetails { + constructor(data: any); + } + + interface BankAccountDetailsGB extends bankAccount.GBDetails {} + + class BankAccountDetailsIBAN extends BankAccountDetails { + constructor(data: any); + } + + interface BankAccountDetailsIBAN extends bankAccount.IBANDetails {} + + class BankAccountDetailsUS extends BankAccountDetails { + constructor(data: any); + } + + interface BankAccountDetailsUS extends bankAccount.USDetails {} + + class Transaction extends EntityBase { + constructor(data: transaction.TransactionData); + } + + interface Transaction extends transaction.TransactionData {} + + class ClientWallet extends EntityBase {} + + class Wallet extends EntityBase { + constructor(data: wallet.CreateWallet | wallet.UpdateWallet); + } + + class DocumentPageConsult extends Model { + constructor(data: Partial); + } + + interface DocumentPageConsult extends disputeDocument.DocumentPageConsult {} + + class Document extends EntityBase { + constructor(data: any); + } + + class DisputeDocument extends Document {} + + interface DisputeDocument extends disputeDocument.DisputeDocumentData {} + + class DisputeDocumentPage extends EntityBase { + constructor(data: disputeDocument.CreateDisputeDocumentPage); + } + + interface DisputeDocumentPage + extends disputeDocument.CreateDisputeDocumentPage {} + + class KycDocument extends EntityBase { + constructor(data: Partial); + } + + interface KycDocument extends kycDocument.KycDocumentData {} + + class KycPage { + constructor(data: kycDocument.CreateKycPage); + } + + interface KycPage extends kycDocument.CreateKycPage {} + + class EMoney { + constructor(data: eMoney.EMoneyData); + } + + interface EMoney extends eMoney.EMoneyData {} + + class UboDeclaration extends EntityBase { + constructor( + data: + | uboDeclaration.CreateUboDeclaration + | uboDeclaration.UpdateUboDeclaration + ); + } + + interface UboDeclaration extends uboDeclaration.UboDeclarationData {} + + class CardRegistration extends EntityBase< + cardRegistration.CardRegistrationData + > { + constructor( + data: + | cardRegistration.CreateCardRegistration + | cardRegistration.UpdateCardRegistration + ); + } + + interface CardRegistration extends cardRegistration.CardRegistrationData {} + + class Card extends EntityBase { + constructor(data: card.CardData); + } + + interface Card extends card.CardData {} + + class CardPreAuthorization { + constructor( + data: + | cardPreAuthorization.CardPreAuthorizationData + | cardPreAuthorization.UpdateCardPreAuthorization + ); + } + + interface CardPreAuthorization + extends cardPreAuthorization.CardPreAuthorizationData {} + + class SecurityInfo extends EntityBase< + SecurityInfo & entityBase.EntityBaseData + > { + constructor(data: SecurityInfo); + } + + class UserLegal extends EntityBase { + PersonType: "LEGAL"; + constructor( + data: MakeKeysRequired< + Partial, + user.RequiredUserLegalData + > + ); + + /** + * Sets the person type for the model + * @param personType + */ + setPersonType(type: user.PersonType): void; + } + + interface UserLegal extends user.UserLegalData {} + + class UserNatural extends EntityBase { + PersonType: "NATURAL"; + constructor( + data: MakeKeysRequired< + Partial, + user.RequiredUserNaturalData + > + ); + + /** + * Sets the person type for the model + * @param personType + */ + setPersonType(type: user.PersonType): void; + } + + interface UserNatural extends user.UserNaturalData {} + + class User extends EntityBase { + constructor(data: user.UserData); + + /** + * Sets the person type for the model + * @param personType + */ + setPersonType(type: user.PersonType): void; + } + + interface User extends user.UserData {} + + class PayIn extends EntityBase { + constructor(data: any); + } + + interface PayIn extends payIn.BasePayInData {} + + class PayInPaymentDetails extends EntityBase { + constructor(data: any); + } + + class PayInExecutionDetails extends EntityBase { + constructor(data: any); + } + + class PayInExecutionDetailsDirect extends PayInExecutionDetails { + constructor(data: any); + } + + class PayInExecutionDetailsWeb extends PayInExecutionDetails { + constructor(data: any); + } + + class PayInPaymentDetailsBankWire extends PayInPaymentDetails { + constructor(data: any); + } + + class PayInPaymentDetailsBankingAlias extends PayInPaymentDetails { + constructor(data: any); + } + + class PayInPaymentDetailsCard extends PayInPaymentDetails { + constructor(data: any); + } + + class PayInPaymentDetailsCardDirect extends PayInPaymentDetails { + constructor(data: any); + } + + class PayInPaymentDetailsCardWeb extends PayInPaymentDetails { + constructor(data: any); + } + + class PayInPaymentDetailsDirectDebitDirect extends PayInPaymentDetails { + constructor(data: any); + } + + class PayInPaymentDetailsDirectDebitWeb extends PayInPaymentDetails { + constructor(data: any); + } + + class PayInPaymentDetailsPayPal extends PayInPaymentDetails { + constructor(data: any); + } + + class PayInPaymentDetailsPreAuthorized extends PayInPaymentDetails { + constructor(data: any); + } + + class PayInTemplateURLOptions extends EntityBase { + constructor(data: any); + } + + class Refund extends EntityBase { + constructor(data: refund.CreatePayInRefund | refund.CreateTransferRefund); + } + + class RefundReasonDetails extends EntityBase { + constructor(data: any); + } + + class Repudiation extends EntityBase { + constructor(data: Partial); + } + + interface Repudiation extends repudiation.RepudiationData {} + + class Client extends EntityBase { + constructor(data?: Partial); + } + + interface Client extends client.ClientData {} + + class PlatformCategorization extends EntityBase< + client.PlatformCategorization + > { + constructor(data: client.PlatformCategorization); + } + + class Dispute extends EntityBase { + constructor(data: Partial); + } + + interface Dispute extends dispute.DisputeData {} + + class DisputeReason extends Model { + constructor(data: any); + } + + class SettlementTransfer extends EntityBase< + settlementTransfer.SettlementTransferData + > { + constructor(data: Partial); + } + + interface SettlementTransfer + extends settlementTransfer.SettlementTransferData {} + + class Transfer extends EntityBase { + constructor(data: Partial); + } + + interface Transfer extends transfer.TransferData {} + + class PayOut extends EntityBase { + constructor(data: Partial); + } + // interface PayOut extends PayOut.PayoutData {} + + class PayOutPaymentDetails extends EntityBase { + constructor(data?: any); + } + + class PayOutPaymentDetailsBankWire extends PayOutPaymentDetails { + constructor(data?: any); + } + + class Mandate extends EntityBase { + constructor(data?: Partial); + } + + interface Mandate extends mandate.MandateData {} + + class Hook extends EntityBase { + constructor(data?: Partial); + } + + interface Hook extends hook.HookData {} + + class Report extends EntityBase { + constructor(data?: Partial); + } + + interface Report extends report.ReportData {} + + class ReportFilter extends Model { + constructor(data?: Partial); + } + + interface Report extends report.Filters {} + } + + interface IPayInExecutionType { + Direct: "DIRECT"; + Web: "WEB"; + } + + interface IPayInPaymentType { + BankWire: "BANK_WIRE"; + Card: "CARD"; + DirectDebit: "DIRECT_DEBIT"; + Preauthorized: "PREAUTHORIZED"; + PayPal: "PAYPAL"; + } + + interface IMandateStatus { + Created: "CREATED"; + Submitted: "SUBMITTED"; + Active: "ACTIVE"; + Failed: "FAILED"; + } + + interface ILegalPersonType { + NotSpecified: "NotSpecified"; + Business: "BUSINESS"; + Organization: "ORGANIZATION"; + Soletrader: "SOLETRADER"; + } + + interface IPersonType { + NotSpecified: "NotSpecified"; + Natural: "NATURAL"; + Legal: "LEGAL"; + } + + interface IBankAccountType { + NotSpecified: "NotSpecified"; + IBAN: "IBAN"; + GB: "GB"; + US: "US"; + CA: "CA"; + OTHER: "OTHER"; + } + + interface IDeclaredUboStatus { + Created: "CREATED"; + Validated: "VALIDATED"; + Refused: "REFUSED"; + } + + interface IKycDocumentStatus { + Created: "CREATED"; + ValidationAsked: "VALIDATION_ASKED"; + Validated: "VALIDATED"; + Refused: "REFUSED"; + } + + interface IKycDocumentType { + IdentityProof: "IDENTITY_PROOF"; + RegistrationProof: "REGISTRATION_PROOF"; + ArticlesOfAssociation: "ARTICLES_OF_ASSOCIATION"; + ShareholderDeclaration: "SHAREHOLDER_DECLARATION"; + AddressProof: "ADDRESS_PROOF"; + } + + interface IPayOutPaymentType { + BankWire: "BANK_WIRE"; + } + + interface IPlatformType { + NotSpecified: "NotSpecified"; + MARKETPLACE: "MARKETPLACE"; + P2P_PAYMENT: "P2P_PAYMENT"; + CROWDFUNDING_DONATION: "CROWDFUNDING_DONATION"; + CROWDFUNDING_REWARD: "CROWDFUNDING_REWARD"; + CROWDFUNDING_EQUITY: "CROWDFUNDING_EQUITY"; + CROWDFUNDING_LOAN: "CROWDFUNDING_LOAN"; + OTHER: "OTHER"; + } + + interface IUboDeclarationRefusedReasonType { + /** + * When at least one natural user is missing on the declaration + */ + MissingUbo: "MISSING_UBO"; + + /** + * When at least one natural user should not be declared as UBO + */ + InvalidDeclaredUbo: "INVALID_DECLARED_UBO"; + + /** + * When at least one natural user declared as UBO has been created + * with wrong details (i.e. date of birth, country of residence) + */ + InvalidUboDetails: "INVALID_UBO_DETAILS"; + } + + interface IUboDeclarationStatus { + /** + * When the UBO declaration was created + */ + Created: "CREATED"; + + /** + * When validation has been requested for the UBO declaration + */ + ValidationAsked: "VALIDATION_ASKED"; + + /** + * When the UBO declaration was validated + */ + Validated: "VALIDATED"; + + /** + * When the UBO declaration was refused + */ + Refused: "REFUSED"; + } + + interface IUboRefusedReasonType { + /** + * When user should not be declared as UBO + */ + InvalidDeclaredUbo: "INVALID_DECLARED_UBO"; + + /** + * When user declared as UBO was created with wrong + * details (i.e. date of birth, country of residence) + */ + InvalidUboDetails: "INVALID_UBO_DETAILS"; + } + + interface IUserNaturalCapacity { + /** + * Real customer + */ + Normal: "NORMAL"; + + /** + * User used only for declaration purpose + */ + Declarative: "DECLARATIVE"; + } + + namespace entityBase { + interface EntityBaseData { + Id: string; + Tag: string; + CreationDate: number; + } + } + + namespace address { + interface AddressData { + AddressLine1: string; + AddressLine2: string; + City: string; + Region: string; + PostalCode: string; + Country: string; + } + type AddressType = string | AddressData | models.Address; + } + + namespace bankingAlias { + type BankingAliasType = "IBAN"; + interface BankingAliasData extends entityBase.EntityBaseData { + /** + * The user ID who is credited (defaults to the owner of the wallet) + */ + CreditedUserId: string; + + /** + * The ID of a wallet + */ + WalletId: string; + + /** + * The Country of the Address + */ + Country: CountryISO; + + /** + * The type of banking alias (note that only IBAN is available at present) + */ + Type: BankingAliasType; + + /** + * The owner of the wallet/banking alias + */ + OwnerName: string; + + /** + * Whether the banking alias is active or not + */ + Active: boolean; + } + + interface IBANBankingAliasData extends BankingAliasData { + /** + * The type of banking alias (note that only IBAN is available at present) + */ + Type: "IBAN"; + + /** + * The IBAN of the banking alias + */ + IBAN: string; + + /** + * The BIC of the banking alias + */ + BIC: string; + } + + interface CreateIBANBankingAlias + extends PickPartialRequired< + IBANBankingAliasData, + "Tag" | "CreditedUserId", + "OwnerName" | "Country" + > {} + } + + namespace bankAccount { + type BankAccountType = "IBAN" | "GB" | "US" | "CA" | "OTHER"; + type DepositAccountType = "CHECKING" | "SAVINGS"; + + interface BaseData extends entityBase.EntityBaseData { + /** + * The object owner's UserId + */ + UserId: string; + + /** + * The type of bank account + */ + Type: BankAccountType; + + /** + * The name of the owner of the bank account + */ + OwnerName: string; + + /** + * The address of the owner of the bank account + */ + OwnerAddress: address.AddressType; + + /** + * @deprecated + */ + Details?: models.BankAccountDetails; + + /** + * Whether the bank account is active or not + */ + Active: boolean; + } + + interface IBANDetails { + Type: "IBAN"; + + /** + * The address of the owner of the bank account + */ + OwnerAddress: address.AddressType; + + /** + * The name of the owner of the bank account + */ + OwnerName: string; + + /** + * The IBAN of the bank account + */ + IBAN: string; + + /** + * The BIC of the bank account + */ + BIC?: string; + } + + type IBANData = BaseData & IBANDetails; + + interface USDetails { + Type: "US"; + + /** + * The address of the owner of the bank account + */ + OwnerAddress: address.AddressType; + + /** + * The name of the owner of the bank account + */ + OwnerName: string; + + /** + * The account number of the bank account. US account numbers must be digits only. + */ + AccountNumber: string; + + /** + * The ABA of the bank account. Must be numbers only, and 9 digits long + */ + ABA: string; + + /** + * The type of account + */ + DepositAccountType?: DepositAccountType; + } + + type USData = BaseData & USDetails; + + interface CADetails { + Type: "CA"; + + /** + * The address of the owner of the bank account + */ + OwnerAddress: address.AddressType; + + /** + * The name of the owner of the bank account + */ + OwnerName: string; + + /** + * The branch code of the bank where the bank account. Must be numbers only, and 5 digits long + */ + BranchCode: string; + + /** + * The institution number of the bank account. Must be numbers only, and 3 or 4 digits long + */ + InstitutionNumber: string; + + /** + * The account number of the bank account. Must be numbers only. Canadian account numbers must be a maximum of 20 digits. + */ + AccountNumber: string; + + /** + * The name of the bank where the account is held. Must be letters or numbers only and maximum 50 characters long. + */ + BankName: string; + } + + type CAData = BaseData & CADetails; + + interface GBDetails { + Type: "GB"; + + /** + * The address of the owner of the bank account + */ + OwnerAddress: address.AddressType; + + /** + * The name of the owner of the bank account + */ + OwnerName: string; + + /** + * The sort code of the bank account. Must be numbers only, and 6 digits long + */ + SortCode: string; + + /** + * The account number of the bank account. Must be numbers only. GB account numbers must be 8 digits long. + */ + AccountNumber: string; + } + + type GBData = BaseData & GBDetails; + + interface OtherDetails { + Type: "OTHER"; + + /** + * The address of the owner of the bank account + */ + OwnerAddress: address.AddressType; + + /** + * The name of the owner of the bank account + */ + OwnerName: string; + + /** + * The Country of the Address + */ + Country: string; + + /** + * The BIC of the bank account + */ + BIC: string; + + /** + * The account number of the bank account. Must be numbers only. Canadian account numbers must be a maximum of 20 digits. + */ + AccountNumber: string; + } + + type OtherData = BaseData & OtherDetails; + + type Data = OtherData | CAData | GBData | IBANData | USData; + type DataIntersection = OtherData & CAData & GBData & IBANData & USData; + type CreationDetails = + | OtherDetails + | CADetails + | GBDetails + | IBANDetails + | USDetails; + } + + namespace transaction { + type TransactionNature = + | "REGULAR" + | "REPUDIATION" + | "REFUND" + | "SETTLEMENT"; + type TransactionType = "PAYIN" | "TRANSFER" | "PAYOUT"; + type TransactionStatus = "CREATED" | "SUCCEEDED" | "FAILED"; + + interface TransactionData extends entityBase.EntityBaseData { + /** + * Information about the funds that are being debited + */ + DebitedFunds: MoneyData; + + /** + * Details about the funds that are being credited (DebitedFunds – Fees = CreditedFunds) + */ + CreditedFunds: MoneyData; + + /** + * Information about the fees that were taken by the client for this transaction (and were hence transferred to the Client's platform wallet) + */ + Fees: MoneyData; + + /** + * The ID of the wallet that was debited + */ + DebitedWalletId: string; + + /** + * The ID of the wallet where money will be credited + */ + CreditedWalletId: string; + + /** + * A user's ID + */ + AuthorId: string; + + /** + * The user ID who is credited (defaults to the owner of the wallet) + */ + CreditedUserId: string; + + /** + * The nature of the transaction + */ + Nature: TransactionNature; + + /** + * The status of the transaction + */ + Status: TransactionStatus; + + /** + * When the transaction happened + */ + ExecutionDate: Timestamp; + + /** + * The result code + */ + ResultCode: string; + + /** + * A verbal explanation of the ResultCode + */ + ResultMessage: string; + + /** + * The type of the transaction + */ + Type: TransactionType; + } + } + + namespace wallet { + type ClientFundsType = "FEES" | "CREDIT"; + type FundsType = "DEFAULT" | ClientFundsType; + + interface WalletData extends entityBase.EntityBaseData { + /** + * An array of userIDs of who own's the wallet. For now, you only can set up a unique owner. + */ + Owners: [string]; + + /** + * The current balance of the wallet + */ + Balance: MoneyData; + + /** + * The type of funds in the wallet + */ + FundsType: FundsType; + + /** + * A desciption of the wallet + */ + Description: string; + + /** + * The currency - should be ISO_4217 format + */ + Currency: CurrencyISO; + } + + interface ClientWalletData + extends Omit { + FundsType: ClientFundsType; + } + + type CreateWallet = UpdateWallet & + Pick; + type UpdateWallet = PickPartial; + } + + namespace disputeDocument { + type DisputeDocumentType = + | "DELIVERY_PROOF" + | "INVOICE" + | "REFUND_PROOF" + | "USER_CORRESPONDANCE" + | "USER_ACCEPTANCE_PROOF" + | "PRODUCT_REPLACEMENT_PROOF" + | "OTHER"; + + type DocumentStatus = + | "CREATED" + | "VALIDATION_ASKED" + | "VALIDATED" + | "REFUSED"; + + type RefusedReasonType = + | "DOCUMENT_UNREADABLE" + | "DOCUMENT_NOT_ACCEPTED" + | "DOCUMENT_HAS_EXPIRED" + | "DOCUMENT_INCOMPLETE" + | "DOCUMENT_MISSING" + | "SPECIFIC_CASE" + | "DOCUMENT_FALSIFIED" + | "OTHER"; + + interface DisputeDocumentData extends entityBase.EntityBaseData { + /** + * Gives the type of the KYC document + */ + Type: DisputeDocumentType; + + /** + * The object owner's UserId + */ + UserId: string; + + /** + * The Id of a Dispute + */ + DisputeId: string; + + /** + * The status of this KYC/Dispute document + */ + Status: DocumentStatus; + + /** + * The message accompanying a refusal + */ + RefusedReasonMessage: string; + + /** + * The type of reason for refusal + */ + RefusedReasonType: RefusedReasonType; + + /** + * The date when the document was processed by MANGOPAY + */ + ProcessedDate: Timestamp; + } + + interface CreateDisputeDocument { + /** + * Gives the type of the KYC document + */ + Type: DisputeDocumentType; + Tag?: string; + } + + interface SubmitDisputeDocument { + /** + * The status of this KYC/Dispute document + */ + Status: "VALIDATION_ASKED"; + Tag?: string; + } + + /** + * - Documents have to be in "CREATED" Status + * - You can create as many pages as needed + * + * Remember to change Status to "VALIDATION_ASKED" to submit KYC documents + * The maximum size per page is about 7Mb (or 10Mb when base64encoded). The following formats are accepted for the documents : .pdf, .jpeg, .jpg, .gif and .png. The minimum size is 1Kb. + */ + interface CreateDisputeDocumentPage { + /** + * The base64 encoded file which needs to be uploaded + * + * You need to fill in only the binary code. Do not send the first part that some converters add into the binary code which is + * `` + * + * e.g. + * ```json + * { + * "File": "/9j/4AAQSkZJRgABAQEBLAEsAAD/.../wgARCAAyADIDAREAAhEBAxEB/8QAGwAAAgMBAQEA" + * } + * ``` + */ + File: string; + } + + interface DocumentPageConsult { + /** + * URL where this document page can be viewed. + */ + Url: string; + + /** + * Time in millis when the page consult will expire. + */ + ExpirationDate: Timestamp; + } + } + + namespace kycDocument { + type KycDocumentType = + | "IDENTITY_PROOF" + | "REGISTRATION_PROOF" + | "ARTICLES_OF_ASSOCIATION" + | "SHAREHOLDER_DECLARATION" + | "ADDRESS_PROOF"; + type DocumentStatus = + | "CREATED" + | "VALIDATION_ASKED" + | "VALIDATED" + | "REFUSED"; + + type KYCDocumentRefusedReasonType = + | "DOCUMENT_UNREADABLE" + | "DOCUMENT_NOT_ACCEPTED" + | "DOCUMENT_HAS_EXPIRED" + | "DOCUMENT_INCOMPLETE" + | "DOCUMENT_MISSING" + | "DOCUMENT_DO_NOT_MATCH_USER_DATA" + | "DOCUMENT_DO_NOT_MATCH_ACCOUNT_DATA" + | "SPECIFIC_CASE" + | "DOCUMENT_FALSIFIED" + | "UNDERAGE_PERSON" + | "SPECIFIC_CASE"; + + interface KycDocumentData extends entityBase.EntityBaseData { + /** + * Gives the type of the KYC document + */ + Type: KycDocumentType; + + /** + * The object owner's UserId + */ + UserId: string; + + /** + * The status of this KYC/Dispute document + */ + Status: DocumentStatus; + + /** + * The message accompanying a refusal + */ + RefusedReasonMessage: string; + + /** + * The type of reason for refusal + */ + RefusedReasonType: KYCDocumentRefusedReasonType; + + /** + * The date when the document was processed by MANGOPAY + */ + ProcessedDate: Timestamp; + } + + interface CreateKycDocument { + /** + * Gives the type of the KYC document + */ + Type: KycDocumentType; + Tag?: string; + } + + interface CreateKycDocument { + /** + * Gives the type of the KYC document + */ + Type: KycDocumentType; + Tag?: string; + } + + interface SubmitKycDocument { + /** + * The status of this KYC/Dispute document + */ + Status: "VALIDATION_ASKED"; + Tag?: string; + } + + /** + * - Documents have to be in "CREATED" Status + * - You can create as many pages as needed + * + * Remember to change Status to "VALIDATION_ASKED" to submit KYC documents + * The maximum size per page is about 7Mb (or 10Mb when base64encoded). The following formats are accepted for the documents : .pdf, .jpeg, .jpg, .gif and .png. The minimum size is 1Kb. + */ + interface CreateKycPage { + /** + * The base64 encoded file which needs to be uploaded + * + * You need to fill in only the binary code. Do not send the first part that some converters add into the binary code which is + * `` + * + * e.g. + * ```json + * { + * "File": "/9j/4AAQSkZJRgABAQEBLAEsAAD/.../wgARCAAyADIDAREAAhEBAxEB/8QAGwAAAgMBAQEA" + * } + * ``` + */ + File: string; + } + } + + namespace eMoney { + interface EMoneyData extends entityBase.EntityBaseData { + /** + * The object owner's UserId + */ + UserId: string; + + /** + * The amount of money that has been credited to this user + */ + CreditedEMoney: MoneyData; + + /** + * The amount of money that has been debited from this user + */ + DebitedEMoney: MoneyData; + } + } + + namespace uboDeclaration { + interface UboDeclarationData extends entityBase.EntityBaseData { + /** + * The object owner's UserId + */ + UserId: string; + + /** + * Status of a UBO Declaration + */ + Status: kycDocument.DocumentStatus; + + /** + * Reason types for a UBO Declaration + */ + RefusedReasonTypes: string[]; + + /** + * Refused Reason Message for a UBO Declaration + */ + RefusedReasonMessage: string; + + /** + * An array of UserIDs declared as Ultimate Beneficial Owners of a BUSINESS Legal User. + */ + DeclaredUBOs: string[]; + } + + interface CreateUboDeclaration { + DeclaredUBOs?: string[]; + } + + interface UpdateUboDeclaration { + Id: string; + Tag?: string; + Status?: "VALIDATION_ASKED"; + + /** + * An array of UserIDs declared as Ultimate Beneficial Owners of a BUSINESS Legal User. + */ + DeclaredUBOs?: string[]; + } + } + + namespace cardRegistration { + interface CardRegistrationData extends entityBase.EntityBaseData { + /** + * The object owner's UserId + */ + UserId: string; + /** + * The currency - should be ISO_4217 format + */ + Currency: CurrencyISO; + + /** + * A special key to use when registering a card + */ + AccessKey: string; + + /** + * A specific value to pass to the CardRegistrationURL + */ + PreregistrationData: string; + + /** + * The URL to submit the card details form to + */ + CardRegistrationURL: string; + + /** + * Having registered a card, this confirmation hash needs to be updated to the card item + */ + RegistrationData: string; + + /** + * The type of card + */ + CardType: card.CardType; + + /** + * The ID of a card + */ + CardId: string; + + /** + * The result code + */ + ResultCode: string; + + /** + * A verbal explanation of the ResultCode + */ + ResultMessage: string; + + /** + * Status of the card registration + */ + Status: card.CardStatus; + } + + interface CreateCardRegistration + extends PickPartialRequired< + CardRegistrationData, + "CardType" | "Tag", + "UserId" | "Currency" + > {} + type UpdateCardRegistration = PickPartial< + CardRegistrationData, + "Tag" | "RegistrationData" + >; + } + + namespace card { + type CardType = + | "CB_VISA_MASTERCARD" + | "DINERS" + | "MASTERPASS" + | "MAESTRO" + | "P24" + | "IDEAL" + | "BCMC" + | "PAYLIB"; + type CardStatus = "CREATED" | "VALIDATED" | "ERROR"; + type CardValidity = "UNKNOWN" | "VALID" | "INVALID"; + + interface CardData extends entityBase.EntityBaseData { + /** + * The expiry date of the card - must be in format MMYY + */ + ExpirationDate: string; + + /** + * A partially obfuscated version of the credit card number + */ + Alias: string; + + /** + * The provider of the card + */ + CardProvider: string; + + /** + * The type of card + */ + CardType: CardType; + + /** + * The Country of the Address + */ + Country: string; + + /** + * The card product type - more info + */ + Product: string; + + /** + * The bank code + */ + BankCode: string; + + /** + * Whether the card is active or not + */ + Active: boolean; + + /** + * The currency - should be ISO_4217 format + */ + Currency: CurrencyISO; + + /** + * Whether the card is valid or not. Once they process (or attempt to process) a payment with the card we are able to indicate if it is "valid" or "invalid". + * If they didn’t process a payment yet the "Validity" stay at "unknown". + */ + Validity: CardValidity; + + /** + * A unique representation of a 16-digits card number + */ + Fingerprint: string; + } + + interface UpdateCard { + Id: string; + Active?: false; + } + } + + namespace cardPreAuthorization { + interface CardPreAuthorizationData extends entityBase.EntityBaseData { + /** + * A user's ID + */ + AuthorId: string; + + /** + * Information about the funds that are being debited + */ + DebitedFunds: MoneyData; + + /** + * Status of the PreAuthorization + */ + Status: PreAuthorizationStatus; + + /** + * The status of the payment after the PreAuthorization. You can pass the PaymentStatus from "WAITING" to "CANCELED" should you need/want to + */ + PaymentStatus: PaymentStatus; + + /** + * The result code + */ + ResultCode: string; + + /** + * A verbal explanation of the ResultCode + */ + ResultMessage: string; + + /** + * How the PreAuthorization has been executed + */ + ExecutionType: PreAuthorizationExecutionType; + + /** + * The SecureMode corresponds to '3D secure' for CB Visa and MasterCard. This field lets you activate it manually. + * The field lets you activate it automatically with "DEFAULT" (Secured Mode will be activated from €50 or when MANGOPAY detects there is a higher risk ), + * "FORCE" (if you wish to specifically force the secured mode). + */ + SecureMode: SecureMode; + + /** + * The ID of a card + */ + CardId: string; + + /** + * The value is 'true' if the SecureMode was used + */ + SecureModeNeeded: boolean; + + /** + * This is the URL where to redirect users to proceed to 3D secure validation + */ + SecureModeRedirectUrl: string; + + /** + * This is the URL where users are automatically redirected after 3D secure validation (if activated) + */ + SecureModeReturnURL: string; + + /** + * The date when the payment is to be processed by + */ + ExpirationDate: Timestamp; + + /** + * The Id of the associated PayIn + */ + PayInId: string; + + /** + * Contains useful information related to the user billing + */ + Billing: BillingData; + + /** + * Contains useful information related to security and fraud + */ + SecurityInfo: SecurityInfoData; + } + + type CreateCardPreAuthorization = PickPartialRequired< + CardPreAuthorizationData, + "Tag" | "Billing" | "SecureMode", + "AuthorId" | "DebitedFunds" | "CardId" | "SecureModeReturnURL" + >; + type UpdateCardPreAuthorization = PickPartialRequired< + CardPreAuthorizationData, + "Tag", + "PaymentStatus" | "Id" + >; + } + + namespace hook { + type HookValidity = "UNKNOWN" | "VALID" | "INVALID"; + type HookStatus = "DISABLED" | "ENABLED"; + + interface HookData extends entityBase.EntityBaseData { + /** + * This is the URL where your receive notification for each EventType + */ + Url: string; + + /** + * Whether the hook is enabled or not + */ + Status: HookStatus; + + /** + * Whether the hook is valid or not + */ + Validity: HookValidity; + + /** + * The event type + */ + EventType: event.EventType; + } + + interface CreateHook + extends PickPartialRequired {} + + interface UpdateHook + extends PickPartialRequired< + HookData, + "EventType" | "Url" | "Tag", + "Id" + > {} + } + + namespace report { + interface Filters { + /** + * To return only resources that have CreationDate BEFORE this date + */ + BeforeDate: Timestamp; + + /** + * To return only resources that have CreationDate AFTER this date + */ + AfterDate: Timestamp; + + /** + * The type of the transaction + */ + Type: transaction.TransactionType[]; + + /** + * The status of the transaction + */ + Status: transaction.TransactionStatus[]; + + /** + * The nature of the transaction + */ + Nature: transaction.TransactionNature[]; + + /** + * The minimum amount of DebitedFunds + */ + MinDebitedFundsAmount: number; + + /** + * The currency for the minimum amount of DebitedFunds + */ + MinDebitedFundsCurrency: CurrencyISO; + + /** + * The maximum amount of DebitedFunds + */ + MaxDebitedFundsAmount: number; + + /** + * The currency for the maximum amount of DebitedFunds + */ + MaxDebitedFundsCurrency: CurrencyISO; + + /** + * The minimum amount of Fees + */ + MinFeesAmount: number; + + /** + * The currency for the minimum amount of Fees + */ + MinFeesCurrency: CurrencyISO; + + /** + * The maximum amount of Fees + */ + MaxFeesAmount: number; + + /** + * The currency for the maximum amount of Fees + */ + MaxFeesCurrency: CurrencyISO; + + /** + * A user's ID + */ + AuthorId: string; + + /** + * The ID of a wallet + */ + WalletId: string; + } + + type Column = + | "Alias" + | "AuthorId" + | "BankAccountId" + | "BankWireRef" + | "CardId" + | "CardType" + | "Country" + | "CreationDate" + | "CreditedFundsAmount" + | "CreditedFundsCurrency" + | "CreditedUserId" + | "CreditedWalletId" + | "Culture" + | "DebitedFundsAmount" + | "DebitedFundsCurrency" + | "DebitedWalletId" + | "DeclaredDebitedFundsAmount" + | "DeclaredDebitedFundsCurrency" + | "DeclaredFeesAmount" + | "DeclaredFeesCurrency" + | "ExecutionDate" + | "ExecutionType" + | "ExpirationDate" + | "FeesAmount" + | "FeesCurrency" + | "Id" + | "Nature" + | "PaymentType" + | "PreauthorizationId" + | "ResultCode" + | "ResultMessage" + | "Status" + | "Tag" + | "Type" + | "WireReference"; + + interface ReportData extends entityBase.EntityBaseData { + /** + * The date when the report was executed + */ + ReportDate: Timestamp; + + /** + * The URL to download the report + */ + DownloadURL: string; + + /** + * A URL that we will ping when the report is ready to download(works in a similar way to the hooks) + */ + CallbackURL: string; + + /** + * The format of the report download + */ + DownloadFormat: "CSV"; + + /** + * The type of report + */ + ReportType: "TRANSACTIONS"; + + /** + * The column to sort against and direction seperate by a `:` + */ + Sort: string; + + /** + * Whether the report should be limited to the first 10 lines(and therefore quicker to execute) + */ + Preview: boolean; + + /** + * An object of various filters for the report + */ + Filters: Filters; + + /** + * A list of columns / infos to show in the report + */ + Columns: Column[]; + + /** + * The result code + */ + ResultCode: string; + + /** + * A verbal explanation of the ResultCode + */ + ResultMessage: string; + } + + interface CreateReport + extends PickPartial< + ReportData, + | "Tag" + | "CallbackURL" + | "DownloadFormat" + | "Sort" + | "Preview" + | "Filters" + | "Columns" + > {} + } + + namespace mandate { + /** + * - "CREATED" - the mandate has been created + * - "SUBMITTED" - the mandate has been submitted to the banks and you can now do payments with this mandate + * - "ACTIVE" - the mandate is active and has been accepted by the banks and/or successfully used in a payment + * - "FAILED" - the mandate has failed for a variety of reasons and is no longer available for payments + */ + type MandateStatus = ValueOf; + type MandateScheme = "SEPA" | "BACS"; + type MandateCultureCode = "EN" | "FR" | "NL" | "DE" | "ES" | "IT" | "PL"; + type MandateExecutionType = "WEB"; + type MandateType = "DIRECT_DEBIT"; + interface MandateData extends entityBase.EntityBaseData { + /** + * An ID of a Bank Account + */ + BankAccountId: string; + + /** + * The object owner's UserId + */ + UserId: string; + + /** + * The URL to redirect to after payment (whether successful or not) + */ + ReturnURL: string; + + /** + * The URL to redirect to user to for them to proceed with the payment + */ + RedirectURL: string; + + /** + * The URL to download the mandate + */ + DocumentURL: string; + + /** + * The language to use for the mandate confirmation page - needs to be the ISO code of the language + */ + Culture: MandateCultureCode; + + /** + * The type of mandate, but will only be completed once the mandate has been submitted + */ + Scheme: MandateScheme; + + /** + * The status of the mandate: + */ + Status: MandateStatus; + + /** + * The result code + */ + ResultCode: string; + + /** + * A verbal explanation of the ResultCode + */ + ResultMessage: string; + + /** + * The execution type for creating the mandate + */ + ExecutionType: MandateExecutionType; + + /** + * The type of Mandate + */ + MandateType: MandateType; + + /** + * The banking reference for this mandate + */ + BankReference: string; + } + + interface CreateMandate + extends PickPartialRequired< + MandateData, + "Tag", + "BankAccountId" | "Culture" | "ReturnURL" + > {} + } + + namespace user { + /** + * Should be only one of these values: + * 1 - for incomes <18K€), + * 2 - for incomes between 18 and 30K€, + * 3 - for incomes between 30 and 50K€, + * 4 - for incomes between 50 and 80K€, + * 5 - for incomes between 80 and 120K€, + * 6 - for incomes >120K€ + */ + type IncomeRange = 1 | 2 | 3 | 4 | 5 | 6; + type PersonType = "NATURAL" | "LEGAL"; + type KYCLevel = "LIGHT" | "REGULAR"; + type LegalPersonType = "BUSINESS" | "ORGANIZATION" | "SOLETRADER"; + type StaticKeys = + | "KYCLevel" + | "PersonType" + | "Id" + | "CreationDate" + | "ProofOfIdentity" + | "ProofOfAddress" + | "ProofOfRegistration" + | "LegalRepresentativeProofOfIdentity" + | "ShareholderDeclaration" + | "Statute"; + interface UserData extends entityBase.EntityBaseData { + /** + * Type of user + */ + PersonType: PersonType; + + /** + * The person's email address (not more than 12 consecutive numbers) - must be a valid email + */ + Email: string; + + /** + * KYC Level (LIGHT or REGULAR) + */ + KYCLevel: KYCLevel; + } + + interface UserLegalData extends UserData { + PersonType: "LEGAL"; + + /** + * The name of the legal user + */ + Name: string; + + /** + * Type for legal user. + */ + LegalPersonType: LegalPersonType; + + /** + * The address of the company’s headquarters + */ + HeadquartersAddress: address.AddressType; + + /** + * The first name of the company’s Legal representative person + */ + LegalRepresentativeFirstName: string; + + /** + * The last name of the company’s Legal representative person + */ + LegalRepresentativeLastName: string; + + /** + * The address of the company’s Legal representative person + */ + LegalRepresentativeAddress: address.AddressType; + + /** + * The email of the company’s Legal representative person - must be valid + */ + LegalRepresentativeEmail: string; + + /** + * The date of birth of the company’s Legal representative person - be careful to set the right timezone (should be UTC) to avoid 00h becoming 23h (and hence interpreted as the day before) + */ + LegalRepresentativeBirthday: Timestamp; + + /** + * The nationality of the company’s Legal representative person + */ + LegalRepresentativeNationality: CountryISO; + + /** + * The country of residence of the company’s Legal representative person + */ + LegalRepresentativeCountryOfResidence: CountryISO; + ProofOfIdentity: string | null; + + /** + * The business statute of the company + */ + Statute: string | null; + + /** + * A MANGOPAY reference to the validated document of the proof of registration of the company + */ + ProofOfRegistration: string | null; + + /** + * The shareholder declaration of the company + */ + ShareholderDeclaration: string | null; + + /** + * The official registered number of the business + */ + CompanyNumber: string; + } + + interface UserNaturalData extends UserData { + PersonType: "NATURAL"; + + /** + * The name of the user + */ + FirstName: string; + + /** + * The last name of the user + */ + LastName: string; + + /** + * The user address + */ + Address: string | address.AddressData; + + /** + * The date of birth of the user - be careful to set the right timezone (should be UTC) to avoid 00h becoming 23h (and hence interpreted as the day before) + */ + Birthday: Timestamp; + + /** + * The user’s nationality. ISO 3166-1 alpha-2 format is expected + */ + Nationality: CountryISO; + + /** + * The user’s country of residence. ISO 3166-1 alpha-2 format is expected + */ + CountryOfResidence: CountryISO; + + /** + * User’s occupation, ie. Work + */ + Occupation: string; + IncomeRange: IncomeRange; + + /** + * Maximum length is 255 characters + */ + ProofOfIdentity: string | null; + + /** + * Maximum length is 255 characters + */ + ProofOfAddress: string | null; + + /** + * The capacity of this user - for use with UBO declarations + */ + Capacity: "NORMAL" | "DECLARATIVE"; + } + + type RequiredUserLegalData = + | "LegalPersonType" + | "Name" + | "LegalRepresentativeBirthday" + | "LegalRepresentativeCountryOfResidence" + | "LegalRepresentativeNationality" + | "LegalRepresentativeFirstName" + | "LegalRepresentativeLastName" + | "Email"; + + type RequiredUserNaturalData = + | "FirstName" + | "LastName" + | "Birthday" + | "Nationality" + | "CountryOfResidence" + | "Email"; + + interface BaseUserLegalData + extends PickPartial< + UserLegalData, + | RequiredUserLegalData + | "CompanyNumber" + | "LegalRepresentativeEmail" + | "LegalRepresentativeAddress" + | "HeadquartersAddress" + | "Tag" + > { + PersonType: "LEGAL"; + } + + interface UpdateUserLegalData extends BaseUserLegalData { + Id: string; + } + + interface CreateUserLegalData + extends MakeKeysRequired< + BaseUserLegalData, + RequiredUserLegalData | "PersonType" + > {} + + interface BaseUserNaturalData + extends PickPartial< + UserNaturalData, + RequiredUserNaturalData | "Address" | "Occupation" | "IncomeRange" + > { + PersonType: "NATURAL"; + } + + interface UpdateUserNaturalData extends BaseUserNaturalData { + Id: string; + } + + interface CreateUserNaturalData + extends MakeKeysRequired< + BaseUserNaturalData, + RequiredUserNaturalData | "PersonType" + > {} + } + + namespace payIn { + type PayInPaymentType = ValueOf; + type PayInExecutionType = + | ValueOf + | "EXTERNAL_INSTRUCTION"; + + interface TemplateURLOptions { + Payline: string; + } + + interface BasePayInData extends entityBase.EntityBaseData { + /** + * Information about the funds that are being debited + */ + DebitedFunds: MoneyData; + + /** + * Details about the funds that are being credited (DebitedFunds – Fees = CreditedFunds) + */ + CreditedFunds: MoneyData; + + /** + * Information about the fees that were taken by the client for this transaction (and were hence transferred to the Client's platform wallet) + */ + Fees: MoneyData; + + /** + * The ID of the wallet that was debited + */ + DebitedWalletId: string; + + /** + * The ID of the wallet where money will be credited + */ + CreditedWalletId: string; + + /** + * A user's ID + */ + AuthorId: string; + + /** + * The user ID who is credited (defaults to the owner of the wallet) + */ + CreditedUserId: string; + + /** + * The nature of the transaction + */ + Nature: transaction.TransactionNature; + + /** + * The status of the transaction + */ + Status: transaction.TransactionStatus; + + /** + * When the transaction happened + */ + ExecutionDate: Timestamp; + + /** + * The result code + */ + ResultCode: string; + + /** + * A verbal explanation of the ResultCode + */ + ResultMessage: string; + + /** + * The type of the transaction + */ + Type: transaction.TransactionType; + + /** + * The type of payin + */ + PaymentType: PayInPaymentType; + + /** + * The type of execution for the payin + */ + ExecutionType: PayInExecutionType; + } + + interface CardWebPayInData extends BasePayInData { + ExecutionType: "WEB"; + PaymentType: "CARD"; + + /** + * The URL to redirect to after payment (whether successful or not) + */ + ReturnURL: string; + + /** + * The type of card + */ + CardType: card.CardType; + + /** + * The SecureMode corresponds to '3D secure' for CB Visa and MasterCard. This field lets you activate it manually. The field lets you activate it + * automatically with "DEFAULT" (Secured Mode will be activated from €50 or when MANGOPAY detects there is a higher risk ), "FORCE" (if you wish to specifically force the secured mode). + */ + SecureMode: SecureMode; + + /** + * The language to use for the payment page - needs to be the ISO code of the language + */ + Culture: CountryISO; + + /** + * The URL to use for the payment page template + */ + TemplateURL: string; + + /** + * A custom description to appear on the user's bank statement. It can be up to 10 characters long, and can only include alphanumeric characters or spaces. + * See here for important info. Note that each bank handles this information differently, some show less or no information. + */ + StatementDescriptor: string; + + /** + * The URL to redirect to user to for them to proceed with the payment + */ + RedirectURL: string; + } + + interface CreateCardWebPayIn { + ExecutionType: "WEB"; + PaymentType: "CARD"; + + /** + * A user's ID + */ + AuthorId: string; + + /** + * The user ID who is credited (defaults to the owner of the wallet) + */ + CreditedUserId?: string; + + /** + * Information about the funds that are being debited + */ + DebitedFunds: MoneyData; + + /** + * Information about the fees that were taken by the client for this transaction (and were hence transferred to the Client's platform wallet) + */ + Fees: MoneyData; + + /** + * The URL to redirect to after payment (whether successful or not) + */ + ReturnURL: string; + + /** + * The ID of the wallet where money will be credited + */ + CreditedWalletId: string; + + /** + * The type of card + */ + CardType: card.CardType; + + /** + * The SecureMode corresponds to '3D secure' for CB Visa and MasterCard. This field lets you activate it manually. + * The field lets you activate it automatically with "DEFAULT" (Secured Mode will be activated from €50 or when MANGOPAY detects + * there is a higher risk ), "FORCE" (if you wish to specifically force the secured mode). + */ + SecureMode?: SecureMode; + + /** + * The language to use for the payment page - needs to be the ISO code of the language + */ + Culture: CountryISO; + + /** + * A URL to an SSL page to allow you to customise the payment page. Must be in the format: array("PAYLINE"=>"https://...") and meet all the + * specifications listed here. Note that only a template for Payline is currently available + */ + TemplateURLOptions?: TemplateURLOptions; + + /** + * A custom description to appear on the user's bank statement. It can be up to 10 characters long, and + * can only include alphanumeric characters or spaces. See here for important info. Note that each bank handles this information differently, some show less or no information. + */ + StatementDescriptor?: string; + } + + interface CardDirectPayInData extends BasePayInData { + ExecutionType: "DIRECT"; + PaymentType: "CARD"; + + /** + * This is the URL where users are automatically redirected after 3D secure validation (if activated) + */ + SecureModeReturnURL: string; + + /** + * The ID of a card + */ + CardId: string; + + /** + * The SecureMode corresponds to '3D secure' for CB Visa and MasterCard. This field lets you activate it manually. The field lets you activate it + * automatically with "DEFAULT" (Secured Mode will be activated from €50 or when MANGOPAY detects there is a higher risk ), "FORCE" (if you wish to specifically force the secured mode). + */ + SecureMode: SecureMode; + + /** + * A custom description to appear on the user's bank statement. It can be up to 10 characters long, and can only include alphanumeric + * characters or spaces. See here for important info. Note that each bank handles this information differently, some show less or no information. + */ + StatementDescriptor: string; + + /** + * Contains useful information related to the user billing + */ + Billing: BillingData; + + /** + * Contains information related to security and fraud + */ + SecurityInfo: SecurityInfoData; + + /** + * The value is 'true' if the SecureMode was used + */ + SecureModeNeeded: boolean; + + /** + * This is the URL where to redirect users to proceed to 3D secure validation + */ + SecureModeRedirectUrl: string; + } + + interface CreateCardDirectPayIn { + ExecutionType: "DIRECT"; + PaymentType: "CARD"; + + /** + * A user's ID + */ + AuthorId: string; + + /** + * The user ID who is credited (defaults to the owner of the wallet) + */ + CreditedUserId?: string; + + /** + * The ID of the wallet where money will be credited + */ + CreditedWalletId: string; + + /** + * Information about the funds that are being debited + */ + DebitedFunds: MoneyData; + + /** + * Information about the fees that were taken by the client for this transaction (and were hence transferred to the Client's platform wallet) + */ + Fees: MoneyData; + + /** + * This is the URL where users are automatically redirected after 3D secure validation (if activated) + */ + SecureModeReturnURL: string; + + /** + * The ID of a card + */ + CardId: string; + + /** + * The SecureMode corresponds to '3D secure' for CB Visa and MasterCard. This field lets you activate it manually. The field lets you activate it automatically + * with "DEFAULT" (Secured Mode will be activated from €50 or when MANGOPAY detects there is a higher risk ), "FORCE" (if you wish to specifically force the secured mode). + */ + SecureMode?: SecureMode; + + /** + * Contains useful information related to the user billing + */ + Billing?: BillingData; + + /** + * A custom description to appear on the user's bank statement. It can be up to 10 characters long, and can only include alphanumeric characters or spaces. + * See here for important info. Note that each bank handles this information differently, some show less or no information. + */ + StatementDescriptor?: string; + } + + interface CardPreAuthorizedPayInData extends BasePayInData { + PreauthorizationId: string; + ExecutionType: "DIRECT"; + PaymentType: "PREAUTHORIZED"; + } + + interface CreateCardPreAuthorizedPayIn { + ExecutionType: "DIRECT"; + PaymentType: "PREAUTHORIZED"; + + /** + * Custom data that you can add to this item + */ + Tag?: string; + + /** + * A user's ID + */ + AuthorId: string; + + /** + * The user ID who is credited (defaults to the owner of the wallet) + */ + CreditedUserId?: string; + + /** + * The ID of the wallet where money will be credited + */ + CreditedWalletId: string; + + /** + * Information about the funds that are being debited + */ + DebitedFunds: MoneyData; + + /** + * Information about the fees that were taken by the client for this transaction (and were hence transferred to the Client's platform wallet) + */ + Fees: MoneyData; + + /** + * The ID of the Preauthorization object + */ + PreauthorizationId: string; + } + + interface BankAccountData { + /** + * The BIC of the bank account + */ + BIC: string; + + /** + * The IBAN of the bank account + */ + IBAN: string; + + /** + * The name of the owner of the bank account + */ + OwnerName: string; + + /** + * The address of the owner of the bank account + */ + OwnerAddress: string; + + /** + * The type of bank account + */ + Type: ValueOf; + } + + interface BankWireDirectPayInData extends BasePayInData { + ExecutionType: "DIRECT"; + PaymentType: "BANK_WIRE"; + + /** + * The declared debited funds + */ + DeclaredDebitedFunds: MoneyData; + + /** + * The declared fees + */ + DeclaredFees: MoneyData; + + /** + * Wire reference + */ + WireReference: string; + + /** + * Bank account details + */ + BankAccount: BankAccountData; + } + + interface CreateBankWireDirectPayIn + extends PickPartialRequired< + BankWireDirectPayInData, + "Tag", + | "AuthorId" + | "CreditedUserId" + | "CreditedWalletId" + | "DeclaredDebitedFunds" + | "DeclaredFees" + > { + ExecutionType: "DIRECT"; + PaymentType: "BANK_WIRE"; + } + + type PayInData = + | CardDirectPayInData + | CardPreAuthorizedPayInData + | CardWebPayInData + | BankWireDirectPayInData; + } + + namespace refund { + type RefundReasonType = + | "INITIALIZED_BY_CLIENT" + | "BANKACCOUNT_INCORRECT" + | "OWNER_DO_NOT_MATCH_BANKACCOUNT" + | "BANKACCOUNT_HAS_BEEN_CLOSED" + | "WITHDRAWAL_IMPOSSIBLE_ON_SAVINGS_ACCOUNTS" + | "OTHER"; + interface RefundReason { + RefundReasonType: RefundReasonType; + } + + interface RefundData extends transaction.TransactionData { + /** + * The nature of the transaction + */ + Nature: "REFUND"; + + /** + * The initial transaction ID + */ + InitialTransactionId: string; + + /** + * The initial transaction type + */ + InitialTransactionType: transaction.TransactionType; + + /** + * Contains info about the reason for refund + */ + RefundReason: RefundReason; + } + + interface CreatePayInRefund { + AuthorId: string; + Tag?: string; + DebitedFunds?: MoneyData; + Fees?: MoneyData; + } + + interface CreateTransferRefund { + AuthorId: string; + Tag?: string; + } + } + + namespace repudiation { + interface RepudiationData extends transaction.TransactionData { + /** + * The nature of the transaction + */ + Nature: "REPUDIATION"; + + /** + * The initial transaction ID + */ + InitialTransactionId: string; + + /** + * The initial transaction type + */ + InitialTransactionType: transaction.TransactionType; + + /** + * Contains info about the reason for refund + */ + RefundReason: refund.RefundReason; + } + } + + namespace client { + type BusinessType = "MARKETPLACE" | "CROWDFUNDING" | "FRANCHISE" | "OTHER"; + type Sector = + | "RENTALS" + | "STORES_FASHION_ACCESSORIES_OBJECTS" + | "BEAUTY_COSMETICS_HEALTH" + | "FOOD_WINE_RESTAURANTS" + | "HOSPITALITY_TRAVEL_CORIDING" + | "ART_MUSIC_ENTERTAINMENT" + | "FURNITURE_GARDEN" + | "SERVICES_JOBBING_EDUCATION" + | "SPORT_RECREATION_ACTIVITIES" + | "TICKETING"; + type PlatformType = ValueOf; + + interface PlatformCategorization { + Sector: Sector; + BusinessType: BusinessType; + } + + interface ClientData extends entityBase.EntityBaseData { + /** + * The pretty name for the client + */ + Name: string; + + /** + * The registered name of your company + */ + RegisteredName: string; + + /** + * An ID for the client (i.e. url friendly, lowercase etc - sort of namespace identifier) + */ + ClientId: string; + + /** + * The primary branding colour to use for your merchant + */ + PrimaryThemeColour: string; + + /** + * The primary branding colour to use for buttons for your merchant + */ + PrimaryButtonColour: string; + + /** + * The URL of the logo of your client + */ + Logo: string; + + /** + * A list of email addresses to use when contacting you for technical issues/communications + */ + TechEmails: string[]; + + /** + * A list of email addresses to use when contacting you for admin/commercial issues/communications + */ + AdminEmails: string[]; + + /** + * A list of email addresses to use when contacting you for fraud/compliance issues/communications + */ + FraudEmails: string[]; + + /** + * A list of email addresses to use when contacting you for billing issues/communications + */ + BillingEmails: string[]; + + /** + * The Categorization of your platform, in terms of Business Type and Sector + */ + PlatformCategorization: PlatformCategorization; + + /** + * A description of what your platform does + */ + PlatformDescription: string; + + /** + * The URL for your website + */ + PlatformURL: string; + + /** + * The address of the company’s headquarters + */ + HeadquartersAddress: address.AddressType; + + /** + * The tax (or VAT) number for your company + */ + TaxNumber: string; + + /** + * Your unique MANGOPAY reference which you should use when contacting us + */ + CompanyReference: string; + } + + interface UpdateClient { + /** + * The primary branding colour to use for buttons for your merchant + */ + PrimaryButtonColour?: string; + + /** + * The primary branding colour to use for your merchant + */ + PrimaryThemeColour?: string; + + /** + * A list of email addresses to use when contacting you for admin/commercial issues/communications + */ + AdminEmails?: string[]; + + /** + * A list of email addresses to use when contacting you for technical issues/communications + */ + TechEmails?: string[]; + + /** + * A list of email addresses to use when contacting you for billing issues/communications + */ + BillingEmails?: string[]; + + /** + * A list of email addresses to use when contacting you for fraud/compliance issues/communications + */ + FraudEmails?: string[]; + + /** + * The address of the company’s headquarters + */ + HeadquartersAddress?: address.AddressType; + + /** + * The tax (or VAT) number for your company + */ + TaxNumber?: string; + + /** + * The type of platform + */ + PlatformType?: PlatformType; + + /** + * A description of what your platform does + */ + PlatformDescription?: string; + + /** + * The URL for your website + */ + PlatformURL?: string; + } + + interface UpdateClientLogo { + /** + * The base64 encoded file which needs to be uploaded + */ + File: string; + } + } + + namespace event { + type EventType = + | "PAYIN_NORMAL_CREATED" + | "PAYIN_NORMAL_SUCCEEDED" + | "PAYIN_NORMAL_FAILED" + | "PAYOUT_NORMAL_CREATED" + | "PAYOUT_NORMAL_SUCCEEDED" + | "PAYOUT_NORMAL_FAILED" + | "TRANSFER_NORMAL_CREATED" + | "TRANSFER_NORMAL_SUCCEEDED" + | "TRANSFER_NORMAL_FAILED" + | "PAYIN_REFUND_CREATED" + | "PAYIN_REFUND_SUCCEEDED" + | "PAYIN_REFUND_FAILED" + | "PAYOUT_REFUND_CREATED" + | "PAYOUT_REFUND_SUCCEEDED" + | "PAYOUT_REFUND_FAILED" + | "TRANSFER_REFUND_CREATED" + | "TRANSFER_REFUND_SUCCEEDED" + | "TRANSFER_REFUND_FAILED" + | "KYC_CREATED" + | "KYC_VALIDATION_ASKED" + | "KYC_SUCCEEDED" + | "KYC_FAILED" + | "PAYIN_REPUDIATION_CREATED" + | "PAYIN_REPUDIATION_SUCCEEDED" + | "PAYIN_REPUDIATION_FAILED" + | "DISPUTE_DOCUMENT_CREATED" + | "DISPUTE_DOCUMENT_VALIDATION_ASKED" + | "DISPUTE_DOCUMENT_SUCCEEDED" + | "DISPUTE_DOCUMENT_FAILED" + | "DISPUTE_CREATED" + | "DISPUTE_SUBMITTED" + | "DISPUTE_ACTION_REQUIRED" + | "DISPUTE_FURTHER_ACTION_REQUIRED" + | "DISPUTE_CLOSED" + | "DISPUTE_SENT_TO_BANK" + | "TRANSFER_SETTLEMENT_CREATED" + | "TRANSFER_SETTLEMENT_SUCCEEDED" + | "TRANSFER_SETTLEMENT_FAILED" + | "MANDATE_CREATED" + | "MANDATE_FAILED" + | "MANDATE_ACTIVATED" + | "MANDATE_SUBMITTED" + | "PREAUTHORIZATION_PAYMENT_WAITING" + | "PREAUTHORIZATION_PAYMENT_EXPIRED" + | "PREAUTHORIZATION_PAYMENT_CANCELED" + | "PREAUTHORIZATION_PAYMENT_VALIDATED" + | "UBO_DECLARATION_CREATED" + | "UBO_DECLARATION_VALIDATION_ASKED" + | "UBO_DECLARATION_REFUSED" + | "UBO_DECLARATION_VALIDATED"; + + interface EventData { + /** + * The ID of whatever the event is + */ + ResourceId: string; + + /** + * When the event happened + */ + Date: Timestamp; + + /** + * The event type + */ + EventType: EventType; + } + } + + namespace dispute { + type DisputeReasonType = + | "DUPLICATE" + | "FRAUD" + | "PRODUCT_UNACCEPTABLE" + | "UNKNOWN" + | "OTHER" + | "REFUND_CONVERSION_RATE" + | "LATE_FAILURE_INSUFFICIENT_FUNDS" + | "LATE_FAILURE_CONTACT_USER" + | "LATE_FAILURE_BANKACCOUNT_CLOSED" + | "LATE_FAILURE_BANKACCOUNT_INCOMPATIBLE" + | "LATE_FAILURE_BANKACCOUNT_INCORRECT" + | "AUTHORISATION_DISPUTED" + | "TRANSACTION_NOT_RECOGNIZED" + | "PRODUCT_NOT_PROVIDED" + | "CANCELED_REOCCURING_TRANSACTION" + | "REFUND_NOT_PROCESSED"; + + type DisputeStatus = + | "CREATED" + | "PENDING_CLIENT_ACTION" + | "SUBMITTED" + | "PENDING_BANK_ACTION" + | "REOPENED_PENDING_CLIENT_ACTION" + | "CLOSED"; + + type DisputeType = "CONTESTABLE" | "NOT_CONTESTABLE" | "RETRIEVAL"; + + interface DisputeReason { + DisputeReasonType: DisputeReasonType; + DisputeReasonMessage: string; + } + + interface DisputeData extends entityBase.EntityBaseData { + /** + * The initial transaction ID + */ + InitialTransactionId: string; + + /** + * The initial transaction type + */ + InitialTransactionType: transaction.TransactionType; + + /** + * The result code + */ + ResultCode: string; + + /** + * A verbal explanation of the ResultCode + */ + ResultMessage: string; + + /** + * Info about the reason for the dispute + */ + DisputeReason: DisputeReason; + + /** + * The status of the dispute + */ + Status: DisputeStatus; + + /** + * Used to communicate information about the dispute status to you + */ + StatusMessage: string; + + /** + * The amount of funds that were disputed + */ + DisputedFunds: MoneyData; + + /** + * The amount you wish to contest + */ + ContestedFunds: MoneyData; + + /** + * The type of dispute + */ + DisputeType: DisputeType; + + /** + * The deadline by which you must contest the dispute (if you wish to contest it) + */ + ContestDeadlineDate: Timestamp; + + /** + * The ID of the associated repudiation transaction + */ + RepudiationId: string; + } + + interface SubmitDispute + extends PickPartial {} + + interface UpdateDispute extends PickPartial {} + } + + interface DisputeReason extends dispute.DisputeReason {} + + namespace settlementTransfer { + interface SettlementTransferData extends transaction.TransactionData { + /** + * The nature of the transaction + */ + Nature: "SETTLEMENT"; + + /** + * The ID of the associated repudiation transaction + */ + RepudiationId: string; + + /** + * The initial transaction ID + */ + InitialTransactionId: string; + + /** + * The initial transaction type + */ + InitialTransactionType: transaction.TransactionType; + + /** + * Contains info about the reason for refund + */ + RefundReason: refund.RefundReason; + } + + interface CreateSettlementTransfer + extends PickPartialRequired< + SettlementTransferData, + "Tag", + "AuthorId" | "DebitedFunds" | "Fees" + > {} + } + + namespace transfer { + interface TransferData extends entityBase.EntityBaseData { + /** + * Information about the funds that are being debited + */ + DebitedFunds: MoneyData; + + /** + * Details about the funds that are being credited (DebitedFunds – Fees = CreditedFunds) + */ + CreditedFunds: MoneyData; + + /** + * Information about the fees that were taken by the client for this transaction (and were hence transferred to the Client's platform wallet) + */ + Fees: MoneyData; + + /** + * The ID of the wallet that was debited + */ + DebitedWalletId: string; + + /** + * The ID of the wallet where money will be credited + */ + CreditedWalletId: string; + + /** + * A user's ID + */ + AuthorId: string; + + /** + * The user ID who is credited (defaults to the owner of the wallet) + */ + CreditedUserId: string; + + /** + * The nature of the transaction + */ + Nature: transaction.TransactionNature; + + /** + * The status of the transaction + */ + Status: transaction.TransactionStatus; + + /** + * When the transaction happened + */ + ExecutionDate: Timestamp; + + /** + * The result code + */ + ResultCode: string; + + /** + * A verbal explanation of the ResultCode + */ + ResultMessage: string; + + /** + * The type of the transaction + */ + Type: "TRANSFER"; + } + + interface CreateTransfer { + /** + * Custom data that you can add to this item + */ + Tag?: string; + + /** + * A user's ID + */ + AuthorId: string; + + /** + * The user ID who is credited (defaults to the owner of the wallet) + */ + CreditedUserId?: string; + + /** + * Information about the funds that are being debited + */ + DebitedFunds: MoneyData; + + /** + * Information about the fees that were taken by the client for this transaction (and were hence transferred to the Client's platform wallet) + */ + Fees: MoneyData; + + /** + * The ID of the wallet that was debited + */ + DebitedWalletId: string; + + /** + * The ID of the wallet where money will be credited + */ + CreditedWalletId: string; + } + } + + namespace PayOut { + interface PayOutData extends Omit { + /** + * The type of the transaction + */ + Type: "PAYOUT"; + + PaymentType: IPayOutPaymentType["BankWire"]; + + /** + * An ID of a Bank Account + */ + BankAccountId: string; + + /** + * A custom reference you wish to appear on the user’s bank statement (your Client Name is already shown). This reference can contain max 12 characters + */ + BankWireRef: string; + } + + interface CreatePayOut { + /** + * A user's ID + */ + AuthorId: string; + + /** + * Information about the funds that are being debited + */ + DebitedFunds: MoneyData; + + /** + * Information about the fees that were taken by the client for this transaction (and were hence transferred to the Client's platform wallet) + */ + Fees: MoneyData; + + /** + * An ID of a Bank Account + */ + BankAccountId: string; + + /** + * The ID of the wallet that was debited + */ + DebitedWalletId: string; + + /** + * A custom reference you wish to appear on the user’s bank statement (your Client Name is already shown). This reference can contain max 12 characters + */ + BankWireRef?: string; + Tag?: string; + } + } + + class Users { + /** + * Create a new user + * @param user + */ + create: MethodOverload & + MethodOverload; + + /** + * Update a user + * @param user + * @param options + */ + update: MethodOverload< + models.UserLegal | user.UpdateUserLegalData, + user.UserLegalData + > & + MethodOverload< + models.UserNatural | user.UpdateUserNaturalData, + user.UserNaturalData + >; + + /** + * Get natural or legal user by ID + * @param userId + * @param options + */ + get: MethodOverload; + + /** + * Get natural user by ID + * @param userId + * @param options + */ + getNatural: MethodOverload; + + /** + * Get legal user by ID + * @param userId + * @param options + */ + getLegal: MethodOverload; + + /** + * Get all users + */ + getAll: NoArgMethodOverload< + Array + >; + + /** + * Create bank account for user + * @param userId + * @param bankAccount + * @param options + */ + createBankAccount: TwoArgsMethodOverload< + string, + bankAccount.USDetails, + bankAccount.USData + > & + TwoArgsMethodOverload< + string, + bankAccount.OtherDetails, + bankAccount.OtherData + > & + TwoArgsMethodOverload< + string, + bankAccount.IBANDetails, + bankAccount.IBANData + > & + TwoArgsMethodOverload & + TwoArgsMethodOverload; + + /** + * Deactivate a bank account + * + * Note that once deactivated, a bank account can't be reactivated afterwards + * @param userId + * @param bankAccountId + * @param options + */ + deactivateBankAccount: TwoArgsMethodOverload; + + /** + * Get all bank accounts for user + * @param userId + * @param options + */ + getBankAccounts: MethodOverload; + + /** + * Get all bank accounts for user + * @param userId + * @param bankAccountId + * @param options + */ + getBankAccount: TwoArgsMethodOverload; + + /** + * Get all wallets accounts for user + */ + getWallets: MethodOverload; + + /** + * Get all transactions for user + * @param userId + * @param options + */ + getTransactions: MethodOverload; + + /** + * Get all cards for user + * @param userId + * @param options + */ + getCards: MethodOverload; + + /** + * Create new KYC document + * @param userId + * @param kycDocument + * @param options + */ + createKycDocument: TwoArgsMethodOverload< + string, + kycDocument.CreateKycDocument, + kycDocument.KycDocumentData + >; + + /** + * Get all KYC documents for user + * @param userId + * @param options + */ + getKycDocuments: MethodOverload; + + /** + * Get KYC document + * @param userId + * @param kycDocumentId + * @param options + */ + getKycDocument: TwoArgsMethodOverload< + string, + string, + kycDocument.KycDocumentData + >; + + /** + * Update status of KYC Document (Currently only allows for submitting the document) + * @param userId + * @param kycDocument + * @param options + */ + updateKycDocument: TwoArgsMethodOverload< + string, + kycDocument.SubmitKycDocument, + kycDocument.KycDocumentData + >; + + /** + * Create page for KYC document + * @param userId + * @param kycDocumentId + * @param kycPage + * @param options + */ + createKycPage: ThreeArgsMethodOverload< + string, + string, + kycDocument.CreateKycPage, + kycDocument.KycDocumentData + >; + + /** + * Create page for KYC document + * @param userId + * @param kycDocumentId + * @param filePath + * @param options + */ + createKycPageFromFile: ThreeArgsMethodOverload< + string, + string, + string, + kycDocument.KycDocumentData + >; + + /** + * Get users's EMoney + * @param userId + * @param options + */ + getEMoney: MethodOverload; + + /** + * Create an UboDeclaration for the user + * @param userId + * @param uboDeclaration + * @param options + */ + createUboDeclaration: TwoArgsMethodOverload< + string, + uboDeclaration.CreateUboDeclaration, + uboDeclaration.UboDeclarationData + >; + + /** + * Get all user preauthorizations + * @param userId + * @param options + */ + getPreAuthorizations: MethodOverload< + string, + cardPreAuthorization.CardPreAuthorizationData[] + >; + } + + /** + * You need to create document in order to upload pages on this document. + * + * 1. The KYC Document Object is a request to validate a required document. There is one request for one Type of document + * 2. Upload a file through a Page. A document should get several pages + * 3. Edit the object Document and set the Status field to "VALIDATION_ASKED" (instead of "CREATED") + * 4. The demand is received by our team. The object is waiting for a "VALIDATED" status + * + * Note that you are not allowed to store KYC documents on your side unless you have permission from the approriate authorities in your country + */ + class KycDocuments { + /** + * Get all KycDocuments + * @param options + */ + getAll: NoArgMethodOverload; + + /** + * Get KycDocument + * @param kycDocumentId + * @param options + */ + get: MethodOverload; + + /** + * Creates temporary URLs where each page of a KYC document can be viewed. + * @param documentId + */ + createKycDocumentConsult: MethodOverload< + string, + any // Unsure of data structure from docs + >; + } + + /** + * An UBO Declaration is an electronic version of the previous KYC document "Shareholder Declaration", in order to declare all the Ultimate Beneficial Owners of a BUSINESS-typed legal User + * (ie the shareholders with >25% of capital or voting rights). + * + * 1. Create each Ultimate Beneficial Owner as a Natural User, who must have a "DECLARATIVE" Capacity. + * 2. Create a new UBO Declaration for your legal user, and link every Ultimate Beneficial Owners created previously thanks to DeclaredUBOs. + * - This list can be empty if your legal user has no Ultimate Beneficial Owner, or no eligible one (ie. no Ultimate Beneficial Owner that owns more than 25% of this company). + * 3. Edit the UBODeclaration object and set the Status field to "VALIDATION_ASKED" (instead of "CREATED") + * 4. The demand is received by our team and once processed, it will either get a "VALIDATED" status, or "REFUSED" with more information provided in the RefusedReasonTypes parameter + * + * Note that UBO declarations are not yet a requirement for your user to be KYC verified and are optional at this stage + */ + class UboDeclarations { + /** + * Retrieves a UBO declaration object from the API. + * @param id + * @param options + */ + get: MethodOverload; + + /** + * Updates a UBO declaration entity. + * @param uboDeclaration Updated UBO declaration entity - must have ID + * @param options + */ + update: MethodOverload< + uboDeclaration.UpdateUboDeclaration, + uboDeclaration.UboDeclarationData + >; + } + + class BankAccounts { + /** + * Retrieve list of transactions for a bank account + * @param bankAccountId + * @param options + */ + getTransactions: MethodOverload; + } + + class Wallets { + /** + * Create new wallet + * @param wallet + * @param options + */ + create: MethodOverload< + wallet.CreateWallet | models.Wallet, + wallet.WalletData + >; + + /** + * Update wallet + * @param wallet + * @param options + */ + update: MethodOverload< + wallet.UpdateWallet | models.Wallet, + wallet.WalletData + >; + + /** + * Get a specific wallet + * @param walletId + */ + get: MethodOverload; + + /** + * Get transactions for the wallet + * @param walletId + * @param options + */ + getTransactions: MethodOverload; + } + + class Cards { + /** + * Get card + * @param cardId + * @param ptions + */ + get: MethodOverload; + + /** + * Gets a list of cards having the same fingerprint. + * The fingerprint is a hash uniquely generated per 16-digit card number. + * + * @param fingerprint The fingerprint hash + */ + getByFingerprint: MethodOverload; + + /** + * Update card (currently only supports deactivation) + * @param card + * @param options + */ + update: MethodOverload; + + /** + * Get list of Transactions of a Card + * @param cardId + * @param options + */ + getTransactions: MethodOverload; + + /** + * Gets list of PreAuthorizations of a Card. + * @param cardId + * @param options + */ + getPreAuthorizations: MethodOverload< + string, + cardPreAuthorization.CardPreAuthorizationData[] + >; + } + + /** + * You need to register a card in order to process a Direct PayIn. Card registration enables you to tokenize a Card. These are the steps to follow: + * + * 1. Create a CardRegistration Object + * 2. Get a PreRegistrationData + * 3. The user posts PreRegistrationData, AccessKey and card details through a form (PHP & JS samples) to the CardRegistrationURL (5. in the diagram) + * 4. Get a RegistrationData back + * 5. Edit the CardRegistration Object (POST method) with the RegistrationData just received + * 6. Get the CardId ready to use into the Direct PayIn Object + * + * - If you don’t want to save the card you must change the field ACTIVE in the card object to false + */ + class CardRegistrations { + /** + * Create new card registration + * @param cardRegistration + * @param options + */ + create: MethodOverload< + cardRegistration.CreateCardRegistration, + cardRegistration.CardRegistrationData + >; + + /** + * Create new card registration + * @param cardRegistrationId + * @param options + */ + get: MethodOverload; + + /** + * Update card registration + * @param cardRegistration + */ + update: MethodOverload< + cardRegistration.UpdateCardRegistration, + cardRegistration.CardRegistrationData + >; + } + + /** + * The PreAuthorization Object ensures the solvency of a registered card for 7 days. The overall process is as follows: + * + * 1. Register a card (CardRegistration) + * 2. Create a PreAuthorization with the CardId. This allows you to charge an amount on a card + * 3. Charge the card through the PreAuthorized PayIn object (Payins/preauthorized/direct) + * + * How does PreAuthorization work? + * - Once the PreAuthorization object is created the Status is "CREATED" until 3D secure validation. + * - If the authorization is successful the status is "SUCCEEDED" if it failed the status is "FAILED". + * - Once Status = "SUCCEEDED" and PaymentStatus = "WAITING" you can charge the card. + * - The Pay-In amount has to be less than or equal to the amount authorized. + */ + class CardPreAuthorizations { + /** + * Create new pre-authorization + * @param cardPreAuthorization + * @param options + */ + create: MethodOverload< + cardPreAuthorization.CreateCardPreAuthorization, + cardPreAuthorization.CardPreAuthorizationData + >; + + /** + * Get data for Card pre-authorization + * @param cardPreAuthorizationId + * @param options + */ + get: MethodOverload; + + /** + * Update pre-authorization object (currently only supports cancellation) + * @param cardPreAuthorization + */ + update: MethodOverload< + cardPreAuthorization.UpdateCardPreAuthorization, + cardPreAuthorization.CardPreAuthorizationData + >; + } + + class PayIns { + /** + * Create new pay-in + * @param payIn + * @param options + */ + create: MethodOverload< + payIn.CreateCardDirectPayIn, + payIn.CardDirectPayInData + > & + MethodOverload< + payIn.CreateCardPreAuthorizedPayIn, + payIn.CardPreAuthorizedPayInData + > & + MethodOverload & + MethodOverload< + payIn.CreateBankWireDirectPayIn, + payIn.BankWireDirectPayInData + >; + + /** + * Get pay-in + * @param payInId + * @param options + */ + get: MethodOverload; + + /** + * Create refund for pay-in object + * @param payInId + * @param refundData + * @param options + */ + createRefund: TwoArgsMethodOverload< + string, + refund.CreatePayInRefund, + refund.RefundData + >; + + /** + * Gets list of Refunds for a PayIn + * @param payInId + * @param options + */ + getRefunds: MethodOverload; + } + + class Refunds { + /** + * Get events + * @param refundId + * @param options + */ + get: MethodOverload; + } + + class Clients { + /** + * Get the client + */ + get: NoArgMethodOverload; + + /** + * Update the client + * @param client + * @param options + */ + update: MethodOverload; + + /** + * Upload client logo from base64 image string + * @param base64Logo + * @param options + */ + uploadLogo: MethodOverload; + + /** + * Upload client logo from file path + * @param filePath + * @param options + */ + uploadLogoFromFile: MethodOverload; + + /** + * Get all client wallets + * @param options + */ + getClientWallets: NoArgMethodOverload; + + /** + * Get a client wallet + * @param fundsType + * @param currency + * @param options + */ + getClientWallet: TwoArgsMethodOverload< + wallet.ClientFundsType, + CurrencyISO, + wallet.ClientWalletData + >; + + /** + * Get client wallets by the type of funds + * @param fundsType + * @param options + */ + getClientWalletsByFundsType: MethodOverload< + wallet.ClientFundsType, + wallet.ClientWalletData[] + >; + + /** + * Get a client wallet's transactions + * @param fundsType + * @param currency + * @param options + */ + getClientWalletTransactions: TwoArgsMethodOverload< + wallet.ClientFundsType, + CurrencyISO, + transaction.TransactionData[] + >; + } + + class PayOuts { + /** + * Create new pay-out + * @param payOut + * @param options + */ + create: MethodOverload; + + /** + * Get payout + * @param payOutId + * @param options + */ + get: MethodOverload; + + /** + * Gets list of Refunds of a PayOut + * @param payOutId + * @param options + */ + getRefunds: MethodOverload; + } + + class Transfers { + /** + * Create new transfer + * @param transfer + * @param options + */ + create: MethodOverload; + + /** + * Get transfer + * @param transferId + * @param options + */ + get: MethodOverload; + + /** + * Create refund for transfer object + * @param transferId + * @param refund + * @param options + */ + createRefund: TwoArgsMethodOverload< + string, + refund.CreateTransferRefund, + refund.RefundData + >; + + /** + * Gets list of Refunds of a Transfer + * @param transferId + * @param options + */ + getRefunds: MethodOverload; + } + + class BankingAliases { + /** + * Create a banking alias + * @param bankingAlias + * @param options + */ + create: MethodOverload< + bankingAlias.CreateIBANBankingAlias, + bankingAlias.IBANBankingAliasData + >; + + /** + * Get a banking alias + * @param bankingAliasId + * @param options + */ + get: MethodOverload; + + /** + * Get all banking aliases + * @param options + */ + getAll: NoArgMethodOverload; + + /** + * Update banking alias + * @param bankingAliasId + * @param options + */ + update: MethodOverload< + Partial>, + bankingAlias.IBANBankingAliasData + >; + + /** + * Deactivate banking alias + * @param bankingAliasId + * @param options + */ + deactivate: MethodOverload; + + /** + * Activate banking alias + * @param bankingAliasId + * @param options + */ + activate: MethodOverload; + } + + class DisputeDocuments { + /** + * Get all KycDocuments + * @param options + */ + getAll: NoArgMethodOverload; + + /** + * Get KycDocument + * @param documentId + * @param options + */ + get: MethodOverload; + + /** + * Creates temporary URLs where each page of a KYC document can be viewed. + * @param documentId + */ + createDisputeDocumentConsult: MethodOverload< + string, + any // Unsure of data structure from docs + >; + } + + class Repudiations { + /** + * Gets list of Refunds of a Repudiation + * @param repudiationId + * @param options + */ + getRefunds: MethodOverload; + } + + class Disputes { + /** + * Get dispute + * @param disputeId + * @param options + */ + get: MethodOverload; + + /** + * Get all disputes + * @param options + */ + getAll: NoArgMethodOverload; + + /** + * Update dispute's tag + * @param dispute + * @param options + */ + update: MethodOverload; + + /** + * Contest dispute + * @param disputeId + * @param contestedFunds + * @param options + */ + contestDispute: TwoArgsMethodOverload< + string, + MoneyData, + dispute.DisputeData + >; + + /** + * This method is used to resubmit a Dispute if it is reopened requiring more docs + * @param disputeId + * @param options + */ + resubmitDispute: MethodOverload; + + /** + * Close dispute + * @param disputeId + * @param options + */ + closeDispute: MethodOverload; + + /** + * Gets dispute's transactions + * @param disputeId + * @param options + */ + getTransactions: MethodOverload; + + /** + * Gets dispute's documents for wallet + * @param walletId + * @param options + */ + getDisputesForWallet: MethodOverload; + + /** + * Gets user's disputes + * @param userId + * @param options + */ + getDisputesForUser: MethodOverload; + + /** + * Gets repudiation + * @param repudiationId + * @param options + */ + getRepudiation: MethodOverload; + + /** + * Creates settlement transfer + * @param settlementTransfer + * @param repudiationId + * @param options + */ + createSettlementTransfer: TwoArgsMethodOverload< + settlementTransfer.CreateSettlementTransfer, + string, + settlementTransfer.SettlementTransferData + >; + + /** + * Gets settlement transfer + * @param settlementTransferId + * @param options + */ + getSettlementTransfer: MethodOverload< + string, + settlementTransfer.SettlementTransferData + >; + + /** + * Gets documents for dispute + * @param disputeId + * @param options + */ + getDocumentsForDispute: MethodOverload< + string, + disputeDocument.DisputeDocumentData[] + >; + + /** + * Update dispute document + * @param disputeId + * @param disputeDocument + * @param options + */ + updateDisputeDocument: TwoArgsMethodOverload< + string, + Partial, + disputeDocument.DisputeDocumentData + >; + + /** + * Creates document for dispute + * @param disputeId + * @param disputeDocument + * @param options + */ + createDisputeDocument: TwoArgsMethodOverload< + string, + disputeDocument.CreateDisputeDocument, + disputeDocument.DisputeDocumentData + >; + + /** + * Creates document's page for dispute + * @param disputeId + * @param disputeDocumentId + * @param disputeDocumentPage + * @param options + */ + createDisputeDocumentPage: ThreeArgsMethodOverload< + string, + string, + disputeDocument.CreateDisputeDocumentPage, + disputeDocument.DisputeDocumentData + >; + + /** + * Creates document's page for dispute from file + * @param disputeId + * @param disputeDocumentId + * @param file + * @param options + */ + createDisputeDocumentPageFromFile: ThreeArgsMethodOverload< + string, + string, + string, + disputeDocument.DisputeDocumentData + >; + + /** + * Retrieve a list of Disputes pending settlement + * @param options + */ + getPendingSettlement: NoArgMethodOverload; + } + + class Events { + /** + * Get events + * @param options + */ + getAll: NoArgMethodOverload; + } + + class Responses { + /** + * Get response from previous call + * @param options + */ + get: NoArgMethodOverload; + } + + class Mandates { + /** + * Create a new Mandate + * @param mandate + * @param options + */ + create: MethodOverload; + + /** + * Get all mandates + * @param options + */ + getAll: NoArgMethodOverload; + + /** + * Get mandate by ID + * @param mandateId + * @param options + */ + get: MethodOverload; + + /** + * Cancel a mandate + * @param mandateId + * @param options + */ + cancel: MethodOverload; + + /** + * Gets user's mandates + * @param userId + * @param options + */ + getMandatesForUser: MethodOverload; + + /** + * Gets bank account mandates + * @param userId + * @param bankAccountId + * @param options + */ + getMandatesForBankAccount: TwoArgsMethodOverload< + string, + string, + mandate.MandateData[] + >; + + /** + * Gets Transactions for a Mandate + * @param mandateId + * @param options + */ + getTransactions: MethodOverload; + } + class Hooks { + /** + * Create new hook + * @param hook + * @param options + */ + create: MethodOverload; + + /** + * Get hook + * @param hookId + * @param options + */ + get: MethodOverload; + + /** + * Save hook + * @param hook + * @param options + */ + update: MethodOverload; + + /** + * Get all hooks + * @param options + */ + getAll: NoArgMethodOverload; + } + + class Reports { + /** + * Create a report + * @param report + * @param options + */ + create: MethodOverload; + + /** + * Get a report + * @param reportId + * @param options + */ + get: MethodOverload; + + /** + * Get all reports + * @param options + */ + getAll: NoArgMethodOverload; + } +} diff --git a/types/mangopay2-nodejs-sdk/mangopay2-nodejs-sdk-tests.ts b/types/mangopay2-nodejs-sdk/mangopay2-nodejs-sdk-tests.ts new file mode 100644 index 0000000000..ba15315ce7 --- /dev/null +++ b/types/mangopay2-nodejs-sdk/mangopay2-nodejs-sdk-tests.ts @@ -0,0 +1,721 @@ +import Mangopay = require("mangopay2-nodejs-sdk"); + +// $ExpectError +const invalidConfig: Mangopay.Config = {}; + +/* General Types */ + +const validConfig: Mangopay.Config = { + clientId: "your_client_id", + clientApiKey: "your_client_api_key", + baseUrl: "https://api.mangopay.com" +}; + +const api = new Mangopay(validConfig); // IGNORE-TEST $ExpectType MangoPay +const payIn: Mangopay.models.PayIn = new api.models.PayIn({}); // IGNORE-TEST $ExpectType PayIn +const address: Mangopay.models.Address = new api.models.Address({}); // IGNORE-TEST $ExpectType Address + +const addressData: Mangopay.address.AddressData = { + AddressLine1: "20 T Street", + AddressLine2: "", + City: "London", + Country: "UK", + PostalCode: "FR43 2WE", + Region: "London" +}; + +/* Users */ + +const legalUser = new api.models.UserLegal({ + Name: "MangoPay", + Email: "info@mangopay.com", + LegalPersonType: "BUSINESS", + LegalRepresentativeFirstName: "Mango", + LegalRepresentativeLastName: "Pay", + LegalRepresentativeEmail: "mango@mangopay.com", + HeadquartersAddress: new api.models.Address({ + AddressLine1: "4101 Reservoir Rd NW", + AddressLine2: "", + City: "Washington", + Region: "District of Columbia", + PostalCode: "20007", + Country: "US" + }), + LegalRepresentativeBirthday: 1300186358, + LegalRepresentativeNationality: "FR", + LegalRepresentativeCountryOfResidence: "FR", + Tag: "custom tag" +}); + +api.Users.create(legalUser).then(data => { + const d = data; // IGNORE-TEST $ExpectType UserLegalData + const value = data.PersonType; // IGNORE-TEST $ExpectType "LEGAL" + + console.log(`${legalUser.Name} user created at ${legalUser.CreationDate}`); +}); + +api.Users.create(legalUser, { readResponseHeaders: true }).then(data => { + const d = data; // IGNORE-TEST $ExpectType WithResponse + const value = data.body; // IGNORE-TEST $ExpectType UserLegalData +}); + +api.Users.create( + { + PersonType: "LEGAL", + Name: "MangoPay", + Email: "info@mangopay.com", + LegalPersonType: "BUSINESS", + LegalRepresentativeFirstName: "Mango", + LegalRepresentativeLastName: "Pay", + LegalRepresentativeEmail: "mango@mangopay.com", + HeadquartersAddress: new api.models.Address({ + AddressLine1: "4101 Reservoir Rd NW", + AddressLine2: "", + City: "Washington", + Region: "District of Columbia", + PostalCode: "20007", + Country: "US" + }), + LegalRepresentativeBirthday: 1300186358, + LegalRepresentativeNationality: "FR", + LegalRepresentativeCountryOfResidence: "FR", + Tag: "custom tag" + }, + { headers: {} } +).then(data => { + const d = data; // IGNORE-TEST $ExpectType UserLegalData +}); + +const naturalUser = new api.models.UserNatural({ + Email: "info@mangopay.com", + Birthday: 1300186358, + FirstName: "Sara", + LastName: "McNick", + CountryOfResidence: "GB", + Nationality: "US" +}); + +api.Users.create(naturalUser, {}).then(data => { + const d = data; // IGNORE-TEST $ExpectType UserNaturalData + const value = data.PersonType; // IGNORE-TEST $ExpectType "NATURAL" + return; +}); + +api.Users.create( + { + PersonType: "NATURAL", + Email: "info@mangopay.com", + Birthday: 1300186358, + FirstName: "Sara", + LastName: "McNick", + CountryOfResidence: "GB", + Nationality: "US" + }, + data => { + const d = data; // IGNORE-TEST $ExpectType UserNaturalData + console.log("create", data); + } +); + +api.Users.get("1234").then(data => { + const d = data; // IGNORE-TEST $ExpectType UserLegalData | UserNaturalData + if (data.PersonType === "LEGAL") { + const legalData = data; // IGNORE-TEST $ExpectType UserLegalData + } else { + const naturalData = data; // IGNORE-TEST $ExpectType UserNaturalData + } +}); + +api.Users.getAll().then(users => { + users.forEach(user => { + const d = user; // IGNORE-TEST $ExpectType UserLegalData | UserNaturalData + if (user.PersonType === "LEGAL") { + const legalData = user; // IGNORE-TEST $ExpectType UserLegalData + } else { + const naturalData = user; // IGNORE-TEST $ExpectType UserNaturalData + } + }); +}); + +api.Users.update({ + Id: "1234", + PersonType: "NATURAL", + Email: "info@mangopay.com", + Birthday: 1300186358, + FirstName: "Sara", + LastName: "McNick", + CountryOfResidence: "GB", + Nationality: "US" +}).then(data => { + const d = data; // IGNORE-TEST $ExpectType UserNaturalData +}); + +api.Users.createBankAccount("user-id", { + Type: "GB", + AccountNumber: "12345678", + SortCode: "123456", + OwnerAddress: "", + OwnerName: "" +}).then(data => { + const d = data; // IGNORE-TEST $ExpectType GBData +}); + +api.Users.getBankAccount("user-id", "bankAccount-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType Data +}); + +api.Users.getBankAccounts("user-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType Data[] +}); + +api.Users.deactivateBankAccount("user-id", "bankAccount-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType void +}); + +api.Users.getTransactions("user-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType TransactionData[] +}); + +api.Users.getWallets("user-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType WalletData[] +}); + +api.Users.getCards("user-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType CardData[] +}); + +api.Users.createKycDocument("user-id", { Type: "ADDRESS_PROOF" }).then(data => { + const d = data; // IGNORE-TEST $ExpectType KycDocumentData +}); + +api.Users.getKycDocuments("user-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType KycDocumentData[] +}); + +api.Users.getKycDocument("user-id", "kycDocument-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType KycDocumentData +}); + +api.Users.updateKycDocument("user-id", { Status: "VALIDATION_ASKED" }).then( + data => { + const d = data; // IGNORE-TEST $ExpectType KycDocumentData + } +); + +api.Users.createKycPage("user-id", "kycDocument-id", { + File: "...base64data..." +}).then(data => { + const d = data; // IGNORE-TEST $ExpectType KycDocumentData +}); + +api.Users.createKycPageFromFile( + "user-id", + "kyc-document-id", + "path/to/file" +).then(data => { + const d = data; // IGNORE-TEST $ExpectType KycDocumentData +}); + +// MangoPay. + +api.Users.getEMoney("user-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType EMoneyData +}); + +api.Users.createUboDeclaration("user-id", { DeclaredUBOs: ["user1"] }).then( + data => { + const d = data; // IGNORE-TEST $ExpectType UboDeclarationData + } +); + +api.Users.getPreAuthorizations("user-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType CardPreAuthorizationData[] +}); + +/* KycDocuments */ + +api.KycDocuments.getAll().then(data => { + const d = data; // IGNORE-TEST $ExpectType KycDocumentData[] +}); + +api.KycDocuments.get("kyc-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType KycDocumentData +}); + +api.KycDocuments.createKycDocumentConsult("kyc-id").then(data => { + const d = data; // TODO unsure of expected type +}); + +/* UboDeclarations */ + +api.UboDeclarations.get("ubo-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType UboDeclarationData +}); + +api.UboDeclarations.update({ + Id: "ubo-id", + DeclaredUBOs: ["user1", "user2"] +}).then(data => { + const d = data; // IGNORE-TEST $ExpectType UboDeclarationData +}); + +/* BankAccounts */ + +api.BankAccounts.getTransactions("account-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType TransactionData[] +}); + +/* Wallets */ + +api.Wallets.create({ + Currency: "GBP", + Description: "A description", + Owners: ["user-id"] +}).then(data => { + const d = data; // IGNORE-TEST $ExpectType WalletData +}); + +const wallet = new api.models.Wallet({ + Currency: "GB", + Description: "A description", + Owners: ["user-id"] +}); + +api.Wallets.create(wallet).then(data => { + const d = data; // IGNORE-TEST $ExpectType WalletData +}); + +api.Wallets.update({ + Description: "A description" +}).then(data => { + const d = data; // IGNORE-TEST $ExpectType WalletData +}); + +api.Wallets.get("wallet-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType WalletData +}); + +api.Wallets.getTransactions("wallet-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType TransactionData[] +}); + +/* Cards */ + +api.Cards.get("card-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType CardData +}); + +api.Cards.getByFingerprint("fingerprinthash").then(data => { + const d = data; // IGNORE-TEST $ExpectType CardData[] +}); + +api.Cards.update({ Active: false, Id: "card-id" }).then(data => { + const d = data; // IGNORE-TEST $ExpectType CardData +}); + +api.Cards.getTransactions("card-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType TransactionData[] +}); + +/* CardRegistrations */ + +api.CardRegistrations.create({ + CardType: "BCMC", + Currency: "GBP", + UserId: "user-id" +}).then(data => { + const d = data; // IGNORE-TEST $ExpectType CardRegistrationData +}); + +api.CardRegistrations.get("reg-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType CardRegistrationData +}); + +api.CardRegistrations.update({ RegistrationData: "hmmm" }).then(data => { + const d = data; // IGNORE-TEST $ExpectType CardRegistrationData +}); + +/* CardPreAuthorizations */ + +api.CardPreAuthorizations.create({ + AuthorId: "user", + CardId: "card-id", + DebitedFunds: { Currency: "AUD", Amount: 4000 }, + SecureModeReturnURL: "https://secureurl.com" +}).then(data => { + const d = data; // IGNORE-TEST $ExpectType CardPreAuthorizationData +}); + +api.CardPreAuthorizations.get("auth-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType CardPreAuthorizationData +}); + +api.CardPreAuthorizations.update({ + Id: "auth-id", + PaymentStatus: "CANCELED" +}).then(data => { + const d = data; // IGNORE-TEST $ExpectType CardPreAuthorizationData +}); + +/* Refunds */ + +api.Refunds.get("refund-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType RefundData +}); + +/* PayIns */ + +api.PayIns.create({ + PaymentType: "CARD", + ExecutionType: "DIRECT", + AuthorId: "user-id", + CardId: "card-id", + CreditedWalletId: "wallet-id", + Fees: { Amount: 100, Currency: "GBP" }, + DebitedFunds: { Amount: 2000, Currency: "GBP" }, + SecureModeReturnURL: "https://secure-return.co" +}).then(data => { + const d = data; // IGNORE-TEST $ExpectType CardDirectPayInData +}); + +api.PayIns.create({ + PaymentType: "CARD", + ExecutionType: "WEB", + AuthorId: "user-id", + CreditedWalletId: "wallet-id", + Fees: { Amount: 100, Currency: "GBP" }, + DebitedFunds: { Amount: 2000, Currency: "GBP" }, + ReturnURL: "https://secure-return.co", + Culture: "AD", + CardType: "MAESTRO" +}).then(data => { + const d = data; // IGNORE-TEST $ExpectType CardWebPayInData +}); + +api.PayIns.create({ + PaymentType: "BANK_WIRE", + ExecutionType: "DIRECT", + AuthorId: "user-id", + CreditedWalletId: "wallet-id", + CreditedUserId: "credited-user-id", + DeclaredDebitedFunds: { Amount: 10000, Currency: "GBP" }, + DeclaredFees: { Amount: 500, Currency: "GBP" } +}).then(data => { + const d = data; // IGNORE-TEST $ExpectType BankWireDirectPayInData +}); + +api.PayIns.get("payin-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType PayInData +}); + +api.PayIns.createRefund("payin-id", { AuthorId: "user-id" }).then(data => { + const d = data; // IGNORE-TEST $ExpectType RefundData +}); + +api.PayIns.getRefunds("payin-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType RefundData[] +}); + +/* Clients */ +api.Clients.get().then(data => { + const d = data; // IGNORE-TEST $ExpectType ClientData +}); + +api.Clients.update({ PlatformType: "CROWDFUNDING_DONATION" }).then(data => { + const d = data; // IGNORE-TEST $ExpectType ClientData +}); + +api.Clients.uploadLogo("...logobase64...").then(data => { + const d = data; // IGNORE-TEST $ExpectType ClientData +}); + +api.Clients.uploadLogoFromFile("path/to/file").then(data => { + const d = data; // IGNORE-TEST $ExpectType ClientData +}); + +api.Clients.getClientWallets().then(data => { + const d = data; // IGNORE-TEST $ExpectType ClientWalletData[] +}); + +api.Clients.getClientWallet("CREDIT", "GBP").then(data => { + const d = data; // IGNORE-TEST $ExpectType ClientWalletData +}); + +api.Clients.getClientWalletsByFundsType("FEES").then(data => { + const d = data; // IGNORE-TEST $ExpectType ClientWalletData[] +}); + +api.Clients.getClientWalletTransactions("CREDIT", "GBP").then(data => { + const d = data; // IGNORE-TEST $ExpectType TransactionData[] +}); + +/* PayOuts */ + +api.PayOuts.create({ + Fees: { Amount: 0, Currency: "GBP" }, + AuthorId: "user-id", + DebitedFunds: { Amount: 2000, Currency: "GBP" }, + BankAccountId: "bank-id", + DebitedWalletId: "wallet-id" +}).then(data => { + const d = data; // IGNORE-TEST $ExpectType PayOutData +}); + +api.PayOuts.get("payout-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType PayOutData +}); + +api.PayOuts.getRefunds("payout-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType RefundData[] +}); + +/* Transfers */ + +api.Transfers.create({ + Fees: { Amount: 0, Currency: "GBP" }, + AuthorId: "user-id", + DebitedFunds: { Amount: 2000, Currency: "GBP" }, + DebitedWalletId: "debit-wallet-id", + CreditedWalletId: "credit-wallet-id" +}).then(data => { + const d = data; // IGNORE-TEST $ExpectType TransferData +}); + +api.Transfers.get("transfer-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType TransferData +}); + +api.Transfers.createRefund("transfer-id", { AuthorId: "user-id" }).then( + data => { + const d = data; // IGNORE-TEST $ExpectType RefundData + } +); + +api.Transfers.getRefunds("transfer-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType RefundData[] +}); + +/* BankingAliases */ + +api.BankingAliases.create({ + Country: "GB", + CreditedUserId: "user-id", + OwnerName: "owner-id" +}).then(data => { + const d = data; // IGNORE-TEST $ExpectType IBANBankingAliasData +}); +api.BankingAliases.get("alias-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType IBANBankingAliasData +}); +api.BankingAliases.getAll().then(data => { + const d = data; // IGNORE-TEST $ExpectType IBANBankingAliasData[] +}); +api.BankingAliases.update({ OwnerName: "some-name" }).then(data => { + const d = data; // IGNORE-TEST $ExpectType IBANBankingAliasData +}); +api.BankingAliases.deactivate("alias-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType IBANBankingAliasData +}); +api.BankingAliases.activate("alias-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType IBANBankingAliasData +}); + +/* DisputeDocuments */ + +api.DisputeDocuments.getAll().then(data => { + const d = data; // IGNORE-TEST $ExpectType DisputeDocumentData[] +}); + +api.DisputeDocuments.get("dispute-doc-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType DisputeDocumentData +}); + +api.DisputeDocuments.createDisputeDocumentConsult("dispute-doc-id").then( + data => { + const d = data; // TODO unsure of expected type + } +); + +/* Repudiations */ + +api.Repudiations.getRefunds("repudiation-id").then(data => { + const d = data; // $Expect RefundData[] +}); + +/* Disputes */ + +api.Disputes.get("dispute-id").then(data => { + const d = data; // $Expect DisputeData +}); + +api.Disputes.getAll().then(data => { + const d = data; // $Expect DisputeData[] +}); + +api.Disputes.update({ Tag: "any tags" }).then(data => { + const d = data; // $Expect DisputeData +}); + +api.Disputes.contestDispute("dispute-id", { + Amount: 1000, + Currency: "GBP" +}).then(data => { + const d = data; // $Expect DisputeData +}); + +api.Disputes.resubmitDispute("dispute-id").then(data => { + const d = data; // $Expect DisputeData +}); + +api.Disputes.closeDispute("dispute-id").then(data => { + const d = data; // $Expect DisputeData +}); + +api.Disputes.getTransactions("dispute-id").then(data => { + const d = data; // $Expect TransactionData[] +}); + +api.Disputes.getDisputesForWallet("wallet-id").then(data => { + const d = data; // $Expect DisputeData[] +}); + +api.Disputes.getDisputesForUser("user-id").then(data => { + const d = data; // $Expect DisputeData[] +}); + +api.Disputes.getRepudiation("repudiation-id").then(data => { + const d = data; // $Expect RepudationData +}); + +api.Disputes.createSettlementTransfer( + { + AuthorId: "user-id", + DebitedFunds: { Amount: 1000, Currency: "GBP" }, + Fees: { Amount: 200, Currency: "GBP" } + }, + "repudiation-id" +).then(data => { + const d = data; // $Expect DisputeData +}); + +api.Disputes.getSettlementTransfer("settlement-id").then(data => { + const d = data; // $Expect DisputeData +}); + +api.Disputes.getDocumentsForDispute("dispute-id").then(data => { + const d = data; // $Expect DisputeDocumentData[] +}); + +api.Disputes.updateDisputeDocument("dispute-id", { Tag: "update" }).then( + data => { + const d = data; // $Expect DisputeDocumentData + } +); + +api.Disputes.createDisputeDocument("dispute-id", { + Type: "DELIVERY_PROOF" +}).then(data => { + const d = data; // $Expect DisputeData +}); + +api.Disputes.createDisputeDocumentPage("dispute-id", "dispute-doc-id", { + File: "...base64string..." +}).then(data => { + const d = data; // $Expect DisputeData +}); + +api.Disputes.createDisputeDocumentPageFromFile( + "dispute-id", + "dispute-doc-id", + "path/to/file" +).then(data => { + const d = data; // $Expect DisputeData +}); + +api.Disputes.getPendingSettlement().then(data => { + const d = data; // $Expect DisputeData +}); + +/* Events */ + +api.Events.getAll().then(data => { + const d = data; // $Expect EventData[] +}); + +/* Responses */ + +api.Responses.get().then(data => { + const d = data; // IGNORE-TEST $ExpectType any[] +}); + +/* Mandates */ + +api.Mandates.create({ + BankAccountId: "bank-account-id", + ReturnURL: "https://return-url.com", + Culture: "EN" +}).then(data => { + const d = data; // IGNORE-TEST $ExpectType MandateData +}); + +api.Mandates.getAll().then(data => { + const d = data; // IGNORE-TEST $ExpectType MandateData[] +}); + +api.Mandates.get("mandate-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType MandateData +}); + +api.Mandates.cancel("mandate-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType MandateData +}); + +api.Mandates.getMandatesForUser("user-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType MandateData[] +}); + +api.Mandates.getMandatesForBankAccount("user-id", "bank-account-id").then( + data => { + const d = data; // IGNORE-TEST $ExpectType MandateData[] + } +); +api.Mandates.getTransactions("mandate-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType TransactionData[] +}); + +/* Hooks */ + +api.Hooks.create({ + Url: "https://hook-url.com", + EventType: "DISPUTE_ACTION_REQUIRED" +}).then(data => { + const d = data; // IGNORE-TEST $ExpectType HookData +}); + +api.Hooks.get("hook-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType HookData +}); + +api.Hooks.update({ Id: "hook-id", Url: "https://new-hook.com/hooks" }).then( + data => { + const d = data; // IGNORE-TEST $ExpectType HookData + } +); + +api.Hooks.getAll().then(data => { + const d = data; // IGNORE-TEST $ExpectType HookData[] +}); + +/* Reports */ + +api.Reports.create({ Columns: ["Alias", "AuthorId"] }).then(data => { + const d = data; // IGNORE-TEST $ExpectType ReportData +}); + +api.Reports.get("report-id").then(data => { + const d = data; // IGNORE-TEST $ExpectType ReportData +}); + +api.Reports.getAll().then(data => { + const d = data; // IGNORE-TEST $ExpectType ReportData[] +}); diff --git a/types/mangopay2-nodejs-sdk/tsconfig.json b/types/mangopay2-nodejs-sdk/tsconfig.json new file mode 100644 index 0000000000..5ff752d7e4 --- /dev/null +++ b/types/mangopay2-nodejs-sdk/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "noEmit": true, + "lib": ["es6"], + "noUnusedLocals": false, + "noUnusedParameters": false, + "forceConsistentCasingInFileNames": true, + "experimentalDecorators": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "types": [], + "typeRoots": ["../"] + }, + + "files": ["index.d.ts", "types.d.ts", "mangopay2-nodejs-sdk-tests.ts"] +} diff --git a/types/mangopay2-nodejs-sdk/tslint.json b/types/mangopay2-nodejs-sdk/tslint.json new file mode 100644 index 0000000000..c31797feab --- /dev/null +++ b/types/mangopay2-nodejs-sdk/tslint.json @@ -0,0 +1,10 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "no-redundant-jsdoc": false, + "no-misused-new": false, + "no-empty-interface": false, + "interface-name": false, + "no-unnecessary-class": false + } +} diff --git a/types/mangopay2-nodejs-sdk/types.d.ts b/types/mangopay2-nodejs-sdk/types.d.ts new file mode 100644 index 0000000000..1edb7bd4f2 --- /dev/null +++ b/types/mangopay2-nodejs-sdk/types.d.ts @@ -0,0 +1,565 @@ +/** + * Makes specified keys of an interface Optional. + */ +export type MakeKeysOptional = Omit & + Partial>; + +export type PickPartial = Pick, Par>; + +export type PickPartialRequired< + T, + Par extends keyof T, + Req extends keyof T +> = Pick, Par> & Pick, Req>; + +export type DeepPartial = { [P in keyof T]?: DeepPartial }; + +/** + * Makes specified keys of an interface nullable. + */ +export type MakeKeysNullable = Omit & + { [P in T2]: T1[P] | null }; + +/** + * Makes specified keys of an interface Required. + */ +export type MakeKeysRequired = Omit & + Required>; + +export type Omit = Pick>; + +export type OmitType = Omit; + +export type ValueOf = T[keyof T]; + +export type ApiMethod = + | "authentication_oauth" + | "responses_get" + | "events_all" + | "hooks_create" + | "hooks_all" + | "hooks_get" + | "hooks_save" + | "cardregistration_create" + | "cardregistration_get" + | "cardregistration_save" + | "preauthorization_create" + | "preauthorization_get" + | "preauthorization_save" + | "preauthorizations_get_for_user" + | "card_get" + | "cards_get_by_fingerprint" + | "card_save" + | "card_get_preauthorizations" + | "payins_card-web_create" + | "payins_card-direct_create" + | "payins_preauthorized-direct_create" + | "payins_bankwire-direct_create" + | "payins_directdebit-web_create" + | "payins_directdebit-direct_create" + | "payins_paypal-web_create" + | "payins_get" + | "payins_createrefunds" + | "payouts_bankwire_create" + | "payouts_get" + | "refunds_get" + | "refunds_get_for_repudiation" + | "refunds_get_for_transfer" + | "refunds_get_for_payin" + | "refunds_get_for_payout" + | "transfers_create" + | "transfers_get" + | "transfers_createrefunds" + | "users_createnaturals" + | "users_createlegals" + | "users_createbankaccounts_iban" + | "users_createbankaccounts_gb" + | "users_createbankaccounts_us" + | "users_createbankaccounts_ca" + | "users_createbankaccounts_other" + | "users_all" + | "users_allwallets" + | "users_allbankaccount" + | "users_allcards" + | "users_alltransactions" + | "users_allkycdocuments" + | "users_get" + | "users_getnaturals" + | "users_getlegals" + | "users_getbankaccount" + | "users_deactivate_bankaccount" + | "users_savenaturals" + | "users_savelegals" + | "users_getemoney" + | "wallets_create" + | "wallets_alltransactions" + | "wallets_get" + | "wallets_save" + | "kyc_documents_create" + | "kyc_documents_get" + | "kyc_documents_save" + | "kyc_page_create" + | "kyc_documents_all" + | "kyc_documents_get_alt" + | "kyc_documents_create_consult" + | "disputes_get" + | "disputes_save_tag" + | "disputes_save_contest_funds" + | "dispute_save_close" + | "disputes_get_transactions" + | "disputes_all" + | "disputes_get_for_wallet" + | "disputes_get_for_user" + | "disputes_document_create" + | "disputes_document_page_create" + | "disputes_document_save" + | "disputes_document_get" + | "disputes_document_get_for_dispute" + | "disputes_document_all" + | "disputes_document_create_consult" + | "disputes_repudiation_get" + | "disputes_repudiation_create_settlement" + | "disputes_repudiation_get_settlement" + | "disputes_pending_settlement" + | "reports_transaction_create" + | "reports_wallet_create" + | "reports_get" + | "reports_all" + | "mandates_directdebit-web_create" + | "mandates_get" + | "mandates_cancel" + | "mandates_all" + | "mandates_get_for_user" + | "mandates_get_for_bank_account" + | "clients_get" + | "clients_update" + | "clients_upload_logo" + | "client_wallets_all" + | "client_wallets_get" + | "client_wallets_by_fundsType" + | "client_wallets_transactions" + | "banking_aliases_iban_create" + | "banking_aliases_get" + | "banking_aliases_update" + | "banking_aliases_all" + | "ubo_declaration_create" + | "ubo_declaration_update" + | "ubo_declaration_get" + | "transactions_get_for_mandate" + | "transactions_get_for_card" + | "transactions_get_for_bank_account"; + +export type CountryISO = + | "AD" + | "AE" + | "AF" + | "AG" + | "AI" + | "AL" + | "AM" + | "AO" + | "AQ" + | "AR" + | "AS" + | "AT" + | "AU" + | "AW" + | "AX" + | "AZ" + | "BA" + | "BB" + | "BD" + | "BE" + | "BF" + | "BG" + | "BH" + | "BI" + | "BJ" + | "BL" + | "BM" + | "BN" + | "BO" + | "BQ" + | "BR" + | "BS" + | "BT" + | "BV" + | "BW" + | "BY" + | "BZ" + | "CA" + | "CC" + | "CD" + | "CF" + | "CG" + | "CH" + | "CI" + | "CK" + | "CL" + | "CM" + | "CN" + | "CO" + | "CR" + | "CU" + | "CV" + | "CW" + | "CX" + | "CY" + | "CZ" + | "DE" + | "DJ" + | "DK" + | "DM" + | "DO" + | "DZ" + | "EC" + | "EE" + | "EG" + | "EH" + | "ER" + | "ES" + | "ET" + | "FI" + | "FJ" + | "FK" + | "FM" + | "FO" + | "FR" + | "GA" + | "GB" + | "GD" + | "GE" + | "GF" + | "GG" + | "GH" + | "GI" + | "GL" + | "GM" + | "GN" + | "GP" + | "GQ" + | "GR" + | "GS" + | "GT" + | "GU" + | "GW" + | "GY" + | "HK" + | "HM" + | "HN" + | "HR" + | "HT" + | "HU" + | "ID" + | "IE" + | "IL" + | "IM" + | "IN" + | "IO" + | "IQ" + | "IR" + | "IS" + | "IT" + | "JE" + | "JM" + | "JO" + | "JP" + | "KE" + | "KG" + | "KH" + | "KI" + | "KM" + | "KN" + | "KP" + | "KR" + | "KW" + | "KY" + | "KZ" + | "LA" + | "LB" + | "LC" + | "LI" + | "LK" + | "LR" + | "LS" + | "LT" + | "LU" + | "LV" + | "LY" + | "MA" + | "MC" + | "MD" + | "ME" + | "MF" + | "MG" + | "MH" + | "MK" + | "ML" + | "MM" + | "MN" + | "MO" + | "MP" + | "MQ" + | "MR" + | "MS" + | "MT" + | "MU" + | "MV" + | "MW" + | "MX" + | "MY" + | "MZ" + | "NA" + | "NC" + | "NE" + | "NF" + | "NG" + | "NI" + | "NL" + | "NO" + | "NP" + | "NR" + | "NU" + | "NZ" + | "OM" + | "PA" + | "PE" + | "PF" + | "PG" + | "PH" + | "PK" + | "PL" + | "PM" + | "PN" + | "PR" + | "PS" + | "PT" + | "PW" + | "PY" + | "QA" + | "RE" + | "RO" + | "RS" + | "RU" + | "RW" + | "SA" + | "SB" + | "SC" + | "SD" + | "SE" + | "SG" + | "SH" + | "SI" + | "SJ" + | "SK" + | "SL" + | "SM" + | "SN" + | "SO" + | "SR" + | "SS" + | "ST" + | "SV" + | "SX" + | "SY" + | "SZ" + | "TC" + | "TD" + | "TF" + | "TG" + | "TH" + | "TJ" + | "TK" + | "TL" + | "TM" + | "TN" + | "TO" + | "TR" + | "TT" + | "TV" + | "TW" + | "TZ" + | "UA" + | "UG" + | "UM" + | "US" + | "UY" + | "UZ" + | "VA" + | "VC" + | "VE" + | "VG" + | "VI" + | "VN" + | "VU" + | "WF" + | "WS" + | "YE" + | "YT" + | "ZA" + | "ZM" + | "ZW"; + +export type CurrencyISO = + | "AED" + | "AFN" + | "ALL" + | "AMD" + | "ANG" + | "AOA" + | "ARS" + | "AUD" + | "AWG" + | "AZN" + | "BAM" + | "BBD" + | "BDT" + | "BGN" + | "BHD" + | "BIF" + | "BMD" + | "BND" + | "BOB" + | "BRL" + | "BSD" + | "BTN" + | "BWP" + | "BYN" + | "BZD" + | "CAD" + | "CDF" + | "CHF" + | "CLP" + | "CNY" + | "COP" + | "CRC" + | "CUC" + | "CUP" + | "CVE" + | "CZK" + | "DJF" + | "DKK" + | "DOP" + | "DZD" + | "EGP" + | "ERN" + | "ETB" + | "EUR" + | "FJD" + | "FKP" + | "GBP" + | "GEL" + | "GGP" + | "GHS" + | "GIP" + | "GMD" + | "GNF" + | "GTQ" + | "GYD" + | "HKD" + | "HNL" + | "HRK" + | "HTG" + | "HUF" + | "IDR" + | "ILS" + | "IMP" + | "INR" + | "IQD" + | "IRR" + | "ISK" + | "JEP" + | "JMD" + | "JOD" + | "JPY" + | "KES" + | "KGS" + | "KHR" + | "KMF" + | "KPW" + | "KRW" + | "KWD" + | "KYD" + | "KZT" + | "LAK" + | "LBP" + | "LKR" + | "LRD" + | "LSL" + | "LYD" + | "MAD" + | "MDL" + | "MGA" + | "MKD" + | "MMK" + | "MNT" + | "MOP" + | "MRU" + | "MUR" + | "MVR" + | "MWK" + | "MXN" + | "MYR" + | "MZN" + | "NAD" + | "NGN" + | "NIO" + | "NOK" + | "NPR" + | "NZD" + | "OMR" + | "PAB" + | "PEN" + | "PGK" + | "PHP" + | "PKR" + | "PLN" + | "PYG" + | "QAR" + | "RON" + | "RSD" + | "RUB" + | "RWF" + | "SAR" + | "SBD" + | "SCR" + | "SDG" + | "SEK" + | "SGD" + | "SHP" + | "SLL" + | "SOS" + | "SPL" + | "SRD" + | "STN" + | "SVC" + | "SYP" + | "SZL" + | "THB" + | "TJS" + | "TMT" + | "TND" + | "TOP" + | "TRY" + | "TTD" + | "TVD" + | "TWD" + | "TZS" + | "UAH" + | "UGX" + | "USD" + | "UYU" + | "UZS" + | "VEF" + | "VND" + | "VUV" + | "WST" + | "XAF" + | "XCD" + | "XDR" + | "XOF" + | "XPF" + | "YER" + | "ZAR" + | "ZMW" + | "ZWD"; From 0d53a4bb7e01195c63d4acd052dfc27419e4cf45 Mon Sep 17 00:00:00 2001 From: Kallu609 Date: Fri, 11 Jan 2019 04:24:10 +0200 Subject: [PATCH 087/160] added types for js-levenshtein --- types/js-levenshtein/index.d.ts | 12 ++++++++++++ types/js-levenshtein/js-levenshtein-tests.ts | 9 +++++++++ types/js-levenshtein/tsconfig.json | 16 ++++++++++++++++ types/js-levenshtein/tslint.json | 1 + 4 files changed, 38 insertions(+) create mode 100644 types/js-levenshtein/index.d.ts create mode 100644 types/js-levenshtein/js-levenshtein-tests.ts create mode 100644 types/js-levenshtein/tsconfig.json create mode 100644 types/js-levenshtein/tslint.json diff --git a/types/js-levenshtein/index.d.ts b/types/js-levenshtein/index.d.ts new file mode 100644 index 0000000000..266b4eacf7 --- /dev/null +++ b/types/js-levenshtein/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for js-levenshtein 1.1.6 +// Project: https://github.com/gustf/js-levenshtein +// Definitions by: Kallu609 +// Pyry Rouvila +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Calculates Levenshtein distance between two strings + */ +declare function levenshtein(compareFrom: string, compareTo: string): number; + +export default levenshtein; diff --git a/types/js-levenshtein/js-levenshtein-tests.ts b/types/js-levenshtein/js-levenshtein-tests.ts new file mode 100644 index 0000000000..1c4c879cfe --- /dev/null +++ b/types/js-levenshtein/js-levenshtein-tests.ts @@ -0,0 +1,9 @@ +// Type definitions for js-levenshtein 1.1.6 +// Project: https://github.com/gustf/js-levenshtein +// Definitions by: Kallu609 +// Pyry Rouvila +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import levenshtein from 'js-levenshtein'; + +levenshtein('kittens', 'mittens'); // $ExpectType number \ No newline at end of file diff --git a/types/js-levenshtein/tsconfig.json b/types/js-levenshtein/tsconfig.json new file mode 100644 index 0000000000..6df128481b --- /dev/null +++ b/types/js-levenshtein/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "js-levenshtein-tests.ts"] +} diff --git a/types/js-levenshtein/tslint.json b/types/js-levenshtein/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/js-levenshtein/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 27885387e26798868452ecd36b6f61fffb98e8f0 Mon Sep 17 00:00:00 2001 From: Kalle Date: Fri, 11 Jan 2019 04:35:03 +0200 Subject: [PATCH 088/160] Update index.d.ts --- types/js-levenshtein/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/js-levenshtein/index.d.ts b/types/js-levenshtein/index.d.ts index 266b4eacf7..f1703617c9 100644 --- a/types/js-levenshtein/index.d.ts +++ b/types/js-levenshtein/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for js-levenshtein 1.1.6 +// Type definitions for js-levenshtein 1.1 // Project: https://github.com/gustf/js-levenshtein // Definitions by: Kallu609 // Pyry Rouvila From 1fdf4396056909d0ce6da17b187833ffa197b3eb Mon Sep 17 00:00:00 2001 From: Kalle Date: Fri, 11 Jan 2019 04:35:12 +0200 Subject: [PATCH 089/160] Update js-levenshtein-tests.ts --- types/js-levenshtein/js-levenshtein-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/js-levenshtein/js-levenshtein-tests.ts b/types/js-levenshtein/js-levenshtein-tests.ts index 1c4c879cfe..034b98d1ac 100644 --- a/types/js-levenshtein/js-levenshtein-tests.ts +++ b/types/js-levenshtein/js-levenshtein-tests.ts @@ -1,4 +1,4 @@ -// Type definitions for js-levenshtein 1.1.6 +// Type definitions for js-levenshtein 1.1 // Project: https://github.com/gustf/js-levenshtein // Definitions by: Kallu609 // Pyry Rouvila @@ -6,4 +6,4 @@ import levenshtein from 'js-levenshtein'; -levenshtein('kittens', 'mittens'); // $ExpectType number \ No newline at end of file +levenshtein('kittens', 'mittens'); // $ExpectType number From b664908732ee6fb91e2c94bba9329dbc70e46fbb Mon Sep 17 00:00:00 2001 From: Kalle Date: Fri, 11 Jan 2019 04:41:00 +0200 Subject: [PATCH 090/160] Update js-levenshtein-tests.ts --- types/js-levenshtein/js-levenshtein-tests.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/types/js-levenshtein/js-levenshtein-tests.ts b/types/js-levenshtein/js-levenshtein-tests.ts index 034b98d1ac..062114c90a 100644 --- a/types/js-levenshtein/js-levenshtein-tests.ts +++ b/types/js-levenshtein/js-levenshtein-tests.ts @@ -1,9 +1,3 @@ -// Type definitions for js-levenshtein 1.1 -// Project: https://github.com/gustf/js-levenshtein -// Definitions by: Kallu609 -// Pyry Rouvila -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - import levenshtein from 'js-levenshtein'; levenshtein('kittens', 'mittens'); // $ExpectType number From 490c72724b8e42748ac1515ac1bd849d9384b775 Mon Sep 17 00:00:00 2001 From: Kalle Date: Fri, 11 Jan 2019 15:31:02 +0200 Subject: [PATCH 091/160] Update js-levenshtein-tests.ts --- types/js-levenshtein/js-levenshtein-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/js-levenshtein/js-levenshtein-tests.ts b/types/js-levenshtein/js-levenshtein-tests.ts index 062114c90a..e8c8a7cd28 100644 --- a/types/js-levenshtein/js-levenshtein-tests.ts +++ b/types/js-levenshtein/js-levenshtein-tests.ts @@ -1,3 +1,3 @@ -import levenshtein from 'js-levenshtein'; +import * as levenshtein from 'js-levenshtein'; levenshtein('kittens', 'mittens'); // $ExpectType number From e6d3b967a65f968bebd89e21d4153c98ac24e033 Mon Sep 17 00:00:00 2001 From: Kallu609 Date: Fri, 11 Jan 2019 20:12:11 +0200 Subject: [PATCH 092/160] Oops accident Revert "Update js-levenshtein-tests.ts" This reverts commit 490c72724b8e42748ac1515ac1bd849d9384b775. --- types/js-levenshtein/js-levenshtein-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/js-levenshtein/js-levenshtein-tests.ts b/types/js-levenshtein/js-levenshtein-tests.ts index e8c8a7cd28..062114c90a 100644 --- a/types/js-levenshtein/js-levenshtein-tests.ts +++ b/types/js-levenshtein/js-levenshtein-tests.ts @@ -1,3 +1,3 @@ -import * as levenshtein from 'js-levenshtein'; +import levenshtein from 'js-levenshtein'; levenshtein('kittens', 'mittens'); // $ExpectType number From 3033945943c11e9d432157b28c58448d15b041f4 Mon Sep 17 00:00:00 2001 From: Kallu609 Date: Fri, 11 Jan 2019 21:18:04 +0200 Subject: [PATCH 093/160] changed es6 import/export to commonjs --- types/js-levenshtein/index.d.ts | 2 +- types/js-levenshtein/js-levenshtein-tests.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/types/js-levenshtein/index.d.ts b/types/js-levenshtein/index.d.ts index f1703617c9..5b29d11026 100644 --- a/types/js-levenshtein/index.d.ts +++ b/types/js-levenshtein/index.d.ts @@ -9,4 +9,4 @@ */ declare function levenshtein(compareFrom: string, compareTo: string): number; -export default levenshtein; +export = levenshtein; diff --git a/types/js-levenshtein/js-levenshtein-tests.ts b/types/js-levenshtein/js-levenshtein-tests.ts index 062114c90a..539473ccf4 100644 --- a/types/js-levenshtein/js-levenshtein-tests.ts +++ b/types/js-levenshtein/js-levenshtein-tests.ts @@ -1,3 +1,3 @@ -import levenshtein from 'js-levenshtein'; +import levenshtein = require('js-levenshtein'); levenshtein('kittens', 'mittens'); // $ExpectType number From f0935b92de554212779e0307669d92092a345527 Mon Sep 17 00:00:00 2001 From: Zlatkovsky Date: Fri, 11 Jan 2019 17:10:30 -0800 Subject: [PATCH 094/160] Add dictionary-based overload for `CustomFunctions.associate` --- .../custom-functions-runtime-tests.ts | 5 +++++ types/custom-functions-runtime/index.d.ts | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/types/custom-functions-runtime/custom-functions-runtime-tests.ts b/types/custom-functions-runtime/custom-functions-runtime-tests.ts index 0a3c482505..8f54ee4f5c 100644 --- a/types/custom-functions-runtime/custom-functions-runtime-tests.ts +++ b/types/custom-functions-runtime/custom-functions-runtime-tests.ts @@ -5,6 +5,11 @@ function add10(n: number) { CustomFunctions.associate('ADD10', add10); +CustomFunctions.associate({ + ADD10: add10, + RANDOM: (n: number) => n * Math.random() +}); + async function getStockValues(ticker: string): Promise { const response = await fetch(`myService.com/prices/${ticker}`); return (await response.json())["price"]; diff --git a/types/custom-functions-runtime/index.d.ts b/types/custom-functions-runtime/index.d.ts index f78f6a45c4..174308c131 100644 --- a/types/custom-functions-runtime/index.d.ts +++ b/types/custom-functions-runtime/index.d.ts @@ -16,9 +16,14 @@ Copyright (c) Microsoft Corporation declare namespace CustomFunctions { /** * @beta - * Ties together the function's JavaScript name with the JSON id property + * Associates the JavaScript function to the name given by the "id" property in the metadata JSON file. */ function associate(id: string, functionObject: Function): void; + /** + * @beta + * Associates the JavaScript functions to the names given by the "id" properties in the metadata JSON file. + */ + function associate(mappings: { [key: string]: Function }): void; /** * A handler passed automatically as the last parameter @@ -28,7 +33,6 @@ declare namespace CustomFunctions { * to handle what happens when the function stops streaming. * @beta */ - interface StreamingHandler extends CancelableHandler { /** * Sets the returned result for a streaming custom function. @@ -36,6 +40,7 @@ declare namespace CustomFunctions { */ setResult: (value: T | Error) => void; } + /** * @beta * CancelableHandler interface From bc497f5e368182b85ca9b2d96459cba5da966116 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sat, 12 Jan 2019 19:01:13 +0100 Subject: [PATCH 095/160] [is-elevated] Add types --- types/is-elevated/index.d.ts | 8 ++++++++ types/is-elevated/is-elevated-tests.ts | 3 +++ types/is-elevated/tsconfig.json | 23 +++++++++++++++++++++++ types/is-elevated/tslint.json | 1 + 4 files changed, 35 insertions(+) create mode 100644 types/is-elevated/index.d.ts create mode 100644 types/is-elevated/is-elevated-tests.ts create mode 100644 types/is-elevated/tsconfig.json create mode 100644 types/is-elevated/tslint.json diff --git a/types/is-elevated/index.d.ts b/types/is-elevated/index.d.ts new file mode 100644 index 0000000000..c875437fde --- /dev/null +++ b/types/is-elevated/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for is-elevated 2.0 +// Project: https://github.com/sindresorhus/is-elevated#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = isElevated; + +declare function isElevated(): Promise; diff --git a/types/is-elevated/is-elevated-tests.ts b/types/is-elevated/is-elevated-tests.ts new file mode 100644 index 0000000000..b2ba2f48fe --- /dev/null +++ b/types/is-elevated/is-elevated-tests.ts @@ -0,0 +1,3 @@ +import isElevated = require('is-elevated'); + +isElevated(); // $ExpectType Promise diff --git a/types/is-elevated/tsconfig.json b/types/is-elevated/tsconfig.json new file mode 100644 index 0000000000..ad48a57318 --- /dev/null +++ b/types/is-elevated/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "is-elevated-tests.ts" + ] +} diff --git a/types/is-elevated/tslint.json b/types/is-elevated/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/is-elevated/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From b4974440b89e1efd99a9877d116661674de170f4 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sat, 12 Jan 2019 19:12:44 +0100 Subject: [PATCH 096/160] [array-move] Add types --- types/array-move/array-move-tests.ts | 8 ++++++++ types/array-move/index.d.ts | 27 +++++++++++++++++++++++++++ types/array-move/tsconfig.json | 23 +++++++++++++++++++++++ types/array-move/tslint.json | 1 + 4 files changed, 59 insertions(+) create mode 100644 types/array-move/array-move-tests.ts create mode 100644 types/array-move/index.d.ts create mode 100644 types/array-move/tsconfig.json create mode 100644 types/array-move/tslint.json diff --git a/types/array-move/array-move-tests.ts b/types/array-move/array-move-tests.ts new file mode 100644 index 0000000000..0bf720b751 --- /dev/null +++ b/types/array-move/array-move-tests.ts @@ -0,0 +1,8 @@ +import arrayMove = require('array-move'); + +const input = ['a', 'b', 'c']; +const input2 = [1, 2, 3]; + +arrayMove(input, 1, 2); // $ExpectType string[] +arrayMove(input2, 1, 2); // $ExpectType number[] +arrayMove.mut(input, 1, 2); // $ExpectType void diff --git a/types/array-move/index.d.ts b/types/array-move/index.d.ts new file mode 100644 index 0000000000..9b9aae938a --- /dev/null +++ b/types/array-move/index.d.ts @@ -0,0 +1,27 @@ +// Type definitions for array-move 1.0 +// Project: https://github.com/sindresorhus/array-move +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = arrayMove; + +/** + * Move an array item to a different position. + * + * @param from Index of item to move. If negative, it will begin that many elements from the end. + * @param to Index of where to move the item. If negative, it will begin that many elements from the end. + * @returns A new array with the item moved to the new position. + */ +declare function arrayMove(input: T, from: number, to: number): T; + +declare namespace arrayMove { + /** + * Moves the item to the new position in the input array. + * + * Useful for huge arrays where absolute performance is needed. + * + * @param from Index of item to move. If negative, it will begin that many elements from the end. + * @param to Index of where to move the item. If negative, it will begin that many elements from the end. + */ + function mut(input: any[], from: number, to: number): void; +} diff --git a/types/array-move/tsconfig.json b/types/array-move/tsconfig.json new file mode 100644 index 0000000000..6b4a5d5bb0 --- /dev/null +++ b/types/array-move/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "array-move-tests.ts" + ] +} diff --git a/types/array-move/tslint.json b/types/array-move/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/array-move/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 61bc8d44c443d09cd33c632855710fde64504ced Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sat, 12 Jan 2019 19:42:12 +0100 Subject: [PATCH 097/160] [@sindresorhus/string-hash] Add types --- types/sindresorhus__string-hash/index.d.ts | 8 ++++++ .../sindresorhus__string-hash-tests.ts | 3 ++ types/sindresorhus__string-hash/tsconfig.json | 28 +++++++++++++++++++ types/sindresorhus__string-hash/tslint.json | 1 + 4 files changed, 40 insertions(+) create mode 100644 types/sindresorhus__string-hash/index.d.ts create mode 100644 types/sindresorhus__string-hash/sindresorhus__string-hash-tests.ts create mode 100644 types/sindresorhus__string-hash/tsconfig.json create mode 100644 types/sindresorhus__string-hash/tslint.json diff --git a/types/sindresorhus__string-hash/index.d.ts b/types/sindresorhus__string-hash/index.d.ts new file mode 100644 index 0000000000..84b0de28a5 --- /dev/null +++ b/types/sindresorhus__string-hash/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for @sindresorhus/string-hash 1.0 +// Project: https://github.com/sindresorhus/string-hash +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = stringHash; + +declare function stringHash(input: string): number; diff --git a/types/sindresorhus__string-hash/sindresorhus__string-hash-tests.ts b/types/sindresorhus__string-hash/sindresorhus__string-hash-tests.ts new file mode 100644 index 0000000000..4a685a476d --- /dev/null +++ b/types/sindresorhus__string-hash/sindresorhus__string-hash-tests.ts @@ -0,0 +1,3 @@ +import stringHash = require('@sindresorhus/string-hash'); + +stringHash('🦄🌈'); // $ExpectType number diff --git a/types/sindresorhus__string-hash/tsconfig.json b/types/sindresorhus__string-hash/tsconfig.json new file mode 100644 index 0000000000..c0464c0e42 --- /dev/null +++ b/types/sindresorhus__string-hash/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "paths": { + "@sindresorhus/string-hash": [ + "sindresorhus__string-hash" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "sindresorhus__string-hash-tests.ts" + ] +} diff --git a/types/sindresorhus__string-hash/tslint.json b/types/sindresorhus__string-hash/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/sindresorhus__string-hash/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 08500a19782f5485bca3b837d8933cbbe0133e5e Mon Sep 17 00:00:00 2001 From: Cameron Bothner Date: Sat, 12 Jan 2019 14:01:07 -0500 Subject: [PATCH 098/160] Add activestorage --- types/activestorage/activestorage-tests.ts | 28 ++++++++++++++++++ types/activestorage/index.d.ts | 33 ++++++++++++++++++++++ types/activestorage/tsconfig.json | 16 +++++++++++ types/activestorage/tslint.json | 1 + 4 files changed, 78 insertions(+) create mode 100644 types/activestorage/activestorage-tests.ts create mode 100644 types/activestorage/index.d.ts create mode 100644 types/activestorage/tsconfig.json create mode 100644 types/activestorage/tslint.json diff --git a/types/activestorage/activestorage-tests.ts b/types/activestorage/activestorage-tests.ts new file mode 100644 index 0000000000..ac9622e2d8 --- /dev/null +++ b/types/activestorage/activestorage-tests.ts @@ -0,0 +1,28 @@ +import * as ActiveStorage from 'activestorage'; + +ActiveStorage.start(); + +const delegate: ActiveStorage.DirectUploadDelegate = { + directUploadWillCreateBlobWithXHR(xhr) { + console.log(xhr.status); + }, + + directUploadWillStoreFileWithXHR(xhr) { + console.log(xhr.status); + }, +}; + +const d = new ActiveStorage.DirectUpload( + new File([], 'blank.txt'), + '/rails/active_storage/direct_uploads', + delegate +); + +d.create((error, blob) => { + if (error) { + console.log(error.message); + } else { + const { byte_size, checksum, content_type, filename, signed_id } = blob; + console.log({ byte_size, checksum, content_type, filename, signed_id }); + } +}); diff --git a/types/activestorage/index.d.ts b/types/activestorage/index.d.ts new file mode 100644 index 0000000000..2d749c84ec --- /dev/null +++ b/types/activestorage/index.d.ts @@ -0,0 +1,33 @@ +// Type definitions for ActiveStorage 5.2 +// Project: https://github.com/rails/rails/tree/master/activestorage/app/javascipt +// Definitions by: Cameron Bothner +// Definitions: https://github.com/cbothner/DefinitelyTyped +// TypeScript Version: 2.1 + +export as namespace ActiveStorage + +export function start(): void; + +export class DirectUpload { + id: number; + file: File; + url: string; + + constructor(file: File, url: string, delegate: DirectUploadDelegate) + + create(callback: (error: Error, blob: Blob) => void): void; +} + +export interface DirectUploadDelegate { + directUploadWillCreateBlobWithXHR?: (xhr: XMLHttpRequest) => void; + + directUploadWillStoreFileWithXHR?: (xhr: XMLHttpRequest) => void; +} + +export interface Blob { + byte_size: number; + checksum: string; + content_type: string; + filename: string; + signed_id: string; +} diff --git a/types/activestorage/tsconfig.json b/types/activestorage/tsconfig.json new file mode 100644 index 0000000000..326c2c7401 --- /dev/null +++ b/types/activestorage/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6", "dom"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "activestorage-tests.ts"] +} diff --git a/types/activestorage/tslint.json b/types/activestorage/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/activestorage/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 305c9cd6dc1b36566d7cd4d44a45c14c56c5b993 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 13 Jan 2019 01:13:32 +0100 Subject: [PATCH 099/160] [p-pipe] Add types --- types/p-pipe/index.d.ts | 86 ++++++++++++++++++++++++++++++++++++ types/p-pipe/p-pipe-tests.ts | 57 ++++++++++++++++++++++++ types/p-pipe/tsconfig.json | 23 ++++++++++ types/p-pipe/tslint.json | 1 + 4 files changed, 167 insertions(+) create mode 100644 types/p-pipe/index.d.ts create mode 100644 types/p-pipe/p-pipe-tests.ts create mode 100644 types/p-pipe/tsconfig.json create mode 100644 types/p-pipe/tslint.json diff --git a/types/p-pipe/index.d.ts b/types/p-pipe/index.d.ts new file mode 100644 index 0000000000..2c58bd8f01 --- /dev/null +++ b/types/p-pipe/index.d.ts @@ -0,0 +1,86 @@ +// Type definitions for p-pipe 1.2 +// Project: https://github.com/sindresorhus/p-pipe#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.0 + +export = pPipe; + +// tslint:disable:no-unnecessary-generics +declare function pPipe(...args: Tasks1): PromiseTask; +declare function pPipe(...args: Tasks2): PromiseTask; +declare function pPipe(...args: Tasks3): PromiseTask; +declare function pPipe(...args: Tasks4): PromiseTask; +declare function pPipe( + ...args: Tasks5 +): PromiseTask; +declare function pPipe( + ...args: Tasks6 +): PromiseTask; +declare function pPipe( + ...args: Tasks7 +): PromiseTask; +declare function pPipe( + ...args: Tasks8 +): PromiseTask; +declare function pPipe(...args: Array>): PromiseTask; + +declare function pPipe(tasks: Tasks1): PromiseTask; +declare function pPipe(tasks: Tasks2): PromiseTask; +declare function pPipe(tasks: Tasks3): PromiseTask; +declare function pPipe(tasks: Tasks4): PromiseTask; +declare function pPipe( + tasks: Tasks5 +): PromiseTask; +declare function pPipe( + tasks: Tasks6 +): PromiseTask; +declare function pPipe( + tasks: Tasks7 +): PromiseTask; +declare function pPipe( + tasks: Tasks8 +): PromiseTask; +declare function pPipe(tasks: Array>): PromiseTask; + +type Tasks1 = [PromiseTask]; +type Tasks2 = [Task, Task]; +type Tasks3 = [Task, Task, Task]; +type Tasks4 = [Task, Task, Task, Task]; +type Tasks5 = [ + Task, + Task, + Task, + Task, + Task +]; +type Tasks6 = [ + Task, + Task, + Task, + Task, + Task, + Task +]; +type Tasks7 = [ + Task, + Task, + Task, + Task, + Task, + Task, + Task +]; +type Tasks8 = [ + Task, + Task, + Task, + Task, + Task, + Task, + Task, + Task +]; + +type Task = (input: T) => PromiseLike | R; +type PromiseTask = (input: T) => Promise; diff --git a/types/p-pipe/p-pipe-tests.ts b/types/p-pipe/p-pipe-tests.ts new file mode 100644 index 0000000000..8901637430 --- /dev/null +++ b/types/p-pipe/p-pipe-tests.ts @@ -0,0 +1,57 @@ +import pPipe = require('p-pipe'); + +const addUnicorn = (str: string) => Promise.resolve(`${str} Unicorn`); +const addRainbow = (str: string) => Promise.resolve(`${str} Rainbow`); + +const pipeline = pPipe(addUnicorn, addRainbow); + +pipeline('❤️'); // $ExpectType Promise + +const strToInt = (s: string) => Promise.resolve(1); +const intToBool = (i: number) => Promise.resolve(true); +const boolToObj = (b: boolean) => Promise.resolve({}); +const objToNull = (o: object) => Promise.resolve(null); +const nullToVoid = (n: null) => Promise.resolve(undefined); +const voidToStr = (u: undefined) => Promise.resolve(''); + +pPipe(strToInt); // $ExpectType PromiseTask +pPipe(strToInt, intToBool); // $ExpectType PromiseTask +pPipe(strToInt, intToBool, boolToObj); // $ExpectType PromiseTask +pPipe(strToInt, intToBool, boolToObj, objToNull); // $ExpectType PromiseTask +pPipe(strToInt, intToBool, boolToObj, objToNull, nullToVoid); // $ExpectType PromiseTask +pPipe(strToInt, intToBool, boolToObj, objToNull, nullToVoid, voidToStr); // $ExpectType PromiseTask +pPipe(strToInt, intToBool, boolToObj, objToNull, nullToVoid, voidToStr, strToInt); // $ExpectType PromiseTask +pPipe(strToInt, intToBool, boolToObj, objToNull, nullToVoid, voidToStr, strToInt, intToBool); // $ExpectType PromiseTask +// $ExpectType PromiseTask +pPipe( + strToInt, + intToBool, + boolToObj, + objToNull, + nullToVoid, + voidToStr, + strToInt, + intToBool, + boolToObj +); + +pPipe([strToInt]); // $ExpectType PromiseTask +pPipe([strToInt, intToBool]); // $ExpectType PromiseTask +pPipe([strToInt, intToBool, boolToObj]); // $ExpectType PromiseTask +pPipe([strToInt, intToBool, boolToObj, objToNull]); // $ExpectType PromiseTask +pPipe([strToInt, intToBool, boolToObj, objToNull, nullToVoid]); // $ExpectType PromiseTask +pPipe([strToInt, intToBool, boolToObj, objToNull, nullToVoid, voidToStr]); // $ExpectType PromiseTask +pPipe([strToInt, intToBool, boolToObj, objToNull, nullToVoid, voidToStr, strToInt]); // $ExpectType PromiseTask +pPipe([strToInt, intToBool, boolToObj, objToNull, nullToVoid, voidToStr, strToInt, intToBool]); // $ExpectType PromiseTask +// $ExpectType PromiseTask +pPipe([ + strToInt, + intToBool, + boolToObj, + objToNull, + nullToVoid, + voidToStr, + strToInt, + intToBool, + boolToObj, +]); diff --git a/types/p-pipe/tsconfig.json b/types/p-pipe/tsconfig.json new file mode 100644 index 0000000000..46cabfcfeb --- /dev/null +++ b/types/p-pipe/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "p-pipe-tests.ts" + ] +} diff --git a/types/p-pipe/tslint.json b/types/p-pipe/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/p-pipe/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 16e70dce12495c4804f9b012aeca526af08645bf Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 13 Jan 2019 02:21:23 +0100 Subject: [PATCH 100/160] [debounce-fn] Add types --- types/debounce-fn/debounce-fn-tests.ts | 10 ++++++++ types/debounce-fn/index.d.ts | 34 ++++++++++++++++++++++++++ types/debounce-fn/tsconfig.json | 23 +++++++++++++++++ types/debounce-fn/tslint.json | 1 + 4 files changed, 68 insertions(+) create mode 100644 types/debounce-fn/debounce-fn-tests.ts create mode 100644 types/debounce-fn/index.d.ts create mode 100644 types/debounce-fn/tsconfig.json create mode 100644 types/debounce-fn/tslint.json diff --git a/types/debounce-fn/debounce-fn-tests.ts b/types/debounce-fn/debounce-fn-tests.ts new file mode 100644 index 0000000000..9f9d3881e9 --- /dev/null +++ b/types/debounce-fn/debounce-fn-tests.ts @@ -0,0 +1,10 @@ +import debounceFn = require('debounce-fn'); + +const debounced = debounceFn((s: string) => true); +debounced; // $ExpectType ((s: string) => boolean | undefined) & { cancel(): void; } + +debounceFn((s: string) => true); +debounceFn((s: string) => true, { wait: 100 }); +debounceFn((s: string) => true, { immediate: true }); + +debounced.cancel(); diff --git a/types/debounce-fn/index.d.ts b/types/debounce-fn/index.d.ts new file mode 100644 index 0000000000..01e147a14a --- /dev/null +++ b/types/debounce-fn/index.d.ts @@ -0,0 +1,34 @@ +// Type definitions for debounce-fn 1.0 +// Project: https://github.com/sindresorhus/debounce-fn#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.0 + +export = debounce; + +/** + * Returns a debounced function that delays calling the `input` function until after `wait` milliseconds + * have elapsed since the last time the debounced function was called. + * + * It comes with a `.cancel()` method to cancel any scheduled `input` function calls. + */ +declare function debounce( + input: (...args: TArgs) => TResult, + options?: debounce.Options +): ((...args: TArgs) => TResult | undefined) & { cancel(): void }; + +declare namespace debounce { + interface Options { + /** + * Time to wait until the `input` function is called. + * @default 0 + */ + wait?: number; + /** + * Trigger the function on the leading edge instead of the trailing edge of the `wait` interval. + * For example, can be useful for preventing accidental double-clicks on a "submit" button + * from firing a second time. + */ + immediate?: boolean; + } +} diff --git a/types/debounce-fn/tsconfig.json b/types/debounce-fn/tsconfig.json new file mode 100644 index 0000000000..f2d90018fb --- /dev/null +++ b/types/debounce-fn/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "debounce-fn-tests.ts" + ] +} diff --git a/types/debounce-fn/tslint.json b/types/debounce-fn/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/debounce-fn/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 10fcaadc1f1bcf9b5fb0c82a1495e4cd0ad7d1d4 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 13 Jan 2019 11:01:12 +0100 Subject: [PATCH 101/160] [npm-run-path] Add types --- types/npm-run-path/index.d.ts | 45 ++++++++++++++++++++++++ types/npm-run-path/npm-run-path-tests.ts | 16 +++++++++ types/npm-run-path/tsconfig.json | 23 ++++++++++++ types/npm-run-path/tslint.json | 1 + 4 files changed, 85 insertions(+) create mode 100644 types/npm-run-path/index.d.ts create mode 100644 types/npm-run-path/npm-run-path-tests.ts create mode 100644 types/npm-run-path/tsconfig.json create mode 100644 types/npm-run-path/tslint.json diff --git a/types/npm-run-path/index.d.ts b/types/npm-run-path/index.d.ts new file mode 100644 index 0000000000..6a052e0450 --- /dev/null +++ b/types/npm-run-path/index.d.ts @@ -0,0 +1,45 @@ +// Type definitions for npm-run-path 2.0 +// Project: https://github.com/sindresorhus/npm-run-path#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = npmRunPath; + +/** + * Get your [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) prepended with locally installed binaries. + */ +declare function npmRunPath(options?: npmRunPath.Options): string; + +declare namespace npmRunPath { + function env(options?: EnvOptions): ProcessEnv; + + interface Options { + /** + * Working directory. + */ + cwd?: string; + /** + * PATH to be appended. + * Set it to an empty string to exclude the default [PATH](https://github.com/sindresorhus/path-key). + * @default PATH + */ + path?: string; + } + + interface EnvOptions { + /** + * Working directory. + */ + cwd?: string; + /** + * Accepts an object of environment variables, like `process.env`, and modifies the PATH using the correct + * [PATH key](https://github.com/sindresorhus/path-key). Use this if you're modifying the PATH for use + * in the `child_process` options. + */ + env?: ProcessEnv; + } + + interface ProcessEnv { + [key: string]: string | undefined; + } +} diff --git a/types/npm-run-path/npm-run-path-tests.ts b/types/npm-run-path/npm-run-path-tests.ts new file mode 100644 index 0000000000..4cff236373 --- /dev/null +++ b/types/npm-run-path/npm-run-path-tests.ts @@ -0,0 +1,16 @@ +/// + +import childProcess = require('child_process'); +import npmRunPath = require('npm-run-path'); + +npmRunPath(); // $ExpectType string +npmRunPath({ cwd: '/foo' }); // $ExpectType string +npmRunPath({ path: '/usr/local/bin' }); // $ExpectType string + +npmRunPath.env(); // $ExpectType ProcessEnv +npmRunPath.env({ cwd: '/foo' }); // $ExpectType ProcessEnv +npmRunPath.env({ env: process.env }); // $ExpectType ProcessEnv + +childProcess.execFileSync('foo', { + env: npmRunPath.env(), +}); diff --git a/types/npm-run-path/tsconfig.json b/types/npm-run-path/tsconfig.json new file mode 100644 index 0000000000..d6738a23ca --- /dev/null +++ b/types/npm-run-path/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "npm-run-path-tests.ts" + ] +} diff --git a/types/npm-run-path/tslint.json b/types/npm-run-path/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/npm-run-path/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 0d0d686327b99187c671619d464af84847cb93de Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 13 Jan 2019 11:14:37 +0100 Subject: [PATCH 102/160] [mnemonic-words] Add types --- types/mnemonic-words/index.d.ts | 8 +++++++ types/mnemonic-words/mnemonic-words-tests.ts | 5 ++++ types/mnemonic-words/tsconfig.json | 24 ++++++++++++++++++++ types/mnemonic-words/tslint.json | 1 + types/mnemonic-words/words.json.d.ts | 3 +++ 5 files changed, 41 insertions(+) create mode 100644 types/mnemonic-words/index.d.ts create mode 100644 types/mnemonic-words/mnemonic-words-tests.ts create mode 100644 types/mnemonic-words/tsconfig.json create mode 100644 types/mnemonic-words/tslint.json create mode 100644 types/mnemonic-words/words.json.d.ts diff --git a/types/mnemonic-words/index.d.ts b/types/mnemonic-words/index.d.ts new file mode 100644 index 0000000000..4ce91c08d6 --- /dev/null +++ b/types/mnemonic-words/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for mnemonic-words 1.0 +// Project: https://github.com/sindresorhus/mnemonic-words#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = mnemonicWords; + +declare const mnemonicWords: string[]; diff --git a/types/mnemonic-words/mnemonic-words-tests.ts b/types/mnemonic-words/mnemonic-words-tests.ts new file mode 100644 index 0000000000..a3c5569c8c --- /dev/null +++ b/types/mnemonic-words/mnemonic-words-tests.ts @@ -0,0 +1,5 @@ +import mnemonicWords = require('mnemonic-words'); +import mnemonicWordsJson = require('mnemonic-words/words.json'); + +mnemonicWords; // $ExpectType string[] +mnemonicWordsJson; // $ExpectType string[] diff --git a/types/mnemonic-words/tsconfig.json b/types/mnemonic-words/tsconfig.json new file mode 100644 index 0000000000..44998ff2f3 --- /dev/null +++ b/types/mnemonic-words/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "words.json.d.ts", + "mnemonic-words-tests.ts" + ] +} diff --git a/types/mnemonic-words/tslint.json b/types/mnemonic-words/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/mnemonic-words/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/mnemonic-words/words.json.d.ts b/types/mnemonic-words/words.json.d.ts new file mode 100644 index 0000000000..2d95294802 --- /dev/null +++ b/types/mnemonic-words/words.json.d.ts @@ -0,0 +1,3 @@ +export = mnemonicWords; + +declare const mnemonicWords: string[]; From fb84d08e8cadbac524364a75dba9dc7235561b2b Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 13 Jan 2019 11:26:45 +0100 Subject: [PATCH 103/160] [hex-rgb] Add types --- types/hex-rgb/hex-rgb-tests.ts | 4 ++++ types/hex-rgb/index.d.ts | 24 ++++++++++++++++++++++++ types/hex-rgb/tsconfig.json | 23 +++++++++++++++++++++++ types/hex-rgb/tslint.json | 1 + 4 files changed, 52 insertions(+) create mode 100644 types/hex-rgb/hex-rgb-tests.ts create mode 100644 types/hex-rgb/index.d.ts create mode 100644 types/hex-rgb/tsconfig.json create mode 100644 types/hex-rgb/tslint.json diff --git a/types/hex-rgb/hex-rgb-tests.ts b/types/hex-rgb/hex-rgb-tests.ts new file mode 100644 index 0000000000..f9bbf5ea71 --- /dev/null +++ b/types/hex-rgb/hex-rgb-tests.ts @@ -0,0 +1,4 @@ +import hexRgb = require('hex-rgb'); + +hexRgb('#cd2222cc'); // $ExpectType RgbaObj +hexRgb('#cd2222cc', { format: 'array' }); // $ExpectType [number, number, number, number] diff --git a/types/hex-rgb/index.d.ts b/types/hex-rgb/index.d.ts new file mode 100644 index 0000000000..ab1de9bf24 --- /dev/null +++ b/types/hex-rgb/index.d.ts @@ -0,0 +1,24 @@ +// Type definitions for hex-rgb 3.0 +// Project: https://github.com/sindresorhus/hex-rgb#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = hexRgb; + +declare function hexRgb(hex: string): hexRgb.RgbaObj; +declare function hexRgb(hex: string, options: hexRgb.Options): hexRgb.RgbaArr; + +declare namespace hexRgb { + interface Options { + format: 'array'; + } + + interface RgbaObj { + red: number; + green: number; + blue: number; + alpha: number; + } + + type RgbaArr = [number, number, number, number]; +} diff --git a/types/hex-rgb/tsconfig.json b/types/hex-rgb/tsconfig.json new file mode 100644 index 0000000000..c20c71b94f --- /dev/null +++ b/types/hex-rgb/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "hex-rgb-tests.ts" + ] +} diff --git a/types/hex-rgb/tslint.json b/types/hex-rgb/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/hex-rgb/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 62c25910f4ffce859739068cf104e9d871470ab4 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 13 Jan 2019 11:37:28 +0100 Subject: [PATCH 104/160] [rgb-hex] Add types --- types/rgb-hex/index.d.ts | 9 +++++++++ types/rgb-hex/rgb-hex-tests.ts | 6 ++++++ types/rgb-hex/tsconfig.json | 23 +++++++++++++++++++++++ types/rgb-hex/tslint.json | 1 + 4 files changed, 39 insertions(+) create mode 100644 types/rgb-hex/index.d.ts create mode 100644 types/rgb-hex/rgb-hex-tests.ts create mode 100644 types/rgb-hex/tsconfig.json create mode 100644 types/rgb-hex/tslint.json diff --git a/types/rgb-hex/index.d.ts b/types/rgb-hex/index.d.ts new file mode 100644 index 0000000000..44a54bad35 --- /dev/null +++ b/types/rgb-hex/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for rgb-hex 2.1 +// Project: https://github.com/sindresorhus/rgb-hex#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = rgbHex; + +declare function rgbHex(rgba: string): string; +declare function rgbHex(red: number, green: number, blue: number, alpha?: string | number): string; diff --git a/types/rgb-hex/rgb-hex-tests.ts b/types/rgb-hex/rgb-hex-tests.ts new file mode 100644 index 0000000000..b2c950dd1b --- /dev/null +++ b/types/rgb-hex/rgb-hex-tests.ts @@ -0,0 +1,6 @@ +import rgbHex = require('rgb-hex'); + +rgbHex('rgb(40, 42, 54)'); // $ExpectType string +rgbHex(65, 131, 196); // $ExpectType string +rgbHex(65, 131, 196, 0.2); // $ExpectType string +rgbHex(40, 42, 54, '75%'); // $ExpectType string diff --git a/types/rgb-hex/tsconfig.json b/types/rgb-hex/tsconfig.json new file mode 100644 index 0000000000..cb4498db23 --- /dev/null +++ b/types/rgb-hex/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "rgb-hex-tests.ts" + ] +} diff --git a/types/rgb-hex/tslint.json b/types/rgb-hex/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/rgb-hex/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 185372c881ad6b46aee417b835bec11238cb5efe Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 13 Jan 2019 11:47:43 +0100 Subject: [PATCH 105/160] [first-run] Add types --- types/first-run/first-run-tests.ts | 6 ++++++ types/first-run/index.d.ts | 26 ++++++++++++++++++++++++++ types/first-run/tsconfig.json | 23 +++++++++++++++++++++++ types/first-run/tslint.json | 1 + 4 files changed, 56 insertions(+) create mode 100644 types/first-run/first-run-tests.ts create mode 100644 types/first-run/index.d.ts create mode 100644 types/first-run/tsconfig.json create mode 100644 types/first-run/tslint.json diff --git a/types/first-run/first-run-tests.ts b/types/first-run/first-run-tests.ts new file mode 100644 index 0000000000..5451c7c88c --- /dev/null +++ b/types/first-run/first-run-tests.ts @@ -0,0 +1,6 @@ +import firstRun = require('first-run'); + +firstRun(); // $ExpectType boolean +firstRun({ name: 'foo' }); // $ExpectType boolean + +firstRun.clear(); diff --git a/types/first-run/index.d.ts b/types/first-run/index.d.ts new file mode 100644 index 0000000000..dc92053d03 --- /dev/null +++ b/types/first-run/index.d.ts @@ -0,0 +1,26 @@ +// Type definitions for first-run 1.2 +// Project: https://github.com/sindresorhus/first-run +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = firstRun; + +/** + * Check if it's the first time the process is run. + */ +declare function firstRun(options?: firstRun.Options): boolean; + +declare namespace firstRun { + /** + * Clear the state. + */ + function clear(): void; + + interface Options { + /** + * The name used to identify it. + * @default name field in your package.json + */ + name: string; + } +} diff --git a/types/first-run/tsconfig.json b/types/first-run/tsconfig.json new file mode 100644 index 0000000000..6a4ce007ab --- /dev/null +++ b/types/first-run/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "first-run-tests.ts" + ] +} diff --git a/types/first-run/tslint.json b/types/first-run/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/first-run/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 79247b8d2744cb081ce508791dbcf61503969868 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 13 Jan 2019 12:37:12 +0100 Subject: [PATCH 106/160] [negative-zero] Add types --- types/negative-zero/index.d.ts | 8 ++++++++ types/negative-zero/negative-zero-tests.ts | 3 +++ types/negative-zero/tsconfig.json | 23 ++++++++++++++++++++++ types/negative-zero/tslint.json | 1 + 4 files changed, 35 insertions(+) create mode 100644 types/negative-zero/index.d.ts create mode 100644 types/negative-zero/negative-zero-tests.ts create mode 100644 types/negative-zero/tsconfig.json create mode 100644 types/negative-zero/tslint.json diff --git a/types/negative-zero/index.d.ts b/types/negative-zero/index.d.ts new file mode 100644 index 0000000000..80887bad0c --- /dev/null +++ b/types/negative-zero/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for negative-zero 2.0 +// Project: https://github.com/sindresorhus/negative-zero#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = negativeZero; + +declare function negativeZero(input: number): boolean; diff --git a/types/negative-zero/negative-zero-tests.ts b/types/negative-zero/negative-zero-tests.ts new file mode 100644 index 0000000000..d1ec33d84b --- /dev/null +++ b/types/negative-zero/negative-zero-tests.ts @@ -0,0 +1,3 @@ +import negativeZero = require('negative-zero'); + +negativeZero(-0); // $ExpectType boolean diff --git a/types/negative-zero/tsconfig.json b/types/negative-zero/tsconfig.json new file mode 100644 index 0000000000..e1bc860e6b --- /dev/null +++ b/types/negative-zero/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "negative-zero-tests.ts" + ] +} diff --git a/types/negative-zero/tslint.json b/types/negative-zero/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/negative-zero/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 0deb774caaa5405a342dc74b67290620e3be4598 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 13 Jan 2019 12:39:12 +0100 Subject: [PATCH 107/160] [positive-zero] Add types --- types/positive-zero/index.d.ts | 8 ++++++++ types/positive-zero/positive-zero-tests.ts | 3 +++ types/positive-zero/tsconfig.json | 23 ++++++++++++++++++++++ types/positive-zero/tslint.json | 1 + 4 files changed, 35 insertions(+) create mode 100644 types/positive-zero/index.d.ts create mode 100644 types/positive-zero/positive-zero-tests.ts create mode 100644 types/positive-zero/tsconfig.json create mode 100644 types/positive-zero/tslint.json diff --git a/types/positive-zero/index.d.ts b/types/positive-zero/index.d.ts new file mode 100644 index 0000000000..7396c68302 --- /dev/null +++ b/types/positive-zero/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for positive-zero 2.0 +// Project: https://github.com/sindresorhus/positive-zero#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = positiveZero; + +declare function positiveZero(input: number): boolean; diff --git a/types/positive-zero/positive-zero-tests.ts b/types/positive-zero/positive-zero-tests.ts new file mode 100644 index 0000000000..03d689a5d3 --- /dev/null +++ b/types/positive-zero/positive-zero-tests.ts @@ -0,0 +1,3 @@ +import positiveZero = require('positive-zero'); + +positiveZero(0); // $ExpectType boolean diff --git a/types/positive-zero/tsconfig.json b/types/positive-zero/tsconfig.json new file mode 100644 index 0000000000..b6f4f58dbc --- /dev/null +++ b/types/positive-zero/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "positive-zero-tests.ts" + ] +} diff --git a/types/positive-zero/tslint.json b/types/positive-zero/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/positive-zero/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From f67577c81817533522542e8274573d151de7aa12 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 13 Jan 2019 12:53:35 +0100 Subject: [PATCH 108/160] [html-tags] Add types --- types/html-tags/html-tags-tests.ts | 9 ++++++++ types/html-tags/html-tags-void.json.d.ts | 3 +++ types/html-tags/html-tags.json.d.ts | 3 +++ types/html-tags/index.d.ts | 8 ++++++++ types/html-tags/tsconfig.json | 26 ++++++++++++++++++++++++ types/html-tags/tslint.json | 1 + types/html-tags/void.d.ts | 3 +++ 7 files changed, 53 insertions(+) create mode 100644 types/html-tags/html-tags-tests.ts create mode 100644 types/html-tags/html-tags-void.json.d.ts create mode 100644 types/html-tags/html-tags.json.d.ts create mode 100644 types/html-tags/index.d.ts create mode 100644 types/html-tags/tsconfig.json create mode 100644 types/html-tags/tslint.json create mode 100644 types/html-tags/void.d.ts diff --git a/types/html-tags/html-tags-tests.ts b/types/html-tags/html-tags-tests.ts new file mode 100644 index 0000000000..802dbb665e --- /dev/null +++ b/types/html-tags/html-tags-tests.ts @@ -0,0 +1,9 @@ +import htmlTags = require('html-tags'); +import voidHtmlTags = require('html-tags/void'); +import htmlTagsJson = require('html-tags/html-tags.json'); +import voidHtmlTagsJson = require('html-tags/html-tags-void.json'); + +htmlTags; // $ExpectType string[] +voidHtmlTags; // $ExpectType string[] +htmlTagsJson; // $ExpectType string[] +voidHtmlTagsJson; // $ExpectType string[] diff --git a/types/html-tags/html-tags-void.json.d.ts b/types/html-tags/html-tags-void.json.d.ts new file mode 100644 index 0000000000..3e194ddf27 --- /dev/null +++ b/types/html-tags/html-tags-void.json.d.ts @@ -0,0 +1,3 @@ +export = voidHtmlTags; + +declare const voidHtmlTags: string[]; diff --git a/types/html-tags/html-tags.json.d.ts b/types/html-tags/html-tags.json.d.ts new file mode 100644 index 0000000000..888779dc9c --- /dev/null +++ b/types/html-tags/html-tags.json.d.ts @@ -0,0 +1,3 @@ +export = htmlTags; + +declare const htmlTags: string[]; diff --git a/types/html-tags/index.d.ts b/types/html-tags/index.d.ts new file mode 100644 index 0000000000..635ce4820f --- /dev/null +++ b/types/html-tags/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for html-tags 2.0 +// Project: https://github.com/sindresorhus/html-tags#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = htmlTags; + +declare const htmlTags: string[]; diff --git a/types/html-tags/tsconfig.json b/types/html-tags/tsconfig.json new file mode 100644 index 0000000000..971c9bb630 --- /dev/null +++ b/types/html-tags/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "void.d.ts", + "html-tags.json.d.ts", + "html-tags-void.json.d.ts", + "html-tags-tests.ts" + ] +} diff --git a/types/html-tags/tslint.json b/types/html-tags/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/html-tags/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/html-tags/void.d.ts b/types/html-tags/void.d.ts new file mode 100644 index 0000000000..3e194ddf27 --- /dev/null +++ b/types/html-tags/void.d.ts @@ -0,0 +1,3 @@ +export = voidHtmlTags; + +declare const voidHtmlTags: string[]; From bfe3af75886d6118b515d911474355ed28a82e91 Mon Sep 17 00:00:00 2001 From: "SIDENIS\\Andrey.Chalkin" Date: Sun, 13 Jan 2019 19:45:01 +0700 Subject: [PATCH 109/160] Improved typing for http-rx --- types/http-rx/http-rx-tests.ts | 9 +++++---- types/http-rx/index.d.ts | 19 ++++++++++++------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/types/http-rx/http-rx-tests.ts b/types/http-rx/http-rx-tests.ts index 082585fdf9..b76ba67832 100644 --- a/types/http-rx/http-rx-tests.ts +++ b/types/http-rx/http-rx-tests.ts @@ -1,13 +1,14 @@ import { Observable } from 'rxjs'; import httpRx = require('http-rx'); +import request = require('request'); -const httpGet: Observable = httpRx.get(''); +const httpGet: Observable<{response: request.Response}> = httpRx.get(''); -const httpHead: Observable = httpRx.head(''); +const httpHead: Observable<{body: any}> = httpRx.head(''); -const httpPatch: Observable = httpRx.patch(''); +const httpPatch: Observable<{response: request.Response, body: any}> = httpRx.patch(''); -const httpPost: Observable = httpRx.post(''); +const httpPost: Observable<{response: request.Response, body: any}> = httpRx.post('', {json: true}); const httpPut: Observable<{}> = httpRx.put(''); diff --git a/types/http-rx/index.d.ts b/types/http-rx/index.d.ts index 3b0c734fb0..c752427b8a 100644 --- a/types/http-rx/index.d.ts +++ b/types/http-rx/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for http-rx 1.1 +// Type definitions for http-rx 2.0 // Project: https://github.com/JasonRammoray/HttpRx // Definitions by: L2jLiga // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -7,18 +7,23 @@ import { Observable } from 'rxjs'; import request = require('request'); +interface ResponseWrapper { + response: request.Response; + body: any; +} + interface HttpRx { - get(url: string, options?: request.CoreOptions): Observable; + get(url: string, options?: request.CoreOptions): Observable; - head(url: string, options?: request.CoreOptions): Observable; + head(url: string, options?: request.CoreOptions): Observable; - patch(url: string, options?: request.CoreOptions): Observable; + patch(url: string, options?: request.CoreOptions): Observable; - post(url: string, options?: request.CoreOptions): Observable; + post(url: string, options?: request.CoreOptions): Observable; - put(url: string, options?: request.CoreOptions): Observable; + put(url: string, options?: request.CoreOptions): Observable; - 'delete'(url: string, options?: request.CoreOptions): Observable; + delete(url: string, options?: request.CoreOptions): Observable; } declare const httpRx: HttpRx; From 151938df4654fec62d57c915f2cc88afa9bdf851 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 13 Jan 2019 13:59:46 +0100 Subject: [PATCH 110/160] [doge-seed] Add types --- types/doge-seed/doge-seed-tests.ts | 4 ++++ types/doge-seed/index.d.ts | 18 ++++++++++++++++++ types/doge-seed/tsconfig.json | 23 +++++++++++++++++++++++ types/doge-seed/tslint.json | 1 + 4 files changed, 46 insertions(+) create mode 100644 types/doge-seed/doge-seed-tests.ts create mode 100644 types/doge-seed/index.d.ts create mode 100644 types/doge-seed/tsconfig.json create mode 100644 types/doge-seed/tslint.json diff --git a/types/doge-seed/doge-seed-tests.ts b/types/doge-seed/doge-seed-tests.ts new file mode 100644 index 0000000000..fa47414d65 --- /dev/null +++ b/types/doge-seed/doge-seed-tests.ts @@ -0,0 +1,4 @@ +import dogeSeed = require('doge-seed'); + +dogeSeed(); // $ExpectType string +dogeSeed(128); // $ExpectType string diff --git a/types/doge-seed/index.d.ts b/types/doge-seed/index.d.ts new file mode 100644 index 0000000000..8670f36332 --- /dev/null +++ b/types/doge-seed/index.d.ts @@ -0,0 +1,18 @@ +// Type definitions for doge-seed 1.0 +// Project: https://github.com/lukechilds/doge-seed#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = dogeSeed; + +/** + * Generates a cryptographically secure mnemonic seed phrase with added dankness. + * The first four words will be a randomly generated Doge-like sentence. + * + * The seed phrases are fully valid checksummed BIP39 seeds. They can be used with any cryptocurrency + * and can be imported into any BIP39 compliant wallet. + * + * @param bits The number of bits to derive a BIP39 mnemonic from. Default: `128`. + * @returns A BIP39 mnemonic seed phrase. + */ +declare function dogeSeed(bits?: 128 | 160 | 192 | 224 | 256): string; diff --git a/types/doge-seed/tsconfig.json b/types/doge-seed/tsconfig.json new file mode 100644 index 0000000000..cd46d1ee9c --- /dev/null +++ b/types/doge-seed/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "doge-seed-tests.ts" + ] +} diff --git a/types/doge-seed/tslint.json b/types/doge-seed/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/doge-seed/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 472884dc7b2820095558988b539d20a500e80c23 Mon Sep 17 00:00:00 2001 From: Andrey Chalkin Date: Sun, 13 Jan 2019 21:21:23 +0700 Subject: [PATCH 111/160] Fixed typos in Russian README --- README.ru.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.ru.md b/README.ru.md index b90bdeac7c..9186c2ddd5 100644 --- a/README.ru.md +++ b/README.ru.md @@ -8,7 +8,7 @@ Также посетите веб-сайт [definitelytyped.org](http://definitelytyped.org), хотя информация в этом README более свежая. -*Вы также можете прочитать этот README на [английском](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md), [испанском](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.es.md) and [корейском](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.ko.md).* +*Вы также можете прочитать этот README на [английском](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md), [испанском](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.es.md) и [корейском](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.ko.md).* ## Что такое файлы декларации (файлы описания/объявления типов)? @@ -101,9 +101,9 @@ DefinitelyTyped работает только благодаря вкладу т // John ``` -* Если есть `tslint.json`, запустите `npm run lint package-name`. В противном случае запустите `tsc` in в директории пакета. +* Если есть `tslint.json`, запустите `npm run lint package-name`. В противном случае запустите `tsc` в директории пакета. -Когда вы создаете PR для редактирования существующего пакета, `dt-bot` должен @-уведомить previous authors. +Когда вы создаете PR для редактирования существующего пакета, `dt-bot` должен @-уведомить предыдущих авторов. Если этого не произойдет, вы можете сделать это самостоятельно в комментарии, связанном с PR. @@ -124,7 +124,7 @@ DefinitelyTyped работает только благодаря вкладу т | tsconfig.json | Позволяет вам запускать `tsc` внутри пакета. | | tslint.json | Включает linting. | -Создайте их, запустив `npx dts-gen --dt --name my-package-name --template module` если у вас ≥ 5.2.0, `npm install -g dts-gen` и `dts-gen --dt --name my-package-name --template module` в противном случае. +Создайте их, запустив `npx dts-gen --dt --name my-package-name --template module` если у вас npm ≥ 5.2.0, `npm install -g dts-gen` и `dts-gen --dt --name my-package-name --template module` в противном случае. Посмотреть все варианты на [dts-gen](https://github.com/Microsoft/dts-gen). Вы можете отредактировать `tsconfig.json` чтобы добавить новые файлы, добавить `"target": "es6"` (необходимо для асинхронных функций), добавить в `"lib"`, или добавить опцию компилятора `"jsx"`. @@ -283,7 +283,7 @@ f("one"); "typeRoots": ["../../"], "paths": { "history": [ "history/v2" ] - }, + } }, "files": [ "index.d.ts", From 0c1242d1e850303090eecae20b52eea28a3504db Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 13 Jan 2019 16:04:29 +0100 Subject: [PATCH 112/160] [when-dom-ready] Add types --- types/when-dom-ready/index.d.ts | 13 +++++++++++ types/when-dom-ready/tsconfig.json | 24 ++++++++++++++++++++ types/when-dom-ready/tslint.json | 1 + types/when-dom-ready/when-dom-ready-tests.ts | 7 ++++++ 4 files changed, 45 insertions(+) create mode 100644 types/when-dom-ready/index.d.ts create mode 100644 types/when-dom-ready/tsconfig.json create mode 100644 types/when-dom-ready/tslint.json create mode 100644 types/when-dom-ready/when-dom-ready-tests.ts diff --git a/types/when-dom-ready/index.d.ts b/types/when-dom-ready/index.d.ts new file mode 100644 index 0000000000..4c7dda748c --- /dev/null +++ b/types/when-dom-ready/index.d.ts @@ -0,0 +1,13 @@ +// Type definitions for when-dom-ready 1.2 +// Project: https://github.com/lukechilds/when-dom-ready +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = whenDomReady; + +declare function whenDomReady(document?: EventTarget): Promise; +declare function whenDomReady(callback?: () => void, document?: EventTarget): Promise; + +declare namespace whenDomReady { + function resume(document?: EventTarget): (value: T) => Promise; +} diff --git a/types/when-dom-ready/tsconfig.json b/types/when-dom-ready/tsconfig.json new file mode 100644 index 0000000000..a00e26ff4a --- /dev/null +++ b/types/when-dom-ready/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "when-dom-ready-tests.ts" + ] +} diff --git a/types/when-dom-ready/tslint.json b/types/when-dom-ready/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/when-dom-ready/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/when-dom-ready/when-dom-ready-tests.ts b/types/when-dom-ready/when-dom-ready-tests.ts new file mode 100644 index 0000000000..0bc9e061a7 --- /dev/null +++ b/types/when-dom-ready/when-dom-ready-tests.ts @@ -0,0 +1,7 @@ +import whenDomReady = require('when-dom-ready'); + +whenDomReady(); // $ExpectType Promise +whenDomReady(document); // $ExpectType Promise +whenDomReady(() => {}, document); // $ExpectType Promise + +Promise.resolve('foo').then(whenDomReady.resume(document)); // $ExpectType Promise From da20a4de1818146eec5cab81a452e6f3303dff7e Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 13 Jan 2019 18:25:15 +0100 Subject: [PATCH 113/160] [js-types] Add types --- types/js-types/index.d.ts | 8 ++++++++ types/js-types/js-types-tests.ts | 5 +++++ types/js-types/js-types.json.d.ts | 3 +++ types/js-types/tsconfig.json | 24 ++++++++++++++++++++++++ types/js-types/tslint.json | 1 + 5 files changed, 41 insertions(+) create mode 100644 types/js-types/index.d.ts create mode 100644 types/js-types/js-types-tests.ts create mode 100644 types/js-types/js-types.json.d.ts create mode 100644 types/js-types/tsconfig.json create mode 100644 types/js-types/tslint.json diff --git a/types/js-types/index.d.ts b/types/js-types/index.d.ts new file mode 100644 index 0000000000..756680fd04 --- /dev/null +++ b/types/js-types/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for js-types 2.0 +// Project: https://github.com/sindresorhus/js-types#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = jsTypes; + +declare const jsTypes: string[]; diff --git a/types/js-types/js-types-tests.ts b/types/js-types/js-types-tests.ts new file mode 100644 index 0000000000..b7e5a4fe8b --- /dev/null +++ b/types/js-types/js-types-tests.ts @@ -0,0 +1,5 @@ +import jsTypes = require('js-types'); +import jsTypesJson = require('js-types/js-types.json'); + +jsTypes; // $ExpectType string[] +jsTypesJson; // $ExpectType string[] diff --git a/types/js-types/js-types.json.d.ts b/types/js-types/js-types.json.d.ts new file mode 100644 index 0000000000..83565f43d1 --- /dev/null +++ b/types/js-types/js-types.json.d.ts @@ -0,0 +1,3 @@ +export = jsTypes; + +declare const jsTypes: string[]; diff --git a/types/js-types/tsconfig.json b/types/js-types/tsconfig.json new file mode 100644 index 0000000000..1b81a82e27 --- /dev/null +++ b/types/js-types/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "js-types.json.d.ts", + "js-types-tests.ts" + ] +} diff --git a/types/js-types/tslint.json b/types/js-types/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/js-types/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From f85acea83a358ad750ffadff0dc75c45c9ae88d0 Mon Sep 17 00:00:00 2001 From: Sandeep Mistry Date: Sun, 13 Jan 2019 15:52:54 -0500 Subject: [PATCH 114/160] Add definition for usb.removeListener(...) --- types/usb/index.d.ts | 1 + types/usb/usb-tests.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/types/usb/index.d.ts b/types/usb/index.d.ts index 2543f0b06e..9bf7b10dc2 100644 --- a/types/usb/index.d.ts +++ b/types/usb/index.d.ts @@ -137,6 +137,7 @@ export class EndpointDescriptor { export function findByIds(vid: number, pid: number): Device; export function on(event: string, callback: (device: Device) => void): void; +export function removeListener(event: string, callback: (device: Device) => void): void; export function getDeviceList(): Device[]; export function setDebugLevel(level: number): void; diff --git a/types/usb/usb-tests.ts b/types/usb/usb-tests.ts index d4b36d16df..fcc658ddcc 100644 --- a/types/usb/usb-tests.ts +++ b/types/usb/usb-tests.ts @@ -124,6 +124,7 @@ iface.endpoints = [inEndpoint, outEndpoint]; const findByDevice: usb.Device = usb.findByIds(1, 1); usb.on("hey", (device: usb.Device) => null); +usb.removeListener("hey", (device: usb.Device) => null); const deviceList: usb.Device[] = usb.getDeviceList(); usb.setDebugLevel(1); From 5c466224e22c309b27e051996cd87d49d781925d Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 13 Jan 2019 23:16:01 +0100 Subject: [PATCH 115/160] [latest-version] Add types --- types/latest-version/index.d.ts | 14 ++++++++++++ types/latest-version/latest-version-tests.ts | 4 ++++ types/latest-version/tsconfig.json | 23 ++++++++++++++++++++ types/latest-version/tslint.json | 1 + 4 files changed, 42 insertions(+) create mode 100644 types/latest-version/index.d.ts create mode 100644 types/latest-version/latest-version-tests.ts create mode 100644 types/latest-version/tsconfig.json create mode 100644 types/latest-version/tslint.json diff --git a/types/latest-version/index.d.ts b/types/latest-version/index.d.ts new file mode 100644 index 0000000000..5127714c15 --- /dev/null +++ b/types/latest-version/index.d.ts @@ -0,0 +1,14 @@ +// Type definitions for latest-version 4.0 +// Project: https://github.com/sindresorhus/latest-version#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = latestVersion; + +declare function latestVersion(name: string, options?: latestVersion.Options): Promise; + +declare namespace latestVersion { + interface Options { + version?: string; + } +} diff --git a/types/latest-version/latest-version-tests.ts b/types/latest-version/latest-version-tests.ts new file mode 100644 index 0000000000..2cbd29b61f --- /dev/null +++ b/types/latest-version/latest-version-tests.ts @@ -0,0 +1,4 @@ +import latestVersion = require('latest-version'); + +latestVersion('ava'); // $ExpectType Promise +latestVersion('npm', { version: 'latest-5' }); // $ExpectType Promise diff --git a/types/latest-version/tsconfig.json b/types/latest-version/tsconfig.json new file mode 100644 index 0000000000..a62d14b69d --- /dev/null +++ b/types/latest-version/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "latest-version-tests.ts" + ] +} diff --git a/types/latest-version/tslint.json b/types/latest-version/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/latest-version/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From ad3e21bcdd705ea6cb01fa26688605447a032a14 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 13 Jan 2019 23:52:31 +0100 Subject: [PATCH 116/160] [pkg-versions] Add types --- types/pkg-versions/index.d.ts | 8 ++++++++ types/pkg-versions/pkg-versions-tests.ts | 3 +++ types/pkg-versions/tsconfig.json | 23 +++++++++++++++++++++++ types/pkg-versions/tslint.json | 1 + 4 files changed, 35 insertions(+) create mode 100644 types/pkg-versions/index.d.ts create mode 100644 types/pkg-versions/pkg-versions-tests.ts create mode 100644 types/pkg-versions/tsconfig.json create mode 100644 types/pkg-versions/tslint.json diff --git a/types/pkg-versions/index.d.ts b/types/pkg-versions/index.d.ts new file mode 100644 index 0000000000..a271a57485 --- /dev/null +++ b/types/pkg-versions/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for pkg-versions 1.1 +// Project: https://github.com/sindresorhus/pkg-versions#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = pkgVersions; + +declare function pkgVersions(name: string): Promise>; diff --git a/types/pkg-versions/pkg-versions-tests.ts b/types/pkg-versions/pkg-versions-tests.ts new file mode 100644 index 0000000000..f0b963b998 --- /dev/null +++ b/types/pkg-versions/pkg-versions-tests.ts @@ -0,0 +1,3 @@ +import pkgVersions = require('pkg-versions'); + +pkgVersions('ava'); // $ExpectType Promise> diff --git a/types/pkg-versions/tsconfig.json b/types/pkg-versions/tsconfig.json new file mode 100644 index 0000000000..cc9bffbcd4 --- /dev/null +++ b/types/pkg-versions/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "pkg-versions-tests.ts" + ] +} diff --git a/types/pkg-versions/tslint.json b/types/pkg-versions/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/pkg-versions/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 7a4aca3998cdb68a6f14836f6817531b09ebcb91 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 14 Jan 2019 00:22:44 +0100 Subject: [PATCH 117/160] [npm-keyword] Add types --- types/npm-keyword/index.d.ts | 44 ++++++++++++++++++++++++++ types/npm-keyword/npm-keyword-tests.ts | 7 ++++ types/npm-keyword/tsconfig.json | 23 ++++++++++++++ types/npm-keyword/tslint.json | 1 + 4 files changed, 75 insertions(+) create mode 100644 types/npm-keyword/index.d.ts create mode 100644 types/npm-keyword/npm-keyword-tests.ts create mode 100644 types/npm-keyword/tsconfig.json create mode 100644 types/npm-keyword/tslint.json diff --git a/types/npm-keyword/index.d.ts b/types/npm-keyword/index.d.ts new file mode 100644 index 0000000000..94c8af9f13 --- /dev/null +++ b/types/npm-keyword/index.d.ts @@ -0,0 +1,44 @@ +// Type definitions for npm-keyword 5.0 +// Project: https://github.com/sindresorhus/npm-keyword#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = npmKeyword; + +/** + * Get a list of npm packages with a certain keyword. + * + * @param keyword One or more keywords. Only matches packages that have *all* the given keywords. Example: `['string', 'camelcase']` + * @returns A promise for a list of packages having the specified keyword in their package.json `keyword` property. + */ +declare function npmKeyword( + keyword: string | string[], + options?: npmKeyword.Options +): Promise; + +declare namespace npmKeyword { + /** + * @param keyword One or more keywords. Only matches packages that have *all* the given keywords. Example: `['string', 'camelcase']` + * @returns A promise for a list of package names. Use this if you don't need the description as it's faster. + */ + function names(keyword: string | string[], options?: Options): Promise; + + /** + * @param keyword One or more keywords. Only matches packages that have *all* the given keywords. Example: `['string', 'camelcase']` + * @returns A promise for the count of packages. + */ + function count(keyword: string | string[]): Promise; + + interface Options { + /** + * Limits the amount of results. + * @default 250 + */ + size?: number; + } + + interface PackageDescriptor { + name: string; + description: string; + } +} diff --git a/types/npm-keyword/npm-keyword-tests.ts b/types/npm-keyword/npm-keyword-tests.ts new file mode 100644 index 0000000000..17418bdb04 --- /dev/null +++ b/types/npm-keyword/npm-keyword-tests.ts @@ -0,0 +1,7 @@ +import npmKeyword = require('npm-keyword'); + +npmKeyword('gulpplugin'); // $ExpectType Promise +npmKeyword('gulpplugin', { size: 10 }); // $ExpectType Promise +npmKeyword.names('gulpplugin'); // $ExpectType Promise +npmKeyword.names('gulpplugin', { size: 10 }); // $ExpectType Promise +npmKeyword.count('gulpplugin'); // $ExpectType Promise diff --git a/types/npm-keyword/tsconfig.json b/types/npm-keyword/tsconfig.json new file mode 100644 index 0000000000..b0c0fed33d --- /dev/null +++ b/types/npm-keyword/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "npm-keyword-tests.ts" + ] +} diff --git a/types/npm-keyword/tslint.json b/types/npm-keyword/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/npm-keyword/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From d6cf537e9f7e84d134609d9f09814b8f079c5303 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 14 Jan 2019 00:37:41 +0100 Subject: [PATCH 118/160] [npm-user] Add types --- types/npm-user/index.d.ts | 18 ++++++++++++++++++ types/npm-user/npm-user-tests.ts | 11 +++++++++++ types/npm-user/tsconfig.json | 23 +++++++++++++++++++++++ types/npm-user/tslint.json | 1 + 4 files changed, 53 insertions(+) create mode 100644 types/npm-user/index.d.ts create mode 100644 types/npm-user/npm-user-tests.ts create mode 100644 types/npm-user/tsconfig.json create mode 100644 types/npm-user/tslint.json diff --git a/types/npm-user/index.d.ts b/types/npm-user/index.d.ts new file mode 100644 index 0000000000..2d03c12c0c --- /dev/null +++ b/types/npm-user/index.d.ts @@ -0,0 +1,18 @@ +// Type definitions for npm-user 3.0 +// Project: https://github.com/sindresorhus/npm-user#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = npmUser; + +declare function npmUser(name: string): Promise; + +declare namespace npmUser { + interface UserData { + name: string | null; + avatar: string | null; + email: string | null; + github: string | null; + twitter: string | null; + } +} diff --git a/types/npm-user/npm-user-tests.ts b/types/npm-user/npm-user-tests.ts new file mode 100644 index 0000000000..1d63de27ef --- /dev/null +++ b/types/npm-user/npm-user-tests.ts @@ -0,0 +1,11 @@ +import npmUser = require('npm-user'); + +npmUser('sindresorhus').then(user => { + user; // $ExpectType UserData + + user.name; // $ExpectType string | null + user.avatar; // $ExpectType string | null + user.email; // $ExpectType string | null + user.github; // $ExpectType string | null + user.twitter; // $ExpectType string | null +}); diff --git a/types/npm-user/tsconfig.json b/types/npm-user/tsconfig.json new file mode 100644 index 0000000000..1e5c1d464f --- /dev/null +++ b/types/npm-user/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "npm-user-tests.ts" + ] +} diff --git a/types/npm-user/tslint.json b/types/npm-user/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/npm-user/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 70bb5e397f4131f732632aa65bdab3567d7b9982 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 14 Jan 2019 00:46:35 +0100 Subject: [PATCH 119/160] [npm-email] Add types --- types/npm-email/index.d.ts | 14 ++++++++++++++ types/npm-email/npm-email-tests.ts | 3 +++ types/npm-email/tsconfig.json | 23 +++++++++++++++++++++++ types/npm-email/tslint.json | 1 + 4 files changed, 41 insertions(+) create mode 100644 types/npm-email/index.d.ts create mode 100644 types/npm-email/npm-email-tests.ts create mode 100644 types/npm-email/tsconfig.json create mode 100644 types/npm-email/tslint.json diff --git a/types/npm-email/index.d.ts b/types/npm-email/index.d.ts new file mode 100644 index 0000000000..055a68f8af --- /dev/null +++ b/types/npm-email/index.d.ts @@ -0,0 +1,14 @@ +// Type definitions for npm-email 3.0 +// Project: https://github.com/sindresorhus/npm-email#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = npmEmail; + +/** + * Get the email of an npm user. + * + * @param username npm username to look up. + * @returns A promise for the user's email address. + */ +declare function npmEmail(username: string): Promise; diff --git a/types/npm-email/npm-email-tests.ts b/types/npm-email/npm-email-tests.ts new file mode 100644 index 0000000000..b0640c73e3 --- /dev/null +++ b/types/npm-email/npm-email-tests.ts @@ -0,0 +1,3 @@ +import npmEmail = require('npm-email'); + +npmEmail('sindresorhus'); // $ExpectType Promise diff --git a/types/npm-email/tsconfig.json b/types/npm-email/tsconfig.json new file mode 100644 index 0000000000..985ed0472a --- /dev/null +++ b/types/npm-email/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "npm-email-tests.ts" + ] +} diff --git a/types/npm-email/tslint.json b/types/npm-email/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/npm-email/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 898ed05acd78afed2950d9b545571b26f5fdf7c4 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 14 Jan 2019 01:04:27 +0100 Subject: [PATCH 120/160] [npm-user-packages] Add types --- types/npm-user-packages/index.d.ts | 43 +++++++++++++++++++ .../npm-user-packages-tests.ts | 3 ++ types/npm-user-packages/tsconfig.json | 23 ++++++++++ types/npm-user-packages/tslint.json | 1 + 4 files changed, 70 insertions(+) create mode 100644 types/npm-user-packages/index.d.ts create mode 100644 types/npm-user-packages/npm-user-packages-tests.ts create mode 100644 types/npm-user-packages/tsconfig.json create mode 100644 types/npm-user-packages/tslint.json diff --git a/types/npm-user-packages/index.d.ts b/types/npm-user-packages/index.d.ts new file mode 100644 index 0000000000..99ed62012f --- /dev/null +++ b/types/npm-user-packages/index.d.ts @@ -0,0 +1,43 @@ +// Type definitions for npm-user-packages 3.0 +// Project: https://github.com/kevva/npm-user-packages#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = npmUserPackages; + +/** + * Get packages by a npm user. + * @param username User to fetch packages from. + */ +declare function npmUserPackages(username: string): Promise; + +declare namespace npmUserPackages { + interface PackageData { + author: { + email?: string; + name: string; + url?: string; + username?: string; + }; + date: string; + description: string; + keywords: string[]; + links: { + bugs?: string; + homepage?: string; + npm: string; + repository?: string; + }; + maintainers: Array<{ + email: string; + username: string; + }>; + name: string; + publisher: { + email: string; + username: string; + }; + scope: string; + version: string; + } +} diff --git a/types/npm-user-packages/npm-user-packages-tests.ts b/types/npm-user-packages/npm-user-packages-tests.ts new file mode 100644 index 0000000000..509e82a16b --- /dev/null +++ b/types/npm-user-packages/npm-user-packages-tests.ts @@ -0,0 +1,3 @@ +import npmUserPackages = require('npm-user-packages'); + +npmUserPackages('kevva'); // $ExpectType Promise diff --git a/types/npm-user-packages/tsconfig.json b/types/npm-user-packages/tsconfig.json new file mode 100644 index 0000000000..5650f12560 --- /dev/null +++ b/types/npm-user-packages/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "npm-user-packages-tests.ts" + ] +} diff --git a/types/npm-user-packages/tslint.json b/types/npm-user-packages/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/npm-user-packages/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From dba4b88578baa4c64621f485f903c8e9559fa456 Mon Sep 17 00:00:00 2001 From: wujingtao <601595686@qq.com> Date: Mon, 14 Jan 2019 18:27:49 +0800 Subject: [PATCH 121/160] Update index.d.ts --- types/pidusage/index.d.ts | 85 +++++++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 35 deletions(-) diff --git a/types/pidusage/index.d.ts b/types/pidusage/index.d.ts index b16dada0ef..79ca2ae88d 100644 --- a/types/pidusage/index.d.ts +++ b/types/pidusage/index.d.ts @@ -5,46 +5,61 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 -declare function pidusage(pid: number | string, callback: (err: Error | null, stats: Stat) => void): void; -declare function pidusage(pids: Array, callback: (err: Error | null, stats: { [key: string]: Stat }) => void): void; -declare function pidusage(pid: number | string): Promise; -declare function pidusage(pids: Array): Promise<{ [key: string]: Stat }>; +interface IStat { + /** + * percentage (from 0 to 100*vcore) + */ + cpu: number; -export default pidusage; + /** + * bytes + */ + memory: number; -export interface Stat { - /** - * percentage (from 0 to 100*vcore) - */ - cpu: number; + /** + * PPID + */ + ppid: number; - /** - * bytes - */ - memory: number; + /** + * PID + */ + pid: number; - /** - * PPID - */ - ppid: number; + /** + * ms user + system time + */ + ctime: number; - /** - * PID - */ - pid: number; + /** + * ms since the start of the process + */ + elapsed: number; - /** - * ms user + system time - */ - ctime: number; + /** + * ms since epoch + */ + timestamp: number; +} - /** - * ms since the start of the process - */ - elapsed: number; +declare function pidusage(pid: number | string, callback: (err: Error | null, stats: IStat) => void): void; +declare function pidusage(pid: number | string, options: { [key: string]: any }, callback: (err: Error | null, stats: IStat) => void): void; +declare function pidusage(pids: Array, callback: (err: Error | null, stats: { [key: string]: IStat }) => void): void; +declare function pidusage(pids: Array, options: { [key: string]: any }, callback: (err: Error | null, stats: { [key: string]: IStat }) => void): void; +declare function pidusage(pid: number | string): Promise; +declare function pidusage(pid: number | string, options: { [key: string]: any }): Promise; +declare function pidusage(pids: Array): Promise<{ [key: string]: IStat }>; +declare function pidusage(pids: Array, options: { [key: string]: any }): Promise<{ [key: string]: IStat }>; - /** - * ms since epoch - */ - timestamp: number; - } +declare namespace pidusage { + export type Status = IStat; + + /** + * If needed this function can be used to clear the event loop. + * Indeed, we're registering an interval to free up the in-memory metrics. + * By calling this, it will clear this interval and all delete all in-memory data + */ + export const clear: () => void; +} + +export = pidusage; From d26f6be7e7e7e71ee0cedee8612be249a0b53cb0 Mon Sep 17 00:00:00 2001 From: wujingtao <601595686@qq.com> Date: Mon, 14 Jan 2019 18:32:26 +0800 Subject: [PATCH 122/160] Update pidusage-tests.ts --- types/pidusage/pidusage-tests.ts | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/types/pidusage/pidusage-tests.ts b/types/pidusage/pidusage-tests.ts index 614569dfa3..8c3d99e194 100644 --- a/types/pidusage/pidusage-tests.ts +++ b/types/pidusage/pidusage-tests.ts @@ -1,4 +1,4 @@ -import pidusage, { Stat } from 'pidusage'; +import * as pidusage from 'pidusage'; let cpu: number; let memory: number; @@ -8,7 +8,7 @@ let ctime: number; let elapsed: number; let timestamp: number; -pidusage(1, (err: Error | null, stats: Stat) => { +pidusage(1, (err: Error | null, stats: pidusage.Status) => { cpu = stats.cpu; memory = stats.memory; ppid = stats.ppid; @@ -18,7 +18,7 @@ pidusage(1, (err: Error | null, stats: Stat) => { timestamp = stats.timestamp; }); -pidusage('two', (err: Error | null, stats: Stat) => { +pidusage('two', {}, (err: Error | null, stats: pidusage.Status) => { cpu = stats.cpu; memory = stats.memory; ppid = stats.ppid; @@ -28,11 +28,18 @@ pidusage('two', (err: Error | null, stats: Stat) => { timestamp = stats.timestamp; }); -pidusage([1, 'two'], (err: Error | null, stats: { [key: string]: Stat }) => { - const one: Stat = stats[1]; - const two: Stat = stats.two; +pidusage([1, 'two'], (err: Error | null, stats: { [key: string]: pidusage.Status }) => { + const one: pidusage.Status = stats[1]; + const two: pidusage.Status = stats.two; }); -const stats_1: Promise = pidusage(1); -const stats_two: Promise = pidusage('two'); -const stats_obj: Promise<{ [key: string]: Stat }> = pidusage([1, 'two']); +pidusage([1, 'two'], {}, (err: Error | null, stats: { [key: string]: pidusage.Status }) => { + const one: pidusage.Status = stats[1]; + const two: pidusage.Status = stats.two; +}); + +const stats_1: Promise = pidusage(1); +const stats_two: Promise = pidusage('two', {}); + +const stats_obj: Promise<{ [key: string]: pidusage.Status }> = pidusage([1, 'two']); +const stats_obj_config: Promise<{ [key: string]: pidusage.Status }> = pidusage([1, 'two'], {}); From b691c656f8c2079981934869b0ad433ba03b48ac Mon Sep 17 00:00:00 2001 From: wujingtao <601595686@qq.com> Date: Mon, 14 Jan 2019 18:51:24 +0800 Subject: [PATCH 123/160] Update index.d.ts --- types/pidusage/index.d.ts | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/types/pidusage/index.d.ts b/types/pidusage/index.d.ts index 79ca2ae88d..976611f9b3 100644 --- a/types/pidusage/index.d.ts +++ b/types/pidusage/index.d.ts @@ -5,7 +5,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 -interface IStat { +interface Stat { /** * percentage (from 0 to 100*vcore) */ @@ -42,24 +42,22 @@ interface IStat { timestamp: number; } -declare function pidusage(pid: number | string, callback: (err: Error | null, stats: IStat) => void): void; -declare function pidusage(pid: number | string, options: { [key: string]: any }, callback: (err: Error | null, stats: IStat) => void): void; -declare function pidusage(pids: Array, callback: (err: Error | null, stats: { [key: string]: IStat }) => void): void; -declare function pidusage(pids: Array, options: { [key: string]: any }, callback: (err: Error | null, stats: { [key: string]: IStat }) => void): void; -declare function pidusage(pid: number | string): Promise; -declare function pidusage(pid: number | string, options: { [key: string]: any }): Promise; -declare function pidusage(pids: Array): Promise<{ [key: string]: IStat }>; -declare function pidusage(pids: Array, options: { [key: string]: any }): Promise<{ [key: string]: IStat }>; +declare function pidusage(pid: number | string, callback: (err: Error | null, stats: Stat) => void): void; +declare function pidusage(pid: number | string, options: { [key: string]: any }, callback: (err: Error | null, stats: Stat) => void): void; +declare function pidusage(pids: Array, callback: (err: Error | null, stats: { [key: string]: Stat }) => void): void; +declare function pidusage(pids: Array, options: { [key: string]: any }, callback: (err: Error | null, stats: { [key: string]: Stat }) => void): void; +declare function pidusage(pid: number | string, options?: { [key: string]: any }): Promise; +declare function pidusage(pids: Array, options?: { [key: string]: any }): Promise<{ [key: string]: Stat }>; declare namespace pidusage { - export type Status = IStat; + type Status = Stat; /** * If needed this function can be used to clear the event loop. * Indeed, we're registering an interval to free up the in-memory metrics. * By calling this, it will clear this interval and all delete all in-memory data */ - export const clear: () => void; + export function clear(): void; } export = pidusage; From 25ad5fe08a74f8105820f74209cd6bad2419cf3d Mon Sep 17 00:00:00 2001 From: wujingtao <601595686@qq.com> Date: Mon, 14 Jan 2019 18:57:00 +0800 Subject: [PATCH 124/160] Update index.d.ts --- types/pidusage/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/pidusage/index.d.ts b/types/pidusage/index.d.ts index 976611f9b3..3efec6ce09 100644 --- a/types/pidusage/index.d.ts +++ b/types/pidusage/index.d.ts @@ -53,11 +53,11 @@ declare namespace pidusage { type Status = Stat; /** - * If needed this function can be used to clear the event loop. - * Indeed, we're registering an interval to free up the in-memory metrics. + * If needed this function can be used to clear the event loop. + * Indeed, we're registering an interval to free up the in-memory metrics. * By calling this, it will clear this interval and all delete all in-memory data */ - export function clear(): void; + function clear(): void; } export = pidusage; From 7ec89c4b5f01ac3459e9256c8b39c6e0fe535994 Mon Sep 17 00:00:00 2001 From: arichter83 Date: Mon, 14 Jan 2019 14:31:27 +0100 Subject: [PATCH 125/160] Add extendOptions --- types/simpl-schema/index.d.ts | 4 ++-- types/simpl-schema/simpl-schema-tests.ts | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/types/simpl-schema/index.d.ts b/types/simpl-schema/index.d.ts index b09a8fde96..f399096d61 100644 --- a/types/simpl-schema/index.d.ts +++ b/types/simpl-schema/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for simpl-schema 0.1 +// Type definitions for simpl-schema 0.2 // Project: https://github.com/aldeed/simple-schema-js // Definitions by: Andreas Richter // Qkramer @@ -134,6 +134,7 @@ interface SimpleSchemaStatic { objectKeys(keyPrefix: any): any[]; validate(obj: any, options?: ValidationOption): void; validator(options: ValidationOption): () => boolean; + extendOptions(options: string[]): void; RegEx: { Email: RegExp; EmailWithTLD: RegExp; @@ -235,7 +236,6 @@ export interface SimpleSchema extends SimpleSchemaStatic { /** Validate a data object. Options: {keys: []} to limit */ validate(obj: any, options?: ValidationOption): void; addValidator(validator: () => boolean): any; - extendOptions(options: {[key: string]: any}): void; messages(messages: any): void; } diff --git a/types/simpl-schema/simpl-schema-tests.ts b/types/simpl-schema/simpl-schema-tests.ts index a3555c4428..0b34d15187 100644 --- a/types/simpl-schema/simpl-schema-tests.ts +++ b/types/simpl-schema/simpl-schema-tests.ts @@ -75,3 +75,5 @@ new SimpleSchema({ shortArray: Array, subSchema: StringSchemaWithOptions }); + +SimpleSchema.extendOptions(['autoform']); From 0d06d2e22004d9ab1f1489247f0b17cbde30e011 Mon Sep 17 00:00:00 2001 From: Gaylor Bosson Date: Mon, 14 Jan 2019 11:57:45 +0100 Subject: [PATCH 126/160] fix(bn.js): define RedBN as an extension of BN Previous definition was considering this as a totally different class but it is in fact the same class with extended functionality. --- types/bn.js/bn.js-tests.ts | 8 +++ types/bn.js/index.d.ts | 119 +++++++++++++++++++++++++++---------- 2 files changed, 96 insertions(+), 31 deletions(-) diff --git a/types/bn.js/bn.js-tests.ts b/types/bn.js/bn.js-tests.ts index a5d37dfdeb..738d5220d4 100644 --- a/types/bn.js/bn.js-tests.ts +++ b/types/bn.js/bn.js-tests.ts @@ -8,3 +8,11 @@ bn.byteLength; bn.toArrayLike(Buffer, 'le', 2); const test = new BN(1, 'le'); + +const ctx = BN.red('p224'); +ctx.prime.name; + +const red = bn.toRed(ctx); +const newRed = red.redAdd(new BN(1)); +newRed.cmp(bn); +newRed.fromRed(); diff --git a/types/bn.js/index.d.ts b/types/bn.js/index.d.ts index db4c9f8b9e..be04dbcc5f 100644 --- a/types/bn.js/index.d.ts +++ b/types/bn.js/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/indutny/bn.js // Definitions by: Leonid Logvinov // Henry Nguyen +// Gaylor Bosson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -9,36 +10,16 @@ type Endianness = 'le' | 'be'; type IPrimeName = 'k256' | 'p224' | 'p192' | 'p25519'; -declare class RedBN { - redAdd(b: RedBN): RedBN; - redIAdd(b: RedBN): RedBN; - redSub(b: RedBN): RedBN; - redISub(b: RedBN): RedBN; - redShl(num: number): RedBN; - redMul(b: RedBN): RedBN; - redIMul(b: RedBN): RedBN; - redSqr(): RedBN; - redISqr(): RedBN; - /** - * @description square root modulo reduction context's prime - */ - redSqrt(): RedBN; - /** - * @description modular inverse of the number - */ - redInvm(): RedBN; - redNeg(): RedBN; - /** - * @description modular exponentiation - */ - redPow(b: RedBN): RedBN; - fromRed(): BN; +interface MPrime { + name: string; + p: BN; + n: number; + k: BN; } -// FIXME: not sure how to specify the reduction context here interface ReductionContext { m: number; - prime: any; + prime: MPrime; [key: string]: any; } @@ -78,11 +59,6 @@ declare class BN { */ static min(left: BN, right: BN): BN; - /** - * @description Convert number to red - */ - toRed(reductionContext: ReductionContext): RedBN; - /** * @description clone number */ @@ -522,6 +498,87 @@ declare class BN { * @description inverse `a` modulo `b` */ invm(b: BN): BN; + + /** + * @description Convert number to red + */ + toRed(reductionContext: ReductionContext): RedBN; +} + +/** + * Big-Number class with additionnal methods that are using modular + * operation. + */ +declare class RedBN extends BN { + /** + * @description Convert back a number using a reduction context + */ + fromRed(): BN; + + /** + * @description modular addition + */ + redAdd(b: BN): RedBN; + + /** + * @description in-place modular addition + */ + redIAdd(b: BN): RedBN; + + /** + * @description modular subtraction + */ + redSub(b: BN): RedBN; + + /** + * @description in-place modular subtraction + */ + redISub(b: BN): RedBN; + + /** + * @description modular shift left + */ + redShl(num: number): RedBN; + + /** + * @description modular multiplication + */ + redMul(b: BN): RedBN; + + /** + * @description in-place modular multiplication + */ + redIMul(b: BN): RedBN; + + /** + * @description modular square + */ + redSqr(): RedBN; + + /** + * @description in-place modular square + */ + redISqr(): RedBN; + + /** + * @description modular square root + */ + redSqrt(): RedBN; + + /** + * @description modular inverse of the number + */ + redInvm(): RedBN; + + /** + * @description modular negation + */ + redNeg(): RedBN; + + /** + * @description modular exponentiation + */ + redPow(b: BN): RedBN; } export = BN; From 843947a4dc0d3bcdb12fe01039e3586b20c4778a Mon Sep 17 00:00:00 2001 From: bySabi Files Date: Mon, 14 Jan 2019 16:24:08 +0100 Subject: [PATCH 127/160] [react-lifecycles-compat] add typedef --- types/react-lifecycles-compat/index.d.ts | 9 +++++++ .../react-lifecycles-compat-tests.ts | 10 ++++++++ types/react-lifecycles-compat/tsconfig.json | 24 +++++++++++++++++++ types/react-lifecycles-compat/tslint.json | 1 + 4 files changed, 44 insertions(+) create mode 100644 types/react-lifecycles-compat/index.d.ts create mode 100644 types/react-lifecycles-compat/react-lifecycles-compat-tests.ts create mode 100644 types/react-lifecycles-compat/tsconfig.json create mode 100644 types/react-lifecycles-compat/tslint.json diff --git a/types/react-lifecycles-compat/index.d.ts b/types/react-lifecycles-compat/index.d.ts new file mode 100644 index 0000000000..9107639ce4 --- /dev/null +++ b/types/react-lifecycles-compat/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for react-lifecycles-compat 3.0.4 +// Project: https://github.com/reactjs/react-lifecycles-compat#readme +// Definitions by: bySabi Files +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import * as React from 'react'; + +export function polyfill

(Comp: React.ComponentType

): React.ComponentType

; diff --git a/types/react-lifecycles-compat/react-lifecycles-compat-tests.ts b/types/react-lifecycles-compat/react-lifecycles-compat-tests.ts new file mode 100644 index 0000000000..bf514b6818 --- /dev/null +++ b/types/react-lifecycles-compat/react-lifecycles-compat-tests.ts @@ -0,0 +1,10 @@ +import * as React from 'react'; +import { polyfill } from 'react-lifecycles-compat'; + +class A extends React.Component { + render() { + return null; + } +} + +const Comp = polyfill(A); diff --git a/types/react-lifecycles-compat/tsconfig.json b/types/react-lifecycles-compat/tsconfig.json new file mode 100644 index 0000000000..564f07efba --- /dev/null +++ b/types/react-lifecycles-compat/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "preserve" + }, + "files": [ + "index.d.ts", + "react-lifecycles-compat.tsx" + ] +} diff --git a/types/react-lifecycles-compat/tslint.json b/types/react-lifecycles-compat/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/react-lifecycles-compat/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 8ce79c9816ea9109d2460178c34c762e176a33a9 Mon Sep 17 00:00:00 2001 From: Logan Dam Date: Mon, 14 Jan 2019 17:31:36 +0200 Subject: [PATCH 128/160] added types for country-data --- types/country-data/country-data-tests.ts | 14 +++ types/country-data/index.d.ts | 103 +++++++++++++++++++++++ types/country-data/tsconfig.json | 23 +++++ types/country-data/tslint.json | 1 + 4 files changed, 141 insertions(+) create mode 100644 types/country-data/country-data-tests.ts create mode 100644 types/country-data/index.d.ts create mode 100644 types/country-data/tsconfig.json create mode 100644 types/country-data/tslint.json diff --git a/types/country-data/country-data-tests.ts b/types/country-data/country-data-tests.ts new file mode 100644 index 0000000000..e3b1ba663d --- /dev/null +++ b/types/country-data/country-data-tests.ts @@ -0,0 +1,14 @@ +import * as lib from 'country-data'; + +lib.callingCodes.all; // $ExpectType string[] +lib.callingCountries.all; // $ExpectType Country[] +lib.continents.africa; // $ExpectType Continent +lib.continents.africa.countries; // $ExpectType Country[] +lib.countries.all; // $ExpectType Country[] +lib.currencies.all; // $ExpectType Currency[] +lib.languages.all; // $ExpectType Language[] +lib.regions.antarctica; // $ExpectType Region +lib.regions.antarctica.countries; // $ExpectType string[] +lib.lookup.countries(""); // $ExpectType Country[] +lib.lookup.currencies(""); // $ExpectType Currency[] +lib.lookup.languages(""); // $ExpectType Language[] diff --git a/types/country-data/index.d.ts b/types/country-data/index.d.ts new file mode 100644 index 0000000000..4d97e3dc98 --- /dev/null +++ b/types/country-data/index.d.ts @@ -0,0 +1,103 @@ +// Type definitions for country-data 0.0 +// Project: https://github.com/OpenBookPrices/country-data +// Definitions by: Logan Dam +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface Country { + alpha2: string; + alpha3: string; + countryCallingCodes: string[]; + currencies: string[]; + emoji: string; + ioc: string; + languages: string[]; + name: string; + status: string; +} + +export interface Currency { + code: string; + decimals: number; + name: string; + number: number; +} + +export interface Language { + alpha2: string; + alpha3: string; + bibliographic: string; + name: string; +} + +export interface Continent { + name: string; + regions: string[]; + countries: Country[]; +} + +export interface Region { + name: string; + countries: string[]; +} + +export const countries: { + all: Country[]; +}; + +export const continents: { + africa: Continent; + antarctica: Continent; + asia: Continent; + europe: Continent; + northAmerica: Continent; + oceania: Continent; + southAmerica: Continent; +}; + +export const callingCodes: { + all: string[]; +}; + +export const callingCountries: { + all: Country[]; +}; + +export const currencies: { + all: Currency[]; +}; + +export const languages: { + all: Language[]; +}; + +export const regions: { + centralAsia: Region; + southernAsia: Region; + southeastAsia: Region; + eastAsia: Region; + westernAsia: Region; + centralAfrica: Region; + northAfrica: Region; + southernAfrica: Region; + eastAfrica: Region; + westAfrica: Region; + centralAmerica: Region; + northernAmerica: Region; + caribbean: Region; + southAmerica: Region; + antarctica: Region; + northernEurope: Region; + southernEurope: Region; + easternEurope: Region; + westernEurope: Region; + australia: Region; + melanesia: Region; + micronesia: Region; + polynesia: Region; +}; + +export const lookup: { + countries: (query: any) => Country[]; + currencies: (query: any) => Currency[]; + languages: (query: any) => Language[]; +}; diff --git a/types/country-data/tsconfig.json b/types/country-data/tsconfig.json new file mode 100644 index 0000000000..ccbbf6ecd6 --- /dev/null +++ b/types/country-data/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "country-data-tests.ts" + ] +} diff --git a/types/country-data/tslint.json b/types/country-data/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/country-data/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 46c5cdc2c2cfbd5663520f70ed221f217b07e35d Mon Sep 17 00:00:00 2001 From: Logan Dam Date: Mon, 14 Jan 2019 17:40:45 +0200 Subject: [PATCH 129/160] made things readonly --- types/country-data/country-data-tests.ts | 20 ++-- types/country-data/index.d.ts | 120 +++++++++++------------ 2 files changed, 70 insertions(+), 70 deletions(-) diff --git a/types/country-data/country-data-tests.ts b/types/country-data/country-data-tests.ts index e3b1ba663d..850116dc63 100644 --- a/types/country-data/country-data-tests.ts +++ b/types/country-data/country-data-tests.ts @@ -1,14 +1,14 @@ import * as lib from 'country-data'; -lib.callingCodes.all; // $ExpectType string[] -lib.callingCountries.all; // $ExpectType Country[] +lib.callingCodes.all; // $ExpectType ReadonlyArray +lib.callingCountries.all; // $ExpectType ReadonlyArray lib.continents.africa; // $ExpectType Continent -lib.continents.africa.countries; // $ExpectType Country[] -lib.countries.all; // $ExpectType Country[] -lib.currencies.all; // $ExpectType Currency[] -lib.languages.all; // $ExpectType Language[] +lib.continents.africa.countries; // $ExpectType ReadonlyArray +lib.countries.all; // $ExpectType ReadonlyArray +lib.currencies.all; // $ExpectType ReadonlyArray +lib.languages.all; // $ExpectType ReadonlyArray lib.regions.antarctica; // $ExpectType Region -lib.regions.antarctica.countries; // $ExpectType string[] -lib.lookup.countries(""); // $ExpectType Country[] -lib.lookup.currencies(""); // $ExpectType Currency[] -lib.lookup.languages(""); // $ExpectType Language[] +lib.regions.antarctica.countries; // $ExpectType ReadonlyArray +lib.lookup.countries(""); // $ExpectType ReadonlyArray +lib.lookup.currencies(""); // $ExpectType ReadonlyArray +lib.lookup.languages(""); // $ExpectType ReadonlyArray diff --git a/types/country-data/index.d.ts b/types/country-data/index.d.ts index 4d97e3dc98..80acbbcbba 100644 --- a/types/country-data/index.d.ts +++ b/types/country-data/index.d.ts @@ -4,100 +4,100 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export interface Country { - alpha2: string; - alpha3: string; - countryCallingCodes: string[]; - currencies: string[]; - emoji: string; - ioc: string; - languages: string[]; - name: string; - status: string; + readonly alpha2: string; + readonly alpha3: string; + readonly countryCallingCodes: ReadonlyArray; + readonly currencies: ReadonlyArray; + readonly emoji: string; + readonly ioc: string; + readonly languages: ReadonlyArray; + readonly name: string; + readonly status: string; } export interface Currency { - code: string; - decimals: number; - name: string; - number: number; + readonly code: string; + readonly decimals: number; + readonly name: string; + readonly number: number; } export interface Language { - alpha2: string; - alpha3: string; - bibliographic: string; - name: string; + readonly alpha2: string; + readonly alpha3: string; + readonly bibliographic: string; + readonly name: string; } export interface Continent { - name: string; - regions: string[]; - countries: Country[]; + readonly name: string; + readonly regions: ReadonlyArray; + readonly countries: ReadonlyArray; } export interface Region { - name: string; - countries: string[]; + readonly name: string; + readonly countries: ReadonlyArray; } export const countries: { - all: Country[]; + readonly all: ReadonlyArray; }; export const continents: { - africa: Continent; - antarctica: Continent; - asia: Continent; - europe: Continent; - northAmerica: Continent; - oceania: Continent; - southAmerica: Continent; + readonly africa: Continent; + readonly antarctica: Continent; + readonly asia: Continent; + readonly europe: Continent; + readonly northAmerica: Continent; + readonly oceania: Continent; + readonly southAmerica: Continent; }; export const callingCodes: { - all: string[]; + readonly all: ReadonlyArray; }; export const callingCountries: { - all: Country[]; + readonly all: ReadonlyArray; }; export const currencies: { - all: Currency[]; + readonly all: ReadonlyArray; }; export const languages: { - all: Language[]; + readonly all: ReadonlyArray; }; export const regions: { - centralAsia: Region; - southernAsia: Region; - southeastAsia: Region; - eastAsia: Region; - westernAsia: Region; - centralAfrica: Region; - northAfrica: Region; - southernAfrica: Region; - eastAfrica: Region; - westAfrica: Region; - centralAmerica: Region; - northernAmerica: Region; - caribbean: Region; - southAmerica: Region; - antarctica: Region; - northernEurope: Region; - southernEurope: Region; - easternEurope: Region; - westernEurope: Region; - australia: Region; - melanesia: Region; - micronesia: Region; - polynesia: Region; + readonly centralAsia: Region; + readonly southernAsia: Region; + readonly southeastAsia: Region; + readonly eastAsia: Region; + readonly westernAsia: Region; + readonly centralAfrica: Region; + readonly northAfrica: Region; + readonly southernAfrica: Region; + readonly eastAfrica: Region; + readonly westAfrica: Region; + readonly centralAmerica: Region; + readonly northernAmerica: Region; + readonly caribbean: Region; + readonly southAmerica: Region; + readonly antarctica: Region; + readonly northernEurope: Region; + readonly southernEurope: Region; + readonly easternEurope: Region; + readonly westernEurope: Region; + readonly australia: Region; + readonly melanesia: Region; + readonly micronesia: Region; + readonly polynesia: Region; }; export const lookup: { - countries: (query: any) => Country[]; - currencies: (query: any) => Currency[]; - languages: (query: any) => Language[]; + readonly countries: (query: any) => ReadonlyArray; + readonly currencies: (query: any) => ReadonlyArray; + readonly languages: (query: any) => ReadonlyArray; }; From 7e64b97ad1fe4ac2aa8d9861acee3288096d7921 Mon Sep 17 00:00:00 2001 From: bySabi Files Date: Mon, 14 Jan 2019 17:04:02 +0100 Subject: [PATCH 130/160] fix tsconfig.json --- types/react-lifecycles-compat/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-lifecycles-compat/tsconfig.json b/types/react-lifecycles-compat/tsconfig.json index 564f07efba..25d2d0307d 100644 --- a/types/react-lifecycles-compat/tsconfig.json +++ b/types/react-lifecycles-compat/tsconfig.json @@ -19,6 +19,6 @@ }, "files": [ "index.d.ts", - "react-lifecycles-compat.tsx" + "react-lifecycles-compat-tests.ts" ] } From 670119832252e1d4de88a9b8e6d69b12ab63c313 Mon Sep 17 00:00:00 2001 From: Daniel Rose Date: Mon, 14 Jan 2019 17:23:56 +0100 Subject: [PATCH 131/160] Add missing methods of SCServer. --- types/socketcluster-server/scserver.d.ts | 28 +++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/types/socketcluster-server/scserver.d.ts b/types/socketcluster-server/scserver.d.ts index 48952a8a8a..c04c4888f0 100644 --- a/types/socketcluster-server/scserver.d.ts +++ b/types/socketcluster-server/scserver.d.ts @@ -49,8 +49,27 @@ declare class SCServer extends EventEmitter { addMiddleware(type: "publishOut", middlewareFn: (req: SCServer.PublishOutRequest, next: SCServer.nextMiddlewareFunction) => void): void; addMiddleware(type: "emit", middlewareFn: (req: SCServer.EmitRequest, next: SCServer.nextMiddlewareFunction) => void): void; + removeMiddleware(type: "handshakeWS", middlewareFn: (req: IncomingMessage, next: SCServer.nextMiddlewareFunction) => void): void; + removeMiddleware(type: "handshakeSC", middlewareFn: (req: SCServer.HandshakeSCRequest, next: SCServer.nextHandshakeSCMiddlewareFunction) => void): void; + removeMiddleware(type: "authenticate", middlewareFn: (req: SCServer.AuthenticateRequest, next: SCServer.nextAuthenticateMiddlewareFunction) => void): void; + removeMiddleware(type: "subscribe", middlewareFn: (req: SCServer.SubscribeRequest, next: SCServer.nextMiddlewareFunction) => void): void; + removeMiddleware(type: "publishIn", middlewareFn: (req: SCServer.PublishInRequest, next: SCServer.nextMiddlewareFunction) => void): void; + removeMiddleware(type: "publishOut", middlewareFn: (req: SCServer.PublishOutRequest, next: SCServer.nextMiddlewareFunction) => void): void; + removeMiddleware(type: "emit", middlewareFn: (req: SCServer.EmitRequest, next: SCServer.nextMiddlewareFunction) => void): void; + setAuthEngine(authEngine: SCAuthEngine): void; setCodecEngine(codecEngine: SCServer.SCCodecEngine): void; + + close(cb?: (err?: Error) => void): void; + + getPath(): string; + generateId(): string; + + verifyHandshake(info: SCServer.VerifyHandshakeInfo, cb: SCServer.verifyHandshakeFunction): void; + verifyInboundEvent(socket: SCServerSocket, eventName: string, eventData: any, cb: (err: Error, eventData: any, ackData?: any) => void): void; + verifyOutboundEvent(socket: SCServerSocket, eventName: string, eventData: any, options: {} | null, cb: (err: Error | null, eventData: any) => void): void; + + isAuthTokenExpired(token: SCServer.AuthToken): boolean; } export = SCServer; @@ -322,7 +341,7 @@ declare namespace SCServer { type nextAuthenticateMiddlewareFunction = (error?: true | string | Error | null, isBadToken?: boolean) => void; type connectionListenerFunction = (scSocket: SCServerSocket, serverSocketStatus: SCServerSocketStatus) => void; type disconnectionListenerFunction = (scSocket: SCServerSocket, code: number, data: any) => void; - type subscriptionListenerFunction = (scSocket: SCServerSocket, name: string, options: {channel: string}) => void; + type subscriptionListenerFunction = (scSocket: SCServerSocket, name: string, options: { channel: string }) => void; type unsubscriptionListenerFunction = (scSocket: SCServerSocket, channel: string) => void; type handshakeListenerFunction = (scSocket: SCServerSocket) => void; type badSocketAuthTokenListenerFunction = (scSocket: SCServerSocket, status: badAuthStatus) => void; @@ -331,4 +350,11 @@ declare namespace SCServer { decode: (input: any) => any; ncode: (object: any) => any; } + + interface VerifyHandshakeInfo { + req: IncomingMessage; + origin?: string; + } + + type verifyHandshakeFunction = (success: boolean, errorCode?: number, errorMessage?: string) => void; } From 6fa84eb99a73291324c45a403913814d5100a273 Mon Sep 17 00:00:00 2001 From: bySabi Files Date: Mon, 14 Jan 2019 20:04:21 +0100 Subject: [PATCH 132/160] fix version --- types/react-lifecycles-compat/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-lifecycles-compat/index.d.ts b/types/react-lifecycles-compat/index.d.ts index 9107639ce4..7db045bdde 100644 --- a/types/react-lifecycles-compat/index.d.ts +++ b/types/react-lifecycles-compat/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-lifecycles-compat 3.0.4 +// Type definitions for react-lifecycles-compat 3.0 // Project: https://github.com/reactjs/react-lifecycles-compat#readme // Definitions by: bySabi Files // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 5f3fedd3be4655fc23117203a314b8a7db237f16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9line=20Bensoussan?= Date: Mon, 14 Jan 2019 14:31:44 -0500 Subject: [PATCH 133/160] Set config as optional parameter --- types/http-proxy-middleware/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/http-proxy-middleware/index.d.ts b/types/http-proxy-middleware/index.d.ts index b48214b8f6..0a65c29546 100644 --- a/types/http-proxy-middleware/index.d.ts +++ b/types/http-proxy-middleware/index.d.ts @@ -15,7 +15,7 @@ import * as httpProxy from "http-proxy"; import { Readable } from 'stream'; declare function proxy(config: proxy.Config): proxy.Proxy; -declare function proxy(contextOrUri: string | string[] | proxy.Filter, config: proxy.Config): proxy.Proxy; +declare function proxy(contextOrUri: string | string[] | proxy.Filter, config?: proxy.Config): proxy.Proxy; declare namespace proxy { type Filter = (pathanme: string, req: http.IncomingMessage) => boolean; From c339e204b22af041c8378c4ba8e80889303bdcc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9line=20Bensoussan?= Date: Mon, 14 Jan 2019 14:42:17 -0500 Subject: [PATCH 134/160] Add test for shorthand case --- types/http-proxy-middleware/http-proxy-middleware-tests.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types/http-proxy-middleware/http-proxy-middleware-tests.ts b/types/http-proxy-middleware/http-proxy-middleware-tests.ts index aae082a956..fd360745bf 100644 --- a/types/http-proxy-middleware/http-proxy-middleware-tests.ts +++ b/types/http-proxy-middleware/http-proxy-middleware-tests.ts @@ -140,3 +140,6 @@ proxy({ proxy({ headers: {host: 'www.example.org'} }); + +// Shorthands +proxy('/'); \ No newline at end of file From ca4ecbe8e02aed84546042efaca6f3806818c0ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9line=20Bensoussan?= Date: Mon, 14 Jan 2019 14:53:53 -0500 Subject: [PATCH 135/160] Increase version number --- types/http-proxy-middleware/http-proxy-middleware-tests.ts | 2 +- types/http-proxy-middleware/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/types/http-proxy-middleware/http-proxy-middleware-tests.ts b/types/http-proxy-middleware/http-proxy-middleware-tests.ts index fd360745bf..9967dedcd9 100644 --- a/types/http-proxy-middleware/http-proxy-middleware-tests.ts +++ b/types/http-proxy-middleware/http-proxy-middleware-tests.ts @@ -142,4 +142,4 @@ proxy({ }); // Shorthands -proxy('/'); \ No newline at end of file +proxy('/'); diff --git a/types/http-proxy-middleware/index.d.ts b/types/http-proxy-middleware/index.d.ts index 0a65c29546..820e38f938 100644 --- a/types/http-proxy-middleware/index.d.ts +++ b/types/http-proxy-middleware/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for http-proxy-middleware 0.19 +// Type definitions for http-proxy-middleware 0.20 // Project: https://github.com/chimurai/http-proxy-middleware // Definitions by: Zebulon McCorkle // BendingBender From e58895a723a2973f0cbc86853e42a6bbbe4c5aa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9line=20Bensoussan?= Date: Mon, 14 Jan 2019 16:05:27 -0500 Subject: [PATCH 136/160] Update defaultADUsernameFromEmailPrefix type to boolean --- types/auth0-lock/auth0-lock-tests.ts | 3 ++- types/auth0-lock/index.d.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/types/auth0-lock/auth0-lock-tests.ts b/types/auth0-lock/auth0-lock-tests.ts index 6e23e81d5e..53c50dd98f 100644 --- a/types/auth0-lock/auth0-lock-tests.ts +++ b/types/auth0-lock/auth0-lock-tests.ts @@ -130,7 +130,8 @@ const otherOptions : Auth0LockConstructorOptions = { hashCleanup: false, leeway: 30, _enableImpersonation: true, - _enableIdPInitiatedLogin: false + _enableIdPInitiatedLogin: false, + defaultADUsernameFromEmailPrefix: false }; new Auth0Lock(CLIENT_ID, DOMAIN, otherOptions); diff --git a/types/auth0-lock/index.d.ts b/types/auth0-lock/index.d.ts index 2916ec58c8..32a3228e56 100644 --- a/types/auth0-lock/index.d.ts +++ b/types/auth0-lock/index.d.ts @@ -130,7 +130,7 @@ interface Auth0LockConstructorOptions { closable?: boolean; configurationBaseUrl?: string; container?: string; - defaultADUsernameFromEmailPrefix?: string; + defaultADUsernameFromEmailPrefix?: boolean; defaultDatabaseConnection?: string; defaultEnterpriseConnection?: string; flashMessage?: Auth0LockFlashMessageOptions; From 9fbb161b5c1604ae872bb8b368c680bccba31a07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9line=20Bensoussan?= Date: Mon, 14 Jan 2019 16:25:07 -0500 Subject: [PATCH 137/160] Undo change on http-proxy-middleware version --- types/http-proxy-middleware/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/http-proxy-middleware/index.d.ts b/types/http-proxy-middleware/index.d.ts index 820e38f938..0a65c29546 100644 --- a/types/http-proxy-middleware/index.d.ts +++ b/types/http-proxy-middleware/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for http-proxy-middleware 0.20 +// Type definitions for http-proxy-middleware 0.19 // Project: https://github.com/chimurai/http-proxy-middleware // Definitions by: Zebulon McCorkle // BendingBender From af0f9f68d9236803858b262c84e7da356f66df49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9line=20Bensoussan?= Date: Mon, 14 Jan 2019 16:58:27 -0500 Subject: [PATCH 138/160] Fix typo to pathname --- types/http-proxy-middleware/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/http-proxy-middleware/index.d.ts b/types/http-proxy-middleware/index.d.ts index 0a65c29546..13f2669e5f 100644 --- a/types/http-proxy-middleware/index.d.ts +++ b/types/http-proxy-middleware/index.d.ts @@ -18,7 +18,7 @@ declare function proxy(config: proxy.Config): proxy.Proxy; declare function proxy(contextOrUri: string | string[] | proxy.Filter, config?: proxy.Config): proxy.Proxy; declare namespace proxy { - type Filter = (pathanme: string, req: http.IncomingMessage) => boolean; + type Filter = (pathname: string, req: http.IncomingMessage) => boolean; type Logger = (...args: any[]) => void; interface LogProvider { log: Logger; From 39dba63ebe4971d45cdd533300fac2071665a93c Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 14 Jan 2019 14:03:13 -0800 Subject: [PATCH 139/160] Bring build/health status to the top of the README --- README.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 026994fdd5..1f8bed0bba 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,4 @@ -# DefinitelyTyped [![Build Status](https://travis-ci.org/DefinitelyTyped/DefinitelyTyped.svg?branch=master)](https://travis-ci.org/DefinitelyTyped/DefinitelyTyped) - -[![Join the chat at https://gitter.im/borisyankov/DefinitelyTyped](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/borisyankov/DefinitelyTyped?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +# DefinitelyTyped > The repository for *high quality* TypeScript type definitions. @@ -8,6 +6,19 @@ Also see the [definitelytyped.org](http://definitelytyped.org) website, although *You can also read this README in [Spanish](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.es.md), [Korean](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.ko.md), and [Russian](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.ru.md)!* +## Current status + +This section tracks the health of the repository and publishing process. +It should give contributors a clue over any issues that they may be experiencing with their PRs and packages. + +* All packages are type-checking/linting cleanly: [![Build Status](https://travis-ci.org/DefinitelyTyped/DefinitelyTyped.svg?branch=master)](https://travis-ci.org/DefinitelyTyped/DefinitelyTyped) +* All packages are being published to npm in under 10,000 seconds: [![Publish Status](https://typescript.visualstudio.com/TypeScript/_apis/build/status/sandersn.types-publisher-watchdog)](https://typescript.visualstudio.com/TypeScript/_build/latest?definitionId=13) +* [typescript-bot](https://github.com/typescript-bot) hs been active on DefinitelyTyped [![Activity Status](https://typescript.visualstudio.com/TypeScript/_apis/build/status/sandersn.typescript-bot-watchdog)](https://typescript.visualstudio.com/TypeScript/_build/latest?definitionId=14) + +If anything here seems wrong, or any of the above are failing, please raise an issue in [the DefinitelyTyped Gitter channel](https://gitter.im/borisyankov/DefinitelyTyped). + +[![Join the chat at https://gitter.im/DefinitelyTyped/DefinitelyTyped](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/DefinitelyTyped/DefinitelyTyped?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + ## What are declaration files? See the [TypeScript handbook](http://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html). @@ -342,6 +353,3 @@ This project is licensed under the MIT license. Copyrights on the definition files are respective of each contributor listed at the beginning of each definition file. [![Analytics](https://ga-beacon.appspot.com/UA-47495295-4/borisyankov/DefinitelyTyped)](https://github.com/igrigorik/ga-beacon) - -[![Build Status](https://typescript.visualstudio.com/TypeScript/_apis/build/status/sandersn.types-publisher-watchdog)](https://typescript.visualstudio.com/TypeScript/_build/latest?definitionId=13) Are packages being published to npm in less than 10,000 seconds on average? -[![Build Status](https://typescript.visualstudio.com/TypeScript/_apis/build/status/sandersn.typescript-bot-watchdog)](https://typescript.visualstudio.com/TypeScript/_build/latest?definitionId=14) Has typescript-bot been active on DefinitelyTyped in the last two hours? From 49532fa9f9700e045dc9f61a3a98ed48b42413a9 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 14 Jan 2019 14:04:26 -0800 Subject: [PATCH 140/160] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1f8bed0bba..dd976b8146 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ It should give contributors a clue over any issues that they may be experiencing * All packages are being published to npm in under 10,000 seconds: [![Publish Status](https://typescript.visualstudio.com/TypeScript/_apis/build/status/sandersn.types-publisher-watchdog)](https://typescript.visualstudio.com/TypeScript/_build/latest?definitionId=13) * [typescript-bot](https://github.com/typescript-bot) hs been active on DefinitelyTyped [![Activity Status](https://typescript.visualstudio.com/TypeScript/_apis/build/status/sandersn.typescript-bot-watchdog)](https://typescript.visualstudio.com/TypeScript/_build/latest?definitionId=14) -If anything here seems wrong, or any of the above are failing, please raise an issue in [the DefinitelyTyped Gitter channel](https://gitter.im/borisyankov/DefinitelyTyped). +If anything here seems wrong, or any of the above are failing, please raise an issue in [the DefinitelyTyped Gitter channel](https://gitter.im/DefinitelyTyped/DefinitelyTyped). [![Join the chat at https://gitter.im/DefinitelyTyped/DefinitelyTyped](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/DefinitelyTyped/DefinitelyTyped?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) From a4719a48eb15940edff351210b1b200edf4c8a57 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 14 Jan 2019 23:15:53 +0100 Subject: [PATCH 141/160] [srcset] Add types --- types/srcset/index.d.ts | 27 +++++++++++++++++++++++++++ types/srcset/srcset-tests.ts | 8 ++++++++ types/srcset/tsconfig.json | 23 +++++++++++++++++++++++ types/srcset/tslint.json | 1 + 4 files changed, 59 insertions(+) create mode 100644 types/srcset/index.d.ts create mode 100644 types/srcset/srcset-tests.ts create mode 100644 types/srcset/tsconfig.json create mode 100644 types/srcset/tslint.json diff --git a/types/srcset/index.d.ts b/types/srcset/index.d.ts new file mode 100644 index 0000000000..afbeecd918 --- /dev/null +++ b/types/srcset/index.d.ts @@ -0,0 +1,27 @@ +// Type definitions for srcset 1.0 +// Project: https://github.com/sindresorhus/srcset#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Parse the HTML `` + * [srcset](http://mobile.smashingmagazine.com/2013/08/21/webkit-implements-srcset-and-why-its-a-good-thing/) attribute. + * + * @param srcset An srcset string. + */ +export function parse(srcset: string): SrcSetDefinition[]; + +/** + * Stringify a list of `SrcSetDefinition`s. + * + * @param srcSetDefinitions An array of `SrcSetDefinition` object. + * @returns A srcset string. + */ +export function stringify(srcSetDefinitions: SrcSetDefinition[]): string; + +export interface SrcSetDefinition { + url: string; + width?: number; + height?: number; + density?: number; +} diff --git a/types/srcset/srcset-tests.ts b/types/srcset/srcset-tests.ts new file mode 100644 index 0000000000..b7091e1bd8 --- /dev/null +++ b/types/srcset/srcset-tests.ts @@ -0,0 +1,8 @@ +import srcset = require('srcset'); + +const parsed = srcset.parse('banner-HD.jpg 2x, banner-phone.jpg 100w'); +parsed; // $ExpectType SrcSetDefinition[] + +parsed.push({ url: 'banner-phone-HD.jpg', width: 100, density: 2 }); + +srcset.stringify(parsed); // $ExpectType string diff --git a/types/srcset/tsconfig.json b/types/srcset/tsconfig.json new file mode 100644 index 0000000000..42d580ed7e --- /dev/null +++ b/types/srcset/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "srcset-tests.ts" + ] +} diff --git a/types/srcset/tslint.json b/types/srcset/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/srcset/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 72321d590dde26d8c28096f0668b9c9a2703e2e2 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 14 Jan 2019 23:39:26 +0100 Subject: [PATCH 142/160] [execall] Add types --- types/execall/execall-tests.ts | 3 +++ types/execall/index.d.ts | 23 +++++++++++++++++++++++ types/execall/tsconfig.json | 23 +++++++++++++++++++++++ types/execall/tslint.json | 1 + 4 files changed, 50 insertions(+) create mode 100644 types/execall/execall-tests.ts create mode 100644 types/execall/index.d.ts create mode 100644 types/execall/tsconfig.json create mode 100644 types/execall/tslint.json diff --git a/types/execall/execall-tests.ts b/types/execall/execall-tests.ts new file mode 100644 index 0000000000..8a9d3b7768 --- /dev/null +++ b/types/execall/execall-tests.ts @@ -0,0 +1,3 @@ +import execall = require('execall'); + +execall(/(\d+)/g, '$200 and $400'); // $ExpectType Match[] diff --git a/types/execall/index.d.ts b/types/execall/index.d.ts new file mode 100644 index 0000000000..29e7d3945e --- /dev/null +++ b/types/execall/index.d.ts @@ -0,0 +1,23 @@ +// Type definitions for execall 1.0 +// Project: https://github.com/sindresorhus/execall +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = execall; + +/** + * Find multiple RegExp matches in a string. Instead of having to iterate over + * `RegExp#exec`, immutable, and with a nicer result format. + * + * @param re Regular expression to match against the `input`. + * @returns An array of matches. + */ +declare function execall(re: RegExp, input: string): execall.Match[]; + +declare namespace execall { + interface Match { + match: string; + sub: string[]; + index: number; + } +} diff --git a/types/execall/tsconfig.json b/types/execall/tsconfig.json new file mode 100644 index 0000000000..70a42a9a18 --- /dev/null +++ b/types/execall/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "execall-tests.ts" + ] +} diff --git a/types/execall/tslint.json b/types/execall/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/execall/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From d0ee8b553c07baf1277f3a9b3dd26e8433f87669 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 14 Jan 2019 14:57:22 -0800 Subject: [PATCH 143/160] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dd976b8146..125b897e42 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,11 @@ Also see the [definitelytyped.org](http://definitelytyped.org) website, although ## Current status This section tracks the health of the repository and publishing process. -It should give contributors a clue over any issues that they may be experiencing with their PRs and packages. +It may be helpful for contributors experiencing any issues with their PRs and packages. * All packages are type-checking/linting cleanly: [![Build Status](https://travis-ci.org/DefinitelyTyped/DefinitelyTyped.svg?branch=master)](https://travis-ci.org/DefinitelyTyped/DefinitelyTyped) * All packages are being published to npm in under 10,000 seconds: [![Publish Status](https://typescript.visualstudio.com/TypeScript/_apis/build/status/sandersn.types-publisher-watchdog)](https://typescript.visualstudio.com/TypeScript/_build/latest?definitionId=13) -* [typescript-bot](https://github.com/typescript-bot) hs been active on DefinitelyTyped [![Activity Status](https://typescript.visualstudio.com/TypeScript/_apis/build/status/sandersn.typescript-bot-watchdog)](https://typescript.visualstudio.com/TypeScript/_build/latest?definitionId=14) +* [typescript-bot](https://github.com/typescript-bot) has been active on DefinitelyTyped [![Activity Status](https://typescript.visualstudio.com/TypeScript/_apis/build/status/sandersn.typescript-bot-watchdog)](https://typescript.visualstudio.com/TypeScript/_build/latest?definitionId=14) If anything here seems wrong, or any of the above are failing, please raise an issue in [the DefinitelyTyped Gitter channel](https://gitter.im/DefinitelyTyped/DefinitelyTyped). From e8056489a69b96292a215eb7107ca6520c8d5e92 Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Mon, 14 Jan 2019 17:08:06 -0800 Subject: [PATCH 144/160] Update for version 6.1 --- types/oracle__oraclejet/index.d.ts | 2 +- types/oracle__oraclejet/ojchart/index.d.ts | 10 +-- .../ojcheckboxset/index.d.ts | 64 ++++++++++++++----- types/oracle__oraclejet/ojcontext/index.d.ts | 10 ++- .../ojdataprovider/index.d.ts | 7 ++ .../ojdiagram-utils/index.d.ts | 38 +++++++++++ types/oracle__oraclejet/ojdialog/index.d.ts | 4 ++ .../ojlistdataproviderview/index.d.ts | 10 +-- types/oracle__oraclejet/ojmenu/index.d.ts | 1 + types/oracle__oraclejet/ojmessage/index.d.ts | 10 ++- types/oracle__oraclejet/ojmessages/index.d.ts | 6 +- .../ojmodule-element/index.d.ts | 8 +-- .../oracle__oraclejet/ojoffcanvas/index.d.ts | 29 +++++++++ types/oracle__oraclejet/ojradioset/index.d.ts | 64 ++++++++++++++----- .../ojselectcombobox/index.d.ts | 48 +++++++------- .../ojthematicmap/index.d.ts | 6 -- .../ojvalidation-base/index.d.ts | 2 +- .../ojvalidation-number/index.d.ts | 7 +- types/oracle__oraclejet/tsconfig.json | 2 + 19 files changed, 244 insertions(+), 84 deletions(-) create mode 100644 types/oracle__oraclejet/ojdiagram-utils/index.d.ts create mode 100644 types/oracle__oraclejet/ojoffcanvas/index.d.ts diff --git a/types/oracle__oraclejet/index.d.ts b/types/oracle__oraclejet/index.d.ts index dd99802419..fae850b7df 100644 --- a/types/oracle__oraclejet/index.d.ts +++ b/types/oracle__oraclejet/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for oraclejet 6.0 +// Type definitions for oraclejet 6.1 // Project: https://github.com/oracle/oraclejet // Definitions by: Naizam Olakara // Jing Wu diff --git a/types/oracle__oraclejet/ojchart/index.d.ts b/types/oracle__oraclejet/ojchart/index.d.ts index 25970f316e..dead9ee55f 100644 --- a/types/oracle__oraclejet/ojchart/index.d.ts +++ b/types/oracle__oraclejet/ojchart/index.d.ts @@ -667,7 +667,7 @@ export namespace ojChart { }> { } interface ojSelectInput extends CustomEvent<{ - items: any[]; + items: string[]; selectionData: Array<{ data: object; itemData: object; @@ -1486,7 +1486,7 @@ export interface ojChartItem extends JetElement { close?: number; color?: string; drilling?: 'on' | 'off' | 'inherit'; - groupId: string[]; + groupId: Array<(string | number)>; high?: number; items?: object[] | number[]; label?: string | string[]; @@ -1502,7 +1502,7 @@ export interface ojChartItem extends JetElement { q1?: number; q2?: number; q3?: number; - seriesId: string; + seriesId: string | number; shortDesc?: string; source?: string; sourceHover?: string; @@ -1619,7 +1619,7 @@ export interface ojChartItemSettableProperties extends JetSettableProperties { close?: number; color?: string; drilling?: 'on' | 'off' | 'inherit'; - groupId: string[]; + groupId: Array<(string | number)>; high?: number; items?: object[] | number[]; label?: string | string[]; @@ -1635,7 +1635,7 @@ export interface ojChartItemSettableProperties extends JetSettableProperties { q1?: number; q2?: number; q3?: number; - seriesId: string; + seriesId: string | number; shortDesc?: string; source?: string; sourceHover?: string; diff --git a/types/oracle__oraclejet/ojcheckboxset/index.d.ts b/types/oracle__oraclejet/ojcheckboxset/index.d.ts index afed42d51c..47f2dc44c0 100644 --- a/types/oracle__oraclejet/ojcheckboxset/index.d.ts +++ b/types/oracle__oraclejet/ojcheckboxset/index.d.ts @@ -1,8 +1,12 @@ +import { DataProvider } from '../ojdataprovider'; import { editableValue, editableValueEventMap, editableValueSettableProperties } from '../ojeditablevalue'; import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; -export interface ojCheckboxset extends editableValue { +export interface ojCheckboxset extends editableValue> { disabled: boolean; labelledBy: string | null; + optionRenderer?: ((param0: ojCheckboxset.OptionContext) => Element) | null; + options: DataProvider | null; + optionsKeys?: ojCheckboxset.OptionsKeys; required: boolean; value: any[]; translations: { @@ -12,19 +16,22 @@ export interface ojCheckboxset extends editableValue) => any) | null; - onLabelledByChanged: ((event: JetElementCustomEvent) => any) | null; - onRequiredChanged: ((event: JetElementCustomEvent) => any) | null; - onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onDisabledChanged: ((event: JetElementCustomEvent["disabled"]>) => any) | null; + onLabelledByChanged: ((event: JetElementCustomEvent["labelledBy"]>) => any) | null; + onOptionRendererChanged: ((event: JetElementCustomEvent["optionRenderer"]>) => any) | null; + onOptionsChanged: ((event: JetElementCustomEvent["options"]>) => any) | null; + onOptionsKeysChanged: ((event: JetElementCustomEvent["optionsKeys"]>) => any) | null; + onRequiredChanged: ((event: JetElementCustomEvent["required"]>) => any) | null; + onValueChanged: ((event: JetElementCustomEvent["value"]>) => any) | null; onOjAnimateEnd: ((event: ojCheckboxset.ojAnimateEnd) => any) | null; onOjAnimateStart: ((event: ojCheckboxset.ojAnimateStart) => any) | null; - addEventListener(type: T, listener: (this: HTMLElement, ev: ojCheckboxsetEventMap[T]) => any, useCapture?: boolean): void; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojCheckboxsetEventMap[T]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - getProperty(property: T): ojCheckboxset[T]; + getProperty>(property: T): ojCheckboxset[T]; getProperty(property: string): any; - setProperty(property: T, value: ojCheckboxsetSettableProperties[T]): void; - setProperty(property: T, value: JetSetPropertyType): void; - setProperties(properties: ojCheckboxsetSettablePropertiesLenient): void; + setProperty>(property: T, value: ojCheckboxsetSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojCheckboxsetSettablePropertiesLenient): void; refresh(): void; validate(): Promise; } @@ -42,18 +49,41 @@ export namespace ojCheckboxset { [propName: string]: any; }> { } + // tslint:disable-next-line interface-over-type-literal + type Option = { + disabled?: boolean; + label?: string; + value: any; + }; + // tslint:disable-next-line interface-over-type-literal + type OptionContext = { + component: Element; + index: number; + data: D; + }; + // tslint:disable-next-line interface-over-type-literal + type OptionsKeys = { + label?: string; + value?: string; + }; } -export interface ojCheckboxsetEventMap extends editableValueEventMap { +export interface ojCheckboxsetEventMap extends editableValueEventMap> { 'ojAnimateEnd': ojCheckboxset.ojAnimateEnd; 'ojAnimateStart': ojCheckboxset.ojAnimateStart; - 'disabledChanged': JetElementCustomEvent; - 'labelledByChanged': JetElementCustomEvent; - 'requiredChanged': JetElementCustomEvent; - 'valueChanged': JetElementCustomEvent; + 'disabledChanged': JetElementCustomEvent["disabled"]>; + 'labelledByChanged': JetElementCustomEvent["labelledBy"]>; + 'optionRendererChanged': JetElementCustomEvent["optionRenderer"]>; + 'optionsChanged': JetElementCustomEvent["options"]>; + 'optionsKeysChanged': JetElementCustomEvent["optionsKeys"]>; + 'requiredChanged': JetElementCustomEvent["required"]>; + 'valueChanged': JetElementCustomEvent["value"]>; } -export interface ojCheckboxsetSettableProperties extends editableValueSettableProperties { +export interface ojCheckboxsetSettableProperties extends editableValueSettableProperties { disabled: boolean; labelledBy: string | null; + optionRenderer?: ((param0: ojCheckboxset.OptionContext) => Element) | null; + options: DataProvider | null; + optionsKeys?: ojCheckboxset.OptionsKeys; required: boolean; value: any[]; translations: { @@ -64,6 +94,6 @@ export interface ojCheckboxsetSettableProperties extends editableValueSettablePr }; }; } -export interface ojCheckboxsetSettablePropertiesLenient extends Partial { +export interface ojCheckboxsetSettablePropertiesLenient extends Partial> { [key: string]: any; } diff --git a/types/oracle__oraclejet/ojcontext/index.d.ts b/types/oracle__oraclejet/ojcontext/index.d.ts index 0bb6a856c7..d6590a6682 100644 --- a/types/oracle__oraclejet/ojcontext/index.d.ts +++ b/types/oracle__oraclejet/ojcontext/index.d.ts @@ -1,6 +1,9 @@ declare class BusyContext { addBusyState(options: { - description: object | (() => string); + description: { + toString: () => string; + [propName: string]: any; + } | (() => string) | string; }): (() => void); applicationBootstrapComplete(): undefined; clear(): undefined; @@ -16,7 +19,10 @@ declare class BusyContext { declare namespace Context { interface BusyContext { addBusyState(options: { - description: object | (() => string); + description: { + toString: () => string; + [propName: string]: any; + } | (() => string) | string; }): (() => void); applicationBootstrapComplete(): undefined; clear(): undefined; diff --git a/types/oracle__oraclejet/ojdataprovider/index.d.ts b/types/oracle__oraclejet/ojdataprovider/index.d.ts index accc1f25bc..d05976730f 100644 --- a/types/oracle__oraclejet/ojdataprovider/index.d.ts +++ b/types/oracle__oraclejet/ojdataprovider/index.d.ts @@ -47,6 +47,10 @@ export interface DataProviderOperationEventDetail { keys: Set; metadata?: Array>; } +export interface FetchAttribute { + attributes?: Array; + name: string; +} export interface FetchByKeysCapability { implementation: 'iteration' | 'lookup'; } @@ -56,6 +60,7 @@ export namespace FetchByKeysMixin { }): any; } export interface FetchByKeysParameters { + attributes?: Array; keys: Set; } export interface FetchByKeysResults { @@ -71,6 +76,7 @@ export namespace FetchByOffsetMixin { }): any; } export interface FetchByOffsetParameters extends FetchListParameters { + attributes?: Array; offset: number; } export interface FetchByOffsetResults { @@ -79,6 +85,7 @@ export interface FetchByOffsetResults { results: Array>; } export interface FetchListParameters { + attributes?: Array; filterCriterion?: FilterOperator; size: number; sortCriteria?: Array>; diff --git a/types/oracle__oraclejet/ojdiagram-utils/index.d.ts b/types/oracle__oraclejet/ojdiagram-utils/index.d.ts new file mode 100644 index 0000000000..3cc5e21632 --- /dev/null +++ b/types/oracle__oraclejet/ojdiagram-utils/index.d.ts @@ -0,0 +1,38 @@ +import { DvtDiagramLayoutContext, DvtDiagramLayoutContextNode, DvtDiagramLayoutContextLink } from '../ojdiagram'; +export function getLayout(obj: { + nodes: { + id: any; + x: number; + y: number; + labelLayout: LabelLayout; + }; + links: { + id: any; + path: string; + coordinateSpace: any; + labelLayout: LabelLayout; + }; + nodeDefaults: { + labelLayout: LabelLayout | ((context: DvtDiagramLayoutContext, node: DvtDiagramLayoutContextNode) => LabelLayout); + }; + linkDefaults: { + path: (context: DvtDiagramLayoutContext, link: DvtDiagramLayoutContextLink) => string; + labelLayout: (context: DvtDiagramLayoutContext, link: DvtDiagramLayoutContextLink) => LabelLayout; + }; + viewport: { + x: number; + y: number; + w: number; + h: number; + }; +}): (context: DvtDiagramLayoutContext) => void; +// tslint:disable-next-line interface-over-type-literal +export type LabelLayout = { + x: number; + y: number; + rotationPointX: number; + rotationPointY: number; + angle: number; + halign: string; + valign: string; +}; diff --git a/types/oracle__oraclejet/ojdialog/index.d.ts b/types/oracle__oraclejet/ojdialog/index.d.ts index 42a8569bd4..709081b6de 100644 --- a/types/oracle__oraclejet/ojdialog/index.d.ts +++ b/types/oracle__oraclejet/ojdialog/index.d.ts @@ -1,6 +1,7 @@ import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; export interface ojDialog extends baseComponent { cancelBehavior: 'icon' | 'escape' | 'none'; + dialogTitle: string | null; dragAffordance: 'title-bar' | 'none'; initialVisibility: 'hide' | 'show'; modality: 'modal' | 'modeless'; @@ -11,6 +12,7 @@ export interface ojDialog extends baseComponent { labelCloseIcon?: string; }; onCancelBehaviorChanged: ((event: JetElementCustomEvent) => any) | null; + onDialogTitleChanged: ((event: JetElementCustomEvent) => any) | null; onDragAffordanceChanged: ((event: JetElementCustomEvent) => any) | null; onInitialVisibilityChanged: ((event: JetElementCustomEvent) => any) | null; onModalityChanged: ((event: JetElementCustomEvent) => any) | null; @@ -124,6 +126,7 @@ export interface ojDialogEventMap extends baseComponentEventMap; + 'dialogTitleChanged': JetElementCustomEvent; 'dragAffordanceChanged': JetElementCustomEvent; 'initialVisibilityChanged': JetElementCustomEvent; 'modalityChanged': JetElementCustomEvent; @@ -133,6 +136,7 @@ export interface ojDialogEventMap extends baseComponentEventMap implements DataProvider { + attributes: Array; dataMapping: DataMapping; - from: any; + from: Kin; offset: number; sortCriteria: Array>; constructor(dataProvider: DataProvider, options?: { - from?: object; + from?: Kin; offset?: number; sortCriteria?: Array>; dataMapping?: DataMapping; + attributes?: Array; }); addEventListener(eventType: string, listener: EventListener): void; containsKeys(params: FetchByKeysParameters): Promise>; diff --git a/types/oracle__oraclejet/ojmenu/index.d.ts b/types/oracle__oraclejet/ojmenu/index.d.ts index b6b1c8a9cb..d2b72d9677 100644 --- a/types/oracle__oraclejet/ojmenu/index.d.ts +++ b/types/oracle__oraclejet/ojmenu/index.d.ts @@ -43,6 +43,7 @@ export namespace ojMenu { }> { } interface ojBeforeOpen extends CustomEvent<{ + openOptions: OpenOptions; [propName: string]: any; }> { } diff --git a/types/oracle__oraclejet/ojmessage/index.d.ts b/types/oracle__oraclejet/ojmessage/index.d.ts index 55e905ba8d..47541dd949 100644 --- a/types/oracle__oraclejet/ojmessage/index.d.ts +++ b/types/oracle__oraclejet/ojmessage/index.d.ts @@ -1,5 +1,6 @@ import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; export interface ojMessage extends JetElement { + displayOptions: ojMessage.DisplayOptions; message: ojMessage.Message; translations: { categories?: { @@ -10,6 +11,7 @@ export interface ojMessage extends JetElement { }; labelCloseIcon?: string; }; + onDisplayOptionsChanged: ((event: JetElementCustomEvent) => any) | null; onMessageChanged: ((event: JetElementCustomEvent) => any) | null; onTranslationsChanged: ((event: JetElementCustomEvent) => any) | null; onOjAnimateEnd: ((event: ojMessage.ojAnimateEnd) => any) | null; @@ -39,11 +41,15 @@ export namespace ojMessage { }> { } interface ojClose extends CustomEvent<{ - message: object; + message: Message; [propName: string]: any; }> { } // tslint:disable-next-line interface-over-type-literal + type DisplayOptions = { + category?: 'header' | 'none' | 'auto'; + }; + // tslint:disable-next-line interface-over-type-literal type Message = { icon?: string; category?: string; @@ -60,10 +66,12 @@ export interface ojMessageEventMap extends HTMLElementEventMap { 'ojAnimateEnd': ojMessage.ojAnimateEnd; 'ojAnimateStart': ojMessage.ojAnimateStart; 'ojClose': ojMessage.ojClose; + 'displayOptionsChanged': JetElementCustomEvent; 'messageChanged': JetElementCustomEvent; 'translationsChanged': JetElementCustomEvent; } export interface ojMessageSettableProperties extends JetSettableProperties { + displayOptions: ojMessage.DisplayOptions; message: ojMessage.Message; translations: { categories?: { diff --git a/types/oracle__oraclejet/ojmessages/index.d.ts b/types/oracle__oraclejet/ojmessages/index.d.ts index 0b410266a3..f7d75a2be2 100644 --- a/types/oracle__oraclejet/ojmessages/index.d.ts +++ b/types/oracle__oraclejet/ojmessages/index.d.ts @@ -3,6 +3,7 @@ import { ojMessage } from '../ojmessage'; import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; export interface ojMessages extends JetElement { display: 'general' | 'notification'; + displayOptions: ojMessage.DisplayOptions; messages: ojMessage.Message[] | null | DataProvider; position: ojMessages.Position | null; translations: { @@ -15,6 +16,7 @@ export interface ojMessages extends JetElement { labelLandmark?: string; }; onDisplayChanged: ((event: JetElementCustomEvent) => any) | null; + onDisplayOptionsChanged: ((event: JetElementCustomEvent) => any) | null; onMessagesChanged: ((event: JetElementCustomEvent) => any) | null; onPositionChanged: ((event: JetElementCustomEvent) => any) | null; onTranslationsChanged: ((event: JetElementCustomEvent) => any) | null; @@ -25,17 +27,19 @@ export interface ojMessages extends JetElement { setProperty(property: T, value: ojMessagesSettableProperties[T]): void; setProperty(property: T, value: JetSetPropertyType): void; setProperties(properties: ojMessagesSettablePropertiesLenient): void; - close(associated: object): void; + close(message: ojMessage.Message): void; closeAll(closeFilter?: (message: ojMessage.Message) => boolean): void; } export interface ojMessagesEventMap extends HTMLElementEventMap { 'displayChanged': JetElementCustomEvent; + 'displayOptionsChanged': JetElementCustomEvent; 'messagesChanged': JetElementCustomEvent; 'positionChanged': JetElementCustomEvent; 'translationsChanged': JetElementCustomEvent; } export interface ojMessagesSettableProperties extends JetSettableProperties { display: 'general' | 'notification'; + displayOptions: ojMessage.DisplayOptions; messages: ojMessage.Message[] | null | DataProvider; position: ojMessages.Position | null; translations: { diff --git a/types/oracle__oraclejet/ojmodule-element/index.d.ts b/types/oracle__oraclejet/ojmodule-element/index.d.ts index 693cb518f6..0501e30e26 100644 --- a/types/oracle__oraclejet/ojmodule-element/index.d.ts +++ b/types/oracle__oraclejet/ojmodule-element/index.d.ts @@ -27,9 +27,9 @@ export interface ModuleElementAnimation { export interface ojModule extends JetElement { animation: object; config: { - cleanupMode: 'onDisconnect' | 'none'; + cleanupMode?: 'onDisconnect' | 'none'; view: Node[]; - viewModel: object; + viewModel: object | null; }; onAnimationChanged: ((event: JetElementCustomEvent) => any) | null; onConfigChanged: ((event: JetElementCustomEvent) => any) | null; @@ -79,9 +79,9 @@ export interface ojModuleEventMap extends HTMLElementEventMap { export interface ojModuleSettableProperties extends JetSettableProperties { animation: object; config: { - cleanupMode: 'onDisconnect' | 'none'; + cleanupMode?: 'onDisconnect' | 'none'; view: Node[]; - viewModel: object; + viewModel: object | null; }; } export interface ojModuleSettablePropertiesLenient extends Partial { diff --git a/types/oracle__oraclejet/ojoffcanvas/index.d.ts b/types/oracle__oraclejet/ojoffcanvas/index.d.ts new file mode 100644 index 0000000000..7f099aea33 --- /dev/null +++ b/types/oracle__oraclejet/ojoffcanvas/index.d.ts @@ -0,0 +1,29 @@ +export function close(offcanvas: { + selector: string; +}): Promise; +export function open(offcanvas: { + selector: string; + content: string; + edge?: 'start' | 'end' | 'top' | 'bottom'; + displayMode?: 'push' | 'overlay'; + autoDismiss?: 'focusLoss' | 'none'; + size?: string; + modality?: 'modal' | 'modeless'; +}): Promise; +export function setupResponsive(offcanvas: { + selector: string; + edge?: 'start' | 'end' | 'top' | 'bottom'; + query: string | null; +}): void; +export function tearDownResponsive(offcanvas: { + selector: string; +}): void; +export function toggle(offcanvas: { + selector: string; + content: string; + edge?: 'start' | 'end' | 'top' | 'bottom'; + displayMode?: 'push' | 'overlay'; + autoDismiss?: 'focusLoss' | 'none'; + size?: string; + modality?: 'modal' | 'modeless'; +}): Promise; diff --git a/types/oracle__oraclejet/ojradioset/index.d.ts b/types/oracle__oraclejet/ojradioset/index.d.ts index 4b910c22fd..0860018f9d 100644 --- a/types/oracle__oraclejet/ojradioset/index.d.ts +++ b/types/oracle__oraclejet/ojradioset/index.d.ts @@ -1,8 +1,12 @@ +import { DataProvider } from '../ojdataprovider'; import { editableValue, editableValueEventMap, editableValueSettableProperties } from '../ojeditablevalue'; import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; -export interface ojRadioset extends editableValue { +export interface ojRadioset extends editableValue> { disabled: boolean; labelledBy: string | null; + optionRenderer?: ((param0: ojRadioset.OptionContext) => Element) | null; + options: DataProvider | null; + optionsKeys?: ojRadioset.OptionsKeys; required: boolean; value: any; translations: { @@ -12,19 +16,22 @@ export interface ojRadioset extends editableValue) => any) | null; - onLabelledByChanged: ((event: JetElementCustomEvent) => any) | null; - onRequiredChanged: ((event: JetElementCustomEvent) => any) | null; - onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onDisabledChanged: ((event: JetElementCustomEvent["disabled"]>) => any) | null; + onLabelledByChanged: ((event: JetElementCustomEvent["labelledBy"]>) => any) | null; + onOptionRendererChanged: ((event: JetElementCustomEvent["optionRenderer"]>) => any) | null; + onOptionsChanged: ((event: JetElementCustomEvent["options"]>) => any) | null; + onOptionsKeysChanged: ((event: JetElementCustomEvent["optionsKeys"]>) => any) | null; + onRequiredChanged: ((event: JetElementCustomEvent["required"]>) => any) | null; + onValueChanged: ((event: JetElementCustomEvent["value"]>) => any) | null; onOjAnimateEnd: ((event: ojRadioset.ojAnimateEnd) => any) | null; onOjAnimateStart: ((event: ojRadioset.ojAnimateStart) => any) | null; - addEventListener(type: T, listener: (this: HTMLElement, ev: ojRadiosetEventMap[T]) => any, useCapture?: boolean): void; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojRadiosetEventMap[T]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - getProperty(property: T): ojRadioset[T]; + getProperty>(property: T): ojRadioset[T]; getProperty(property: string): any; - setProperty(property: T, value: ojRadiosetSettableProperties[T]): void; - setProperty(property: T, value: JetSetPropertyType): void; - setProperties(properties: ojRadiosetSettablePropertiesLenient): void; + setProperty>(property: T, value: ojRadiosetSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojRadiosetSettablePropertiesLenient): void; refresh(): void; validate(): Promise; } @@ -42,18 +49,41 @@ export namespace ojRadioset { [propName: string]: any; }> { } + // tslint:disable-next-line interface-over-type-literal + type Option = { + disabled?: boolean; + label?: string; + value: any; + }; + // tslint:disable-next-line interface-over-type-literal + type OptionContext = { + component: Element; + index: number; + data: D; + }; + // tslint:disable-next-line interface-over-type-literal + type OptionsKeys = { + label?: string; + value?: string; + }; } -export interface ojRadiosetEventMap extends editableValueEventMap { +export interface ojRadiosetEventMap extends editableValueEventMap> { 'ojAnimateEnd': ojRadioset.ojAnimateEnd; 'ojAnimateStart': ojRadioset.ojAnimateStart; - 'disabledChanged': JetElementCustomEvent; - 'labelledByChanged': JetElementCustomEvent; - 'requiredChanged': JetElementCustomEvent; - 'valueChanged': JetElementCustomEvent; + 'disabledChanged': JetElementCustomEvent["disabled"]>; + 'labelledByChanged': JetElementCustomEvent["labelledBy"]>; + 'optionRendererChanged': JetElementCustomEvent["optionRenderer"]>; + 'optionsChanged': JetElementCustomEvent["options"]>; + 'optionsKeysChanged': JetElementCustomEvent["optionsKeys"]>; + 'requiredChanged': JetElementCustomEvent["required"]>; + 'valueChanged': JetElementCustomEvent["value"]>; } -export interface ojRadiosetSettableProperties extends editableValueSettableProperties { +export interface ojRadiosetSettableProperties extends editableValueSettableProperties { disabled: boolean; labelledBy: string | null; + optionRenderer?: ((param0: ojRadioset.OptionContext) => Element) | null; + options: DataProvider | null; + optionsKeys?: ojRadioset.OptionsKeys; required: boolean; value: any; translations: { @@ -64,6 +94,6 @@ export interface ojRadiosetSettableProperties extends editableValueSettablePrope }; }; } -export interface ojRadiosetSettablePropertiesLenient extends Partial { +export interface ojRadiosetSettablePropertiesLenient extends Partial> { [key: string]: any; } diff --git a/types/oracle__oraclejet/ojselectcombobox/index.d.ts b/types/oracle__oraclejet/ojselectcombobox/index.d.ts index 2444c99c4c..2775d8a22a 100644 --- a/types/oracle__oraclejet/ojselectcombobox/index.d.ts +++ b/types/oracle__oraclejet/ojselectcombobox/index.d.ts @@ -74,9 +74,7 @@ export interface ojComboboxMany extends ojCombobox>; converter: Converter | Validation.RegisteredConverter | null; minLength: number; - optionRenderer?: ((param0: ojCombobox.OptionContext) => { - insert: Element; - } | undefined) | null; + optionRenderer?: ((param0: ojCombobox.OptionContext) => Element) | null; options: Array | DataProvider | null; optionsKeys: { childKeys: { @@ -95,6 +93,7 @@ export interface ojComboboxMany extends ojCombobox | Validation.RegisteredValidator> | null; value: any[] | null; @@ -120,6 +119,7 @@ export interface ojComboboxMany extends ojCombobox["pickerAttributes"]>) => any) | null; onPlaceholderChanged: ((event: JetElementCustomEvent["placeholder"]>) => any) | null; onRawValueChanged: ((event: JetElementCustomEvent["rawValue"]>) => any) | null; + onReadOnlyChanged: ((event: JetElementCustomEvent["readOnly"]>) => any) | null; onRequiredChanged: ((event: JetElementCustomEvent["required"]>) => any) | null; onValidatorsChanged: ((event: JetElementCustomEvent["validators"]>) => any) | null; onValueChanged: ((event: JetElementCustomEvent["value"]>) => any) | null; @@ -161,6 +161,7 @@ export interface ojComboboxManyEventMap extends ojComboboxEventMap["pickerAttributes"]>; 'placeholderChanged': JetElementCustomEvent["placeholder"]>; 'rawValueChanged': JetElementCustomEvent["rawValue"]>; + 'readOnlyChanged': JetElementCustomEvent["readOnly"]>; 'requiredChanged': JetElementCustomEvent["required"]>; 'validatorsChanged': JetElementCustomEvent["validators"]>; 'valueChanged': JetElementCustomEvent["value"]>; @@ -170,9 +171,7 @@ export interface ojComboboxManySettableProperties extends ojComboboxSettab asyncValidators: Array>; converter: Converter | Validation.RegisteredConverter | null; minLength: number; - optionRenderer?: ((param0: ojCombobox.OptionContext) => { - insert: Element; - } | undefined) | null; + optionRenderer?: ((param0: ojCombobox.OptionContext) => Element) | null; options: Array | DataProvider | null; optionsKeys: { childKeys: { @@ -191,6 +190,7 @@ export interface ojComboboxManySettableProperties extends ojComboboxSettab }; placeholder: string | null; readonly rawValue: string | null; + readOnly: boolean; required: boolean; validators: Array | Validation.RegisteredValidator> | null; value: any[] | null; @@ -216,9 +216,7 @@ export interface ojComboboxOne extends ojCombobox | Validation.RegisteredConverter | null; filterOnOpen: 'none' | 'rawValue'; minLength: number; - optionRenderer?: ((param0: ojCombobox.OptionContext) => { - insert: Element; - } | undefined) | null; + optionRenderer?: ((param0: ojCombobox.OptionContext) => Element) | null; options: Array | DataProvider | null; optionsKeys: { childKeys: { @@ -237,6 +235,7 @@ export interface ojComboboxOne extends ojCombobox | Validation.RegisteredValidator> | null; value: any; @@ -263,6 +262,7 @@ export interface ojComboboxOne extends ojCombobox["pickerAttributes"]>) => any) | null; onPlaceholderChanged: ((event: JetElementCustomEvent["placeholder"]>) => any) | null; onRawValueChanged: ((event: JetElementCustomEvent["rawValue"]>) => any) | null; + onReadOnlyChanged: ((event: JetElementCustomEvent["readOnly"]>) => any) | null; onRequiredChanged: ((event: JetElementCustomEvent["required"]>) => any) | null; onValidatorsChanged: ((event: JetElementCustomEvent["validators"]>) => any) | null; onValueChanged: ((event: JetElementCustomEvent["value"]>) => any) | null; @@ -313,6 +313,7 @@ export interface ojComboboxOneEventMap extends ojComboboxEventMap["pickerAttributes"]>; 'placeholderChanged': JetElementCustomEvent["placeholder"]>; 'rawValueChanged': JetElementCustomEvent["rawValue"]>; + 'readOnlyChanged': JetElementCustomEvent["readOnly"]>; 'requiredChanged': JetElementCustomEvent["required"]>; 'validatorsChanged': JetElementCustomEvent["validators"]>; 'valueChanged': JetElementCustomEvent["value"]>; @@ -323,9 +324,7 @@ export interface ojComboboxOneSettableProperties extends ojComboboxSettabl converter: Converter | Validation.RegisteredConverter | null; filterOnOpen: 'none' | 'rawValue'; minLength: number; - optionRenderer?: ((param0: ojCombobox.OptionContext) => { - insert: Element; - } | undefined) | null; + optionRenderer?: ((param0: ojCombobox.OptionContext) => Element) | null; options: Array | DataProvider | null; optionsKeys: { childKeys: { @@ -344,6 +343,7 @@ export interface ojComboboxOneSettableProperties extends ojComboboxSettabl }; placeholder: string | null; readonly rawValue: string | null; + readOnly: boolean; required: boolean; validators: Array | Validation.RegisteredValidator> | null; value: any; @@ -434,9 +434,7 @@ export interface ojSelectSettablePropertiesLenient extends Partial extends ojSelect> { minimumResultsForSearch: number; - optionRenderer?: ((param0: ojSelect.OptionContext) => { - insert: Element; - } | undefined) | null; + optionRenderer?: ((param0: ojSelect.OptionContext) => Element) | null; options: Array | DataProvider | null; optionsKeys: { childKeys?: { @@ -454,6 +452,7 @@ export interface ojSelectMany extends ojSelect extends ojSelect["optionsKeys"]>) => any) | null; onPickerAttributesChanged: ((event: JetElementCustomEvent["pickerAttributes"]>) => any) | null; onPlaceholderChanged: ((event: JetElementCustomEvent["placeholder"]>) => any) | null; + onReadOnlyChanged: ((event: JetElementCustomEvent["readOnly"]>) => any) | null; onRenderModeChanged: ((event: JetElementCustomEvent["renderMode"]>) => any) | null; onRequiredChanged: ((event: JetElementCustomEvent["required"]>) => any) | null; onValueChanged: ((event: JetElementCustomEvent["value"]>) => any) | null; @@ -517,6 +517,7 @@ export interface ojSelectManyEventMap extends ojSelectEventMap["optionsKeys"]>; 'pickerAttributesChanged': JetElementCustomEvent["pickerAttributes"]>; 'placeholderChanged': JetElementCustomEvent["placeholder"]>; + 'readOnlyChanged': JetElementCustomEvent["readOnly"]>; 'renderModeChanged': JetElementCustomEvent["renderMode"]>; 'requiredChanged': JetElementCustomEvent["required"]>; 'valueChanged': JetElementCustomEvent["value"]>; @@ -524,9 +525,7 @@ export interface ojSelectManyEventMap extends ojSelectEventMap extends ojSelectSettableProperties { minimumResultsForSearch: number; - optionRenderer?: ((param0: ojSelect.OptionContext) => { - insert: Element; - } | undefined) | null; + optionRenderer?: ((param0: ojSelect.OptionContext) => Element) | null; options: Array | DataProvider | null; optionsKeys: { childKeys?: { @@ -544,6 +543,7 @@ export interface ojSelectManySettableProperties extends ojSelectSettablePr class?: string; }; placeholder: string | null; + readOnly: boolean; renderMode: 'jet' | 'native'; required: boolean; value: any[] | null; @@ -569,9 +569,7 @@ export interface ojSelectManySettablePropertiesLenient extends Partial extends ojSelect> { minimumResultsForSearch: number; - optionRenderer?: ((param0: ojSelect.OptionContext) => { - insert: Element; - } | undefined) | null; + optionRenderer?: ((param0: ojSelect.OptionContext) => Element) | null; options: Array | DataProvider | null; optionsKeys: { childKeys?: { @@ -589,6 +587,7 @@ export interface ojSelectOne extends ojSelect extends ojSelect["optionsKeys"]>) => any) | null; onPickerAttributesChanged: ((event: JetElementCustomEvent["pickerAttributes"]>) => any) | null; onPlaceholderChanged: ((event: JetElementCustomEvent["placeholder"]>) => any) | null; + onReadOnlyChanged: ((event: JetElementCustomEvent["readOnly"]>) => any) | null; onRenderModeChanged: ((event: JetElementCustomEvent["renderMode"]>) => any) | null; onRequiredChanged: ((event: JetElementCustomEvent["required"]>) => any) | null; onValueChanged: ((event: JetElementCustomEvent["value"]>) => any) | null; @@ -652,6 +652,7 @@ export interface ojSelectOneEventMap extends ojSelectEventMap["optionsKeys"]>; 'pickerAttributesChanged': JetElementCustomEvent["pickerAttributes"]>; 'placeholderChanged': JetElementCustomEvent["placeholder"]>; + 'readOnlyChanged': JetElementCustomEvent["readOnly"]>; 'renderModeChanged': JetElementCustomEvent["renderMode"]>; 'requiredChanged': JetElementCustomEvent["required"]>; 'valueChanged': JetElementCustomEvent["value"]>; @@ -659,9 +660,7 @@ export interface ojSelectOneEventMap extends ojSelectEventMap extends ojSelectSettableProperties { minimumResultsForSearch: number; - optionRenderer?: ((param0: ojSelect.OptionContext) => { - insert: Element; - } | undefined) | null; + optionRenderer?: ((param0: ojSelect.OptionContext) => Element) | null; options: Array | DataProvider | null; optionsKeys: { childKeys?: { @@ -679,6 +678,7 @@ export interface ojSelectOneSettableProperties extends ojSelectSettablePro class?: string; }; placeholder: string | null; + readOnly: boolean; renderMode: 'jet' | 'native'; required: boolean; value: any; diff --git a/types/oracle__oraclejet/ojthematicmap/index.d.ts b/types/oracle__oraclejet/ojthematicmap/index.d.ts index 45bbd3b907..830db16e8e 100644 --- a/types/oracle__oraclejet/ojthematicmap/index.d.ts +++ b/types/oracle__oraclejet/ojthematicmap/index.d.ts @@ -78,7 +78,6 @@ export interface ojThematicMap extends dvtBaseComponent< touchResponse: 'touchStart' | 'auto'; zooming: 'auto' | 'none'; translations: { - areasRegion?: string; componentName?: string; labelAndValue?: string; labelClearSelection?: string; @@ -86,8 +85,6 @@ export interface ojThematicMap extends dvtBaseComponent< labelDataVisualization?: string; labelInvalidData?: string; labelNoData?: string; - linksRegion?: string; - markersRegion?: string; stateCollapsed?: string; stateDrillable?: string; stateExpanded?: string; @@ -249,7 +246,6 @@ export interface ojThematicMapSettableProperties extends touchResponse: 'touchStart' | 'auto'; zooming: 'auto' | 'none'; translations: { - areasRegion?: string; componentName?: string; labelAndValue?: string; labelClearSelection?: string; @@ -257,8 +253,6 @@ export interface ojThematicMapSettableProperties extends labelDataVisualization?: string; labelInvalidData?: string; labelNoData?: string; - linksRegion?: string; - markersRegion?: string; stateCollapsed?: string; stateDrillable?: string; stateExpanded?: string; diff --git a/types/oracle__oraclejet/ojvalidation-base/index.d.ts b/types/oracle__oraclejet/ojvalidation-base/index.d.ts index 83a20555db..af2aad5ed5 100644 --- a/types/oracle__oraclejet/ojvalidation-base/index.d.ts +++ b/types/oracle__oraclejet/ojvalidation-base/index.d.ts @@ -1,7 +1,7 @@ import Message = require('../ojmessaging'); import Color = require('../ojcolor'); export interface AsyncValidator { - hint: Promise; + hint: Promise<(string | null)>; validate(value: V): Promise; } export class ColorConverter implements Converter { diff --git a/types/oracle__oraclejet/ojvalidation-number/index.d.ts b/types/oracle__oraclejet/ojvalidation-number/index.d.ts index 09addc6522..7184d33135 100644 --- a/types/oracle__oraclejet/ojvalidation-number/index.d.ts +++ b/types/oracle__oraclejet/ojvalidation-number/index.d.ts @@ -23,9 +23,14 @@ export namespace IntlNumberConverter { pattern?: string; roundingMode?: 'HALF_UP' | 'HALF_DOWN' | 'HALF_EVEN'; roundDuringParse?: boolean; - separators?: object; + separators?: Separators; lenientParse?: 'full' | 'none'; }; + // tslint:disable-next-line interface-over-type-literal + type Separators = { + decimal?: string; + group?: string; + }; } export class NumberConverter implements Converter { format(value: number): string | null; diff --git a/types/oracle__oraclejet/tsconfig.json b/types/oracle__oraclejet/tsconfig.json index 5f529007f8..be741c3fe7 100644 --- a/types/oracle__oraclejet/tsconfig.json +++ b/types/oracle__oraclejet/tsconfig.json @@ -52,6 +52,7 @@ "ojdefer/index.d.ts", "ojdeferreddataprovider/index.d.ts", "ojdiagram/index.d.ts", + "ojdiagram-utils/index.d.ts", "ojdialog/index.d.ts", "ojdvt-base/index.d.ts", "ojeditablevalue/index.d.ts", @@ -87,6 +88,7 @@ "ojmoduleanimations/index.d.ts", "ojnavigationlist/index.d.ts", "ojnbox/index.d.ts", + "ojoffcanvas/index.d.ts", "ojoptgroup/index.d.ts", "ojoption/index.d.ts", "ojpictochart/index.d.ts", From 871ed4521f35be1d8688eed84e1a4ee15cbea094 Mon Sep 17 00:00:00 2001 From: wujingtao <601595686@qq.com> Date: Tue, 15 Jan 2019 11:31:45 +0800 Subject: [PATCH 145/160] revision the module import statement --- types/pidusage/pidusage-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/pidusage/pidusage-tests.ts b/types/pidusage/pidusage-tests.ts index 8c3d99e194..faa2b30c0c 100644 --- a/types/pidusage/pidusage-tests.ts +++ b/types/pidusage/pidusage-tests.ts @@ -1,4 +1,4 @@ -import * as pidusage from 'pidusage'; +import pidusage = require('pidusage'); let cpu: number; let memory: number; From 1eb78d0ec99051bbde9a1f022fce55fc269ab17f Mon Sep 17 00:00:00 2001 From: AlbertGao Date: Tue, 15 Jan 2019 16:53:27 +1300 Subject: [PATCH 146/160] Update index.d.ts The current `any` of `style()` can't pass the `no-unsafe-any` TSLint rule. --- types/styled-system/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/styled-system/index.d.ts b/types/styled-system/index.d.ts index 495df8a6d3..ca2f7ce1fc 100644 --- a/types/styled-system/index.d.ts +++ b/types/styled-system/index.d.ts @@ -40,7 +40,7 @@ export interface LowLevelStylefunctionArguments { scale?: Array; } -export function style(args: LowLevelStylefunctionArguments): any; +export function style(args: LowLevelStylefunctionArguments): {[cssProp: string]: string}; export type TLengthStyledSystem = string | 0 | number; export type ResponsiveValue = T | Array; From 601fba5e54d2796cc07b0bbba39aa3ab71416026 Mon Sep 17 00:00:00 2001 From: Philip Peitsch Date: Tue, 15 Jan 2019 18:37:20 +1100 Subject: [PATCH 147/160] Combine related overloads using optional parameters --- .../cordova-plugin-ble-central-tests.ts | 38 ++++++++++-- types/cordova-plugin-ble-central/index.d.ts | 58 +++++-------------- 2 files changed, 49 insertions(+), 47 deletions(-) diff --git a/types/cordova-plugin-ble-central/cordova-plugin-ble-central-tests.ts b/types/cordova-plugin-ble-central/cordova-plugin-ble-central-tests.ts index 41bcf59865..f7830c18b2 100644 --- a/types/cordova-plugin-ble-central/cordova-plugin-ble-central-tests.ts +++ b/types/cordova-plugin-ble-central/cordova-plugin-ble-central-tests.ts @@ -61,6 +61,7 @@ var demoExtendedData : BLECentralPlugin.PeripheralDataExtended = { //get updates about the bluethooth states ble.startStateNotifications((state) => log(`BLE state ${state}`)); +ble.startStateNotifications((state) => log(`BLE state ${state}`), (err: string) => log(`things when wrong ${err}`)); ble.isEnabled(()=> log(`bluetooth is enabled`), err =>log(`bluetooth is not enabled: ${err}`)); @@ -71,21 +72,28 @@ ble.showBluetoothSettings(() => log(`yes it worked`), () => log(`nope it didn't //stop getting updates about the bluethooth states ble.stopStateNotifications() +ble.stopStateNotifications(() => log(`yes it worked`)) +ble.stopStateNotifications(() => log(`yes it worked`), () => log(`nope it didn't work`)) //scan 5 seconds +ble.scan([], 5000, (data) => { devices.push(data); }); ble.scan([], 5000, (data) => { devices.push(data); }, () => log(`couldn't connect`) ); ble.scan([], 5000, (data) => { devices.push(data); }, err => log(`couldn't connect: ${err}`) ); //scan continously -ble.startScan([], (data) => { devices.push(data); }, ()=> log('couldn\'t connect') ) +ble.startScan([], (data) => { devices.push(data); }) +ble.startScan([], (data) => { devices.push(data); }, () => log('couldn\'t connect') ) +ble.startScan([], (data) => { devices.push(data); }, err => log(`couldn't connect: ${err}`) ); ////scan continously -ble.startScanWithOptions([], {reportDuplicates:false }, (data) => { devices.push(data); }, err => log(`couldn't connect: ${err}`) ) +ble.startScanWithOptions([], {reportDuplicates:false }, (data) => { devices.push(data); }); +ble.startScanWithOptions([], {reportDuplicates:false }, (data) => { devices.push(data); }, err => log(`couldn't connect: ${err}`)); //stop scanning ble.stopScan(()=> log('all good'), ()=> log('couldn\'t stop scanning')); //are we conenected to that device? +ble.isConnected(demoDevice.id, () => log(`already connected to this device`)); ble.isConnected(demoDevice.id, () => log(`already connected to this device`), ()=> log(`not yet connected to that device`)); //connect to a specific device @@ -94,28 +102,48 @@ ble.connect(demoDevice.id, (data)=> extendedData = data, err => log(`couldn't co //read some data from a characteristic var charsOfOneOfItsServices = demoExtendedData.characteristics.filter((value) => value.service == demoExtendedData.services[0]); +ble.read(demoDevice.id, charsOfOneOfItsServices[0].service, charsOfOneOfItsServices[0].characteristic); ble.read(demoDevice.id, charsOfOneOfItsServices[0].service, charsOfOneOfItsServices[0].characteristic, (data) => log(`we've received some data`), ()=> log(`couldn't read any data`)); //read the rssi +ble.readRSSI(demoDevice.id, (rssi)=>log(`Device ${demoDevice.name} has an RSSI of ${rssi}`)); ble.readRSSI(demoDevice.id, (rssi)=>log(`Device ${demoDevice.name} has an RSSI of ${rssi}`), err => log(`Unable to read RSSI: ${err}`)); + +// request mtu +ble.requestMtu(demoDevice.id, 10); +ble.requestMtu(demoDevice.id, 10, () => log('it worked')); +ble.requestMtu(demoDevice.id, 10, () => log('it worked'), () => log('it failed')); + +// refreshDeviceCache +ble.refreshDeviceCache(demoDevice.id, 10); +ble.refreshDeviceCache(demoDevice.id, 10, () => log('it worked')); +ble.refreshDeviceCache(demoDevice.id, 10, () => log('it worked'), () => log('it failed')); + var notificationsReceived : number = 0; //get notified of changes for that characteristic +ble.startNotification(demoDevice.id, charsOfOneOfItsServices[0].service, charsOfOneOfItsServices[0].characteristic, + (data)=> notificationsReceived++); ble.startNotification(demoDevice.id, charsOfOneOfItsServices[0].service, charsOfOneOfItsServices[0].characteristic, (data)=> notificationsReceived++, err => log(`darn: ${err}`)); //write some data +ble.write(demoDevice.id, charsOfOneOfItsServices[0].service, charsOfOneOfItsServices[0].characteristic, new ArrayBuffer(40)); +ble.write(demoDevice.id, charsOfOneOfItsServices[0].service, charsOfOneOfItsServices[0].characteristic, new ArrayBuffer(40), ()=> log(`all good`)); ble.write(demoDevice.id, charsOfOneOfItsServices[0].service, charsOfOneOfItsServices[0].characteristic, new ArrayBuffer(40), ()=> log(`all good`), ()=> log(`could't write`)); //write some data without getting notified +ble.writeWithoutResponse(demoDevice.id, charsOfOneOfItsServices[0].service, charsOfOneOfItsServices[0].characteristic, new ArrayBuffer(40)); +ble.writeWithoutResponse(demoDevice.id, charsOfOneOfItsServices[0].service, charsOfOneOfItsServices[0].characteristic, new ArrayBuffer(40), ()=> log(`all good`)); ble.writeWithoutResponse(demoDevice.id, charsOfOneOfItsServices[0].service, charsOfOneOfItsServices[0].characteristic, new ArrayBuffer(40), ()=> log(`all good`), ()=> log(`could't write`)); //stop getting notified of changes. ble.stopNotification(demoDevice.id, charsOfOneOfItsServices[0].service, charsOfOneOfItsServices[0].characteristic); +ble.stopNotification(demoDevice.id, charsOfOneOfItsServices[0].service, charsOfOneOfItsServices[0].characteristic, () => log('it worked')); +ble.stopNotification(demoDevice.id, charsOfOneOfItsServices[0].service, charsOfOneOfItsServices[0].characteristic, () => log('it worked'), () => log('it failed')); //notificationsReceived == 1 //just disconnect ble.disconnect(demoDevice.id); - - - +ble.disconnect(demoDevice.id, () => log('it worked')); +ble.disconnect(demoDevice.id, () => log('it worked'), () => log('it failed')); diff --git a/types/cordova-plugin-ble-central/index.d.ts b/types/cordova-plugin-ble-central/index.d.ts index 0beb5d25e5..070b62ff9e 100644 --- a/types/cordova-plugin-ble-central/index.d.ts +++ b/types/cordova-plugin-ble-central/index.d.ts @@ -40,18 +40,14 @@ declare namespace BLECentralPlugin { } export interface BLECentralPluginStatic { - scan(services: string[], seconds: number, success : (data: PeripheralData) => any): void; - scan(services: string[], seconds: number, success : (data: PeripheralData) => any, failure : (error: string) => any): void; + scan(services: string[], seconds: number, success : (data: PeripheralData) => any, failure? : (error: string) => any): void; - startScan(services: string[], success: (data: PeripheralData) => any): void; - startScan(services: string[], success: (data: PeripheralData) => any, failure: (error: string|BLEError) => any): void; + startScan(services: string[], success: (data: PeripheralData) => any, failure?: (error: string|BLEError) => any): void; - startScanWithOptions(services: string[], options: StartScanOptions, success: (data: PeripheralData) => any): void; - startScanWithOptions(services: string[], options: StartScanOptions, success: (data: PeripheralData) => any, failure: (error: string) => any): void; + startScanWithOptions(services: string[], options: StartScanOptions, success: (data: PeripheralData) => any, failure?: (error: string) => any): void; stopScan(): void; - stopScan(success: () => any): void; - stopScan(success: () => any, failure: () => any): void; + stopScan(success: () => any, failure?: () => any): void; connect(device_id:string, success: (data: PeripheralDataExtended) => any, failure: (error: string|BLEError) => any): void; @@ -60,71 +56,49 @@ declare namespace BLECentralPlugin { [Android] this relies on the autoConnect argument of BluetoothDevice.connectGatt(). Not all Android devices implement this feature correctly. */ autoConnect(device_id:string, success: (data: PeripheralDataExtended) => any, failure: (error: string|BLEError) => any): void; - disconnect(device_id:string): void; - disconnect(device_id:string, success: () => any): void; - disconnect(device_id:string, success: () => any, failure: (error: string|BLEError) => any): void; + disconnect(device_id:string, success?: () => any, failure?: (error: string|BLEError) => any): void; - read(device_id: string, service_uuid:string, characteristic_uuid:string): void; - read(device_id: string, service_uuid:string, characteristic_uuid:string, success: (rawData: ArrayBuffer) => any): void; - read(device_id: string, service_uuid:string, characteristic_uuid:string, success: (rawData: ArrayBuffer) => any, failure: (error: string|BLEError) => any): void; + read(device_id: string, service_uuid:string, characteristic_uuid:string, success?: (rawData: ArrayBuffer) => any, failure?: (error: string|BLEError) => any): void; - write(device_id: string, service_uuid:string, characteristic_uuid:string, data: ArrayBuffer): void; - write(device_id: string, service_uuid:string, characteristic_uuid:string, data: ArrayBuffer, success : () => any): void; - write(device_id: string, service_uuid:string, characteristic_uuid:string, data: ArrayBuffer, success : () => any, failure: (error: string|BLEError) => any): void; + write(device_id: string, service_uuid:string, characteristic_uuid:string, data: ArrayBuffer, success?: () => any, failure?: (error: string|BLEError) => any): void; /* Writes data to a characteristic without a response from the peripheral. You are not notified if the write fails in the BLE stack. The success callback is be called when the characteristic is written.*/ - writeWithoutResponse(device_id: string, service_uuid:string, characteristic_uuid:string, data: ArrayBuffer): void; - writeWithoutResponse(device_id: string, service_uuid:string, characteristic_uuid:string, data: ArrayBuffer, success : () => any): void; - writeWithoutResponse(device_id: string, service_uuid:string, characteristic_uuid:string, data: ArrayBuffer, success : () => any, failure: (error: string) => any): void; + writeWithoutResponse(device_id: string, service_uuid:string, characteristic_uuid:string, data: ArrayBuffer, success?: () => any, failure?: (error: string) => any): void; /* Register to be notified when the value of a characteristic changes. */ - startNotification(device_id: string, service_uuid:string, characteristic_uuid:string, success: (rawData: ArrayBuffer) => any): void; - startNotification(device_id: string, service_uuid:string, characteristic_uuid:string, success: (rawData: ArrayBuffer) => any, failure: (error: string|BLEError) => any): void; + startNotification(device_id: string, service_uuid:string, characteristic_uuid:string, success: (rawData: ArrayBuffer) => any, failure?: (error: string|BLEError) => any): void; - stopNotification(device_id: string, service_uuid:string, characteristic_uuid:string): void; - stopNotification(device_id: string, service_uuid:string, characteristic_uuid:string, success: () => any): void; - stopNotification(device_id: string, service_uuid:string, characteristic_uuid:string, success: () => any, failure: (error: string|BLEError) => any): void; + stopNotification(device_id: string, service_uuid:string, characteristic_uuid:string, success?: () => any, failure?: (error: string|BLEError) => any): void; /* Reports if bluetooth is enabled. */ isEnabled(success: () => any , failure: (error: string) => any): void; /* Calls the success callback when the peripheral is connected and the failure callback when not connected. */ - isConnected(device_id: string, success: () => any): void; - isConnected(device_id: string, success: () => any, failure: (error: string) => any): void; + isConnected(device_id: string, success: () => any, failure?: (error: string) => any): void; /* May be used to request (on Android) a larger MTU size to be able to send more data at once [iOS] requestMtu is not supported on iOS. */ - requestMtu(device_id: string, mtu: number): void; - requestMtu(device_id: string, mtu: number, success: () => any): void; - requestMtu(device_id: string, mtu: number, success: () => any, failure: () => any): void; + requestMtu(device_id: string, mtu: number, success?: () => any, failure?: () => any): void; /* Clears cached services and characteristics info for some poorly behaved devices. Uses an undocumented API, so it is not guaranteed to work. [iOS] refreshDeviceCache is not supported on iOS. */ - refreshDeviceCache(device_id: string, timeout_millis: number): void; - refreshDeviceCache(device_id: string, timeout_millis: number, success: (data: PeripheralDataExtended) => any): void; - refreshDeviceCache(device_id: string, timeout_millis: number, success: (data: PeripheralDataExtended) => any, failure: (error: string|BLEError) => any): void; + refreshDeviceCache(device_id: string, timeout_millis: number, success?: (data: PeripheralDataExtended) => any, failure?: (error: string|BLEError) => any): void; - startStateNotifications(success: (state: string) => any): void; - startStateNotifications(success: (state: string) => any, failure: (error: string) => any): void; + startStateNotifications(success: (state: string) => any, failure?: (error: string) => any): void; - stopStateNotifications(): void; - stopStateNotifications(success: () => any): void; - stopStateNotifications(success: () => any, failure: () => any): void; + stopStateNotifications(success?: () => any, failure?: () => any): void; /* Opens the Bluetooth settings for the operating systems. [iOS] showBluetoothSettings is not supported on iOS. */ - showBluetoothSettings(): void; - showBluetoothSettings(success: () => any): void; showBluetoothSettings(success: () => any, failure: () => any): void; /* Enable Bluetooth on the device. [iOS] enable is not supported on iOS. */ enable(success: () => any, failure: (error: string) => any): void; - readRSSI(device_id:string, success: (rssi: number) => any): void; - readRSSI(device_id:string, success: (rssi: number) => any, failure: (error: string) => any): void; + readRSSI(device_id:string, success: (rssi: number) => any, failure?: (error: string) => any): void; /* Find connected peripherals offering the listed service UUIDs. This function wraps CBCentralManager.retrieveConnectedPeripheralsWithServices. From 108d9a760363a6a302705aa5e93551eb5e47750c Mon Sep 17 00:00:00 2001 From: Manduro Date: Tue, 15 Jan 2019 09:19:32 +0100 Subject: [PATCH 148/160] [react-native] Initial URL can be null as already documented in the type comment Also documented at http://facebook.github.io/react-native/docs/linking#getinitialurl --- types/react-native/index.d.ts | 4 ++-- types/react-native/test/index.tsx | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index cbc45eb065..0361934bf0 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -7315,7 +7315,7 @@ export interface IntentAndroidStatic { @deprecated */ - getInitialURL(callback: (url: string) => void): void; + getInitialURL(callback: (url: string | null) => void): void; } export interface LinkingStatic extends NativeEventEmitter { @@ -7350,7 +7350,7 @@ export interface LinkingStatic extends NativeEventEmitter { * If the app launch was triggered by an app link with, it will give the link url, otherwise it will give null * NOTE: To support deep linking on Android, refer http://developer.android.com/training/app-indexing/deep-linking.html#handling-intents */ - getInitialURL(): Promise; + getInitialURL(): Promise; } export interface LinkingIOSStatic { diff --git a/types/react-native/test/index.tsx b/types/react-native/test/index.tsx index 4186b082fb..38d86ae19e 100644 --- a/types/react-native/test/index.tsx +++ b/types/react-native/test/index.tsx @@ -33,6 +33,7 @@ import { ImageResolvedAssetSource, ImageBackground, InteractionManager, + Linking, ListView, ListViewDataSource, StyleSheet, @@ -406,6 +407,12 @@ export class CapsLockComponent extends React.Component { } } +const getInitialUrlTest = () => Linking.getInitialURL().then(val => { + if (val !== null) { + val.indexOf('val is now a string'); + } +}) + class ScrollerListComponentTest extends React.Component<{}, { dataSource: ListViewDataSource }> { eventHandler = (event: NativeSyntheticEvent) => { console.log(event); From fd683da6c17b6a823668795013be6df84f2572a1 Mon Sep 17 00:00:00 2001 From: Aaron Dancer Date: Mon, 14 Jan 2019 15:47:08 -0600 Subject: [PATCH 149/160] [react-overlays] Update to with support for 1.1.1 --- types/react-overlays/index.d.ts | 73 +++--- types/react-overlays/lib/Affix.d.ts | 130 +++++------ types/react-overlays/lib/AutoAffix.d.ts | 27 +-- types/react-overlays/lib/Dropdown.d.ts | 57 +++++ types/react-overlays/lib/DropdownMenu.d.ts | 55 +++++ types/react-overlays/lib/DropdownToggle.d.ts | 29 +++ types/react-overlays/lib/Modal.d.ts | 212 +++++++++--------- types/react-overlays/lib/ModalManager.d.ts | 6 +- types/react-overlays/lib/Overlay.d.ts | 106 ++++++--- types/react-overlays/lib/Portal.d.ts | 4 +- types/react-overlays/lib/Position.d.ts | 34 --- .../react-overlays/lib/RootCloseWrapper.d.ts | 43 ++-- .../react-overlays/lib/WaitForContainer.d.ts | 17 ++ types/react-overlays/lib/index.d.ts | 38 ++-- .../test/react-overlays-tests-individual.tsx | 105 +++++---- .../test/react-overlays-tests-transition.tsx | 21 +- .../test/react-overlays-tests.tsx | 105 ++++----- types/react-overlays/tsconfig.json | 11 +- 18 files changed, 640 insertions(+), 433 deletions(-) create mode 100644 types/react-overlays/lib/Dropdown.d.ts create mode 100644 types/react-overlays/lib/DropdownMenu.d.ts create mode 100644 types/react-overlays/lib/DropdownToggle.d.ts delete mode 100644 types/react-overlays/lib/Position.d.ts create mode 100644 types/react-overlays/lib/WaitForContainer.d.ts diff --git a/types/react-overlays/index.d.ts b/types/react-overlays/index.d.ts index a8df0341be..d49853204d 100644 --- a/types/react-overlays/index.d.ts +++ b/types/react-overlays/index.d.ts @@ -1,52 +1,55 @@ -// Type definitions for React Overlays 0.8 +// Type definitions for React Overlays 1.1 // Project: https://github.com/react-bootstrap/react-overlays // Definitions by: Aaron Beall // Vito Samson +// Aaron Dancer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 - import * as React from "react"; export { - Affix, - AutoAffix, - Modal, - ModalManager, - Overlay, - Portal, - Position, - RootCloseWrapper, -} from './lib'; + Affix, + AutoAffix, + Modal, + ModalManager, + Overlay, + Portal, + Dropdown, + DropdownMenu, + DropdownToggle, + RootCloseWrapper, + WaitForContainer +} from "./lib"; // these callbacks are used in a few components export interface TransitionCallbacks { - /** - * Callback fired before the Overlay transitions in - */ - onEnter?(node: HTMLElement): any; + /** + * Callback fired before the Overlay transitions in + */ + onEnter?(node: HTMLElement): any; - /** - * Callback fired as the Overlay begins to transition in - */ - onEntering?(node: HTMLElement): any; + /** + * Callback fired as the Overlay begins to transition in + */ + onEntering?(node: HTMLElement): any; - /** - * Callback fired after the Overlay finishes transitioning in - */ - onEntered?(node: HTMLElement): any; + /** + * Callback fired after the Overlay finishes transitioning in + */ + onEntered?(node: HTMLElement): any; - /** - * Callback fired right before the Overlay transitions out - */ - onExit?(node: HTMLElement): any; + /** + * Callback fired right before the Overlay transitions out + */ + onExit?(node: HTMLElement): any; - /** - * Callback fired as the Overlay begins to transition out - */ - onExiting?(node: HTMLElement): any; + /** + * Callback fired as the Overlay begins to transition out + */ + onExiting?(node: HTMLElement): any; - /** - * Callback fired after the Overlay finishes transitioning out - */ - onExited?(node: HTMLElement): any; + /** + * Callback fired after the Overlay finishes transitioning out + */ + onExited?(node: HTMLElement): any; } diff --git a/types/react-overlays/lib/Affix.d.ts b/types/react-overlays/lib/Affix.d.ts index e24cb8186a..abe04230ff 100644 --- a/types/react-overlays/lib/Affix.d.ts +++ b/types/react-overlays/lib/Affix.d.ts @@ -1,84 +1,84 @@ -import * as React from 'react'; +import * as React from "react"; -declare class Affix extends React.Component { } +declare class Affix extends React.Component {} export = Affix; declare namespace Affix { - // put AffixProps inside the exported namespace so it's importable in AutoAffix - interface AffixProps { - /** - * Pixels to offset from top of screen when calculating position - */ - offsetTop?: number; + // put AffixProps inside the exported namespace so it's importable in AutoAffix + interface AffixProps { + /** + * Pixels to offset from top of screen when calculating position + */ + offsetTop?: number; - /** - * When affixed, pixels to offset from top of viewport - */ - viewportOffsetTop?: number; + /** + * When affixed, pixels to offset from top of viewport + */ + viewportOffsetTop?: number; - /** - * Pixels to offset from bottom of screen when calculating position - */ - offsetBottom?: number; + /** + * Pixels to offset from bottom of screen when calculating position + */ + offsetBottom?: number; - /** - * CSS class or classes to apply when at top - */ - topClassName?: string; + /** + * CSS class or classes to apply when at top + */ + topClassName?: string; - /** - * Style to apply when at top - */ - topStyle?: React.CSSProperties; + /** + * Style to apply when at top + */ + topStyle?: React.CSSProperties; - /** - * CSS class or classes to apply when affixed - */ - affixClassName?: string; + /** + * CSS class or classes to apply when affixed + */ + affixClassName?: string; - /** - * Style to apply when affixed - */ - affixStyle?: React.CSSProperties; + /** + * Style to apply when affixed + */ + affixStyle?: React.CSSProperties; - /** - * CSS class or classes to apply when at bottom - */ - bottomClassName?: string; + /** + * CSS class or classes to apply when at bottom + */ + bottomClassName?: string; - /** - * Style to apply when at bottom - */ - bottomStyle?: React.CSSProperties; + /** + * Style to apply when at bottom + */ + bottomStyle?: React.CSSProperties; - /** - * Callback fired when the right before the `affixStyle` and `affixStyle` props are rendered - */ - onAffix?(): void; + /** + * Callback fired when the right before the `affixStyle` and `affixStyle` props are rendered + */ + onAffix?(): void; - /** - * Callback fired after the component `affixStyle` and `affixClassName` props have been rendered. - */ - onAffixed?(): void; + /** + * Callback fired after the component `affixStyle` and `affixClassName` props have been rendered. + */ + onAffixed?(): void; - /** - * Callback fired when the right before the `topStyle` and `topClassName` props are rendered - */ - onAffixTop?(): void; + /** + * Callback fired when the right before the `topStyle` and `topClassName` props are rendered + */ + onAffixTop?(): void; - /** - * Callback fired after the component `topStyle` and `topClassName` props have been rendered. - */ - onAffixedTop?(): void; + /** + * Callback fired after the component `topStyle` and `topClassName` props have been rendered. + */ + onAffixedTop?(): void; - /** - * Callback fired when the right before the `bottomStyle` and `bottomClassName` props are rendered - */ - onAffixBottom?(): void; + /** + * Callback fired when the right before the `bottomStyle` and `bottomClassName` props are rendered + */ + onAffixBottom?(): void; - /** - * Callback fired after the component `bottomStyle` and `bottomClassName` props have been rendered. - */ - onAffixedBottom?(): void; - } + /** + * Callback fired after the component `bottomStyle` and `bottomClassName` props have been rendered. + */ + onAffixedBottom?(): void; + } } diff --git a/types/react-overlays/lib/AutoAffix.d.ts b/types/react-overlays/lib/AutoAffix.d.ts index 8c075c1782..fb239106a0 100644 --- a/types/react-overlays/lib/AutoAffix.d.ts +++ b/types/react-overlays/lib/AutoAffix.d.ts @@ -1,19 +1,20 @@ -import * as React from 'react'; -import { AffixProps } from './Affix'; +import * as React from "react"; -declare class AutoAffix extends React.Component { } -declare namespace AutoAffix { } +import { AffixProps } from "./Affix"; + +declare class AutoAffix extends React.Component {} +declare namespace AutoAffix {} export = AutoAffix; interface AutoAffixProps extends AffixProps { - /** - * The logical container node or component for determining offset from bottom - * of viewport, or a function that returns it - */ - container?: React.ReactInstance | (() => React.ReactInstance); + /** + * The logical container node or component for determining offset from bottom + * of viewport, or a function that returns it + */ + container?: React.ReactInstance | (() => React.ReactInstance); - /** - * Automatically set width when affixed - */ - autoWidth?: boolean; + /** + * Automatically set width when affixed + */ + autoWidth?: boolean; } diff --git a/types/react-overlays/lib/Dropdown.d.ts b/types/react-overlays/lib/Dropdown.d.ts new file mode 100644 index 0000000000..24b0d3e24c --- /dev/null +++ b/types/react-overlays/lib/Dropdown.d.ts @@ -0,0 +1,57 @@ +import * as React from "react"; + +import DropdownMenu = require("./DropdownMenu"); +import DropdownToggle = require("./DropdownToggle"); + +declare class Dropdown extends React.Component { + static Menu: typeof DropdownMenu; + static Toggle: typeof DropdownToggle; +} +export = Dropdown; + +declare namespace Dropdown { + interface DropdownRenderProps { + props: { + onKeyDown(event: React.SyntheticEvent): void; + }; + } + + type Directions = "up" | "left" | "right" | "down"; + + interface DropdownProps { + /** + * A render prop that returns the root dropdown element. The `props` + * argument should spread through to an element containing _both_ the + * menu and toggle in order to handle keyboard events for focus management. + */ + children(renderProps: DropdownRenderProps): React.ReactElement; + + /** + * Determines the direction and location of the Menu in relation to it's Toggle. + */ + drop?: Directions; + + /** + * A css slector string that will return __focusable__ menu items. + * Selectors should be relative to the menu component: + * e.g. ` > li:not('.disabled')` + */ + itemSelector?: string; + + /** + * Align the menu to the 'end' side of the placement side of the Dropdown toggle. The default placement is `top-start` or `bottom-start`. + */ + alignEnd?: boolean; + + /** + * Whether or not the Dropdown is visible + */ + show?: boolean; + + /** + * A callback fired when the Dropdown wishes to change visibility. Called with the requested + * `show` value, the DOM event, and the source that fired it: `'click'`,`'keydown'`,`'rootClose'`, or `'select'`. + */ + onToggle?(isOpen: boolean, event: React.SyntheticEvent): void; + } +} diff --git a/types/react-overlays/lib/DropdownMenu.d.ts b/types/react-overlays/lib/DropdownMenu.d.ts new file mode 100644 index 0000000000..c4a9090dcc --- /dev/null +++ b/types/react-overlays/lib/DropdownMenu.d.ts @@ -0,0 +1,55 @@ +import * as React from "react"; + +import Overlay = require("./Overlay"); + +declare class DropdownMenu extends React.Component< + DropdownMenu.DropdownMenuProps +> {} +export = DropdownMenu; + +declare namespace DropdownMenu { + interface DropdownMenuRenderProps extends Overlay.OverlayRenderProps { + alignEnd: boolean; + close(event: React.SyntheticEvent): void; + } + + interface DropdownMenuProps { + /** + * A render prop that returns a Menu element. The `props` + * argument should spread through to **a component that can accept a ref**. + */ + children(renderProps: DropdownMenuRenderProps): React.ReactElement; + + /** + * Controls the visible state of the menu, generally this is + * provided by the parent `Dropdown` component, + * but may also be specified as a prop directly. + */ + show?: boolean; + + /** + * Aligns the dropdown menu to the 'end' of it's placement position. + * Generally this is provided by the parent `Dropdown` component, + * but may also be specified as a prop directly. + */ + alignEnd?: boolean; + + /** + * Enables the Popper.js `flip` modifier, allowing the Dropdown to + * automatically adjust it's placement in case of overlap with the viewport or toggle. + */ + flip?: boolean; + + usePopper?: boolean; + + /** + * A set of popper options and props passed directly to react-popper's Popper component. + */ + popperConfig?: object; + + /** + * Override the default event used by RootCloseWrapper. + */ + rootCloseEvent?: string; + } +} diff --git a/types/react-overlays/lib/DropdownToggle.d.ts b/types/react-overlays/lib/DropdownToggle.d.ts new file mode 100644 index 0000000000..8da2c6cfdb --- /dev/null +++ b/types/react-overlays/lib/DropdownToggle.d.ts @@ -0,0 +1,29 @@ +import * as React from "react"; + +declare class DropdownToggle extends React.Component< + DropdownToggle.DropdownToggleProps +> {} +export = DropdownToggle; + +declare namespace DropdownToggle { + interface DropdownToggleRenderProps { + show: boolean; + toggle(show: boolean): void; + props: { + ref?(element: HTMLElement): void; + "aria-haspopup": true; + "aria-expanded": boolean; + }; + } + + interface DropdownToggleProps { + /** + * A render prop that returns a Toggle element. The `props` + * argument should spread through to **a component that can accept a ref**. Use + * the `onToggle` argument to toggle the menu open or closed + */ + children( + renderProps: DropdownToggleRenderProps + ): React.ReactElement; + } +} diff --git a/types/react-overlays/lib/Modal.d.ts b/types/react-overlays/lib/Modal.d.ts index f626a30119..7412b665cd 100644 --- a/types/react-overlays/lib/Modal.d.ts +++ b/types/react-overlays/lib/Modal.d.ts @@ -1,129 +1,131 @@ -import * as React from 'react'; -import { TransitionCallbacks } from 'react-overlays'; -import { TransitionProps } from 'react-transition-group/Transition'; -import * as ModalManager from './ModalManager'; -import { PortalProps } from './Portal'; +import * as React from "react"; + +import { TransitionCallbacks } from "react-overlays"; +import { TransitionProps } from "react-transition-group/Transition"; + +import * as ModalManager from "./ModalManager"; +import { PortalProps } from "./Portal"; declare class Modal extends React.Component { - public static Manager: ModalManager; + public static Manager: ModalManager; } -declare namespace Modal { } +declare namespace Modal {} export = Modal; interface ModalProps extends TransitionCallbacks, PortalProps { - className?: string; + className?: string; - /** - * Set the visibility of the Modal - */ - show?: boolean; + /** + * Set the visibility of the Modal + */ + show?: boolean; - /** - * A Node, Component instance, or function that returns either. The Modal is appended to it's container element. - * - * For the sake of assistive technologies, the container should usually be the document body, so that the rest of the - * page content can be placed behind a virtual backdrop as well as a visual one. - */ - container?: React.ReactNode | Function; + /** + * A Node, Component instance, or function that returns either. The Modal is appended to it's container element. + * + * For the sake of assistive technologies, the container should usually be the document body, so that the rest of the + * page content can be placed behind a virtual backdrop as well as a visual one. + */ + container?: React.ReactNode | Function; - /** - * A callback fired when the Modal is opening. - */ - onShow?: Function; + /** + * A callback fired when the Modal is opening. + */ + onShow?: Function; - /** - * A callback fired when either the backdrop is clicked, or the escape key is pressed. - * - * The `onHide` callback only signals intent from the Modal, - * you must actually set the `show` prop to `false` for the Modal to close. - */ - onHide?: Function; + /** + * A callback fired when either the backdrop is clicked, or the escape key is pressed. + * + * The `onHide` callback only signals intent from the Modal, + * you must actually set the `show` prop to `false` for the Modal to close. + */ + onHide?: Function; - /** - * Include a backdrop component. - */ - backdrop?: boolean | 'static'; + /** + * Include a backdrop component. + */ + backdrop?: boolean | "static"; - /** - * A function that returns a backdrop component. Useful for custom - * backdrop rendering. - * - * ```js - * renderBackdrop={props => } - * ``` - */ - renderBackdrop?(props: any): React.ReactNode; + /** + * A function that returns the dialog component. Useful for custom + * rendering. **Note:** the component should make sure to apply the provided ref. + * + * ```js + * renderDialog={props => } + * ``` + */ + renderDialog?(props: any): React.ReactNode; - /** - * A callback fired when the escape key, if specified in `keyboard`, is pressed. - */ - onEscapeKeyUp?: Function; + /** + * A function that returns a backdrop component. Useful for custom + * backdrop rendering. + * + * ```js + * renderBackdrop={props => } + * ``` + */ + renderBackdrop?(props: any): React.ReactNode; - /** - * A callback fired when the backdrop, if specified, is clicked. - */ - onBackdropClick?: Function; + /** + * A callback fired when the escape key, if specified in `keyboard`, is pressed. + */ + onEscapeKeyDown?: Function; - /** - * A style object for the backdrop component. - */ - backdropStyle?: Object; + /** + * A callback fired when the backdrop, if specified, is clicked. + */ + onBackdropClick?: Function; - /** - * A css class or classes for the backdrop component. - */ - backdropClassName?: string; + /** + * A css class or set of classes applied to the modal container when the modal is open, + * and removed when it is closed. + */ + containerClassName?: string; - /** - * A css class or set of classes applied to the modal container when the modal is open, - * and removed when it is closed. - */ - containerClassName?: string; + /** + * Close the modal when escape key is pressed + */ + keyboard?: boolean; - /** - * Close the modal when escape key is pressed - */ - keyboard?: boolean; + /** + * A `react-transition-group@2.0.0` `` component used + * to control animations for the dialog component. + */ + transition?: React.ComponentType; - /** - * A `react-transition-group@2.0.0` `` component used - * to control animations for the dialog component. - */ - transition?: React.ComponentType; + /** + * A `react-transition-group@2.0.0` `` component used + * to control animations for the backdrop components. + */ + backdropTransition?: React.ComponentType; - /** - * A `react-transition-group@2.0.0` `` component used - * to control animations for the backdrop components. - */ - backdropTransition?: React.ComponentType; + /** + * When `true` The modal will automatically shift focus to itself when it opens, and + * replace it to the last focused element when it closes. This also + * works correctly with any Modal children that have the `autoFocus` prop. + * + * Generally this should never be set to `false` as it makes the Modal less + * accessible to assistive technologies, like screen readers. + */ + autoFocus?: boolean; - /** - * When `true` The modal will automatically shift focus to itself when it opens, and - * replace it to the last focused element when it closes. This also - * works correctly with any Modal children that have the `autoFocus` prop. - * - * Generally this should never be set to `false` as it makes the Modal less - * accessible to assistive technologies, like screen readers. - */ - autoFocus?: boolean; + /** + * When `true` The modal will prevent focus from leaving the Modal while open. + * + * Generally this should never be set to `false` as it makes the Modal less + * accessible to assistive technologies, like screen readers. + */ + enforceFocus?: boolean; - /** - * When `true` The modal will prevent focus from leaving the Modal while open. - * - * Generally this should never be set to `false` as it makes the Modal less - * accessible to assistive technologies, like screen readers. - */ - enforceFocus?: boolean; + /** + * When `true` The modal will restore focus to previously focused element once + * modal is hidden + */ + restoreFocus?: boolean; - /** - * When `true` The modal will restore focus to previously focused element once - * modal is hidden - */ - restoreFocus?: boolean; - - /** - * A ModalManager instance used to track and manage the state of open - * Modals. Useful when customizing how modals interact within a container - */ - manager?: ModalManager; + /** + * A ModalManager instance used to track and manage the state of open + * Modals. Useful when customizing how modals interact within a container + */ + manager?: ModalManager; } diff --git a/types/react-overlays/lib/ModalManager.d.ts b/types/react-overlays/lib/ModalManager.d.ts index f2492aee7d..82ce4cfd26 100644 --- a/types/react-overlays/lib/ModalManager.d.ts +++ b/types/react-overlays/lib/ModalManager.d.ts @@ -1,7 +1,11 @@ -import * as Modal from './Modal'; +import * as Modal from "./Modal"; declare class ModalManager { constructor(opts?: { hideSiblingNodes?: boolean; handleContainerOverflow?: boolean }); + isContainerOverflowing(modal: Modal): boolean; + containerIndexFromModal(modal: Modal): number; + setContainerStyle(containerState: any, container: any): void; + removeContainerStyle(containerState: any, container: any): void; add(modal: Modal, container: any, className?: string): number; remove(modal: Modal): void; isTopModal(modal: Modal): boolean; diff --git a/types/react-overlays/lib/Overlay.d.ts b/types/react-overlays/lib/Overlay.d.ts index 3b6cd22be9..09ddb730ce 100644 --- a/types/react-overlays/lib/Overlay.d.ts +++ b/types/react-overlays/lib/Overlay.d.ts @@ -1,35 +1,87 @@ -import * as React from 'react'; -import { TransitionCallbacks } from 'react-overlays'; -import { TransitionProps } from 'react-transition-group/Transition'; -import { PortalProps } from './Portal'; -import { PositionProps } from './Position'; +import * as React from "react"; -declare class Overlay extends React.Component { } +import { TransitionCallbacks } from "react-overlays"; +import { TransitionProps } from "react-transition-group/Transition"; + +import { RootCloseWrapper } from "."; +import { PortalProps } from "./Portal"; + +declare class Overlay extends React.Component {} export = Overlay; declare namespace Overlay { - interface OverlayProps extends TransitionCallbacks, PortalProps, PositionProps { - /** - * Set the visibility of the Overlay - */ - show?: boolean; + type Placements = "top" | "left" | "right" | "bottom"; - /** - * Specify whether the overlay should trigger `onHide` when the user clicks outside the overlay - */ - rootClose?: boolean; + interface OverlayRenderProps { + show: boolean; + placement: Placements; + outOfBoundaries?: boolean; + scheduleUpdate(): void; + props: { + ref?(element: HTMLElement): void; + style: { [key: string]: string | number }; + "aria-labelledby"?: string; + }; + arrowProps: { + ref?(element: HTMLElement): void; + style: { [key: string]: string | number }; + }; + } - /** - * A Callback fired by the Overlay when it wishes to be hidden. - * - * __required__ when `rootClose` is `true`. - */ - onHide?(props: PortalProps, ...args: any[]): any; + interface OverlayProps extends TransitionCallbacks, PortalProps { + /** + * Set the visibility of the Overlay + */ + show?: boolean; - /** - * A `react-transition-group@2.0.0` `` component - * used to animate the overlay as it changes visibility. - */ - transition?: React.ComponentType; - } + /** Specify where the overlay element is positioned in relation to the target element */ + placement?: Placements; + + /** + * Enables the Popper.js `flip` modifier, allowing the Overlay to + * automatically adjust it's placement in case of overlap with the viewport or toggle. + */ + flip?: boolean; + + /** + * A render prop that returns an element to overlay and position. See + * the [react-popper documentation](https://github.com/FezVrasta/react-popper#children) for more info. + */ + children(renderProps: OverlayRenderProps): React.ReactElement; + + /** + * A set of popper options and props passed directly to react-popper's Popper component. + */ + popperConfig?: object; + + /** + * Specify whether the overlay should trigger `onHide` when the user clicks outside the overlay + */ + rootClose?: boolean; + + /** + * Specify event for toggling overlay + */ + rootCloseEvent?: RootCloseWrapper.RootCloseWrapperProps["event"]; + + /** + * Specify disabled for disable RootCloseWrapper + */ + rootCloseDisabled?: boolean; + + /** + * A Callback fired by the Overlay when it wishes to be hidden. + * + * __required__ when `rootClose` is `true`. + */ + onHide?(props: PortalProps, ...args: any[]): any; + + /** + * A `react-transition-group@2.0.0` `` component + * used to animate the overlay as it changes visibility. + */ + transition?: React.ComponentType; + + target?: React.ReactInstance | (() => React.ReactInstance); + } } diff --git a/types/react-overlays/lib/Portal.d.ts b/types/react-overlays/lib/Portal.d.ts index b70c273b33..a3e1827c43 100644 --- a/types/react-overlays/lib/Portal.d.ts +++ b/types/react-overlays/lib/Portal.d.ts @@ -1,4 +1,4 @@ -import * as React from 'react'; +import * as React from "react"; declare class Portal extends React.Component { } export = Portal; @@ -6,5 +6,7 @@ export = Portal; declare namespace Portal { interface PortalProps { container?: React.ReactNode | Function; + + onRendered?: Function; } } diff --git a/types/react-overlays/lib/Position.d.ts b/types/react-overlays/lib/Position.d.ts deleted file mode 100644 index 2bbca4364e..0000000000 --- a/types/react-overlays/lib/Position.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import * as React from 'react'; - -declare class Position extends React.Component { } -export = Position; - -declare namespace Position { - interface PositionProps { - /** - * A node, element, or function that returns either. The child will be - * be positioned next to the `target` specified. - */ - target?: React.ReactNode | Function; - - /** - * "offsetParent" of the component - */ - container?: React.ReactNode | Function; - - /** - * Minimum spacing in pixels between container border and component border - */ - containerPadding?: number; - - /** - * How to position the component relative to the target - */ - placement?: 'top' | 'right' | 'bottom' | 'left'; - - /** - * Whether the position should be changed on each update - */ - shouldUpdatePosition?: boolean; - } -} diff --git a/types/react-overlays/lib/RootCloseWrapper.d.ts b/types/react-overlays/lib/RootCloseWrapper.d.ts index 679426b50c..60186deaf3 100644 --- a/types/react-overlays/lib/RootCloseWrapper.d.ts +++ b/types/react-overlays/lib/RootCloseWrapper.d.ts @@ -1,28 +1,31 @@ import * as React from "react"; -declare class RootCloseWrapper extends React.Component { } -declare namespace RootCloseWrapper { } +declare class RootCloseWrapper extends React.Component< + RootCloseWrapper.RootCloseWrapperProps +> {} export = RootCloseWrapper; -interface RootCloseWrapperProps { - /** - * Callback fired after click or mousedown. Also triggers when user hits `esc`. - */ - onRootClose?(e: React.SyntheticEvent): void; +declare namespace RootCloseWrapper { + interface RootCloseWrapperProps { + /** + * Callback fired after click or mousedown. Also triggers when user hits `esc`. + */ + onRootClose?(e: React.SyntheticEvent): void; - /** - * Children to render. - */ - children?: React.ReactNode; + /** + * Children to render. + */ + children?: React.ReactNode; - /** - * Disable the the RootCloseWrapper, preventing it from triggering - * `onRootClose`. - */ - disabled?: boolean; + /** + * Disable the the RootCloseWrapper, preventing it from triggering + * `onRootClose`. + */ + disabled?: boolean; - /** - * Choose which document mouse event to bind to - */ - event?: 'click' | 'mousedown'; + /** + * Choose which document mouse event to bind to + */ + event?: "click" | "mousedown"; + } } diff --git a/types/react-overlays/lib/WaitForContainer.d.ts b/types/react-overlays/lib/WaitForContainer.d.ts new file mode 100644 index 0000000000..c9e275639e --- /dev/null +++ b/types/react-overlays/lib/WaitForContainer.d.ts @@ -0,0 +1,17 @@ +import * as React from "react"; + +declare class WaitForContainer extends React.Component< + WaitForContainer.WaitForContainerProps +> {} +export = WaitForContainer; + +declare namespace WaitForContainer { + interface WaitForContainerProps { + /** + * "offsetParent" of the component + */ + container?: React.ReactNode | Function; + + onContainerResolved?: Function; + } +} diff --git a/types/react-overlays/lib/index.d.ts b/types/react-overlays/lib/index.d.ts index ea95108f8f..fd90edd095 100644 --- a/types/react-overlays/lib/index.d.ts +++ b/types/react-overlays/lib/index.d.ts @@ -1,19 +1,25 @@ -import Affix = require('./Affix'); -import AutoAffix = require('./AutoAffix'); -import Modal = require('./Modal'); -import ModalManager = require('./ModalManager'); -import Overlay = require('./Overlay'); -import Portal = require('./Portal'); -import Position = require('./Position'); -import RootCloseWrapper = require('./RootCloseWrapper'); +import Affix = require("./Affix"); +import AutoAffix = require("./AutoAffix"); +import Dropdown = require("./Dropdown"); +import DropdownMenu = require("./DropdownMenu"); +import DropdownToggle = require("./DropdownToggle"); +import Modal = require("./Modal"); +import ModalManager = require("./ModalManager"); +import Overlay = require("./Overlay"); +import Portal = require("./Portal"); +import RootCloseWrapper = require("./RootCloseWrapper"); +import WaitForContainer = require("./WaitForContainer"); export { - Affix, - AutoAffix, - Modal, - ModalManager, - Overlay, - Portal, - Position, - RootCloseWrapper, + Affix, + AutoAffix, + Dropdown, + DropdownMenu, + DropdownToggle, + Modal, + ModalManager, + Overlay, + Portal, + RootCloseWrapper, + WaitForContainer }; diff --git a/types/react-overlays/test/react-overlays-tests-individual.tsx b/types/react-overlays/test/react-overlays-tests-individual.tsx index 9201604d49..1872ebca66 100644 --- a/types/react-overlays/test/react-overlays-tests-individual.tsx +++ b/types/react-overlays/test/react-overlays-tests-individual.tsx @@ -1,66 +1,73 @@ import * as React from "react"; -import * as Portal from 'react-overlays/lib/Portal'; -import * as Modal from 'react-overlays/lib/Modal'; -import * as Position from 'react-overlays/lib/Position'; -import Overlay = require('react-overlays/lib/Overlay'); -import * as Affix from 'react-overlays/lib/Affix'; -import AutoAffix = require('react-overlays/lib/AutoAffix'); -import RootCloseWrapper = require('react-overlays/lib/RootCloseWrapper'); +import AutoAffix = require("react-overlays/lib/AutoAffix"); +import Overlay = require("react-overlays/lib/Overlay"); +import RootCloseWrapper = require("react-overlays/lib/RootCloseWrapper"); -import { OverlayFade } from './react-overlays-tests-transition'; +import { OverlayFade } from "./react-overlays-tests-transition"; class TestAffix extends React.Component { - render(): JSX.Element { - return ( -

- -
Test
-
-
- ); - } + render(): JSX.Element { + return ( +
+ +
Test
+
+
+ ); + } } interface OverlayTriggerProps extends Overlay.OverlayProps { - overlay: any; + overlay: any; } -class TestOverlay extends React.Component<{}, {open: boolean}> { - target: HTMLElement | null = null; - state = {open: false}; +function renderOverlayContent({ props }: Overlay.OverlayRenderProps) { + return
Popover content
; +} +class TestOverlay extends React.Component<{}, { open: boolean }> { + target: HTMLElement | null = null; + state = { open: false }; - render(): JSX.Element { - const { open } = this.state; + render(): JSX.Element { + const { open } = this.state; - return ( -
- + return ( +
+ - this.target} - transition={OverlayFade} - onHide={() => this.setState({open: false})} - placement="bottom"> -
Popover content
-
-
- ); - } + this.target} + transition={OverlayFade} + onHide={() => this.setState({ open: false })} + placement="bottom" + > + {renderOverlayContent} + +
+ ); + } } class TestRootCloseWrapper extends React.Component { - handleRootClose = () => { }; - render() { - return ( - -
Test
-
- ); - } + handleRootClose = () => {}; + render() { + return ( + +
Test
+
+ ); + } } diff --git a/types/react-overlays/test/react-overlays-tests-transition.tsx b/types/react-overlays/test/react-overlays-tests-transition.tsx index e1e04d7dda..f2a1769a79 100644 --- a/types/react-overlays/test/react-overlays-tests-transition.tsx +++ b/types/react-overlays/test/react-overlays-tests-transition.tsx @@ -1,12 +1,15 @@ -import * as React from 'react'; -import { CSSTransition } from 'react-transition-group'; -import { TransitionProps } from 'react-transition-group/Transition'; +import * as React from "react"; + +import { CSSTransition } from "react-transition-group"; +import { TransitionProps } from "react-transition-group/Transition"; export function OverlayFade(props: TransitionProps): JSX.Element { - return ( - - ); + return ( + + ); } diff --git a/types/react-overlays/test/react-overlays-tests.tsx b/types/react-overlays/test/react-overlays-tests.tsx index cbb2046fbc..f1465dc384 100644 --- a/types/react-overlays/test/react-overlays-tests.tsx +++ b/types/react-overlays/test/react-overlays-tests.tsx @@ -1,64 +1,69 @@ import * as React from "react"; -import { - Portal, - Modal, - Position, - Overlay, - Affix, - AutoAffix, - RootCloseWrapper, -} from "react-overlays"; +import { AutoAffix, Overlay, RootCloseWrapper } from "react-overlays"; +import { OverlayRenderProps } from "react-overlays/lib/Overlay"; -import { OverlayFade } from './react-overlays-tests-transition'; +import { OverlayFade } from "./react-overlays-tests-transition"; class TestAffix extends React.Component { - render(): JSX.Element { - return ( -
- -
Test
-
-
- ); - } + render(): JSX.Element { + return ( +
+ +
Test
+
+
+ ); + } } -class TestOverlay extends React.Component<{}, {open: boolean}> { - target: HTMLElement | null = null; - state = {open: false}; +function renderOverlayContent({ props }: OverlayRenderProps) { + return
Popover content
; +} - render(): JSX.Element { - const { open } = this.state; +class TestOverlay extends React.Component<{}, { open: boolean }> { + target: HTMLElement | null = null; + state = { open: false }; - return ( -
- + render(): JSX.Element { + const { open } = this.state; - this.target} - transition={OverlayFade} - onHide={() => this.setState({open: false})} - placement="bottom"> -
Popover content
-
-
- ); - } + return ( +
+ + + this.target} + transition={OverlayFade} + onHide={() => this.setState({ open: false })} + placement="bottom" + > + {renderOverlayContent} + +
+ ); + } } class TestRootCloseWrapper extends React.Component { - handleRootClose = () => { }; - render() { - return ( - -
Test
-
- ); - } + handleRootClose = () => {}; + render() { + return ( + +
Test
+
+ ); + } } diff --git a/types/react-overlays/tsconfig.json b/types/react-overlays/tsconfig.json index 33066cce2e..8451799969 100644 --- a/types/react-overlays/tsconfig.json +++ b/types/react-overlays/tsconfig.json @@ -1,18 +1,13 @@ { "compilerOptions": { "module": "commonjs", - "lib": [ - "es6", - "dom" - ], + "lib": ["es6", "dom"], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, "strictFunctionTypes": true, "baseUrl": "../", - "typeRoots": [ - "../" - ], + "typeRoots": ["../"], "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, @@ -24,4 +19,4 @@ "test/react-overlays-tests-individual.tsx", "test/react-overlays-tests-transition.tsx" ] -} \ No newline at end of file +} From 68d8bba1d0b7eb749e305eec31597a1ac604dc04 Mon Sep 17 00:00:00 2001 From: Aaron Dancer Date: Tue, 15 Jan 2019 09:59:40 -0600 Subject: [PATCH 150/160] [react-overlays] use tabs for indentation, single quotes --- types/react-overlays/index.d.ts | 72 +++---- types/react-overlays/lib/Affix.d.ts | 126 +++++------ types/react-overlays/lib/AutoAffix.d.ts | 18 +- types/react-overlays/lib/Dropdown.d.ts | 78 +++---- types/react-overlays/lib/DropdownMenu.d.ts | 76 +++---- types/react-overlays/lib/DropdownToggle.d.ts | 40 ++-- types/react-overlays/lib/Modal.d.ts | 198 +++++++++--------- types/react-overlays/lib/ModalManager.d.ts | 21 +- types/react-overlays/lib/Overlay.d.ts | 124 +++++------ types/react-overlays/lib/Portal.d.ts | 10 +- .../react-overlays/lib/RootCloseWrapper.d.ts | 40 ++-- .../react-overlays/lib/WaitForContainer.d.ts | 16 +- types/react-overlays/lib/index.d.ts | 22 +- .../test/react-overlays-tests-transition.tsx | 16 +- .../test/react-overlays-tests.tsx | 96 ++++----- 15 files changed, 478 insertions(+), 475 deletions(-) diff --git a/types/react-overlays/index.d.ts b/types/react-overlays/index.d.ts index d49853204d..82fd64bfdc 100644 --- a/types/react-overlays/index.d.ts +++ b/types/react-overlays/index.d.ts @@ -8,48 +8,48 @@ import * as React from "react"; export { - Affix, - AutoAffix, - Modal, - ModalManager, - Overlay, - Portal, - Dropdown, - DropdownMenu, - DropdownToggle, - RootCloseWrapper, - WaitForContainer -} from "./lib"; + Affix, + AutoAffix, + Modal, + ModalManager, + Overlay, + Portal, + Dropdown, + DropdownMenu, + DropdownToggle, + RootCloseWrapper, + WaitForContainer +} from './lib'; // these callbacks are used in a few components export interface TransitionCallbacks { - /** - * Callback fired before the Overlay transitions in - */ - onEnter?(node: HTMLElement): any; + /** + * Callback fired before the Overlay transitions in + */ + onEnter?(node: HTMLElement): any; - /** - * Callback fired as the Overlay begins to transition in - */ - onEntering?(node: HTMLElement): any; + /** + * Callback fired as the Overlay begins to transition in + */ + onEntering?(node: HTMLElement): any; - /** - * Callback fired after the Overlay finishes transitioning in - */ - onEntered?(node: HTMLElement): any; + /** + * Callback fired after the Overlay finishes transitioning in + */ + onEntered?(node: HTMLElement): any; - /** - * Callback fired right before the Overlay transitions out - */ - onExit?(node: HTMLElement): any; + /** + * Callback fired right before the Overlay transitions out + */ + onExit?(node: HTMLElement): any; - /** - * Callback fired as the Overlay begins to transition out - */ - onExiting?(node: HTMLElement): any; + /** + * Callback fired as the Overlay begins to transition out + */ + onExiting?(node: HTMLElement): any; - /** - * Callback fired after the Overlay finishes transitioning out - */ - onExited?(node: HTMLElement): any; + /** + * Callback fired after the Overlay finishes transitioning out + */ + onExited?(node: HTMLElement): any; } diff --git a/types/react-overlays/lib/Affix.d.ts b/types/react-overlays/lib/Affix.d.ts index abe04230ff..a3be5662a0 100644 --- a/types/react-overlays/lib/Affix.d.ts +++ b/types/react-overlays/lib/Affix.d.ts @@ -4,81 +4,81 @@ declare class Affix extends React.Component {} export = Affix; declare namespace Affix { - // put AffixProps inside the exported namespace so it's importable in AutoAffix - interface AffixProps { - /** - * Pixels to offset from top of screen when calculating position - */ - offsetTop?: number; + // put AffixProps inside the exported namespace so it's importable in AutoAffix + interface AffixProps { + /** + * Pixels to offset from top of screen when calculating position + */ + offsetTop?: number; - /** - * When affixed, pixels to offset from top of viewport - */ - viewportOffsetTop?: number; + /** + * When affixed, pixels to offset from top of viewport + */ + viewportOffsetTop?: number; - /** - * Pixels to offset from bottom of screen when calculating position - */ - offsetBottom?: number; + /** + * Pixels to offset from bottom of screen when calculating position + */ + offsetBottom?: number; - /** - * CSS class or classes to apply when at top - */ - topClassName?: string; + /** + * CSS class or classes to apply when at top + */ + topClassName?: string; - /** - * Style to apply when at top - */ - topStyle?: React.CSSProperties; + /** + * Style to apply when at top + */ + topStyle?: React.CSSProperties; - /** - * CSS class or classes to apply when affixed - */ - affixClassName?: string; + /** + * CSS class or classes to apply when affixed + */ + affixClassName?: string; - /** - * Style to apply when affixed - */ - affixStyle?: React.CSSProperties; + /** + * Style to apply when affixed + */ + affixStyle?: React.CSSProperties; - /** - * CSS class or classes to apply when at bottom - */ - bottomClassName?: string; + /** + * CSS class or classes to apply when at bottom + */ + bottomClassName?: string; - /** - * Style to apply when at bottom - */ - bottomStyle?: React.CSSProperties; + /** + * Style to apply when at bottom + */ + bottomStyle?: React.CSSProperties; - /** - * Callback fired when the right before the `affixStyle` and `affixStyle` props are rendered - */ - onAffix?(): void; + /** + * Callback fired when the right before the `affixStyle` and `affixStyle` props are rendered + */ + onAffix?(): void; - /** - * Callback fired after the component `affixStyle` and `affixClassName` props have been rendered. - */ - onAffixed?(): void; + /** + * Callback fired after the component `affixStyle` and `affixClassName` props have been rendered. + */ + onAffixed?(): void; - /** - * Callback fired when the right before the `topStyle` and `topClassName` props are rendered - */ - onAffixTop?(): void; + /** + * Callback fired when the right before the `topStyle` and `topClassName` props are rendered + */ + onAffixTop?(): void; - /** - * Callback fired after the component `topStyle` and `topClassName` props have been rendered. - */ - onAffixedTop?(): void; + /** + * Callback fired after the component `topStyle` and `topClassName` props have been rendered. + */ + onAffixedTop?(): void; - /** - * Callback fired when the right before the `bottomStyle` and `bottomClassName` props are rendered - */ - onAffixBottom?(): void; + /** + * Callback fired when the right before the `bottomStyle` and `bottomClassName` props are rendered + */ + onAffixBottom?(): void; - /** - * Callback fired after the component `bottomStyle` and `bottomClassName` props have been rendered. - */ - onAffixedBottom?(): void; - } + /** + * Callback fired after the component `bottomStyle` and `bottomClassName` props have been rendered. + */ + onAffixedBottom?(): void; + } } diff --git a/types/react-overlays/lib/AutoAffix.d.ts b/types/react-overlays/lib/AutoAffix.d.ts index fb239106a0..2b91ac582c 100644 --- a/types/react-overlays/lib/AutoAffix.d.ts +++ b/types/react-overlays/lib/AutoAffix.d.ts @@ -7,14 +7,14 @@ declare namespace AutoAffix {} export = AutoAffix; interface AutoAffixProps extends AffixProps { - /** - * The logical container node or component for determining offset from bottom - * of viewport, or a function that returns it - */ - container?: React.ReactInstance | (() => React.ReactInstance); + /** + * The logical container node or component for determining offset from bottom + * of viewport, or a function that returns it + */ + container?: React.ReactInstance | (() => React.ReactInstance); - /** - * Automatically set width when affixed - */ - autoWidth?: boolean; + /** + * Automatically set width when affixed + */ + autoWidth?: boolean; } diff --git a/types/react-overlays/lib/Dropdown.d.ts b/types/react-overlays/lib/Dropdown.d.ts index 24b0d3e24c..356f5d4f08 100644 --- a/types/react-overlays/lib/Dropdown.d.ts +++ b/types/react-overlays/lib/Dropdown.d.ts @@ -4,54 +4,54 @@ import DropdownMenu = require("./DropdownMenu"); import DropdownToggle = require("./DropdownToggle"); declare class Dropdown extends React.Component { - static Menu: typeof DropdownMenu; - static Toggle: typeof DropdownToggle; + static Menu: typeof DropdownMenu; + static Toggle: typeof DropdownToggle; } export = Dropdown; declare namespace Dropdown { - interface DropdownRenderProps { - props: { - onKeyDown(event: React.SyntheticEvent): void; - }; - } + interface DropdownRenderProps { + props: { + onKeyDown(event: React.SyntheticEvent): void; + }; + } - type Directions = "up" | "left" | "right" | "down"; + type Directions = 'up' | 'left' | 'right' | 'down'; - interface DropdownProps { - /** - * A render prop that returns the root dropdown element. The `props` - * argument should spread through to an element containing _both_ the - * menu and toggle in order to handle keyboard events for focus management. - */ - children(renderProps: DropdownRenderProps): React.ReactElement; + interface DropdownProps { + /** + * A render prop that returns the root dropdown element. The `props` + * argument should spread through to an element containing _both_ the + * menu and toggle in order to handle keyboard events for focus management. + */ + children(renderProps: DropdownRenderProps): React.ReactElement; - /** - * Determines the direction and location of the Menu in relation to it's Toggle. - */ - drop?: Directions; + /** + * Determines the direction and location of the Menu in relation to it's Toggle. + */ + drop?: Directions; - /** - * A css slector string that will return __focusable__ menu items. - * Selectors should be relative to the menu component: - * e.g. ` > li:not('.disabled')` - */ - itemSelector?: string; + /** + * A css slector string that will return __focusable__ menu items. + * Selectors should be relative to the menu component: + * e.g. ` > li:not('.disabled')` + */ + itemSelector?: string; - /** - * Align the menu to the 'end' side of the placement side of the Dropdown toggle. The default placement is `top-start` or `bottom-start`. - */ - alignEnd?: boolean; + /** + * Align the menu to the 'end' side of the placement side of the Dropdown toggle. The default placement is `top-start` or `bottom-start`. + */ + alignEnd?: boolean; - /** - * Whether or not the Dropdown is visible - */ - show?: boolean; + /** + * Whether or not the Dropdown is visible + */ + show?: boolean; - /** - * A callback fired when the Dropdown wishes to change visibility. Called with the requested - * `show` value, the DOM event, and the source that fired it: `'click'`,`'keydown'`,`'rootClose'`, or `'select'`. - */ - onToggle?(isOpen: boolean, event: React.SyntheticEvent): void; - } + /** + * A callback fired when the Dropdown wishes to change visibility. Called with the requested + * `show` value, the DOM event, and the source that fired it: `'click'`,`'keydown'`,`'rootClose'`, or `'select'`. + */ + onToggle?(isOpen: boolean, event: React.SyntheticEvent): void; + } } diff --git a/types/react-overlays/lib/DropdownMenu.d.ts b/types/react-overlays/lib/DropdownMenu.d.ts index c4a9090dcc..43f96f806d 100644 --- a/types/react-overlays/lib/DropdownMenu.d.ts +++ b/types/react-overlays/lib/DropdownMenu.d.ts @@ -3,53 +3,53 @@ import * as React from "react"; import Overlay = require("./Overlay"); declare class DropdownMenu extends React.Component< - DropdownMenu.DropdownMenuProps + DropdownMenu.DropdownMenuProps > {} export = DropdownMenu; declare namespace DropdownMenu { - interface DropdownMenuRenderProps extends Overlay.OverlayRenderProps { - alignEnd: boolean; - close(event: React.SyntheticEvent): void; - } + interface DropdownMenuRenderProps extends Overlay.OverlayRenderProps { + alignEnd: boolean; + close(event: React.SyntheticEvent): void; + } - interface DropdownMenuProps { - /** - * A render prop that returns a Menu element. The `props` - * argument should spread through to **a component that can accept a ref**. - */ - children(renderProps: DropdownMenuRenderProps): React.ReactElement; + interface DropdownMenuProps { + /** + * A render prop that returns a Menu element. The `props` + * argument should spread through to **a component that can accept a ref**. + */ + children(renderProps: DropdownMenuRenderProps): React.ReactElement; - /** - * Controls the visible state of the menu, generally this is - * provided by the parent `Dropdown` component, - * but may also be specified as a prop directly. - */ - show?: boolean; + /** + * Controls the visible state of the menu, generally this is + * provided by the parent `Dropdown` component, + * but may also be specified as a prop directly. + */ + show?: boolean; - /** - * Aligns the dropdown menu to the 'end' of it's placement position. - * Generally this is provided by the parent `Dropdown` component, - * but may also be specified as a prop directly. - */ - alignEnd?: boolean; + /** + * Aligns the dropdown menu to the 'end' of it's placement position. + * Generally this is provided by the parent `Dropdown` component, + * but may also be specified as a prop directly. + */ + alignEnd?: boolean; - /** - * Enables the Popper.js `flip` modifier, allowing the Dropdown to - * automatically adjust it's placement in case of overlap with the viewport or toggle. - */ - flip?: boolean; + /** + * Enables the Popper.js `flip` modifier, allowing the Dropdown to + * automatically adjust it's placement in case of overlap with the viewport or toggle. + */ + flip?: boolean; - usePopper?: boolean; + usePopper?: boolean; - /** - * A set of popper options and props passed directly to react-popper's Popper component. - */ - popperConfig?: object; + /** + * A set of popper options and props passed directly to react-popper's Popper component. + */ + popperConfig?: object; - /** - * Override the default event used by RootCloseWrapper. - */ - rootCloseEvent?: string; - } + /** + * Override the default event used by RootCloseWrapper. + */ + rootCloseEvent?: string; + } } diff --git a/types/react-overlays/lib/DropdownToggle.d.ts b/types/react-overlays/lib/DropdownToggle.d.ts index 8da2c6cfdb..136a929ad2 100644 --- a/types/react-overlays/lib/DropdownToggle.d.ts +++ b/types/react-overlays/lib/DropdownToggle.d.ts @@ -1,29 +1,29 @@ import * as React from "react"; declare class DropdownToggle extends React.Component< - DropdownToggle.DropdownToggleProps + DropdownToggle.DropdownToggleProps > {} export = DropdownToggle; declare namespace DropdownToggle { - interface DropdownToggleRenderProps { - show: boolean; - toggle(show: boolean): void; - props: { - ref?(element: HTMLElement): void; - "aria-haspopup": true; - "aria-expanded": boolean; - }; - } + interface DropdownToggleRenderProps { + show: boolean; + toggle(show: boolean): void; + props: { + ref?(element: HTMLElement): void; + 'aria-haspopup': true; + 'aria-expanded': boolean; + }; + } - interface DropdownToggleProps { - /** - * A render prop that returns a Toggle element. The `props` - * argument should spread through to **a component that can accept a ref**. Use - * the `onToggle` argument to toggle the menu open or closed - */ - children( - renderProps: DropdownToggleRenderProps - ): React.ReactElement; - } + interface DropdownToggleProps { + /** + * A render prop that returns a Toggle element. The `props` + * argument should spread through to **a component that can accept a ref**. Use + * the `onToggle` argument to toggle the menu open or closed + */ + children( + renderProps: DropdownToggleRenderProps + ): React.ReactElement; + } } diff --git a/types/react-overlays/lib/Modal.d.ts b/types/react-overlays/lib/Modal.d.ts index 7412b665cd..3d6b4e06c6 100644 --- a/types/react-overlays/lib/Modal.d.ts +++ b/types/react-overlays/lib/Modal.d.ts @@ -7,125 +7,125 @@ import * as ModalManager from "./ModalManager"; import { PortalProps } from "./Portal"; declare class Modal extends React.Component { - public static Manager: ModalManager; + public static Manager: ModalManager; } declare namespace Modal {} export = Modal; interface ModalProps extends TransitionCallbacks, PortalProps { - className?: string; + className?: string; - /** - * Set the visibility of the Modal - */ - show?: boolean; + /** + * Set the visibility of the Modal + */ + show?: boolean; - /** - * A Node, Component instance, or function that returns either. The Modal is appended to it's container element. - * - * For the sake of assistive technologies, the container should usually be the document body, so that the rest of the - * page content can be placed behind a virtual backdrop as well as a visual one. - */ - container?: React.ReactNode | Function; + /** + * A Node, Component instance, or function that returns either. The Modal is appended to it's container element. + * + * For the sake of assistive technologies, the container should usually be the document body, so that the rest of the + * page content can be placed behind a virtual backdrop as well as a visual one. + */ + container?: React.ReactNode | Function; - /** - * A callback fired when the Modal is opening. - */ - onShow?: Function; + /** + * A callback fired when the Modal is opening. + */ + onShow?: Function; - /** - * A callback fired when either the backdrop is clicked, or the escape key is pressed. - * - * The `onHide` callback only signals intent from the Modal, - * you must actually set the `show` prop to `false` for the Modal to close. - */ - onHide?: Function; + /** + * A callback fired when either the backdrop is clicked, or the escape key is pressed. + * + * The `onHide` callback only signals intent from the Modal, + * you must actually set the `show` prop to `false` for the Modal to close. + */ + onHide?: Function; - /** - * Include a backdrop component. - */ - backdrop?: boolean | "static"; + /** + * Include a backdrop component. + */ + backdrop?: boolean | 'static'; - /** - * A function that returns the dialog component. Useful for custom - * rendering. **Note:** the component should make sure to apply the provided ref. - * - * ```js - * renderDialog={props => } - * ``` - */ - renderDialog?(props: any): React.ReactNode; + /** + * A function that returns the dialog component. Useful for custom + * rendering. **Note:** the component should make sure to apply the provided ref. + * + * ```js + * renderDialog={props => } + * ``` + */ + renderDialog?(props: any): React.ReactNode; - /** - * A function that returns a backdrop component. Useful for custom - * backdrop rendering. - * - * ```js - * renderBackdrop={props => } - * ``` - */ - renderBackdrop?(props: any): React.ReactNode; + /** + * A function that returns a backdrop component. Useful for custom + * backdrop rendering. + * + * ```js + * renderBackdrop={props => } + * ``` + */ + renderBackdrop?(props: any): React.ReactNode; - /** - * A callback fired when the escape key, if specified in `keyboard`, is pressed. - */ - onEscapeKeyDown?: Function; + /** + * A callback fired when the escape key, if specified in `keyboard`, is pressed. + */ + onEscapeKeyDown?: Function; - /** - * A callback fired when the backdrop, if specified, is clicked. - */ - onBackdropClick?: Function; + /** + * A callback fired when the backdrop, if specified, is clicked. + */ + onBackdropClick?: Function; - /** - * A css class or set of classes applied to the modal container when the modal is open, - * and removed when it is closed. - */ - containerClassName?: string; + /** + * A css class or set of classes applied to the modal container when the modal is open, + * and removed when it is closed. + */ + containerClassName?: string; - /** - * Close the modal when escape key is pressed - */ - keyboard?: boolean; + /** + * Close the modal when escape key is pressed + */ + keyboard?: boolean; - /** - * A `react-transition-group@2.0.0` `` component used - * to control animations for the dialog component. - */ - transition?: React.ComponentType; + /** + * A `react-transition-group@2.0.0` `` component used + * to control animations for the dialog component. + */ + transition?: React.ComponentType; - /** - * A `react-transition-group@2.0.0` `` component used - * to control animations for the backdrop components. - */ - backdropTransition?: React.ComponentType; + /** + * A `react-transition-group@2.0.0` `` component used + * to control animations for the backdrop components. + */ + backdropTransition?: React.ComponentType; - /** - * When `true` The modal will automatically shift focus to itself when it opens, and - * replace it to the last focused element when it closes. This also - * works correctly with any Modal children that have the `autoFocus` prop. - * - * Generally this should never be set to `false` as it makes the Modal less - * accessible to assistive technologies, like screen readers. - */ - autoFocus?: boolean; + /** + * When `true` The modal will automatically shift focus to itself when it opens, and + * replace it to the last focused element when it closes. This also + * works correctly with any Modal children that have the `autoFocus` prop. + * + * Generally this should never be set to `false` as it makes the Modal less + * accessible to assistive technologies, like screen readers. + */ + autoFocus?: boolean; - /** - * When `true` The modal will prevent focus from leaving the Modal while open. - * - * Generally this should never be set to `false` as it makes the Modal less - * accessible to assistive technologies, like screen readers. - */ - enforceFocus?: boolean; + /** + * When `true` The modal will prevent focus from leaving the Modal while open. + * + * Generally this should never be set to `false` as it makes the Modal less + * accessible to assistive technologies, like screen readers. + */ + enforceFocus?: boolean; - /** - * When `true` The modal will restore focus to previously focused element once - * modal is hidden - */ - restoreFocus?: boolean; + /** + * When `true` The modal will restore focus to previously focused element once + * modal is hidden + */ + restoreFocus?: boolean; - /** - * A ModalManager instance used to track and manage the state of open - * Modals. Useful when customizing how modals interact within a container - */ - manager?: ModalManager; + /** + * A ModalManager instance used to track and manage the state of open + * Modals. Useful when customizing how modals interact within a container + */ + manager?: ModalManager; } diff --git a/types/react-overlays/lib/ModalManager.d.ts b/types/react-overlays/lib/ModalManager.d.ts index 82ce4cfd26..b0e884fa63 100644 --- a/types/react-overlays/lib/ModalManager.d.ts +++ b/types/react-overlays/lib/ModalManager.d.ts @@ -1,14 +1,17 @@ import * as Modal from "./Modal"; declare class ModalManager { - constructor(opts?: { hideSiblingNodes?: boolean; handleContainerOverflow?: boolean }); - isContainerOverflowing(modal: Modal): boolean; - containerIndexFromModal(modal: Modal): number; - setContainerStyle(containerState: any, container: any): void; - removeContainerStyle(containerState: any, container: any): void; - add(modal: Modal, container: any, className?: string): number; - remove(modal: Modal): void; - isTopModal(modal: Modal): boolean; + constructor(opts?: { + hideSiblingNodes?: boolean; + handleContainerOverflow?: boolean; + }); + isContainerOverflowing(modal: Modal): boolean; + containerIndexFromModal(modal: Modal): number; + setContainerStyle(containerState: any, container: any): void; + removeContainerStyle(containerState: any, container: any): void; + add(modal: Modal, container: any, className?: string): number; + remove(modal: Modal): void; + isTopModal(modal: Modal): boolean; } -declare namespace ModalManager { } +declare namespace ModalManager {} export = ModalManager; diff --git a/types/react-overlays/lib/Overlay.d.ts b/types/react-overlays/lib/Overlay.d.ts index 09ddb730ce..a1dd140338 100644 --- a/types/react-overlays/lib/Overlay.d.ts +++ b/types/react-overlays/lib/Overlay.d.ts @@ -10,78 +10,78 @@ declare class Overlay extends React.Component {} export = Overlay; declare namespace Overlay { - type Placements = "top" | "left" | "right" | "bottom"; + type Placements = 'top' | 'left' | 'right' | 'bottom'; - interface OverlayRenderProps { - show: boolean; - placement: Placements; - outOfBoundaries?: boolean; - scheduleUpdate(): void; - props: { - ref?(element: HTMLElement): void; - style: { [key: string]: string | number }; - "aria-labelledby"?: string; - }; - arrowProps: { - ref?(element: HTMLElement): void; - style: { [key: string]: string | number }; - }; - } + interface OverlayRenderProps { + show: boolean; + placement: Placements; + outOfBoundaries?: boolean; + scheduleUpdate(): void; + props: { + ref?(element: HTMLElement): void; + style: { [key: string]: string | number }; + 'aria-labelledby'?: string; + }; + arrowProps: { + ref?(element: HTMLElement): void; + style: { [key: string]: string | number }; + }; + } - interface OverlayProps extends TransitionCallbacks, PortalProps { - /** - * Set the visibility of the Overlay - */ - show?: boolean; + interface OverlayProps extends TransitionCallbacks, PortalProps { + /** + * Set the visibility of the Overlay + */ + show?: boolean; - /** Specify where the overlay element is positioned in relation to the target element */ - placement?: Placements; + /** Specify where the overlay element is positioned in relation to the target element */ + placement?: Placements; - /** - * Enables the Popper.js `flip` modifier, allowing the Overlay to - * automatically adjust it's placement in case of overlap with the viewport or toggle. - */ - flip?: boolean; + /** + * Enables the Popper.js `flip` modifier, allowing the Overlay to + * automatically adjust it's placement in case of overlap with the viewport or toggle. + */ + flip?: boolean; - /** - * A render prop that returns an element to overlay and position. See - * the [react-popper documentation](https://github.com/FezVrasta/react-popper#children) for more info. - */ - children(renderProps: OverlayRenderProps): React.ReactElement; + /** + * A render prop that returns an element to overlay and position. See + * the [react-popper documentation](https://github.com/FezVrasta/react-popper#children) for more info. + */ + children(renderProps: OverlayRenderProps): React.ReactElement; - /** - * A set of popper options and props passed directly to react-popper's Popper component. - */ - popperConfig?: object; + /** + * A set of popper options and props passed directly to react-popper's Popper component. + */ + popperConfig?: object; - /** - * Specify whether the overlay should trigger `onHide` when the user clicks outside the overlay - */ - rootClose?: boolean; + /** + * Specify whether the overlay should trigger `onHide` when the user clicks outside the overlay + */ + rootClose?: boolean; - /** - * Specify event for toggling overlay - */ - rootCloseEvent?: RootCloseWrapper.RootCloseWrapperProps["event"]; + /** + * Specify event for toggling overlay + */ + rootCloseEvent?: RootCloseWrapper.RootCloseWrapperProps['event']; - /** - * Specify disabled for disable RootCloseWrapper - */ - rootCloseDisabled?: boolean; + /** + * Specify disabled for disable RootCloseWrapper + */ + rootCloseDisabled?: boolean; - /** - * A Callback fired by the Overlay when it wishes to be hidden. - * - * __required__ when `rootClose` is `true`. - */ - onHide?(props: PortalProps, ...args: any[]): any; + /** + * A Callback fired by the Overlay when it wishes to be hidden. + * + * __required__ when `rootClose` is `true`. + */ + onHide?(props: PortalProps, ...args: any[]): any; - /** - * A `react-transition-group@2.0.0` `` component - * used to animate the overlay as it changes visibility. - */ - transition?: React.ComponentType; + /** + * A `react-transition-group@2.0.0` `` component + * used to animate the overlay as it changes visibility. + */ + transition?: React.ComponentType; - target?: React.ReactInstance | (() => React.ReactInstance); - } + target?: React.ReactInstance | (() => React.ReactInstance); + } } diff --git a/types/react-overlays/lib/Portal.d.ts b/types/react-overlays/lib/Portal.d.ts index a3e1827c43..6236f0370c 100644 --- a/types/react-overlays/lib/Portal.d.ts +++ b/types/react-overlays/lib/Portal.d.ts @@ -1,12 +1,12 @@ import * as React from "react"; -declare class Portal extends React.Component { } +declare class Portal extends React.Component {} export = Portal; declare namespace Portal { - interface PortalProps { - container?: React.ReactNode | Function; + interface PortalProps { + container?: React.ReactNode | Function; - onRendered?: Function; - } + onRendered?: Function; + } } diff --git a/types/react-overlays/lib/RootCloseWrapper.d.ts b/types/react-overlays/lib/RootCloseWrapper.d.ts index 60186deaf3..85b785903f 100644 --- a/types/react-overlays/lib/RootCloseWrapper.d.ts +++ b/types/react-overlays/lib/RootCloseWrapper.d.ts @@ -1,31 +1,31 @@ import * as React from "react"; declare class RootCloseWrapper extends React.Component< - RootCloseWrapper.RootCloseWrapperProps + RootCloseWrapper.RootCloseWrapperProps > {} export = RootCloseWrapper; declare namespace RootCloseWrapper { - interface RootCloseWrapperProps { - /** - * Callback fired after click or mousedown. Also triggers when user hits `esc`. - */ - onRootClose?(e: React.SyntheticEvent): void; + interface RootCloseWrapperProps { + /** + * Callback fired after click or mousedown. Also triggers when user hits `esc`. + */ + onRootClose?(e: React.SyntheticEvent): void; - /** - * Children to render. - */ - children?: React.ReactNode; + /** + * Children to render. + */ + children?: React.ReactNode; - /** - * Disable the the RootCloseWrapper, preventing it from triggering - * `onRootClose`. - */ - disabled?: boolean; + /** + * Disable the the RootCloseWrapper, preventing it from triggering + * `onRootClose`. + */ + disabled?: boolean; - /** - * Choose which document mouse event to bind to - */ - event?: "click" | "mousedown"; - } + /** + * Choose which document mouse event to bind to + */ + event?: 'click' | 'mousedown'; + } } diff --git a/types/react-overlays/lib/WaitForContainer.d.ts b/types/react-overlays/lib/WaitForContainer.d.ts index c9e275639e..19c8a6e22f 100644 --- a/types/react-overlays/lib/WaitForContainer.d.ts +++ b/types/react-overlays/lib/WaitForContainer.d.ts @@ -1,17 +1,17 @@ import * as React from "react"; declare class WaitForContainer extends React.Component< - WaitForContainer.WaitForContainerProps + WaitForContainer.WaitForContainerProps > {} export = WaitForContainer; declare namespace WaitForContainer { - interface WaitForContainerProps { - /** - * "offsetParent" of the component - */ - container?: React.ReactNode | Function; + interface WaitForContainerProps { + /** + * "offsetParent" of the component + */ + container?: React.ReactNode | Function; - onContainerResolved?: Function; - } + onContainerResolved?: Function; + } } diff --git a/types/react-overlays/lib/index.d.ts b/types/react-overlays/lib/index.d.ts index fd90edd095..553ae51582 100644 --- a/types/react-overlays/lib/index.d.ts +++ b/types/react-overlays/lib/index.d.ts @@ -11,15 +11,15 @@ import RootCloseWrapper = require("./RootCloseWrapper"); import WaitForContainer = require("./WaitForContainer"); export { - Affix, - AutoAffix, - Dropdown, - DropdownMenu, - DropdownToggle, - Modal, - ModalManager, - Overlay, - Portal, - RootCloseWrapper, - WaitForContainer + Affix, + AutoAffix, + Dropdown, + DropdownMenu, + DropdownToggle, + Modal, + ModalManager, + Overlay, + Portal, + RootCloseWrapper, + WaitForContainer }; diff --git a/types/react-overlays/test/react-overlays-tests-transition.tsx b/types/react-overlays/test/react-overlays-tests-transition.tsx index f2a1769a79..24a16beb97 100644 --- a/types/react-overlays/test/react-overlays-tests-transition.tsx +++ b/types/react-overlays/test/react-overlays-tests-transition.tsx @@ -4,12 +4,12 @@ import { CSSTransition } from "react-transition-group"; import { TransitionProps } from "react-transition-group/Transition"; export function OverlayFade(props: TransitionProps): JSX.Element { - return ( - - ); + return ( + + ); } diff --git a/types/react-overlays/test/react-overlays-tests.tsx b/types/react-overlays/test/react-overlays-tests.tsx index f1465dc384..9f125e0b29 100644 --- a/types/react-overlays/test/react-overlays-tests.tsx +++ b/types/react-overlays/test/react-overlays-tests.tsx @@ -6,64 +6,64 @@ import { OverlayRenderProps } from "react-overlays/lib/Overlay"; import { OverlayFade } from "./react-overlays-tests-transition"; class TestAffix extends React.Component { - render(): JSX.Element { - return ( -
- -
Test
-
-
- ); - } + render(): JSX.Element { + return ( +
+ +
Test
+
+
+ ); + } } function renderOverlayContent({ props }: OverlayRenderProps) { - return
Popover content
; + return
Popover content
; } class TestOverlay extends React.Component<{}, { open: boolean }> { - target: HTMLElement | null = null; - state = { open: false }; + target: HTMLElement | null = null; + state = { open: false }; - render(): JSX.Element { - const { open } = this.state; + render(): JSX.Element { + const { open } = this.state; - return ( -
- + return ( +
+ - this.target} - transition={OverlayFade} - onHide={() => this.setState({ open: false })} - placement="bottom" - > - {renderOverlayContent} - -
- ); - } + this.target} + transition={OverlayFade} + onHide={() => this.setState({ open: false })} + placement="bottom" + > + {renderOverlayContent} + +
+ ); + } } class TestRootCloseWrapper extends React.Component { - handleRootClose = () => {}; - render() { - return ( - -
Test
-
- ); - } + handleRootClose = () => {}; + render() { + return ( + +
Test
+
+ ); + } } From 57f984ed30dc75aba7009f82da3714dfa0b83241 Mon Sep 17 00:00:00 2001 From: Alex Jerabek Date: Tue, 15 Jan 2019 10:18:04 -0800 Subject: [PATCH 151/160] Adding XmlSvg CoercionType to Common API --- types/office-js-preview/index.d.ts | 17 +++++++++++++++-- types/office-js/index.d.ts | 17 +++++++++++++++-- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index dec070dad5..0cbe21fa4d 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -1661,7 +1661,7 @@ declare namespace Office { * Specifies how to coerce data returned or set by the invoked method. * * @remarks - * PowerPoint supports only `Office.CoercionType.Text`, `Office.CoercionType.Image`, and `Office.CoercionType.SlideRange`. + * PowerPoint supports only `Office.CoercionType.Text`, `Office.CoercionType.Image`, `Office.CoercionType.SlideRange`, and `Office.CoercionType.XmlSvg`. * * Project supports only `Office.CoercionType.Text`. * @@ -1726,7 +1726,12 @@ declare namespace Office { * Data is returned or set as an image stream. * Note: Only applies to data in Excel, Word, and PowerPoint. */ - Image + Image, + /** + * Data is returned or set as XML data containing an SVG image. + * Note: Only applies to data in Excel, Word, and PowerPoint. + */ + XmlSvg } /** * Specifies whether the document in the associated application is read-only or read-write. @@ -3543,6 +3548,10 @@ declare namespace Office { * PowerPoint and PowerPoint Online * `Office.CoercionType.SlideRange` * + * + * Excel, PowerPoint, and Word + * `Office.CoercionType.XmlSvg` + * * * * **Support details** @@ -3710,6 +3719,10 @@ declare namespace Office { * PowerPoint and PowerPoint Online * `Office.CoercionType.SlideRange` * + * + * Excel, PowerPoint, and Word + * `Office.CoercionType.XmlSvg` + * * * * **Support details** diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 005e9cf037..b15cd3653a 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -1661,7 +1661,7 @@ declare namespace Office { * Specifies how to coerce data returned or set by the invoked method. * * @remarks - * PowerPoint supports only `Office.CoercionType.Text`, `Office.CoercionType.Image`, and `Office.CoercionType.SlideRange`. + * PowerPoint supports only `Office.CoercionType.Text`, `Office.CoercionType.Image`, `Office.CoercionType.SlideRange`, and `Office.CoercionType.XmlSvg`. * * Project supports only `Office.CoercionType.Text`. * @@ -1726,7 +1726,12 @@ declare namespace Office { * Data is returned or set as an image stream. * Note: Only applies to data in Excel, Word, and PowerPoint. */ - Image + Image, + /** + * Data is returned or set as XML data containing an SVG image. + * Note: Only applies to data in Excel, Word, and PowerPoint. + */ + XmlSvg } /** * Specifies whether the document in the associated application is read-only or read-write. @@ -3543,6 +3548,10 @@ declare namespace Office { * PowerPoint and PowerPoint Online * `Office.CoercionType.SlideRange` * + * + * Excel, PowerPoint, and Word + * `Office.CoercionType.XmlSvg` + * * * * **Support details** @@ -3710,6 +3719,10 @@ declare namespace Office { * PowerPoint and PowerPoint Online * `Office.CoercionType.SlideRange` * + * + * Excel, PowerPoint, and Word + * `Office.CoercionType.XmlSvg` + * * * * **Support details** From 484fe56a1599b3f71e475d1f32bdff716544f680 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 16 Jan 2019 00:24:53 +0100 Subject: [PATCH 152/160] [semver-regex] Add types --- types/semver-regex/index.d.ts | 8 ++++++++ types/semver-regex/semver-regex-tests.ts | 3 +++ types/semver-regex/tsconfig.json | 23 +++++++++++++++++++++++ types/semver-regex/tslint.json | 1 + 4 files changed, 35 insertions(+) create mode 100644 types/semver-regex/index.d.ts create mode 100644 types/semver-regex/semver-regex-tests.ts create mode 100644 types/semver-regex/tsconfig.json create mode 100644 types/semver-regex/tslint.json diff --git a/types/semver-regex/index.d.ts b/types/semver-regex/index.d.ts new file mode 100644 index 0000000000..9cadd84791 --- /dev/null +++ b/types/semver-regex/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for semver-regex 2.0 +// Project: https://github.com/sindresorhus/semver-regex#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = semverRegex; + +declare function semverRegex(): RegExp; diff --git a/types/semver-regex/semver-regex-tests.ts b/types/semver-regex/semver-regex-tests.ts new file mode 100644 index 0000000000..3699d0b801 --- /dev/null +++ b/types/semver-regex/semver-regex-tests.ts @@ -0,0 +1,3 @@ +import semverRegex = require('semver-regex'); + +semverRegex(); // $ExpectType RegExp diff --git a/types/semver-regex/tsconfig.json b/types/semver-regex/tsconfig.json new file mode 100644 index 0000000000..372170a05a --- /dev/null +++ b/types/semver-regex/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "semver-regex-tests.ts" + ] +} diff --git a/types/semver-regex/tslint.json b/types/semver-regex/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/semver-regex/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 0932fbb3ab6981ab1c6ad5663b7b79361b53f859 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 16 Jan 2019 00:30:37 +0100 Subject: [PATCH 153/160] [latest-semver] Add types --- types/latest-semver/index.d.ts | 8 ++++++++ types/latest-semver/latest-semver-tests.ts | 4 ++++ types/latest-semver/tsconfig.json | 23 ++++++++++++++++++++++ types/latest-semver/tslint.json | 1 + 4 files changed, 36 insertions(+) create mode 100644 types/latest-semver/index.d.ts create mode 100644 types/latest-semver/latest-semver-tests.ts create mode 100644 types/latest-semver/tsconfig.json create mode 100644 types/latest-semver/tslint.json diff --git a/types/latest-semver/index.d.ts b/types/latest-semver/index.d.ts new file mode 100644 index 0000000000..761a487b88 --- /dev/null +++ b/types/latest-semver/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for latest-semver 1.0 +// Project: https://github.com/sindresorhus/latest-semver#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = latestSemver; + +declare function latestSemver(versions: string[]): string | undefined; diff --git a/types/latest-semver/latest-semver-tests.ts b/types/latest-semver/latest-semver-tests.ts new file mode 100644 index 0000000000..ec8312e467 --- /dev/null +++ b/types/latest-semver/latest-semver-tests.ts @@ -0,0 +1,4 @@ +import latestSemver = require('latest-semver'); + +// $ExpectType string | undefined +latestSemver(['v1.8.0-alpha.1', 'v1.3.16', 'v1.7.0', 'v1.6.9']); diff --git a/types/latest-semver/tsconfig.json b/types/latest-semver/tsconfig.json new file mode 100644 index 0000000000..54f1df51e2 --- /dev/null +++ b/types/latest-semver/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "latest-semver-tests.ts" + ] +} diff --git a/types/latest-semver/tslint.json b/types/latest-semver/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/latest-semver/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From e21660afaadfdcd7f7a0592763d6abbcb05f6f10 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 16 Jan 2019 00:44:11 +0100 Subject: [PATCH 154/160] [to-semver] Add types --- types/to-semver/index.d.ts | 26 ++++++++++++++++++++++++++ types/to-semver/to-semver-tests.ts | 3 +++ types/to-semver/tsconfig.json | 23 +++++++++++++++++++++++ types/to-semver/tslint.json | 1 + 4 files changed, 53 insertions(+) create mode 100644 types/to-semver/index.d.ts create mode 100644 types/to-semver/to-semver-tests.ts create mode 100644 types/to-semver/tsconfig.json create mode 100644 types/to-semver/tslint.json diff --git a/types/to-semver/index.d.ts b/types/to-semver/index.d.ts new file mode 100644 index 0000000000..813c77378d --- /dev/null +++ b/types/to-semver/index.d.ts @@ -0,0 +1,26 @@ +// Type definitions for to-semver 1.1 +// Project: https://github.com/sindresorhus/to-semver#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = toSemver; + +/** + * Get an array of valid, sorted, and cleaned [semver](http://semver.org/) versions from an array of strings. + */ +declare function toSemver(versions: string[], options?: toSemver.Options): string[]; + +declare namespace toSemver { + interface Options { + /** + * Include prereleases, like `1.2.3-alpha.3`. + * @default true + */ + includePrereleases?: boolean; + /** + * Clean versions. For example `v1.3.0` → `1.3.0`. + * @default true + */ + clean?: boolean; + } +} diff --git a/types/to-semver/to-semver-tests.ts b/types/to-semver/to-semver-tests.ts new file mode 100644 index 0000000000..5599c594d1 --- /dev/null +++ b/types/to-semver/to-semver-tests.ts @@ -0,0 +1,3 @@ +import toSemver = require('to-semver'); + +toSemver(['v1.3.16', 'v1.7.0', 'test', 'v1.6.9']); // $ExpectType string[] diff --git a/types/to-semver/tsconfig.json b/types/to-semver/tsconfig.json new file mode 100644 index 0000000000..0584eb2068 --- /dev/null +++ b/types/to-semver/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "to-semver-tests.ts" + ] +} diff --git a/types/to-semver/tslint.json b/types/to-semver/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/to-semver/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 70d71f7c5e5c663bf3947a59a3b8ce76816a241c Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 15 Jan 2019 15:47:23 -0800 Subject: [PATCH 155/160] Update .editorconfig --- .editorconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 404ff0701c..fc4ed3486f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -5,5 +5,5 @@ indent_size = 4 trim_trailing_whitespace = true insert_final_newline = true -[{*.json,*.yml,*.ts}] +[{*.json,*.yml,*.ts,*.tsx,*.md}] indent_style = space From dadf587ca5cf93c57eb539fd238a414212ebb2dd Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 16 Jan 2019 00:56:31 +0100 Subject: [PATCH 156/160] [semver-truncate] Add types --- types/semver-truncate/index.d.ts | 8 +++++++ .../semver-truncate/semver-truncate-tests.ts | 5 ++++ types/semver-truncate/tsconfig.json | 23 +++++++++++++++++++ types/semver-truncate/tslint.json | 1 + 4 files changed, 37 insertions(+) create mode 100644 types/semver-truncate/index.d.ts create mode 100644 types/semver-truncate/semver-truncate-tests.ts create mode 100644 types/semver-truncate/tsconfig.json create mode 100644 types/semver-truncate/tslint.json diff --git a/types/semver-truncate/index.d.ts b/types/semver-truncate/index.d.ts new file mode 100644 index 0000000000..bc00aa959f --- /dev/null +++ b/types/semver-truncate/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for semver-truncate 1.1 +// Project: https://github.com/sindresorhus/semver-truncate#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = semverTruncate; + +declare function semverTruncate(version: string, type: 'patch' | 'minor' | 'major'): string; diff --git a/types/semver-truncate/semver-truncate-tests.ts b/types/semver-truncate/semver-truncate-tests.ts new file mode 100644 index 0000000000..2f32560ca3 --- /dev/null +++ b/types/semver-truncate/semver-truncate-tests.ts @@ -0,0 +1,5 @@ +import semverTruncate = require('semver-truncate'); + +semverTruncate('1.2.3-foo', 'patch'); // $ExpectType string +semverTruncate('1.2.3', 'minor'); // $ExpectType string +semverTruncate('1.2.3', 'major'); // $ExpectType string diff --git a/types/semver-truncate/tsconfig.json b/types/semver-truncate/tsconfig.json new file mode 100644 index 0000000000..86ba69e880 --- /dev/null +++ b/types/semver-truncate/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "semver-truncate-tests.ts" + ] +} diff --git a/types/semver-truncate/tslint.json b/types/semver-truncate/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/semver-truncate/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 114ad8215d8635baaf8356bebd56aa68bd50bd1f Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 15 Jan 2019 15:57:00 -0800 Subject: [PATCH 157/160] Revert back to spaces. --- types/react-overlays/index.d.ts | 70 +++---- types/react-overlays/lib/Affix.d.ts | 126 +++++------ types/react-overlays/lib/AutoAffix.d.ts | 18 +- types/react-overlays/lib/Dropdown.d.ts | 78 +++---- types/react-overlays/lib/DropdownMenu.d.ts | 76 +++---- types/react-overlays/lib/DropdownToggle.d.ts | 40 ++-- types/react-overlays/lib/Modal.d.ts | 198 +++++++++--------- types/react-overlays/lib/ModalManager.d.ts | 22 +- types/react-overlays/lib/Overlay.d.ts | 124 +++++------ types/react-overlays/lib/Portal.d.ts | 8 +- .../react-overlays/lib/RootCloseWrapper.d.ts | 40 ++-- .../react-overlays/lib/WaitForContainer.d.ts | 16 +- types/react-overlays/lib/index.d.ts | 22 +- .../test/react-overlays-tests-transition.tsx | 16 +- .../test/react-overlays-tests.tsx | 96 ++++----- 15 files changed, 475 insertions(+), 475 deletions(-) diff --git a/types/react-overlays/index.d.ts b/types/react-overlays/index.d.ts index 82fd64bfdc..59475d3c29 100644 --- a/types/react-overlays/index.d.ts +++ b/types/react-overlays/index.d.ts @@ -8,48 +8,48 @@ import * as React from "react"; export { - Affix, - AutoAffix, - Modal, - ModalManager, - Overlay, - Portal, - Dropdown, - DropdownMenu, - DropdownToggle, - RootCloseWrapper, - WaitForContainer + Affix, + AutoAffix, + Modal, + ModalManager, + Overlay, + Portal, + Dropdown, + DropdownMenu, + DropdownToggle, + RootCloseWrapper, + WaitForContainer } from './lib'; // these callbacks are used in a few components export interface TransitionCallbacks { - /** - * Callback fired before the Overlay transitions in - */ - onEnter?(node: HTMLElement): any; + /** + * Callback fired before the Overlay transitions in + */ + onEnter?(node: HTMLElement): any; - /** - * Callback fired as the Overlay begins to transition in - */ - onEntering?(node: HTMLElement): any; + /** + * Callback fired as the Overlay begins to transition in + */ + onEntering?(node: HTMLElement): any; - /** - * Callback fired after the Overlay finishes transitioning in - */ - onEntered?(node: HTMLElement): any; + /** + * Callback fired after the Overlay finishes transitioning in + */ + onEntered?(node: HTMLElement): any; - /** - * Callback fired right before the Overlay transitions out - */ - onExit?(node: HTMLElement): any; + /** + * Callback fired right before the Overlay transitions out + */ + onExit?(node: HTMLElement): any; - /** - * Callback fired as the Overlay begins to transition out - */ - onExiting?(node: HTMLElement): any; + /** + * Callback fired as the Overlay begins to transition out + */ + onExiting?(node: HTMLElement): any; - /** - * Callback fired after the Overlay finishes transitioning out - */ - onExited?(node: HTMLElement): any; + /** + * Callback fired after the Overlay finishes transitioning out + */ + onExited?(node: HTMLElement): any; } diff --git a/types/react-overlays/lib/Affix.d.ts b/types/react-overlays/lib/Affix.d.ts index a3be5662a0..abe04230ff 100644 --- a/types/react-overlays/lib/Affix.d.ts +++ b/types/react-overlays/lib/Affix.d.ts @@ -4,81 +4,81 @@ declare class Affix extends React.Component {} export = Affix; declare namespace Affix { - // put AffixProps inside the exported namespace so it's importable in AutoAffix - interface AffixProps { - /** - * Pixels to offset from top of screen when calculating position - */ - offsetTop?: number; + // put AffixProps inside the exported namespace so it's importable in AutoAffix + interface AffixProps { + /** + * Pixels to offset from top of screen when calculating position + */ + offsetTop?: number; - /** - * When affixed, pixels to offset from top of viewport - */ - viewportOffsetTop?: number; + /** + * When affixed, pixels to offset from top of viewport + */ + viewportOffsetTop?: number; - /** - * Pixels to offset from bottom of screen when calculating position - */ - offsetBottom?: number; + /** + * Pixels to offset from bottom of screen when calculating position + */ + offsetBottom?: number; - /** - * CSS class or classes to apply when at top - */ - topClassName?: string; + /** + * CSS class or classes to apply when at top + */ + topClassName?: string; - /** - * Style to apply when at top - */ - topStyle?: React.CSSProperties; + /** + * Style to apply when at top + */ + topStyle?: React.CSSProperties; - /** - * CSS class or classes to apply when affixed - */ - affixClassName?: string; + /** + * CSS class or classes to apply when affixed + */ + affixClassName?: string; - /** - * Style to apply when affixed - */ - affixStyle?: React.CSSProperties; + /** + * Style to apply when affixed + */ + affixStyle?: React.CSSProperties; - /** - * CSS class or classes to apply when at bottom - */ - bottomClassName?: string; + /** + * CSS class or classes to apply when at bottom + */ + bottomClassName?: string; - /** - * Style to apply when at bottom - */ - bottomStyle?: React.CSSProperties; + /** + * Style to apply when at bottom + */ + bottomStyle?: React.CSSProperties; - /** - * Callback fired when the right before the `affixStyle` and `affixStyle` props are rendered - */ - onAffix?(): void; + /** + * Callback fired when the right before the `affixStyle` and `affixStyle` props are rendered + */ + onAffix?(): void; - /** - * Callback fired after the component `affixStyle` and `affixClassName` props have been rendered. - */ - onAffixed?(): void; + /** + * Callback fired after the component `affixStyle` and `affixClassName` props have been rendered. + */ + onAffixed?(): void; - /** - * Callback fired when the right before the `topStyle` and `topClassName` props are rendered - */ - onAffixTop?(): void; + /** + * Callback fired when the right before the `topStyle` and `topClassName` props are rendered + */ + onAffixTop?(): void; - /** - * Callback fired after the component `topStyle` and `topClassName` props have been rendered. - */ - onAffixedTop?(): void; + /** + * Callback fired after the component `topStyle` and `topClassName` props have been rendered. + */ + onAffixedTop?(): void; - /** - * Callback fired when the right before the `bottomStyle` and `bottomClassName` props are rendered - */ - onAffixBottom?(): void; + /** + * Callback fired when the right before the `bottomStyle` and `bottomClassName` props are rendered + */ + onAffixBottom?(): void; - /** - * Callback fired after the component `bottomStyle` and `bottomClassName` props have been rendered. - */ - onAffixedBottom?(): void; - } + /** + * Callback fired after the component `bottomStyle` and `bottomClassName` props have been rendered. + */ + onAffixedBottom?(): void; + } } diff --git a/types/react-overlays/lib/AutoAffix.d.ts b/types/react-overlays/lib/AutoAffix.d.ts index 2b91ac582c..fb239106a0 100644 --- a/types/react-overlays/lib/AutoAffix.d.ts +++ b/types/react-overlays/lib/AutoAffix.d.ts @@ -7,14 +7,14 @@ declare namespace AutoAffix {} export = AutoAffix; interface AutoAffixProps extends AffixProps { - /** - * The logical container node or component for determining offset from bottom - * of viewport, or a function that returns it - */ - container?: React.ReactInstance | (() => React.ReactInstance); + /** + * The logical container node or component for determining offset from bottom + * of viewport, or a function that returns it + */ + container?: React.ReactInstance | (() => React.ReactInstance); - /** - * Automatically set width when affixed - */ - autoWidth?: boolean; + /** + * Automatically set width when affixed + */ + autoWidth?: boolean; } diff --git a/types/react-overlays/lib/Dropdown.d.ts b/types/react-overlays/lib/Dropdown.d.ts index 356f5d4f08..ebd4c298af 100644 --- a/types/react-overlays/lib/Dropdown.d.ts +++ b/types/react-overlays/lib/Dropdown.d.ts @@ -4,54 +4,54 @@ import DropdownMenu = require("./DropdownMenu"); import DropdownToggle = require("./DropdownToggle"); declare class Dropdown extends React.Component { - static Menu: typeof DropdownMenu; - static Toggle: typeof DropdownToggle; + static Menu: typeof DropdownMenu; + static Toggle: typeof DropdownToggle; } export = Dropdown; declare namespace Dropdown { - interface DropdownRenderProps { - props: { - onKeyDown(event: React.SyntheticEvent): void; - }; - } + interface DropdownRenderProps { + props: { + onKeyDown(event: React.SyntheticEvent): void; + }; + } - type Directions = 'up' | 'left' | 'right' | 'down'; + type Directions = 'up' | 'left' | 'right' | 'down'; - interface DropdownProps { - /** - * A render prop that returns the root dropdown element. The `props` - * argument should spread through to an element containing _both_ the - * menu and toggle in order to handle keyboard events for focus management. - */ - children(renderProps: DropdownRenderProps): React.ReactElement; + interface DropdownProps { + /** + * A render prop that returns the root dropdown element. The `props` + * argument should spread through to an element containing _both_ the + * menu and toggle in order to handle keyboard events for focus management. + */ + children(renderProps: DropdownRenderProps): React.ReactElement; - /** - * Determines the direction and location of the Menu in relation to it's Toggle. - */ - drop?: Directions; + /** + * Determines the direction and location of the Menu in relation to it's Toggle. + */ + drop?: Directions; - /** - * A css slector string that will return __focusable__ menu items. - * Selectors should be relative to the menu component: - * e.g. ` > li:not('.disabled')` - */ - itemSelector?: string; + /** + * A css slector string that will return __focusable__ menu items. + * Selectors should be relative to the menu component: + * e.g. ` > li:not('.disabled')` + */ + itemSelector?: string; - /** - * Align the menu to the 'end' side of the placement side of the Dropdown toggle. The default placement is `top-start` or `bottom-start`. - */ - alignEnd?: boolean; + /** + * Align the menu to the 'end' side of the placement side of the Dropdown toggle. The default placement is `top-start` or `bottom-start`. + */ + alignEnd?: boolean; - /** - * Whether or not the Dropdown is visible - */ - show?: boolean; + /** + * Whether or not the Dropdown is visible + */ + show?: boolean; - /** - * A callback fired when the Dropdown wishes to change visibility. Called with the requested - * `show` value, the DOM event, and the source that fired it: `'click'`,`'keydown'`,`'rootClose'`, or `'select'`. - */ - onToggle?(isOpen: boolean, event: React.SyntheticEvent): void; - } + /** + * A callback fired when the Dropdown wishes to change visibility. Called with the requested + * `show` value, the DOM event, and the source that fired it: `'click'`,`'keydown'`,`'rootClose'`, or `'select'`. + */ + onToggle?(isOpen: boolean, event: React.SyntheticEvent): void; + } } diff --git a/types/react-overlays/lib/DropdownMenu.d.ts b/types/react-overlays/lib/DropdownMenu.d.ts index 43f96f806d..c4a9090dcc 100644 --- a/types/react-overlays/lib/DropdownMenu.d.ts +++ b/types/react-overlays/lib/DropdownMenu.d.ts @@ -3,53 +3,53 @@ import * as React from "react"; import Overlay = require("./Overlay"); declare class DropdownMenu extends React.Component< - DropdownMenu.DropdownMenuProps + DropdownMenu.DropdownMenuProps > {} export = DropdownMenu; declare namespace DropdownMenu { - interface DropdownMenuRenderProps extends Overlay.OverlayRenderProps { - alignEnd: boolean; - close(event: React.SyntheticEvent): void; - } + interface DropdownMenuRenderProps extends Overlay.OverlayRenderProps { + alignEnd: boolean; + close(event: React.SyntheticEvent): void; + } - interface DropdownMenuProps { - /** - * A render prop that returns a Menu element. The `props` - * argument should spread through to **a component that can accept a ref**. - */ - children(renderProps: DropdownMenuRenderProps): React.ReactElement; + interface DropdownMenuProps { + /** + * A render prop that returns a Menu element. The `props` + * argument should spread through to **a component that can accept a ref**. + */ + children(renderProps: DropdownMenuRenderProps): React.ReactElement; - /** - * Controls the visible state of the menu, generally this is - * provided by the parent `Dropdown` component, - * but may also be specified as a prop directly. - */ - show?: boolean; + /** + * Controls the visible state of the menu, generally this is + * provided by the parent `Dropdown` component, + * but may also be specified as a prop directly. + */ + show?: boolean; - /** - * Aligns the dropdown menu to the 'end' of it's placement position. - * Generally this is provided by the parent `Dropdown` component, - * but may also be specified as a prop directly. - */ - alignEnd?: boolean; + /** + * Aligns the dropdown menu to the 'end' of it's placement position. + * Generally this is provided by the parent `Dropdown` component, + * but may also be specified as a prop directly. + */ + alignEnd?: boolean; - /** - * Enables the Popper.js `flip` modifier, allowing the Dropdown to - * automatically adjust it's placement in case of overlap with the viewport or toggle. - */ - flip?: boolean; + /** + * Enables the Popper.js `flip` modifier, allowing the Dropdown to + * automatically adjust it's placement in case of overlap with the viewport or toggle. + */ + flip?: boolean; - usePopper?: boolean; + usePopper?: boolean; - /** - * A set of popper options and props passed directly to react-popper's Popper component. - */ - popperConfig?: object; + /** + * A set of popper options and props passed directly to react-popper's Popper component. + */ + popperConfig?: object; - /** - * Override the default event used by RootCloseWrapper. - */ - rootCloseEvent?: string; - } + /** + * Override the default event used by RootCloseWrapper. + */ + rootCloseEvent?: string; + } } diff --git a/types/react-overlays/lib/DropdownToggle.d.ts b/types/react-overlays/lib/DropdownToggle.d.ts index 136a929ad2..d2838e8fd1 100644 --- a/types/react-overlays/lib/DropdownToggle.d.ts +++ b/types/react-overlays/lib/DropdownToggle.d.ts @@ -1,29 +1,29 @@ import * as React from "react"; declare class DropdownToggle extends React.Component< - DropdownToggle.DropdownToggleProps + DropdownToggle.DropdownToggleProps > {} export = DropdownToggle; declare namespace DropdownToggle { - interface DropdownToggleRenderProps { - show: boolean; - toggle(show: boolean): void; - props: { - ref?(element: HTMLElement): void; - 'aria-haspopup': true; - 'aria-expanded': boolean; - }; - } + interface DropdownToggleRenderProps { + show: boolean; + toggle(show: boolean): void; + props: { + ref?(element: HTMLElement): void; + 'aria-haspopup': true; + 'aria-expanded': boolean; + }; + } - interface DropdownToggleProps { - /** - * A render prop that returns a Toggle element. The `props` - * argument should spread through to **a component that can accept a ref**. Use - * the `onToggle` argument to toggle the menu open or closed - */ - children( - renderProps: DropdownToggleRenderProps - ): React.ReactElement; - } + interface DropdownToggleProps { + /** + * A render prop that returns a Toggle element. The `props` + * argument should spread through to **a component that can accept a ref**. Use + * the `onToggle` argument to toggle the menu open or closed + */ + children( + renderProps: DropdownToggleRenderProps + ): React.ReactElement; + } } diff --git a/types/react-overlays/lib/Modal.d.ts b/types/react-overlays/lib/Modal.d.ts index 3d6b4e06c6..c7fcb7a4e9 100644 --- a/types/react-overlays/lib/Modal.d.ts +++ b/types/react-overlays/lib/Modal.d.ts @@ -7,125 +7,125 @@ import * as ModalManager from "./ModalManager"; import { PortalProps } from "./Portal"; declare class Modal extends React.Component { - public static Manager: ModalManager; + public static Manager: ModalManager; } declare namespace Modal {} export = Modal; interface ModalProps extends TransitionCallbacks, PortalProps { - className?: string; + className?: string; - /** - * Set the visibility of the Modal - */ - show?: boolean; + /** + * Set the visibility of the Modal + */ + show?: boolean; - /** - * A Node, Component instance, or function that returns either. The Modal is appended to it's container element. - * - * For the sake of assistive technologies, the container should usually be the document body, so that the rest of the - * page content can be placed behind a virtual backdrop as well as a visual one. - */ - container?: React.ReactNode | Function; + /** + * A Node, Component instance, or function that returns either. The Modal is appended to it's container element. + * + * For the sake of assistive technologies, the container should usually be the document body, so that the rest of the + * page content can be placed behind a virtual backdrop as well as a visual one. + */ + container?: React.ReactNode | Function; - /** - * A callback fired when the Modal is opening. - */ - onShow?: Function; + /** + * A callback fired when the Modal is opening. + */ + onShow?: Function; - /** - * A callback fired when either the backdrop is clicked, or the escape key is pressed. - * - * The `onHide` callback only signals intent from the Modal, - * you must actually set the `show` prop to `false` for the Modal to close. - */ - onHide?: Function; + /** + * A callback fired when either the backdrop is clicked, or the escape key is pressed. + * + * The `onHide` callback only signals intent from the Modal, + * you must actually set the `show` prop to `false` for the Modal to close. + */ + onHide?: Function; - /** - * Include a backdrop component. - */ - backdrop?: boolean | 'static'; + /** + * Include a backdrop component. + */ + backdrop?: boolean | 'static'; - /** - * A function that returns the dialog component. Useful for custom - * rendering. **Note:** the component should make sure to apply the provided ref. - * - * ```js - * renderDialog={props => } - * ``` - */ - renderDialog?(props: any): React.ReactNode; + /** + * A function that returns the dialog component. Useful for custom + * rendering. **Note:** the component should make sure to apply the provided ref. + * + * ```js + * renderDialog={props => } + * ``` + */ + renderDialog?(props: any): React.ReactNode; - /** - * A function that returns a backdrop component. Useful for custom - * backdrop rendering. - * - * ```js - * renderBackdrop={props => } - * ``` - */ - renderBackdrop?(props: any): React.ReactNode; + /** + * A function that returns a backdrop component. Useful for custom + * backdrop rendering. + * + * ```js + * renderBackdrop={props => } + * ``` + */ + renderBackdrop?(props: any): React.ReactNode; - /** - * A callback fired when the escape key, if specified in `keyboard`, is pressed. - */ - onEscapeKeyDown?: Function; + /** + * A callback fired when the escape key, if specified in `keyboard`, is pressed. + */ + onEscapeKeyDown?: Function; - /** - * A callback fired when the backdrop, if specified, is clicked. - */ - onBackdropClick?: Function; + /** + * A callback fired when the backdrop, if specified, is clicked. + */ + onBackdropClick?: Function; - /** - * A css class or set of classes applied to the modal container when the modal is open, - * and removed when it is closed. - */ - containerClassName?: string; + /** + * A css class or set of classes applied to the modal container when the modal is open, + * and removed when it is closed. + */ + containerClassName?: string; - /** - * Close the modal when escape key is pressed - */ - keyboard?: boolean; + /** + * Close the modal when escape key is pressed + */ + keyboard?: boolean; - /** - * A `react-transition-group@2.0.0` `` component used - * to control animations for the dialog component. - */ - transition?: React.ComponentType; + /** + * A `react-transition-group@2.0.0` `` component used + * to control animations for the dialog component. + */ + transition?: React.ComponentType; - /** - * A `react-transition-group@2.0.0` `` component used - * to control animations for the backdrop components. - */ - backdropTransition?: React.ComponentType; + /** + * A `react-transition-group@2.0.0` `` component used + * to control animations for the backdrop components. + */ + backdropTransition?: React.ComponentType; - /** - * When `true` The modal will automatically shift focus to itself when it opens, and - * replace it to the last focused element when it closes. This also - * works correctly with any Modal children that have the `autoFocus` prop. - * - * Generally this should never be set to `false` as it makes the Modal less - * accessible to assistive technologies, like screen readers. - */ - autoFocus?: boolean; + /** + * When `true` The modal will automatically shift focus to itself when it opens, and + * replace it to the last focused element when it closes. This also + * works correctly with any Modal children that have the `autoFocus` prop. + * + * Generally this should never be set to `false` as it makes the Modal less + * accessible to assistive technologies, like screen readers. + */ + autoFocus?: boolean; - /** - * When `true` The modal will prevent focus from leaving the Modal while open. - * - * Generally this should never be set to `false` as it makes the Modal less - * accessible to assistive technologies, like screen readers. - */ - enforceFocus?: boolean; + /** + * When `true` The modal will prevent focus from leaving the Modal while open. + * + * Generally this should never be set to `false` as it makes the Modal less + * accessible to assistive technologies, like screen readers. + */ + enforceFocus?: boolean; - /** - * When `true` The modal will restore focus to previously focused element once - * modal is hidden - */ - restoreFocus?: boolean; + /** + * When `true` The modal will restore focus to previously focused element once + * modal is hidden + */ + restoreFocus?: boolean; - /** - * A ModalManager instance used to track and manage the state of open - * Modals. Useful when customizing how modals interact within a container - */ - manager?: ModalManager; + /** + * A ModalManager instance used to track and manage the state of open + * Modals. Useful when customizing how modals interact within a container + */ + manager?: ModalManager; } diff --git a/types/react-overlays/lib/ModalManager.d.ts b/types/react-overlays/lib/ModalManager.d.ts index b0e884fa63..2a63eb23ab 100644 --- a/types/react-overlays/lib/ModalManager.d.ts +++ b/types/react-overlays/lib/ModalManager.d.ts @@ -1,17 +1,17 @@ import * as Modal from "./Modal"; declare class ModalManager { - constructor(opts?: { - hideSiblingNodes?: boolean; - handleContainerOverflow?: boolean; - }); - isContainerOverflowing(modal: Modal): boolean; - containerIndexFromModal(modal: Modal): number; - setContainerStyle(containerState: any, container: any): void; - removeContainerStyle(containerState: any, container: any): void; - add(modal: Modal, container: any, className?: string): number; - remove(modal: Modal): void; - isTopModal(modal: Modal): boolean; + constructor(opts?: { + hideSiblingNodes?: boolean; + handleContainerOverflow?: boolean; + }); + isContainerOverflowing(modal: Modal): boolean; + containerIndexFromModal(modal: Modal): number; + setContainerStyle(containerState: any, container: any): void; + removeContainerStyle(containerState: any, container: any): void; + add(modal: Modal, container: any, className?: string): number; + remove(modal: Modal): void; + isTopModal(modal: Modal): boolean; } declare namespace ModalManager {} export = ModalManager; diff --git a/types/react-overlays/lib/Overlay.d.ts b/types/react-overlays/lib/Overlay.d.ts index a1dd140338..c374846188 100644 --- a/types/react-overlays/lib/Overlay.d.ts +++ b/types/react-overlays/lib/Overlay.d.ts @@ -10,78 +10,78 @@ declare class Overlay extends React.Component {} export = Overlay; declare namespace Overlay { - type Placements = 'top' | 'left' | 'right' | 'bottom'; + type Placements = 'top' | 'left' | 'right' | 'bottom'; - interface OverlayRenderProps { - show: boolean; - placement: Placements; - outOfBoundaries?: boolean; - scheduleUpdate(): void; - props: { - ref?(element: HTMLElement): void; - style: { [key: string]: string | number }; - 'aria-labelledby'?: string; - }; - arrowProps: { - ref?(element: HTMLElement): void; - style: { [key: string]: string | number }; - }; - } + interface OverlayRenderProps { + show: boolean; + placement: Placements; + outOfBoundaries?: boolean; + scheduleUpdate(): void; + props: { + ref?(element: HTMLElement): void; + style: { [key: string]: string | number }; + 'aria-labelledby'?: string; + }; + arrowProps: { + ref?(element: HTMLElement): void; + style: { [key: string]: string | number }; + }; + } - interface OverlayProps extends TransitionCallbacks, PortalProps { - /** - * Set the visibility of the Overlay - */ - show?: boolean; + interface OverlayProps extends TransitionCallbacks, PortalProps { + /** + * Set the visibility of the Overlay + */ + show?: boolean; - /** Specify where the overlay element is positioned in relation to the target element */ - placement?: Placements; + /** Specify where the overlay element is positioned in relation to the target element */ + placement?: Placements; - /** - * Enables the Popper.js `flip` modifier, allowing the Overlay to - * automatically adjust it's placement in case of overlap with the viewport or toggle. - */ - flip?: boolean; + /** + * Enables the Popper.js `flip` modifier, allowing the Overlay to + * automatically adjust it's placement in case of overlap with the viewport or toggle. + */ + flip?: boolean; - /** - * A render prop that returns an element to overlay and position. See - * the [react-popper documentation](https://github.com/FezVrasta/react-popper#children) for more info. - */ - children(renderProps: OverlayRenderProps): React.ReactElement; + /** + * A render prop that returns an element to overlay and position. See + * the [react-popper documentation](https://github.com/FezVrasta/react-popper#children) for more info. + */ + children(renderProps: OverlayRenderProps): React.ReactElement; - /** - * A set of popper options and props passed directly to react-popper's Popper component. - */ - popperConfig?: object; + /** + * A set of popper options and props passed directly to react-popper's Popper component. + */ + popperConfig?: object; - /** - * Specify whether the overlay should trigger `onHide` when the user clicks outside the overlay - */ - rootClose?: boolean; + /** + * Specify whether the overlay should trigger `onHide` when the user clicks outside the overlay + */ + rootClose?: boolean; - /** - * Specify event for toggling overlay - */ - rootCloseEvent?: RootCloseWrapper.RootCloseWrapperProps['event']; + /** + * Specify event for toggling overlay + */ + rootCloseEvent?: RootCloseWrapper.RootCloseWrapperProps['event']; - /** - * Specify disabled for disable RootCloseWrapper - */ - rootCloseDisabled?: boolean; + /** + * Specify disabled for disable RootCloseWrapper + */ + rootCloseDisabled?: boolean; - /** - * A Callback fired by the Overlay when it wishes to be hidden. - * - * __required__ when `rootClose` is `true`. - */ - onHide?(props: PortalProps, ...args: any[]): any; + /** + * A Callback fired by the Overlay when it wishes to be hidden. + * + * __required__ when `rootClose` is `true`. + */ + onHide?(props: PortalProps, ...args: any[]): any; - /** - * A `react-transition-group@2.0.0` `` component - * used to animate the overlay as it changes visibility. - */ - transition?: React.ComponentType; + /** + * A `react-transition-group@2.0.0` `` component + * used to animate the overlay as it changes visibility. + */ + transition?: React.ComponentType; - target?: React.ReactInstance | (() => React.ReactInstance); - } + target?: React.ReactInstance | (() => React.ReactInstance); + } } diff --git a/types/react-overlays/lib/Portal.d.ts b/types/react-overlays/lib/Portal.d.ts index 6236f0370c..c23645b008 100644 --- a/types/react-overlays/lib/Portal.d.ts +++ b/types/react-overlays/lib/Portal.d.ts @@ -4,9 +4,9 @@ declare class Portal extends React.Component {} export = Portal; declare namespace Portal { - interface PortalProps { - container?: React.ReactNode | Function; + interface PortalProps { + container?: React.ReactNode | Function; - onRendered?: Function; - } + onRendered?: Function; + } } diff --git a/types/react-overlays/lib/RootCloseWrapper.d.ts b/types/react-overlays/lib/RootCloseWrapper.d.ts index 85b785903f..e24ab89a6b 100644 --- a/types/react-overlays/lib/RootCloseWrapper.d.ts +++ b/types/react-overlays/lib/RootCloseWrapper.d.ts @@ -1,31 +1,31 @@ import * as React from "react"; declare class RootCloseWrapper extends React.Component< - RootCloseWrapper.RootCloseWrapperProps + RootCloseWrapper.RootCloseWrapperProps > {} export = RootCloseWrapper; declare namespace RootCloseWrapper { - interface RootCloseWrapperProps { - /** - * Callback fired after click or mousedown. Also triggers when user hits `esc`. - */ - onRootClose?(e: React.SyntheticEvent): void; + interface RootCloseWrapperProps { + /** + * Callback fired after click or mousedown. Also triggers when user hits `esc`. + */ + onRootClose?(e: React.SyntheticEvent): void; - /** - * Children to render. - */ - children?: React.ReactNode; + /** + * Children to render. + */ + children?: React.ReactNode; - /** - * Disable the the RootCloseWrapper, preventing it from triggering - * `onRootClose`. - */ - disabled?: boolean; + /** + * Disable the the RootCloseWrapper, preventing it from triggering + * `onRootClose`. + */ + disabled?: boolean; - /** - * Choose which document mouse event to bind to - */ - event?: 'click' | 'mousedown'; - } + /** + * Choose which document mouse event to bind to + */ + event?: 'click' | 'mousedown'; + } } diff --git a/types/react-overlays/lib/WaitForContainer.d.ts b/types/react-overlays/lib/WaitForContainer.d.ts index 19c8a6e22f..c9e275639e 100644 --- a/types/react-overlays/lib/WaitForContainer.d.ts +++ b/types/react-overlays/lib/WaitForContainer.d.ts @@ -1,17 +1,17 @@ import * as React from "react"; declare class WaitForContainer extends React.Component< - WaitForContainer.WaitForContainerProps + WaitForContainer.WaitForContainerProps > {} export = WaitForContainer; declare namespace WaitForContainer { - interface WaitForContainerProps { - /** - * "offsetParent" of the component - */ - container?: React.ReactNode | Function; + interface WaitForContainerProps { + /** + * "offsetParent" of the component + */ + container?: React.ReactNode | Function; - onContainerResolved?: Function; - } + onContainerResolved?: Function; + } } diff --git a/types/react-overlays/lib/index.d.ts b/types/react-overlays/lib/index.d.ts index 553ae51582..fd90edd095 100644 --- a/types/react-overlays/lib/index.d.ts +++ b/types/react-overlays/lib/index.d.ts @@ -11,15 +11,15 @@ import RootCloseWrapper = require("./RootCloseWrapper"); import WaitForContainer = require("./WaitForContainer"); export { - Affix, - AutoAffix, - Dropdown, - DropdownMenu, - DropdownToggle, - Modal, - ModalManager, - Overlay, - Portal, - RootCloseWrapper, - WaitForContainer + Affix, + AutoAffix, + Dropdown, + DropdownMenu, + DropdownToggle, + Modal, + ModalManager, + Overlay, + Portal, + RootCloseWrapper, + WaitForContainer }; diff --git a/types/react-overlays/test/react-overlays-tests-transition.tsx b/types/react-overlays/test/react-overlays-tests-transition.tsx index 24a16beb97..f2a1769a79 100644 --- a/types/react-overlays/test/react-overlays-tests-transition.tsx +++ b/types/react-overlays/test/react-overlays-tests-transition.tsx @@ -4,12 +4,12 @@ import { CSSTransition } from "react-transition-group"; import { TransitionProps } from "react-transition-group/Transition"; export function OverlayFade(props: TransitionProps): JSX.Element { - return ( - - ); + return ( + + ); } diff --git a/types/react-overlays/test/react-overlays-tests.tsx b/types/react-overlays/test/react-overlays-tests.tsx index 9f125e0b29..f1465dc384 100644 --- a/types/react-overlays/test/react-overlays-tests.tsx +++ b/types/react-overlays/test/react-overlays-tests.tsx @@ -6,64 +6,64 @@ import { OverlayRenderProps } from "react-overlays/lib/Overlay"; import { OverlayFade } from "./react-overlays-tests-transition"; class TestAffix extends React.Component { - render(): JSX.Element { - return ( -
- -
Test
-
-
- ); - } + render(): JSX.Element { + return ( +
+ +
Test
+
+
+ ); + } } function renderOverlayContent({ props }: OverlayRenderProps) { - return
Popover content
; + return
Popover content
; } class TestOverlay extends React.Component<{}, { open: boolean }> { - target: HTMLElement | null = null; - state = { open: false }; + target: HTMLElement | null = null; + state = { open: false }; - render(): JSX.Element { - const { open } = this.state; + render(): JSX.Element { + const { open } = this.state; - return ( -
- + return ( +
+ - this.target} - transition={OverlayFade} - onHide={() => this.setState({ open: false })} - placement="bottom" - > - {renderOverlayContent} - -
- ); - } + this.target} + transition={OverlayFade} + onHide={() => this.setState({ open: false })} + placement="bottom" + > + {renderOverlayContent} + +
+ ); + } } class TestRootCloseWrapper extends React.Component { - handleRootClose = () => {}; - render() { - return ( - -
Test
-
- ); - } + handleRootClose = () => {}; + render() { + return ( + +
Test
+
+ ); + } } From 37c4cb113f55f7949828d2d37c33f92fd5f7930e Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 16 Jan 2019 01:11:04 +0100 Subject: [PATCH 158/160] [beeper] Add types --- types/beeper/beeper-tests.ts | 7 +++++++ types/beeper/index.d.ts | 9 +++++++++ types/beeper/tsconfig.json | 23 +++++++++++++++++++++++ types/beeper/tslint.json | 1 + 4 files changed, 40 insertions(+) create mode 100644 types/beeper/beeper-tests.ts create mode 100644 types/beeper/index.d.ts create mode 100644 types/beeper/tsconfig.json create mode 100644 types/beeper/tslint.json diff --git a/types/beeper/beeper-tests.ts b/types/beeper/beeper-tests.ts new file mode 100644 index 0000000000..b3f6f8d60b --- /dev/null +++ b/types/beeper/beeper-tests.ts @@ -0,0 +1,7 @@ +import beeper = require('beeper'); + +beeper(); +beeper(3); +beeper(3, () => {}); +beeper('****-*-*'); +beeper('****-*-*', () => {}); diff --git a/types/beeper/index.d.ts b/types/beeper/index.d.ts new file mode 100644 index 0000000000..3e17e4be1c --- /dev/null +++ b/types/beeper/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for beeper 1.1 +// Project: https://github.com/sindresorhus/beeper#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = beeper; + +declare function beeper(count?: number, cb?: () => void): void; +declare function beeper(melody: string, cb?: () => void): void; diff --git a/types/beeper/tsconfig.json b/types/beeper/tsconfig.json new file mode 100644 index 0000000000..54614ad773 --- /dev/null +++ b/types/beeper/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "beeper-tests.ts" + ] +} diff --git a/types/beeper/tslint.json b/types/beeper/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/beeper/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From a6fd2ee6ac80beb78401c12181c81a597f44fa36 Mon Sep 17 00:00:00 2001 From: Ferdy Budhidharma Date: Wed, 16 Jan 2019 01:30:26 -0600 Subject: [PATCH 159/160] [react] better prop typing for JS users (#32182) * better prop resolutions * lint rules --- types/react/index.d.ts | 23 ++++++++++++++++++---- types/react/test/managedAttributes.tsx | 27 ++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/types/react/index.d.ts b/types/react/index.d.ts index 11d879b2ff..a1e851314d 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -491,6 +491,10 @@ declare namespace React { getDefaultProps?(): P; } + type JSXElementConstructor

= + | ((props: P) => ReactElement | null) + | (new (props: P) => Component); + /** * We use an intersection type to infer multiple type parameters from * a single argument, which is useful for many top-level API defs. @@ -719,8 +723,8 @@ declare namespace React { * NOTE: prefer ComponentPropsWithRef, if the ref is forwarded, * or ComponentPropsWithoutRef when refs are not supported. */ - type ComponentProps = - T extends ComponentType + type ComponentProps> = + T extends JSXElementConstructor ? P : T extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[T] @@ -2629,9 +2633,20 @@ declare namespace React { } } -// Declared props take priority over inferred props +// naked 'any' type in a conditional type will short circuit and union both the then/else branches +// so boolean is only resolved for T = any +type IsExactlyAny = boolean extends (T extends never ? true : false) ? true : false; + +// Try to resolve ill-defined props like for JS users: props can be any, or sometimes objects with properties of type any +// If props is type any, use propTypes definitions, otherwise for each `any` property of props, use the propTypes type // If declared props have indexed properties, ignore inferred props entirely as keyof gets widened -type MergePropTypes = P & Pick>; +type MergePropTypes = IsExactlyAny

extends true ? T : ({ + [K in keyof P]: IsExactlyAny extends true + ? K extends keyof T + ? T[K] + : P[K] + : P[K] +} & Pick>); // Any prop that has a default prop becomes optional, but its type is unchanged // Undeclared default props are augmented into the resulting allowable attributes diff --git a/types/react/test/managedAttributes.tsx b/types/react/test/managedAttributes.tsx index 1e0e8226d9..9939cffb15 100644 --- a/types/react/test/managedAttributes.tsx +++ b/types/react/test/managedAttributes.tsx @@ -222,3 +222,30 @@ interface LeaveMeAloneDtslint { foo: string; } // // $ExpectError the type of ForwardRef.defaultProps stays Partial

anyway even if assigned // // ]; + +// const weakComponentPropTypes = { +// foo: PropTypes.string, +// bar: PropTypes.bool.isRequired +// }; +// interface WeakComponentProps1 { +// foo: any; +// bar: number; +// } +// interface WeakComponentProps2 { +// foo: string; +// bar: any; +// } + +// // $ExpectType true +// type weakComponentTest1 = JSX.LibraryManagedAttributes<{ propTypes: typeof weakComponentPropTypes }, any> extends { +// foo?: string | null +// bar: boolean +// } ? true : false; +// type weakComponentTest2 = JSX.LibraryManagedAttributes<{ propTypes: typeof weakComponentPropTypes }, WeakComponentProps1> extends { +// foo?: string | null +// bar: number +// } ? true : false; +// type weakComponentTest3 = JSX.LibraryManagedAttributes<{ propTypes: typeof weakComponentPropTypes }, WeakComponentProps2> extends { +// foo: string +// bar: boolean +// } ? true : false; From 5f012ded2382c4050caafe96dba34852d63d1416 Mon Sep 17 00:00:00 2001 From: Jose C Quintas Jr Date: Wed, 16 Jan 2019 08:31:49 +0100 Subject: [PATCH 160/160] Add animateMotion and mpath declarations (#32185) --- types/react/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/react/index.d.ts b/types/react/index.d.ts index a1e851314d..1df5c5256a 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -2812,6 +2812,7 @@ declare global { svg: React.SVGProps; animate: React.SVGProps; // TODO: It is SVGAnimateElement but is not in TypeScript's lib.dom.d.ts for now. + animateMotion: React.SVGProps; animateTransform: React.SVGProps; // TODO: It is SVGAnimateTransformElement but is not in TypeScript's lib.dom.d.ts for now. circle: React.SVGProps; clipPath: React.SVGProps; @@ -2851,6 +2852,7 @@ declare global { marker: React.SVGProps; mask: React.SVGProps; metadata: React.SVGProps; + mpath: React.SVGProps; path: React.SVGProps; pattern: React.SVGProps; polygon: React.SVGProps;