@zeedhi/common 1.120.1 → 1.120.2
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 +24 -0
- package/dist/zd-common.esm.js +0 -30
- package/dist/zd-common.umd.js +0 -30
- package/package.json +2 -2
- package/types/components/zd-number/number.d.ts +1 -7
- package/types/utils/unique-by.d.ts +0 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Zeedhi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
This repository includes one file originally copied from https://github.com/vuetifyjs/vuetify/
|
|
24
|
+
under /blob/v1.5.16/packages/vuetify/src/util/, mask.ts.
|
package/dist/zd-common.esm.js
CHANGED
|
@@ -2886,7 +2886,6 @@ class Number$1 extends TextInput {
|
|
|
2886
2886
|
this.mask = this.getInitValue('mask', newMask, this.defaultMask);
|
|
2887
2887
|
this.createAccessors();
|
|
2888
2888
|
this.validateMask();
|
|
2889
|
-
this.initializeMaskProxy();
|
|
2890
2889
|
}
|
|
2891
2890
|
/**
|
|
2892
2891
|
* Merges two masks
|
|
@@ -2948,35 +2947,6 @@ class Number$1 extends TextInput {
|
|
|
2948
2947
|
this.localValue = parsed;
|
|
2949
2948
|
}
|
|
2950
2949
|
}
|
|
2951
|
-
/**
|
|
2952
|
-
* initializes a mask proxy to call update when the mask is changed
|
|
2953
|
-
*/
|
|
2954
|
-
initializeMaskProxy() {
|
|
2955
|
-
this.internalMask = new Proxy(Object.assign({}, this.mask), {
|
|
2956
|
-
set: (target, prop, newValue) => {
|
|
2957
|
-
target[prop] = newValue;
|
|
2958
|
-
setTimeout(() => {
|
|
2959
|
-
var _a;
|
|
2960
|
-
(_a = this.autoNumericObj) === null || _a === void 0 ? void 0 : _a.update(this.mask);
|
|
2961
|
-
});
|
|
2962
|
-
return true;
|
|
2963
|
-
},
|
|
2964
|
-
});
|
|
2965
|
-
}
|
|
2966
|
-
get mask() {
|
|
2967
|
-
return this.internalMask;
|
|
2968
|
-
}
|
|
2969
|
-
set mask(value) {
|
|
2970
|
-
this.internalMask = value;
|
|
2971
|
-
if (typeof value !== 'object')
|
|
2972
|
-
return;
|
|
2973
|
-
// when the mask is replaced, should reinitialize the mask Proxy
|
|
2974
|
-
setTimeout(() => {
|
|
2975
|
-
var _a;
|
|
2976
|
-
this.initializeMaskProxy();
|
|
2977
|
-
(_a = this.autoNumericObj) === null || _a === void 0 ? void 0 : _a.update(this.mask);
|
|
2978
|
-
});
|
|
2979
|
-
}
|
|
2980
2950
|
/**
|
|
2981
2951
|
* Retrieves a formatted value with mask
|
|
2982
2952
|
* @param value Any value
|
package/dist/zd-common.umd.js
CHANGED
|
@@ -2893,7 +2893,6 @@
|
|
|
2893
2893
|
this.mask = this.getInitValue('mask', newMask, this.defaultMask);
|
|
2894
2894
|
this.createAccessors();
|
|
2895
2895
|
this.validateMask();
|
|
2896
|
-
this.initializeMaskProxy();
|
|
2897
2896
|
}
|
|
2898
2897
|
/**
|
|
2899
2898
|
* Merges two masks
|
|
@@ -2955,35 +2954,6 @@
|
|
|
2955
2954
|
this.localValue = parsed;
|
|
2956
2955
|
}
|
|
2957
2956
|
}
|
|
2958
|
-
/**
|
|
2959
|
-
* initializes a mask proxy to call update when the mask is changed
|
|
2960
|
-
*/
|
|
2961
|
-
initializeMaskProxy() {
|
|
2962
|
-
this.internalMask = new Proxy(Object.assign({}, this.mask), {
|
|
2963
|
-
set: (target, prop, newValue) => {
|
|
2964
|
-
target[prop] = newValue;
|
|
2965
|
-
setTimeout(() => {
|
|
2966
|
-
var _a;
|
|
2967
|
-
(_a = this.autoNumericObj) === null || _a === void 0 ? void 0 : _a.update(this.mask);
|
|
2968
|
-
});
|
|
2969
|
-
return true;
|
|
2970
|
-
},
|
|
2971
|
-
});
|
|
2972
|
-
}
|
|
2973
|
-
get mask() {
|
|
2974
|
-
return this.internalMask;
|
|
2975
|
-
}
|
|
2976
|
-
set mask(value) {
|
|
2977
|
-
this.internalMask = value;
|
|
2978
|
-
if (typeof value !== 'object')
|
|
2979
|
-
return;
|
|
2980
|
-
// when the mask is replaced, should reinitialize the mask Proxy
|
|
2981
|
-
setTimeout(() => {
|
|
2982
|
-
var _a;
|
|
2983
|
-
this.initializeMaskProxy();
|
|
2984
|
-
(_a = this.autoNumericObj) === null || _a === void 0 ? void 0 : _a.update(this.mask);
|
|
2985
|
-
});
|
|
2986
|
-
}
|
|
2987
2957
|
/**
|
|
2988
2958
|
* Retrieves a formatted value with mask
|
|
2989
2959
|
* @param value Any value
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeedhi/common",
|
|
3
|
-
"version": "1.120.
|
|
3
|
+
"version": "1.120.2",
|
|
4
4
|
"description": "Zeedhi Common",
|
|
5
5
|
"author": "Zeedhi <zeedhi@teknisa.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"lodash.times": "4.3.*",
|
|
44
44
|
"mockdate": "3.0.*"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "c7851d0839250720984892c22f1adde9219fb81e"
|
|
47
47
|
}
|
|
@@ -11,6 +11,7 @@ export declare type AutoNumericObj = {
|
|
|
11
11
|
* Base class for Number component
|
|
12
12
|
*/
|
|
13
13
|
export declare class Number extends TextInput implements INumber {
|
|
14
|
+
mask: any;
|
|
14
15
|
protected defaultMask: any;
|
|
15
16
|
align: string;
|
|
16
17
|
/**
|
|
@@ -22,7 +23,6 @@ export declare class Number extends TextInput implements INumber {
|
|
|
22
23
|
protected formatterFn: Function;
|
|
23
24
|
protected parserFn: Function;
|
|
24
25
|
private maskValid;
|
|
25
|
-
private internalMask;
|
|
26
26
|
/**
|
|
27
27
|
* Creates a new number input
|
|
28
28
|
*/
|
|
@@ -39,12 +39,6 @@ export declare class Number extends TextInput implements INumber {
|
|
|
39
39
|
*/
|
|
40
40
|
get displayValue(): any;
|
|
41
41
|
set displayValue(value: any);
|
|
42
|
-
/**
|
|
43
|
-
* initializes a mask proxy to call update when the mask is changed
|
|
44
|
-
*/
|
|
45
|
-
private initializeMaskProxy;
|
|
46
|
-
get mask(): any;
|
|
47
|
-
set mask(value: any);
|
|
48
42
|
/**
|
|
49
43
|
* Retrieves a formatted value with mask
|
|
50
44
|
* @param value Any value
|