fit-ui 2.3.5 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fit-ui",
3
- "version": "2.3.5",
3
+ "version": "2.5.1",
4
4
  "title": "Fit.UI",
5
5
  "description": "Object Oriented framework for building rich User Interfaces",
6
6
  "main": "dist/Fit.UI.js",
package/types/index.d.ts CHANGED
@@ -2739,6 +2739,13 @@ declare namespace Fit
2739
2739
  */
2740
2740
  public GetSelections(includeInvalid?:boolean):Fit.Controls.DropDownTypeDefs.DropDownItem[];
2741
2741
  /**
2742
+ * Make DropDown highlight first selectable item when opened.
2743
+ * @function HighlightFirst
2744
+ * @param {boolean} [val=undefined] - If set, True enables feature, False disables it (default).
2745
+ * @returns boolean
2746
+ */
2747
+ public HighlightFirst(val?:boolean):boolean;
2748
+ /**
2742
2749
  * Get/set value indicating whether input is enabled.
2743
2750
  * @function InputEnabled
2744
2751
  * @param {boolean} [val=undefined] - If defined, True enables input, False disables it.
@@ -2802,6 +2809,13 @@ declare namespace Fit
2802
2809
  */
2803
2810
  public OpenDropDown():void;
2804
2811
  /**
2812
+ * Make DropDown restore scroll position and previously highlighted item when reopened.
2813
+ * @function PersistView
2814
+ * @param {boolean} [val=undefined] - If set, True enables feature, False disables it (default).
2815
+ * @returns boolean
2816
+ */
2817
+ public PersistView(val?:boolean):boolean;
2818
+ /**
2805
2819
  * Get/set value used as a placeholder on supported browsers, to indicate expected value or action.
2806
2820
  * @function Placeholder
2807
2821
  * @param {string} [val=undefined] - If defined, value is set as placeholder.
@@ -4090,6 +4104,12 @@ declare namespace Fit
4090
4104
  */
4091
4105
  public GetItem(value:string):Fit.Controls.ListViewTypeDefs.ListViewItem | null;
4092
4106
  /**
4107
+ * Get all items - returns array containing objects with Title (string) and Value (string) properties.
4108
+ * @function GetItems
4109
+ * @returns Fit.Controls.ListViewTypeDefs.ListViewItem[]
4110
+ */
4111
+ public GetItems():Fit.Controls.ListViewTypeDefs.ListViewItem[];
4112
+ /**
4093
4113
  * Returns value indicating whether control contains item with specified value.
4094
4114
  * @function HasItem
4095
4115
  * @param {string} value - Value of item to check for.
@@ -4103,6 +4123,23 @@ declare namespace Fit
4103
4123
  */
4104
4124
  constructor(controlId?:string);
4105
4125
  /**
4126
+ * Register event handler fired when item is being selected.
4127
+ Selection can be canceled by returning False.
4128
+ The following arguments are passed to event handler function:
4129
+ Sender (ListView) and Item (with Title (string) and Value (string) properties).
4130
+ * @function OnSelect
4131
+ * @param {Fit.Controls.ListViewTypeDefs.OnSelectEventHandler<this>} cb - Event handler function.
4132
+ */
4133
+ public OnSelect(cb:Fit.Controls.ListViewTypeDefs.OnSelectEventHandler<this>):void;
4134
+ /**
4135
+ * Register event handler fired when item is selected.
4136
+ The following arguments are passed to event handler function:
4137
+ Sender (ListView) and Item (with Title (string) and Value (string) properties).
4138
+ * @function OnSelected
4139
+ * @param {Fit.Controls.ListViewTypeDefs.OnSelectedEventHandler<this>} cb - Event handler function.
4140
+ */
4141
+ public OnSelected(cb:Fit.Controls.ListViewTypeDefs.OnSelectedEventHandler<this>):void;
4142
+ /**
4106
4143
  * Remove item from ListView.
4107
4144
  * @function RemoveItem
4108
4145
  * @param {string} value - Value of item to remove.
@@ -4165,6 +4202,14 @@ declare namespace Fit
4165
4202
  */
4166
4203
  public HandleEvent(e?:Event):void;
