@bbn/bbn 1.0.29 → 1.0.31

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
@@ -209,7 +209,7 @@ declare module "fn/defaultEndLoadingFunction" {
209
209
  export { defaultEndLoadingFunction };
210
210
  }
211
211
  declare module "fn/defaultAjaxErrorFunction" {
212
- const defaultAjaxErrorFunction: (jqXHR: any, textStatus?: string, errorThrown?: Error) => boolean;
212
+ const defaultAjaxErrorFunction: (jqXHR: any, textStatus?: string, errorThrown?: object) => boolean;
213
213
  export { defaultAjaxErrorFunction };
214
214
  }
215
215
  declare module "fn/defaultAjaxAbortFunction" {
@@ -362,11 +362,11 @@ declare module "fn/cssExists" {
362
362
  export { cssExists };
363
363
  }
364
364
  declare module "fn/dateSQL" {
365
- const dateSQL: (v: any, dayOnly: any) => any;
365
+ const dateSQL: (v: any, dayOnly: any) => string;
366
366
  export { dateSQL };
367
367
  }
368
368
  declare module "fn/daysInMonth" {
369
- const daysInMonth: (v: any) => any;
369
+ const daysInMonth: (v: any) => number | false;
370
370
  export { daysInMonth };
371
371
  }
372
372
  declare module "fn/deepPath" {
@@ -478,7 +478,7 @@ declare module "fn/formatBytes" {
478
478
  export { formatBytes };
479
479
  }
480
480
  declare module "fn/formatDate" {
481
- const formatDate: (date: any, format: any) => any;
481
+ const formatDate: (date: any, format: any) => string;
482
482
  export { formatDate };
483
483
  }
484
484
  declare module "fn/formatSize" {
@@ -1113,11 +1113,11 @@ declare module "index" {
1113
1113
  createObject: (...args: any[]) => any;
1114
1114
  cssExists: (f: any) => boolean;
1115
1115
  date: (v: any) => any;
1116
- dateSQL: (v: any, dayOnly: any) => any;
1117
- daysInMonth: (v: any) => any;
1116
+ dateSQL: (v: any, dayOnly: any) => string;
1117
+ daysInMonth: (v: any) => number | false;
1118
1118
  deepPath: (arr: any[], filter: object, deepProperty: string, res?: any[]) => false | any[];
1119
1119
  defaultAjaxAbortFunction: (message: string, url?: string) => void;
1120
- defaultAjaxErrorFunction: (jqXHR: any, textStatus?: string, errorThrown?: Error) => boolean;
1120
+ defaultAjaxErrorFunction: (jqXHR: any, textStatus?: string, errorThrown?: object) => boolean;
1121
1121
  defaultAlertFunction: (msg: string, title?: string) => void;
1122
1122
  defaultConfirmFunction: (text: string, yesFn: () => any, noFn: () => any) => void;
1123
1123
  defaultEndLoadingFunction: (url: string, timestamp: number, data?: object, res?: object) => boolean;
@@ -1154,7 +1154,7 @@ declare module "index" {
1154
1154
  forir: (arr: any[], fn: (a: any, b: number) => any, max?: number, min?: number) => void;
1155
1155
  format: (str: any) => any;
1156
1156
  formatBytes: (bytes: any, decimals?: number) => string;
1157
- formatDate: (date: any, format: any) => any;
1157
+ formatDate: (date: any, format: any) => string;
1158
1158
  formatSize: (st: any, noValid: any) => any;
1159
1159
  formdata: (form: HTMLFormElement) => {};
1160
1160
  fromXml: (xml: any, arrayTags: any) => {};
package/dist/bundle.js CHANGED
@@ -1786,7 +1786,7 @@ var bbn = (() => {
1786
1786
  };
1787
1787
  exports.date = date;
1788
1788
  });
1789
- define("fn/fdatetime", ["require", "exports", "fn/date", "fn/isDate", "fn/isString", "dayjs"], function (require, exports, date_1, isDate_3, isString_5, dayjs) {
1789
+ define("fn/fdatetime", ["require", "exports", "fn/date", "fn/isDate", "fn/isString"], function (require, exports, date_1, isDate_3, isString_5) {
1790
1790
  "use strict";
1791
1791
  Object.defineProperty(exports, "__esModule", { value: true });
1792
1792
  exports.fdatetime = void 0;
@@ -1811,7 +1811,7 @@ var bbn = (() => {
1811
1811
  };
1812
1812
  exports.fdatetime = fdatetime;
1813
1813
  });
1814
- define("fn/fdate", ["require", "exports", "fn/fdatetime", "fn/date", "fn/isDate", "fn/isString", "dayjs"], function (require, exports, fdatetime_1, date_2, isDate_4, isString_6, dayjs) {
1814
+ define("fn/fdate", ["require", "exports", "fn/fdatetime", "fn/date", "fn/isDate", "fn/isString"], function (require, exports, fdatetime_1, date_2, isDate_4, isString_6) {
1815
1815
  "use strict";
1816
1816
  Object.defineProperty(exports, "__esModule", { value: true });
1817
1817
  exports.fdate = void 0;
@@ -1831,11 +1831,11 @@ var bbn = (() => {
1831
1831
  };
1832
1832
  exports.fdate = fdate;
1833
1833
  });
1834
- define("fn/calendar", ["require", "exports", "fn/fdate", "fn/date", "fn/isDate", "fn/isString", "dayjs", "dayjs/plugin/calendar"], function (require, exports, fdate_1, date_3, isDate_5, isString_7, dayjs, cal) {
1834
+ define("fn/calendar", ["require", "exports", "fn/fdate", "fn/date", "fn/isDate", "fn/isString"], function (require, exports, fdate_1, date_3, isDate_5, isString_7) {
1835
1835
  "use strict";
1836
1836
  Object.defineProperty(exports, "__esModule", { value: true });
1837
1837
  exports.calendar = void 0;
1838
- dayjs.extend(cal);
1838
+ dayjs.extend(window['dayjs_plugin_calendar']);
1839
1839
  const calendar = function (d, wrong_result) {
1840
1840
  if (undefined === dayjs) {
1841
1841
  return (0, fdate_1.fdate)(d, wrong_result);
@@ -2341,7 +2341,7 @@ var bbn = (() => {
2341
2341
  };
2342
2342
  exports.cssExists = cssExists;
2343
2343
  });
2344
- define("fn/dateSQL", ["require", "exports", "fn/date", "dayjs"], function (require, exports, date_4, dayjs) {
2344
+ define("fn/dateSQL", ["require", "exports", "fn/date"], function (require, exports, date_4) {
2345
2345
  "use strict";
2346
2346
  Object.defineProperty(exports, "__esModule", { value: true });
2347
2347
  exports.dateSQL = void 0;
@@ -2353,7 +2353,7 @@ var bbn = (() => {
2353
2353
  };
2354
2354
  exports.dateSQL = dateSQL;
2355
2355
  });
2356
- define("fn/daysInMonth", ["require", "exports", "fn/date", "dayjs"], function (require, exports, date_5, dayjs) {
2356
+ define("fn/daysInMonth", ["require", "exports", "fn/date"], function (require, exports, date_5) {
2357
2357
  "use strict";
2358
2358
  Object.defineProperty(exports, "__esModule", { value: true });
2359
2359
  exports.daysInMonth = void 0;
@@ -2951,7 +2951,7 @@ var bbn = (() => {
2951
2951
  };
2952
2952
  exports.formatBytes = formatBytes;
2953
2953
  });
2954
- define("fn/formatDate", ["require", "exports", "dayjs"], function (require, exports, dayjs) {
2954
+ define("fn/formatDate", ["require", "exports"], function (require, exports) {
2955
2955
  "use strict";
2956
2956
  Object.defineProperty(exports, "__esModule", { value: true });
2957
2957
  exports.formatDate = void 0;
@@ -3077,11 +3077,11 @@ var bbn = (() => {
3077
3077
  };
3078
3078
  exports.fromXml = fromXml;
3079
3079
  });
3080
- define("fn/ftime", ["require", "exports", "fn/date", "fn/isDate", "fn/isString", "dayjs", "dayjs/plugin/calendar"], function (require, exports, date_6, isDate_7, isString_17, dayjs, cal) {
3080
+ define("fn/ftime", ["require", "exports", "fn/date", "fn/isDate", "fn/isString"], function (require, exports, date_6, isDate_7, isString_17) {
3081
3081
  "use strict";
3082
3082
  Object.defineProperty(exports, "__esModule", { value: true });
3083
3083
  exports.ftime = void 0;
3084
- dayjs.extend(cal);
3084
+ dayjs.extend(window['dayjs_plugin_calendar']);
3085
3085
  const ftime = function (d, wrong_result) {
3086
3086
  let r = (0, date_6.date)(d);
3087
3087
  if (!(0, isDate_7.isDate)(r)) {
@@ -4017,7 +4017,7 @@ var bbn = (() => {
4017
4017
  };
4018
4018
  exports.isMobile = isMobile;
4019
4019
  });
4020
- define("fn/init", ["require", "exports", "../../node_modules/dayjs/index", "fn/substr", "fn/each", "fn/extend", "fn/addColors", "fn/link", "fn/submit", "fn/resize", "fn/isMobile", "fn/isTabletDevice", "fn/defaultHistoryFunction", "fn/isFunction", "fn/log"], function (require, exports, dayjs, substr_11, each_18, extend_6, addColors_1, link_1, submit_1, resize_1, isMobile_1, isTabletDevice_2, defaultHistoryFunction_1, isFunction_10, log_15) {
4020
+ define("fn/init", ["require", "exports", "fn/substr", "fn/each", "fn/extend", "fn/addColors", "fn/link", "fn/submit", "fn/resize", "fn/isMobile", "fn/isTabletDevice", "fn/defaultHistoryFunction", "fn/isFunction", "fn/log"], function (require, exports, substr_11, each_18, extend_6, addColors_1, link_1, submit_1, resize_1, isMobile_1, isTabletDevice_2, defaultHistoryFunction_1, isFunction_10, log_15) {
4021
4021
  "use strict";
4022
4022
  Object.defineProperty(exports, "__esModule", { value: true });
4023
4023
  exports.init = void 0;
@@ -5779,7 +5779,7 @@ var bbn = (() => {
5779
5779
  };
5780
5780
  exports.uniqString = uniqString;
5781
5781
  });
5782
- define("fn/upload", ["require", "exports", "../../node_modules/axios/dist/axios", "fn/objectToFormData", "fn/log"], function (require, exports, axios, objectToFormData_1, log_18) {
5782
+ define("fn/upload", ["require", "exports", "fn/objectToFormData", "fn/log"], function (require, exports, objectToFormData_1, log_18) {
5783
5783
  "use strict";
5784
5784
  Object.defineProperty(exports, "__esModule", { value: true });
5785
5785
  exports.upload = void 0;
@@ -2,9 +2,7 @@ import { fdate } from './fdate';
2
2
  import { date } from './date';
3
3
  import { isDate } from './isDate';
4
4
  import { isString } from './isString';
5
- import * as dayjs from 'dayjs';
6
- import * as cal from 'dayjs/plugin/calendar';
7
- dayjs.extend(cal);
5
+ dayjs.extend(window['dayjs_plugin_calendar']);
8
6
  const calendar = function (d, wrong_result) {
9
7
  if (undefined === dayjs) {
10
8
  return fdate(d, wrong_result);
@@ -1,5 +1,4 @@
1
1
  import { date } from './date';
2
- import * as dayjs from 'dayjs';
3
2
  const dateSQL = function (v, dayOnly) {
4
3
  let value = date(v);
5
4
  if (value) {
@@ -1,5 +1,4 @@
1
1
  import { date } from './date';
2
- import * as dayjs from 'dayjs';
3
2
  const daysInMonth = function (v) {
4
3
  let d = date(v);
5
4
  if (d) {
@@ -1,2 +1,2 @@
1
- declare const defaultAjaxErrorFunction: (jqXHR: any, textStatus?: string, errorThrown?: Error) => boolean;
1
+ declare const defaultAjaxErrorFunction: (jqXHR: any, textStatus?: string, errorThrown?: object) => boolean;
2
2
  export { defaultAjaxErrorFunction };
package/dist/fn/fdate.js CHANGED
@@ -2,7 +2,6 @@ import { fdatetime } from './fdatetime';
2
2
  import { date } from './date';
3
3
  import { isDate } from './isDate';
4
4
  import { isString } from './isString';
5
- import * as dayjs from 'dayjs';
6
5
  const fdate = function (d, wrong_result) {
7
6
  // Retro compatibility
8
7
  if (wrong_result === true) {
@@ -1,7 +1,6 @@
1
1
  import { date } from './date';
2
2
  import { isDate } from './isDate';
3
3
  import { isString } from './isString';
4
- import * as dayjs from 'dayjs';
5
4
  const fdatetime = function (d, wrong_result) {
6
5
  let r = date(d);
7
6
  if (!isDate(r)) {
@@ -1,4 +1,3 @@
1
- import * as dayjs from 'dayjs';
2
1
  const formatDate = function (date, format) {
3
2
  return dayjs(date).format(format);
4
3
  };
package/dist/fn/ftime.js CHANGED
@@ -1,9 +1,7 @@
1
1
  import { date } from './date';
2
2
  import { isDate } from './isDate';
3
3
  import { isString } from './isString';
4
- import * as dayjs from 'dayjs';
5
- import * as cal from 'dayjs/plugin/calendar';
6
- dayjs.extend(cal);
4
+ dayjs.extend(window['dayjs_plugin_calendar']);
7
5
  const ftime = function (d, wrong_result) {
8
6
  let r = date(d);
9
7
  if (!isDate(r)) {
package/dist/fn/init.js CHANGED
@@ -1,4 +1,3 @@
1
- import * as dayjs from '../../node_modules/dayjs/index';
2
1
  import { substr } from './substr';
3
2
  import { each } from './each';
4
3
  import { extend } from './extend';
package/dist/fn/upload.js CHANGED
@@ -1,4 +1,3 @@
1
- import * as axios from '../../node_modules/axios/dist/axios';
2
1
  import { objectToFormData } from './objectToFormData';
3
2
  import { log } from './log';
4
3
  const upload = function (url, file, success, failure, progress) {
package/dist/index.d.ts CHANGED
@@ -180,7 +180,7 @@ declare const fn: {
180
180
  daysInMonth: (v: any) => number | false;
181
181
  deepPath: (arr: any[], filter: object, deepProperty: string, res?: any[]) => false | any[];
182
182
  defaultAjaxAbortFunction: (message: string, url?: string) => void;
183
- defaultAjaxErrorFunction: (jqXHR: any, textStatus?: string, errorThrown?: Error) => boolean;
183
+ defaultAjaxErrorFunction: (jqXHR: any, textStatus?: string, errorThrown?: object) => boolean;
184
184
  defaultAlertFunction: (msg: string, title?: string) => void;
185
185
  defaultConfirmFunction: (text: string, yesFn: () => any, noFn: () => any) => void;
186
186
  defaultEndLoadingFunction: (url: string, timestamp: number, data?: object, res?: object) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "1.0.29",
3
+ "version": "1.0.31",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",