@colijnit/sharedcomponents 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/README.md +24 -24
- package/bundles/colijnit-sharedcomponents.umd.js +789 -1887
- package/bundles/colijnit-sharedcomponents.umd.js.map +1 -1
- package/colijnit-sharedcomponents.d.ts +40 -29
- package/colijnit-sharedcomponents.metadata.json +1 -1
- package/esm2015/colijnit-sharedcomponents.js +41 -30
- package/esm2015/lib/components/date-planning/date-planning.component.js +6 -4
- package/esm2015/lib/components/docsign/component/signature/signature.component.js +3 -3
- package/esm2015/lib/components/docsign/component/signatures/signatures.component.js +7 -7
- package/esm2015/lib/components/docsign/docsign.component.js +5 -5
- package/esm2015/lib/components/layout-switcher/layout-switcher.component.js +3 -3
- package/esm2015/lib/components/send-method-dialog/components/layout-selection/layout-selection.component.js +57 -0
- package/esm2015/lib/components/send-method-dialog/components/layout-selection/layout-selection.module.js +19 -0
- package/esm2015/lib/components/send-method-dialog/components/printer-selection/printer-selection.component.js +76 -0
- package/esm2015/lib/components/send-method-dialog/components/printer-selection/printer-selection.module.js +21 -0
- package/esm2015/lib/components/send-method-dialog/components/send-method-email/send-method-email.component.js +59 -0
- package/esm2015/lib/components/send-method-dialog/components/send-method-email/send-method-email.module.js +23 -0
- package/esm2015/lib/components/send-method-dialog/components/send-method-printer/send-method-printer.component.js +50 -0
- package/esm2015/lib/components/send-method-dialog/components/send-method-printer/send-method-printer.module.js +26 -0
- package/esm2015/lib/components/send-method-dialog/model/email-address-viewmodel.js +7 -0
- package/esm2015/lib/components/send-method-dialog/send-method-dialog.component.js +162 -251
- package/esm2015/lib/components/send-method-dialog/send-method-dialog.module.js +12 -13
- package/esm2015/lib/components/send-method-dialog/service/send-method.service.js +59 -0
- package/esm2015/lib/components/stock/stock-information-grid/stock-information-grid.component.js +101 -27
- package/esm2015/lib/components/stock/stock-transfer/stock-change-amount.component.js +3 -1
- package/esm2015/lib/components/stock/stock-transfer/stock-transfer.component.js +4 -2
- package/esm2015/lib/components/stock/stock.component.js +8 -1
- package/esm2015/lib/enum/icon.enum.js +6 -1
- package/esm2015/lib/model/icon-svg.js +7 -2
- package/esm2015/lib/model/send-method.js +8 -0
- package/esm2015/lib/model/time-window.bo.js +4 -4
- package/esm2015/lib/service/icon-cache.service.js +1 -1
- package/esm2015/lib/service/shared-connector.service.js +91 -121
- package/esm2015/lib/service/shared.service.js +11 -1
- package/esm2015/lib/service/stock.service.js +19 -36
- package/fesm2015/colijnit-sharedcomponents.js +834 -1849
- package/fesm2015/colijnit-sharedcomponents.js.map +1 -1
- package/lib/components/circular-gauge/style/_layout.scss +0 -2
- package/lib/components/circular-gauge/style/_theme.scss +0 -2
- package/lib/components/circular-gauge/style/material.scss +1 -0
- package/lib/components/date-planning/date-planning.component.d.ts +3 -2
- package/lib/components/date-planning/style/_layout.scss +2 -4
- package/lib/components/date-planning/style/_theme.scss +2 -4
- package/lib/components/docsign/component/signature/style/_layout.scss +2 -4
- package/lib/components/docsign/component/signature/style/_theme.scss +2 -4
- package/lib/components/docsign/component/signature/style/material.scss +1 -3
- package/lib/components/docsign/component/signatures/style/_layout.scss +3 -5
- package/lib/components/docsign/component/signatures/style/_theme.scss +2 -4
- package/lib/components/docsign/component/signatures/style/material.scss +1 -2
- package/lib/components/docsign/style/_layout.scss +3 -5
- package/lib/components/docsign/style/_theme.scss +2 -4
- package/lib/components/docsign/style/material.scss +1 -0
- package/lib/components/layout-switcher/style/_layout.scss +2 -4
- package/lib/components/layout-switcher/style/_theme.scss +2 -4
- package/lib/components/layout-switcher/style/material.scss +1 -0
- package/lib/components/linear-gauge/style/_layout.scss +0 -2
- package/lib/components/linear-gauge/style/_theme.scss +0 -2
- package/lib/components/linear-gauge/style/material.scss +1 -0
- package/lib/components/send-method-dialog/components/layout-selection/layout-selection.component.d.ts +13 -0
- package/lib/components/send-method-dialog/components/layout-selection/layout-selection.module.d.ts +2 -0
- package/lib/components/send-method-dialog/components/layout-selection/style/_layout.scss +34 -0
- package/lib/components/send-method-dialog/components/layout-selection/style/_material-definition.scss +19 -0
- package/lib/components/send-method-dialog/components/layout-selection/style/_theme.scss +17 -0
- package/lib/components/send-method-dialog/components/layout-selection/style/material.scss +4 -0
- package/lib/components/send-method-dialog/components/printer-selection/printer-selection.component.d.ts +18 -0
- package/lib/components/send-method-dialog/components/printer-selection/printer-selection.module.d.ts +2 -0
- package/lib/components/send-method-dialog/components/printer-selection/style/_layout.scss +59 -0
- package/lib/components/send-method-dialog/components/printer-selection/style/_material-definition.scss +39 -0
- package/lib/components/send-method-dialog/components/printer-selection/style/_theme.scss +23 -0
- package/lib/components/send-method-dialog/components/printer-selection/style/material.scss +4 -0
- package/lib/components/send-method-dialog/components/send-method-email/send-method-email.component.d.ts +14 -0
- package/lib/components/send-method-dialog/components/send-method-email/send-method-email.module.d.ts +2 -0
- package/lib/components/send-method-dialog/components/send-method-email/style/_layout.scss +21 -0
- package/lib/components/send-method-dialog/components/send-method-email/style/_material-definition.scss +8 -0
- package/lib/components/send-method-dialog/components/send-method-email/style/_theme.scss +5 -0
- package/lib/components/send-method-dialog/components/send-method-email/style/material.scss +4 -0
- package/lib/components/send-method-dialog/components/send-method-printer/send-method-printer.component.d.ts +10 -0
- package/lib/components/send-method-dialog/components/send-method-printer/send-method-printer.module.d.ts +2 -0
- package/lib/components/send-method-dialog/components/send-method-printer/style/_layout.scss +17 -0
- package/lib/components/send-method-dialog/components/send-method-printer/style/_material-definition.scss +5 -0
- package/lib/components/send-method-dialog/components/send-method-printer/style/_theme.scss +5 -0
- package/lib/components/send-method-dialog/components/send-method-printer/style/material.scss +4 -0
- package/lib/components/send-method-dialog/model/email-address-viewmodel.d.ts +5 -0
- package/lib/components/send-method-dialog/send-method-dialog.component.d.ts +53 -61
- package/lib/components/send-method-dialog/service/send-method.service.d.ts +23 -0
- package/lib/components/send-method-dialog/style/_layout.scss +44 -184
- package/lib/components/send-method-dialog/style/_material-definition.scss +30 -1
- package/lib/components/send-method-dialog/style/_theme.scss +31 -5
- package/lib/components/send-method-dialog/style/material.scss +5 -0
- package/lib/components/statusbar/style/_layout.scss +0 -2
- package/lib/components/statusbar/style/_theme.scss +0 -2
- package/lib/components/statusbar/style/material.scss +1 -0
- package/lib/components/stock/stock-information-grid/stock-information-grid.component.d.ts +12 -1
- package/lib/components/stock/stock.component.d.ts +2 -0
- package/lib/components/stock/style/_layout.scss +0 -2
- package/lib/components/stock/style/_theme.scss +0 -3
- package/lib/components/stock/style/material.scss +1 -0
- package/lib/enum/icon.enum.d.ts +5 -0
- package/lib/model/send-method.d.ts +7 -0
- package/lib/model/time-window.bo.d.ts +1 -1
- package/lib/service/icon-cache.service.d.ts +1 -1
- package/lib/service/shared-connector.service.d.ts +21 -29
- package/lib/service/shared.service.d.ts +4 -0
- package/lib/service/stock.service.d.ts +1 -12
- package/lib/style/_variables.scss +5 -1
- package/package.json +6 -6
- package/esm2015/lib/components/send-method-dialog/enums/send-option.js +0 -8
- package/esm2015/lib/factory/business-object-factory.js +0 -120
- package/esm2015/lib/factory/decorators/boolean.decorator.js +0 -102
- package/esm2015/lib/factory/decorators/complex-array.decorator.js +0 -55
- package/esm2015/lib/factory/decorators/complex-field.decorator.js +0 -57
- package/esm2015/lib/factory/decorators/date-field.decorator.js +0 -36
- package/esm2015/lib/factory/decorators/string-number.decorator.js +0 -43
- package/esm2015/lib/model/business-object.js +0 -81
- package/esm2015/lib/utils/array-utils.js +0 -202
- package/esm2015/lib/utils/check-precision-and-scale-result.js +0 -2
- package/esm2015/lib/utils/check-within-stepped-bounds-result.js +0 -2
- package/esm2015/lib/utils/is-nill.function.js +0 -5
- package/esm2015/lib/utils/number-utils.js +0 -390
- package/esm2015/lib/utils/object-utils.js +0 -278
- package/lib/components/send-method-dialog/enums/send-option.d.ts +0 -6
- package/lib/factory/business-object-factory.d.ts +0 -23
- package/lib/factory/decorators/boolean.decorator.d.ts +0 -43
- package/lib/factory/decorators/complex-array.decorator.d.ts +0 -25
- package/lib/factory/decorators/complex-field.decorator.d.ts +0 -25
- package/lib/factory/decorators/date-field.decorator.d.ts +0 -17
- package/lib/factory/decorators/string-number.decorator.d.ts +0 -22
- package/lib/model/business-object.d.ts +0 -7
- package/lib/utils/array-utils.d.ts +0 -63
- package/lib/utils/check-precision-and-scale-result.d.ts +0 -4
- package/lib/utils/check-within-stepped-bounds-result.d.ts +0 -8
- package/lib/utils/is-nill.function.d.ts +0 -1
- package/lib/utils/number-utils.d.ts +0 -125
- package/lib/utils/object-utils.d.ts +0 -40
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { CheckWithinSteppedBoundsResult } from "./check-within-stepped-bounds-result";
|
|
2
|
-
import { CheckPrecisionAndScaleResult } from "./check-precision-and-scale-result";
|
|
3
|
-
export declare class NumberUtils {
|
|
4
|
-
static ParseIntNumberInput(arg: any): number;
|
|
5
|
-
static ParseInt(arg: any): number;
|
|
6
|
-
static ParseFloatNumberInput(arg: any, decimalPrecision?: number): number;
|
|
7
|
-
static ParseFloatNumberInputKeepPrecision(arg: any): number;
|
|
8
|
-
/**
|
|
9
|
-
* Returns given arg as a float number with given decimal precision, if possible. Returns NaN if parse conversion failed.
|
|
10
|
-
*
|
|
11
|
-
* @param {any} arg The argument to parse to a float
|
|
12
|
-
* @param {number} decimalPrecision The number of decimals, or the precision, the parsed return float should have
|
|
13
|
-
* @returns {number} NaN if not possible, else the parsed float value
|
|
14
|
-
*/
|
|
15
|
-
static ParseFloat(arg: any, decimalPrecision?: number): number;
|
|
16
|
-
/**
|
|
17
|
-
* Returns given arg as a float number with given decimal precision, if possible. Returns NaN if parse conversion failed.
|
|
18
|
-
*
|
|
19
|
-
* @param arg The argument to parse to a float
|
|
20
|
-
* @returns {number} The argument as a float with its original decimal precision intact
|
|
21
|
-
*/
|
|
22
|
-
static ParseFloatKeepPrecision(arg: any): number;
|
|
23
|
-
/**
|
|
24
|
-
* Returns the given argument as a number. Returns given defaultValue if conversion of argument was impossible.
|
|
25
|
-
* @param arg
|
|
26
|
-
* @param {number} [defaultValue = 0]
|
|
27
|
-
* @returns {number}
|
|
28
|
-
*/
|
|
29
|
-
static ParseNumberOrDefault(arg: any, defaultValue?: number): number;
|
|
30
|
-
static IsInteger(arg: any): boolean;
|
|
31
|
-
static GetDecimalPlaces(arg: any, maxAnswer?: number): number;
|
|
32
|
-
static ParseNumberInputOrDefault(numberInput: any, defaultValue?: number): number;
|
|
33
|
-
static IsNumber(arg: any): boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Returns whether given arg is indeed not a number (it's NaN or it has another type than 'number')
|
|
36
|
-
* Our exact copy of AS Flex'es isNaN(arg) function. Always use this method for copying Flex isNaN(..) occurences into TypeScript.
|
|
37
|
-
* @param arg
|
|
38
|
-
* @returns {boolean}
|
|
39
|
-
* @constructor
|
|
40
|
-
*/
|
|
41
|
-
static IsNaN(arg: any): boolean;
|
|
42
|
-
static NaN(number: any, substitute?: number): number;
|
|
43
|
-
static IsParsableNumber(arg: any): boolean;
|
|
44
|
-
static IsParsableNumberInput(numberInput: any): boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Returns whether given arg is parseable as a number, and whether the lengts of its number parse result is equal to its original length.
|
|
47
|
-
* I.e. this function returns FALSE with given number-parsable strings, but that have non-numeric appendices, eg '2233ff'. That arg
|
|
48
|
-
* IS number-parseable, but not a strict 'string number', the latter being what this method actually checks for.
|
|
49
|
-
*/
|
|
50
|
-
static IsStringNumber(arg: string): boolean;
|
|
51
|
-
static IsListOfNumbers(arg: string, separator?: string): boolean;
|
|
52
|
-
static ParseStringNumber(arg: string): number;
|
|
53
|
-
static ParseStringNumberDefault(arg: string | any, defaultValue?: number): number;
|
|
54
|
-
/**
|
|
55
|
-
* Returns a random integer in range [lowerBound .. upperBound], an inclusive range. Returns NaN if not possible.
|
|
56
|
-
* Given bounds are truncated first, before serving as the true lower- and upper bounds for the random int.
|
|
57
|
-
*/
|
|
58
|
-
static RandomInt(lowerBoundInt: number, upperBoundInt: number): number;
|
|
59
|
-
static AddThousandsCommasTo(value: any): string;
|
|
60
|
-
/**
|
|
61
|
-
* Function used to check wether a given number is composed of another number, power-of-two wise.
|
|
62
|
-
* Example usage: NumberUtils.NumIsComposedOf(articleListObject.publication, ArticlePublication.Selector).
|
|
63
|
-
* This would return whether or not that articleListObject was publicated for selector or not, where articleListObject.publication
|
|
64
|
-
* was possibly a 'COMPOSITE that was made out of (including)' ArticlePublication.Selector.
|
|
65
|
-
*/
|
|
66
|
-
static NumIsComposedOfOtherPowTwoNum(bigNrToCheck: number, powTwoNumItShouldBeComposedOf: number): boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Returns given nr, or the given default number (default 0) if the nr number was undefined or otherwise not a number.
|
|
69
|
-
* Same as CoMath.NaN from AS code (used as its substitute in transaction logic)
|
|
70
|
-
* @param nr
|
|
71
|
-
* @param defaultNr
|
|
72
|
-
* @returns {number}
|
|
73
|
-
*/
|
|
74
|
-
static NrOrDefault(nr: number, defaultNr?: number): number;
|
|
75
|
-
/**
|
|
76
|
-
* Returns whether given nrToCheck is within the given precision and scale limits. Precision and scale, here, are Oracle DB terms.
|
|
77
|
-
* This function can thus be used to check whether the given number is safe to send to the 'database' beforehand, if we know the
|
|
78
|
-
* precision and scale of the number in the db declaration.
|
|
79
|
-
*
|
|
80
|
-
* I.e. A number declared in the Oracle DB as number(5, 2) has a precision of 5 and a scale of 2.
|
|
81
|
-
*
|
|
82
|
-
* @param {number} nrToCheck
|
|
83
|
-
* @param {number} precision The number of significant digits, including possibly negative scale. E.g. 3 in '123' and 5 in '51.123'
|
|
84
|
-
* @param {number} [scale = 0] The number of significant digits AFTER the decimal point. E.g. 1 in 5432.1 and 3 in 54000.003
|
|
85
|
-
* @returns {CheckPrecisionAndScaleResult} Whether given nrToCheck is ok for given precision and scale, and if not, the
|
|
86
|
-
* nearest number that IS ok for those constraints.
|
|
87
|
-
*/
|
|
88
|
-
static CheckPrecisionAndScale(nrToCheck: number, precision: number, scale?: number): CheckPrecisionAndScaleResult;
|
|
89
|
-
/**
|
|
90
|
-
* Returns whether given x is OK within the given min, max and step boundaries, where it should hold that nrToCheck = min + N * step,
|
|
91
|
-
* with N integer or 0.
|
|
92
|
-
* @param {number} nrToCheck Number to check whether it's within the given bounds
|
|
93
|
-
* @param min Inclusive
|
|
94
|
-
* @param max Inclusive
|
|
95
|
-
* @param stepSize
|
|
96
|
-
* @returns {CheckWithinSteppedBounds} Returns remainder of undefined when nrToCheck was OUTSIDE [min, max], else full result object.
|
|
97
|
-
*/
|
|
98
|
-
static CheckWithinSteppedBounds(nrToCheck: number, min: number, max: number, stepSize?: number): CheckWithinSteppedBoundsResult;
|
|
99
|
-
/**
|
|
100
|
-
* Finds the number closest to the originalNumber, that adheres to the given bounds. That is, for which it holds that
|
|
101
|
-
* nr = min + N * step with N integer or 0.
|
|
102
|
-
* @param {number} originalNr Find closest answer to this number
|
|
103
|
-
* @param min Inclusive
|
|
104
|
-
* @param max Inclusive
|
|
105
|
-
* @param stepSize
|
|
106
|
-
* @returns {boolean} The closest OK number for bounds.
|
|
107
|
-
*/
|
|
108
|
-
static GetNearestNumberWithinSteppedBounds(originalNr: number, min: number, max: number, stepSize?: number): number;
|
|
109
|
-
/**
|
|
110
|
-
* Returns the true maximum allowed value for the given "stepped bounds": min, stepSize and max, for which it holds that each allowed
|
|
111
|
-
* value Y = min + stepSize * N, for any INTEGER or 0 N where it also holds, of course, that Y <= max.
|
|
112
|
-
* @param min
|
|
113
|
-
* @param max
|
|
114
|
-
* @param stepSize
|
|
115
|
-
*/
|
|
116
|
-
static GetTrueSteppedBoundsMax(min: number, max: number, stepSize?: number): number;
|
|
117
|
-
static GetNearestNumberWithinBounds(originalNr: number, min: number, max: number): number;
|
|
118
|
-
static ToString(nr: number): string;
|
|
119
|
-
static DecimalsToStepIncrement(numberOfDecimals: number): number;
|
|
120
|
-
static Round(value: number, decimals: number): number;
|
|
121
|
-
static PrecisionScaleToMaxValue(precision: number, scale: number): number;
|
|
122
|
-
static DifferenceBetweenNumbers(numberA: number, numberB: number): number;
|
|
123
|
-
private static _GetLargestDecimalPrecisionOf;
|
|
124
|
-
private static _NumberInputToNumberStr;
|
|
125
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export declare class ObjectUtils {
|
|
2
|
-
/**
|
|
3
|
-
* Returns whether all given values exist: for all values it holds that they are not null nor undefined. Short-circuit check.
|
|
4
|
-
* @param {any} values Rest parameters with all objects to check existence for.
|
|
5
|
-
* @returns {boolean} True if ALL given values are not null nor undefined, otherwise false (if at least one value was null or undefined)
|
|
6
|
-
*/
|
|
7
|
-
static AllExist(...values: any[]): boolean;
|
|
8
|
-
/**
|
|
9
|
-
* Copies all properties from object 'from' to object 'to'. Overwrites properties on object 'to' if property already exists.
|
|
10
|
-
* Does not copy functions, only properties.
|
|
11
|
-
* @param {Object} from The source object from which to copy all properties of to the 'to' object.
|
|
12
|
-
* @param {Object} to The object to which the properties of the 'from' object will be copied.
|
|
13
|
-
* @param {boolean} [allowUndefined = true] wether the 'to' object may be assigned null or undefined values to any of its properties.
|
|
14
|
-
*/
|
|
15
|
-
static CopyPropertiesFrom<T>(from: Object, to: T, allowUndefined?: boolean): T;
|
|
16
|
-
static DeepEquals(actual: any, expected: any): boolean;
|
|
17
|
-
static ForOwnProperty(plainObject: any, callback: (propVal: any, key: string) => any): void;
|
|
18
|
-
static GetClassName(objectOrClass: any): string;
|
|
19
|
-
static GetShallowClone(originalObject: any, objectClass?: any): any;
|
|
20
|
-
static GetDeepClone(originalObject: any, circular?: boolean): any;
|
|
21
|
-
static IsEmpty(obj: any): boolean;
|
|
22
|
-
static IsPlainObject(object: any): boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Returns an instance of given class with data of given dataObject. Only works if that class has a default constructor without args.
|
|
25
|
-
* Does not actually create a new object if it alread is an instance of that class.
|
|
26
|
-
* @param {any} clazz A class that has a default constructor
|
|
27
|
-
* @param {any} [dataObject] The object with data to copy to the new instance of the class
|
|
28
|
-
* @returns {any} An object that is an instance of given class, with given data applied to it.
|
|
29
|
-
*/
|
|
30
|
-
static MakeInstanceOf(clazz: any, dataObject?: any): any;
|
|
31
|
-
static PickRandomPropertyValue(object: any): any;
|
|
32
|
-
static ValueOrDefault(value: any, defaultReturnVal?: any): any;
|
|
33
|
-
private static _isArguments;
|
|
34
|
-
private static _isArgumentsWhenArgsClassNotSupported;
|
|
35
|
-
private static _isArgumentsWhenArgsClassSupported;
|
|
36
|
-
private static _isBuffer;
|
|
37
|
-
private static _isUndefinedOrNull;
|
|
38
|
-
private static _objEquiv;
|
|
39
|
-
private static _supportsArgumentsClass;
|
|
40
|
-
}
|