4167
4204
  /**
4205
+ * Overridden by control developers (optional).
4206
+ This function can be used to make the picker control automatically highlight the first item.
4207
+ * @function HighlightFirst
4208
+ * @param {boolean} [val=undefined] - If set, True enables feature, False disables it (default).
4209
+ * @returns boolean
4210
+ */
4211
+ public HighlightFirst(val?:boolean):boolean;
4212
+ /**
4168
4213
  * Get/set max height of control - returns object with Value (number) and Unit (string) properties.
4169
4214
  * @function MaxHeight
4170
4215
  * @param {number} [value=undefined] - If defined, max height is updated to specified value. A value of -1 forces picker to fit height to content.
@@ -4225,6 +4270,16 @@ declare namespace Fit
4225
4270
  public OnShow(cb:Fit.Controls.PickerBaseTypeDefs.BaseEventHandler<this>):void;
4226
4271
  /**
4227
4272
  * Overridden by control developers (optional).
4273
+ This function can be used to tell the picker control to persist (remember) its current state between interactions.
4274
+ For instance a TreeView control would remembers its scroll position and highlighted node, while a calendar would
4275
+ remember the previously selected year and month.
4276
+ * @function PersistView
4277
+ * @param {boolean} [val=undefined] - If set, True enables feature, False disables it (default).
4278
+ * @returns boolean
4279
+ */
4280
+ public PersistView(val?:boolean):boolean;
4281
+ /**
4282
+ * Overridden by control developers (optional).
4228
4283
  Host control may invoke this function to reveal a selected item in
4229
4284
  the picker control. Often this means having the item scrolled into view.
4230
4285
  * @function RevealItemInView
@@ -4299,6 +4354,49 @@ declare namespace Fit
4299
4354
  public Render(toElement?:HTMLElement):void;
4300
4355
  }
4301
4356
  /**
4357
+ *
4358
+ * @namespace [Fit.Controls.ListViewTypeDefs ListViewTypeDefs]
4359
+ */
4360
+ namespace ListViewTypeDefs
4361
+ {
4362
+ // Functions defined by Fit.Controls.ListViewTypeDefs
4363
+ /**
4364
+ * OnSelected event handler.
4365
+ * @template TypeOfThis
4366
+ * @callback OnSelectedEventHandler
4367
+ * @param {TypeOfThis} sender - Instance of control.
4368
+ * @param {{ Title: string, Value: string }} item - Selected item.
4369
+ */
4370
+ type OnSelectedEventHandler<TypeOfThis> = (sender:TypeOfThis, item:{ Title: string, Value: string }) => void;
4371
+ /**
4372
+ * OnSelect event handler.
4373
+ * @template TypeOfThis
4374
+ * @callback OnSelectEventHandler
4375
+ * @param {TypeOfThis} sender - Instance of control.
4376
+ * @param {{ Title: string, Value: string }} item - Selected item.
4377
+ * @returns boolean | void
4378
+ */
4379
+ type OnSelectEventHandler<TypeOfThis> = (sender:TypeOfThis, item:{ Title: string, Value: string }) => boolean | void;
4380
+ /**
4381
+ * ListView item.
4382
+ * @class [Fit.Controls.ListViewTypeDefs.ListViewItem ListViewItem]
4383
+ */
4384
+ class ListViewItem
4385
+ {
4386
+ // Properties defined by Fit.Controls.ListViewTypeDefs.ListViewItem
4387
+ /**
4388
+ * Item title.
4389
+ * @member {string} Title
4390
+ */
4391
+ Title:string;
4392
+ /**
4393
+ * Unique item value.
4394
+ * @member {string} Value
4395
+ */
4396
+ Value:string;
4397
+ }
4398
+ }
4399
+ /**
4302
4400
  * Class from which all Picker Controls extend.
4303
4401
  Control developers must override: GetDomElement, Destroy.
4304
4402
  Overriding the following functions is optional:
@@ -4374,6 +4472,14 @@ declare namespace Fit
4374
4472
  */
4375
4473
  public HandleEvent(e?:Event):void;
