@kwiz/common 1.0.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/LICENSE +21 -0
- package/dist/_dependencies.d.ts +1 -0
- package/dist/_dependencies.js +8 -0
- package/dist/_dependencies.js.map +1 -0
- package/dist/helpers/Guid.d.ts +119 -0
- package/dist/helpers/Guid.js +183 -0
- package/dist/helpers/Guid.js.map +1 -0
- package/dist/helpers/_dependencies.d.ts +2 -0
- package/dist/helpers/_dependencies.js +21 -0
- package/dist/helpers/_dependencies.js.map +1 -0
- package/dist/helpers/base64.d.ts +8 -0
- package/dist/helpers/base64.js +178 -0
- package/dist/helpers/base64.js.map +1 -0
- package/dist/helpers/browser.d.ts +144 -0
- package/dist/helpers/browser.js +1200 -0
- package/dist/helpers/browser.js.map +1 -0
- package/dist/helpers/browserinfo.d.ts +23 -0
- package/dist/helpers/browserinfo.js +215 -0
- package/dist/helpers/browserinfo.js.map +1 -0
- package/dist/helpers/collections.base.d.ts +128 -0
- package/dist/helpers/collections.base.js +430 -0
- package/dist/helpers/collections.base.js.map +1 -0
- package/dist/helpers/collections.d.ts +18 -0
- package/dist/helpers/collections.js +99 -0
- package/dist/helpers/collections.js.map +1 -0
- package/dist/helpers/color.d.ts +11 -0
- package/dist/helpers/color.js +57 -0
- package/dist/helpers/color.js.map +1 -0
- package/dist/helpers/cookies.d.ts +6 -0
- package/dist/helpers/cookies.js +56 -0
- package/dist/helpers/cookies.js.map +1 -0
- package/dist/helpers/date.d.ts +43 -0
- package/dist/helpers/date.js +158 -0
- package/dist/helpers/date.js.map +1 -0
- package/dist/helpers/debug.d.ts +33 -0
- package/dist/helpers/debug.js +177 -0
- package/dist/helpers/debug.js.map +1 -0
- package/dist/helpers/emails.d.ts +2 -0
- package/dist/helpers/emails.js +10 -0
- package/dist/helpers/emails.js.map +1 -0
- package/dist/helpers/eval.d.ts +1 -0
- package/dist/helpers/eval.js +10 -0
- package/dist/helpers/eval.js.map +1 -0
- package/dist/helpers/file.d.ts +11 -0
- package/dist/helpers/file.js +55 -0
- package/dist/helpers/file.js.map +1 -0
- package/dist/helpers/flatted.d.ts +20 -0
- package/dist/helpers/flatted.js +135 -0
- package/dist/helpers/flatted.js.map +1 -0
- package/dist/helpers/functions.d.ts +4 -0
- package/dist/helpers/functions.js +17 -0
- package/dist/helpers/functions.js.map +1 -0
- package/dist/helpers/graph/calendar.types.d.ts +3 -0
- package/dist/helpers/graph/calendar.types.js +15 -0
- package/dist/helpers/graph/calendar.types.js.map +1 -0
- package/dist/helpers/http.d.ts +25 -0
- package/dist/helpers/http.js +70 -0
- package/dist/helpers/http.js.map +1 -0
- package/dist/helpers/images.d.ts +16 -0
- package/dist/helpers/images.js +21 -0
- package/dist/helpers/images.js.map +1 -0
- package/dist/helpers/index.d.ts +29 -0
- package/dist/helpers/index.js +46 -0
- package/dist/helpers/index.js.map +1 -0
- package/dist/helpers/json.d.ts +3 -0
- package/dist/helpers/json.js +44 -0
- package/dist/helpers/json.js.map +1 -0
- package/dist/helpers/md5.d.ts +5 -0
- package/dist/helpers/md5.js +172 -0
- package/dist/helpers/md5.js.map +1 -0
- package/dist/helpers/objects.d.ts +49 -0
- package/dist/helpers/objects.js +271 -0
- package/dist/helpers/objects.js.map +1 -0
- package/dist/helpers/promises.d.ts +14 -0
- package/dist/helpers/promises.js +112 -0
- package/dist/helpers/promises.js.map +1 -0
- package/dist/helpers/random.d.ts +2 -0
- package/dist/helpers/random.js +32 -0
- package/dist/helpers/random.js.map +1 -0
- package/dist/helpers/scheduler/scheduler.d.ts +39 -0
- package/dist/helpers/scheduler/scheduler.js +109 -0
- package/dist/helpers/scheduler/scheduler.js.map +1 -0
- package/dist/helpers/sharepoint.d.ts +112 -0
- package/dist/helpers/sharepoint.js +629 -0
- package/dist/helpers/sharepoint.js.map +1 -0
- package/dist/helpers/strings.d.ts +56 -0
- package/dist/helpers/strings.js +282 -0
- package/dist/helpers/strings.js.map +1 -0
- package/dist/helpers/typecheckers.d.ts +56 -0
- package/dist/helpers/typecheckers.js +274 -0
- package/dist/helpers/typecheckers.js.map +1 -0
- package/dist/helpers/url.d.ts +46 -0
- package/dist/helpers/url.js +199 -0
- package/dist/helpers/url.js.map +1 -0
- package/dist/helpers/urlhelper.d.ts +16 -0
- package/dist/helpers/urlhelper.js +96 -0
- package/dist/helpers/urlhelper.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -0
- package/dist/types/common.types.d.ts +19 -0
- package/dist/types/common.types.js +4 -0
- package/dist/types/common.types.js.map +1 -0
- package/dist/types/flatted.types.d.ts +49 -0
- package/dist/types/flatted.types.js +3 -0
- package/dist/types/flatted.types.js.map +1 -0
- package/dist/types/globals.types.d.ts +6 -0
- package/dist/types/globals.types.js +3 -0
- package/dist/types/globals.types.js.map +1 -0
- package/dist/types/graph/calendar.types.d.ts +79 -0
- package/dist/types/graph/calendar.types.js +3 -0
- package/dist/types/graph/calendar.types.js.map +1 -0
- package/dist/types/graph/index.d.ts +1 -0
- package/dist/types/graph/index.js +18 -0
- package/dist/types/graph/index.js.map +1 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/index.js +28 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/knownscript.types.d.ts +22 -0
- package/dist/types/knownscript.types.js +3 -0
- package/dist/types/knownscript.types.js.map +1 -0
- package/dist/types/libs/datajs.types.d.ts +29 -0
- package/dist/types/libs/datajs.types.js +3 -0
- package/dist/types/libs/datajs.types.js.map +1 -0
- package/dist/types/libs/ics.types.d.ts +29 -0
- package/dist/types/libs/ics.types.js +3 -0
- package/dist/types/libs/ics.types.js.map +1 -0
- package/dist/types/libs/index.d.ts +3 -0
- package/dist/types/libs/index.js +20 -0
- package/dist/types/libs/index.js.map +1 -0
- package/dist/types/libs/msal.types.d.ts +33 -0
- package/dist/types/libs/msal.types.js +63 -0
- package/dist/types/libs/msal.types.js.map +1 -0
- package/dist/types/locales.d.ts +122 -0
- package/dist/types/locales.js +1 -0
- package/dist/types/locales.js.map +1 -0
- package/dist/types/localstoragecache.types.d.ts +8 -0
- package/dist/types/localstoragecache.types.js +3 -0
- package/dist/types/localstoragecache.types.js.map +1 -0
- package/dist/types/moment.d.ts +6 -0
- package/dist/types/moment.js +1 -0
- package/dist/types/moment.js.map +1 -0
- package/dist/types/regex.types.d.ts +14 -0
- package/dist/types/regex.types.js +3 -0
- package/dist/types/regex.types.js.map +1 -0
- package/dist/types/rest.types.d.ts +81 -0
- package/dist/types/rest.types.js +24 -0
- package/dist/types/rest.types.js.map +1 -0
- package/dist/types/sharepoint.types.d.ts +1432 -0
- package/dist/types/sharepoint.types.js +629 -0
- package/dist/types/sharepoint.types.js.map +1 -0
- package/dist/types/sharepoint.utils.types.d.ts +246 -0
- package/dist/types/sharepoint.utils.types.js +26 -0
- package/dist/types/sharepoint.utils.types.js.map +1 -0
- package/dist/utils/_dependencies.d.ts +3 -0
- package/dist/utils/_dependencies.js +24 -0
- package/dist/utils/_dependencies.js.map +1 -0
- package/dist/utils/base64.d.ts +2 -0
- package/dist/utils/base64.js +41 -0
- package/dist/utils/base64.js.map +1 -0
- package/dist/utils/consolelogger.d.ts +73 -0
- package/dist/utils/consolelogger.js +281 -0
- package/dist/utils/consolelogger.js.map +1 -0
- package/dist/utils/date.d.ts +10 -0
- package/dist/utils/date.js +30 -0
- package/dist/utils/date.js.map +1 -0
- package/dist/utils/emails.d.ts +2 -0
- package/dist/utils/emails.js +24 -0
- package/dist/utils/emails.js.map +1 -0
- package/dist/utils/index.d.ts +13 -0
- package/dist/utils/index.js +31 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/knownscript.d.ts +99 -0
- package/dist/utils/knownscript.js +261 -0
- package/dist/utils/knownscript.js.map +1 -0
- package/dist/utils/localstoragecache.d.ts +19 -0
- package/dist/utils/localstoragecache.js +372 -0
- package/dist/utils/localstoragecache.js.map +1 -0
- package/dist/utils/rest.d.ts +17 -0
- package/dist/utils/rest.js +402 -0
- package/dist/utils/rest.js.map +1 -0
- package/dist/utils/script.d.ts +33 -0
- package/dist/utils/script.js +169 -0
- package/dist/utils/script.js.map +1 -0
- package/dist/utils/sharepoint.rest/common.d.ts +32 -0
- package/dist/utils/sharepoint.rest/common.js +146 -0
- package/dist/utils/sharepoint.rest/common.js.map +1 -0
- package/dist/utils/sharepoint.rest/date.d.ts +2 -0
- package/dist/utils/sharepoint.rest/date.js +57 -0
- package/dist/utils/sharepoint.rest/date.js.map +1 -0
- package/dist/utils/sharepoint.rest/file.folder.d.ts +58 -0
- package/dist/utils/sharepoint.rest/file.folder.js +305 -0
- package/dist/utils/sharepoint.rest/file.folder.js.map +1 -0
- package/dist/utils/sharepoint.rest/index.d.ts +11 -0
- package/dist/utils/sharepoint.rest/index.js +28 -0
- package/dist/utils/sharepoint.rest/index.js.map +1 -0
- package/dist/utils/sharepoint.rest/item.d.ts +81 -0
- package/dist/utils/sharepoint.rest/item.js +444 -0
- package/dist/utils/sharepoint.rest/item.js.map +1 -0
- package/dist/utils/sharepoint.rest/list.d.ts +228 -0
- package/dist/utils/sharepoint.rest/list.js +868 -0
- package/dist/utils/sharepoint.rest/list.js.map +1 -0
- package/dist/utils/sharepoint.rest/listutils/GetListItemsByCaml.d.ts +19 -0
- package/dist/utils/sharepoint.rest/listutils/GetListItemsByCaml.js +629 -0
- package/dist/utils/sharepoint.rest/listutils/GetListItemsByCaml.js.map +1 -0
- package/dist/utils/sharepoint.rest/listutils/GetListItemsById.d.ts +14 -0
- package/dist/utils/sharepoint.rest/listutils/GetListItemsById.js +222 -0
- package/dist/utils/sharepoint.rest/listutils/GetListItemsById.js.map +1 -0
- package/dist/utils/sharepoint.rest/listutils/common.d.ts +3 -0
- package/dist/utils/sharepoint.rest/listutils/common.js +198 -0
- package/dist/utils/sharepoint.rest/listutils/common.js.map +1 -0
- package/dist/utils/sharepoint.rest/user-search.d.ts +76 -0
- package/dist/utils/sharepoint.rest/user-search.js +239 -0
- package/dist/utils/sharepoint.rest/user-search.js.map +1 -0
- package/dist/utils/sharepoint.rest/user.d.ts +71 -0
- package/dist/utils/sharepoint.rest/user.js +404 -0
- package/dist/utils/sharepoint.rest/user.js.map +1 -0
- package/dist/utils/sharepoint.rest/web.d.ts +107 -0
- package/dist/utils/sharepoint.rest/web.js +929 -0
- package/dist/utils/sharepoint.rest/web.js.map +1 -0
- package/dist/utils/sod.d.ts +29 -0
- package/dist/utils/sod.js +177 -0
- package/dist/utils/sod.js.map +1 -0
- package/package.json +60 -0
- package/readme.md +13 -0
- package/src/_dependencies.ts +2 -0
- package/src/helpers/Guid.ts +182 -0
- package/src/helpers/_dependencies.ts +3 -0
- package/src/helpers/base64.ts +174 -0
- package/src/helpers/browser.test.js +9 -0
- package/src/helpers/browser.ts +1299 -0
- package/src/helpers/browserinfo.ts +293 -0
- package/src/helpers/collections.base.test.js +26 -0
- package/src/helpers/collections.base.ts +439 -0
- package/src/helpers/collections.ts +108 -0
- package/src/helpers/color.ts +55 -0
- package/src/helpers/cookies.ts +55 -0
- package/src/helpers/date.test.js +97 -0
- package/src/helpers/date.ts +163 -0
- package/src/helpers/debug.ts +187 -0
- package/src/helpers/emails.ts +7 -0
- package/src/helpers/eval.ts +5 -0
- package/src/helpers/file.test.js +51 -0
- package/src/helpers/file.ts +59 -0
- package/src/helpers/flatted.ts +150 -0
- package/src/helpers/functions.ts +17 -0
- package/src/helpers/graph/calendar.types.ts +11 -0
- package/src/helpers/http.ts +70 -0
- package/src/helpers/images.ts +23 -0
- package/src/helpers/index.ts +29 -0
- package/src/helpers/json.ts +39 -0
- package/src/helpers/md5.ts +190 -0
- package/src/helpers/objects.test.js +27 -0
- package/src/helpers/objects.ts +256 -0
- package/src/helpers/promises.test.js +18 -0
- package/src/helpers/promises.ts +102 -0
- package/src/helpers/random.ts +27 -0
- package/src/helpers/scheduler/scheduler.test.js +104 -0
- package/src/helpers/scheduler/scheduler.ts +132 -0
- package/src/helpers/sharepoint.ts +681 -0
- package/src/helpers/strings.test.js +43 -0
- package/src/helpers/strings.ts +288 -0
- package/src/helpers/typecheckers.test.js +35 -0
- package/src/helpers/typecheckers.ts +263 -0
- package/src/helpers/url.test.js +18 -0
- package/src/helpers/url.ts +202 -0
- package/src/helpers/urlhelper.ts +104 -0
- package/src/index.ts +24 -0
- package/src/types/common.types.ts +16 -0
- package/src/types/flatted.types.ts +60 -0
- package/src/types/globals.types.ts +7 -0
- package/src/types/graph/calendar.types.ts +81 -0
- package/src/types/graph/index.ts +1 -0
- package/src/types/index.ts +12 -0
- package/src/types/knownscript.types.ts +19 -0
- package/src/types/libs/datajs.types.ts +29 -0
- package/src/types/libs/ics.types.ts +31 -0
- package/src/types/libs/index.ts +4 -0
- package/src/types/libs/msal.types.ts +79 -0
- package/src/types/locales.ts +125 -0
- package/src/types/localstoragecache.types.ts +9 -0
- package/src/types/moment.ts +7 -0
- package/src/types/regex.types.ts +17 -0
- package/src/types/rest.types.ts +94 -0
- package/src/types/sharepoint.types.ts +1413 -0
- package/src/types/sharepoint.utils.types.ts +246 -0
- package/src/utils/_dependencies.ts +4 -0
- package/src/utils/base64.ts +27 -0
- package/src/utils/consolelogger.ts +315 -0
- package/src/utils/date.ts +36 -0
- package/src/utils/emails.ts +25 -0
- package/src/utils/index.ts +13 -0
- package/src/utils/knownscript.ts +280 -0
- package/src/utils/localstoragecache.ts +419 -0
- package/src/utils/rest.ts +465 -0
- package/src/utils/script.ts +168 -0
- package/src/utils/sharepoint.rest/common.ts +149 -0
- package/src/utils/sharepoint.rest/date.ts +61 -0
- package/src/utils/sharepoint.rest/file.folder.ts +368 -0
- package/src/utils/sharepoint.rest/index.ts +11 -0
- package/src/utils/sharepoint.rest/item.ts +456 -0
- package/src/utils/sharepoint.rest/list.ts +1144 -0
- package/src/utils/sharepoint.rest/listutils/GetListItemsByCaml.ts +750 -0
- package/src/utils/sharepoint.rest/listutils/GetListItemsById.ts +265 -0
- package/src/utils/sharepoint.rest/listutils/common.ts +202 -0
- package/src/utils/sharepoint.rest/user-search.ts +254 -0
- package/src/utils/sharepoint.rest/user.ts +447 -0
- package/src/utils/sharepoint.rest/web.ts +1031 -0
- package/src/utils/sod.ts +193 -0
- package/tsconfig.json +21 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
type SysNumberFormatType = {
|
|
2
|
+
CurrencyDecimalDigits: number;
|
|
3
|
+
CurrencyDecimalSeparator: string;
|
|
4
|
+
IsReadOnly: boolean;
|
|
5
|
+
CurrencyGroupSizes: number[];
|
|
6
|
+
NumberGroupSizes: number[];
|
|
7
|
+
PercentGroupSizes: number[];
|
|
8
|
+
CurrencyGroupSeparator: string;
|
|
9
|
+
CurrencySymbol: string;
|
|
10
|
+
NaNSymbol: string;
|
|
11
|
+
CurrencyNegativePattern: number;
|
|
12
|
+
NumberNegativePattern: number;
|
|
13
|
+
PercentPositivePattern: number;
|
|
14
|
+
PercentNegativePattern: number;
|
|
15
|
+
NegativeInfinitySymbol: string;
|
|
16
|
+
NegativeSign: string;
|
|
17
|
+
NumberDecimalDigits: number;
|
|
18
|
+
NumberDecimalSeparator: string;
|
|
19
|
+
NumberGroupSeparator: string;
|
|
20
|
+
CurrencyPositivePattern: number;
|
|
21
|
+
PositiveInfinitySymbol: string;
|
|
22
|
+
PositiveSign: string;
|
|
23
|
+
PercentDecimalDigits: number;
|
|
24
|
+
PercentDecimalSeparator: string;
|
|
25
|
+
PercentGroupSeparator: string;
|
|
26
|
+
PercentSymbol: string;
|
|
27
|
+
PerMilleSymbol: string;
|
|
28
|
+
NativeDigits: string[];
|
|
29
|
+
DigitSubstitution: number;
|
|
30
|
+
};
|
|
31
|
+
type SysDateFormatType = {
|
|
32
|
+
AMDesignator: string;
|
|
33
|
+
Calendar: {
|
|
34
|
+
MinSupportedDateTime: string;
|
|
35
|
+
MaxSupportedDateTime: string;
|
|
36
|
+
AlgorithmType: number;
|
|
37
|
+
CalendarType: number;
|
|
38
|
+
Eras: number[];
|
|
39
|
+
TwoDigitYearMax: number;
|
|
40
|
+
IsReadOnly: boolean;
|
|
41
|
+
};
|
|
42
|
+
DateSeparator: string;
|
|
43
|
+
FirstDayOfWeek: number;
|
|
44
|
+
CalendarWeekRule: number;
|
|
45
|
+
FullDateTimePattern: string;
|
|
46
|
+
LongDatePattern: string;
|
|
47
|
+
LongTimePattern: string;
|
|
48
|
+
MonthDayPattern: string;
|
|
49
|
+
PMDesignator: string;
|
|
50
|
+
RFC1123Pattern: string;
|
|
51
|
+
ShortDatePattern: string;
|
|
52
|
+
ShortTimePattern: string;
|
|
53
|
+
SortableDateTimePattern: string;
|
|
54
|
+
TimeSeparator: string;
|
|
55
|
+
UniversalSortableDateTimePattern: string;
|
|
56
|
+
YearMonthPattern: string;
|
|
57
|
+
AbbreviatedDayNames: string[];
|
|
58
|
+
ShortestDayNames: string[];
|
|
59
|
+
DayNames: string[];
|
|
60
|
+
AbbreviatedMonthNames: string[];
|
|
61
|
+
MonthNames: string[];
|
|
62
|
+
IsReadOnly: boolean;
|
|
63
|
+
NativeCalendarName: string;
|
|
64
|
+
AbbreviatedMonthGenitiveNames: string[];
|
|
65
|
+
MonthGenitiveNames: string[];
|
|
66
|
+
eras: any[];
|
|
67
|
+
};
|
|
68
|
+
type CultureInfoType = {
|
|
69
|
+
LCID: number;
|
|
70
|
+
name: string;
|
|
71
|
+
numberFormat: SysNumberFormatType;
|
|
72
|
+
dateTimeFormat: SysDateFormatType;
|
|
73
|
+
ShortDatePattern?: string;
|
|
74
|
+
ShortTimePattern?: string;
|
|
75
|
+
DateSeparator?: string;
|
|
76
|
+
TimeSeparator?: string;
|
|
77
|
+
CurrencySymbol?: string;
|
|
78
|
+
PercentSymbol?: string;
|
|
79
|
+
NumberDecimalSeparator?: string;
|
|
80
|
+
NumberGroupSeparator?: string;
|
|
81
|
+
};
|
|
82
|
+
interface Date {
|
|
83
|
+
/**
|
|
84
|
+
* Formats a date by using the invariant (culture-independent) culture.
|
|
85
|
+
*/
|
|
86
|
+
format(format: string): string;
|
|
87
|
+
}
|
|
88
|
+
interface IKLocales {
|
|
89
|
+
getCultureNameOrLCIDFromContextInfo(s: number): string | number;
|
|
90
|
+
GetCulture(cultureNameOrLCID: string | number): CultureInfoType;
|
|
91
|
+
GetCurrentCulture(): CultureInfoType;
|
|
92
|
+
SetCurrentCulture(culture: CultureInfoType): any;
|
|
93
|
+
ParseDate(strDate: string, culture?: CultureInfoType): Date;
|
|
94
|
+
/** default format: date only */
|
|
95
|
+
DateToString(dateObj: Date, culture: CultureInfoType, format?: {
|
|
96
|
+
includeDate?: boolean;
|
|
97
|
+
includeTime?: boolean;
|
|
98
|
+
}): string;
|
|
99
|
+
ParseNumber(strNumber: string, culture?: CultureInfoType): number;
|
|
100
|
+
/** isPercentAsWholeNumbers means a percent number that is 1 to 100, not 0-1. will not multiply it by 100. */
|
|
101
|
+
NumberToString(num: number,
|
|
102
|
+
/** current web cutlure, default=GetCurrentCulture */
|
|
103
|
+
webCulture?: CultureInfoType, numFormat?: {
|
|
104
|
+
/** default=false */
|
|
105
|
+
includeGroupSeparator?: boolean;
|
|
106
|
+
/** default=false */
|
|
107
|
+
isPercent?: boolean;
|
|
108
|
+
/** isPercentAsWholeNumbers means a percent number that is 1 to 100, not 0-1. will not multiply it by 100, default=false */
|
|
109
|
+
isPercentAsWholeNumbers?: boolean;
|
|
110
|
+
/** default=false */
|
|
111
|
+
isCurrency?: boolean;
|
|
112
|
+
/** default=webCulture.LCID */
|
|
113
|
+
currencyLocaleId?: number;
|
|
114
|
+
/** default=false */
|
|
115
|
+
numberOnly?: boolean;
|
|
116
|
+
}): string;
|
|
117
|
+
IsValidNumber(strNumber: string, culture: CultureInfoType): boolean;
|
|
118
|
+
}
|
|
119
|
+
interface IKWizComGlobals {
|
|
120
|
+
kLocales?: IKLocales;
|
|
121
|
+
}
|
|
122
|
+
declare var kLocales: IKLocales;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=locales.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locales.js","sourceRoot":"","sources":["../../src/types/locales.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localstoragecache.types.js","sourceRoot":"","sources":["../../src/types/localstoragecache.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=moment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moment.js","sourceRoot":"","sources":["../../src/types/moment.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IDictionary } from "./common.types";
|
|
2
|
+
export interface IRegexExpression {
|
|
3
|
+
pattern: string;
|
|
4
|
+
example: string;
|
|
5
|
+
options: string[];
|
|
6
|
+
isDefault: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface IRegexList extends IDictionary<IRegexExpression> {
|
|
9
|
+
}
|
|
10
|
+
declare global {
|
|
11
|
+
interface IModernListSettings {
|
|
12
|
+
RegexList?: IRegexList;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"regex.types.js","sourceRoot":"","sources":["../../src/types/regex.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { ILocalStorageCacheLifetime } from "./localstoragecache.types";
|
|
2
|
+
export type IRestResponseType = "" | "blob" | "arraybuffer" | "text" | "json" | "document";
|
|
3
|
+
export declare enum jsonTypes {
|
|
4
|
+
verbose = "application/json; odata=verbose",
|
|
5
|
+
minimal = "application/json; odata=minimal",
|
|
6
|
+
nometadata = "application/json; odata=nometadata",
|
|
7
|
+
standard = "application/json"
|
|
8
|
+
}
|
|
9
|
+
export declare enum contentTypes {
|
|
10
|
+
xml = "application/xml",
|
|
11
|
+
json = "application/json"
|
|
12
|
+
}
|
|
13
|
+
export declare const AllRestCacheOptionsKeys: Required<IRestCacheOptions>;
|
|
14
|
+
export interface IRestCacheOptions {
|
|
15
|
+
allowCache?: boolean;
|
|
16
|
+
/** if allowCache=true and local storage is supported, this will keep the results in local storage for a while */
|
|
17
|
+
localStorageExpiration?: number | ILocalStorageCacheLifetime | Date;
|
|
18
|
+
/** max age the runtime memeroy cache result is valid for in seconds */
|
|
19
|
+
maxAge?: number;
|
|
20
|
+
/** when a request allows to be stored in cache (persistent/memory) - signals that we want to update the cached value */
|
|
21
|
+
forceCacheUpdate?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface IRestRequestOptions {
|
|
24
|
+
/** default: get if no body sent, otherwise post */
|
|
25
|
+
method?: "GET" | "POST";
|
|
26
|
+
xHttpMethod?: "MERGE" | "DELETE" | "PUT";
|
|
27
|
+
/**default true */
|
|
28
|
+
includeDigestInPost?: boolean;
|
|
29
|
+
/**default false */
|
|
30
|
+
includeDigestInGet?: boolean;
|
|
31
|
+
/**default: Accept: jsonTypes.verbose, and (in post only) content-type: jsonTypes.verbose */
|
|
32
|
+
headers?: {
|
|
33
|
+
[key: string]: string;
|
|
34
|
+
Accept?: string;
|
|
35
|
+
"content-type"?: string;
|
|
36
|
+
};
|
|
37
|
+
/** allow cache on post requests if you provide a unique key to identify and match */
|
|
38
|
+
postCacheKey?: string;
|
|
39
|
+
cors?: boolean;
|
|
40
|
+
responseType?: IRestResponseType;
|
|
41
|
+
/**If set to true, will return the xhr object itself (XMLHttpRequest) (does not support allowCache!) */
|
|
42
|
+
returnXhrObject?: boolean;
|
|
43
|
+
/** provide a SharePoint web URL, if running a SharePoint request. Will be used to get the right form digest if/when needed. */
|
|
44
|
+
spWebUrl?: string;
|
|
45
|
+
jsonMetadata?: jsonTypes;
|
|
46
|
+
}
|
|
47
|
+
export interface IRestOptions extends IRestRequestOptions, IRestCacheOptions {
|
|
48
|
+
}
|
|
49
|
+
export interface IRequestObjects {
|
|
50
|
+
xhr: XMLHttpRequest;
|
|
51
|
+
options: IRestRequestOptions;
|
|
52
|
+
cacheOptions: IRestCacheOptions & {
|
|
53
|
+
cacheKey?: string;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export type IRequestBody = Document | Blob | BufferSource | FormData | URLSearchParams | string | null;
|
|
57
|
+
export interface IJsonSyncResultBase<T> {
|
|
58
|
+
status: number;
|
|
59
|
+
errorData?: any;
|
|
60
|
+
/** preserve original error message from failed cached result */
|
|
61
|
+
errorMessage?: string;
|
|
62
|
+
result?: T;
|
|
63
|
+
success: boolean;
|
|
64
|
+
cachedTime?: number;
|
|
65
|
+
}
|
|
66
|
+
export interface IJsonSyncResultSuccess<T> extends IJsonSyncResultBase<T> {
|
|
67
|
+
result: T;
|
|
68
|
+
success: true;
|
|
69
|
+
}
|
|
70
|
+
export interface IJsonSyncResultError<T> extends IJsonSyncResultBase<T> {
|
|
71
|
+
errorData: any;
|
|
72
|
+
/** preserve original error message from failed cached result */
|
|
73
|
+
errorMessage: string;
|
|
74
|
+
success: false;
|
|
75
|
+
}
|
|
76
|
+
export type IJsonSyncResult<T> = IJsonSyncResultSuccess<T> | IJsonSyncResultError<T>;
|
|
77
|
+
export interface IRestError {
|
|
78
|
+
message: string;
|
|
79
|
+
errorData?: any;
|
|
80
|
+
xhr?: XMLHttpRequest;
|
|
81
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AllRestCacheOptionsKeys = exports.contentTypes = exports.jsonTypes = void 0;
|
|
4
|
+
// eslint-disable-next-line no-shadow
|
|
5
|
+
var jsonTypes;
|
|
6
|
+
(function (jsonTypes) {
|
|
7
|
+
jsonTypes["verbose"] = "application/json; odata=verbose";
|
|
8
|
+
jsonTypes["minimal"] = "application/json; odata=minimal";
|
|
9
|
+
jsonTypes["nometadata"] = "application/json; odata=nometadata";
|
|
10
|
+
jsonTypes["standard"] = "application/json";
|
|
11
|
+
})(jsonTypes || (exports.jsonTypes = jsonTypes = {}));
|
|
12
|
+
// eslint-disable-next-line no-shadow
|
|
13
|
+
var contentTypes;
|
|
14
|
+
(function (contentTypes) {
|
|
15
|
+
contentTypes["xml"] = "application/xml";
|
|
16
|
+
contentTypes["json"] = "application/json";
|
|
17
|
+
})(contentTypes || (exports.contentTypes = contentTypes = {}));
|
|
18
|
+
exports.AllRestCacheOptionsKeys = {
|
|
19
|
+
allowCache: true,
|
|
20
|
+
forceCacheUpdate: true,
|
|
21
|
+
localStorageExpiration: 1,
|
|
22
|
+
maxAge: 1
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=rest.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rest.types.js","sourceRoot":"","sources":["../../src/types/rest.types.ts"],"names":[],"mappings":";;;AAGA,qCAAqC;AACrC,IAAY,SAKX;AALD,WAAY,SAAS;IACjB,wDAA2C,CAAA;IAC3C,wDAA2C,CAAA;IAC3C,8DAAiD,CAAA;IACjD,0CAA6B,CAAA;AACjC,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB;AAED,qCAAqC;AACrC,IAAY,YAGX;AAHD,WAAY,YAAY;IACpB,uCAAuB,CAAA;IACvB,yCAAyB,CAAA;AAC7B,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB;AAEY,QAAA,uBAAuB,GAAgC;IAChE,UAAU,EAAE,IAAI;IAChB,gBAAgB,EAAE,IAAI;IACtB,sBAAsB,EAAE,CAAC;IACzB,MAAM,EAAE,CAAC;CACZ,CAAC"}
|