@anglr/datetime 9.0.0-beta.20250123122641 → 9.0.0
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 +2 -0
- package/es2022/src/index.js +1 -2
- package/es2022/src/index.js.map +1 -1
- package/es2022/src/modules/{datePipes.module.js → datePipes/datePipes.module.js} +12 -5
- package/es2022/src/modules/datePipes/datePipes.module.js.map +1 -0
- package/es2022/src/modules/datePipes/index.js +2 -0
- package/es2022/src/modules/datePipes/index.js.map +1 -0
- package/es2022/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js +2 -2
- package/es2022/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js.map +1 -1
- package/es2022/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.js +2 -2
- package/es2022/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.js.map +1 -1
- package/es2022/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.js +2 -2
- package/es2022/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.js.map +1 -1
- package/es2022/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.js +1 -1
- package/es2022/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.js.map +1 -1
- package/es2022/src/modules/index.js +1 -1
- package/es2022/src/modules/index.js.map +1 -1
- package/es2022/src/pipes/{dateConvert.pipe.js → dateConvert/dateConvert.pipe.js} +1 -1
- package/es2022/src/pipes/dateConvert/dateConvert.pipe.js.map +1 -0
- package/es2022/src/pipes/{dateFormat.pipe.js → dateFormat/dateFormat.pipe.js} +1 -1
- package/es2022/src/pipes/dateFormat/dateFormat.pipe.js.map +1 -0
- package/es2022/src/pipes/index.js +5 -0
- package/es2022/src/pipes/index.js.map +1 -0
- package/es2022/src/pipes/isAfter/isAfter.pipe.js +38 -0
- package/es2022/src/pipes/isAfter/isAfter.pipe.js.map +1 -0
- package/es2022/src/pipes/isBefore/isBefore.pipe.js +38 -0
- package/es2022/src/pipes/isBefore/isBefore.pipe.js.map +1 -0
- package/package.json +2 -2
- package/src/index.d.ts +1 -2
- package/src/index.d.ts.map +1 -1
- package/src/modules/datePipes/datePipes.module.d.ts +14 -0
- package/src/modules/datePipes/datePipes.module.d.ts.map +1 -0
- package/src/modules/datePipes/index.d.ts +2 -0
- package/src/modules/datePipes/index.d.ts.map +1 -0
- package/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.d.ts.map +1 -1
- package/src/modules/index.d.ts +1 -1
- package/src/modules/index.d.ts.map +1 -1
- package/src/pipes/{dateConvert.pipe.d.ts → dateConvert/dateConvert.pipe.d.ts} +1 -1
- package/src/pipes/dateConvert/dateConvert.pipe.d.ts.map +1 -0
- package/src/pipes/{dateFormat.pipe.d.ts → dateFormat/dateFormat.pipe.d.ts} +2 -2
- package/src/pipes/dateFormat/dateFormat.pipe.d.ts.map +1 -0
- package/src/pipes/index.d.ts +5 -0
- package/src/pipes/index.d.ts.map +1 -0
- package/src/pipes/isAfter/isAfter.pipe.d.ts +19 -0
- package/src/pipes/isAfter/isAfter.pipe.d.ts.map +1 -0
- package/src/pipes/isBefore/isBefore.pipe.d.ts +19 -0
- package/src/pipes/isBefore/isBefore.pipe.d.ts.map +1 -0
- package/version.bak +1 -1
- package/es2022/src/modules/datePipes.module.js.map +0 -1
- package/es2022/src/pipes/dateConvert.pipe.js.map +0 -1
- package/es2022/src/pipes/dateFormat.pipe.js.map +0 -1
- package/src/modules/datePipes.module.d.ts +0 -12
- package/src/modules/datePipes.module.d.ts.map +0 -1
- package/src/pipes/dateConvert.pipe.d.ts.map +0 -1
- package/src/pipes/dateFormat.pipe.d.ts.map +0 -1
package/changelog.md
CHANGED
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
|
|
14
14
|
### Features
|
|
15
15
|
|
|
16
|
+
- new `IsAfterPipe` pipe, that tests whether is provided date after tested date
|
|
17
|
+
- new `IsBeforePipe` pipe, that tests whether is provided date before tested date
|
|
16
18
|
- updated `DateApiObject` interface
|
|
17
19
|
- **new methods**
|
|
18
20
|
- `timestamp` gets value of date time as timestamp (in miliseconds)
|
package/es2022/src/index.js
CHANGED
|
@@ -8,6 +8,5 @@ export * from './misc/utils';
|
|
|
8
8
|
export * from './misc/validators';
|
|
9
9
|
export * from './modules';
|
|
10
10
|
export * from './services';
|
|
11
|
-
export * from './pipes
|
|
12
|
-
export * from './pipes/dateFormat.pipe';
|
|
11
|
+
export * from './pipes';
|
|
13
12
|
//# sourceMappingURL=index.js.map
|
package/es2022/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC","sourcesContent":["export * from './directives';\nexport * from './interfaces';\nexport * from './misc/constants';\nexport * from './misc/enums';\nexport * from './misc/tokens';\nexport * from './misc/types';\nexport * from './misc/utils';\nexport * from './misc/validators';\nexport * from './modules';\nexport * from './services';\nexport * from './pipes';\n"]}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { NgModule } from '@angular/core';
|
|
2
|
-
import { DateConvertPipe } from '
|
|
3
|
-
import { DateFormatPipe } from '../pipes/dateFormat.pipe';
|
|
2
|
+
import { DateConvertPipe, DateFormatPipe, IsAfterPipe, IsBeforePipe } from '../../pipes';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
/**
|
|
6
5
|
* Module used for exporting date pipes
|
|
7
6
|
*/
|
|
8
7
|
export class DatePipesModule {
|
|
9
8
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DatePipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
10
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.0", ngImport: i0, type: DatePipesModule, imports: [
|
|
11
|
-
|
|
9
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.0", ngImport: i0, type: DatePipesModule, imports: [IsAfterPipe,
|
|
10
|
+
IsBeforePipe,
|
|
11
|
+
DateFormatPipe,
|
|
12
|
+
DateConvertPipe], exports: [IsAfterPipe,
|
|
13
|
+
IsBeforePipe,
|
|
14
|
+
DateFormatPipe,
|
|
12
15
|
DateConvertPipe] }); }
|
|
13
16
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DatePipesModule }); }
|
|
14
17
|
}
|
|
@@ -16,13 +19,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImpor
|
|
|
16
19
|
type: NgModule,
|
|
17
20
|
args: [{
|
|
18
21
|
imports: [
|
|
22
|
+
IsAfterPipe,
|
|
23
|
+
IsBeforePipe,
|
|
19
24
|
DateFormatPipe,
|
|
20
25
|
DateConvertPipe,
|
|
21
26
|
],
|
|
22
27
|
exports: [
|
|
28
|
+
IsAfterPipe,
|
|
29
|
+
IsBeforePipe,
|
|
23
30
|
DateFormatPipe,
|
|
24
31
|
DateConvertPipe,
|
|
25
|
-
]
|
|
32
|
+
],
|
|
26
33
|
}]
|
|
27
34
|
}] });
|
|
28
35
|
//# sourceMappingURL=datePipes.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datePipes.module.js","sourceRoot":"","sources":["../../../../src/modules/datePipes/datePipes.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAC,MAAM,aAAa,CAAC;;AAEvF;;GAEG;AAmBH,MAAM,OAAO,eAAe;8GAAf,eAAe;+GAAf,eAAe,YAdpB,WAAW;YACX,YAAY;YACZ,cAAc;YACd,eAAe,aAKf,WAAW;YACX,YAAY;YACZ,cAAc;YACd,eAAe;+GAGV,eAAe;;2FAAf,eAAe;kBAlB3B,QAAQ;mBACT;oBACI,OAAO,EACP;wBACI,WAAW;wBACX,YAAY;wBACZ,cAAc;wBACd,eAAe;qBAElB;oBACD,OAAO,EACP;wBACI,WAAW;wBACX,YAAY;wBACZ,cAAc;wBACd,eAAe;qBAClB;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\n\nimport {DateConvertPipe, DateFormatPipe, IsAfterPipe, IsBeforePipe} from '../../pipes';\n\n/**\n * Module used for exporting date pipes\n */\n@NgModule(\n{\n imports:\n [\n IsAfterPipe,\n IsBeforePipe,\n DateFormatPipe,\n DateConvertPipe,\n\n ],\n exports:\n [\n IsAfterPipe,\n IsBeforePipe,\n DateFormatPipe,\n DateConvertPipe,\n ],\n})\nexport class DatePipesModule\n{\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/datePipes/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC","sourcesContent":["export * from './datePipes.module';\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
2
2
|
import { DateTimePeriodPickerBase } from '../dateTimePeriodPickerBase';
|
|
3
|
-
import { DatePipesModule } from '../../../datePipes
|
|
3
|
+
import { DatePipesModule } from '../../../datePipes';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "../../../../pipes/dateFormat.pipe";
|
|
5
|
+
import * as i1 from "../../../../pipes/dateFormat/dateFormat.pipe";
|
|
6
6
|
/**
|
|
7
7
|
* Component used for displaying day picker
|
|
8
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dayPicker.component.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/components/dayPicker/dayPicker.component.ts","../../../../../../src/modules/dateTimePicker/components/dayPicker/dayPicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAC,MAAM,eAAe,CAAC;AAGjE,OAAO,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;;;AAG1D;;GAEG;AAeH,MAAM,OAAO,kBAAoC,SAAQ,wBAA+C;IAgBpG,iEAAiE;IACjE;QAEI,KAAK,EAAE,CAAC;QAjBZ,0EAA0E;QAE1E;;WAEG;QACO,kBAAa,GAAqB,EAAE,CAAC;QAE/C,8FAA8F;QAE9F;;WAEG;QACO,aAAQ,GAAa,EAAE,CAAC;QAO9B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAED,2FAA2F;IAE3F;;;OAGG;IACO,SAAS,CAAC,OAAuB;QAEvC,IAAG,OAAO,CAAC,QAAQ,EACnB,CAAC;YACG,OAAO;QACX,CAAC;QAED,cAAc;QACd,IAAG,CAAC,IAAI,CAAC,MAAM,EACf,CAAC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E,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;iBACpC,CAAC;gBAEF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAE3B,IAAG,CAAC,UAAU,EACd,CAAC;oBACG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAClC,CAAC;gBAED,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAChC,CAAC;QACL,CAAC,QACK,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAE;QAEtD,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC;QAEjC,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAED,mFAAmF;IAEnF;;OAEG;IACO,QAAQ;QAEd,IAAI,CAAC,MAAM,EAAE,CAAC;IAClB,CAAC;IAED;;;;OAIG;IACO,YAAY,CAAC,GAAyB,EAAE,MAAa;QAE3D,OAAO,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;8GAhLQ,kBAAkB;kGAAlB,kBAAkB,yJCxB/B,k1CA6BC,2CDTO,eAAe;;2FAIV,kBAAkB;kBAd9B,SAAS;+BAEI,YAAY,QAGtB;wBACI,0BAA0B,EAAE,MAAM;qBACrC,WAED;wBACI,eAAe;qBAClB,mBACgB,uBAAuB,CAAC,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy} from '@angular/core';\n\nimport {DateTimePicker, DayData} from '../../interfaces';\nimport {DateTimePeriodPickerBase} from '../dateTimePeriodPickerBase';\nimport {DatePipesModule} from '../../../datePipes.module';\nimport {DateApiObject} from '../../../../services';\n\n/**\n * Component used for displaying day picker\n */\n@Component(\n{\n selector: 'day-picker',\n templateUrl: 'dayPicker.component.html',\n host:\n {\n '[class.date-time-period]': 'true',\n },\n imports:\n [\n DatePipesModule,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DayPickerComponent<TDate = unknown> extends DateTimePeriodPickerBase<DayData<TDate>, TDate> implements DateTimePicker<TDate>\n{\n //######################### protected properties #########################\n\n /**\n * Stored this picker month data\n */\n protected thisMonthData: DayData<TDate>[] = [];\n\n //######################### protected properties - template bindings #########################\n\n /**\n * Names of days\n */\n protected weekdays: string[] = [];\n\n //######################### constructor #########################\n constructor()\n {\n super();\n\n this.weekdays = this.dateApi.weekdays(true);\n }\n\n //######################### protected methods - template bindings #########################\n\n /**\n * Selects day as value of date time picker\n * @param dayData - Day data that were selected\n */\n protected selectDay(dayData: DayData<TDate>): void\n {\n if(dayData.disabled)\n {\n return;\n }\n\n //single value\n if(!this.ranged)\n {\n //no value selected yet\n if(!this.singleValue?.isValid())\n {\n this.singleValue = this.displayDate?.clone() ?? this.dateApi.getValue(new Date());\n }\n\n this.singleValue.year(dayData.dateObj.year());\n this.singleValue.month(dayData.dateObj.month());\n this.singleValue.dayOfMonth(dayData.day);\n\n //other month was selected\n if(dayData.otherMonth)\n {\n this.displayDate?.month(dayData.dateObj.month());\n }\n\n this.singleValue.updateOriginal();\n }\n else\n {\n //TODO: range\n }\n\n this.valueChangeSubject.next();\n this.render();\n this.changeDetector.detectChanges();\n }\n\n /**\n * Changes displayed month to next month\n */\n protected nextMonth(): void\n {\n this.displayDate?.addMonths(1).updateOriginal();\n\n this.render();\n }\n\n /**\n * Changes displayed month to previous month\n */\n protected previousMonth(): void\n {\n this.displayDate?.subtractMonths(1).updateOriginal();\n\n this.render();\n }\n\n //######################### protected methods #########################\n\n /**\n * Renders current day picker data\n */\n protected render(): void\n {\n //same month only data change\n if(this.displayedDate && this.displayDate?.isSameMonth(this.displayedDate))\n {\n this.setActive();\n this.updateMinMax();\n\n return;\n }\n\n this.displayedDate = this.displayDate?.value;\n this.periodData = [];\n this.thisMonthData = [];\n\n if(!this.displayDate)\n {\n return;\n }\n\n const currentMonthDate = this.displayDate.value;\n const today = this.dateApi.now().value;\n\n this.displayDate\n .startOfMonth()\n .updateOriginal()\n .startOfWeek();\n\n do\n {\n for(let x = 0; x < 7; x++)\n {\n const day = this.displayDate.dayOfMonth();\n const otherMonth = !this.displayDate.isSameMonth(currentMonthDate);\n\n const data: DayData<TDate> =\n {\n active: false,\n disabled: false,\n date: this.displayDate.value,\n otherMonth: otherMonth,\n today: this.displayDate.isSameDay(today),\n weekend: this.displayDate.isWeekend(),\n day: day,\n dateObj: this.displayDate.clone(),\n };\n\n this.periodData.push(data);\n\n if(!otherMonth)\n {\n this.thisMonthData.push(data);\n }\n\n this.displayDate.addDays(1);\n }\n }\n while(this.displayDate.isSameMonth(currentMonthDate));\n\n this.displayDate.resetOriginal();\n\n this.setActive();\n this.updateMinMax();\n }\n\n //######################### protected methods - overrides #########################\n\n /**\n * @inheritdoc\n */\n protected onRender(): void\n {\n this.render();\n }\n\n /**\n * Tests whether provided value is in same period target value\n * @param val - Tested value\n * @param target - Target value to be tested against\n */\n protected isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean\n {\n return val.isSameDay(target);\n }\n}\n","<div class=\"period\">\r\n <div class=\"fas fa-angle-left clickable\" (mousedown)=\"previousMonth()\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'monthName'}} {{displayDate?.value | dateFormat: 'year'}}</div>\r\n <div class=\"fas fa-angle-right clickable\" (mousedown)=\"nextMonth()\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n @for(weekday of weekdays; track weekday)\r\n {\r\n <div class=\"weekday\">{{weekday}}</div>\r\n }\r\n\r\n @for(day of periodData; track day)\r\n {\r\n <div class=\"period-datum clickable\"\r\n [class.other-month]=\"day.otherMonth\"\r\n [class.today]=\"day.today\"\r\n [class.weekend]=\"day.weekend\"\r\n [class.active]=\"day.active\"\r\n [class.disabled]=\"day.disabled\"\r\n (mousedown)=\"selectDay(day)\">{{day.day}}</div>\r\n }\r\n</div>\r\n\r\n@if(canScaleDown)\r\n{\r\n <div class=\"go-down-button\">\r\n <div [class.clickable]=\"canScaleDown\" (mousedown)=\"displayDate ? scaleDownSubject.next(displayDate.value) : undefined\">{{singleValue?.isValid() ? (singleValue?.value | dateFormat: 'time') : '0:00'}}</div>\r\n </div>\r\n}"]}
|
|
1
|
+
{"version":3,"file":"dayPicker.component.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/components/dayPicker/dayPicker.component.ts","../../../../../../src/modules/dateTimePicker/components/dayPicker/dayPicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAC,MAAM,eAAe,CAAC;AAGjE,OAAO,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAC;AAErE,OAAO,EAAC,eAAe,EAAC,MAAM,oBAAoB,CAAC;;;AAEnD;;GAEG;AAeH,MAAM,OAAO,kBAAoC,SAAQ,wBAA+C;IAgBpG,iEAAiE;IACjE;QAEI,KAAK,EAAE,CAAC;QAjBZ,0EAA0E;QAE1E;;WAEG;QACO,kBAAa,GAAqB,EAAE,CAAC;QAE/C,8FAA8F;QAE9F;;WAEG;QACO,aAAQ,GAAa,EAAE,CAAC;QAO9B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAED,2FAA2F;IAE3F;;;OAGG;IACO,SAAS,CAAC,OAAuB;QAEvC,IAAG,OAAO,CAAC,QAAQ,EACnB,CAAC;YACG,OAAO;QACX,CAAC;QAED,cAAc;QACd,IAAG,CAAC,IAAI,CAAC,MAAM,EACf,CAAC;YACG,uBAAuB;YACvB,IAAG,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,EAC/B,CAAC;gBACG,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC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AC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAClC,CAAC;gBAED,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAChC,CAAC;QACL,CAAC,QACK,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAE;QAEtD,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC;QAEjC,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAED,mFAAmF;IAEnF;;OAEG;IACO,QAAQ;QAEd,IAAI,CAAC,MAAM,EAAE,CAAC;IAClB,CAAC;IAED;;;;OAIG;IACO,YAAY,CAAC,GAAyB,EAAE,MAAa;QAE3D,OAAO,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;8GAhLQ,kBAAkB;kGAAlB,kBAAkB,yJCxB/B,k1CA6BC,2CDTO,eAAe;;2FAIV,kBAAkB;kBAd9B,SAAS;+BAEI,YAAY,QAGtB;wBACI,0BAA0B,EAAE,MAAM;qBACrC,WAED;wBACI,eAAe;qBAClB,mBACgB,uBAAuB,CAAC,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy} from '@angular/core';\n\nimport {DateTimePicker, DayData} from '../../interfaces';\nimport {DateTimePeriodPickerBase} from '../dateTimePeriodPickerBase';\nimport {DateApiObject} from '../../../../services';\nimport {DatePipesModule} from '../../../datePipes';\n\n/**\n * Component used for displaying day picker\n */\n@Component(\n{\n selector: 'day-picker',\n templateUrl: 'dayPicker.component.html',\n host:\n {\n '[class.date-time-period]': 'true',\n },\n imports:\n [\n DatePipesModule,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DayPickerComponent<TDate = unknown> extends DateTimePeriodPickerBase<DayData<TDate>, TDate> implements DateTimePicker<TDate>\n{\n //######################### protected properties #########################\n\n /**\n * Stored this picker month data\n */\n protected thisMonthData: DayData<TDate>[] = [];\n\n //######################### protected properties - template bindings #########################\n\n /**\n * Names of days\n */\n protected weekdays: string[] = [];\n\n //######################### constructor #########################\n constructor()\n {\n super();\n\n this.weekdays = this.dateApi.weekdays(true);\n }\n\n //######################### protected methods - template bindings #########################\n\n /**\n * Selects day as value of date time picker\n * @param dayData - Day data that were selected\n */\n protected selectDay(dayData: DayData<TDate>): void\n {\n if(dayData.disabled)\n {\n return;\n }\n\n //single value\n if(!this.ranged)\n {\n //no value selected yet\n if(!this.singleValue?.isValid())\n {\n this.singleValue = this.displayDate?.clone() ?? this.dateApi.getValue(new Date());\n }\n\n this.singleValue.year(dayData.dateObj.year());\n this.singleValue.month(dayData.dateObj.month());\n this.singleValue.dayOfMonth(dayData.day);\n\n //other month was selected\n if(dayData.otherMonth)\n {\n this.displayDate?.month(dayData.dateObj.month());\n }\n\n this.singleValue.updateOriginal();\n }\n else\n {\n //TODO: range\n }\n\n this.valueChangeSubject.next();\n this.render();\n this.changeDetector.detectChanges();\n }\n\n /**\n * Changes displayed month to next month\n */\n protected nextMonth(): void\n {\n this.displayDate?.addMonths(1).updateOriginal();\n\n this.render();\n }\n\n /**\n * Changes displayed month to previous month\n */\n protected previousMonth(): void\n {\n this.displayDate?.subtractMonths(1).updateOriginal();\n\n this.render();\n }\n\n //######################### protected methods #########################\n\n /**\n * Renders current day picker data\n */\n protected render(): void\n {\n //same month only data change\n if(this.displayedDate && this.displayDate?.isSameMonth(this.displayedDate))\n {\n this.setActive();\n this.updateMinMax();\n\n return;\n }\n\n this.displayedDate = this.displayDate?.value;\n this.periodData = [];\n this.thisMonthData = [];\n\n if(!this.displayDate)\n {\n return;\n }\n\n const currentMonthDate = this.displayDate.value;\n const today = this.dateApi.now().value;\n\n this.displayDate\n .startOfMonth()\n .updateOriginal()\n .startOfWeek();\n\n do\n {\n for(let x = 0; x < 7; x++)\n {\n const day = this.displayDate.dayOfMonth();\n const otherMonth = !this.displayDate.isSameMonth(currentMonthDate);\n\n const data: DayData<TDate> =\n {\n active: false,\n disabled: false,\n date: this.displayDate.value,\n otherMonth: otherMonth,\n today: this.displayDate.isSameDay(today),\n weekend: this.displayDate.isWeekend(),\n day: day,\n dateObj: this.displayDate.clone(),\n };\n\n this.periodData.push(data);\n\n if(!otherMonth)\n {\n this.thisMonthData.push(data);\n }\n\n this.displayDate.addDays(1);\n }\n }\n while(this.displayDate.isSameMonth(currentMonthDate));\n\n this.displayDate.resetOriginal();\n\n this.setActive();\n this.updateMinMax();\n }\n\n //######################### protected methods - overrides #########################\n\n /**\n * @inheritdoc\n */\n protected onRender(): void\n {\n this.render();\n }\n\n /**\n * Tests whether provided value is in same period target value\n * @param val - Tested value\n * @param target - Target value to be tested against\n */\n protected isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean\n {\n return val.isSameDay(target);\n }\n}\n","<div class=\"period\">\r\n <div class=\"fas fa-angle-left clickable\" (mousedown)=\"previousMonth()\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'monthName'}} {{displayDate?.value | dateFormat: 'year'}}</div>\r\n <div class=\"fas fa-angle-right clickable\" (mousedown)=\"nextMonth()\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n @for(weekday of weekdays; track weekday)\r\n {\r\n <div class=\"weekday\">{{weekday}}</div>\r\n }\r\n\r\n @for(day of periodData; track day)\r\n {\r\n <div class=\"period-datum clickable\"\r\n [class.other-month]=\"day.otherMonth\"\r\n [class.today]=\"day.today\"\r\n [class.weekend]=\"day.weekend\"\r\n [class.active]=\"day.active\"\r\n [class.disabled]=\"day.disabled\"\r\n (mousedown)=\"selectDay(day)\">{{day.day}}</div>\r\n }\r\n</div>\r\n\r\n@if(canScaleDown)\r\n{\r\n <div class=\"go-down-button\">\r\n <div [class.clickable]=\"canScaleDown\" (mousedown)=\"displayDate ? scaleDownSubject.next(displayDate.value) : undefined\">{{singleValue?.isValid() ? (singleValue?.value | dateFormat: 'time') : '0:00'}}</div>\r\n </div>\r\n}"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Component, ChangeDetectionStrategy, Inject } from '@angular/core';
|
|
2
2
|
import { DateTimePeriodPickerBase } from '../dateTimePeriodPickerBase';
|
|
3
|
-
import { DatePipesModule } from '../../../datePipes
|
|
3
|
+
import { DatePipesModule } from '../../../datePipes';
|
|
4
4
|
import { FORMAT_PROVIDER } from '../../../../misc/tokens';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "../../../../pipes/dateFormat.pipe";
|
|
6
|
+
import * as i1 from "../../../../pipes/dateFormat/dateFormat.pipe";
|
|
7
7
|
/**
|
|
8
8
|
* Component used for displaying month picker
|
|
9
9
|
*/
|
package/es2022/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monthPicker.component.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/components/monthPicker/monthPicker.component.ts","../../../../../../src/modules/dateTimePicker/components/monthPicker/monthPicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AAGzE,OAAO,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAC,eAAe,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"monthPicker.component.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/components/monthPicker/monthPicker.component.ts","../../../../../../src/modules/dateTimePicker/components/monthPicker/monthPicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AAGzE,OAAO,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAC,eAAe,EAAC,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EA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EnF;;OAEG;IACO,QAAQ;QAEd,IAAI,CAAC,MAAM,EAAE,CAAC;IAClB,CAAC;IAED;;;;OAIG;IACO,YAAY,CAAC,GAAyB,EAAE,MAAa;QAE3D,OAAO,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;8GAhIQ,oBAAoB,kBAGT,eAAe;kGAH1B,oBAAoB,2JC1BjC,yzBAcM,2CDQE,eAAe;;2FAIV,oBAAoB;kBAdhC,SAAS;+BAEI,cAAc,QAGxB;wBACI,0BAA0B,EAAE,MAAM;qBACrC,WAED;wBACI,eAAe;qBAClB,mBACgB,uBAAuB,CAAC,MAAM;;0BAKlC,MAAM;2BAAC,eAAe","sourcesContent":["import {Component, ChangeDetectionStrategy, Inject} from '@angular/core';\n\nimport {DateTimePicker, MonthData} from '../../interfaces';\nimport {DateTimePeriodPickerBase} from '../dateTimePeriodPickerBase';\nimport {DatePipesModule} from '../../../datePipes';\nimport {DateApiObject} from '../../../../services';\nimport {FORMAT_PROVIDER} from '../../../../misc/tokens';\nimport {FormatProvider} from '../../../../interfaces';\n\n/**\n * Component used for displaying month picker\n */\n@Component(\n{\n selector: 'month-picker',\n templateUrl: 'monthPicker.component.html',\n host:\n {\n '[class.date-time-period]': 'true',\n },\n imports:\n [\n DatePipesModule,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MonthPickerComponent<TDate = unknown> extends DateTimePeriodPickerBase<MonthData<TDate>, TDate> implements DateTimePicker<TDate>\n{\n //######################### constructor #########################\n constructor(@Inject(FORMAT_PROVIDER) protected formatProvider: FormatProvider,)\n {\n super();\n }\n\n //######################### protected methods - template bindings #########################\n\n /**\n * Selects month as value of day time picker\n * @param monthData - Month data that were selected\n */\n protected selectMonth(monthData: MonthData<TDate>): void\n {\n if(monthData.disabled)\n {\n return;\n }\n\n //single value\n if(!this.ranged)\n {\n //no value selected yet\n if(!this.singleValue?.isValid())\n {\n this.singleValue = this.displayDate?.clone() ?? this.dateApi.getValue(new Date());\n }\n\n this.singleValue.year(monthData.dateObj.year());\n this.singleValue.month(monthData.dateObj.month());\n this.singleValue.updateOriginal();\n }\n else\n {\n //TODO: range\n }\n\n this.valueChangeSubject.next();\n this.render();\n this.changeDetector.detectChanges();\n }\n\n /**\n * Changes displayed year to next year\n */\n protected nextYear(): void\n {\n this.displayDate?.addYears(1).updateOriginal();\n\n this.render();\n }\n\n /**\n * Changes displayed year to previous year\n */\n protected previousYear(): void\n {\n this.displayDate?.subtractYears(1).updateOriginal();\n\n this.render();\n }\n\n //######################### protected methods #########################\n\n /**\n * Renders current day picker data\n */\n protected render(): void\n {\n //same year only data change\n if(this.displayedDate && this.displayDate?.isSameYear(this.displayedDate))\n {\n this.setActive();\n this.updateMinMax();\n\n return;\n }\n\n this.displayedDate = this.displayDate?.value;\n this.periodData = [];\n\n if(!this.displayDate)\n {\n return;\n }\n\n const monthOfYear = this.displayDate.startOfYear().updateOriginal();\n\n for(let x = 0; x < 12; x++)\n {\n this.periodData.push(\n {\n active: false,\n disabled: false,\n date: monthOfYear.value,\n name: monthOfYear.format(this.dateApi.getFormat(this.formatProvider.monthNameShort)),\n dateObj: monthOfYear.clone(),\n });\n\n monthOfYear.addMonths(1);\n }\n\n this.displayDate.resetOriginal();\n\n this.setActive();\n this.updateMinMax();\n }\n\n //######################### protected methods - overrides #########################\n\n /**\n * @inheritdoc\n */\n protected onRender(): void\n {\n this.render();\n }\n\n /**\n * Tests whether provided value is in same period target value\n * @param val - Tested value\n * @param target - Target value to be tested against\n */\n protected isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean\n {\n return val.isSameMonth(target);\n }\n}\n","<div class=\"period\">\r\n <div class=\"fas fa-angle-left clickable\" (mousedown)=\"previousYear()\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'year'}}</div>\r\n <div class=\"fas fa-angle-right clickable\" (mousedown)=\"nextYear()\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n @for(month of periodData; track month)\r\n {\r\n <div class=\"period-datum clickable\"\r\n [class.active]=\"month.active\"\r\n [class.disabled]=\"month.disabled\"\r\n (mousedown)=\"canScaleDown && displayDate ? scaleDownSubject.next(month.dateObj.value) : selectMonth(month)\">{{month.name}}</div>\r\n }\r\n</div>"]}
|
package/es2022/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
2
2
|
import { SlicePipe } from '@angular/common';
|
|
3
3
|
import { ClickOutsideDirective } from '@anglr/common';
|
|
4
|
-
import { DatePipesModule } from '../../../datePipes
|
|
4
|
+
import { DatePipesModule } from '../../../datePipes';
|
|
5
5
|
import { hours, minutes } from './rollerTimePicker.data';
|
|
6
6
|
import { DateTimePeriodPickerBase } from '../dateTimePeriodPickerBase';
|
|
7
7
|
import { LoopScrollDataDirective, LoopScrollDirective } from '../../directives';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "../../../../pipes/dateFormat.pipe";
|
|
9
|
+
import * as i1 from "../../../../pipes/dateFormat/dateFormat.pipe";
|
|
10
10
|
/**
|
|
11
11
|
* Component used for rendering roller time picker
|
|
12
12
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollerTimePicker.component.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.ts","../../../../../../src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAC,MAAM,eAAe,CAAC;AACjE,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAC,qBAAqB,EAAC,MAAM,eAAe,CAAC;AAEpD,OAAO,EA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kGAAzB,yBAAyB,iKC/BtC,ypGA+EA,uCDxDQ,SAAS,6CACT,eAAe,8FACf,qBAAqB,6IACrB,uBAAuB,kGACvB,mBAAmB;;2FAId,yBAAyB;kBAlBrC,SAAS;+BAEI,oBAAoB,QAG9B;wBACI,0BAA0B,EAAE,MAAM;qBACrC,WAED;wBACI,SAAS;wBACT,eAAe;wBACf,qBAAqB;wBACrB,uBAAuB;wBACvB,mBAAmB;qBACtB,mBACgB,uBAAuB,CAAC,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy} from '@angular/core';\nimport {SlicePipe} from '@angular/common';\nimport {ClickOutsideDirective} from '@anglr/common';\n\nimport {DatePipesModule} from '../../../datePipes.module';\nimport {hours, minutes} from './rollerTimePicker.data';\nimport {DateTimePicker, PeriodData} from '../../interfaces';\nimport {DateTimePeriodPickerBase} from '../dateTimePeriodPickerBase';\nimport {LoopScrollData, LoopScrollDataDirective, LoopScrollDirective} from '../../directives';\n\n/**\n * Component used for rendering roller time picker\n */\n@Component(\n{\n selector: 'roller-time-picker',\n templateUrl: 'rollerTimePicker.component.html',\n host:\n {\n '[class.date-time-period]': 'true',\n },\n imports:\n [\n SlicePipe,\n DatePipesModule,\n ClickOutsideDirective,\n LoopScrollDataDirective,\n LoopScrollDirective,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class RollerTimePickerComponent<TDate = unknown> extends DateTimePeriodPickerBase<PeriodData<TDate>, TDate> implements DateTimePicker<TDate>\n{\n //######################### protected properties - template bindings #########################\n\n /**\n * Array of available hours\n */\n protected hours: LoopScrollData[] = hours;\n\n /**\n * Array of available minutes\n */\n protected minutes: LoopScrollData[] = minutes;\n\n /**\n * Indication whether are minutes open\n */\n protected minutesOpen: boolean = false;\n\n /**\n * Indication whether are hours open\n */\n protected hoursOpen: boolean = false;\n\n /**\n * Current value of hour\n */\n protected get hour(): number\n {\n return this.singleValue?.hour() ?? 0;\n }\n protected set hour(value: number)\n {\n //no value selected yet\n if(!this.singleValue?.isValid())\n {\n this.singleValue = this.displayDate?.clone() ?? this.dateApi.getValue(new Date());\n }\n\n this.singleValue?.hour(value);\n }\n\n /**\n * Current value of minute\n */\n protected get minute(): number\n {\n return this.singleValue?.minute() ?? 0;\n }\n protected set minute(value: number)\n {\n //no value selected yet\n if(!this.singleValue?.isValid())\n {\n this.singleValue = this.displayDate?.clone() ?? this.dateApi.getValue(new Date());\n }\n\n this.singleValue?.minute(value);\n }\n\n //######################### protected methods - template bindings #########################\n\n /**\n * Sets hour\n * @param event - Mouse event that was triggered\n * @param value - Value to be set as hour\n */\n protected setHour<TData = unknown>(event: MouseEvent|null, value: TData): void\n {\n if(!this.hoursOpen && event)\n {\n return;\n }\n\n if(this.hour == value as unknown as number)\n {\n this.hoursOpen = false;\n\n return;\n }\n\n this.hour = value as unknown as number;\n\n if(event)\n {\n this.hoursOpen = false;\n }\n\n this.singleValue?.updateOriginal();\n this.valueChangeSubject.next();\n }\n\n /**\n * Sets minute\n * @param event - Mouse event that was triggered\n * @param value - Value to be set as minute\n * @returns\n */\n protected setMinute<TData = unknown>(event: MouseEvent|null, value: TData): void\n {\n if(!this.minutesOpen && event)\n {\n return;\n }\n\n if(this.minute == value as unknown as number)\n {\n return;\n }\n\n this.minute = value as unknown as number;\n\n if(event)\n {\n this.minutesOpen = false;\n }\n\n this.singleValue?.updateOriginal();\n this.valueChangeSubject.next();\n }\n\n //######################### protected methods - overrides #########################\n\n /**\n * @inheritdoc\n */\n protected onRender(): void\n {\n }\n\n /**\n * Tests whether provided value is in same period target value\n */\n protected isSamePeriod(): boolean\n {\n return false;\n }\n}\n","<div class=\"date-time-flex-row\" style=\"justify-content: center;\">\n <div [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'date'}}</div>\n</div>\n\n<div class=\"time-area\">\n <div class=\"value-container\"\n [clickOutside]=\"true\"\n (clickOutsideChange)=\"hoursOpen = false\"\n [clickOutsideElement]=\"hoursScroll\">\n <div #hoursScroll\n class=\"roller-scroll\"\n [class.open]=\"hoursOpen\"\n [loopScroll]=\"hour\"\n [open]=\"hoursOpen\"\n (loopScrollChange)=\"setHour(null, $event)\"\n (mousedown)=\"hoursOpen = !hoursOpen\">\n @for(hour of hours | slice: -14; track hour)\n {\n <div [loopScrollData]=\"hour?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n }\n\n @for(hour of hours; track hour)\n {\n <div [loopScrollData]=\"hour?.data\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n }\n\n @for(hour of hours | slice: 0: 14; track hour)\n {\n <div [loopScrollData]=\"hour?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n }\n </div>\n </div>\n\n <div class=\"minute-second-separator\">:</div>\n\n <div class=\"value-container\"\n [clickOutside]=\"true\"\n (clickOutsideChange)=\"minutesOpen = false\"\n [clickOutsideElement]=\"minutesScroll\">\n <div #minutesScroll\n class=\"roller-scroll\"\n [class.open]=\"minutesOpen\"\n [loopScroll]=\"minute\"\n [open]=\"minutesOpen\"\n (loopScrollChange)=\"setMinute(null, $event)\"\n (mousedown)=\"minutesOpen = !minutesOpen\">\n @for(minute of minutes | slice: -14; track minute)\n {\n <div [loopScrollData]=\"minute?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n }\n\n @for(minute of minutes; track minute)\n {\n <div [loopScrollData]=\"minute?.data\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n }\n\n @for(minute of minutes | slice: 0: 14; track minute)\n {\n <div [loopScrollData]=\"minute?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n }\n </div>\n </div>\n</div>\n"]}
|
|
1
|
+
{"version":3,"file":"rollerTimePicker.component.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.ts","../../../../../../src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAC,MAAM,eAAe,CAAC;AACjE,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAC,qBAAqB,EAAC,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAC,eAAe,EAAC,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAC,KAAK,EAAE,OAAO,EAAC,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAiB,uBAAuB,EAAE,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;;;AAE9F;;GAEG;AAmBH,MAAM,OAAO,yBAA2C,SAAQ,wBAAkD;IAlBlH;;QAoBI,8FAA8F;QAE9F;;WAEG;QACO,UAAK,GAAqB,KAAK,CAAC;QAE1C;;WAEG;QACO,YAAO,GAAqB,OAAO,CAAC;QAE9C;;WAEG;QACO,gBAAW,GAAY,KAAK,CAAC;QAEvC;;WAEG;QACO,cAAS,GAAY,KAAK,CAAC;KAmHxC;IAjHG;;OAEG;IACH,IAAc,IAAI;QAEd,OAAO,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACzC,CAAC;IACD,IAAc,IAAI,CAAC,KAAa;QAE5B,uBAAuB;QACvB,IAAG,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,EAC/B,CAAC;YACG,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,IA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,EAC5C,CAAC;YACG,OAAO;QACX,CAAC;QAED,IAAI,CAAC,MAAM,GAAG,KAA0B,CAAC;QAEzC,IAAG,KAAK,EACR,CAAC;YACG,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QAC7B,CAAC;QAED,IAAI,CAAC,WAAW,EAAE,cAAc,EAAE,CAAC;QACnC,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC;IACnC,CAAC;IAED,mFAAmF;IAEnF;;OAEG;IACO,QAAQ;IAElB,CAAC;IAED;;OAEG;IACO,YAAY;QAElB,OAAO,KAAK,CAAC;IACjB,CAAC;8GAxIQ,yBAAyB;kGAAzB,yBAAyB,iKC/BtC,ypGA+EA,uCDxDQ,SAAS,6CACT,eAAe,8FACf,qBAAqB,6IACrB,uBAAuB,kGACvB,mBAAmB;;2FAId,yBAAyB;kBAlBrC,SAAS;+BAEI,oBAAoB,QAG9B;wBACI,0BAA0B,EAAE,MAAM;qBACrC,WAED;wBACI,SAAS;wBACT,eAAe;wBACf,qBAAqB;wBACrB,uBAAuB;wBACvB,mBAAmB;qBACtB,mBACgB,uBAAuB,CAAC,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy} from '@angular/core';\nimport {SlicePipe} from '@angular/common';\nimport {ClickOutsideDirective} from '@anglr/common';\n\nimport {DatePipesModule} from '../../../datePipes';\nimport {hours, minutes} from './rollerTimePicker.data';\nimport {DateTimePicker, PeriodData} from '../../interfaces';\nimport {DateTimePeriodPickerBase} from '../dateTimePeriodPickerBase';\nimport {LoopScrollData, LoopScrollDataDirective, LoopScrollDirective} from '../../directives';\n\n/**\n * Component used for rendering roller time picker\n */\n@Component(\n{\n selector: 'roller-time-picker',\n templateUrl: 'rollerTimePicker.component.html',\n host:\n {\n '[class.date-time-period]': 'true',\n },\n imports:\n [\n SlicePipe,\n DatePipesModule,\n ClickOutsideDirective,\n LoopScrollDataDirective,\n LoopScrollDirective,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class RollerTimePickerComponent<TDate = unknown> extends DateTimePeriodPickerBase<PeriodData<TDate>, TDate> implements DateTimePicker<TDate>\n{\n //######################### protected properties - template bindings #########################\n\n /**\n * Array of available hours\n */\n protected hours: LoopScrollData[] = hours;\n\n /**\n * Array of available minutes\n */\n protected minutes: LoopScrollData[] = minutes;\n\n /**\n * Indication whether are minutes open\n */\n protected minutesOpen: boolean = false;\n\n /**\n * Indication whether are hours open\n */\n protected hoursOpen: boolean = false;\n\n /**\n * Current value of hour\n */\n protected get hour(): number\n {\n return this.singleValue?.hour() ?? 0;\n }\n protected set hour(value: number)\n {\n //no value selected yet\n if(!this.singleValue?.isValid())\n {\n this.singleValue = this.displayDate?.clone() ?? this.dateApi.getValue(new Date());\n }\n\n this.singleValue?.hour(value);\n }\n\n /**\n * Current value of minute\n */\n protected get minute(): number\n {\n return this.singleValue?.minute() ?? 0;\n }\n protected set minute(value: number)\n {\n //no value selected yet\n if(!this.singleValue?.isValid())\n {\n this.singleValue = this.displayDate?.clone() ?? this.dateApi.getValue(new Date());\n }\n\n this.singleValue?.minute(value);\n }\n\n //######################### protected methods - template bindings #########################\n\n /**\n * Sets hour\n * @param event - Mouse event that was triggered\n * @param value - Value to be set as hour\n */\n protected setHour<TData = unknown>(event: MouseEvent|null, value: TData): void\n {\n if(!this.hoursOpen && event)\n {\n return;\n }\n\n if(this.hour == value as unknown as number)\n {\n this.hoursOpen = false;\n\n return;\n }\n\n this.hour = value as unknown as number;\n\n if(event)\n {\n this.hoursOpen = false;\n }\n\n this.singleValue?.updateOriginal();\n this.valueChangeSubject.next();\n }\n\n /**\n * Sets minute\n * @param event - Mouse event that was triggered\n * @param value - Value to be set as minute\n * @returns\n */\n protected setMinute<TData = unknown>(event: MouseEvent|null, value: TData): void\n {\n if(!this.minutesOpen && event)\n {\n return;\n }\n\n if(this.minute == value as unknown as number)\n {\n return;\n }\n\n this.minute = value as unknown as number;\n\n if(event)\n {\n this.minutesOpen = false;\n }\n\n this.singleValue?.updateOriginal();\n this.valueChangeSubject.next();\n }\n\n //######################### protected methods - overrides #########################\n\n /**\n * @inheritdoc\n */\n protected onRender(): void\n {\n }\n\n /**\n * Tests whether provided value is in same period target value\n */\n protected isSamePeriod(): boolean\n {\n return false;\n }\n}\n","<div class=\"date-time-flex-row\" style=\"justify-content: center;\">\n <div [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'date'}}</div>\n</div>\n\n<div class=\"time-area\">\n <div class=\"value-container\"\n [clickOutside]=\"true\"\n (clickOutsideChange)=\"hoursOpen = false\"\n [clickOutsideElement]=\"hoursScroll\">\n <div #hoursScroll\n class=\"roller-scroll\"\n [class.open]=\"hoursOpen\"\n [loopScroll]=\"hour\"\n [open]=\"hoursOpen\"\n (loopScrollChange)=\"setHour(null, $event)\"\n (mousedown)=\"hoursOpen = !hoursOpen\">\n @for(hour of hours | slice: -14; track hour)\n {\n <div [loopScrollData]=\"hour?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n }\n\n @for(hour of hours; track hour)\n {\n <div [loopScrollData]=\"hour?.data\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n }\n\n @for(hour of hours | slice: 0: 14; track hour)\n {\n <div [loopScrollData]=\"hour?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n }\n </div>\n </div>\n\n <div class=\"minute-second-separator\">:</div>\n\n <div class=\"value-container\"\n [clickOutside]=\"true\"\n (clickOutsideChange)=\"minutesOpen = false\"\n [clickOutsideElement]=\"minutesScroll\">\n <div #minutesScroll\n class=\"roller-scroll\"\n [class.open]=\"minutesOpen\"\n [loopScroll]=\"minute\"\n [open]=\"minutesOpen\"\n (loopScrollChange)=\"setMinute(null, $event)\"\n (mousedown)=\"minutesOpen = !minutesOpen\">\n @for(minute of minutes | slice: -14; track minute)\n {\n <div [loopScrollData]=\"minute?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n }\n\n @for(minute of minutes; track minute)\n {\n <div [loopScrollData]=\"minute?.data\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n }\n\n @for(minute of minutes | slice: 0: 14; track minute)\n {\n <div [loopScrollData]=\"minute?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n }\n </div>\n </div>\n</div>\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
2
2
|
import { DateTimePeriodPickerBase } from '../dateTimePeriodPickerBase';
|
|
3
|
-
import { DatePipesModule } from '../../../datePipes
|
|
3
|
+
import { DatePipesModule } from '../../../datePipes';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
/**
|
|
6
6
|
* Component used for displaying year picker
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yearPicker.component.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/components/yearPicker/yearPicker.component.ts","../../../../../../src/modules/dateTimePicker/components/yearPicker/yearPicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAC,MAAM,eAAe,CAAC;AAGjE,OAAO,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAC,eAAe,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"yearPicker.component.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/components/yearPicker/yearPicker.component.ts","../../../../../../src/modules/dateTimePicker/components/yearPicker/yearPicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE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EAAE,CAAC;QACjC,IAAI,CAAC,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC;QAE7E,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAED,mFAAmF;IAEnF;;OAEG;IACO,QAAQ;QAEd,IAAI,CAAC,MAAM,EAAE,CAAC;IAClB,CAAC;IAED;;;;OAIG;IACO,YAAY,CAAC,GAAyB,EAAE,MAAa;QAE3D,OAAO,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;8GAzIQ,mBAAmB;kGAAnB,mBAAmB,0JCxBhC,qxBAcM,2CDME,eAAe;;2FAIV,mBAAmB;kBAd/B,SAAS;+BAEI,aAAa,QAGvB;wBACI,0BAA0B,EAAE,MAAM;qBACrC,WAED;wBACI,eAAe;qBAClB,mBACgB,uBAAuB,CAAC,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy} from '@angular/core';\n\nimport {DateTimePicker, YearData} from '../../interfaces';\nimport {DateTimePeriodPickerBase} from '../dateTimePeriodPickerBase';\nimport {DatePipesModule} from '../../../datePipes';\nimport {DateApiObject} from '../../../../services';\n\n/**\n * Component used for displaying year picker\n */\n@Component(\n{\n selector: 'year-picker',\n templateUrl: 'yearPicker.component.html',\n host:\n {\n '[class.date-time-period]': 'true',\n },\n imports:\n [\n DatePipesModule,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class YearPickerComponent<TDate = unknown> extends DateTimePeriodPickerBase<YearData<TDate>, TDate> implements DateTimePicker<TDate>\n{\n //######################### protected properties - template bindings #########################\n\n /**\n * Displayed decade period\n */\n protected period: string = '';\n\n //######################### protected methods - template bindings #########################\n\n /**\n * Selects year as value of day time picker\n * @param yearData - Year data that were selected\n */\n protected selectYear(yearData: YearData<TDate>): void\n {\n if(yearData.disabled)\n {\n return;\n }\n\n //single value\n if(!this.ranged)\n {\n //no value selected yet\n if(!this.singleValue?.isValid())\n {\n this.singleValue = this.displayDate?.clone() ?? this.dateApi.getValue(new Date());\n }\n\n this.singleValue.year(yearData.dateObj.year());\n this.singleValue.updateOriginal();\n }\n else\n {\n //TODO: range\n }\n \n this.valueChangeSubject.next();\n this.render();\n this.changeDetector.detectChanges();\n }\n\n /**\n * Changes displayed decade to next decade\n */\n public nextDecade(): void\n {\n this.displayDate?.addYears(10).updateOriginal();\n\n this.render();\n }\n\n /**\n * Changes displayed decade to previous decade\n */\n public previousDecade(): void\n {\n this.displayDate?.subtractYears(10).updateOriginal();\n\n this.render();\n }\n\n //######################### protected methods #########################\n\n /**\n * Renders current day picker data\n */\n protected render(): void\n {\n //same decade only data change\n if(this.displayedDate && this.displayDate?.isSameDecade(this.displayedDate))\n {\n this.setActive();\n this.updateMinMax();\n\n return;\n }\n\n this.displayedDate = this.displayDate?.value;\n this.periodData = [];\n\n if(!this.displayDate)\n {\n return;\n }\n\n let year = this.displayDate.startOfYear().year();\n\n while(year % 10 !== 0)\n {\n year--;\n }\n\n this.displayDate.year(year).updateOriginal();\n\n for(let x = 0; x < 10; x++)\n {\n this.periodData.push(\n {\n active: false,\n disabled: false,\n date: this.displayDate.value,\n value: year,\n dateObj: this.displayDate.clone(),\n });\n\n year++;\n this.displayDate.addYears(1);\n }\n\n this.displayDate.resetOriginal();\n this.period = `${this.displayDate.year()} - ${this.displayDate.year() + 10}`;\n\n this.setActive();\n this.updateMinMax();\n }\n\n //######################### protected methods - overrides #########################\n\n /**\n * @inheritdoc\n */\n protected onRender(): void\n {\n this.render();\n }\n\n /**\n * Tests whether provided value is in same period target value\n * @param val - Tested value\n * @param target - Target value to be tested against\n */\n protected isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean\n {\n return val.isSameYear(target);\n }\n}\n","<div class=\"period\">\r\n <div class=\"fas fa-angle-left clickable\" (mousedown)=\"previousDecade()\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{period}}</div>\r\n <div class=\"fas fa-angle-right clickable\" (mousedown)=\"nextDecade()\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n @for(year of periodData; track year)\r\n {\r\n <div class=\"period-datum clickable\"\r\n [class.active]=\"year.active\"\r\n [class.disabled]=\"year.disabled\"\r\n (mousedown)=\"canScaleDown && displayDate ? scaleDownSubject.next(year.dateObj.value) : selectYear(year)\">{{year.value}}</div>\r\n }\r\n</div>"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './calendar';\nexport * from './datePipes';\nexport * from './dateTime';\nexport * from './dateTimePicker';\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Inject, Pipe } from '@angular/core';
|
|
2
2
|
import { isBlank } from '@jscrpt/common';
|
|
3
|
-
import { DATE_API } from '
|
|
3
|
+
import { DATE_API } from '../../misc/tokens';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
/**
|
|
6
6
|
* Pipe that is used for converting date
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dateConvert.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/dateConvert/dateConvert.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,IAAI,EAAgB,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;;AAG3C;;GAEG;AAEH,MAAM,OAAO,eAAe;IAExB,kEAAkE;IAClE,YAAsC,QAAwB;QAAxB,aAAQ,GAAR,QAAQ,CAAgB;IAE9D,CAAC;IAED,sGAAsG;IAEtG;;;;OAIG;IACI,SAAS,CAAC,KAAqC,EAAE,WAAoB;QAExE,IAAG,OAAO,CAAC,KAAK,CAAC,EACjB,CAAC;YACG,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAE3D,IAAG,OAAO,CAAC,OAAO,EAAE,EACpB,CAAC;YACG,OAAO,OAAO,CAAC;QACnB,CAAC;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;8GA7BQ,eAAe,kBAGJ,QAAQ;4GAHnB,eAAe;;2FAAf,eAAe;kBAD3B,IAAI;mBAAC,EAAC,IAAI,EAAE,aAAa,EAAC;;0BAIV,MAAM;2BAAC,QAAQ","sourcesContent":["import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {isBlank} from '@jscrpt/common';\n\nimport {DATE_API} from '../../misc/tokens';\nimport {DateApi, DateApiObject, DateValue} from '../../services';\n\n/**\n * Pipe that is used for converting date\n */\n@Pipe({name: 'dateConvert'})\nexport class DateConvertPipe<TDate = unknown> implements PipeTransform\n{\n //######################### constructors #########################\n constructor(@Inject(DATE_API) private _dateApi: DateApi<TDate>)\n {\n }\n\n //######################### public methods - implementation of PipeTransform #########################\n\n /**\n * Transforms value into date object\n * @param value - value to be transformed\n * @param parseFormat - format used for parsing string date\n */\n public transform(value: TDate|DateValue|undefined|null, parseFormat?: string): DateApiObject<TDate>|null\n {\n if(isBlank(value))\n {\n return null;\n }\n\n const dateObj = this._dateApi.getValue(value, parseFormat);\n\n if(dateObj.isValid())\n {\n return dateObj;\n }\n\n return null;\n }\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Inject, Pipe } from '@angular/core';
|
|
2
2
|
import { isBlank, isString, nameof } from '@jscrpt/common';
|
|
3
|
-
import { DATE_API, FORMAT_PROVIDER } from '
|
|
3
|
+
import { DATE_API, FORMAT_PROVIDER } from '../../misc/tokens';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
/**
|
|
6
6
|
* Pipe that is used for formatting date
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dateFormat.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/dateFormat/dateFormat.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,IAAI,EAAgB,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAGzD,OAAO,EAAC,QAAQ,EAAE,eAAe,EAAC,MAAM,mBAAmB,CAAC;;AAG5D;;GAEG;AAEH,MAAM,OAAO,cAAc;IAEvB,kEAAkE;IAClE,YAA6C,eAA+B,EACtC,QAAwB;QADjB,oBAAe,GAAf,eAAe,CAAgB;QACtC,aAAQ,GAAR,QAAQ,CAAgB;IAE9D,CAAC;IAqCM,SAAS,CAAC,KAAqC,EAAE,SAAsC,MAAM,CAAiB,MAAM,CAAC,EAAE,yBAA0C,EAAE,aAAuB;QAE7L,IAAG,OAAO,CAAC,KAAK,CAAC,EACjB,CAAC;YACG,OAAO,EAAE,CAAC;QACd,CAAC;QAED,MAAM,WAAW,GAAqB,QAAQ,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,SAAS,CAAC;QAElH,uBAAuB;QACvB,IAAG,MAAM,IAAI,IAAI,CAAC,eAAe,EACjC,CAAC;YACG,MAAM,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAA8B,CAAC,CAAC;QACpE,CAAC;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAE3D,IAAG,OAAO,CAAC,OAAO,EAAE,EACpB,CAAC;YACG,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;QAC3D,CAAC;QAED,OAAO,EAAE,CAAC;IACd,CAAC;8GAlEQ,cAAc,kBAGH,eAAe,aACf,QAAQ;4GAJnB,cAAc;;2FAAd,cAAc;kBAD1B,IAAI;mBAAC,EAAC,IAAI,EAAE,YAAY,EAAC;;0BAIT,MAAM;2BAAC,eAAe;;0BACtB,MAAM;2BAAC,QAAQ","sourcesContent":["import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {isBlank, isString, nameof} from '@jscrpt/common';\n\nimport {FormatProvider} from '../../interfaces';\nimport {DATE_API, FORMAT_PROVIDER} from '../../misc/tokens';\nimport {DateApi, DateValue} from '../../services';\n\n/**\n * Pipe that is used for formatting date\n */\n@Pipe({name: 'dateFormat'})\nexport class DateFormatPipe<TDate = unknown> implements PipeTransform\n{\n //######################### constructors #########################\n constructor(@Inject(FORMAT_PROVIDER) private _formatProvider: FormatProvider,\n @Inject(DATE_API) private _dateApi: DateApi<TDate>)\n {\n }\n\n //######################### public methods - implementation of PipeTransform #########################\n\n /**\n * Formats provided date into formatted string, with default format 'date'\n * @param value - value to be transformed\n */\n public transform(value: TDate|DateValue|undefined|null): string;\n /**\n * Formats provided date into formatted string\n * @param value - value to be transformed\n * @param format - predefined format that is used for formatting, one of 'FormatProvider' keys\n */\n public transform(value: TDate|DateValue|undefined|null, format: keyof FormatProvider): string;\n /**\n * Formats provided date into formatted string\n * @param value - value to be transformed\n * @param format - predefined format that is used for formatting, one of 'FormatProvider' keys\n * @param parseFormat - format used for parsing string date\n */\n public transform(value: TDate|DateValue|undefined|null, format: keyof FormatProvider, parseFormat: string): string;\n /**\n * Formats provided date into formatted string\n * @param value - value to be transformed\n * @param format - format that is used for formatting\n * @param customFormat - indication that custom format is used\n */\n public transform(value: TDate|DateValue|undefined|null, format: string, customFormat: true): string;\n /**\n * Formats provided date into formatted string\n * @param value - value to be transformed\n * @param format - format that is used for formatting\n * @param parseFormat - format used for parsing string date\n * @param customFormat - indication that custom format is used\n */\n public transform(value: TDate|DateValue|undefined|null, format: string, parseFormat: string, customFormat: true): string;\n public transform(value: TDate|DateValue|undefined|null, format: string|keyof FormatProvider = nameof<FormatProvider>('date'), parseFormatOrCustomFormat?: string|boolean, _customFormat?: boolean): string\n {\n if(isBlank(value))\n {\n return '';\n }\n\n const parseFormat: string|undefined = isString(parseFormatOrCustomFormat) ? parseFormatOrCustomFormat : undefined;\n\n //format provider value\n if(format in this._formatProvider)\n {\n format = (this._formatProvider)[format as keyof FormatProvider];\n }\n\n const dateObj = this._dateApi.getValue(value, parseFormat);\n\n if(dateObj.isValid())\n {\n return dateObj.format(this._dateApi.getFormat(format));\n }\n\n return '';\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pipes/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC","sourcesContent":["export * from './dateConvert/dateConvert.pipe';\nexport * from './dateFormat/dateFormat.pipe';\nexport * from './isAfter/isAfter.pipe';\nexport * from './isBefore/isBefore.pipe';\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Inject, Pipe } from '@angular/core';
|
|
2
|
+
import { DATE_API } from '../../misc/tokens';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Tests whether is provided date after tested date
|
|
6
|
+
*/
|
|
7
|
+
export class IsAfterPipe {
|
|
8
|
+
//######################### constructor #########################
|
|
9
|
+
constructor(dateApi) {
|
|
10
|
+
this.dateApi = dateApi;
|
|
11
|
+
}
|
|
12
|
+
//######################### public methods - implementation of PipeTransform #########################
|
|
13
|
+
/**
|
|
14
|
+
* Tests whether is provided date after tested date
|
|
15
|
+
* @param value - Provided date to be tested whether is after
|
|
16
|
+
* @param tested - Date to be tested against
|
|
17
|
+
*/
|
|
18
|
+
transform(value, tested) {
|
|
19
|
+
if (value && tested) {
|
|
20
|
+
const dateValue = this.dateApi.getValue(value);
|
|
21
|
+
const dateTested = this.dateApi.getValue(tested);
|
|
22
|
+
if (dateValue.isAfter(dateTested)) {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: IsAfterPipe, deps: [{ token: DATE_API }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
29
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.0", ngImport: i0, type: IsAfterPipe, isStandalone: true, name: "isAfter" }); }
|
|
30
|
+
}
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: IsAfterPipe, decorators: [{
|
|
32
|
+
type: Pipe,
|
|
33
|
+
args: [{ name: 'isAfter' }]
|
|
34
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
35
|
+
type: Inject,
|
|
36
|
+
args: [DATE_API]
|
|
37
|
+
}] }] });
|
|
38
|
+
//# sourceMappingURL=isAfter.pipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isAfter.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/isAfter/isAfter.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,IAAI,EAAgB,MAAM,eAAe,CAAC;AAG1D,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;;AAE3C;;GAEG;AAEH,MAAM,OAAO,WAAW;IAEpB,iEAAiE;IACjE,YAAwC,OAAuB;QAAvB,YAAO,GAAP,OAAO,CAAgB;IAE/D,CAAC;IAED,sGAAsG;IAEtG;;;;OAIG;IACI,SAAS,CAAC,KAAqC,EAAE,MAAsC;QAE1F,IAAG,KAAK,IAAI,MAAM,EAClB,CAAC;YACG,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YAC/C,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAEjD,IAAG,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,EAChC,CAAC;gBACG,OAAO,IAAI,CAAC;YAChB,CAAC;QACL,CAAC;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;8GA5BQ,WAAW,kBAGA,QAAQ;4GAHnB,WAAW;;2FAAX,WAAW;kBADvB,IAAI;mBAAC,EAAC,IAAI,EAAE,SAAS,EAAC;;0BAIN,MAAM;2BAAC,QAAQ","sourcesContent":["import {Inject, Pipe, PipeTransform} from '@angular/core';\n\nimport {DateApi, DateValue} from '../../services';\nimport {DATE_API} from '../../misc/tokens';\n\n/**\n * Tests whether is provided date after tested date\n */\n@Pipe({name: 'isAfter'})\nexport class IsAfterPipe<TDate = unknown> implements PipeTransform\n{\n //######################### constructor #########################\n constructor(@Inject(DATE_API) protected dateApi: DateApi<TDate>)\n {\n }\n\n //######################### public methods - implementation of PipeTransform #########################\n\n /**\n * Tests whether is provided date after tested date\n * @param value - Provided date to be tested whether is after\n * @param tested - Date to be tested against\n */\n public transform(value: TDate|DateValue|undefined|null, tested: TDate|DateValue|undefined|null): boolean\n {\n if(value && tested)\n {\n const dateValue = this.dateApi.getValue(value);\n const dateTested = this.dateApi.getValue(tested);\n\n if(dateValue.isAfter(dateTested))\n {\n return true;\n }\n }\n\n return false;\n }\n}\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Inject, Pipe } from '@angular/core';
|
|
2
|
+
import { DATE_API } from '../../misc/tokens';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Tests whether is provided date before tested date
|
|
6
|
+
*/
|
|
7
|
+
export class IsBeforePipe {
|
|
8
|
+
//######################### constructor #########################
|
|
9
|
+
constructor(dateApi) {
|
|
10
|
+
this.dateApi = dateApi;
|
|
11
|
+
}
|
|
12
|
+
//######################### public methods - implementation of PipeTransform #########################
|
|
13
|
+
/**
|
|
14
|
+
* Tests whether is provided date before tested date
|
|
15
|
+
* @param value - Provided date to be tested whether is before
|
|
16
|
+
* @param tested - Date to be tested against
|
|
17
|
+
*/
|
|
18
|
+
transform(value, tested) {
|
|
19
|
+
if (value && tested) {
|
|
20
|
+
const dateValue = this.dateApi.getValue(value);
|
|
21
|
+
const dateTested = this.dateApi.getValue(tested);
|
|
22
|
+
if (dateValue.isBefore(dateTested)) {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: IsBeforePipe, deps: [{ token: DATE_API }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
29
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.0", ngImport: i0, type: IsBeforePipe, isStandalone: true, name: "isBefore" }); }
|
|
30
|
+
}
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: IsBeforePipe, decorators: [{
|
|
32
|
+
type: Pipe,
|
|
33
|
+
args: [{ name: 'isBefore' }]
|
|
34
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
35
|
+
type: Inject,
|
|
36
|
+
args: [DATE_API]
|
|
37
|
+
}] }] });
|
|
38
|
+
//# sourceMappingURL=isBefore.pipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isBefore.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/isBefore/isBefore.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,IAAI,EAAgB,MAAM,eAAe,CAAC;AAG1D,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;;AAE3C;;GAEG;AAEH,MAAM,OAAO,YAAY;IAErB,iEAAiE;IACjE,YAAwC,OAAuB;QAAvB,YAAO,GAAP,OAAO,CAAgB;IAE/D,CAAC;IAED,sGAAsG;IAEtG;;;;OAIG;IACI,SAAS,CAAC,KAAqC,EAAE,MAAsC;QAE1F,IAAG,KAAK,IAAI,MAAM,EAClB,CAAC;YACG,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YAC/C,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAEjD,IAAG,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,EACjC,CAAC;gBACG,OAAO,IAAI,CAAC;YAChB,CAAC;QACL,CAAC;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;8GA5BQ,YAAY,kBAGD,QAAQ;4GAHnB,YAAY;;2FAAZ,YAAY;kBADxB,IAAI;mBAAC,EAAC,IAAI,EAAE,UAAU,EAAC;;0BAIP,MAAM;2BAAC,QAAQ","sourcesContent":["import {Inject, Pipe, PipeTransform} from '@angular/core';\n\nimport {DateApi, DateValue} from '../../services';\nimport {DATE_API} from '../../misc/tokens';\n\n/**\n * Tests whether is provided date before tested date\n */\n@Pipe({name: 'isBefore'})\nexport class IsBeforePipe<TDate = unknown> implements PipeTransform\n{\n //######################### constructor #########################\n constructor(@Inject(DATE_API) protected dateApi: DateApi<TDate>)\n {\n }\n\n //######################### public methods - implementation of PipeTransform #########################\n\n /**\n * Tests whether is provided date before tested date\n * @param value - Provided date to be tested whether is before\n * @param tested - Date to be tested against\n */\n public transform(value: TDate|DateValue|undefined|null, tested: TDate|DateValue|undefined|null): boolean\n {\n if(value && tested)\n {\n const dateValue = this.dateApi.getValue(value);\n const dateTested = this.dateApi.getValue(tested);\n\n if(dateValue.isBefore(dateTested))\n {\n return true;\n }\n }\n\n return false;\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anglr/datetime",
|
|
3
|
-
"version": "9.0.0
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "Angular library for datetime manipulation components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"copyfiles": "2.4.1",
|
|
98
98
|
"date-fns": "4.1.0",
|
|
99
99
|
"eslint": "9.18.0",
|
|
100
|
-
"eslint-plugin-ressurectit": "0.
|
|
100
|
+
"eslint-plugin-ressurectit": "0.3.0",
|
|
101
101
|
"jest": "29.7.0",
|
|
102
102
|
"jest-preset-angular": "14.2.4",
|
|
103
103
|
"lerna": "8.1.9",
|
package/src/index.d.ts
CHANGED
|
@@ -8,6 +8,5 @@ export * from './misc/utils';
|
|
|
8
8
|
export * from './misc/validators';
|
|
9
9
|
export * from './modules';
|
|
10
10
|
export * from './services';
|
|
11
|
-
export * from './pipes
|
|
12
|
-
export * from './pipes/dateFormat.pipe';
|
|
11
|
+
export * from './pipes';
|
|
13
12
|
//# sourceMappingURL=index.d.ts.map
|
package/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "../../pipes/isAfter/isAfter.pipe";
|
|
3
|
+
import * as i2 from "../../pipes/isBefore/isBefore.pipe";
|
|
4
|
+
import * as i3 from "../../pipes/dateFormat/dateFormat.pipe";
|
|
5
|
+
import * as i4 from "../../pipes/dateConvert/dateConvert.pipe";
|
|
6
|
+
/**
|
|
7
|
+
* Module used for exporting date pipes
|
|
8
|
+
*/
|
|
9
|
+
export declare class DatePipesModule {
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatePipesModule, never>;
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DatePipesModule, never, [typeof i1.IsAfterPipe, typeof i2.IsBeforePipe, typeof i3.DateFormatPipe, typeof i4.DateConvertPipe], [typeof i1.IsAfterPipe, typeof i2.IsBeforePipe, typeof i3.DateFormatPipe, typeof i4.DateConvertPipe]>;
|
|
12
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DatePipesModule>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=datePipes.module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datePipes.module.d.ts","sourceRoot":"","sources":["datePipes.module.ts"],"names":[],"mappings":";;;;;AAIA;;GAEG;AACH,qBAkBa,eAAe;yCAAf,eAAe;0CAAf,eAAe;0CAAf,eAAe;CAE3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dayPicker.component.d.ts","sourceRoot":"","sources":["dayPicker.component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,cAAc,EAAE,OAAO,EAAC,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"dayPicker.component.d.ts","sourceRoot":"","sources":["dayPicker.component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,cAAc,EAAE,OAAO,EAAC,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAC;;AAGnD;;GAEG;AACH,qBAca,kBAAkB,CAAC,KAAK,GAAG,OAAO,CAAE,SAAQ,wBAAwB,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,CAAE,YAAW,cAAc,CAAC,KAAK,CAAC;IAIrI;;OAEG;IACH,SAAS,CAAC,aAAa,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAM;IAI/C;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAM;;IAYlC;;;OAGG;IACH,SAAS,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI;IAsClD;;OAEG;IACH,SAAS,CAAC,SAAS,IAAI,IAAI;IAO3B;;OAEG;IACH,SAAS,CAAC,aAAa,IAAI,IAAI;IAS/B;;OAEG;IACH,SAAS,CAAC,MAAM,IAAI,IAAI;IAmExB;;OAEG;IACH,SAAS,CAAC,QAAQ,IAAI,IAAI;IAK1B;;;;OAIG;IACH,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,GAAG,OAAO;yCA7KhE,kBAAkB;2CAAlB,kBAAkB;CAiL9B"}
|
package/src/modules/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import { DateApi, DateApiObject, DateValue } from '
|
|
2
|
+
import { DateApi, DateApiObject, DateValue } from '../../services';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
5
5
|
* Pipe that is used for converting date
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dateConvert.pipe.d.ts","sourceRoot":"","sources":["dateConvert.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAC,MAAM,eAAe,CAAC;AAI1D,OAAO,EAAC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;;AAEjE;;GAEG;AACH,qBACa,eAAe,CAAC,KAAK,GAAG,OAAO,CAAE,YAAW,aAAa;IAGpC,OAAO,CAAC,QAAQ;gBAAR,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC;IAM9D;;;;OAIG;IACI,SAAS,CAAC,KAAK,EAAE,KAAK,GAAC,SAAS,GAAC,SAAS,GAAC,IAAI,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC,KAAK,CAAC,GAAC,IAAI;yCAd/F,eAAe;uCAAf,eAAe;CA8B3B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import { FormatProvider } from '
|
|
3
|
-
import { DateApi, DateValue } from '
|
|
2
|
+
import { FormatProvider } from '../../interfaces';
|
|
3
|
+
import { DateApi, DateValue } from '../../services';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
/**
|
|
6
6
|
* Pipe that is used for formatting date
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dateFormat.pipe.d.ts","sourceRoot":"","sources":["dateFormat.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAC,MAAM,eAAe,CAAC;AAG1D,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAC,OAAO,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;;AAElD;;GAEG;AACH,qBACa,cAAc,CAAC,KAAK,GAAG,OAAO,CAAE,YAAW,aAAa;IAG5B,OAAO,CAAC,eAAe;IAC9B,OAAO,CAAC,QAAQ;gBADD,eAAe,EAAE,cAAc,EACtC,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC;IAM9D;;;OAGG;IACI,SAAS,CAAC,KAAK,EAAE,KAAK,GAAC,SAAS,GAAC,SAAS,GAAC,IAAI,GAAG,MAAM;IAC/D;;;;OAIG;IACI,SAAS,CAAC,KAAK,EAAE,KAAK,GAAC,SAAS,GAAC,SAAS,GAAC,IAAI,EAAE,MAAM,EAAE,MAAM,cAAc,GAAG,MAAM;IAC7F;;;;;OAKG;IACI,SAAS,CAAC,KAAK,EAAE,KAAK,GAAC,SAAS,GAAC,SAAS,GAAC,IAAI,EAAE,MAAM,EAAE,MAAM,cAAc,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM;IAClH;;;;;OAKG;IACI,SAAS,CAAC,KAAK,EAAE,KAAK,GAAC,SAAS,GAAC,SAAS,GAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,GAAG,MAAM;IACnG;;;;;;OAMG;IACI,SAAS,CAAC,KAAK,EAAE,KAAK,GAAC,SAAS,GAAC,SAAS,GAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,GAAG,MAAM;yCA1C/G,cAAc;uCAAd,cAAc;CAmE1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { DateApi, DateValue } from '../../services';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Tests whether is provided date after tested date
|
|
6
|
+
*/
|
|
7
|
+
export declare class IsAfterPipe<TDate = unknown> implements PipeTransform {
|
|
8
|
+
protected dateApi: DateApi<TDate>;
|
|
9
|
+
constructor(dateApi: DateApi<TDate>);
|
|
10
|
+
/**
|
|
11
|
+
* Tests whether is provided date after tested date
|
|
12
|
+
* @param value - Provided date to be tested whether is after
|
|
13
|
+
* @param tested - Date to be tested against
|
|
14
|
+
*/
|
|
15
|
+
transform(value: TDate | DateValue | undefined | null, tested: TDate | DateValue | undefined | null): boolean;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IsAfterPipe<any>, never>;
|
|
17
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<IsAfterPipe<any>, "isAfter", true>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=isAfter.pipe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isAfter.pipe.d.ts","sourceRoot":"","sources":["isAfter.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAC,MAAM,eAAe,CAAC;AAE1D,OAAO,EAAC,OAAO,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;;AAGlD;;GAEG;AACH,qBACa,WAAW,CAAC,KAAK,GAAG,OAAO,CAAE,YAAW,aAAa;IAGhC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC;gBAAvB,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC;IAM/D;;;;OAIG;IACI,SAAS,CAAC,KAAK,EAAE,KAAK,GAAC,SAAS,GAAC,SAAS,GAAC,IAAI,EAAE,MAAM,EAAE,KAAK,GAAC,SAAS,GAAC,SAAS,GAAC,IAAI,GAAG,OAAO;yCAd/F,WAAW;uCAAX,WAAW;CA6BvB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { DateApi, DateValue } from '../../services';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Tests whether is provided date before tested date
|
|
6
|
+
*/
|
|
7
|
+
export declare class IsBeforePipe<TDate = unknown> implements PipeTransform {
|
|
8
|
+
protected dateApi: DateApi<TDate>;
|
|
9
|
+
constructor(dateApi: DateApi<TDate>);
|
|
10
|
+
/**
|
|
11
|
+
* Tests whether is provided date before tested date
|
|
12
|
+
* @param value - Provided date to be tested whether is before
|
|
13
|
+
* @param tested - Date to be tested against
|
|
14
|
+
*/
|
|
15
|
+
transform(value: TDate | DateValue | undefined | null, tested: TDate | DateValue | undefined | null): boolean;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IsBeforePipe<any>, never>;
|
|
17
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<IsBeforePipe<any>, "isBefore", true>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=isBefore.pipe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isBefore.pipe.d.ts","sourceRoot":"","sources":["isBefore.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAC,MAAM,eAAe,CAAC;AAE1D,OAAO,EAAC,OAAO,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;;AAGlD;;GAEG;AACH,qBACa,YAAY,CAAC,KAAK,GAAG,OAAO,CAAE,YAAW,aAAa;IAGjC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC;gBAAvB,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC;IAM/D;;;;OAIG;IACI,SAAS,CAAC,KAAK,EAAE,KAAK,GAAC,SAAS,GAAC,SAAS,GAAC,IAAI,EAAE,MAAM,EAAE,KAAK,GAAC,SAAS,GAAC,SAAS,GAAC,IAAI,GAAG,OAAO;yCAd/F,YAAY;uCAAZ,YAAY;CA6BxB"}
|
package/version.bak
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
9.0.0
|
|
1
|
+
9.0.0
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"datePipes.module.js","sourceRoot":"","sources":["../../../src/modules/datePipes.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAC,cAAc,EAAC,MAAM,0BAA0B,CAAC;;AAExD;;GAEG;AAcH,MAAM,OAAO,eAAe;8GAAf,eAAe;+GAAf,eAAe,YATpB,cAAc;YACd,eAAe,aAIf,cAAc;YACd,eAAe;+GAGV,eAAe;;2FAAf,eAAe;kBAb3B,QAAQ;mBACT;oBACI,OAAO,EACP;wBACI,cAAc;wBACd,eAAe;qBAClB;oBACD,OAAO,EACP;wBACI,cAAc;wBACd,eAAe;qBAClB;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\n\nimport {DateConvertPipe} from '../pipes/dateConvert.pipe';\nimport {DateFormatPipe} from '../pipes/dateFormat.pipe';\n\n/**\n * Module used for exporting date pipes\n */\n@NgModule(\n{\n imports:\n [\n DateFormatPipe,\n DateConvertPipe,\n ],\n exports:\n [\n DateFormatPipe,\n DateConvertPipe,\n ]\n})\nexport class DatePipesModule\n{\n}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dateConvert.pipe.js","sourceRoot":"","sources":["../../../src/pipes/dateConvert.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,IAAI,EAAgB,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;;AAGxC;;GAEG;AAEH,MAAM,OAAO,eAAe;IAExB,kEAAkE;IAClE,YAAsC,QAAwB;QAAxB,aAAQ,GAAR,QAAQ,CAAgB;IAE9D,CAAC;IAED,sGAAsG;IAEtG;;;;OAIG;IACI,SAAS,CAAC,KAAqC,EAAE,WAAoB;QAExE,IAAG,OAAO,CAAC,KAAK,CAAC,EACjB,CAAC;YACG,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAE3D,IAAG,OAAO,CAAC,OAAO,EAAE,EACpB,CAAC;YACG,OAAO,OAAO,CAAC;QACnB,CAAC;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;8GA7BQ,eAAe,kBAGJ,QAAQ;4GAHnB,eAAe;;2FAAf,eAAe;kBAD3B,IAAI;mBAAC,EAAC,IAAI,EAAE,aAAa,EAAC;;0BAIV,MAAM;2BAAC,QAAQ","sourcesContent":["import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {isBlank} from '@jscrpt/common';\n\nimport {DATE_API} from '../misc/tokens';\nimport {DateApi, DateApiObject, DateValue} from '../services';\n\n/**\n * Pipe that is used for converting date\n */\n@Pipe({name: 'dateConvert'})\nexport class DateConvertPipe<TDate = unknown> implements PipeTransform\n{\n //######################### constructors #########################\n constructor(@Inject(DATE_API) private _dateApi: DateApi<TDate>)\n {\n }\n\n //######################### public methods - implementation of PipeTransform #########################\n\n /**\n * Transforms value into date object\n * @param value - value to be transformed\n * @param parseFormat - format used for parsing string date\n */\n public transform(value: TDate|DateValue|undefined|null, parseFormat?: string): DateApiObject<TDate>|null\n {\n if(isBlank(value))\n {\n return null;\n }\n\n const dateObj = this._dateApi.getValue(value, parseFormat);\n\n if(dateObj.isValid())\n {\n return dateObj;\n }\n\n return null;\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dateFormat.pipe.js","sourceRoot":"","sources":["../../../src/pipes/dateFormat.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,IAAI,EAAgB,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAGzD,OAAO,EAAC,QAAQ,EAAE,eAAe,EAAC,MAAM,gBAAgB,CAAC;;AAGzD;;GAEG;AAEH,MAAM,OAAO,cAAc;IAEvB,kEAAkE;IAClE,YAA6C,eAA+B,EACtC,QAAwB;QADjB,oBAAe,GAAf,eAAe,CAAgB;QACtC,aAAQ,GAAR,QAAQ,CAAgB;IAE9D,CAAC;IAqCM,SAAS,CAAC,KAAqC,EAAE,SAAsC,MAAM,CAAiB,MAAM,CAAC,EAAE,yBAA0C,EAAE,aAAuB;QAE7L,IAAG,OAAO,CAAC,KAAK,CAAC,EACjB,CAAC;YACG,OAAO,EAAE,CAAC;QACd,CAAC;QAED,MAAM,WAAW,GAAqB,QAAQ,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,SAAS,CAAC;QAElH,uBAAuB;QACvB,IAAG,MAAM,IAAI,IAAI,CAAC,eAAe,EACjC,CAAC;YACG,MAAM,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAA8B,CAAC,CAAC;QACpE,CAAC;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAE3D,IAAG,OAAO,CAAC,OAAO,EAAE,EACpB,CAAC;YACG,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;QAC3D,CAAC;QAED,OAAO,EAAE,CAAC;IACd,CAAC;8GAlEQ,cAAc,kBAGH,eAAe,aACf,QAAQ;4GAJnB,cAAc;;2FAAd,cAAc;kBAD1B,IAAI;mBAAC,EAAC,IAAI,EAAE,YAAY,EAAC;;0BAIT,MAAM;2BAAC,eAAe;;0BACtB,MAAM;2BAAC,QAAQ","sourcesContent":["import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {isBlank, isString, nameof} from '@jscrpt/common';\n\nimport {FormatProvider} from '../interfaces';\nimport {DATE_API, FORMAT_PROVIDER} from '../misc/tokens';\nimport {DateApi, DateValue} from '../services';\n\n/**\n * Pipe that is used for formatting date\n */\n@Pipe({name: 'dateFormat'})\nexport class DateFormatPipe<TDate = unknown> implements PipeTransform\n{\n //######################### constructors #########################\n constructor(@Inject(FORMAT_PROVIDER) private _formatProvider: FormatProvider,\n @Inject(DATE_API) private _dateApi: DateApi<TDate>)\n {\n }\n\n //######################### public methods - implementation of PipeTransform #########################\n\n /**\n * Formats provided date into formatted string, with default format 'date'\n * @param value - value to be transformed\n */\n public transform(value: TDate|DateValue|undefined|null): string;\n /**\n * Formats provided date into formatted string\n * @param value - value to be transformed\n * @param format - predefined format that is used for formatting, one of 'FormatProvider' keys\n */\n public transform(value: TDate|DateValue|undefined|null, format: keyof FormatProvider): string;\n /**\n * Formats provided date into formatted string\n * @param value - value to be transformed\n * @param format - predefined format that is used for formatting, one of 'FormatProvider' keys\n * @param parseFormat - format used for parsing string date\n */\n public transform(value: TDate|DateValue|undefined|null, format: keyof FormatProvider, parseFormat: string): string;\n /**\n * Formats provided date into formatted string\n * @param value - value to be transformed\n * @param format - format that is used for formatting\n * @param customFormat - indication that custom format is used\n */\n public transform(value: TDate|DateValue|undefined|null, format: string, customFormat: true): string;\n /**\n * Formats provided date into formatted string\n * @param value - value to be transformed\n * @param format - format that is used for formatting\n * @param parseFormat - format used for parsing string date\n * @param customFormat - indication that custom format is used\n */\n public transform(value: TDate|DateValue|undefined|null, format: string, parseFormat: string, customFormat: true): string;\n public transform(value: TDate|DateValue|undefined|null, format: string|keyof FormatProvider = nameof<FormatProvider>('date'), parseFormatOrCustomFormat?: string|boolean, _customFormat?: boolean): string\n {\n if(isBlank(value))\n {\n return '';\n }\n\n const parseFormat: string|undefined = isString(parseFormatOrCustomFormat) ? parseFormatOrCustomFormat : undefined;\n\n //format provider value\n if(format in this._formatProvider)\n {\n format = (this._formatProvider)[format as keyof FormatProvider];\n }\n\n const dateObj = this._dateApi.getValue(value, parseFormat);\n\n if(dateObj.isValid())\n {\n return dateObj.format(this._dateApi.getFormat(format));\n }\n\n return '';\n }\n}\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "../pipes/dateFormat.pipe";
|
|
3
|
-
import * as i2 from "../pipes/dateConvert.pipe";
|
|
4
|
-
/**
|
|
5
|
-
* Module used for exporting date pipes
|
|
6
|
-
*/
|
|
7
|
-
export declare class DatePipesModule {
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DatePipesModule, never>;
|
|
9
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DatePipesModule, never, [typeof i1.DateFormatPipe, typeof i2.DateConvertPipe], [typeof i1.DateFormatPipe, typeof i2.DateConvertPipe]>;
|
|
10
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DatePipesModule>;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=datePipes.module.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"datePipes.module.d.ts","sourceRoot":"","sources":["datePipes.module.ts"],"names":[],"mappings":";;;AAKA;;GAEG;AACH,qBAaa,eAAe;yCAAf,eAAe;0CAAf,eAAe;0CAAf,eAAe;CAE3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dateConvert.pipe.d.ts","sourceRoot":"","sources":["dateConvert.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAC,MAAM,eAAe,CAAC;AAI1D,OAAO,EAAC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAC,MAAM,aAAa,CAAC;;AAE9D;;GAEG;AACH,qBACa,eAAe,CAAC,KAAK,GAAG,OAAO,CAAE,YAAW,aAAa;IAGpC,OAAO,CAAC,QAAQ;gBAAR,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC;IAM9D;;;;OAIG;IACI,SAAS,CAAC,KAAK,EAAE,KAAK,GAAC,SAAS,GAAC,SAAS,GAAC,IAAI,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC,KAAK,CAAC,GAAC,IAAI;yCAd/F,eAAe;uCAAf,eAAe;CA8B3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dateFormat.pipe.d.ts","sourceRoot":"","sources":["dateFormat.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAC,MAAM,eAAe,CAAC;AAG1D,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAC,OAAO,EAAE,SAAS,EAAC,MAAM,aAAa,CAAC;;AAE/C;;GAEG;AACH,qBACa,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