4376
4474
  /**
4475
+ * Overridden by control developers (optional).
4476
+ This function can be used to make the picker control automatically highlight the first item.
4477
+ * @function HighlightFirst
4478
+ * @param {boolean} [val=undefined] - If set, True enables feature, False disables it (default).
4479
+ * @returns boolean
4480
+ */
4481
+ public HighlightFirst(val?:boolean):boolean;
4482
+ /**
4377
4483
  * Get/set max height of control - returns object with Value (number) and Unit (string) properties.
4378
4484
  * @function MaxHeight
4379
4485
  * @param {number} [value=undefined] - If defined, max height is updated to specified value. A value of -1 forces picker to fit height to content.
@@ -4434,6 +4540,16 @@ declare namespace Fit
4434
4540
  public OnShow(cb:Fit.Controls.PickerBaseTypeDefs.BaseEventHandler<this>):void;
4435
4541
  /**
4436
4542
  * Overridden by control developers (optional).
4543
+ This function can be used to tell the picker control to persist (remember) its current state between interactions.
4544
+ For instance a TreeView control would remembers its scroll position and highlighted node, while a calendar would
4545
+ remember the previously selected year and month.
4546
+ * @function PersistView
4547
+ * @param {boolean} [val=undefined] - If set, True enables feature, False disables it (default).
4548
+ * @returns boolean
4549
+ */
4550
+ public PersistView(val?:boolean):boolean;
4551
+ /**
4552
+ * Overridden by control developers (optional).
4437
4553
  Host control may invoke this function to reveal a selected item in
4438
4554
  the picker control. Often this means having the item scrolled into view.
4439
4555
  * @function RevealItemInView
@@ -5032,6 +5148,14 @@ declare namespace Fit
5032
5148
  */
5033
5149
  public HandleEvent(e?:Event):void;
5034
5150
  /**
5151
+ * Overridden by control developers (optional).
5152
+ This function can be used to make the picker control automatically highlight the first item.
5153
+ * @function HighlightFirst
5154
+ * @param {boolean} [val=undefined] - If set, True enables feature, False disables it (default).
5155
+ * @returns boolean
5156
+ */
5157
+ public HighlightFirst(val?:boolean):boolean;
5158
+ /**
5035
5159
  * Get/set max height of control - returns object with Value (number) and Unit (string) properties.
5036
5160
  * @function MaxHeight
5037
5161
  * @param {number} [value=undefined] - If defined, max height is updated to specified value. A value of -1 forces picker to fit height to content.
@@ -5092,6 +5216,16 @@ declare namespace Fit
5092
5216
  public OnShow(cb:Fit.Controls.PickerBaseTypeDefs.BaseEventHandler<this>):void;
5093
5217
  /**
5094
5218
  * Overridden by control developers (optional).
5219
+ This function can be used to tell the picker control to persist (remember) its current state between interactions.
5220
+ For instance a TreeView control would remembers its scroll position and highlighted node, while a calendar would
5221
+ remember the previously selected year and month.
5222
+ * @function PersistView
5223
+ * @param {boolean} [val=undefined] - If set, True enables feature, False disables it (default).
5224
+ * @returns boolean
5225
+ */
5226
+ public PersistView(val?:boolean):boolean;
5227
+ /**
5228
+ * Overridden by control developers (optional).
5095
5229
  Host control may invoke this function to reveal a selected item in
5096
5230
  the picker control. Often this means having the item scrolled into view.
5097
5231
  * @function RevealItemInView
@@ -5993,6 +6127,12 @@ declare namespace Fit
5993
6127
  */
5994
6128
  public Url(wsUrl?:string):string;
5995
6129
  /**
6130
+ * Get/set value indicating whether control uses the built-in action menu to ease addition and removal of items.
6131
+ * @function UseActionMenu
6132
+ * @param {boolean} [val=undefined] - If defined, True enables the action menu, False disables it.
6133
+ */
6134
+ public UseActionMenu(val?:boolean):void;
6135
+ /**
5996
6136
  * Create instance of WSDropDown control.
5997
6137
  * @function WSDropDown
5998
6138
  * @param {string} [ctlId=undefined] - Unique control ID that can be used to access control using Fit.Controls.Find(..).
@@ -6093,6 +6233,13 @@ declare namespace Fit
6093
6233
  */
