@kwiz/common 1.0.9 → 1.0.11
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/_dependencies.d.ts +8 -1
- package/dist/_dependencies.js +10 -5
- package/dist/_dependencies.js.map +1 -1
- package/dist/config.d.ts +9 -0
- package/dist/config.js +16 -0
- package/dist/config.js.map +1 -0
- package/dist/exports-index.d.ts +4 -0
- package/dist/exports-index.js +21 -0
- package/dist/exports-index.js.map +1 -0
- package/dist/helpers/_dependencies.d.ts +1 -1
- package/dist/helpers/_dependencies.js +1 -1
- package/dist/helpers/_dependencies.js.map +1 -1
- package/{src/helpers/index.ts → dist/helpers/exports-index.d.ts} +29 -29
- package/dist/helpers/exports-index.js +46 -0
- package/dist/helpers/exports-index.js.map +1 -0
- package/dist/helpers/graph/exports-index.d.ts +1 -0
- package/dist/helpers/graph/exports-index.js +18 -0
- package/dist/helpers/graph/exports-index.js.map +1 -0
- package/dist/helpers/scheduler/exports-index.d.ts +1 -0
- package/dist/helpers/scheduler/exports-index.js +18 -0
- package/dist/helpers/scheduler/exports-index.js.map +1 -0
- package/dist/helpers/typecheckers.d.ts +1 -1
- package/dist/index.d.ts +1 -15
- package/dist/index.js +1 -20
- package/dist/index.js.map +1 -1
- package/dist/types/exports-index.d.ts +14 -0
- package/dist/types/exports-index.js +31 -0
- package/dist/types/exports-index.js.map +1 -0
- package/dist/types/graph/exports-index.d.ts +1 -0
- package/dist/types/graph/exports-index.js +18 -0
- package/dist/types/graph/exports-index.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/libs/exports-index.d.ts +3 -0
- package/dist/types/libs/exports-index.js +20 -0
- package/dist/types/libs/exports-index.js.map +1 -0
- package/dist/types/locales copy.d.ts +122 -0
- package/dist/types/locales copy.js +1 -0
- package/dist/types/locales copy.js.map +1 -0
- package/dist/types/locales.d.ts +14 -13
- package/dist/types/locales.export.d.ts +1 -0
- package/dist/types/locales.export.js +3 -0
- package/dist/types/locales.export.js.map +1 -0
- package/dist/types/locales.js +2 -0
- package/dist/types/moment.d.ts +7 -2
- package/dist/types/moment.js +2 -0
- package/dist/utils/_dependencies.d.ts +2 -2
- package/dist/utils/_dependencies.js +2 -2
- package/dist/utils/_dependencies.js.map +1 -1
- package/dist/utils/auth/exports-index.d.ts +2 -0
- package/dist/utils/auth/exports-index.js +19 -0
- package/dist/utils/auth/exports-index.js.map +1 -0
- package/dist/utils/exports-index.d.ts +11 -0
- package/dist/utils/exports-index.js +28 -0
- package/dist/utils/exports-index.js.map +1 -0
- package/dist/utils/knownscript.d.ts +4 -3
- package/dist/utils/knownscript.js.map +1 -1
- package/dist/utils/sharepoint.rest/exports-index.d.ts +9 -0
- package/dist/utils/sharepoint.rest/exports-index.js +26 -0
- package/dist/utils/sharepoint.rest/exports-index.js.map +1 -0
- package/dist/utils/sharepoint.rest/item.js +1 -1
- package/dist/utils/sharepoint.rest/item.js.map +1 -1
- package/dist/utils/sharepoint.rest/listutils/exports-index.d.ts +3 -0
- package/dist/utils/sharepoint.rest/listutils/exports-index.js +20 -0
- package/dist/utils/sharepoint.rest/listutils/exports-index.js.map +1 -0
- package/fix-folder-imports.js +27 -0
- package/package.json +68 -66
- package/src/_dependencies.ts +12 -2
- package/src/config.ts +17 -0
- package/src/exports-index.ts +4 -0
- package/src/helpers/_dependencies.ts +1 -1
- package/src/helpers/exports-index.ts +29 -0
- package/src/helpers/graph/exports-index.ts +1 -0
- package/src/helpers/scheduler/exports-index.ts +1 -0
- package/src/index.ts +1 -23
- package/src/types/exports-index.ts +14 -0
- package/src/types/graph/exports-index.ts +1 -0
- package/src/types/libs/exports-index.ts +3 -0
- package/src/types/locales.ts +16 -16
- package/src/types/moment.ts +7 -2
- package/src/utils/_dependencies.ts +2 -2
- package/src/utils/auth/exports-index.ts +2 -0
- package/src/utils/date.ts +1 -1
- package/src/utils/exports-index.ts +11 -0
- package/src/utils/knownscript.ts +4 -3
- package/src/utils/sharepoint.rest/exports-index.ts +9 -0
- package/src/utils/sharepoint.rest/item.ts +1 -1
- package/src/utils/sharepoint.rest/listutils/exports-index.ts +3 -0
- package/src/types/graph/index.ts +0 -1
- package/src/types/index.ts +0 -12
- package/src/types/libs/index.ts +0 -4
- package/src/utils/auth/index.ts +0 -3
- package/src/utils/index.ts +0 -14
- package/src/utils/sharepoint.rest/index.ts +0 -11
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export * from './graph/exports-index';
|
|
2
|
+
export * from './scheduler/exports-index';
|
|
3
|
+
export * from './Guid';
|
|
4
|
+
export * from './base64';
|
|
5
|
+
export * from './browser';
|
|
6
|
+
export * from './browserinfo';
|
|
7
|
+
export * from './collections.base';
|
|
8
|
+
export * from './collections';
|
|
9
|
+
export * from './color';
|
|
10
|
+
export * from './cookies';
|
|
11
|
+
export * from './date';
|
|
12
|
+
export * from './debug';
|
|
13
|
+
export * from './emails';
|
|
14
|
+
export * from './eval';
|
|
15
|
+
export * from './file';
|
|
16
|
+
export * from './flatted';
|
|
17
|
+
export * from './functions';
|
|
18
|
+
export * from './http';
|
|
19
|
+
export * from './images';
|
|
20
|
+
export * from './json';
|
|
21
|
+
export * from './md5';
|
|
22
|
+
export * from './objects';
|
|
23
|
+
export * from './promises';
|
|
24
|
+
export * from './random';
|
|
25
|
+
export * from './sharepoint';
|
|
26
|
+
export * from './strings';
|
|
27
|
+
export * from './typecheckers';
|
|
28
|
+
export * from './url';
|
|
29
|
+
export * from './urlhelper';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './calendar.types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './scheduler';
|
package/src/index.ts
CHANGED
|
@@ -1,24 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export * from './helpers';
|
|
3
|
-
export * from './types';
|
|
4
|
-
export * from './utils';
|
|
1
|
+
export * from './exports-index';
|
|
5
2
|
|
|
6
|
-
export var BuildNumber = "unset";
|
|
7
|
-
export var IsLocalDev = false;
|
|
8
|
-
export var ReleaseStatus = "npm";
|
|
9
|
-
export function config(params: {
|
|
10
|
-
BuildNumber: string;
|
|
11
|
-
IsLocalDev: boolean;
|
|
12
|
-
ReleaseStatus: string;
|
|
13
|
-
ProjectName: string;
|
|
14
|
-
}) {
|
|
15
|
-
BuildNumber = params.BuildNumber;
|
|
16
|
-
IsLocalDev = params.IsLocalDev;
|
|
17
|
-
ReleaseStatus = params.ReleaseStatus;
|
|
18
|
-
function GetLogger(name: string) {
|
|
19
|
-
return ConsoleLogger.get(name, "[cms]");
|
|
20
|
-
}
|
|
21
|
-
return {
|
|
22
|
-
logger: GetLogger
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './graph/exports-index';
|
|
2
|
+
export * from './libs/exports-index';
|
|
3
|
+
export * from './auth';
|
|
4
|
+
export * from './common.types';
|
|
5
|
+
export * from './flatted.types';
|
|
6
|
+
export * from './globals.types';
|
|
7
|
+
export * from './knownscript.types';
|
|
8
|
+
export * from './locales';
|
|
9
|
+
export * from './localstoragecache.types';
|
|
10
|
+
export * from './moment';
|
|
11
|
+
export * from './regex.types';
|
|
12
|
+
export * from './rest.types';
|
|
13
|
+
export * from './sharepoint.types';
|
|
14
|
+
export * from './sharepoint.utils.types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './calendar.types';
|
package/src/types/locales.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type SysNumberFormatType = {
|
|
1
|
+
export type SysNumberFormatType = {
|
|
2
2
|
CurrencyDecimalDigits: number;
|
|
3
3
|
CurrencyDecimalSeparator: string;
|
|
4
4
|
IsReadOnly: boolean;
|
|
@@ -29,7 +29,7 @@ type SysNumberFormatType = {
|
|
|
29
29
|
DigitSubstitution: number;
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
type SysDateFormatType = {
|
|
32
|
+
export type SysDateFormatType = {
|
|
33
33
|
AMDesignator: string;
|
|
34
34
|
Calendar: {
|
|
35
35
|
MinSupportedDateTime: string;
|
|
@@ -66,7 +66,7 @@ type SysDateFormatType = {
|
|
|
66
66
|
MonthGenitiveNames: string[];
|
|
67
67
|
eras: any[];
|
|
68
68
|
};
|
|
69
|
-
type CultureInfoType = {
|
|
69
|
+
export type CultureInfoType = {
|
|
70
70
|
LCID: number;
|
|
71
71
|
name: string;
|
|
72
72
|
numberFormat: SysNumberFormatType;
|
|
@@ -81,14 +81,7 @@ type CultureInfoType = {
|
|
|
81
81
|
NumberGroupSeparator?: string;
|
|
82
82
|
};
|
|
83
83
|
|
|
84
|
-
interface
|
|
85
|
-
/**
|
|
86
|
-
* Formats a date by using the invariant (culture-independent) culture.
|
|
87
|
-
*/
|
|
88
|
-
format(format: string): string;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
interface IKLocales {
|
|
84
|
+
export interface IKLocales {
|
|
92
85
|
getCultureNameOrLCIDFromContextInfo(s: number): string | number;
|
|
93
86
|
GetCulture(cultureNameOrLCID: string | number): CultureInfoType;
|
|
94
87
|
GetCurrentCulture(): CultureInfoType;
|
|
@@ -118,8 +111,15 @@ interface IKLocales {
|
|
|
118
111
|
IsValidNumber(strNumber: string, culture: CultureInfoType): boolean;
|
|
119
112
|
}
|
|
120
113
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
114
|
+
declare global {
|
|
115
|
+
interface Date {
|
|
116
|
+
/**
|
|
117
|
+
* Formats a date by using the invariant (culture-independent) culture.
|
|
118
|
+
*/
|
|
119
|
+
format(format: string): string;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
interface IKWizComGlobals {
|
|
123
|
+
kLocales?: IKLocales;
|
|
124
|
+
}
|
|
125
|
+
}
|
package/src/types/moment.ts
CHANGED
|
@@ -3,5 +3,10 @@ interface IMomentJSObj {
|
|
|
3
3
|
isValid: () => boolean;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
|
|
7
|
+
export type typeMomentJS = (inp?: string, format?: string, strict?: boolean) => IMomentJSObj;
|
|
8
|
+
export type typeMonentJSTimeZone = (inp?: string, format?: string, strict?: boolean) => IMomentJSObj;
|
|
9
|
+
declare global {
|
|
10
|
+
var momentJS: typeMomentJS;
|
|
11
|
+
var monentJSTimeZone: typeMonentJSTimeZone;
|
|
12
|
+
}
|
package/src/utils/date.ts
CHANGED
|
@@ -10,7 +10,7 @@ export function toIsoDateFormat(date: Date, options?: {
|
|
|
10
10
|
omitZ?: boolean;
|
|
11
11
|
omitSeconds?: boolean;
|
|
12
12
|
addLocalTimezoneOffset?: boolean;
|
|
13
|
-
}) {
|
|
13
|
+
}): string {
|
|
14
14
|
let omitZ = options && options.omitZ === true || false;
|
|
15
15
|
let omitSeconds = options && options.omitSeconds === true || false;
|
|
16
16
|
let zeroTime = options && options.zeroTime === true || false;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './auth/exports-index';
|
|
2
|
+
export * from './sharepoint.rest/exports-index';
|
|
3
|
+
export * from './base64';
|
|
4
|
+
export * from './consolelogger';
|
|
5
|
+
export * from './date';
|
|
6
|
+
export * from './emails';
|
|
7
|
+
export * from './knownscript';
|
|
8
|
+
export * from './localstoragecache';
|
|
9
|
+
export * from './rest';
|
|
10
|
+
export * from './script';
|
|
11
|
+
export * from './sod';
|
package/src/utils/knownscript.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { typeMomentJS, typeMonentJSTimeZone } from "../types/moment";
|
|
2
|
+
import { ICS, IDataJs, IKLocales, IKnownScript, IMSAL, assign, isNullOrUndefined, ksGlobal } from "./_dependencies";
|
|
2
3
|
import script from "./script";
|
|
3
4
|
|
|
4
5
|
/** /products/common/scripts/ */
|
|
@@ -43,13 +44,13 @@ export var jQueryKnownScript = new KnownScriptLoader<any>({
|
|
|
43
44
|
});
|
|
44
45
|
|
|
45
46
|
/** loads into moment */
|
|
46
|
-
export var MomentJSKnownScript = new KnownScriptLoader<
|
|
47
|
+
export var MomentJSKnownScript = new KnownScriptLoader<typeMomentJS>({
|
|
47
48
|
url: "/libs/moment/moment.min.js",
|
|
48
49
|
global: "moment"
|
|
49
50
|
});
|
|
50
51
|
|
|
51
52
|
/** loads into moment.tz */
|
|
52
|
-
export var MomentTimezoneJSKnownScript = new KnownScriptLoader<
|
|
53
|
+
export var MomentTimezoneJSKnownScript = new KnownScriptLoader<typeMonentJSTimeZone>({
|
|
53
54
|
url: "/libs/moment/moment-timezone.min.js",
|
|
54
55
|
global: "moment.tz",
|
|
55
56
|
dependencies: [MomentJSKnownScript]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './listutils/exports-index';
|
|
2
|
+
export * from './common';
|
|
3
|
+
export * from './date';
|
|
4
|
+
export * from './file.folder';
|
|
5
|
+
export * from './item';
|
|
6
|
+
export * from './list';
|
|
7
|
+
export * from './user-search';
|
|
8
|
+
export * from './user';
|
|
9
|
+
export * from './web';
|
|
@@ -388,7 +388,7 @@ export function GetSPRestItemValueAsTextArray(item: IRestItem, field: IFieldInfo
|
|
|
388
388
|
}
|
|
389
389
|
/** prefer to use GetSPRestValueAsText instead */
|
|
390
390
|
export function GetSPFieldValueAsText(value: any, field: IFieldInfoEX): string[] {
|
|
391
|
-
let locales =
|
|
391
|
+
let locales = LocaleKnownScript.loadSync();
|
|
392
392
|
let culture = locales.GetCurrentCulture();
|
|
393
393
|
|
|
394
394
|
let rawValues: (string | number | boolean | Date | { Id: string | number; Title: string; })[] =
|
package/src/types/graph/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./calendar.types";
|
package/src/types/index.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from "./auth";
|
|
2
|
-
export * from "./common.types";
|
|
3
|
-
export * from './flatted.types';
|
|
4
|
-
export * from "./globals.types";
|
|
5
|
-
export * from "./graph";
|
|
6
|
-
export * from "./knownscript.types";
|
|
7
|
-
export * from "./libs";
|
|
8
|
-
export * from "./localstoragecache.types";
|
|
9
|
-
export * from "./regex.types";
|
|
10
|
-
export * from "./rest.types";
|
|
11
|
-
export * from "./sharepoint.types";
|
|
12
|
-
export * from "./sharepoint.utils.types";
|
package/src/types/libs/index.ts
DELETED
package/src/utils/auth/index.ts
DELETED
package/src/utils/index.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { default as _script } from "./script";
|
|
2
|
-
import { default as _sod } from "./sod";
|
|
3
|
-
export * from './base64';
|
|
4
|
-
export * from "./consolelogger";
|
|
5
|
-
export * from './date';
|
|
6
|
-
export * from './emails';
|
|
7
|
-
export * from './knownscript';
|
|
8
|
-
export * from './localstoragecache';
|
|
9
|
-
export * from './rest';
|
|
10
|
-
export * from './sharepoint.rest';
|
|
11
|
-
export * from './sod';
|
|
12
|
-
export * from './auth';
|
|
13
|
-
export const script = _script;
|
|
14
|
-
export const Sod = _sod;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from "./common";
|
|
2
|
-
export * from "./date";
|
|
3
|
-
export * from "./file.folder";
|
|
4
|
-
export * from "./item";
|
|
5
|
-
export * from "./list";
|
|
6
|
-
export * from "./listutils/GetListItemsByCaml";
|
|
7
|
-
export * from "./listutils/GetListItemsById";
|
|
8
|
-
export * from "./listutils/common";
|
|
9
|
-
export * from "./user";
|
|
10
|
-
export * from "./user-search";
|
|
11
|
-
export * from "./web";
|