@bbn/bbn 1.0.83 → 1.0.85

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/dist/bundle.d.ts CHANGED
@@ -1080,12 +1080,12 @@ declare module "fn/ajax/_deleteLoader" {
1080
1080
  * @memberof bbn.fn
1081
1081
  *
1082
1082
  * @param {String} requestId The unique ID of the request sent
1083
- * @param {*} res The result of the request
1083
+ * @param {String|Object} res The result of the request
1084
1084
  * @param {Boolean} isAbort True if the deletion comes from abortion
1085
1085
  *
1086
1086
  * @returns {Boolean} True if the loader was found
1087
1087
  */
1088
- const _deleteLoader: (requestId: string, res?: any, isAbort?: boolean) => boolean;
1088
+ const _deleteLoader: (requestId: any, res?: any, isAbort?: boolean) => boolean;
1089
1089
  export { _deleteLoader };
1090
1090
  }
1091
1091
  declare module "fn/ajax/getLoader" {
@@ -1122,9 +1122,9 @@ declare module "fn/ajax/getLoader" {
1122
1122
  *
1123
1123
  * @param {String} requestId The unique ID of the request as used in bbn.env.loaders
1124
1124
  *
1125
- * @returns {false|Object} The corresponding loader Object if it exists, false otherwise
1125
+ * @returns {null|Object} The corresponding loader Object if it exists, false otherwise
1126
1126
  */
1127
- const getLoader: (requestId: string) => BbnLoader | null;
1127
+ const getLoader: (requestId: any) => BbnLoader;
1128
1128
  export { getLoader };
1129
1129
  }
1130
1130
  declare module "fn/ajax/abort" {
@@ -1587,7 +1587,7 @@ declare module "fn/ajax/ajax" {
1587
1587
  *
1588
1588
  * @returns {Promise} The Promise created by the generated XHR.
1589
1589
  */
1590
- const ajax: (url: any, datatype: string, data: any, success?: (data: object, headers?: object) => any, failure?: (url: string, o?: object) => any, abort?: (message: string, url: string) => any) => any;
1590
+ const ajax: (url: any, datatype?: any, data?: any, success?: any, failure?: any, abort?: any) => any;
1591
1591
  export { ajax };
1592
1592
  }
1593
1593
  declare module "fn/misc/analyzeFunction" {
@@ -1823,7 +1823,7 @@ declare module "fn/ajax/callback" {
1823
1823
  *
1824
1824
  * @returns {*} The result of the main callback function: res.script, fn, or bbn.fn.defaultLinkFunction
1825
1825
  */
1826
- const callback: (url: any, res: any, fn?: any, fn2?: any, ele?: any) => boolean;
1826
+ const callback: (url: any, res?: any, fn?: any, fn2?: any, ele?: any) => boolean;
1827
1827
  export { callback };
1828
1828
  }
1829
1829
  declare module "fn/string/camelize" {
@@ -2438,7 +2438,7 @@ declare module "fn/ajax/downloadContent" {
2438
2438
  *
2439
2439
  * @returns {undefined}
2440
2440
  */
2441
- const downloadContent: (filename: string, content: any, type?: string) => void;
2441
+ const downloadContent: (filename: any, content: any, type?: any) => void;
2442
2442
  export { downloadContent };
2443
2443
  }
2444
2444
  declare module "fn/ajax/download" {
@@ -3117,7 +3117,7 @@ declare module "fn/convert/imageToCanvas" {
3117
3117
  * @global
3118
3118
  * @memberof bbn.fn
3119
3119
  * @param {HTMLElement} img
3120
- * @returns
3120
+ * @returns {HTMLCanvasElement}
3121
3121
  */
3122
3122
  const imageToCanvas: (img: any) => HTMLCanvasElement;
3123
3123
  export { imageToCanvas };
@@ -3190,7 +3190,7 @@ declare module "fn/ajax/treatAjaxArguments" {
3190
3190
  *
3191
3191
  * @returns {Object} The configuration object
3192
3192
  */
3193
- const treatAjaxArguments: (args: any) => BbnAjaxCfg;
3193
+ const treatAjaxArguments: (args: any) => any;
3194
3194
  export { treatAjaxArguments };
3195
3195
  }
3196
3196
  declare module "fn/ajax/setNavigationVars" {
@@ -3215,9 +3215,9 @@ declare module "fn/ajax/setNavigationVars" {
3215
3215
  * @param {Object} data The data if any
3216
3216
  * @param {Boolean} repl If true the history state object will replace the current one, will be added otherwise
3217
3217
  *
3218
- * @returns {undefined}
3218
+ * @returns {void}
3219
3219
  */
3220
- const setNavigationVars: (url: any, title: any, data?: object, repl?: boolean) => void;
3220
+ const setNavigationVars: (url: any, title: any, data?: any, repl?: boolean) => void;
3221
3221
  export { setNavigationVars };
3222
3222
  }
3223
3223
  declare module "fn/ajax/link" {
@@ -3545,7 +3545,7 @@ declare module "fn/browser/isFocused" {
3545
3545
  *
3546
3546
  * @returns {Boolean} True if focused
3547
3547
  */
3548
- const isFocused: (ele: HTMLElement, contain?: boolean) => boolean;
3548
+ const isFocused: (ele: any, contain?: boolean) => boolean;
3549
3549
  export { isFocused };
3550
3550
  }
3551
3551
  declare module "fn/type/isIP" {
@@ -3735,7 +3735,7 @@ declare module "fn/browser/warning" {
3735
3735
  * @param {...any} args
3736
3736
  * @returns
3737
3737
  */
3738
- const warning: (message: string) => void;
3738
+ const warning: (message: any) => void;
3739
3739
  export { warning };
3740
3740
  }
3741
3741
  declare module "fn/html/makeReactive" {
@@ -4050,6 +4050,38 @@ declare module "fn/object/pickValue" {
4050
4050
  const pickValue: (arr: any[]) => any;
4051
4051
  export { pickValue };
4052
4052
  }
4053
+ declare module "fn/object/setProperty" {
4054
+ /**
4055
+ * Returns the value of the given property from the given object.
4056
+ *
4057
+ * Looks for the given property in the given object, accepting dot (.) separator
4058
+ * for deep property access, and returns its value if found and undefined otherwise.
4059
+ *
4060
+ * @method getProperty
4061
+ * @global
4062
+ * @example
4063
+ * ```javascript
4064
+ * bbn.fn.getProperty({a: 1, b: 2}, 'b');
4065
+ * // 2
4066
+ * ```
4067
+ * @example
4068
+ * ```javascript
4069
+ * bbn.fn.getProperty({a: 1, b: {o: {a: 33, h: 5}}}, 'b.o.a');
4070
+ * // 33
4071
+ * ```
4072
+ * @example
4073
+ * ```javascript
4074
+ * bbn.fn.getProperty({a: 1, b: {o: {a: 33, h: 5}}}, 'b.h.a');
4075
+ * // undefined
4076
+ * ```
4077
+ * @memberof bbn.fn
4078
+ * @param {Object} obj
4079
+ * @param {String} prop
4080
+ * @returns {*} The property's value or undefined
4081
+ */
4082
+ const setProperty: (obj: object, prop: string, value: any, force?: boolean) => void;
4083
+ export { setProperty };
4084
+ }
4053
4085
  declare module "fn/ajax/postOut" {
4054
4086
  /**
4055
4087
  * Posts a request in a new window.
@@ -4068,9 +4100,9 @@ declare module "fn/ajax/postOut" {
4068
4100
  * @param {Function} success A function to execute in case of success
4069
4101
  * @param {String} target The target attribute of the form
4070
4102
  *
4071
- * @returns {undefined}
4103
+ * @returns {void}
4072
4104
  */
4073
- const postOut: (url: string, data: BbnBasicObject, success?: () => any, target?: string) => void;
4105
+ const postOut: (url: any, data: any, success?: any, target?: string) => void;
4074
4106
  export { postOut };
4075
4107
  }
4076
4108
  declare module "fn/string/printf" {
@@ -4336,7 +4368,7 @@ declare module "fn/browser/selectElementText" {
4336
4368
  *
4337
4369
  * @returns {Boolean} True if focused
4338
4370
  */
4339
- const selectElementText: (ele: HTMLElement, win?: Window) => void;
4371
+ const selectElementText: (ele: any, win?: any) => void;
4340
4372
  export { selectElementText };
4341
4373
  }
4342
4374
  declare module "fn/browser/setCookie" {
@@ -4380,38 +4412,6 @@ declare module "fn/object/setProp" {
4380
4412
  const setProp: (obj: object, prop: string, value: any, writable?: boolean, configurable?: boolean) => void;
4381
4413
  export { setProp };
4382
4414
  }
4383
- declare module "fn/object/setProperty" {
4384
- /**
4385
- * Returns the value of the given property from the given object.
4386
- *
4387
- * Looks for the given property in the given object, accepting dot (.) separator
4388
- * for deep property access, and returns its value if found and undefined otherwise.
4389
- *
4390
- * @method getProperty
4391
- * @global
4392
- * @example
4393
- * ```javascript
4394
- * bbn.fn.getProperty({a: 1, b: 2}, 'b');
4395
- * // 2
4396
- * ```
4397
- * @example
4398
- * ```javascript
4399
- * bbn.fn.getProperty({a: 1, b: {o: {a: 33, h: 5}}}, 'b.o.a');
4400
- * // 33
4401
- * ```
4402
- * @example
4403
- * ```javascript
4404
- * bbn.fn.getProperty({a: 1, b: {o: {a: 33, h: 5}}}, 'b.h.a');
4405
- * // undefined
4406
- * ```
4407
- * @memberof bbn.fn
4408
- * @param {Object} obj
4409
- * @param {String} prop
4410
- * @returns {*} The property's value or undefined
4411
- */
4412
- const setProperty: (obj: object, prop: string, value: any, force?: boolean) => void;
4413
- export { setProperty };
4414
- }
4415
4415
  declare module "fn/string/shorten" {
4416
4416
  /**
4417
4417
  * Shortens the given string after *len* characters.
@@ -4593,7 +4593,7 @@ declare module "fn/convert/toCSV" {
4593
4593
  * @param {String} [valEsc="] The string escaper character
4594
4594
  * @returns {String} A CSV string
4595
4595
  */
4596
- const toCSV: (arr: any[], valSep?: string, rowSep?: string, valEsc?: string) => string;
4596
+ const toCSV: (arr: any, valSep?: string, rowSep?: string, valEsc?: string) => string;
4597
4597
  export { toCSV };
4598
4598
  }
4599
4599
  declare module "fn/browser/toggleFullScreen" {
@@ -4641,14 +4641,14 @@ declare module "fn/ajax/upload" {
4641
4641
  *
4642
4642
  * @returns {Promise}
4643
4643
  */
4644
- const upload: (url: string, file: any, success?: (d: any) => any, failure?: (d: any) => any, progress?: (d: any, l: any, t: any) => any) => any;
4644
+ const upload: (url: any, file: any, success?: any, failure?: any, progress?: any) => any;
4645
4645
  export { upload };
4646
4646
  }
4647
4647
  declare module "fn" {
4648
4648
  const fn: {
4649
4649
  _addLoader: (requestId: any, prom: any, source: any) => number;
4650
4650
  _compareValues: (a: any, b: any, prop: any, dir?: string) => 0 | 1 | -1;
4651
- _deleteLoader: (requestId: string, res?: any, isAbort?: boolean) => boolean;
4651
+ _deleteLoader: (requestId: any, res?: any, isAbort?: boolean) => boolean;
4652
4652
  abort: (requestId: any) => void;
4653
4653
  abortURL: (url: any) => void;
4654
4654
  addColors: (colors: object) => void;
@@ -4657,7 +4657,7 @@ declare module "fn" {
4657
4657
  adjustHeight: () => void;
4658
4658
  adjustSize: (type: any, eles: any) => void;
4659
4659
  adjustWidth: () => void;
4660
- ajax: (url: any, datatype: string, data: any, success?: (data: object, headers?: object) => any, failure?: (url: string, o?: object) => any, abort?: (message: string, url: string) => any) => any;
4660
+ ajax: (url: any, datatype?: any, data?: any, success?: any, failure?: any, abort?: any) => any;
4661
4661
  analyzeFunction: (fn: any) => {
4662
4662
  body: any;
4663
4663
  args: any[];
@@ -4675,7 +4675,7 @@ declare module "fn" {
4675
4675
  baseName: (path: string, suffix?: string) => string;
4676
4676
  br2nl: (st: any) => string;
4677
4677
  calendar: (d?: string | number | Date, wrong_result?: string) => any;
4678
- callback: (url: any, res: any, fn?: any, fn2?: any, ele?: any) => boolean;
4678
+ callback: (url: any, res?: any, fn?: any, fn2?: any, ele?: any) => boolean;
4679
4679
  camelize: (str: any) => any;
4680
4680
  camelToCss: (str: any) => any;
4681
4681
  canvasToImage: (canvas: any) => HTMLImageElement;
@@ -4715,7 +4715,7 @@ declare module "fn" {
4715
4715
  diffObj: (obj1: object, obj2: object, unchanged?: boolean, notRoot?: boolean) => any;
4716
4716
  dirName: (path: any) => string;
4717
4717
  download: (url: any, filename?: string, params?: any) => any;
4718
- downloadContent: (filename: string, content: any, type?: string) => void;
4718
+ downloadContent: (filename: any, content: any, type?: any) => void;
4719
4719
  each: (arr: any, fn: any) => any;
4720
4720
  eraseCookie: (name: any) => void;
4721
4721
  error: (errorMsg: any) => never;
@@ -4756,7 +4756,7 @@ declare module "fn" {
4756
4756
  getFieldValues: (arr: object[], field: string, prop: any, val: any, operator: any) => any[];
4757
4757
  getHtml: (ele: any, stripComments?: boolean) => any;
4758
4758
  getHTMLOfSelection: () => string;
4759
- getLoader: (requestId: string) => BbnLoader;
4759
+ getLoader: (requestId: any) => BbnLoader;
4760
4760
  getPath: (element: any) => string;
4761
4761
  getProp: (obj: any, prop: any) => any;
4762
4762
  getProperty: (obj: any, prop: any) => any;
@@ -4793,7 +4793,7 @@ declare module "fn" {
4793
4793
  isEmail: (...args: any[]) => boolean;
4794
4794
  isEmpty: (obj: any) => boolean;
4795
4795
  isEvent: (...args: any[]) => boolean;
4796
- isFocused: (ele: HTMLElement, contain?: boolean) => boolean;
4796
+ isFocused: (ele: any, contain?: boolean) => boolean;
4797
4797
  isFunction: (...args: any[]) => boolean;
4798
4798
  isHostname: (...args: any[]) => boolean;
4799
4799
  isInside: (ele: any, ancestor: any) => boolean;
@@ -4838,7 +4838,7 @@ declare module "fn" {
4838
4838
  percent: (percent: any, cent: any) => number;
4839
4839
  pickValue: (arr: any[]) => any;
4840
4840
  post: (...args: any[]) => any;
4841
- postOut: (url: string, data: BbnBasicObject, success?: () => any, target?: string) => void;
4841
+ postOut: (url: any, data: any, success?: any, target?: string) => void;
4842
4842
  printf: (format: any) => any;
4843
4843
  quotes2html: (st: string, type?: string) => string;
4844
4844
  randomInt: (min: number, max: number) => number;
@@ -4858,11 +4858,11 @@ declare module "fn" {
4858
4858
  roundDecimal: (value: number, decimals: number) => number;
4859
4859
  sanitize: (str: any, separator?: string) => any;
4860
4860
  search: (arr: any[], prop: string | object | import("fn/object/filterToConditions").Filter | ((a: any, i: string | number | symbol) => boolean), val?: any, operator?: string | number, startFrom?: number) => number;
4861
- selectElementText: (ele: HTMLElement, win?: Window) => void;
4861
+ selectElementText: (ele: any, win?: any) => void;
4862
4862
  selector: (ele: string | HTMLElement) => HTMLElement;
4863
4863
  setCookie: (name: any, value: any, days: any) => void;
4864
4864
  setCssVar: (varname: any, value: any) => void;
4865
- setNavigationVars: (url: any, title: any, data?: object, repl?: boolean) => void;
4865
+ setNavigationVars: (url: any, title: any, data?: any, repl?: boolean) => void;
4866
4866
  setProp: (obj: object, prop: string, value: any, writable?: boolean, configurable?: boolean) => void;
4867
4867
  setProperty: (obj: object, prop: string, value: any, force?: boolean) => void;
4868
4868
  shorten: (st: string, len?: number, adj?: string) => string;
@@ -4878,15 +4878,15 @@ declare module "fn" {
4878
4878
  substr: (str: string, from: number, length?: number) => string;
4879
4879
  sum: (arr: object[], numberProp: string | ((a: any) => any), prop: string | object, val?: any, operator?: string) => number;
4880
4880
  timestamp: (seconds?: boolean) => number;
4881
- toCSV: (arr: any[], valSep?: string, rowSep?: string, valEsc?: string) => string;
4881
+ toCSV: (arr: any, valSep?: string, rowSep?: string, valEsc?: string) => string;
4882
4882
  toggleFullScreen: () => void;
4883
4883
  translate: (o: object, namespace?: string) => void;
4884
- treatAjaxArguments: (args: any) => BbnAjaxCfg;
4884
+ treatAjaxArguments: (args: any) => any;
4885
4885
  trim: (str: any, hair?: string) => any;
4886
4886
  uniqString: (...args: any[]) => string;
4887
4887
  unique: (arr: any[]) => any[];
4888
- upload: (url: string, file: any, success?: (d: any) => any, failure?: (d: any) => any, progress?: (d: any, l: any, t: any) => any) => any;
4889
- warning: (message: string) => void;
4888
+ upload: (url: any, file: any, success?: any, failure?: any, progress?: any) => any;
4889
+ warning: (message: any) => void;
4890
4890
  };
4891
4891
  export { fn };
4892
4892
  }