6094
6234
  public GetSelections(includeInvalid?:boolean):Fit.Controls.DropDownTypeDefs.DropDownItem[];
6095
6235
  /**
6236
+ * Make DropDown highlight first selectable item when opened.
6237
+ * @function HighlightFirst
6238
+ * @param {boolean} [val=undefined] - If set, True enables feature, False disables it (default).
6239
+ * @returns boolean
6240
+ */
6241
+ public HighlightFirst(val?:boolean):boolean;
6242
+ /**
6096
6243
  * Get/set value indicating whether input is enabled.
6097
6244
  * @function InputEnabled
6098
6245
  * @param {boolean} [val=undefined] - If defined, True enables input, False disables it.
@@ -6156,6 +6303,13 @@ declare namespace Fit
6156
6303
  */
6157
6304
  public OpenDropDown():void;
6158
6305
  /**
6306
+ * Make DropDown restore scroll position and previously highlighted item when reopened.
6307
+ * @function PersistView
6308
+ * @param {boolean} [val=undefined] - If set, True enables feature, False disables it (default).
6309
+ * @returns boolean
6310
+ */
6311
+ public PersistView(val?:boolean):boolean;
6312
+ /**
6159
6313
  * Get/set value used as a placeholder on supported browsers, to indicate expected value or action.
6160
6314
  * @function Placeholder
6161
6315
  * @param {string} [val=undefined] - If defined, value is set as placeholder.
@@ -6746,6 +6900,12 @@ declare namespace Fit
6746
6900
  */
6747
6901
  public GetItem(value:string):Fit.Controls.ListViewTypeDefs.ListViewItem | null;
6748
6902
  /**
6903
+ * Get all items - returns array containing objects with Title (string) and Value (string) properties.
6904
+ * @function GetItems
6905
+ * @returns Fit.Controls.ListViewTypeDefs.ListViewItem[]
6906
+ */
6907
+ public GetItems():Fit.Controls.ListViewTypeDefs.ListViewItem[];
6908
+ /**
6749
6909
  * Returns value indicating whether control contains item with specified value.
6750
6910
  * @function HasItem
6751
6911
  * @param {string} value - Value of item to check for.
@@ -6753,6 +6913,23 @@ declare namespace Fit
6753
6913
  */
6754
6914
  public HasItem(value:string):boolean;
6755
6915
  /**
6916
+ * Register event handler fired when item is being selected.
6917
+ Selection can be canceled by returning False.
6918
+ The following arguments are passed to event handler function:
6919
+ Sender (ListView) and Item (with Title (string) and Value (string) properties).
6920
+ * @function OnSelect
6921
+ * @param {Fit.Controls.ListViewTypeDefs.OnSelectEventHandler<this>} cb - Event handler function.
6922
+ */
6923
+ public OnSelect(cb:Fit.Controls.ListViewTypeDefs.OnSelectEventHandler<this>):void;
6924
+ /**
6925
+ * Register event handler fired when item is selected.
6926
+ The following arguments are passed to event handler function:
6927
+ Sender (ListView) and Item (with Title (string) and Value (string) properties).
6928
+ * @function OnSelected
6929
+ * @param {Fit.Controls.ListViewTypeDefs.OnSelectedEventHandler<this>} cb - Event handler function.
6930
+ */
6931
+ public OnSelected(cb:Fit.Controls.ListViewTypeDefs.OnSelectedEventHandler<this>):void;
6932
+ /**
6756
6933
  * Remove item from ListView.
6757
6934
  * @function RemoveItem
6758
6935
  * @param {string} value - Value of item to remove.
@@ -6815,6 +6992,14 @@ declare namespace Fit
6815
6992
  */
6816
6993
  public HandleEvent(e?:Event):void;
