@anglr/common 20.0.0 → 21.0.0-beta.20240729124704
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/changelog.md +14 -0
- package/es2022/src/decorators/index.js +1 -0
- package/es2022/src/decorators/index.js.map +1 -1
- package/es2022/src/decorators/withScrollableCssClass/withScrollableCssClass.decoator.js +18 -0
- package/es2022/src/decorators/withScrollableCssClass/withScrollableCssClass.decoator.js.map +1 -0
- package/es2022/src/types/host/index.js +4 -0
- package/es2022/src/types/host/index.js.map +1 -1
- package/package.json +11 -24
- package/readme.md +0 -1
- package/src/decorators/index.d.ts +1 -0
- package/src/decorators/index.d.ts.map +1 -1
- package/src/decorators/withScrollableCssClass/withScrollableCssClass.decoator.d.ts +5 -0
- package/src/decorators/withScrollableCssClass/withScrollableCssClass.decoator.d.ts.map +1 -0
- package/src/types/host/index.d.ts +6 -0
- package/src/types/host/index.d.ts.map +1 -1
- package/version.bak +1 -1
- package/es2022/moment/src/index.js +0 -3
- package/es2022/moment/src/index.js.map +0 -1
- package/es2022/moment/src/misc/utils.js +0 -27
- package/es2022/moment/src/misc/utils.js.map +0 -1
- package/es2022/moment/src/modules/moment.module.js +0 -28
- package/es2022/moment/src/modules/moment.module.js.map +0 -1
- package/es2022/moment/src/pipes/momentConvert/momentConvert.pipe.js +0 -32
- package/es2022/moment/src/pipes/momentConvert/momentConvert.pipe.js.map +0 -1
- package/es2022/moment/src/pipes/momentFormat/momentFormat.pipe.js +0 -36
- package/es2022/moment/src/pipes/momentFormat/momentFormat.pipe.js.map +0 -1
- package/moment/package.json +0 -8
- package/moment/src/index.d.ts +0 -3
- package/moment/src/index.d.ts.map +0 -1
- package/moment/src/misc/utils.d.ts +0 -8
- package/moment/src/misc/utils.d.ts.map +0 -1
- package/moment/src/modules/moment.module.d.ts +0 -12
- package/moment/src/modules/moment.module.d.ts.map +0 -1
- package/moment/src/pipes/momentConvert/momentConvert.pipe.d.ts +0 -16
- package/moment/src/pipes/momentConvert/momentConvert.pipe.d.ts.map +0 -1
- package/moment/src/pipes/momentFormat/momentFormat.pipe.d.ts +0 -17
- package/moment/src/pipes/momentFormat/momentFormat.pipe.d.ts.map +0 -1
package/changelog.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Version 21.0.0 (2024-07-29)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- new `ScrollableContentHostFeature` host constant, that adds css class 'scrollable' to host element
|
|
8
|
+
- new `WithScrollableCssClass` decorator, that applies 'scrollable' css class to components host
|
|
9
|
+
|
|
10
|
+
### BREAKING CHANGES
|
|
11
|
+
|
|
12
|
+
- minimal supported version of `@jscrpt/common` is `6.2.0`
|
|
13
|
+
- removed *subpackage* `@anglr/common/moment`
|
|
14
|
+
- moment is no longer prefered, use date-fns for new projects
|
|
15
|
+
- removed dependency on `moment`
|
|
16
|
+
|
|
3
17
|
## Version 20.0.0 (2024-05-30)
|
|
4
18
|
|
|
5
19
|
### Bug Fixes
|
|
@@ -5,4 +5,5 @@ export * from './componentDisplayFlex/componentDisplayFlex.decorator';
|
|
|
5
5
|
export * from './componentHostStyle/componentHostStyle.decorator';
|
|
6
6
|
export * from './scrollableContent/scrollableContent.decorator';
|
|
7
7
|
export * from './typeProvider/typeProvider.decorator';
|
|
8
|
+
export * from './withScrollableCssClass/withScrollableCssClass.decoator';
|
|
8
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,yDAAyD,CAAC;AACxE,cAAc,uDAAuD,CAAC;AACtE,cAAc,mDAAmD,CAAC;AAClE,cAAc,iDAAiD,CAAC;AAChE,cAAc,uCAAuC,CAAC","sourcesContent":["export * from './asSignal/asSignal.decorator';\nexport * from './componentDisplay/componentDisplay.decorator';\nexport * from './componentDisplayBlock/componentDisplayBlock.decorator';\nexport * from './componentDisplayFlex/componentDisplayFlex.decorator';\nexport * from './componentHostStyle/componentHostStyle.decorator';\nexport * from './scrollableContent/scrollableContent.decorator';\nexport * from './typeProvider/typeProvider.decorator';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,yDAAyD,CAAC;AACxE,cAAc,uDAAuD,CAAC;AACtE,cAAc,mDAAmD,CAAC;AAClE,cAAc,iDAAiD,CAAC;AAChE,cAAc,uCAAuC,CAAC;AACtD,cAAc,0DAA0D,CAAC","sourcesContent":["export * from './asSignal/asSignal.decorator';\nexport * from './componentDisplay/componentDisplay.decorator';\nexport * from './componentDisplayBlock/componentDisplayBlock.decorator';\nexport * from './componentDisplayFlex/componentDisplayFlex.decorator';\nexport * from './componentHostStyle/componentHostStyle.decorator';\nexport * from './scrollableContent/scrollableContent.decorator';\nexport * from './typeProvider/typeProvider.decorator';\nexport * from './withScrollableCssClass/withScrollableCssClass.decoator';\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ɵɵclassProp } from '@angular/core';
|
|
2
|
+
/**
|
|
3
|
+
* Applies 'scrollable' css class to components host
|
|
4
|
+
*/
|
|
5
|
+
export function WithScrollableCssClass() {
|
|
6
|
+
return function (target) {
|
|
7
|
+
const original = target.ɵcmp.hostBindings;
|
|
8
|
+
target.ɵcmp.hostVars = (target.ɵcmp.hostVars ?? 0) + 2;
|
|
9
|
+
target.ɵcmp.hostBindings = function NotFoundComponent_HostBindings(rf, _ctx) {
|
|
10
|
+
original?.(rf, _ctx);
|
|
11
|
+
if (rf & 2) {
|
|
12
|
+
ɵɵclassProp('scrollable', true);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
return target;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=withScrollableCssClass.decoator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withScrollableCssClass.decoator.js","sourceRoot":"","sources":["../../../../src/decorators/withScrollableCssClass/withScrollableCssClass.decoator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAgC,MAAM,eAAe,CAAC;AAGzE;;GAEG;AACH,MAAM,UAAU,sBAAsB;IAElC,OAAO,UAAsC,MAAiB;QAE1D,MAAM,QAAQ,GAAK,MAA6C,CAAC,IAA+B,CAAC,YAAY,CAAC;QAE5G,MAA6C,CAAC,IAAyC,CAAC,QAAQ,GAAG,CAAG,MAA6C,CAAC,IAA+B,CAAC,QAAQ,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACvM,MAA6C,CAAC,IAAyC,CAAC,YAAY,GAAG,SAAS,8BAA8B,CAAC,EAAU,EAAE,IAAa;YAEtK,QAAQ,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;YAErB,IAAI,EAAE,GAAG,CAAC,EACV,CAAC;gBACG,WAAW,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;YACpC,CAAC;QACL,CAAC,CAAC;QAEF,OAAO,MAAM,CAAC;IAClB,CAAC,CAAC;AACN,CAAC","sourcesContent":["import {ɵɵclassProp, ɵComponentType, ɵComponentDef} from '@angular/core';\nimport {Writable} from '@jscrpt/common';\n\n/**\n * Applies 'scrollable' css class to components host\n */\nexport function WithScrollableCssClass(): ClassDecorator\n{\n return function<TFunction extends Function> (target: TFunction): TFunction\n {\n const original = ((target as unknown as ɵComponentType<unknown>).ɵcmp as ɵComponentDef<unknown>).hostBindings;\n\n ((target as unknown as ɵComponentType<unknown>).ɵcmp as Writable<ɵComponentDef<unknown>>).hostVars = (((target as unknown as ɵComponentType<unknown>).ɵcmp as ɵComponentDef<unknown>).hostVars ?? 0) + 2;\n ((target as unknown as ɵComponentType<unknown>).ɵcmp as Writable<ɵComponentDef<unknown>>).hostBindings = function NotFoundComponent_HostBindings(rf: number, _ctx: unknown)\n {\n original?.(rf, _ctx);\n\n if (rf & 2)\n {\n ɵɵclassProp('scrollable', true);\n }\n };\n\n return target;\n };\n}"]}
|
|
@@ -2,4 +2,8 @@
|
|
|
2
2
|
* Enables animation of children on components
|
|
3
3
|
*/
|
|
4
4
|
export const AnimateChildrenHostFeature = { '[@animateChildren]': 'true' };
|
|
5
|
+
/**
|
|
6
|
+
* Adds css class 'scrollable' to host element
|
|
7
|
+
*/
|
|
8
|
+
export const ScrollableContentHostFeature = { '[class.scrollable]': 'true' };
|
|
5
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/host/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAC,oBAAoB,EAAE,MAAM,EAAC,CAAC","sourcesContent":["/**\n * Enables animation of children on components\n */\nexport const AnimateChildrenHostFeature = {'[@animateChildren]': 'true'};\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/host/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAC,oBAAoB,EAAE,MAAM,EAAC,CAAC;AAEzE;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,EAAC,oBAAoB,EAAE,MAAM,EAAC,CAAC","sourcesContent":["/**\n * Enables animation of children on components\n */\nexport const AnimateChildrenHostFeature = {'[@animateChildren]': 'true'};\n\n/**\n * Adds css class 'scrollable' to host element\n */\nexport const ScrollableContentHostFeature = {'[class.scrollable]': 'true'};"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anglr/common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "21.0.0-beta.20240729124704",
|
|
4
4
|
"description": "Angular module for common angular stuff",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"clean:deps": "rimraf package-lock.json node_modules || echo 'node_modules removed'",
|
|
16
16
|
"clean:all": "npm run clean && npm run clean:deps",
|
|
17
17
|
"ngc": "ngc",
|
|
18
|
-
"version:placeholder": "replace-in-file /\\\"version\\\":\\s\\\".*?\\\"/g \"\\\"version\\\": \\\"0.0.0-placeholder\\\"\" package.json
|
|
18
|
+
"version:placeholder": "replace-in-file /\\\"version\\\":\\s\\\".*?\\\"/g \"\\\"version\\\": \\\"0.0.0-placeholder\\\"\" package.json",
|
|
19
19
|
"version:git": "ngv -e \"replace-in-file 0.0.0-placeholder $GIT_VERSION package.json && echo $GIT_VERSION > version.bak\"",
|
|
20
20
|
"version:build": "ngv -e \"echo $GIT_VERSION > version.bak\"",
|
|
21
21
|
"prepublishOnly": "npm run bundle && npm run version:placeholder && npm run version:git",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"doc": "path-exists docs && npm run doc:generate || echo \"No docs generated!\"",
|
|
31
31
|
"predoc:generate": "cd docs && git pull && cd ..",
|
|
32
32
|
"postdoc:generate": "npm run doc:save",
|
|
33
|
-
"doc:generate": "npm run doc:generate:common && npm run doc:generate:forms && npm run doc:generate:router && npm run doc:generate:hotkeys && npm run doc:generate:store && npm run doc:generate:
|
|
33
|
+
"doc:generate": "npm run doc:generate:common && npm run doc:generate:forms && npm run doc:generate:router && npm run doc:generate:hotkeys && npm run doc:generate:store && npm run doc:generate:date-fns && npm run doc:generate:floating-ui && npm run doc:generate:material",
|
|
34
34
|
"doc:save": "cd docs && git add . && git commit -m \"INT: updated API docs ng-common\" && git push && cd ..",
|
|
35
35
|
"doc:generate:common": "rimraf docs/content/api/ng-common && npm run doc:json:common && npm run doc:md:common && npm run doc:api:common",
|
|
36
36
|
"doc:json:common": "api-extractor run --local --verbose -c api-extractor.json",
|
|
@@ -52,10 +52,6 @@
|
|
|
52
52
|
"doc:json:store": "api-extractor run --local --verbose -c store/api-extractor.json",
|
|
53
53
|
"doc:md:store": "api-documenter markdown -i store/temp -o docs/content/api/ng-common-store",
|
|
54
54
|
"doc:api:store": "copyfiles -u 2 store/temp/common-store.api.md docs/content/api/ng-common-store && rimraf store/temp",
|
|
55
|
-
"doc:generate:moment": "rimraf docs/content/api/ng-common-moment && npm run doc:json:moment && npm run doc:md:moment && npm run doc:api:moment",
|
|
56
|
-
"doc:json:moment": "api-extractor run --local --verbose -c moment/api-extractor.json",
|
|
57
|
-
"doc:md:moment": "api-documenter markdown -i moment/temp -o docs/content/api/ng-common-moment",
|
|
58
|
-
"doc:api:moment": "copyfiles -u 2 moment/temp/common-moment.api.md docs/content/api/ng-common-moment && rimraf moment/temp",
|
|
59
55
|
"doc:generate:date-fns": "rimraf docs/content/api/ng-common-date-fns && npm run doc:json:date-fns && npm run doc:md:date-fns && npm run doc:api:date-fns",
|
|
60
56
|
"doc:json:date-fns": "api-extractor run --local --verbose -c date-fns/api-extractor.json",
|
|
61
57
|
"doc:md:date-fns": "api-documenter markdown -i date-fns/temp -o docs/content/api/ng-common-date-fns",
|
|
@@ -93,7 +89,7 @@
|
|
|
93
89
|
"@angular/common": ">=18.0.0",
|
|
94
90
|
"@angular/core": ">=18.0.0",
|
|
95
91
|
"@angular/platform-browser": ">=18.0.0",
|
|
96
|
-
"@jscrpt/common": ">=6.
|
|
92
|
+
"@jscrpt/common": ">=6.2.0",
|
|
97
93
|
"rxjs": ">=7.5.7",
|
|
98
94
|
"tslib": "^2.6.2"
|
|
99
95
|
},
|
|
@@ -105,7 +101,6 @@
|
|
|
105
101
|
"@floating-ui/dom": "^1.6.5",
|
|
106
102
|
"angular2-hotkeys": ">=16.0.1",
|
|
107
103
|
"date-fns": "^2.30.0",
|
|
108
|
-
"moment": "^2.30.1",
|
|
109
104
|
"store": "^2.0.12"
|
|
110
105
|
},
|
|
111
106
|
"devDependencies": {
|
|
@@ -122,24 +117,23 @@
|
|
|
122
117
|
"@angular/platform-browser": "^18.0.0",
|
|
123
118
|
"@angular/router": "^18.0.0",
|
|
124
119
|
"@floating-ui/dom": "^1.6.5",
|
|
125
|
-
"@jscrpt/common": "^6.
|
|
126
|
-
"@microsoft/api-documenter": "7.25.
|
|
127
|
-
"@microsoft/api-extractor": "7.
|
|
120
|
+
"@jscrpt/common": "^6.2.0",
|
|
121
|
+
"@microsoft/api-documenter": "7.25.9",
|
|
122
|
+
"@microsoft/api-extractor": "7.47.4",
|
|
128
123
|
"@types/node": "^20.12.12",
|
|
129
124
|
"@types/store": "^2.0.5",
|
|
130
|
-
"@typescript-eslint/eslint-plugin": "
|
|
131
|
-
"@typescript-eslint/parser": "
|
|
125
|
+
"@typescript-eslint/eslint-plugin": "7.17.0",
|
|
126
|
+
"@typescript-eslint/parser": "7.17.0",
|
|
132
127
|
"angular2-hotkeys": "^16.0.1",
|
|
133
128
|
"copyfiles": "2.4.1",
|
|
134
129
|
"date-fns": "^2.30.0",
|
|
135
130
|
"eslint": "7.32.0",
|
|
136
131
|
"eslint-plugin-ressurectit": "0.1.0",
|
|
137
132
|
"lerna": "8.1.3",
|
|
138
|
-
"moment": "^2.30.1",
|
|
139
133
|
"npm-git-version": "2.0.0",
|
|
140
134
|
"path-exists-cli": "2.0.0",
|
|
141
|
-
"replace-in-file": "
|
|
142
|
-
"rimraf": "
|
|
135
|
+
"replace-in-file": "8.1.0",
|
|
136
|
+
"rimraf": "6.0.1",
|
|
143
137
|
"rxjs": "^7.5.7",
|
|
144
138
|
"store": "^2.0.12",
|
|
145
139
|
"tslib": "2.6.2",
|
|
@@ -202,13 +196,6 @@
|
|
|
202
196
|
"node": "./es2022/material/src/index.js",
|
|
203
197
|
"default": "./es2022/material/src/index.js"
|
|
204
198
|
},
|
|
205
|
-
"./moment": {
|
|
206
|
-
"types": "./moment/src/index.d.ts",
|
|
207
|
-
"esm2022": "./es2022/moment/src/index.js",
|
|
208
|
-
"es2022": "./es2022/moment/src/index.js",
|
|
209
|
-
"node": "./es2022/moment/src/index.js",
|
|
210
|
-
"default": "./es2022/moment/src/index.js"
|
|
211
|
-
},
|
|
212
199
|
"./router": {
|
|
213
200
|
"types": "./router/src/index.d.ts",
|
|
214
201
|
"esm2022": "./es2022/router/src/index.js",
|
package/readme.md
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
- [API Forms](https://ressurectit.github.io/#/content/api/ng-common-forms/common-forms)
|
|
9
9
|
- [API Hotkeys](https://ressurectit.github.io/#/content/api/ng-common-hotkeys/common-hotkeys)
|
|
10
10
|
- [API Material](https://ressurectit.github.io/#/content/api/ng-common-material/common-material)
|
|
11
|
-
- [API Moment](https://ressurectit.github.io/#/content/api/ng-common-moment/common-moment)
|
|
12
11
|
- [API Router](https://ressurectit.github.io/#/content/api/ng-common-router/common-router)
|
|
13
12
|
- [API Store](https://ressurectit.github.io/#/content/api/ng-common-store/common-store)
|
|
14
13
|
- [Samples](https://ressurectit.github.io/#/content/common#samples)
|
|
@@ -5,4 +5,5 @@ export * from './componentDisplayFlex/componentDisplayFlex.decorator';
|
|
|
5
5
|
export * from './componentHostStyle/componentHostStyle.decorator';
|
|
6
6
|
export * from './scrollableContent/scrollableContent.decorator';
|
|
7
7
|
export * from './typeProvider/typeProvider.decorator';
|
|
8
|
+
export * from './withScrollableCssClass/withScrollableCssClass.decoator';
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,yDAAyD,CAAC;AACxE,cAAc,uDAAuD,CAAC;AACtE,cAAc,mDAAmD,CAAC;AAClE,cAAc,iDAAiD,CAAC;AAChE,cAAc,uCAAuC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,yDAAyD,CAAC;AACxE,cAAc,uDAAuD,CAAC;AACtE,cAAc,mDAAmD,CAAC;AAClE,cAAc,iDAAiD,CAAC;AAChE,cAAc,uCAAuC,CAAC;AACtD,cAAc,0DAA0D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withScrollableCssClass.decoator.d.ts","sourceRoot":"","sources":["withScrollableCssClass.decoator.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,cAAc,CAmBvD"}
|
|
@@ -4,4 +4,10 @@
|
|
|
4
4
|
export declare const AnimateChildrenHostFeature: {
|
|
5
5
|
'[@animateChildren]': string;
|
|
6
6
|
};
|
|
7
|
+
/**
|
|
8
|
+
* Adds css class 'scrollable' to host element
|
|
9
|
+
*/
|
|
10
|
+
export declare const ScrollableContentHostFeature: {
|
|
11
|
+
'[class.scrollable]': string;
|
|
12
|
+
};
|
|
7
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,0BAA0B;;CAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,0BAA0B;;CAAiC,CAAC;AAEzE;;GAEG;AACH,eAAO,MAAM,4BAA4B;;CAAiC,CAAC"}
|
package/version.bak
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
21.0.0-beta.20240729124704
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../moment/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC","sourcesContent":["export * from './modules/moment.module';\nexport * from './misc/utils';"]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { readEncodedFilter } from '@anglr/common/forms';
|
|
2
|
-
import { isString } from '@jscrpt/common';
|
|
3
|
-
import moment from 'moment';
|
|
4
|
-
/**
|
|
5
|
-
* Reads filter value from encoded string, deserialize date properties into moment
|
|
6
|
-
* @param defaultValue - Default value of filter, which is overriden by values from filterValue
|
|
7
|
-
* @param filterValue - Encoded string containing filter value
|
|
8
|
-
* @param offsetCorrelation - Indication whether perform timezone offset correlation, defaults to true
|
|
9
|
-
*/
|
|
10
|
-
export function readEncodedFilterWithDates(defaultValue, filterValue, offsetCorrelation = true) {
|
|
11
|
-
const dateRegex = /^(\d+-){2}\d+(T(\d+:){2}\d+(\.\d+)?)?/g;
|
|
12
|
-
return readEncodedFilter(defaultValue, filterValue, (_key, value) => {
|
|
13
|
-
//it is date value
|
|
14
|
-
if (isString(value) && dateRegex.test(value)) {
|
|
15
|
-
const val = moment(value);
|
|
16
|
-
if (!val.isValid) {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
if (offsetCorrelation) {
|
|
20
|
-
return val.subtract(val.utcOffset(), 'minutes');
|
|
21
|
-
}
|
|
22
|
-
return val;
|
|
23
|
-
}
|
|
24
|
-
return value;
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../moment/src/misc/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CAAU,YAAqB,EAAE,WAAmB,EAAE,oBAA6B,IAAI;IAE7H,MAAM,SAAS,GAAG,wCAAwC,CAAC;IAE3D,OAAO,iBAAiB,CAAC,YAAY,EAAE,WAAW,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QAEhE,kBAAkB;QAClB,IAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAC3C,CAAC;YACG,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YAE1B,IAAG,CAAC,GAAG,CAAC,OAAO,EACf,CAAC;gBACG,OAAO,IAAI,CAAC;YAChB,CAAC;YAED,IAAG,iBAAiB,EACpB,CAAC;gBACG,OAAO,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,EAAE,EAAE,SAAS,CAAC,CAAC;YACpD,CAAC;YAED,OAAO,GAAG,CAAC;QACf,CAAC;QAED,OAAO,KAAK,CAAC;IACjB,CAAC,CAAC,CAAC;AACP,CAAC","sourcesContent":["import {readEncodedFilter} from '@anglr/common/forms';\nimport {isString} from '@jscrpt/common';\nimport moment from 'moment';\n\n/**\n * Reads filter value from encoded string, deserialize date properties into moment\n * @param defaultValue - Default value of filter, which is overriden by values from filterValue\n * @param filterValue - Encoded string containing filter value\n * @param offsetCorrelation - Indication whether perform timezone offset correlation, defaults to true\n */\nexport function readEncodedFilterWithDates<TFilter>(defaultValue: TFilter, filterValue: string, offsetCorrelation: boolean = true): TFilter\n{\n const dateRegex = /^(\\d+-){2}\\d+(T(\\d+:){2}\\d+(\\.\\d+)?)?/g;\n\n return readEncodedFilter(defaultValue, filterValue, (_key, value) =>\n {\n //it is date value\n if(isString(value) && dateRegex.test(value))\n {\n const val = moment(value);\n \n if(!val.isValid)\n {\n return null;\n }\n\n if(offsetCorrelation)\n {\n return val.subtract(val.utcOffset(), 'minutes');\n }\n\n return val;\n }\n\n return value;\n });\n}"]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { MomentConvertPipe } from '../pipes/momentConvert/momentConvert.pipe';
|
|
3
|
-
import { MomentFormatPipe } from '../pipes/momentFormat/momentFormat.pipe';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* Module containing common stuff for moment.js in angular
|
|
7
|
-
*/
|
|
8
|
-
export class MomentModule {
|
|
9
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MomentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
10
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: MomentModule, declarations: [MomentConvertPipe,
|
|
11
|
-
MomentFormatPipe], exports: [MomentConvertPipe,
|
|
12
|
-
MomentFormatPipe] }); }
|
|
13
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MomentModule }); }
|
|
14
|
-
}
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MomentModule, decorators: [{
|
|
16
|
-
type: NgModule,
|
|
17
|
-
args: [{
|
|
18
|
-
declarations: [
|
|
19
|
-
MomentConvertPipe,
|
|
20
|
-
MomentFormatPipe
|
|
21
|
-
],
|
|
22
|
-
exports: [
|
|
23
|
-
MomentConvertPipe,
|
|
24
|
-
MomentFormatPipe
|
|
25
|
-
]
|
|
26
|
-
}]
|
|
27
|
-
}] });
|
|
28
|
-
//# sourceMappingURL=moment.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"moment.module.js","sourceRoot":"","sources":["../../../../moment/src/modules/moment.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,iBAAiB,EAAC,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAC,gBAAgB,EAAC,MAAM,yCAAyC,CAAC;;AAEzE;;GAEG;AAcH,MAAM,OAAO,YAAY;8GAAZ,YAAY;+GAAZ,YAAY,iBATjB,iBAAiB;YACjB,gBAAgB,aAIhB,iBAAiB;YACjB,gBAAgB;+GAGX,YAAY;;2FAAZ,YAAY;kBAbxB,QAAQ;mBACT;oBACI,YAAY,EACZ;wBACI,iBAAiB;wBACjB,gBAAgB;qBACnB;oBACD,OAAO,EACP;wBACI,iBAAiB;wBACjB,gBAAgB;qBACnB;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\n\nimport {MomentConvertPipe} from '../pipes/momentConvert/momentConvert.pipe';\nimport {MomentFormatPipe} from '../pipes/momentFormat/momentFormat.pipe';\n\n/**\n * Module containing common stuff for moment.js in angular\n */\n@NgModule(\n{\n declarations:\n [\n MomentConvertPipe,\n MomentFormatPipe\n ],\n exports:\n [\n MomentConvertPipe,\n MomentFormatPipe\n ]\n})\nexport class MomentModule\n{\n}"]}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Pipe } from '@angular/core';
|
|
2
|
-
import { isPresent } from '@jscrpt/common';
|
|
3
|
-
import moment from 'moment';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* Performs moment conversion
|
|
7
|
-
*/
|
|
8
|
-
export class MomentConvertPipe {
|
|
9
|
-
//######################### public methods #########################
|
|
10
|
-
/**
|
|
11
|
-
* Transforms 'date' string to moment
|
|
12
|
-
* @param value - Value to be converted to moment
|
|
13
|
-
*/
|
|
14
|
-
transform(value) {
|
|
15
|
-
if (isPresent(value)) {
|
|
16
|
-
value = moment(value);
|
|
17
|
-
if (!value.isValid) {
|
|
18
|
-
value = null;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return value;
|
|
22
|
-
}
|
|
23
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MomentConvertPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
24
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: MomentConvertPipe, name: "momentConvert" }); }
|
|
25
|
-
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MomentConvertPipe, decorators: [{
|
|
27
|
-
type: Pipe,
|
|
28
|
-
args: [{
|
|
29
|
-
name: 'momentConvert'
|
|
30
|
-
}]
|
|
31
|
-
}] });
|
|
32
|
-
//# sourceMappingURL=momentConvert.pipe.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"momentConvert.pipe.js","sourceRoot":"","sources":["../../../../../moment/src/pipes/momentConvert/momentConvert.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;AAClD,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,MAAM,MAAM,QAAQ,CAAC;;AAE5B;;GAEG;AAKH,MAAM,OAAO,iBAAiB;IAE1B,oEAAoE;IAEpE;;;OAGG;IACI,SAAS,CAAC,KAA6B;QAE1C,IAAG,SAAS,CAAC,KAAK,CAAC,EACnB,CAAC;YACG,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YAEtB,IAAG,CAAC,KAAK,CAAC,OAAO,EACjB,CAAC;gBACG,KAAK,GAAG,IAAI,CAAC;YACjB,CAAC;QACL,CAAC;QAED,OAAO,KAAsB,CAAC;IAClC,CAAC;8GArBQ,iBAAiB;4GAAjB,iBAAiB;;2FAAjB,iBAAiB;kBAJ7B,IAAI;mBACL;oBACI,IAAI,EAAE,eAAe;iBACxB","sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\nimport {isPresent} from '@jscrpt/common';\nimport moment from 'moment';\n\n/**\n * Performs moment conversion\n */\n@Pipe(\n{\n name: 'momentConvert'\n})\nexport class MomentConvertPipe implements PipeTransform\n{\n //######################### public methods #########################\n\n /**\n * Transforms 'date' string to moment\n * @param value - Value to be converted to moment\n */\n public transform(value: string | moment.Moment): moment.Moment\n {\n if(isPresent(value))\n {\n value = moment(value);\n \n if(!value.isValid)\n {\n value = null;\n }\n }\n\n return value as moment.Moment;\n }\n}"]}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Pipe } from '@angular/core';
|
|
2
|
-
import { isPresent } from '@jscrpt/common';
|
|
3
|
-
import moment from 'moment';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* Performs moment conversion and formats result
|
|
7
|
-
*/
|
|
8
|
-
export class MomentFormatPipe {
|
|
9
|
-
//######################### public methods #########################
|
|
10
|
-
/**
|
|
11
|
-
* Transforms 'date' string to moment and formats it
|
|
12
|
-
* @param value - Value to be converted to moment
|
|
13
|
-
* @param format - Formats used for formatting moment
|
|
14
|
-
*/
|
|
15
|
-
transform(value, format = 'L') {
|
|
16
|
-
if (isPresent(value)) {
|
|
17
|
-
value = moment(value);
|
|
18
|
-
if (!value.isValid) {
|
|
19
|
-
value = null;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
if (value) {
|
|
23
|
-
return value.format(format);
|
|
24
|
-
}
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MomentFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
28
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: MomentFormatPipe, name: "momentFormat" }); }
|
|
29
|
-
}
|
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MomentFormatPipe, decorators: [{
|
|
31
|
-
type: Pipe,
|
|
32
|
-
args: [{
|
|
33
|
-
name: 'momentFormat'
|
|
34
|
-
}]
|
|
35
|
-
}] });
|
|
36
|
-
//# sourceMappingURL=momentFormat.pipe.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"momentFormat.pipe.js","sourceRoot":"","sources":["../../../../../moment/src/pipes/momentFormat/momentFormat.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;AAClD,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,MAAM,MAAM,QAAQ,CAAC;;AAE5B;;GAEG;AAKH,MAAM,OAAO,gBAAgB;IAEzB,oEAAoE;IAEpE;;;;OAIG;IACI,SAAS,CAAC,KAA6B,EAAE,SAAiB,GAAG;QAEhE,IAAG,SAAS,CAAC,KAAK,CAAC,EACnB,CAAC;YACG,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YAEtB,IAAG,CAAC,KAAK,CAAC,OAAO,EACjB,CAAC;gBACG,KAAK,GAAG,IAAI,CAAC;YACjB,CAAC;QACL,CAAC;QAED,IAAG,KAAK,EACR,CAAC;YACG,OAAQ,KAAuB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACnD,CAAC;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;8GA3BQ,gBAAgB;4GAAhB,gBAAgB;;2FAAhB,gBAAgB;kBAJ5B,IAAI;mBACL;oBACI,IAAI,EAAE,cAAc;iBACvB","sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\nimport {isPresent} from '@jscrpt/common';\nimport moment from 'moment';\n\n/**\n * Performs moment conversion and formats result\n */\n@Pipe(\n{\n name: 'momentFormat'\n})\nexport class MomentFormatPipe implements PipeTransform\n{\n //######################### public methods #########################\n\n /**\n * Transforms 'date' string to moment and formats it\n * @param value - Value to be converted to moment\n * @param format - Formats used for formatting moment\n */\n public transform(value: string | moment.Moment, format: string = 'L'): string\n {\n if(isPresent(value))\n {\n value = moment(value);\n \n if(!value.isValid)\n {\n value = null;\n }\n }\n\n if(value)\n {\n return (value as moment.Moment).format(format);\n }\n\n return null;\n }\n}"]}
|
package/moment/package.json
DELETED
package/moment/src/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Reads filter value from encoded string, deserialize date properties into moment
|
|
3
|
-
* @param defaultValue - Default value of filter, which is overriden by values from filterValue
|
|
4
|
-
* @param filterValue - Encoded string containing filter value
|
|
5
|
-
* @param offsetCorrelation - Indication whether perform timezone offset correlation, defaults to true
|
|
6
|
-
*/
|
|
7
|
-
export declare function readEncodedFilterWithDates<TFilter>(defaultValue: TFilter, filterValue: string, offsetCorrelation?: boolean): TFilter;
|
|
8
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["utils.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,iBAAiB,GAAE,OAAc,GAAG,OAAO,CA0B1I"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "../pipes/momentConvert/momentConvert.pipe";
|
|
3
|
-
import * as i2 from "../pipes/momentFormat/momentFormat.pipe";
|
|
4
|
-
/**
|
|
5
|
-
* Module containing common stuff for moment.js in angular
|
|
6
|
-
*/
|
|
7
|
-
export declare class MomentModule {
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MomentModule, never>;
|
|
9
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MomentModule, [typeof i1.MomentConvertPipe, typeof i2.MomentFormatPipe], never, [typeof i1.MomentConvertPipe, typeof i2.MomentFormatPipe]>;
|
|
10
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<MomentModule>;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=moment.module.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"moment.module.d.ts","sourceRoot":"","sources":["moment.module.ts"],"names":[],"mappings":";;;AAKA;;GAEG;AACH,qBAaa,YAAY;yCAAZ,YAAY;0CAAZ,YAAY;0CAAZ,YAAY;CAExB"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import moment from 'moment';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* Performs moment conversion
|
|
6
|
-
*/
|
|
7
|
-
export declare class MomentConvertPipe implements PipeTransform {
|
|
8
|
-
/**
|
|
9
|
-
* Transforms 'date' string to moment
|
|
10
|
-
* @param value - Value to be converted to moment
|
|
11
|
-
*/
|
|
12
|
-
transform(value: string | moment.Moment): moment.Moment;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MomentConvertPipe, never>;
|
|
14
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<MomentConvertPipe, "momentConvert", false>;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=momentConvert.pipe.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"momentConvert.pipe.d.ts","sourceRoot":"","sources":["momentConvert.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,aAAa,EAAC,MAAM,eAAe,CAAC;AAElD,OAAO,MAAM,MAAM,QAAQ,CAAC;;AAE5B;;GAEG;AACH,qBAIa,iBAAkB,YAAW,aAAa;IAInD;;;OAGG;IACI,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM;yCARrD,iBAAiB;uCAAjB,iBAAiB;CAsB7B"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import moment from 'moment';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* Performs moment conversion and formats result
|
|
6
|
-
*/
|
|
7
|
-
export declare class MomentFormatPipe implements PipeTransform {
|
|
8
|
-
/**
|
|
9
|
-
* Transforms 'date' string to moment and formats it
|
|
10
|
-
* @param value - Value to be converted to moment
|
|
11
|
-
* @param format - Formats used for formatting moment
|
|
12
|
-
*/
|
|
13
|
-
transform(value: string | moment.Moment, format?: string): string;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MomentFormatPipe, never>;
|
|
15
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<MomentFormatPipe, "momentFormat", false>;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=momentFormat.pipe.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"momentFormat.pipe.d.ts","sourceRoot":"","sources":["momentFormat.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,aAAa,EAAC,MAAM,eAAe,CAAC;AAElD,OAAO,MAAM,MAAM,QAAQ,CAAC;;AAE5B;;GAEG;AACH,qBAIa,gBAAiB,YAAW,aAAa;IAIlD;;;;OAIG;IACI,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAE,MAAY,GAAG,MAAM;yCATpE,gBAAgB;uCAAhB,gBAAgB;CA4B5B"}
|