@anglr/datetime 2.0.0 → 3.0.0-beta.20220315103241

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## Version 2.0.1 (2022-02-22)
4
+
5
+ ### Bug Fixes
6
+
7
+ - fixed typings, not using rolled up typings for now
8
+ - fixed scss entry points
9
+
3
10
  ## Version 2.0.0 (2022-02-21)
4
11
 
5
12
  ### BREAKING CHANGES
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@anglr/datetime",
3
- "version": "2.0.0",
3
+ "version": "3.0.0-beta.20220315103241",
4
4
  "description": "Angular library for datetime manipulation components",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "scripts": {
8
- "build": "ngc --declaration --declarationDir . --declarationMap && ngc -t es2015 --outDir es2015 && npm run dts:rollup",
8
+ "build": "ngc --declaration --declarationDir . --declarationMap && ngc -t es2015 --outDir es2015",
9
9
  "dts:rollup": "npm run api -- api-extractor.json && npm run api -- date-fns/api-extractor.json && npm run api -- moment/api-extractor.json",
10
10
  "api": "api-extractor run --local --verbose -c",
11
11
  "clean": "rimraf */temp temp es2015 es2020 **/tsdoc-metadata.json src/**/*.d.ts src/**/*.d.ts.map */src/**/*.d.ts */src/**/*.d.ts.map ./*.d.ts ./*.d.ts.map */*.d.ts",
@@ -20,7 +20,7 @@
20
20
  "bundle": "npm run clean && npm run build",
21
21
  "deploy": "npm publish --loglevel error",
22
22
  "deploy:next": "npm publish --tag next --loglevel error",
23
- "test": "karma start karma.conf.ts --single-run",
23
+ "test": "jest",
24
24
  "lint": "eslint src/**/*.ts",
25
25
  "doc": "path-exists docs && npm run doc:generate || echo \"No docs generated!\"",
26
26
  "predoc:generate": "cd docs && git pull && cd ..",
@@ -80,14 +80,13 @@
80
80
  "rxjs": "^6.6.7",
81
81
  "@jscrpt/common": "^2.2.0",
82
82
  "@anglr/common": "^10.0.0",
83
+ "@types/node": "14.14.31",
83
84
  "moment": "^2.29.1",
84
85
  "date-fns": "^2.27.0",
85
86
  "positions": "^1.6.2",
86
- "@types/jasmine": "3.6.7",
87
87
  "@angular/compiler-cli": "^13.1.0",
88
88
  "@angular/compiler": "^13.1.0",
89
89
  "@angular/language-service": "^13.1.0",
90
- "@ngtools/webpack": "11.2.4",
91
90
  "@microsoft/api-extractor": "7.19.2",
92
91
  "@microsoft/api-documenter": "7.13.77",
93
92
  "tslib": "2.3.1",
@@ -95,16 +94,14 @@
95
94
  "@typescript-eslint/eslint-plugin": "4.33.0",
96
95
  "@typescript-eslint/parser": "4.33.0",
97
96
  "eslint-plugin-ressurectit": "0.1.0",
98
- "karma": "6.2.0",
99
- "karma-cli": "2.0.0",
100
- "karma-jasmine": "4.0.1",
101
- "karma-chrome-launcher": "3.1.0",
102
- "karma-webpack": "5.0.0",
103
- "puppeteer": "8.0.0",
104
- "jasmine-core": "3.7.1",
105
- "webpack": "5.27.1",
106
- "raw-loader": "4.0.2",
107
- "ts-node": "9.1.1",
97
+ "eslint-plugin-jest": "26.1.1",
98
+ "jest": "27.5.1",
99
+ "ts-jest": "27.1.3",
100
+ "jest-preset-angular": "11.1.1",
101
+ "@types/jest": "27.4.1",
102
+ "zone.js": "0.11.5",
103
+ "@angular/platform-browser-dynamic": "^13.1.0",
104
+ "@angular/platform-browser": "^13.1.0",
108
105
  "rimraf": "3.0.2",
109
106
  "copyfiles": "2.4.1",
110
107
  "replace-in-file": "6.3.2",
@@ -116,13 +113,22 @@
116
113
  "es2020": "./es2020/src/index.js",
117
114
  "es2015": "./es2015/src/index.js",
118
115
  "module": "./es2015/src/index.js",
119
- "typings": "./datetime.d.ts",
116
+ "typings": "./src/index.d.ts",
120
117
  "exports": {
121
118
  "./package.json": {
122
119
  "default": "./package.json"
123
120
  },
121
+ "./src/theme.scss": {
122
+ "sass": "./src/theme.scss"
123
+ },
124
+ "./src/dark.scss": {
125
+ "sass": "./src/dark.scss"
126
+ },
127
+ "./src/default.scss": {
128
+ "sass": "./src/default.scss"
129
+ },
124
130
  ".": {
125
- "types": "./datetime.d.ts",
131
+ "types": "./src/index.d.ts",
126
132
  "esm2020": "./es2020/src/index.js",
127
133
  "es2020": "./es2020/src/index.js",
128
134
  "es2015": "./es2015/src/index.js",
@@ -130,7 +136,7 @@
130
136
  "default": "./es2020/src/index.js"
131
137
  },
132
138
  "./date-fns": {
133
- "types": "./date-fns/datetime-date-fns.d.ts",
139
+ "types": "./date-fns/src/index.d.ts",
134
140
  "esm2020": "./es2020/date-fns/src/index.js",
135
141
  "es2020": "./es2020/date-fns/src/index.js",
136
142
  "es2015": "./es2015/date-fns/src/index.js",
@@ -138,7 +144,7 @@
138
144
  "default": "./es2020/date-fns/src/index.js"
139
145
  },
140
146
  "./moment": {
141
- "types": "./moment/datetime-moment.d.ts",
147
+ "types": "./moment/src/index.d.ts",
142
148
  "esm2020": "./es2020/moment/src/index.js",
143
149
  "es2020": "./es2020/moment/src/index.js",
144
150
  "es2015": "./es2015/moment/src/index.js",
package/version.bak CHANGED
@@ -1 +1 @@
1
- 2.0.0
1
+ 3.0.0-beta.20220315103241
@@ -1,64 +0,0 @@
1
- import { DateApi } from '@anglr/datetime';
2
- import { DateApiObject } from '@anglr/datetime';
3
- import { DateTimeRelativeParser } from '@anglr/datetime';
4
- import { DateValue } from '@anglr/datetime';
5
- import { FactoryProvider } from '@angular/core';
6
- import * as i0 from '@angular/core';
7
- import { InjectionToken } from '@angular/core';
8
- import { Locale as Locale_2 } from 'date-fns';
9
-
10
- /**
11
- * Injection token used for obtaining Date fns locale service
12
- */
13
- export declare const DATE_FNS_LOCALE: InjectionToken<DateFnsLocale>;
14
-
15
- /**
16
- * Injection token used for obtaining date-fns FormatProvider implementation
17
- */
18
- export declare const DATEFNS_FORMAT_PROVIDER: FactoryProvider;
19
-
20
- /**
21
- * Date api using DateFnsJS, used for obtaining DateApi wrapper object
22
- */
23
- export declare class DateFnsDateApi implements DateApi<Date> {
24
- protected _localeSvc: DateFnsLocale;
25
- protected _relativeParser: DateTimeRelativeParser<Date>;
26
- constructor(_localeSvc: DateFnsLocale, _relativeParser: DateTimeRelativeParser<Date>);
27
- /**
28
- * Gets wrapping object used for manipulation
29
- * @param value - Value to be converted (parsed) and used for manipulation
30
- * @param format - Format string used for parsing string value
31
- */
32
- getValue(value: DateValue | Date, format?: string): DateApiObject<Date>;
33
- /**
34
- * Gets wrapping object used for manipulation instantiated to current date and time
35
- */
36
- now(): DateApiObject<Date>;
37
- /**
38
- * Gets format string using pseudo format
39
- * @param pseudoFormat - Pseudo format token, used for obtaining 'date' or 'time' format string
40
- */
41
- getFormat(pseudoFormat: string): string;
42
- /**
43
- * Gets information
44
- */
45
- weekStartsOnMonday(): boolean;
46
- /**
47
- * Gets array of weekday names in short format, order of days is dependent on locale
48
- */
49
- weekdaysShort(): string[];
50
- static ɵfac: i0.ɵɵFactoryDeclaration<DateFnsDateApi, never>;
51
- static ɵprov: i0.ɵɵInjectableDeclaration<DateFnsDateApi>;
52
- }
53
-
54
- /**
55
- * Date FNS locale service, used for obtaining locale
56
- */
57
- export declare interface DateFnsLocale {
58
- /**
59
- * Gets current active locale for date fns
60
- */
61
- readonly locale: Locale_2;
62
- }
63
-
64
- export { }
@@ -1,64 +0,0 @@
1
- import { DateApi } from '@anglr/datetime';
2
- import { DateApiObject } from '@anglr/datetime';
3
- import { DateTimeRelativeParser } from '@anglr/datetime';
4
- import { DateValue } from '@anglr/datetime';
5
- import { FactoryProvider } from '@angular/core';
6
- import * as i0 from '@angular/core';
7
- import { InjectionToken } from '@angular/core';
8
- import { Locale as Locale_2 } from 'date-fns';
9
-
10
- /**
11
- * Injection token used for obtaining Date fns locale service
12
- */
13
- export declare const DATE_FNS_LOCALE: InjectionToken<DateFnsLocale>;
14
-
15
- /**
16
- * Injection token used for obtaining date-fns FormatProvider implementation
17
- */
18
- export declare const DATEFNS_FORMAT_PROVIDER: FactoryProvider;
19
-
20
- /**
21
- * Date api using DateFnsJS, used for obtaining DateApi wrapper object
22
- */
23
- export declare class DateFnsDateApi implements DateApi<Date> {
24
- protected _localeSvc: DateFnsLocale;
25
- protected _relativeParser: DateTimeRelativeParser<Date>;
26
- constructor(_localeSvc: DateFnsLocale, _relativeParser: DateTimeRelativeParser<Date>);
27
- /**
28
- * Gets wrapping object used for manipulation
29
- * @param value - Value to be converted (parsed) and used for manipulation
30
- * @param format - Format string used for parsing string value
31
- */
32
- getValue(value: DateValue | Date, format?: string): DateApiObject<Date>;
33
- /**
34
- * Gets wrapping object used for manipulation instantiated to current date and time
35
- */
36
- now(): DateApiObject<Date>;
37
- /**
38
- * Gets format string using pseudo format
39
- * @param pseudoFormat - Pseudo format token, used for obtaining 'date' or 'time' format string
40
- */
41
- getFormat(pseudoFormat: string): string;
42
- /**
43
- * Gets information
44
- */
45
- weekStartsOnMonday(): boolean;
46
- /**
47
- * Gets array of weekday names in short format, order of days is dependent on locale
48
- */
49
- weekdaysShort(): string[];
50
- static ɵfac: i0.ɵɵFactoryDeclaration<DateFnsDateApi, never>;
51
- static ɵprov: i0.ɵɵInjectableDeclaration<DateFnsDateApi>;
52
- }
53
-
54
- /**
55
- * Date FNS locale service, used for obtaining locale
56
- */
57
- export declare interface DateFnsLocale {
58
- /**
59
- * Gets current active locale for date fns
60
- */
61
- readonly locale: Locale_2;
62
- }
63
-
64
- export { }
@@ -1,47 +0,0 @@
1
- ## API Report File for "@anglr/datetime-date-fns"
2
-
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
-
5
- ```ts
6
-
7
- import { DateApi } from '@anglr/datetime';
8
- import { DateApiObject } from '@anglr/datetime';
9
- import { DateTimeRelativeParser } from '@anglr/datetime';
10
- import { DateValue } from '@anglr/datetime';
11
- import { FactoryProvider } from '@angular/core';
12
- import * as i0 from '@angular/core';
13
- import { InjectionToken } from '@angular/core';
14
- import { Locale as Locale_2 } from 'date-fns';
15
-
16
- // @public
17
- export const DATE_FNS_LOCALE: InjectionToken<DateFnsLocale>;
18
-
19
- // @public
20
- export const DATEFNS_FORMAT_PROVIDER: FactoryProvider;
21
-
22
- // @public
23
- export class DateFnsDateApi implements DateApi<Date> {
24
- constructor(_localeSvc: DateFnsLocale, _relativeParser: DateTimeRelativeParser<Date>);
25
- getFormat(pseudoFormat: string): string;
26
- getValue(value: DateValue | Date, format?: string): DateApiObject<Date>;
27
- // (undocumented)
28
- protected _localeSvc: DateFnsLocale;
29
- now(): DateApiObject<Date>;
30
- // (undocumented)
31
- protected _relativeParser: DateTimeRelativeParser<Date>;
32
- weekdaysShort(): string[];
33
- weekStartsOnMonday(): boolean;
34
- // (undocumented)
35
- static ɵfac: i0.ɵɵFactoryDeclaration<DateFnsDateApi, never>;
36
- // (undocumented)
37
- static ɵprov: i0.ɵɵInjectableDeclaration<DateFnsDateApi>;
38
- }
39
-
40
- // @public
41
- export interface DateFnsLocale {
42
- readonly locale: Locale_2;
43
- }
44
-
45
- // (No @packageDocumentation comment for this package)
46
-
47
- ```