6817
6994
  /**
6995
+ * Overridden by control developers (optional).
6996
+ This function can be used to make the picker control automatically highlight the first item.
6997
+ * @function HighlightFirst
6998
+ * @param {boolean} [val=undefined] - If set, True enables feature, False disables it (default).
6999
+ * @returns boolean
7000
+ */
7001
+ public HighlightFirst(val?:boolean):boolean;
7002
+ /**
6818
7003
  * Get/set max height of control - returns object with Value (number) and Unit (string) properties.
6819
7004
  * @function MaxHeight
6820
7005
  * @param {number} [value=undefined] - If defined, max height is updated to specified value. A value of -1 forces picker to fit height to content.
@@ -6875,6 +7060,16 @@ declare namespace Fit
6875
7060
  public OnShow(cb:Fit.Controls.PickerBaseTypeDefs.BaseEventHandler<this>):void;
6876
7061
  /**
6877
7062
  * Overridden by control developers (optional).
7063
+ This function can be used to tell the picker control to persist (remember) its current state between interactions.
7064
+ For instance a TreeView control would remembers its scroll position and highlighted node, while a calendar would
7065
+ remember the previously selected year and month.
7066
+ * @function PersistView
7067
+ * @param {boolean} [val=undefined] - If set, True enables feature, False disables it (default).
7068
+ * @returns boolean
7069
+ */
7070
+ public PersistView(val?:boolean):boolean;
7071
+ /**
7072
+ * Overridden by control developers (optional).
6878
7073
  Host control may invoke this function to reveal a selected item in
6879
7074
  the picker control. Often this means having the item scrolled into view.
6880
7075
  * @function RevealItemInView
@@ -7501,6 +7696,14 @@ declare namespace Fit
7501
7696
  */
7502
7697
  public HandleEvent(e?:Event):void;
7503
7698
  /**
7699
+ * Overridden by control developers (optional).
7700
+ This function can be used to make the picker control automatically highlight the first item.
7701
+ * @function HighlightFirst
7702
+ * @param {boolean} [val=undefined] - If set, True enables feature, False disables it (default).
7703
+ * @returns boolean
7704
+ */
7705
+ public HighlightFirst(val?:boolean):boolean;
7706
+ /**
7504
7707
  * Get/set max height of control - returns object with Value (number) and Unit (string) properties.
7505
7708
  * @function MaxHeight
7506
7709
  * @param {number} [value=undefined] - If defined, max height is updated to specified value. A value of -1 forces picker to fit height to content.
@@ -7561,6 +7764,16 @@ declare namespace Fit
7561
7764
  public OnShow(cb:Fit.Controls.PickerBaseTypeDefs.BaseEventHandler<this>):void;
7562
7765
  /**
7563
7766
  * Overridden by control developers (optional).
7767
+ This function can be used to tell the picker control to persist (remember) its current state between interactions.
7768
+ For instance a TreeView control would remembers its scroll position and highlighted node, while a calendar would
7769
+ remember the previously selected year and month.
7770
+ * @function PersistView
7771
+ * @param {boolean} [val=undefined] - If set, True enables feature, False disables it (default).
7772
+ * @returns boolean
7773
+ */
7774
+ public PersistView(val?:boolean):boolean;
7775
+ /**
7776
+ * Overridden by control developers (optional).
7564
7777
  Host control may invoke this function to reveal a selected item in
7565
7778
  the picker control. Often this means having the item scrolled into view.
7566
7779
  * @function RevealItemInView
@@ -8025,31 +8238,6 @@ declare namespace Fit
8025
8238
  }
8026
8239
  }
8027
8240
  /**
8028
- *
8029
- * @namespace [Fit.Controls.ListViewTypeDefs ListViewTypeDefs]
8030
- */
8031
- namespace ListViewTypeDefs
8032
- {
8033
- /**
8034
- * ListView item.
8035
- * @class [Fit.Controls.ListViewTypeDefs.ListViewItem ListViewItem]
8036
- */
8037
- class ListViewItem
8038
- {
8039
- // Properties defined by Fit.Controls.ListViewTypeDefs.ListViewItem
8040
- /**
8041
- * Item title.
8042
- * @member {string} Title
8043
- */
8044
- Title:string;
8045
- /**
8046
- * Unique item value.
8047
- * @member {string} Value
8048
- */
8049
- Value:string;
8050
- }
8051
- }
8052
- /**
8053
8241
  * Enum values determining visual appearance of button controls.
8054
8242
  * @enum {string}
8055
8243
  */