ids-enterprise-typings 16.4.0 → 16.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -54,6 +54,7 @@
54
54
  /// <reference path='lib/menu-button/soho-menu-button.d.ts' />
55
55
  /// <reference path='lib/message/soho-message.d.ts' />
56
56
  /// <reference path='lib/modal-dialog/soho-modal-dialog.d.ts' />
57
+ /// <reference path='lib/module-nav/index.d.ts' />
57
58
  /// <reference path='lib/monthview/soho-monthview.d.ts' />
58
59
  /// <reference path='lib/notification/soho-notification.d.ts' />
59
60
  /// <reference path='lib/notification-badge/soho-notification-badge.d.ts' />
@@ -8,10 +8,56 @@
8
8
 
9
9
  type SohoAccordionExpanderType = 'classic' | 'plus-minus' | 'chevron';
10
10
 
11
+ type SohoAccordionDefaultFocusBehaviorCallback = () => void;
12
+
13
+ type SohoAccordionHeaderGroup = any; // JQuery<HTMLElement>
14
+
15
+ type SohoAccordionHeaderExpanderButtonGroup = any; // JQuery<HTMLElement>
16
+
17
+ type SohoAccordionHeaderAnchorGroup = any; // JQuery<HTMLElement>
18
+
19
+ type SohoAccordionHeaderAnyGroup = SohoAccordionHeaderGroup | SohoAccordionHeaderExpanderButtonGroup | SohoAccordionHeaderAnchorGroup;
20
+
21
+ type SohoAccordionNavDirection = 0 | -1 | 1;
22
+
23
+ /**
24
+ * Soho Accordion data representation types
25
+ * These can be used to work with the results of `.toData()`
26
+ */
27
+
28
+ type SohoAccordionData = Array<SohoAccordionSectionData> | Array<SohoAccordionHeaderData>;
29
+
30
+ type SohoAccordionSectionData = {
31
+ index: string,
32
+ type: 'section',
33
+ children?: Array<SohoAccordionHeaderData | SohoAccordionContentData>,
34
+ };
35
+
36
+ type SohoAccordionContentData = {
37
+ index: string,
38
+ type: 'content',
39
+ content?: string,
40
+ contentText?: string
41
+ };
42
+
43
+ type SohoAccordionHeaderData = {
44
+ index: string,
45
+ type: 'header',
46
+ text?: string,
47
+ icon?: string,
48
+ children?: Array<SohoAccordionHeaderData | SohoAccordionContentData>
49
+ };
50
+
11
51
  /**
12
- * Soho Accordion Control Options
13
- */
52
+ * Soho Accordion Control Options
53
+ */
14
54
  interface SohoAccordionOptions {
55
+ /**
56
+ * Provides a mechanism for controlling the behavior of accordion header focus.
57
+ * By default, the built-in behavior is used (ability to focus headers/expanders independently).
58
+ */
59
+ accordionFocusCallback?: (header: JQuery<HTMLElement>, defaultFocusBehaviorCallback?: SohoAccordionDefaultFocusBehaviorCallback) => void;
60
+
15
61
  /**
16
62
  * If set to true, allows only one pane of the Accordion to be open at a time.
17
63
  * If an Accordion pane is open, and that pane contains sub-headers,
@@ -68,22 +114,26 @@ interface SohoAccordionOptions {
68
114
  }
69
115
 
70
116
  /**
71
- * This interface represents the public API exposed by the
72
- * busy indicator.
117
+ * This interface represents the public API exposed by the Soho Accordion
73
118
  */
74
119
  interface SohoAccordionStatic {
75
120
  /** Access to the control's options block. */
76
121
  settings: SohoAccordionOptions;
77
122
 
123
+ /** Calls the `source` method passed via settings */
124
+ callSource(anchor: SohoAccordionHeaderAnchorGroup, animationCallback: () => void): void;
125
+
78
126
  /** Collapses all panels. */
79
127
  collapseAll(): void;
80
128
 
81
129
  /** Expands all panels. */
82
130
  expandAll(): void;
83
131
 
84
- expand(header: any | string): void;
132
+ /** Expands one or a group of panels */
133
+ expand(header: SohoAccordionHeaderGroup | string): void;
85
134
 
86
- collapse(header: any | string): void;
135
+ /** Collapses one or a group of panels */
136
+ collapse(header: SohoAccordionHeaderGroup | string): void;
87
137
 
88
138
  /** Disables the accordion from reacting to events. */
89
139
  disable(): void;
@@ -92,18 +142,69 @@ interface SohoAccordionStatic {
92
142
  enable(): void;
93
143
 
94
144
  /** Checks if a particular header is disabled, or if the entire accordion is disabled. */
95
- isDisabled(jQuery: any): boolean;
145
+ isDisabled(header: SohoAccordionHeaderGroup): boolean;
96
146
 
97
147
  /** Checks if an Accordion Section is currently expanded. */
98
- isExpanded(jQuery: any): boolean;
148
+ isExpanded(header: SohoAccordionHeaderGroup): boolean;
99
149
 
100
150
  /** Toggles the exanded state of the selected header. */
101
- toggle(jQuery: any): void;
151
+ toggle(header: SohoAccordionHeaderGroup): boolean;
152
+
153
+ /**
154
+ * Gets the current contents of this accordion and creates a JSON-like representation of the structure.
155
+ * For full JSON compatibility, don't use the `addElementReference` flag.
156
+ **/
157
+ toData(flatten?: boolean, addElementReference?: boolean): SohoAccordionData;
158
+
159
+ /** Makes an accordion header appear with a "selected" state */
160
+ select(element?: SohoAccordionHeaderAnyGroup): void;
161
+
162
+ /** Makes an accordion header appear with a "deselected" state */
163
+ deselect(element?: SohoAccordionHeaderAnyGroup): void;
164
+
165
+ /** Makes all accordion headers deselected */
166
+ deselectAll(): void;
167
+
168
+ /** Gets a reference to currently-selected accordion headers */
169
+ getSelected(): SohoAccordionHeaderGroup;
170
+
171
+ /** Determines if an Accordion Header is disabled */
172
+ isDisabled(header: SohoAccordionHeaderGroup): boolean;
173
+
174
+ /** "Visually" filters accordion headers (elements are not added/removed but temporarily hidden by CSS if filtered out) */
175
+ filter(headers?: SohoAccordionHeaderGroup): void;
176
+
177
+ /** Resets a previously-applied filter */
178
+ unfilter(headers?: SohoAccordionHeaderGroup): void;
179
+
180
+ /** Determines if an Accordion Header is currently visually filtered out */
181
+ isFiltered(header: SohoAccordionHeaderGroup): boolean;
182
+
183
+ /** Determines if animation is currently happening on accordion panes (controls some behavior internally) */
184
+ isAnimating: boolean;
185
+
186
+ /** Programmatically navigates to the next-available accordion header (down) */
187
+ nextHeader(element: SohoAccordionHeaderAnyGroup, noDescend?: boolean): void;
188
+
189
+ /** Programmatically navigates to the previous-available accordion header (up) */
190
+ prevHeader(element: SohoAccordionHeaderAnyGroup, noDescend?: boolean): void;
191
+
192
+ /** Programmatically navigates to the next-available accordion header (down) */
193
+ ascend(element: SohoAccordionHeaderGroup, direction?: SohoAccordionNavDirection): void;
194
+
195
+ /** Programmatically navigates to the previous-available accordion header (up) */
196
+ descend(element: SohoAccordionHeaderGroup, direction?: SohoAccordionNavDirection): void;
197
+
198
+ /** Programmatically focuses the correct element within an accordion header (based on previously-focused elements) */
199
+ focusOriginalType(header: SohoAccordionHeaderGroup): void;
102
200
 
103
201
  /** Updates the accordion with any new settings. */
104
- updated(headers?: JQuery[], settings?: SohoAccordionOptions): void;
202
+ updated(headers?: SohoAccordionHeaderGroup, settings?: SohoAccordionOptions): void;
203
+
204
+ /** Performs a teardown of the jQuery component API (does not remove the component instance) */
205
+ teardown(): void;
105
206
 
106
- /** Destroys the control on completion. */
207
+ /** Destroys the control on completion. (Tears down and removes the component instance) */
107
208
  destroy(): void;
108
209
  }
109
210
 
@@ -1,3 +1,6 @@
1
+ /// <reference path='../accordion/soho-accordion.d.ts' />
2
+ /// <reference path='../searchfield/soho-searchfield.d.ts' />
3
+
1
4
  /**
2
5
  * Soho Application Menu.
3
6
  *
@@ -63,6 +66,15 @@ interface SohoApplicationMenuStatic {
63
66
  /** Control settings. */
64
67
  settings: SohoApplicationMenuOptions;
65
68
 
69
+ /** Accordion element */
70
+ accordionEl: HTMLElement;
71
+
72
+ /** Searchfield element, if present */
73
+ searchEl?: HTMLElement | null;
74
+
75
+ /** Searchfield API, if present */
76
+ searchAPI?: SohoSearchFieldStatic;
77
+
66
78
  /**
67
79
  * Opens the application menu.
68
80
  *
@@ -107,7 +107,7 @@ declare class SohoButtonStatic {
107
107
  toggle(): void;
108
108
 
109
109
  /** Update the component with new settings. */
110
- updated(settings: SohoButtonOptions): void;
110
+ updated(settings?: SohoButtonOptions): void;
111
111
  }
112
112
 
113
113
  /**
@@ -963,6 +963,9 @@ interface SohoDataGridColumn {
963
963
  /** Sets the name of the icon to show in the header */
964
964
  headerIcon?: string;
965
965
 
966
+ /** Sets the name of the icon to show in the header */
967
+ headerIconTooltip?: string;
968
+
966
969
  /** Adds an extra class to the header for formatting */
967
970
  headerCssClass?: string;
968
971
 
@@ -229,6 +229,28 @@ interface SohoDatePickerMonthRenderedEvent extends JQuery.TriggeredEvent {
229
229
  year: number;
230
230
  }
231
231
 
232
+ /**
233
+ * Interface to set custom data validation for the datepicker.
234
+ */
235
+ interface SohoDatePickerValidator {
236
+ validator: {
237
+ /** Validator ID */
238
+ id: string;
239
+
240
+ /** Function to perform the validation */
241
+ check(value: any, field: any, grid: any): boolean
242
+
243
+ /** Message type */
244
+ type: string;
245
+
246
+ /** Message text */
247
+ message: string;
248
+ };
249
+
250
+ /** The event types that will trigger the validation */
251
+ validatorEvents: string;
252
+ }
253
+
232
254
  /**
233
255
  * JQuery Integration
234
256
  */
@@ -27,6 +27,16 @@ interface SohoDropDownOptions {
27
27
  */
28
28
  cssClass?: string;
29
29
 
30
+ /**
31
+ * Controls the style of the icon representing the Dropdown's "open/close" functionality.
32
+ */
33
+ dropdownIcon?: string;
34
+
35
+ /**
36
+ * If true, adds an extra wrapping element in the Dropdown List (in some situations used for styling/scrolling behavior changes)
37
+ */
38
+ extraListWrapper?: boolean;
39
+
30
40
  /**
31
41
  * Search mode to use between 'contains', 'keyword', 'wordStartsWith', 'phraseStartsWith false will not allow client side filter
32
42
  */
@@ -123,6 +133,11 @@ interface SohoDropDownOptions {
123
133
  */
124
134
  width?: number;
125
135
 
136
+ /**
137
+ * CSS selector representing an element that the Dropdown component can use to define the list's width
138
+ */
139
+ widthTarget?: string;
140
+
126
141
  /**
127
142
  * Show the select all text/option.
128
143
  */
@@ -217,7 +232,9 @@ interface SohoDropDownStatic {
217
232
  */
218
233
  disable(): void;
219
234
 
220
- /** Enable the control. */
235
+ /**
236
+ * Enable the control.
237
+ */
221
238
  enable(): void;
222
239
 
223
240
  /**
@@ -0,0 +1,4 @@
1
+ /// <reference path='soho-module-nav-common.d.ts' />
2
+ /// <reference path='soho-module-nav-settings.d.ts' />
3
+ /// <reference path='soho-module-nav-switcher.d.ts' />
4
+ /// <reference path='soho-module-nav.d.ts' />
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Soho Module Nav Common
3
+ *
4
+ * This file provides common types used by all Module Nav wrapper components
5
+ */
6
+
7
+ /**
8
+ * Controls the visible state of the Module Nav component.
9
+ * In some cases this also has affects on child components and event handling
10
+ */
11
+ type SohoModuleNavDisplayMode = false | 'collapsed' | 'expanded';
12
+
@@ -0,0 +1,53 @@
1
+ /// <reference path='./soho-module-nav-common.d.ts' />
2
+ /// <reference path='../accordion/soho-accordion.d.ts' />
3
+ /// <reference path='../popupmenu/soho-popupmenu.d.ts' />
4
+
5
+ /** Defines options present in the Soho Module Nav Settings */
6
+ interface SohoModuleNavSettingsOptions {
7
+ displayMode?: SohoModuleNavDisplayMode;
8
+ }
9
+
10
+ /** Public API for Soho Module Nav Settings JS component */
11
+ interface SohoModuleNavSettingsStatic {
12
+ /** Module Nav Switcher's current settings */
13
+ settings: SohoModuleNavSettingsOptions;
14
+
15
+ /** Reference to jQuery-wrapped HTML Element representing the Soho Accordion */
16
+ accordionEl?: HTMLElement;
17
+
18
+ /** Reference to a Soho Accordion API, if one is available */
19
+ accordionAPI?: SohoAccordionStatic;
20
+
21
+ /** References to specific sections/elements */
22
+ containerEl?: HTMLElement;
23
+
24
+ /** Reference to the element representing the settings button's menu */
25
+ menuEl?: HTMLElement;
26
+
27
+ /** Reference to the settings menu's Soho Popupmenu API, if one is available*/
28
+ menuAPI?: SohoPopupMenuStatic;
29
+
30
+ /** Initializes the jQuery component */
31
+ init(): void;
32
+
33
+ /** Changes the Module Nav Switcher's Display Mode */
34
+ setDisplayMode(val?: SohoModuleNavDisplayMode): void;
35
+
36
+ /** Re-renders jQuery child component APIs */
37
+ renderChildComponents(): void;
38
+
39
+ /** Tear down the markup for the control */
40
+ teardown(): void;
41
+
42
+ /** Updates the Module Nav Settings with any new settings */
43
+ updated(newSettings?: SohoModuleNavSettingsOptions): void;
44
+
45
+ /** Destroys the control on completion. */
46
+ destroy(): void;
47
+ }
48
+
49
+ /** jQuery interface for Module Nav Settings */
50
+ interface JQuery<TElement = HTMLElement> extends Iterable<TElement> {
51
+ modulenavsettings(options?: SohoModuleNavSettingsOptions): JQuery;
52
+ on(events: 'updated', handler: JQuery.EventHandlerBase<any, SohoModuleNavSettingsOptions>): this;
53
+ }
@@ -0,0 +1,85 @@
1
+ /// <reference path='./soho-module-nav-common.d.ts' />
2
+ /// <reference path='../accordion/soho-accordion.d.ts' />
3
+ /// <reference path='../button/soho-button.d.ts' />
4
+ /// <reference path='../dropdown/soho-dropdown.d.ts' />
5
+
6
+
7
+ /** Defines a Module Nav Switcher Role Record
8
+ * (Takes the same arguments as items present in the Soho Dropdown JSON notation)
9
+ */
10
+ type SohoModuleNavSwitcherRoleRecord = Record<string, unknown>;
11
+
12
+ type SohoModuleNavSwitcherIconSetting = string | ((api: SohoModuleNavSwitcherStatic) => string) | undefined;
13
+
14
+ /** Defines options present in the Soho Module Nav Switcher */
15
+ interface SohoModuleNavSwitcherOptions {
16
+ displayMode?: SohoModuleNavDisplayMode;
17
+ generate?: boolean;
18
+ icon?: SohoModuleNavSwitcherIconSetting;
19
+ moduleButtonText?: string;
20
+ roleDropdownLabel?: string;
21
+ roles?: Array<SohoModuleNavSwitcherRoleRecord>;
22
+ }
23
+
24
+ /** Public API for Soho Module Nav Switcher JS component */
25
+ interface SohoModuleNavSwitcherStatic {
26
+ /** Module Nav Switcher's current settings */
27
+ settings: SohoModuleNavSwitcherOptions;
28
+
29
+ /** Reference to jQuery-wrapped HTML Element representing the Soho Accordion */
30
+ accordionEl?: HTMLElement;
31
+
32
+ /** Reference to a Soho Accordion API, if one is available */
33
+ accordionAPI?: SohoAccordionStatic;
34
+
35
+ /** Reference to container element */
36
+ containerEl?: HTMLElement;
37
+
38
+ /** Reference to the Module Button's Container Element */
39
+ moduleButtonContainerEl?: HTMLElement;
40
+
41
+ /** Reference to the Module Button element */
42
+ moduleButtonEl?: HTMLElement;
43
+
44
+ /** Reference to the Module Button's Soho Button API, if one is available */
45
+ moduleButtonAPI?: SohoButtonStatic;
46
+
47
+ /** Reference to the Role Dropdown's container element */
48
+ roleDropdownContainerEl?: HTMLElement;
49
+
50
+ /** Reference to the Role Dropdown's element */
51
+ roleDropdownEl?: HTMLElement;
52
+
53
+ /** Reference to the Module Button's Soho Button API, if one is available */
54
+ roleDropdownAPI?: SohoDropDownStatic;
55
+
56
+ /** Initializes the jQuery component */
57
+ init(): void;
58
+
59
+ /** Changes the Module Nav Switcher's Display Mode */
60
+ setDisplayMode(val?: SohoModuleNavDisplayMode): void;
61
+
62
+ /** Sets visible */
63
+ setRoles(val?: SohoModuleNavSwitcherRoleRecord[], doUpdate?: boolean): void;
64
+
65
+ /** Re-renders jQuery child component APIs */
66
+ renderChildComponents(): void;
67
+
68
+ /** Changes the focus of the Module Button */
69
+ toggleModuleButtonFocus(doFocus?: boolean): void;
70
+
71
+ /** Tear down the markup for the control */
72
+ teardown(): void;
73
+
74
+ /** Updates the Module Nav Switcher with any new settings */
75
+ updated(newSettings?: SohoModuleNavSwitcherOptions): void;
76
+
77
+ /** Destroys the control on completion. */
78
+ destroy(): void;
79
+ }
80
+
81
+ /** jQuery interface for Module Nav Switcher */
82
+ interface JQuery<TElement = HTMLElement> extends Iterable<TElement> {
83
+ modulenavswitcher(options?: SohoModuleNavSwitcherOptions): JQuery;
84
+ on(events: 'updated', handler: JQuery.EventHandlerBase<any, SohoModuleNavSwitcherOptions>): this;
85
+ }
@@ -0,0 +1,78 @@
1
+ /// <reference path='./soho-module-nav-common.d.ts' />
2
+ /// <reference path='../accordion/soho-accordion.d.ts' />
3
+
4
+ /** Defines options present in the Soho Module Nav */
5
+ interface SohoModuleNavOptions {
6
+ accordionSettings?: SohoAccordionOptions;
7
+ displayMode?: SohoModuleNavDisplayMode;
8
+ filterable?: boolean;
9
+ initChildren?: boolean;
10
+ pinSections?: boolean;
11
+ showDetailView?: boolean;
12
+ }
13
+
14
+ /** Public API for Soho Module Nav JS component */
15
+ interface SohoModuleNavStatic {
16
+ /** Module Nav's current settings */
17
+ settings: SohoModuleNavOptions;
18
+
19
+ /** Reference to element representing accordion, if one is available */
20
+ accordionEl?: HTMLElement;
21
+
22
+ /** Reference to a Soho Accordion API, if one is available */
23
+ accordionAPI?: SohoAccordionStatic;
24
+
25
+ /** Reference to element representing searchfield, if one is available */
26
+ searchEl?: HTMLElement;
27
+
28
+ /** Reference to a Soho SearchField API, if one is available */
29
+ searchAPI?: SohoSearchFieldStatic;
30
+
31
+ /** Reference to element representing settings button, if one is available */
32
+ settingsEl?: HTMLElement;
33
+
34
+ /** Reference to a Soho Module Nav Settings API, if one is available */
35
+ settingAPI?: SohoModuleNavSettingsStatic;
36
+
37
+ /** Reference to a Soho Module Nav Switcher container element, if one is available */
38
+ switcherEl?: HTMLElement;
39
+
40
+ /** Reference to a Soho Module Nav Settings API, if one is available */
41
+ switcherAPI?: SohoModuleNavSwitcherStatic;
42
+
43
+ /** Misc. references to specific sections/elements */
44
+ containerEl?: HTMLElement;
45
+ detailViewEl?: HTMLElement;
46
+ itemMenuEl?: HTMLElement;
47
+ footerEl?: HTMLElement;
48
+
49
+ /** Initializes the jQuery component */
50
+ init(): void;
51
+
52
+ /** Changes the Module Nav's Display Mode */
53
+ setDisplayMode(val?: SohoModuleNavDisplayMode): void;
54
+
55
+ /** Enables (true)/Disables (false) optional pinning of header/footer Module Nav regions */
56
+ setPinSections(val?: boolean): void;
57
+
58
+ /** Updates accordion section scroll state based on size changes */
59
+ setScrollable(): void;
60
+
61
+ /** Enables (true)/Disables (false) visibility of detail view pane used for sub modules */
62
+ setShowDetailView(val: boolean): void;
63
+
64
+ /** Tear down the markup for the control */
65
+ teardown(): void;
66
+
67
+ /** Updates the Module Nav with any new settings */
68
+ updated(newSettings?: SohoModuleNavOptions): void;
69
+
70
+ /** Destroys the control on completion. */
71
+ destroy(): void;
72
+ }
73
+
74
+ /** jQuery interface for Module Nav */
75
+ interface JQuery<TElement = HTMLElement> extends Iterable<TElement> {
76
+ modulenav(options?: SohoModuleNavOptions): JQuery;
77
+ on(events: 'updated', handler: JQuery.EventHandlerBase<any, SohoModuleNavOptions>): this;
78
+ }
@@ -46,6 +46,9 @@ interface SohoPieOptions {
46
46
  /** Where to locate the legend. This can be bottom or right at the moment. */
47
47
  legendPlacement?: 'bottom' | 'right' | string;
48
48
 
49
+ /** Force Legend popup below regardless of the quantity of labels. */
50
+ forceLegendPopup?: boolean,
51
+
49
52
  /** A setting that controls the legend values and format. */
50
53
  legend?: SohoPieLegendOptions;
51
54
 
@@ -57,6 +57,9 @@ interface SohoPopupMenuOptions {
57
57
 
58
58
  /** Add extra attributes like id's to the component **/
59
59
  attributes?: Array<Object> | Object;
60
+
61
+ /** Appends an optional css class to `.popupmenu-wrapper/popupmenu` elements */
62
+ cssClass?: string | null;
60
63
  }
61
64
 
62
65
  /**
@@ -75,6 +78,9 @@ interface SohoPopupMenuStatic {
75
78
  /** Configuration options. */
76
79
  settings?: SohoPopupMenuOptions;
77
80
 
81
+ /** Gets the Popupmenu's ID string (can be used to query the DOM for the menu element) */
82
+ idString: string | undefined;
83
+
78
84
  /** Returns the selected html element. */
79
85
  getSelected(): any;
80
86
 
@@ -53,7 +53,7 @@ interface SohoTooltipEvent extends JQuery.TriggeredEvent {
53
53
  interface SohoTooltipStatic {
54
54
  settings: SohoTooltipOptions;
55
55
  destroy(): void;
56
- hide(): void;
56
+ hide(force?: boolean): void;
57
57
  show(): void;
58
58
  updated(): void;
59
59
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ids-enterprise-typings",
3
3
  "slug": "ids-enterprise-typings",
4
- "version": "16.4.0",
4
+ "version": "16.5.0",
5
5
  "declaration": true,
6
6
  "types": "index.d.ts",
7
7
  "dependencies": {