@acorex/components 18.14.0 → 18.14.1-next.1
Sign up to get free protection for your applications and to get access to all the features.
- package/calendar/lib/calendar.component.d.ts +16 -5
- package/calendar/lib/calendar.module.d.ts +2 -1
- package/check-box/lib/check-box.component.d.ts +13 -5
- package/cron-job/README.md +3 -0
- package/cron-job/index.d.ts +8 -0
- package/cron-job/lib/cron-job-container/cron-job-container.component.d.ts +31 -0
- package/cron-job/lib/cron-job.module.d.ts +25 -0
- package/cron-job/lib/cron-job.service.d.ts +22 -0
- package/cron-job/lib/day/day.component.d.ts +22 -0
- package/cron-job/lib/day/day.model.d.ts +61 -0
- package/cron-job/lib/day/day.service.d.ts +17 -0
- package/cron-job/lib/hours/hours.component.d.ts +14 -0
- package/cron-job/lib/hours/hours.model.d.ts +5 -0
- package/cron-job/lib/hours/hours.service.d.ts +13 -0
- package/cron-job/lib/minutes/minutes.component.d.ts +14 -0
- package/cron-job/lib/minutes/minutes.model.d.ts +5 -0
- package/cron-job/lib/minutes/minutes.service.d.ts +13 -0
- package/cron-job/lib/month/month.component.d.ts +16 -0
- package/cron-job/lib/month/month.model.d.ts +5 -0
- package/cron-job/lib/month/month.service.d.ts +14 -0
- package/cron-job/lib/seconds/seconds.component.d.ts +14 -0
- package/cron-job/lib/seconds/seconds.model.d.ts +5 -0
- package/cron-job/lib/seconds/seconds.service.d.ts +13 -0
- package/cron-job/lib/types/iexpression.d.ts +3 -0
- package/cron-job/lib/types/shared.model.d.ts +37 -0
- package/cron-job/lib/year/year.component.d.ts +15 -0
- package/cron-job/lib/year/year.model.d.ts +16 -0
- package/cron-job/lib/year/year.service.d.ts +12 -0
- package/datetime-input/lib/datetime-input.component.d.ts +9 -0
- package/datetime-picker/lib/datetime-picker.component.d.ts +1 -0
- package/esm2022/alert/lib/alert.component.mjs +10 -14
- package/esm2022/avatar/lib/avatar.component.mjs +2 -2
- package/esm2022/calendar/lib/calendar.component.mjs +186 -158
- package/esm2022/calendar/lib/calendar.module.mjs +5 -4
- package/esm2022/check-box/lib/check-box.component.mjs +39 -22
- package/esm2022/common/lib/components/selection-base.component.class.mjs +2 -1
- package/esm2022/cron-job/acorex-components-cron-job.mjs +5 -0
- package/esm2022/cron-job/index.mjs +9 -0
- package/esm2022/cron-job/lib/cron-job-container/cron-job-container.component.mjs +90 -0
- package/esm2022/cron-job/lib/cron-job.module.mjs +80 -0
- package/esm2022/cron-job/lib/cron-job.service.mjs +60 -0
- package/esm2022/cron-job/lib/day/day.component.mjs +61 -0
- package/esm2022/cron-job/lib/day/day.model.mjs +88 -0
- package/esm2022/cron-job/lib/day/day.service.mjs +196 -0
- package/esm2022/cron-job/lib/hours/hours.component.mjs +38 -0
- package/esm2022/cron-job/lib/hours/hours.model.mjs +8 -0
- package/esm2022/cron-job/lib/hours/hours.service.mjs +82 -0
- package/esm2022/cron-job/lib/minutes/minutes.component.mjs +38 -0
- package/esm2022/cron-job/lib/minutes/minutes.model.mjs +8 -0
- package/esm2022/cron-job/lib/minutes/minutes.service.mjs +82 -0
- package/esm2022/cron-job/lib/month/month.component.mjs +47 -0
- package/esm2022/cron-job/lib/month/month.model.mjs +8 -0
- package/esm2022/cron-job/lib/month/month.service.mjs +96 -0
- package/esm2022/cron-job/lib/seconds/seconds.component.mjs +38 -0
- package/esm2022/cron-job/lib/seconds/seconds.model.mjs +8 -0
- package/esm2022/cron-job/lib/seconds/seconds.service.mjs +82 -0
- package/esm2022/cron-job/lib/types/iexpression.mjs +2 -0
- package/esm2022/cron-job/lib/types/shared.model.mjs +49 -0
- package/esm2022/cron-job/lib/year/year.component.mjs +45 -0
- package/esm2022/cron-job/lib/year/year.model.mjs +28 -0
- package/esm2022/cron-job/lib/year/year.service.mjs +82 -0
- package/esm2022/datetime-input/lib/datetime-input.component.mjs +38 -10
- package/esm2022/datetime-picker/lib/datetime-picker.component.mjs +17 -4
- package/esm2022/list/lib/list.component.mjs +3 -3
- package/esm2022/loading/lib/loading.component.mjs +7 -3
- package/esm2022/loading/lib/loading.service.mjs +3 -3
- package/esm2022/radio/lib/radio.component.mjs +3 -3
- package/esm2022/selection-list/lib/selection-list.component.mjs +18 -28
- package/esm2022/text-box/lib/text-box.component.mjs +11 -8
- package/esm2022/time-line/lib/time-line-item.component.mjs +3 -3
- package/esm2022/time-line/lib/time-line.component.mjs +18 -4
- package/fesm2022/acorex-components-action-sheet.mjs +1 -1
- package/fesm2022/acorex-components-alert.mjs +10 -14
- package/fesm2022/acorex-components-alert.mjs.map +1 -1
- package/fesm2022/acorex-components-audio-wave.mjs +1 -1
- package/fesm2022/acorex-components-avatar.mjs +3 -3
- package/fesm2022/acorex-components-avatar.mjs.map +1 -1
- package/fesm2022/acorex-components-badge.mjs +1 -1
- package/fesm2022/acorex-components-bottom-navigation.mjs +1 -1
- package/fesm2022/acorex-components-breadcrumbs.mjs +1 -1
- package/fesm2022/acorex-components-button-group.mjs +1 -1
- package/fesm2022/acorex-components-button.mjs +1 -1
- package/fesm2022/acorex-components-calendar.mjs +188 -160
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-check-box.mjs +39 -22
- package/fesm2022/acorex-components-check-box.mjs.map +1 -1
- package/fesm2022/acorex-components-chips.mjs +1 -1
- package/fesm2022/acorex-components-circular-progress.mjs +1 -1
- package/fesm2022/acorex-components-collapse.mjs +1 -1
- package/fesm2022/acorex-components-color-box.mjs +1 -1
- package/fesm2022/acorex-components-color-palette.mjs +1 -1
- package/fesm2022/acorex-components-comment.mjs +1 -1
- package/fesm2022/acorex-components-common.mjs +2 -1
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation.mjs +1 -1
- package/fesm2022/acorex-components-cron-job.mjs +1191 -0
- package/fesm2022/acorex-components-cron-job.mjs.map +1 -0
- package/fesm2022/acorex-components-data-pager.mjs +1 -1
- package/fesm2022/acorex-components-data-table.mjs +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +1 -1
- package/fesm2022/acorex-components-datetime-input.mjs +36 -8
- package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-picker.mjs +16 -3
- package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-decorators.mjs +1 -1
- package/fesm2022/acorex-components-dialog.mjs +1 -1
- package/fesm2022/acorex-components-drawer.mjs +1 -1
- package/fesm2022/acorex-components-dropdown-button.mjs +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +1 -1
- package/fesm2022/acorex-components-form.mjs +1 -1
- package/fesm2022/acorex-components-image-editor.mjs +1 -1
- package/fesm2022/acorex-components-image.mjs +1 -1
- package/fesm2022/acorex-components-json-viewer.mjs +1 -1
- package/fesm2022/acorex-components-label.mjs +1 -1
- package/fesm2022/acorex-components-list.mjs +3 -3
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-loading-dialog.mjs +1 -1
- package/fesm2022/acorex-components-loading.mjs +9 -5
- package/fesm2022/acorex-components-loading.mjs.map +1 -1
- package/fesm2022/acorex-components-map.mjs +1 -1
- package/fesm2022/acorex-components-media-viewer.mjs +1 -1
- package/fesm2022/acorex-components-menu.mjs +1 -1
- package/fesm2022/acorex-components-nav.mjs +1 -1
- package/fesm2022/acorex-components-navbar.mjs +1 -1
- package/fesm2022/acorex-components-notification.mjs +1 -1
- package/fesm2022/acorex-components-number-box.mjs +1 -1
- package/fesm2022/acorex-components-otp.mjs +1 -1
- package/fesm2022/acorex-components-page.mjs +1 -1
- package/fesm2022/acorex-components-paint.mjs +1 -1
- package/fesm2022/acorex-components-password-box.mjs +1 -1
- package/fesm2022/acorex-components-phone-box.mjs +1 -1
- package/fesm2022/acorex-components-picker.mjs +1 -1
- package/fesm2022/acorex-components-popover.mjs +1 -1
- package/fesm2022/acorex-components-popup.mjs +1 -1
- package/fesm2022/acorex-components-progress-bar.mjs +1 -1
- package/fesm2022/acorex-components-qrcode.mjs +1 -1
- package/fesm2022/acorex-components-radio.mjs +3 -3
- package/fesm2022/acorex-components-radio.mjs.map +1 -1
- package/fesm2022/acorex-components-range-slider.mjs +1 -1
- package/fesm2022/acorex-components-rate-picker.mjs +1 -1
- package/fesm2022/acorex-components-result.mjs +1 -1
- package/fesm2022/acorex-components-routing-progress.mjs +1 -1
- package/fesm2022/acorex-components-scheduler.mjs +1 -1
- package/fesm2022/acorex-components-search-box.mjs +1 -1
- package/fesm2022/acorex-components-select-box.mjs +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +18 -28
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2022/acorex-components-side-menu.mjs +1 -1
- package/fesm2022/acorex-components-skeleton.mjs +1 -1
- package/fesm2022/acorex-components-slider.mjs +1 -1
- package/fesm2022/acorex-components-step-wizard.mjs +1 -1
- package/fesm2022/acorex-components-switch.mjs +1 -1
- package/fesm2022/acorex-components-tabs.mjs +1 -1
- package/fesm2022/acorex-components-tag.mjs +1 -1
- package/fesm2022/acorex-components-text-area.mjs +1 -1
- package/fesm2022/acorex-components-text-box.mjs +10 -7
- package/fesm2022/acorex-components-text-box.mjs.map +1 -1
- package/fesm2022/acorex-components-time-line.mjs +19 -5
- package/fesm2022/acorex-components-time-line.mjs.map +1 -1
- package/fesm2022/acorex-components-toast.mjs +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +1 -1
- package/fesm2022/acorex-components-uploader.mjs +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +1 -1
- package/package.json +7 -1
- package/selection-list/lib/selection-list.component.d.ts +4 -12
- package/text-box/lib/text-box.component.d.ts +2 -2
- package/time-line/lib/time-line.component.d.ts +2 -0
@@ -0,0 +1,1191 @@
|
|
1
|
+
import * as i1$1 from '@acorex/components/tabs';
|
2
|
+
import { AXTabsComponent, AXTabsModule } from '@acorex/components/tabs';
|
3
|
+
import * as i0 from '@angular/core';
|
4
|
+
import { Injectable, inject, afterNextRender, ViewEncapsulation, Component, viewChild, signal, output, NgModule } from '@angular/core';
|
5
|
+
import * as i1 from '@acorex/components/decorators';
|
6
|
+
import { AXDecoratorModule } from '@acorex/components/decorators';
|
7
|
+
import * as i2 from '@angular/forms';
|
8
|
+
import { FormsModule } from '@angular/forms';
|
9
|
+
import * as i4$1 from '@acorex/components/text-box';
|
10
|
+
import { AXTextBoxModule } from '@acorex/components/text-box';
|
11
|
+
import * as i5$1 from '@acorex/components/button';
|
12
|
+
import { AXButtonModule } from '@acorex/components/button';
|
13
|
+
import * as i3 from '@acorex/components/select-box';
|
14
|
+
import { AXSelectBoxModule } from '@acorex/components/select-box';
|
15
|
+
import * as i4 from '@acorex/components/form';
|
16
|
+
import { AXFormModule } from '@acorex/components/form';
|
17
|
+
import * as i5 from '@acorex/components/check-box';
|
18
|
+
import { AXCheckBoxModule } from '@acorex/components/check-box';
|
19
|
+
import * as i6 from '@angular/common';
|
20
|
+
import { CommonModule } from '@angular/common';
|
21
|
+
import * as i7 from '@acorex/core/translation';
|
22
|
+
import { AXTranslationModule } from '@acorex/core/translation';
|
23
|
+
import { AXBadgeModule } from '@acorex/components/badge';
|
24
|
+
import { AXLabelModule } from '@acorex/components/label';
|
25
|
+
|
26
|
+
class StringService {
|
27
|
+
addComma(str) {
|
28
|
+
if (str !== '')
|
29
|
+
// add , to end of string
|
30
|
+
str = str.concat(',');
|
31
|
+
return str;
|
32
|
+
}
|
33
|
+
getRegexItem(cronExpressionPattern, itemIndex) {
|
34
|
+
const expressionItemsList = cronExpressionPattern.split(' ');
|
35
|
+
return expressionItemsList[itemIndex] ? expressionItemsList[itemIndex] : '*';
|
36
|
+
}
|
37
|
+
getIntervalCronData(regex) {
|
38
|
+
const regexDataList = regex.split(',');
|
39
|
+
const rangePattern = '/';
|
40
|
+
const item = regexDataList.find((item) => item.includes(rangePattern));
|
41
|
+
return item
|
42
|
+
? { interval: parseInt(item.split('/')[1]), startAt: parseInt(item.split('/')[0]) }
|
43
|
+
: undefined;
|
44
|
+
}
|
45
|
+
getSpecificCronData(regex, dropDowndara) {
|
46
|
+
const regexDataList = regex.split(',');
|
47
|
+
// **Regex pattern to find only digits in an array items.**
|
48
|
+
const regexPattern = new RegExp('^[0-9]+$');
|
49
|
+
const items = regexDataList.filter((item) => regexPattern.test(item));
|
50
|
+
return items.length ? this.mapItemsToDropDownItem(items, dropDowndara) : undefined;
|
51
|
+
}
|
52
|
+
getRangeCronData(regex) {
|
53
|
+
const regexDataList = regex.split(',');
|
54
|
+
const rangePattern = '-';
|
55
|
+
const item = regexDataList.find((item) => item.includes(rangePattern));
|
56
|
+
return item
|
57
|
+
? { from: parseInt(item.split(rangePattern)[0]), to: parseInt(item.split(rangePattern)[1]) }
|
58
|
+
: undefined;
|
59
|
+
}
|
60
|
+
getDayOfMonthCronData(regex) {
|
61
|
+
const regexDataList = regex.split(',');
|
62
|
+
const rangePattern = '#';
|
63
|
+
const item = regexDataList.find((item) => item.includes(rangePattern));
|
64
|
+
return item
|
65
|
+
? { day: parseInt(item.split(rangePattern)[0]), xst: parseInt(item.split(rangePattern)[1]) }
|
66
|
+
: undefined;
|
67
|
+
}
|
68
|
+
mapItemsToDropDownItem(items, dropDowndata) {
|
69
|
+
return items.map((item) => {
|
70
|
+
if (dropDowndata) {
|
71
|
+
const dropDownItem = dropDowndata[parseInt(item) - 1];
|
72
|
+
return dropDownItem ? { id: parseInt(item), text: dropDownItem } : { id: parseInt(item), text: item };
|
73
|
+
}
|
74
|
+
return { id: parseInt(item), text: item };
|
75
|
+
});
|
76
|
+
}
|
77
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: StringService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
78
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: StringService }); }
|
79
|
+
}
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: StringService, decorators: [{
|
81
|
+
type: Injectable
|
82
|
+
}] });
|
83
|
+
|
84
|
+
let Custom$1 = class Custom {
|
85
|
+
constructor() {
|
86
|
+
this.specific = new Specific$1();
|
87
|
+
this.repeat = new Repeat$1();
|
88
|
+
this.between = new Between$1();
|
89
|
+
}
|
90
|
+
};
|
91
|
+
let Repeat$1 = class Repeat {
|
92
|
+
constructor() {
|
93
|
+
this.isRepeat = false;
|
94
|
+
this.interval = 0;
|
95
|
+
this.startAt = 0;
|
96
|
+
}
|
97
|
+
};
|
98
|
+
let Specific$1 = class Specific {
|
99
|
+
constructor() {
|
100
|
+
this.isSpecific = false;
|
101
|
+
this.values = [];
|
102
|
+
}
|
103
|
+
};
|
104
|
+
let Between$1 = class Between {
|
105
|
+
constructor() {
|
106
|
+
this.isBetween = false;
|
107
|
+
this.from = 0;
|
108
|
+
this.to = 0;
|
109
|
+
}
|
110
|
+
};
|
111
|
+
var Type;
|
112
|
+
(function (Type) {
|
113
|
+
Type["Every"] = "every";
|
114
|
+
Type["Custom"] = "custom";
|
115
|
+
})(Type || (Type = {}));
|
116
|
+
var RegexItemsIndex;
|
117
|
+
(function (RegexItemsIndex) {
|
118
|
+
RegexItemsIndex[RegexItemsIndex["Second"] = 0] = "Second";
|
119
|
+
RegexItemsIndex[RegexItemsIndex["Minute"] = 1] = "Minute";
|
120
|
+
RegexItemsIndex[RegexItemsIndex["Hour"] = 2] = "Hour";
|
121
|
+
RegexItemsIndex[RegexItemsIndex["DayOfMonth"] = 3] = "DayOfMonth";
|
122
|
+
RegexItemsIndex[RegexItemsIndex["Month"] = 4] = "Month";
|
123
|
+
RegexItemsIndex[RegexItemsIndex["DayOfWeek"] = 5] = "DayOfWeek";
|
124
|
+
RegexItemsIndex[RegexItemsIndex["Year"] = 6] = "Year";
|
125
|
+
})(RegexItemsIndex || (RegexItemsIndex = {}));
|
126
|
+
class DropDownItem {
|
127
|
+
constructor(id, text) {
|
128
|
+
this.id = id;
|
129
|
+
this.text = text;
|
130
|
+
}
|
131
|
+
}
|
132
|
+
|
133
|
+
class Day {
|
134
|
+
constructor() {
|
135
|
+
this.type = DayType.Every;
|
136
|
+
this.baseOnWeek = new BaseOnWeek();
|
137
|
+
this.baseOnMonth = new BaseOnMonth();
|
138
|
+
}
|
139
|
+
}
|
140
|
+
class BaseOnMonth {
|
141
|
+
constructor() {
|
142
|
+
this.type = BaseOnMonthType.Last;
|
143
|
+
this.custom = new BaseOnMonthCustom();
|
144
|
+
this.before = 1;
|
145
|
+
}
|
146
|
+
}
|
147
|
+
class BaseOnWeek {
|
148
|
+
constructor() {
|
149
|
+
this.type = BaseOnWeekType.Last;
|
150
|
+
this.last = new Last();
|
151
|
+
this.custom = new BaseOnWeekCustom();
|
152
|
+
}
|
153
|
+
}
|
154
|
+
class BaseOnWeekCustom {
|
155
|
+
constructor() {
|
156
|
+
this.repeat = new BaseOnWeekRepeat();
|
157
|
+
this.specific = new Specific();
|
158
|
+
this.dayOfMonth = new DayOfMonth();
|
159
|
+
}
|
160
|
+
}
|
161
|
+
class BaseOnMonthCustom {
|
162
|
+
constructor() {
|
163
|
+
this.repeat = new BaseOnMonthRepeat();
|
164
|
+
this.specific = new Specific();
|
165
|
+
}
|
166
|
+
}
|
167
|
+
class Last {
|
168
|
+
constructor() {
|
169
|
+
this.day = 1;
|
170
|
+
}
|
171
|
+
}
|
172
|
+
class BaseRepeat {
|
173
|
+
constructor() {
|
174
|
+
this.isRepeat = false;
|
175
|
+
this.interval = 1;
|
176
|
+
}
|
177
|
+
}
|
178
|
+
class BaseOnWeekRepeat extends BaseRepeat {
|
179
|
+
constructor() {
|
180
|
+
super(...arguments);
|
181
|
+
this.startAt = 1;
|
182
|
+
}
|
183
|
+
}
|
184
|
+
class BaseOnMonthRepeat extends BaseRepeat {
|
185
|
+
constructor() {
|
186
|
+
super(...arguments);
|
187
|
+
this.startAt = 1;
|
188
|
+
}
|
189
|
+
}
|
190
|
+
class Specific {
|
191
|
+
constructor() {
|
192
|
+
this.isSpecefic = false;
|
193
|
+
this.values = [];
|
194
|
+
}
|
195
|
+
}
|
196
|
+
class DayOfMonth {
|
197
|
+
constructor() {
|
198
|
+
this.isDayOfMonth = false;
|
199
|
+
this.xst = 1;
|
200
|
+
this.day = 1;
|
201
|
+
}
|
202
|
+
}
|
203
|
+
var DayType;
|
204
|
+
(function (DayType) {
|
205
|
+
DayType["Every"] = "every";
|
206
|
+
DayType["BOWeek"] = "boweek";
|
207
|
+
DayType["BOMonth"] = "bomonth";
|
208
|
+
})(DayType || (DayType = {}));
|
209
|
+
var BaseOnWeekType;
|
210
|
+
(function (BaseOnWeekType) {
|
211
|
+
BaseOnWeekType["Last"] = "last";
|
212
|
+
BaseOnWeekType["Custom"] = "custom";
|
213
|
+
})(BaseOnWeekType || (BaseOnWeekType = {}));
|
214
|
+
var BaseOnMonthType;
|
215
|
+
(function (BaseOnMonthType) {
|
216
|
+
BaseOnMonthType["Last"] = "last";
|
217
|
+
BaseOnMonthType["Before"] = "before";
|
218
|
+
BaseOnMonthType["Custom"] = "custom";
|
219
|
+
})(BaseOnMonthType || (BaseOnMonthType = {}));
|
220
|
+
|
221
|
+
class DayService {
|
222
|
+
constructor(stringService) {
|
223
|
+
this.stringService = stringService;
|
224
|
+
this.daysList = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
225
|
+
this.dayModel = new Day();
|
226
|
+
}
|
227
|
+
getExpression() {
|
228
|
+
let boMonthExp = '';
|
229
|
+
let boWeekExp = '';
|
230
|
+
if (this.dayModel.type === DayType.Every) {
|
231
|
+
boMonthExp = '?';
|
232
|
+
boWeekExp = '*';
|
233
|
+
}
|
234
|
+
else if (this.dayModel.type === DayType.BOMonth) {
|
235
|
+
boWeekExp = '?';
|
236
|
+
if (this.dayModel.baseOnMonth.type === BaseOnMonthType.Last) {
|
237
|
+
boMonthExp = 'L';
|
238
|
+
}
|
239
|
+
else if (this.dayModel.baseOnMonth.type === BaseOnMonthType.Before) {
|
240
|
+
const before = this.dayModel.baseOnMonth.before;
|
241
|
+
boMonthExp = `L-${before}`;
|
242
|
+
}
|
243
|
+
else if (this.dayModel.baseOnMonth.type === BaseOnMonthType.Custom) {
|
244
|
+
if (this.dayModel.baseOnMonth.custom.repeat.isRepeat) {
|
245
|
+
const interval = this.dayModel.baseOnMonth.custom.repeat.interval;
|
246
|
+
const startAt = this.dayModel.baseOnMonth.custom.repeat.startAt;
|
247
|
+
boMonthExp = `${startAt}/${interval}`;
|
248
|
+
}
|
249
|
+
if (this.dayModel.baseOnMonth.custom.specific.isSpecefic) {
|
250
|
+
const specificValues = this.dayModel.baseOnMonth.custom.specific.values.map((v) => {
|
251
|
+
return v.id;
|
252
|
+
});
|
253
|
+
if (specificValues.length !== 0)
|
254
|
+
boMonthExp = this.stringService.addComma(boMonthExp);
|
255
|
+
boMonthExp = boMonthExp.concat(specificValues.join(','));
|
256
|
+
}
|
257
|
+
if (boMonthExp === '')
|
258
|
+
boMonthExp = '*';
|
259
|
+
}
|
260
|
+
}
|
261
|
+
else if (this.dayModel.type === DayType.BOWeek) {
|
262
|
+
boMonthExp = '?';
|
263
|
+
if (this.dayModel.baseOnWeek.type === BaseOnWeekType.Last) {
|
264
|
+
const lastDay = this.dayModel.baseOnWeek.last.day;
|
265
|
+
boWeekExp = `${lastDay}L`;
|
266
|
+
}
|
267
|
+
else if (this.dayModel.baseOnWeek.type === BaseOnWeekType.Custom) {
|
268
|
+
if (this.dayModel.baseOnWeek.custom.repeat.isRepeat) {
|
269
|
+
const interval = this.dayModel.baseOnWeek.custom.repeat.interval;
|
270
|
+
const startAt = this.dayModel.baseOnWeek.custom.repeat.startAt;
|
271
|
+
boWeekExp = `${startAt}/${interval}`;
|
272
|
+
}
|
273
|
+
if (this.dayModel.baseOnWeek.custom.specific.isSpecefic) {
|
274
|
+
const specificValues = this.dayModel.baseOnWeek.custom.specific.values.map((v) => {
|
275
|
+
return v.id;
|
276
|
+
});
|
277
|
+
if (specificValues.length !== 0)
|
278
|
+
boWeekExp = this.stringService.addComma(boWeekExp);
|
279
|
+
boWeekExp = boWeekExp.concat(specificValues.join(','));
|
280
|
+
}
|
281
|
+
if (this.dayModel.baseOnWeek.custom.dayOfMonth.isDayOfMonth) {
|
282
|
+
boWeekExp = this.stringService.addComma(boWeekExp);
|
283
|
+
const day = this.dayModel.baseOnWeek.custom.dayOfMonth.day;
|
284
|
+
const xst = this.dayModel.baseOnWeek.custom.dayOfMonth.xst;
|
285
|
+
boWeekExp = boWeekExp.concat(`${day}#${xst}`);
|
286
|
+
}
|
287
|
+
if (boWeekExp === '')
|
288
|
+
boWeekExp = '*';
|
289
|
+
}
|
290
|
+
}
|
291
|
+
return [boWeekExp, boMonthExp];
|
292
|
+
}
|
293
|
+
expressionValidation(preCronExpressionPattern, newCronExpressionPattern) {
|
294
|
+
const preCronExpressionPatternArray = preCronExpressionPattern.split(' ');
|
295
|
+
const newCronExpressionPatternArray = newCronExpressionPattern.split(' ');
|
296
|
+
const dayOfWeekRegex = this.stringService.getRegexItem(newCronExpressionPattern, RegexItemsIndex.DayOfWeek);
|
297
|
+
const dayOfMonthRegex = this.stringService.getRegexItem(newCronExpressionPattern, RegexItemsIndex.DayOfMonth);
|
298
|
+
const isDayOfWeekChanged = preCronExpressionPatternArray[RegexItemsIndex.DayOfWeek] !==
|
299
|
+
newCronExpressionPatternArray[RegexItemsIndex.DayOfWeek];
|
300
|
+
const isDayOfMonthChanged = preCronExpressionPatternArray[RegexItemsIndex.DayOfMonth] !==
|
301
|
+
newCronExpressionPatternArray[RegexItemsIndex.DayOfMonth];
|
302
|
+
const isBasedOnWeek = dayOfWeekRegex !== '*' && dayOfWeekRegex !== '?';
|
303
|
+
const isBasedOnMonth = dayOfMonthRegex !== '?';
|
304
|
+
if (isDayOfWeekChanged && isBasedOnMonth) {
|
305
|
+
newCronExpressionPatternArray[RegexItemsIndex.DayOfMonth] = '?';
|
306
|
+
return newCronExpressionPatternArray.join(' ');
|
307
|
+
}
|
308
|
+
else if (isDayOfWeekChanged && !isBasedOnWeek) {
|
309
|
+
newCronExpressionPatternArray[RegexItemsIndex.DayOfMonth] = '*';
|
310
|
+
return newCronExpressionPatternArray.join(' ');
|
311
|
+
}
|
312
|
+
if (isDayOfMonthChanged && isBasedOnWeek) {
|
313
|
+
newCronExpressionPatternArray[RegexItemsIndex.DayOfWeek] = '?';
|
314
|
+
return newCronExpressionPatternArray.join(' ');
|
315
|
+
}
|
316
|
+
else if (isDayOfMonthChanged && !isBasedOnMonth) {
|
317
|
+
newCronExpressionPatternArray[RegexItemsIndex.DayOfWeek] = '*';
|
318
|
+
return newCronExpressionPatternArray.join(' ');
|
319
|
+
}
|
320
|
+
return newCronExpressionPattern;
|
321
|
+
}
|
322
|
+
reversExpression(cronExpressionPattern) {
|
323
|
+
this.dayModel = new Day();
|
324
|
+
const dayOfWeekRegex = this.stringService.getRegexItem(cronExpressionPattern, RegexItemsIndex.DayOfWeek);
|
325
|
+
const dayOfMonthRegex = this.stringService.getRegexItem(cronExpressionPattern, RegexItemsIndex.DayOfMonth);
|
326
|
+
const isBasedOnWeek = dayOfWeekRegex !== '*' && dayOfWeekRegex !== '?';
|
327
|
+
const isBasedOnMonth = dayOfMonthRegex !== '?';
|
328
|
+
const isEveryDay = !isBasedOnWeek && !isBasedOnMonth;
|
329
|
+
if (isEveryDay) {
|
330
|
+
this.dayModel.type = DayType.Every;
|
331
|
+
return;
|
332
|
+
}
|
333
|
+
if (isBasedOnWeek) {
|
334
|
+
this.dayModel.type = DayType.BOWeek;
|
335
|
+
this.reversExpressionBasedOnWeek(dayOfWeekRegex);
|
336
|
+
return;
|
337
|
+
}
|
338
|
+
if (isBasedOnMonth) {
|
339
|
+
this.dayModel.type = DayType.BOMonth;
|
340
|
+
this.reversExpressionBasedOnMonth(dayOfMonthRegex);
|
341
|
+
return;
|
342
|
+
}
|
343
|
+
}
|
344
|
+
reversExpressionBasedOnWeek(regex) {
|
345
|
+
// **Regex pattern to check id custom or not**
|
346
|
+
const regexPattern = new RegExp('^[0-9]L$');
|
347
|
+
const isCustom = !regexPattern.test(regex);
|
348
|
+
if (!isCustom) {
|
349
|
+
this.dayModel.baseOnWeek.type = BaseOnWeekType.Last;
|
350
|
+
this.dayModel.baseOnWeek.last.day = parseInt(regex[0]);
|
351
|
+
return;
|
352
|
+
}
|
353
|
+
this.dayModel.baseOnWeek.type = BaseOnWeekType.Custom;
|
354
|
+
const intervalData = this.stringService.getIntervalCronData(regex);
|
355
|
+
const hasIntervalItems = intervalData !== undefined;
|
356
|
+
if (hasIntervalItems) {
|
357
|
+
this.dayModel.baseOnWeek.custom.repeat.isRepeat = true;
|
358
|
+
this.dayModel.baseOnWeek.custom.repeat.interval = intervalData?.interval;
|
359
|
+
this.dayModel.baseOnWeek.custom.repeat.startAt = intervalData?.startAt;
|
360
|
+
}
|
361
|
+
const specificData = this.stringService.getSpecificCronData(regex, this.daysList);
|
362
|
+
const hasSpecificItems = specificData !== undefined;
|
363
|
+
if (hasSpecificItems) {
|
364
|
+
this.dayModel.baseOnWeek.custom.specific.isSpecefic = true;
|
365
|
+
this.dayModel.baseOnWeek.custom.specific.values = specificData;
|
366
|
+
}
|
367
|
+
const dayOfMonthData = this.stringService.getDayOfMonthCronData(regex);
|
368
|
+
const hasDayOfMonthDataItem = dayOfMonthData !== undefined;
|
369
|
+
if (hasDayOfMonthDataItem) {
|
370
|
+
this.dayModel.baseOnWeek.custom.dayOfMonth.isDayOfMonth = true;
|
371
|
+
this.dayModel.baseOnWeek.custom.dayOfMonth.day = dayOfMonthData?.day;
|
372
|
+
this.dayModel.baseOnWeek.custom.dayOfMonth.xst = dayOfMonthData?.xst;
|
373
|
+
}
|
374
|
+
}
|
375
|
+
reversExpressionBasedOnMonth(regex) {
|
376
|
+
const isLastDayOfMonth = regex == 'L';
|
377
|
+
if (isLastDayOfMonth) {
|
378
|
+
this.dayModel.baseOnMonth.type = BaseOnMonthType.Last;
|
379
|
+
return;
|
380
|
+
}
|
381
|
+
// **Regex pattern to check if id before or not**
|
382
|
+
const regexPattern = new RegExp('^L-[0-9]+$');
|
383
|
+
const isCustom = !regexPattern.test(regex);
|
384
|
+
if (!isCustom) {
|
385
|
+
this.dayModel.baseOnMonth.type = BaseOnMonthType.Before;
|
386
|
+
this.dayModel.baseOnMonth.before = parseInt(regex.substr(2));
|
387
|
+
return;
|
388
|
+
}
|
389
|
+
this.dayModel.baseOnMonth.type = BaseOnMonthType.Custom;
|
390
|
+
const intervalData = this.stringService.getIntervalCronData(regex);
|
391
|
+
const hasIntervalItems = intervalData !== undefined;
|
392
|
+
if (hasIntervalItems) {
|
393
|
+
this.dayModel.baseOnMonth.custom.repeat.isRepeat = true;
|
394
|
+
this.dayModel.baseOnMonth.custom.repeat.interval = intervalData?.interval;
|
395
|
+
this.dayModel.baseOnMonth.custom.repeat.startAt = intervalData?.startAt;
|
396
|
+
}
|
397
|
+
const specificData = this.stringService.getSpecificCronData(regex, this.daysList);
|
398
|
+
const hasSpecificItems = specificData !== undefined;
|
399
|
+
if (hasSpecificItems) {
|
400
|
+
this.dayModel.baseOnMonth.custom.specific.isSpecefic = true;
|
401
|
+
this.dayModel.baseOnMonth.custom.specific.values = specificData;
|
402
|
+
}
|
403
|
+
}
|
404
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DayService, deps: [{ token: StringService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
405
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DayService }); }
|
406
|
+
}
|
407
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DayService, decorators: [{
|
408
|
+
type: Injectable
|
409
|
+
}], ctorParameters: () => [{ type: StringService }] });
|
410
|
+
|
411
|
+
class Hours {
|
412
|
+
constructor() {
|
413
|
+
this.type = Type.Every;
|
414
|
+
this.custom = new Custom$1();
|
415
|
+
}
|
416
|
+
}
|
417
|
+
|
418
|
+
class HoursService {
|
419
|
+
constructor(stringService) {
|
420
|
+
this.stringService = stringService;
|
421
|
+
this.hourModel = new Hours();
|
422
|
+
}
|
423
|
+
getExpression() {
|
424
|
+
let expression = '';
|
425
|
+
if (this.hourModel.type === Type.Every) {
|
426
|
+
expression = '*';
|
427
|
+
}
|
428
|
+
else if (this.hourModel.type === Type.Custom) {
|
429
|
+
//type is custom
|
430
|
+
//isRepeat
|
431
|
+
if (this.hourModel.custom.repeat.isRepeat) {
|
432
|
+
const interval = this.hourModel.custom.repeat.interval;
|
433
|
+
const startAt = this.hourModel.custom.repeat.startAt;
|
434
|
+
expression = `${startAt}/${interval}`;
|
435
|
+
}
|
436
|
+
//isSpecific
|
437
|
+
if (this.hourModel.custom.specific.isSpecific) {
|
438
|
+
const specificValues = this.hourModel.custom.specific.values.map((v) => {
|
439
|
+
return v.id;
|
440
|
+
});
|
441
|
+
if (specificValues.length !== 0)
|
442
|
+
expression = this.stringService.addComma(expression);
|
443
|
+
expression = expression.concat(specificValues.join(','));
|
444
|
+
}
|
445
|
+
//isBetween
|
446
|
+
if (this.hourModel.custom.between.isBetween) {
|
447
|
+
expression = this.stringService.addComma(expression);
|
448
|
+
const from = this.hourModel.custom.between.from;
|
449
|
+
const to = this.hourModel.custom.between.to;
|
450
|
+
expression = expression.concat(`${from}-${to}`);
|
451
|
+
}
|
452
|
+
if (expression === '')
|
453
|
+
expression = '*';
|
454
|
+
}
|
455
|
+
return expression;
|
456
|
+
}
|
457
|
+
reversExpression(cronExpressionPattern) {
|
458
|
+
this.hourModel = new Hours();
|
459
|
+
const regex = this.stringService.getRegexItem(cronExpressionPattern, RegexItemsIndex.Hour);
|
460
|
+
const isCustom = regex !== '*';
|
461
|
+
if (!isCustom) {
|
462
|
+
this.hourModel.type = Type.Every;
|
463
|
+
return;
|
464
|
+
}
|
465
|
+
this.hourModel.type = Type.Custom;
|
466
|
+
const intervalData = this.stringService.getIntervalCronData(regex);
|
467
|
+
const hasIntervalItems = intervalData !== undefined;
|
468
|
+
if (hasIntervalItems) {
|
469
|
+
this.hourModel.custom.repeat.isRepeat = true;
|
470
|
+
this.hourModel.custom.repeat.interval = intervalData?.interval;
|
471
|
+
this.hourModel.custom.repeat.startAt = intervalData?.startAt;
|
472
|
+
}
|
473
|
+
const specificData = this.stringService.getSpecificCronData(regex);
|
474
|
+
const hasSpecificItems = specificData !== undefined;
|
475
|
+
if (hasSpecificItems) {
|
476
|
+
this.hourModel.custom.specific.isSpecific = true;
|
477
|
+
this.hourModel.custom.specific.values = specificData;
|
478
|
+
}
|
479
|
+
const rangeData = this.stringService.getRangeCronData(regex);
|
480
|
+
const hasRangeItem = rangeData !== undefined;
|
481
|
+
if (hasRangeItem) {
|
482
|
+
this.hourModel.custom.between.isBetween = true;
|
483
|
+
this.hourModel.custom.between.from = rangeData?.from;
|
484
|
+
this.hourModel.custom.between.to = rangeData?.to;
|
485
|
+
}
|
486
|
+
}
|
487
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: HoursService, deps: [{ token: StringService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
488
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: HoursService }); }
|
489
|
+
}
|
490
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: HoursService, decorators: [{
|
491
|
+
type: Injectable
|
492
|
+
}], ctorParameters: () => [{ type: StringService }] });
|
493
|
+
|
494
|
+
class Minutes {
|
495
|
+
constructor() {
|
496
|
+
this.type = Type.Every;
|
497
|
+
this.custom = new Custom$1();
|
498
|
+
}
|
499
|
+
}
|
500
|
+
|
501
|
+
class MinutesService {
|
502
|
+
constructor(stringService) {
|
503
|
+
this.stringService = stringService;
|
504
|
+
this.minuteModel = new Minutes();
|
505
|
+
}
|
506
|
+
getExpression() {
|
507
|
+
let expression = '';
|
508
|
+
if (this.minuteModel.type === Type.Every) {
|
509
|
+
expression = '*';
|
510
|
+
}
|
511
|
+
else if (this.minuteModel.type === Type.Custom) {
|
512
|
+
//type is custom
|
513
|
+
//isRepeat
|
514
|
+
if (this.minuteModel.custom.repeat.isRepeat) {
|
515
|
+
const interval = this.minuteModel.custom.repeat.interval;
|
516
|
+
const startAt = this.minuteModel.custom.repeat.startAt;
|
517
|
+
expression = `${startAt}/${interval}`;
|
518
|
+
}
|
519
|
+
//isSpecific
|
520
|
+
if (this.minuteModel.custom.specific.isSpecific) {
|
521
|
+
const specificValues = this.minuteModel.custom.specific.values.map((v) => {
|
522
|
+
return v.id;
|
523
|
+
});
|
524
|
+
if (specificValues.length !== 0)
|
525
|
+
expression = this.stringService.addComma(expression);
|
526
|
+
expression = expression.concat(specificValues.join(','));
|
527
|
+
}
|
528
|
+
//isBetween
|
529
|
+
if (this.minuteModel.custom.between.isBetween) {
|
530
|
+
expression = this.stringService.addComma(expression);
|
531
|
+
const from = this.minuteModel.custom.between.from;
|
532
|
+
const to = this.minuteModel.custom.between.to;
|
533
|
+
expression = expression.concat(`${from}-${to}`);
|
534
|
+
}
|
535
|
+
if (expression === '')
|
536
|
+
expression = '*';
|
537
|
+
}
|
538
|
+
return expression;
|
539
|
+
}
|
540
|
+
reversExpression(cronExpressionPattern) {
|
541
|
+
this.minuteModel = new Minutes();
|
542
|
+
const regex = this.stringService.getRegexItem(cronExpressionPattern, RegexItemsIndex.Minute);
|
543
|
+
const isCustom = regex !== '*';
|
544
|
+
if (!isCustom) {
|
545
|
+
this.minuteModel.type = Type.Every;
|
546
|
+
return;
|
547
|
+
}
|
548
|
+
this.minuteModel.type = Type.Custom;
|
549
|
+
const intervalData = this.stringService.getIntervalCronData(regex);
|
550
|
+
const hasIntervalItems = intervalData !== undefined;
|
551
|
+
if (hasIntervalItems) {
|
552
|
+
this.minuteModel.custom.repeat.isRepeat = true;
|
553
|
+
this.minuteModel.custom.repeat.interval = intervalData?.interval;
|
554
|
+
this.minuteModel.custom.repeat.startAt = intervalData?.startAt;
|
555
|
+
}
|
556
|
+
const specificData = this.stringService.getSpecificCronData(regex);
|
557
|
+
const hasSpecificItems = specificData !== undefined;
|
558
|
+
if (hasSpecificItems) {
|
559
|
+
this.minuteModel.custom.specific.isSpecific = true;
|
560
|
+
this.minuteModel.custom.specific.values = specificData;
|
561
|
+
}
|
562
|
+
const rangeData = this.stringService.getRangeCronData(regex);
|
563
|
+
const hasRangeItem = rangeData !== undefined;
|
564
|
+
if (hasRangeItem) {
|
565
|
+
this.minuteModel.custom.between.isBetween = true;
|
566
|
+
this.minuteModel.custom.between.from = rangeData?.from;
|
567
|
+
this.minuteModel.custom.between.to = rangeData?.to;
|
568
|
+
}
|
569
|
+
}
|
570
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: MinutesService, deps: [{ token: StringService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
571
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: MinutesService }); }
|
572
|
+
}
|
573
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: MinutesService, decorators: [{
|
574
|
+
type: Injectable
|
575
|
+
}], ctorParameters: () => [{ type: StringService }] });
|
576
|
+
|
577
|
+
class Month {
|
578
|
+
constructor() {
|
579
|
+
this.type = Type.Every;
|
580
|
+
this.custom = new Custom$1();
|
581
|
+
}
|
582
|
+
}
|
583
|
+
|
584
|
+
class MonthService {
|
585
|
+
constructor(stringService) {
|
586
|
+
this.stringService = stringService;
|
587
|
+
this.monthList = [
|
588
|
+
'January',
|
589
|
+
'February',
|
590
|
+
'March',
|
591
|
+
'April',
|
592
|
+
'May',
|
593
|
+
'June',
|
594
|
+
'July',
|
595
|
+
'August',
|
596
|
+
'September',
|
597
|
+
'October',
|
598
|
+
'November',
|
599
|
+
'December',
|
600
|
+
];
|
601
|
+
this.monthModel = new Month();
|
602
|
+
}
|
603
|
+
getExpression() {
|
604
|
+
let expression = '';
|
605
|
+
if (this.monthModel.type === Type.Every) {
|
606
|
+
expression = '*';
|
607
|
+
}
|
608
|
+
else if (this.monthModel.type === Type.Custom) {
|
609
|
+
//type is custom
|
610
|
+
//isRepeat
|
611
|
+
if (this.monthModel.custom.repeat.isRepeat) {
|
612
|
+
const interval = +this.monthModel.custom.repeat.interval + 1;
|
613
|
+
const startAt = this.monthModel.custom.repeat.startAt;
|
614
|
+
expression = `${+startAt + 1}/${interval}`;
|
615
|
+
}
|
616
|
+
//isSpecific
|
617
|
+
if (this.monthModel.custom.specific.isSpecific) {
|
618
|
+
const specificValues = this.monthModel.custom.specific.values.map((v) => {
|
619
|
+
return v.id;
|
620
|
+
});
|
621
|
+
if (specificValues.length !== 0)
|
622
|
+
expression = this.stringService.addComma(expression);
|
623
|
+
expression = expression.concat(specificValues.join(','));
|
624
|
+
}
|
625
|
+
//isBetween
|
626
|
+
if (this.monthModel.custom.between.isBetween) {
|
627
|
+
expression = this.stringService.addComma(expression);
|
628
|
+
const from = this.monthModel.custom.between.from;
|
629
|
+
const to = this.monthModel.custom.between.to;
|
630
|
+
expression = expression.concat(`${+from + 1}-${+to + 1}`);
|
631
|
+
}
|
632
|
+
if (expression === '')
|
633
|
+
expression = '*';
|
634
|
+
}
|
635
|
+
return expression;
|
636
|
+
}
|
637
|
+
reversExpression(cronExpressionPattern) {
|
638
|
+
this.monthModel = new Month();
|
639
|
+
const regex = this.stringService.getRegexItem(cronExpressionPattern, RegexItemsIndex.Month);
|
640
|
+
const isCustom = regex !== '*';
|
641
|
+
if (!isCustom) {
|
642
|
+
this.monthModel.type = Type.Every;
|
643
|
+
return;
|
644
|
+
}
|
645
|
+
this.monthModel.type = Type.Custom;
|
646
|
+
const intervalData = this.stringService.getIntervalCronData(regex);
|
647
|
+
const hasIntervalItems = intervalData !== undefined;
|
648
|
+
if (hasIntervalItems) {
|
649
|
+
this.monthModel.custom.repeat.isRepeat = true;
|
650
|
+
this.monthModel.custom.repeat.interval = intervalData?.interval - 1;
|
651
|
+
this.monthModel.custom.repeat.startAt = intervalData?.startAt - 1;
|
652
|
+
}
|
653
|
+
const specificData = this.stringService.getSpecificCronData(regex, this.monthList);
|
654
|
+
const hasSpecificItems = specificData !== undefined;
|
655
|
+
if (hasSpecificItems) {
|
656
|
+
this.monthModel.custom.specific.isSpecific = true;
|
657
|
+
this.monthModel.custom.specific.values = specificData;
|
658
|
+
}
|
659
|
+
const rangeData = this.stringService.getRangeCronData(regex);
|
660
|
+
const hasRangeItem = rangeData !== undefined;
|
661
|
+
if (hasRangeItem) {
|
662
|
+
this.monthModel.custom.between.isBetween = true;
|
663
|
+
this.monthModel.custom.between.from = rangeData?.from - 1;
|
664
|
+
this.monthModel.custom.between.to = rangeData?.to - 1;
|
665
|
+
}
|
666
|
+
}
|
667
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: MonthService, deps: [{ token: StringService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
668
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: MonthService }); }
|
669
|
+
}
|
670
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: MonthService, decorators: [{
|
671
|
+
type: Injectable
|
672
|
+
}], ctorParameters: () => [{ type: StringService }] });
|
673
|
+
|
674
|
+
class Seconds {
|
675
|
+
constructor() {
|
676
|
+
this.type = Type.Every;
|
677
|
+
this.custom = new Custom$1();
|
678
|
+
}
|
679
|
+
}
|
680
|
+
|
681
|
+
class SecondsService {
|
682
|
+
constructor(stringService) {
|
683
|
+
this.stringService = stringService;
|
684
|
+
this.secondModel = new Seconds();
|
685
|
+
}
|
686
|
+
getExpression() {
|
687
|
+
let expression = '';
|
688
|
+
if (this.secondModel.type === Type.Every) {
|
689
|
+
expression = '*';
|
690
|
+
}
|
691
|
+
else if (this.secondModel.type === Type.Custom) {
|
692
|
+
//type is custom
|
693
|
+
//isRepeat
|
694
|
+
if (this.secondModel.custom.repeat.isRepeat) {
|
695
|
+
const interval = this.secondModel.custom.repeat.interval;
|
696
|
+
const startAt = this.secondModel.custom.repeat.startAt;
|
697
|
+
expression = `${startAt}/${interval}`;
|
698
|
+
}
|
699
|
+
//isSpecific
|
700
|
+
if (this.secondModel.custom.specific.isSpecific) {
|
701
|
+
const specificValues = this.secondModel.custom.specific.values.map((v) => {
|
702
|
+
return v.id;
|
703
|
+
});
|
704
|
+
if (specificValues.length !== 0)
|
705
|
+
expression = this.stringService.addComma(expression);
|
706
|
+
expression = expression.concat(specificValues.join(','));
|
707
|
+
}
|
708
|
+
//isBetween
|
709
|
+
if (this.secondModel.custom.between.isBetween) {
|
710
|
+
expression = this.stringService.addComma(expression);
|
711
|
+
const from = this.secondModel.custom.between.from;
|
712
|
+
const to = this.secondModel.custom.between.to;
|
713
|
+
expression = expression.concat(`${from}-${to}`);
|
714
|
+
}
|
715
|
+
if (expression === '')
|
716
|
+
expression = '*';
|
717
|
+
}
|
718
|
+
return expression;
|
719
|
+
}
|
720
|
+
reversExpression(cronExpressionPattern) {
|
721
|
+
this.secondModel = new Seconds();
|
722
|
+
const regex = this.stringService.getRegexItem(cronExpressionPattern, RegexItemsIndex.Second);
|
723
|
+
const isCustom = regex !== '*';
|
724
|
+
if (!isCustom) {
|
725
|
+
this.secondModel.type = Type.Every;
|
726
|
+
return;
|
727
|
+
}
|
728
|
+
this.secondModel.type = Type.Custom;
|
729
|
+
const intervalData = this.stringService.getIntervalCronData(regex);
|
730
|
+
const hasIntervalItems = intervalData !== undefined;
|
731
|
+
if (hasIntervalItems) {
|
732
|
+
this.secondModel.custom.repeat.isRepeat = true;
|
733
|
+
this.secondModel.custom.repeat.interval = intervalData?.interval;
|
734
|
+
this.secondModel.custom.repeat.startAt = intervalData?.startAt;
|
735
|
+
}
|
736
|
+
const specificData = this.stringService.getSpecificCronData(regex);
|
737
|
+
const hasSpecificItems = specificData !== undefined;
|
738
|
+
if (hasSpecificItems) {
|
739
|
+
this.secondModel.custom.specific.isSpecific = true;
|
740
|
+
this.secondModel.custom.specific.values = specificData;
|
741
|
+
}
|
742
|
+
const rangeData = this.stringService.getRangeCronData(regex);
|
743
|
+
const hasRangeItem = rangeData !== undefined;
|
744
|
+
if (hasRangeItem) {
|
745
|
+
this.secondModel.custom.between.isBetween = true;
|
746
|
+
this.secondModel.custom.between.from = rangeData?.from;
|
747
|
+
this.secondModel.custom.between.to = rangeData?.to;
|
748
|
+
}
|
749
|
+
}
|
750
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: SecondsService, deps: [{ token: StringService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
751
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: SecondsService }); }
|
752
|
+
}
|
753
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: SecondsService, decorators: [{
|
754
|
+
type: Injectable
|
755
|
+
}], ctorParameters: () => [{ type: StringService }] });
|
756
|
+
|
757
|
+
class Year {
|
758
|
+
constructor() {
|
759
|
+
this.type = Type.Every;
|
760
|
+
this.custom = new Custom();
|
761
|
+
}
|
762
|
+
}
|
763
|
+
class Repeat extends Repeat$1 {
|
764
|
+
constructor() {
|
765
|
+
super(...arguments);
|
766
|
+
this.startAt = new Date().getFullYear();
|
767
|
+
}
|
768
|
+
}
|
769
|
+
class Between extends Between$1 {
|
770
|
+
constructor() {
|
771
|
+
super(...arguments);
|
772
|
+
this.from = new Date().getFullYear();
|
773
|
+
this.to = new Date().getFullYear();
|
774
|
+
}
|
775
|
+
}
|
776
|
+
class Custom extends Custom$1 {
|
777
|
+
constructor() {
|
778
|
+
super(...arguments);
|
779
|
+
this.repeat = new Repeat();
|
780
|
+
this.between = new Between();
|
781
|
+
}
|
782
|
+
}
|
783
|
+
|
784
|
+
class YearService {
|
785
|
+
constructor(stringService) {
|
786
|
+
this.stringService = stringService;
|
787
|
+
this.yearModel = new Year();
|
788
|
+
}
|
789
|
+
getExpression() {
|
790
|
+
let expression = '';
|
791
|
+
if (this.yearModel.type === Type.Every) {
|
792
|
+
expression = '*';
|
793
|
+
}
|
794
|
+
else if (this.yearModel.type === Type.Custom) {
|
795
|
+
//type is custom
|
796
|
+
//isRepeat
|
797
|
+
if (this.yearModel.custom.repeat.isRepeat) {
|
798
|
+
const interval = +this.yearModel.custom.repeat.interval + 1;
|
799
|
+
const startAt = this.yearModel.custom.repeat.startAt;
|
800
|
+
expression = `${startAt}/${interval}`;
|
801
|
+
}
|
802
|
+
//isSpecific
|
803
|
+
if (this.yearModel.custom.specific.isSpecific) {
|
804
|
+
const specificValues = this.yearModel.custom.specific.values.map((v) => {
|
805
|
+
return v.id;
|
806
|
+
});
|
807
|
+
if (specificValues.length !== 0)
|
808
|
+
expression = this.stringService.addComma(expression);
|
809
|
+
expression = expression.concat(specificValues.join(','));
|
810
|
+
}
|
811
|
+
//isBetween
|
812
|
+
if (this.yearModel.custom.between.isBetween) {
|
813
|
+
expression = this.stringService.addComma(expression);
|
814
|
+
const from = this.yearModel.custom.between.from;
|
815
|
+
const to = this.yearModel.custom.between.to;
|
816
|
+
expression = expression.concat(`${from}-${to}`);
|
817
|
+
}
|
818
|
+
if (expression === '')
|
819
|
+
expression = '*';
|
820
|
+
}
|
821
|
+
return expression;
|
822
|
+
}
|
823
|
+
reversExpression(cronExpressionPattern) {
|
824
|
+
this.yearModel = new Year();
|
825
|
+
const regex = this.stringService.getRegexItem(cronExpressionPattern, RegexItemsIndex.Year);
|
826
|
+
const isCustom = regex !== '*';
|
827
|
+
if (!isCustom) {
|
828
|
+
this.yearModel.type = Type.Every;
|
829
|
+
return;
|
830
|
+
}
|
831
|
+
this.yearModel.type = Type.Custom;
|
832
|
+
const intervalData = this.stringService.getIntervalCronData(regex);
|
833
|
+
const hasIntervalItems = intervalData !== undefined;
|
834
|
+
if (hasIntervalItems) {
|
835
|
+
this.yearModel.custom.repeat.isRepeat = true;
|
836
|
+
this.yearModel.custom.repeat.interval = intervalData?.interval - 1;
|
837
|
+
this.yearModel.custom.repeat.startAt = intervalData?.startAt;
|
838
|
+
}
|
839
|
+
const specificData = this.stringService.getSpecificCronData(regex);
|
840
|
+
const hasSpecificItems = specificData !== undefined;
|
841
|
+
if (hasSpecificItems) {
|
842
|
+
this.yearModel.custom.specific.isSpecific = true;
|
843
|
+
this.yearModel.custom.specific.values = specificData;
|
844
|
+
}
|
845
|
+
const rangeData = this.stringService.getRangeCronData(regex);
|
846
|
+
const hasRangeItem = rangeData !== undefined;
|
847
|
+
if (hasRangeItem) {
|
848
|
+
this.yearModel.custom.between.isBetween = true;
|
849
|
+
this.yearModel.custom.between.from = rangeData?.from;
|
850
|
+
this.yearModel.custom.between.to = rangeData?.to;
|
851
|
+
}
|
852
|
+
}
|
853
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: YearService, deps: [{ token: StringService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
854
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: YearService }); }
|
855
|
+
}
|
856
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: YearService, decorators: [{
|
857
|
+
type: Injectable
|
858
|
+
}], ctorParameters: () => [{ type: StringService }] });
|
859
|
+
|
860
|
+
class AXCronDayComponent {
|
861
|
+
constructor() {
|
862
|
+
this.dayService = inject(DayService);
|
863
|
+
this.boWeekDropDownList = [];
|
864
|
+
this.boMonthDropDownList = [];
|
865
|
+
this.daysIndexInMonth = [1, 2, 3, 4, 5];
|
866
|
+
this.zeroTo30 = [];
|
867
|
+
this.#init = afterNextRender(() => {
|
868
|
+
for (const [i, day] of this.daysList.entries())
|
869
|
+
this.boWeekDropDownList[i] = new DropDownItem(i + 1, day);
|
870
|
+
for (let i = 0; i < 31; i++) {
|
871
|
+
this.zeroTo30[i] = i;
|
872
|
+
this.boMonthDropDownList[i] = new DropDownItem(i + 1, (i + 1).toString());
|
873
|
+
}
|
874
|
+
});
|
875
|
+
}
|
876
|
+
#init;
|
877
|
+
changeHandler(e) {
|
878
|
+
this.dayService.dayModel.baseOnWeek.custom.specific.values = e.component.selectedItems;
|
879
|
+
}
|
880
|
+
changeHandler2(e) {
|
881
|
+
this.dayService.dayModel.baseOnMonth.custom.specific.values = e.component.selectedItems;
|
882
|
+
}
|
883
|
+
get daysList() {
|
884
|
+
return this.dayService.daysList;
|
885
|
+
}
|
886
|
+
get isBoWeek() {
|
887
|
+
return this.dayService.dayModel.type === DayType.BOWeek ? true : false;
|
888
|
+
}
|
889
|
+
get isBoMonth() {
|
890
|
+
return this.dayService.dayModel.type === DayType.BOMonth ? true : false;
|
891
|
+
}
|
892
|
+
get isBoWeekCustom() {
|
893
|
+
return this.dayService.dayModel.baseOnWeek.type === BaseOnWeekType.Custom ? true : false;
|
894
|
+
}
|
895
|
+
get isBoMonthCustom() {
|
896
|
+
return this.dayService.dayModel.baseOnMonth.type === BaseOnMonthType.Custom ? true : false;
|
897
|
+
}
|
898
|
+
get isBoMonthBefore() {
|
899
|
+
return this.dayService.dayModel.baseOnMonth.type === BaseOnMonthType.Before ? true : false;
|
900
|
+
}
|
901
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCronDayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
902
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXCronDayComponent, selector: "ax-cron-day", ngImport: i0, template: "<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"option\"\n id=\"option1\"\n value=\"every\"\n [(ngModel)]=\"dayService.dayModel.type\"\n checked\n />\n <label for=\"option1\">{{ 'Every' | translate | async }} {{ 'time.day' | translate | async }}</label>\n</div>\n\n<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"option\"\n id=\"option2\"\n value=\"boweek\"\n [(ngModel)]=\"dayService.dayModel.type\"\n />\n <label for=\"option2\">{{ 'Base on week' | translate | async }}</label>\n</div>\n\n<div class=\"ax-block-container\">\n <div class=\"ax-week-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"boweek\"\n id=\"boweekLast\"\n value=\"last\"\n [(ngModel)]=\"dayService.dayModel.baseOnWeek.type\"\n [disabled]=\"!isBoWeek\"\n />\n\n <span>{{ 'On the last' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isBoWeek\"\n [dataSource]=\"boWeekDropDownList\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"dayService.dayModel.baseOnWeek.last.day\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'of the month' | translate | async }}</span>\n </div>\n\n <div>\n <div class=\"ax-radio-container\">\n <input\n type=\"radio\"\n class=\"ax-radio\"\n name=\"boweek\"\n id=\"boweekCustom\"\n value=\"custom\"\n [(ngModel)]=\"dayService.dayModel.baseOnWeek.type\"\n [disabled]=\"!isBoWeek\"\n />\n <label for=\"boweekLast\">{{ 'Custom' | translate | async }}</label>\n </div>\n\n <div class=\"ax-block-container\">\n <div class=\"ax-week-container\">\n <ax-check-box\n [disabled]=\"!isBoWeek || !isBoWeekCustom\"\n [(ngModel)]=\"dayService.dayModel.baseOnWeek.custom.repeat.isRepeat\"\n >\n </ax-check-box>\n\n <span>{{ 'Every' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isBoWeek || !isBoWeekCustom\"\n [dataSource]=\"daysList\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"dayService.dayModel.baseOnWeek.custom.repeat.interval\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'day(s) starting on' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isBoWeek || !isBoWeekCustom\"\n [dataSource]=\"boWeekDropDownList\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"dayService.dayModel.baseOnWeek.custom.repeat.startAt\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n\n <div class=\"ax-specific-container\">\n <div class=\"ax-flex-container\">\n <ax-check-box\n [disabled]=\"!isBoWeek || !isBoWeekCustom\"\n [(ngModel)]=\"dayService.dayModel.baseOnWeek.custom.specific.isSpecefic\"\n >\n </ax-check-box>\n <label>{{ 'Specific day(s) of week (choose one or many)' | translate | async }}</label>\n </div>\n\n <ax-form>\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isBoWeek || !isBoWeekCustom\"\n [dataSource]=\"boWeekDropDownList\"\n textField=\"text\"\n valueField=\"id\"\n [placeholder]=\"'select day(s)' | translate | async\"\n [multiple]=\"true\"\n (onValueChanged)=\"changeHandler($event)\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n\n <div class=\"ax-week-container\">\n <ax-check-box\n [disabled]=\"!isBoWeek || !isBoWeekCustom\"\n [(ngModel)]=\"dayService.dayModel.baseOnWeek.custom.dayOfMonth.isDayOfMonth\"\n >\n </ax-check-box>\n\n <span>{{ 'On the' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isBoWeek || !isBoWeekCustom\"\n [dataSource]=\"daysIndexInMonth\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"dayService.dayModel.baseOnWeek.custom.dayOfMonth.xst\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'st' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isBoWeek || !isBoWeekCustom\"\n [dataSource]=\"boWeekDropDownList\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"dayService.dayModel.baseOnWeek.custom.dayOfMonth.day\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'of month' | translate | async }}</span>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"option\"\n id=\"option3\"\n value=\"bomonth\"\n [(ngModel)]=\"dayService.dayModel.type\"\n />\n <label for=\"option2\">{{ 'Base on Month' | translate | async }}</label>\n</div>\n\n<div class=\"ax-block-container\">\n <div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"bomonth\"\n id=\"bomonthLast\"\n value=\"last\"\n [(ngModel)]=\"dayService.dayModel.baseOnMonth.type\"\n [disabled]=\"!isBoMonth\"\n />\n <label for=\"bomonthLast\">{{ 'On the Last day of the month' | translate | async }}</label>\n </div>\n\n <div class=\"ax-week-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"bomonth\"\n id=\"bomonthLast\"\n value=\"before\"\n [(ngModel)]=\"dayService.dayModel.baseOnMonth.type\"\n [disabled]=\"!isBoMonth\"\n />\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isBoMonth || !isBoMonthBefore\"\n [dataSource]=\"zeroTo30\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"dayService.dayModel.baseOnMonth.before\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'day(s) before the end of the month' | translate | async }}</span>\n </div>\n\n <div class=\"ax-block-container\">\n <div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"bomonth\"\n id=\"bomonthCustom\"\n value=\"custom\"\n [(ngModel)]=\"dayService.dayModel.baseOnMonth.type\"\n [disabled]=\"!isBoMonth\"\n />\n <label for=\"bomonthCustom\">{{ 'Custom' | translate | async }}</label>\n </div>\n\n <div class=\"ax-block-container\">\n <div class=\"ax-week-container\">\n <ax-check-box\n [disabled]=\"!isBoMonth || !isBoMonthCustom\"\n [(ngModel)]=\"dayService.dayModel.baseOnMonth.custom.repeat.isRepeat\"\n >\n </ax-check-box>\n\n <span>{{ 'Every' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isBoMonth || !isBoMonthCustom\"\n [dataSource]=\"zeroTo30\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"dayService.dayModel.baseOnMonth.custom.repeat.interval\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'day(s) starting on' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isBoMonth || !isBoMonthCustom\"\n [dataSource]=\"zeroTo30\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"dayService.dayModel.baseOnMonth.custom.repeat.startAt\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'st of the month' | translate | async }}</span>\n </div>\n\n <div class=\"ax-specific-container\">\n <div class=\"ax-flex-container\">\n <ax-check-box\n [disabled]=\"!isBoMonth || !isBoMonthCustom\"\n [(ngModel)]=\"dayService.dayModel.baseOnMonth.custom.specific.isSpecefic\"\n >\n </ax-check-box>\n\n <label>{{ 'Specific day(s) of month (choose one or many)' | translate | async }}</label>\n </div>\n\n <ax-form>\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isBoMonth || !isBoMonthCustom\"\n [dataSource]=\"boMonthDropDownList\"\n textField=\"text\"\n valueField=\"id\"\n [placeholder]=\"'select day(s)' | translate | async\"\n [multiple]=\"true\"\n (onValueChanged)=\"changeHandler2($event)\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n </div>\n </div>\n</div>\n", styles: ["ax-cron-day .ax-radio-container,ax-cron-hours .ax-radio-container,ax-cron-minutes .ax-radio-container,ax-cron-month .ax-radio-container,ax-cron-seconds .ax-radio-container,ax-cron-year .ax-radio-container{margin-bottom:.5rem;display:flex;align-items:center}ax-cron-day .ax-radio-container input,ax-cron-hours .ax-radio-container input,ax-cron-minutes .ax-radio-container input,ax-cron-month .ax-radio-container input,ax-cron-seconds .ax-radio-container input,ax-cron-year .ax-radio-container input{margin-inline-end:.5rem}ax-cron-day .ax-block-container,ax-cron-hours .ax-block-container,ax-cron-minutes .ax-block-container,ax-cron-month .ax-block-container,ax-cron-seconds .ax-block-container,ax-cron-year .ax-block-container{padding-inline-start:1.5rem}ax-cron-day .ax-block-container .ax-every-container,ax-cron-hours .ax-block-container .ax-every-container,ax-cron-minutes .ax-block-container .ax-every-container,ax-cron-month .ax-block-container .ax-every-container,ax-cron-seconds .ax-block-container .ax-every-container,ax-cron-year .ax-block-container .ax-every-container{display:flex;align-items:center}ax-cron-day .ax-block-container .ax-every-container ax-form,ax-cron-hours .ax-block-container .ax-every-container ax-form,ax-cron-minutes .ax-block-container .ax-every-container ax-form,ax-cron-month .ax-block-container .ax-every-container ax-form,ax-cron-seconds .ax-block-container .ax-every-container ax-form,ax-cron-year .ax-block-container .ax-every-container ax-form{width:fit-content;margin-inline:.5rem}ax-cron-day .ax-block-container .ax-specific-container,ax-cron-hours .ax-block-container .ax-specific-container,ax-cron-minutes .ax-block-container .ax-specific-container,ax-cron-month .ax-block-container .ax-specific-container,ax-cron-seconds .ax-block-container .ax-specific-container,ax-cron-year .ax-block-container .ax-specific-container{margin-block:.5rem}ax-cron-day .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-hours .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-minutes .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-month .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-seconds .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-year .ax-block-container .ax-specific-container .ax-flex-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-between-container,ax-cron-hours .ax-block-container .ax-between-container,ax-cron-minutes .ax-block-container .ax-between-container,ax-cron-month .ax-block-container .ax-between-container,ax-cron-seconds .ax-block-container .ax-between-container,ax-cron-year .ax-block-container .ax-between-container{display:flex;align-items:center}ax-cron-day .ax-block-container .ax-between-container .ax-flex-container,ax-cron-hours .ax-block-container .ax-between-container .ax-flex-container,ax-cron-minutes .ax-block-container .ax-between-container .ax-flex-container,ax-cron-month .ax-block-container .ax-between-container .ax-flex-container,ax-cron-seconds .ax-block-container .ax-between-container .ax-flex-container,ax-cron-year .ax-block-container .ax-between-container .ax-flex-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-between-container ax-form,ax-cron-hours .ax-block-container .ax-between-container ax-form,ax-cron-minutes .ax-block-container .ax-between-container ax-form,ax-cron-month .ax-block-container .ax-between-container ax-form,ax-cron-seconds .ax-block-container .ax-between-container ax-form,ax-cron-year .ax-block-container .ax-between-container ax-form{width:fit-content;margin-inline:.5rem}ax-cron-day .ax-block-container .ax-week-container,ax-cron-hours .ax-block-container .ax-week-container,ax-cron-minutes .ax-block-container .ax-week-container,ax-cron-month .ax-block-container .ax-week-container,ax-cron-seconds .ax-block-container .ax-week-container,ax-cron-year .ax-block-container .ax-week-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-week-container ax-form,ax-cron-hours .ax-block-container .ax-week-container ax-form,ax-cron-minutes .ax-block-container .ax-week-container ax-form,ax-cron-month .ax-block-container .ax-week-container ax-form,ax-cron-seconds .ax-block-container .ax-week-container ax-form,ax-cron-year .ax-block-container .ax-week-container ax-form{width:fit-content;margin-inline:.5rem}\n"], dependencies: [{ kind: "component", type: i1.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "textTemplate", "dataSource", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "component", type: i4.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i4.AXFormComponent, selector: "ax-form", inputs: ["labelMode", "messageStyle", "updateOn"], outputs: ["onValidate", "updateOnChange"] }, { kind: "component", type: i5.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "checked", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i7.AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
903
|
+
}
|
904
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCronDayComponent, decorators: [{
|
905
|
+
type: Component,
|
906
|
+
args: [{ selector: 'ax-cron-day', encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"option\"\n id=\"option1\"\n value=\"every\"\n [(ngModel)]=\"dayService.dayModel.type\"\n checked\n />\n <label for=\"option1\">{{ 'Every' | translate | async }} {{ 'time.day' | translate | async }}</label>\n</div>\n\n<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"option\"\n id=\"option2\"\n value=\"boweek\"\n [(ngModel)]=\"dayService.dayModel.type\"\n />\n <label for=\"option2\">{{ 'Base on week' | translate | async }}</label>\n</div>\n\n<div class=\"ax-block-container\">\n <div class=\"ax-week-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"boweek\"\n id=\"boweekLast\"\n value=\"last\"\n [(ngModel)]=\"dayService.dayModel.baseOnWeek.type\"\n [disabled]=\"!isBoWeek\"\n />\n\n <span>{{ 'On the last' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isBoWeek\"\n [dataSource]=\"boWeekDropDownList\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"dayService.dayModel.baseOnWeek.last.day\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'of the month' | translate | async }}</span>\n </div>\n\n <div>\n <div class=\"ax-radio-container\">\n <input\n type=\"radio\"\n class=\"ax-radio\"\n name=\"boweek\"\n id=\"boweekCustom\"\n value=\"custom\"\n [(ngModel)]=\"dayService.dayModel.baseOnWeek.type\"\n [disabled]=\"!isBoWeek\"\n />\n <label for=\"boweekLast\">{{ 'Custom' | translate | async }}</label>\n </div>\n\n <div class=\"ax-block-container\">\n <div class=\"ax-week-container\">\n <ax-check-box\n [disabled]=\"!isBoWeek || !isBoWeekCustom\"\n [(ngModel)]=\"dayService.dayModel.baseOnWeek.custom.repeat.isRepeat\"\n >\n </ax-check-box>\n\n <span>{{ 'Every' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isBoWeek || !isBoWeekCustom\"\n [dataSource]=\"daysList\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"dayService.dayModel.baseOnWeek.custom.repeat.interval\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'day(s) starting on' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isBoWeek || !isBoWeekCustom\"\n [dataSource]=\"boWeekDropDownList\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"dayService.dayModel.baseOnWeek.custom.repeat.startAt\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n\n <div class=\"ax-specific-container\">\n <div class=\"ax-flex-container\">\n <ax-check-box\n [disabled]=\"!isBoWeek || !isBoWeekCustom\"\n [(ngModel)]=\"dayService.dayModel.baseOnWeek.custom.specific.isSpecefic\"\n >\n </ax-check-box>\n <label>{{ 'Specific day(s) of week (choose one or many)' | translate | async }}</label>\n </div>\n\n <ax-form>\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isBoWeek || !isBoWeekCustom\"\n [dataSource]=\"boWeekDropDownList\"\n textField=\"text\"\n valueField=\"id\"\n [placeholder]=\"'select day(s)' | translate | async\"\n [multiple]=\"true\"\n (onValueChanged)=\"changeHandler($event)\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n\n <div class=\"ax-week-container\">\n <ax-check-box\n [disabled]=\"!isBoWeek || !isBoWeekCustom\"\n [(ngModel)]=\"dayService.dayModel.baseOnWeek.custom.dayOfMonth.isDayOfMonth\"\n >\n </ax-check-box>\n\n <span>{{ 'On the' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isBoWeek || !isBoWeekCustom\"\n [dataSource]=\"daysIndexInMonth\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"dayService.dayModel.baseOnWeek.custom.dayOfMonth.xst\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'st' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isBoWeek || !isBoWeekCustom\"\n [dataSource]=\"boWeekDropDownList\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"dayService.dayModel.baseOnWeek.custom.dayOfMonth.day\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'of month' | translate | async }}</span>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"option\"\n id=\"option3\"\n value=\"bomonth\"\n [(ngModel)]=\"dayService.dayModel.type\"\n />\n <label for=\"option2\">{{ 'Base on Month' | translate | async }}</label>\n</div>\n\n<div class=\"ax-block-container\">\n <div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"bomonth\"\n id=\"bomonthLast\"\n value=\"last\"\n [(ngModel)]=\"dayService.dayModel.baseOnMonth.type\"\n [disabled]=\"!isBoMonth\"\n />\n <label for=\"bomonthLast\">{{ 'On the Last day of the month' | translate | async }}</label>\n </div>\n\n <div class=\"ax-week-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"bomonth\"\n id=\"bomonthLast\"\n value=\"before\"\n [(ngModel)]=\"dayService.dayModel.baseOnMonth.type\"\n [disabled]=\"!isBoMonth\"\n />\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isBoMonth || !isBoMonthBefore\"\n [dataSource]=\"zeroTo30\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"dayService.dayModel.baseOnMonth.before\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'day(s) before the end of the month' | translate | async }}</span>\n </div>\n\n <div class=\"ax-block-container\">\n <div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"bomonth\"\n id=\"bomonthCustom\"\n value=\"custom\"\n [(ngModel)]=\"dayService.dayModel.baseOnMonth.type\"\n [disabled]=\"!isBoMonth\"\n />\n <label for=\"bomonthCustom\">{{ 'Custom' | translate | async }}</label>\n </div>\n\n <div class=\"ax-block-container\">\n <div class=\"ax-week-container\">\n <ax-check-box\n [disabled]=\"!isBoMonth || !isBoMonthCustom\"\n [(ngModel)]=\"dayService.dayModel.baseOnMonth.custom.repeat.isRepeat\"\n >\n </ax-check-box>\n\n <span>{{ 'Every' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isBoMonth || !isBoMonthCustom\"\n [dataSource]=\"zeroTo30\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"dayService.dayModel.baseOnMonth.custom.repeat.interval\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'day(s) starting on' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isBoMonth || !isBoMonthCustom\"\n [dataSource]=\"zeroTo30\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"dayService.dayModel.baseOnMonth.custom.repeat.startAt\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'st of the month' | translate | async }}</span>\n </div>\n\n <div class=\"ax-specific-container\">\n <div class=\"ax-flex-container\">\n <ax-check-box\n [disabled]=\"!isBoMonth || !isBoMonthCustom\"\n [(ngModel)]=\"dayService.dayModel.baseOnMonth.custom.specific.isSpecefic\"\n >\n </ax-check-box>\n\n <label>{{ 'Specific day(s) of month (choose one or many)' | translate | async }}</label>\n </div>\n\n <ax-form>\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isBoMonth || !isBoMonthCustom\"\n [dataSource]=\"boMonthDropDownList\"\n textField=\"text\"\n valueField=\"id\"\n [placeholder]=\"'select day(s)' | translate | async\"\n [multiple]=\"true\"\n (onValueChanged)=\"changeHandler2($event)\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n </div>\n </div>\n</div>\n", styles: ["ax-cron-day .ax-radio-container,ax-cron-hours .ax-radio-container,ax-cron-minutes .ax-radio-container,ax-cron-month .ax-radio-container,ax-cron-seconds .ax-radio-container,ax-cron-year .ax-radio-container{margin-bottom:.5rem;display:flex;align-items:center}ax-cron-day .ax-radio-container input,ax-cron-hours .ax-radio-container input,ax-cron-minutes .ax-radio-container input,ax-cron-month .ax-radio-container input,ax-cron-seconds .ax-radio-container input,ax-cron-year .ax-radio-container input{margin-inline-end:.5rem}ax-cron-day .ax-block-container,ax-cron-hours .ax-block-container,ax-cron-minutes .ax-block-container,ax-cron-month .ax-block-container,ax-cron-seconds .ax-block-container,ax-cron-year .ax-block-container{padding-inline-start:1.5rem}ax-cron-day .ax-block-container .ax-every-container,ax-cron-hours .ax-block-container .ax-every-container,ax-cron-minutes .ax-block-container .ax-every-container,ax-cron-month .ax-block-container .ax-every-container,ax-cron-seconds .ax-block-container .ax-every-container,ax-cron-year .ax-block-container .ax-every-container{display:flex;align-items:center}ax-cron-day .ax-block-container .ax-every-container ax-form,ax-cron-hours .ax-block-container .ax-every-container ax-form,ax-cron-minutes .ax-block-container .ax-every-container ax-form,ax-cron-month .ax-block-container .ax-every-container ax-form,ax-cron-seconds .ax-block-container .ax-every-container ax-form,ax-cron-year .ax-block-container .ax-every-container ax-form{width:fit-content;margin-inline:.5rem}ax-cron-day .ax-block-container .ax-specific-container,ax-cron-hours .ax-block-container .ax-specific-container,ax-cron-minutes .ax-block-container .ax-specific-container,ax-cron-month .ax-block-container .ax-specific-container,ax-cron-seconds .ax-block-container .ax-specific-container,ax-cron-year .ax-block-container .ax-specific-container{margin-block:.5rem}ax-cron-day .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-hours .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-minutes .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-month .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-seconds .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-year .ax-block-container .ax-specific-container .ax-flex-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-between-container,ax-cron-hours .ax-block-container .ax-between-container,ax-cron-minutes .ax-block-container .ax-between-container,ax-cron-month .ax-block-container .ax-between-container,ax-cron-seconds .ax-block-container .ax-between-container,ax-cron-year .ax-block-container .ax-between-container{display:flex;align-items:center}ax-cron-day .ax-block-container .ax-between-container .ax-flex-container,ax-cron-hours .ax-block-container .ax-between-container .ax-flex-container,ax-cron-minutes .ax-block-container .ax-between-container .ax-flex-container,ax-cron-month .ax-block-container .ax-between-container .ax-flex-container,ax-cron-seconds .ax-block-container .ax-between-container .ax-flex-container,ax-cron-year .ax-block-container .ax-between-container .ax-flex-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-between-container ax-form,ax-cron-hours .ax-block-container .ax-between-container ax-form,ax-cron-minutes .ax-block-container .ax-between-container ax-form,ax-cron-month .ax-block-container .ax-between-container ax-form,ax-cron-seconds .ax-block-container .ax-between-container ax-form,ax-cron-year .ax-block-container .ax-between-container ax-form{width:fit-content;margin-inline:.5rem}ax-cron-day .ax-block-container .ax-week-container,ax-cron-hours .ax-block-container .ax-week-container,ax-cron-minutes .ax-block-container .ax-week-container,ax-cron-month .ax-block-container .ax-week-container,ax-cron-seconds .ax-block-container .ax-week-container,ax-cron-year .ax-block-container .ax-week-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-week-container ax-form,ax-cron-hours .ax-block-container .ax-week-container ax-form,ax-cron-minutes .ax-block-container .ax-week-container ax-form,ax-cron-month .ax-block-container .ax-week-container ax-form,ax-cron-seconds .ax-block-container .ax-week-container ax-form,ax-cron-year .ax-block-container .ax-week-container ax-form{width:fit-content;margin-inline:.5rem}\n"] }]
|
907
|
+
}] });
|
908
|
+
|
909
|
+
class AXCronHoursComponent {
|
910
|
+
constructor() {
|
911
|
+
this.hoursService = inject(HoursService);
|
912
|
+
this.dropdownList = [];
|
913
|
+
this.zeroTo23 = [];
|
914
|
+
this.#init = afterNextRender(() => {
|
915
|
+
for (let i = 0; i < 24; i++) {
|
916
|
+
this.zeroTo23[i] = i;
|
917
|
+
this.dropdownList[i] = new DropDownItem(i, i.toString());
|
918
|
+
}
|
919
|
+
});
|
920
|
+
}
|
921
|
+
#init;
|
922
|
+
changeHandler(e) {
|
923
|
+
this.hoursService.hourModel.custom.specific.values = e.component.selectedItems;
|
924
|
+
}
|
925
|
+
get isCustom() {
|
926
|
+
return this.hoursService.hourModel.type === Type.Every ? false : true;
|
927
|
+
}
|
928
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCronHoursComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
929
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXCronHoursComponent, selector: "ax-cron-hours", ngImport: i0, template: "<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"every\"\n id=\"option1\"\n value=\"every\"\n [(ngModel)]=\"hoursService.hourModel.type\"\n checked\n />\n <label>{{ 'Every' | translate | async }} {{ 'time.hour' | translate | async }}</label>\n</div>\n\n<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"custom\"\n id=\"option2\"\n value=\"custom\"\n [(ngModel)]=\"hoursService.hourModel.type\"\n />\n <label>{{ 'Custom' | translate | async }}</label>\n</div>\n\n<div class=\"ax-block-container\">\n <div class=\"ax-every-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"hoursService.hourModel.custom.repeat.isRepeat\">\n </ax-check-box>\n\n <span>{{ 'Every' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"zeroTo23\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"hoursService.hourModel.custom.repeat.interval\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'hour(s) starting at hour' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"zeroTo23\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"hoursService.hourModel.custom.repeat.startAt\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n\n <div class=\"ax-specific-container\">\n <div class=\"ax-flex-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"hoursService.hourModel.custom.specific.isSpecific\">\n </ax-check-box>\n <label>{{ 'Specific hour(s) (choose one or many)' | translate | async }} </label>\n </div>\n\n <ax-form>\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"dropdownList\"\n textField=\"text\"\n valueField=\"id\"\n [placeholder]=\"'select hour(s)' | translate | async\"\n [multiple]=\"true\"\n (onValueChanged)=\"changeHandler($event)\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n\n <div class=\"ax-between-container\">\n <div class=\"ax-flex-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"hoursService.hourModel.custom.between.isBetween\">\n </ax-check-box>\n <label>\n {{ 'Every' | translate | async }} {{ 'time.hour' | translate | async }}\n {{ 'between' | translate | async }} {{ 'time.hour' | translate | async }}\n </label>\n </div>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"zeroTo23\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"hoursService.hourModel.custom.between.from\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'and' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"zeroTo23\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"hoursService.hourModel.custom.between.to\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n</div>\n", styles: ["ax-cron-day .ax-radio-container,ax-cron-hours .ax-radio-container,ax-cron-minutes .ax-radio-container,ax-cron-month .ax-radio-container,ax-cron-seconds .ax-radio-container,ax-cron-year .ax-radio-container{margin-bottom:.5rem;display:flex;align-items:center}ax-cron-day .ax-radio-container input,ax-cron-hours .ax-radio-container input,ax-cron-minutes .ax-radio-container input,ax-cron-month .ax-radio-container input,ax-cron-seconds .ax-radio-container input,ax-cron-year .ax-radio-container input{margin-inline-end:.5rem}ax-cron-day .ax-block-container,ax-cron-hours .ax-block-container,ax-cron-minutes .ax-block-container,ax-cron-month .ax-block-container,ax-cron-seconds .ax-block-container,ax-cron-year .ax-block-container{padding-inline-start:1.5rem}ax-cron-day .ax-block-container .ax-every-container,ax-cron-hours .ax-block-container .ax-every-container,ax-cron-minutes .ax-block-container .ax-every-container,ax-cron-month .ax-block-container .ax-every-container,ax-cron-seconds .ax-block-container .ax-every-container,ax-cron-year .ax-block-container .ax-every-container{display:flex;align-items:center}ax-cron-day .ax-block-container .ax-every-container ax-form,ax-cron-hours .ax-block-container .ax-every-container ax-form,ax-cron-minutes .ax-block-container .ax-every-container ax-form,ax-cron-month .ax-block-container .ax-every-container ax-form,ax-cron-seconds .ax-block-container .ax-every-container ax-form,ax-cron-year .ax-block-container .ax-every-container ax-form{width:fit-content;margin-inline:.5rem}ax-cron-day .ax-block-container .ax-specific-container,ax-cron-hours .ax-block-container .ax-specific-container,ax-cron-minutes .ax-block-container .ax-specific-container,ax-cron-month .ax-block-container .ax-specific-container,ax-cron-seconds .ax-block-container .ax-specific-container,ax-cron-year .ax-block-container .ax-specific-container{margin-block:.5rem}ax-cron-day .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-hours .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-minutes .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-month .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-seconds .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-year .ax-block-container .ax-specific-container .ax-flex-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-between-container,ax-cron-hours .ax-block-container .ax-between-container,ax-cron-minutes .ax-block-container .ax-between-container,ax-cron-month .ax-block-container .ax-between-container,ax-cron-seconds .ax-block-container .ax-between-container,ax-cron-year .ax-block-container .ax-between-container{display:flex;align-items:center}ax-cron-day .ax-block-container .ax-between-container .ax-flex-container,ax-cron-hours .ax-block-container .ax-between-container .ax-flex-container,ax-cron-minutes .ax-block-container .ax-between-container .ax-flex-container,ax-cron-month .ax-block-container .ax-between-container .ax-flex-container,ax-cron-seconds .ax-block-container .ax-between-container .ax-flex-container,ax-cron-year .ax-block-container .ax-between-container .ax-flex-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-between-container ax-form,ax-cron-hours .ax-block-container .ax-between-container ax-form,ax-cron-minutes .ax-block-container .ax-between-container ax-form,ax-cron-month .ax-block-container .ax-between-container ax-form,ax-cron-seconds .ax-block-container .ax-between-container ax-form,ax-cron-year .ax-block-container .ax-between-container ax-form{width:fit-content;margin-inline:.5rem}ax-cron-day .ax-block-container .ax-week-container,ax-cron-hours .ax-block-container .ax-week-container,ax-cron-minutes .ax-block-container .ax-week-container,ax-cron-month .ax-block-container .ax-week-container,ax-cron-seconds .ax-block-container .ax-week-container,ax-cron-year .ax-block-container .ax-week-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-week-container ax-form,ax-cron-hours .ax-block-container .ax-week-container ax-form,ax-cron-minutes .ax-block-container .ax-week-container ax-form,ax-cron-month .ax-block-container .ax-week-container ax-form,ax-cron-seconds .ax-block-container .ax-week-container ax-form,ax-cron-year .ax-block-container .ax-week-container ax-form{width:fit-content;margin-inline:.5rem}\n"], dependencies: [{ kind: "component", type: i1.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "textTemplate", "dataSource", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "component", type: i4.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i4.AXFormComponent, selector: "ax-form", inputs: ["labelMode", "messageStyle", "updateOn"], outputs: ["onValidate", "updateOnChange"] }, { kind: "component", type: i5.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "checked", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i7.AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
930
|
+
}
|
931
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCronHoursComponent, decorators: [{
|
932
|
+
type: Component,
|
933
|
+
args: [{ selector: 'ax-cron-hours', encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"every\"\n id=\"option1\"\n value=\"every\"\n [(ngModel)]=\"hoursService.hourModel.type\"\n checked\n />\n <label>{{ 'Every' | translate | async }} {{ 'time.hour' | translate | async }}</label>\n</div>\n\n<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"custom\"\n id=\"option2\"\n value=\"custom\"\n [(ngModel)]=\"hoursService.hourModel.type\"\n />\n <label>{{ 'Custom' | translate | async }}</label>\n</div>\n\n<div class=\"ax-block-container\">\n <div class=\"ax-every-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"hoursService.hourModel.custom.repeat.isRepeat\">\n </ax-check-box>\n\n <span>{{ 'Every' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"zeroTo23\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"hoursService.hourModel.custom.repeat.interval\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'hour(s) starting at hour' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"zeroTo23\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"hoursService.hourModel.custom.repeat.startAt\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n\n <div class=\"ax-specific-container\">\n <div class=\"ax-flex-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"hoursService.hourModel.custom.specific.isSpecific\">\n </ax-check-box>\n <label>{{ 'Specific hour(s) (choose one or many)' | translate | async }} </label>\n </div>\n\n <ax-form>\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"dropdownList\"\n textField=\"text\"\n valueField=\"id\"\n [placeholder]=\"'select hour(s)' | translate | async\"\n [multiple]=\"true\"\n (onValueChanged)=\"changeHandler($event)\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n\n <div class=\"ax-between-container\">\n <div class=\"ax-flex-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"hoursService.hourModel.custom.between.isBetween\">\n </ax-check-box>\n <label>\n {{ 'Every' | translate | async }} {{ 'time.hour' | translate | async }}\n {{ 'between' | translate | async }} {{ 'time.hour' | translate | async }}\n </label>\n </div>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"zeroTo23\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"hoursService.hourModel.custom.between.from\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'and' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"zeroTo23\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"hoursService.hourModel.custom.between.to\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n</div>\n", styles: ["ax-cron-day .ax-radio-container,ax-cron-hours .ax-radio-container,ax-cron-minutes .ax-radio-container,ax-cron-month .ax-radio-container,ax-cron-seconds .ax-radio-container,ax-cron-year .ax-radio-container{margin-bottom:.5rem;display:flex;align-items:center}ax-cron-day .ax-radio-container input,ax-cron-hours .ax-radio-container input,ax-cron-minutes .ax-radio-container input,ax-cron-month .ax-radio-container input,ax-cron-seconds .ax-radio-container input,ax-cron-year .ax-radio-container input{margin-inline-end:.5rem}ax-cron-day .ax-block-container,ax-cron-hours .ax-block-container,ax-cron-minutes .ax-block-container,ax-cron-month .ax-block-container,ax-cron-seconds .ax-block-container,ax-cron-year .ax-block-container{padding-inline-start:1.5rem}ax-cron-day .ax-block-container .ax-every-container,ax-cron-hours .ax-block-container .ax-every-container,ax-cron-minutes .ax-block-container .ax-every-container,ax-cron-month .ax-block-container .ax-every-container,ax-cron-seconds .ax-block-container .ax-every-container,ax-cron-year .ax-block-container .ax-every-container{display:flex;align-items:center}ax-cron-day .ax-block-container .ax-every-container ax-form,ax-cron-hours .ax-block-container .ax-every-container ax-form,ax-cron-minutes .ax-block-container .ax-every-container ax-form,ax-cron-month .ax-block-container .ax-every-container ax-form,ax-cron-seconds .ax-block-container .ax-every-container ax-form,ax-cron-year .ax-block-container .ax-every-container ax-form{width:fit-content;margin-inline:.5rem}ax-cron-day .ax-block-container .ax-specific-container,ax-cron-hours .ax-block-container .ax-specific-container,ax-cron-minutes .ax-block-container .ax-specific-container,ax-cron-month .ax-block-container .ax-specific-container,ax-cron-seconds .ax-block-container .ax-specific-container,ax-cron-year .ax-block-container .ax-specific-container{margin-block:.5rem}ax-cron-day .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-hours .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-minutes .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-month .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-seconds .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-year .ax-block-container .ax-specific-container .ax-flex-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-between-container,ax-cron-hours .ax-block-container .ax-between-container,ax-cron-minutes .ax-block-container .ax-between-container,ax-cron-month .ax-block-container .ax-between-container,ax-cron-seconds .ax-block-container .ax-between-container,ax-cron-year .ax-block-container .ax-between-container{display:flex;align-items:center}ax-cron-day .ax-block-container .ax-between-container .ax-flex-container,ax-cron-hours .ax-block-container .ax-between-container .ax-flex-container,ax-cron-minutes .ax-block-container .ax-between-container .ax-flex-container,ax-cron-month .ax-block-container .ax-between-container .ax-flex-container,ax-cron-seconds .ax-block-container .ax-between-container .ax-flex-container,ax-cron-year .ax-block-container .ax-between-container .ax-flex-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-between-container ax-form,ax-cron-hours .ax-block-container .ax-between-container ax-form,ax-cron-minutes .ax-block-container .ax-between-container ax-form,ax-cron-month .ax-block-container .ax-between-container ax-form,ax-cron-seconds .ax-block-container .ax-between-container ax-form,ax-cron-year .ax-block-container .ax-between-container ax-form{width:fit-content;margin-inline:.5rem}ax-cron-day .ax-block-container .ax-week-container,ax-cron-hours .ax-block-container .ax-week-container,ax-cron-minutes .ax-block-container .ax-week-container,ax-cron-month .ax-block-container .ax-week-container,ax-cron-seconds .ax-block-container .ax-week-container,ax-cron-year .ax-block-container .ax-week-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-week-container ax-form,ax-cron-hours .ax-block-container .ax-week-container ax-form,ax-cron-minutes .ax-block-container .ax-week-container ax-form,ax-cron-month .ax-block-container .ax-week-container ax-form,ax-cron-seconds .ax-block-container .ax-week-container ax-form,ax-cron-year .ax-block-container .ax-week-container ax-form{width:fit-content;margin-inline:.5rem}\n"] }]
|
934
|
+
}] });
|
935
|
+
|
936
|
+
class AXCronMinutesComponent {
|
937
|
+
constructor() {
|
938
|
+
this.minutesService = inject(MinutesService);
|
939
|
+
this.dropdownList = [];
|
940
|
+
this.zeroTo59 = [];
|
941
|
+
this.#init = afterNextRender(() => {
|
942
|
+
for (let i = 0; i < 60; i++) {
|
943
|
+
this.zeroTo59[i] = i;
|
944
|
+
this.dropdownList[i] = new DropDownItem(i, i.toString());
|
945
|
+
}
|
946
|
+
});
|
947
|
+
}
|
948
|
+
#init;
|
949
|
+
changeHandler(e) {
|
950
|
+
this.minutesService.minuteModel.custom.specific.values = e.component.selectedItems;
|
951
|
+
}
|
952
|
+
get isCustom() {
|
953
|
+
return this.minutesService.minuteModel.type === Type.Every ? false : true;
|
954
|
+
}
|
955
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCronMinutesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
956
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXCronMinutesComponent, selector: "ax-cron-minutes", ngImport: i0, template: "<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"every\"\n id=\"option1\"\n value=\"every\"\n [(ngModel)]=\"minutesService.minuteModel.type\"\n checked\n />\n <label>{{ 'Every' | translate | async }} {{ 'time.minute' | translate | async }} </label>\n</div>\n\n<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"custom\"\n id=\"option2\"\n value=\"custom\"\n [(ngModel)]=\"minutesService.minuteModel.type\"\n />\n <label>{{ 'Custom' | translate | async }}</label>\n</div>\n\n<div class=\"ax-block-container\">\n <div class=\"ax-every-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"minutesService.minuteModel.custom.repeat.isRepeat\">\n </ax-check-box>\n\n <span>{{ 'Every' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"zeroTo59\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"minutesService.minuteModel.custom.repeat.interval\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'minute(s) starting at minute' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"zeroTo59\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"minutesService.minuteModel.custom.repeat.startAt\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n\n <div class=\"ax-specific-container\">\n <div class=\"ax-flex-container\">\n <ax-check-box\n [disabled]=\"!isCustom\"\n [(ngModel)]=\"minutesService.minuteModel.custom.specific.isSpecific\"\n >\n </ax-check-box>\n <label>{{ 'Specific minute(s) (choose one or many)' | translate | async }}</label>\n </div>\n\n <ax-form>\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"dropdownList\"\n textField=\"text\"\n valueField=\"id\"\n [placeholder]=\"'select minute(s)' | translate | async\"\n [multiple]=\"true\"\n (onValueChanged)=\"changeHandler($event)\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n\n <div class=\"ax-between-container\">\n <div class=\"ax-flex-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"minutesService.minuteModel.custom.between.isBetween\">\n </ax-check-box>\n <label\n >{{ 'Every' | translate | async }} {{ 'time.minute' | translate | async }}\n {{ 'between' | translate | async }} {{ 'time.minute' | translate | async }}</label\n >\n </div>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"zeroTo59\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"minutesService.minuteModel.custom.between.from\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'and' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"zeroTo59\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"minutesService.minuteModel.custom.between.to\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n</div>\n", styles: ["ax-cron-day .ax-radio-container,ax-cron-hours .ax-radio-container,ax-cron-minutes .ax-radio-container,ax-cron-month .ax-radio-container,ax-cron-seconds .ax-radio-container,ax-cron-year .ax-radio-container{margin-bottom:.5rem;display:flex;align-items:center}ax-cron-day .ax-radio-container input,ax-cron-hours .ax-radio-container input,ax-cron-minutes .ax-radio-container input,ax-cron-month .ax-radio-container input,ax-cron-seconds .ax-radio-container input,ax-cron-year .ax-radio-container input{margin-inline-end:.5rem}ax-cron-day .ax-block-container,ax-cron-hours .ax-block-container,ax-cron-minutes .ax-block-container,ax-cron-month .ax-block-container,ax-cron-seconds .ax-block-container,ax-cron-year .ax-block-container{padding-inline-start:1.5rem}ax-cron-day .ax-block-container .ax-every-container,ax-cron-hours .ax-block-container .ax-every-container,ax-cron-minutes .ax-block-container .ax-every-container,ax-cron-month .ax-block-container .ax-every-container,ax-cron-seconds .ax-block-container .ax-every-container,ax-cron-year .ax-block-container .ax-every-container{display:flex;align-items:center}ax-cron-day .ax-block-container .ax-every-container ax-form,ax-cron-hours .ax-block-container .ax-every-container ax-form,ax-cron-minutes .ax-block-container .ax-every-container ax-form,ax-cron-month .ax-block-container .ax-every-container ax-form,ax-cron-seconds .ax-block-container .ax-every-container ax-form,ax-cron-year .ax-block-container .ax-every-container ax-form{width:fit-content;margin-inline:.5rem}ax-cron-day .ax-block-container .ax-specific-container,ax-cron-hours .ax-block-container .ax-specific-container,ax-cron-minutes .ax-block-container .ax-specific-container,ax-cron-month .ax-block-container .ax-specific-container,ax-cron-seconds .ax-block-container .ax-specific-container,ax-cron-year .ax-block-container .ax-specific-container{margin-block:.5rem}ax-cron-day .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-hours .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-minutes .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-month .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-seconds .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-year .ax-block-container .ax-specific-container .ax-flex-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-between-container,ax-cron-hours .ax-block-container .ax-between-container,ax-cron-minutes .ax-block-container .ax-between-container,ax-cron-month .ax-block-container .ax-between-container,ax-cron-seconds .ax-block-container .ax-between-container,ax-cron-year .ax-block-container .ax-between-container{display:flex;align-items:center}ax-cron-day .ax-block-container .ax-between-container .ax-flex-container,ax-cron-hours .ax-block-container .ax-between-container .ax-flex-container,ax-cron-minutes .ax-block-container .ax-between-container .ax-flex-container,ax-cron-month .ax-block-container .ax-between-container .ax-flex-container,ax-cron-seconds .ax-block-container .ax-between-container .ax-flex-container,ax-cron-year .ax-block-container .ax-between-container .ax-flex-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-between-container ax-form,ax-cron-hours .ax-block-container .ax-between-container ax-form,ax-cron-minutes .ax-block-container .ax-between-container ax-form,ax-cron-month .ax-block-container .ax-between-container ax-form,ax-cron-seconds .ax-block-container .ax-between-container ax-form,ax-cron-year .ax-block-container .ax-between-container ax-form{width:fit-content;margin-inline:.5rem}ax-cron-day .ax-block-container .ax-week-container,ax-cron-hours .ax-block-container .ax-week-container,ax-cron-minutes .ax-block-container .ax-week-container,ax-cron-month .ax-block-container .ax-week-container,ax-cron-seconds .ax-block-container .ax-week-container,ax-cron-year .ax-block-container .ax-week-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-week-container ax-form,ax-cron-hours .ax-block-container .ax-week-container ax-form,ax-cron-minutes .ax-block-container .ax-week-container ax-form,ax-cron-month .ax-block-container .ax-week-container ax-form,ax-cron-seconds .ax-block-container .ax-week-container ax-form,ax-cron-year .ax-block-container .ax-week-container ax-form{width:fit-content;margin-inline:.5rem}\n"], dependencies: [{ kind: "component", type: i1.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "textTemplate", "dataSource", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "component", type: i4.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i4.AXFormComponent, selector: "ax-form", inputs: ["labelMode", "messageStyle", "updateOn"], outputs: ["onValidate", "updateOnChange"] }, { kind: "component", type: i5.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "checked", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i7.AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
957
|
+
}
|
958
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCronMinutesComponent, decorators: [{
|
959
|
+
type: Component,
|
960
|
+
args: [{ selector: 'ax-cron-minutes', encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"every\"\n id=\"option1\"\n value=\"every\"\n [(ngModel)]=\"minutesService.minuteModel.type\"\n checked\n />\n <label>{{ 'Every' | translate | async }} {{ 'time.minute' | translate | async }} </label>\n</div>\n\n<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"custom\"\n id=\"option2\"\n value=\"custom\"\n [(ngModel)]=\"minutesService.minuteModel.type\"\n />\n <label>{{ 'Custom' | translate | async }}</label>\n</div>\n\n<div class=\"ax-block-container\">\n <div class=\"ax-every-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"minutesService.minuteModel.custom.repeat.isRepeat\">\n </ax-check-box>\n\n <span>{{ 'Every' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"zeroTo59\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"minutesService.minuteModel.custom.repeat.interval\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'minute(s) starting at minute' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"zeroTo59\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"minutesService.minuteModel.custom.repeat.startAt\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n\n <div class=\"ax-specific-container\">\n <div class=\"ax-flex-container\">\n <ax-check-box\n [disabled]=\"!isCustom\"\n [(ngModel)]=\"minutesService.minuteModel.custom.specific.isSpecific\"\n >\n </ax-check-box>\n <label>{{ 'Specific minute(s) (choose one or many)' | translate | async }}</label>\n </div>\n\n <ax-form>\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"dropdownList\"\n textField=\"text\"\n valueField=\"id\"\n [placeholder]=\"'select minute(s)' | translate | async\"\n [multiple]=\"true\"\n (onValueChanged)=\"changeHandler($event)\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n\n <div class=\"ax-between-container\">\n <div class=\"ax-flex-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"minutesService.minuteModel.custom.between.isBetween\">\n </ax-check-box>\n <label\n >{{ 'Every' | translate | async }} {{ 'time.minute' | translate | async }}\n {{ 'between' | translate | async }} {{ 'time.minute' | translate | async }}</label\n >\n </div>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"zeroTo59\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"minutesService.minuteModel.custom.between.from\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'and' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"zeroTo59\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"minutesService.minuteModel.custom.between.to\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n</div>\n", styles: ["ax-cron-day .ax-radio-container,ax-cron-hours .ax-radio-container,ax-cron-minutes .ax-radio-container,ax-cron-month .ax-radio-container,ax-cron-seconds .ax-radio-container,ax-cron-year .ax-radio-container{margin-bottom:.5rem;display:flex;align-items:center}ax-cron-day .ax-radio-container input,ax-cron-hours .ax-radio-container input,ax-cron-minutes .ax-radio-container input,ax-cron-month .ax-radio-container input,ax-cron-seconds .ax-radio-container input,ax-cron-year .ax-radio-container input{margin-inline-end:.5rem}ax-cron-day .ax-block-container,ax-cron-hours .ax-block-container,ax-cron-minutes .ax-block-container,ax-cron-month .ax-block-container,ax-cron-seconds .ax-block-container,ax-cron-year .ax-block-container{padding-inline-start:1.5rem}ax-cron-day .ax-block-container .ax-every-container,ax-cron-hours .ax-block-container .ax-every-container,ax-cron-minutes .ax-block-container .ax-every-container,ax-cron-month .ax-block-container .ax-every-container,ax-cron-seconds .ax-block-container .ax-every-container,ax-cron-year .ax-block-container .ax-every-container{display:flex;align-items:center}ax-cron-day .ax-block-container .ax-every-container ax-form,ax-cron-hours .ax-block-container .ax-every-container ax-form,ax-cron-minutes .ax-block-container .ax-every-container ax-form,ax-cron-month .ax-block-container .ax-every-container ax-form,ax-cron-seconds .ax-block-container .ax-every-container ax-form,ax-cron-year .ax-block-container .ax-every-container ax-form{width:fit-content;margin-inline:.5rem}ax-cron-day .ax-block-container .ax-specific-container,ax-cron-hours .ax-block-container .ax-specific-container,ax-cron-minutes .ax-block-container .ax-specific-container,ax-cron-month .ax-block-container .ax-specific-container,ax-cron-seconds .ax-block-container .ax-specific-container,ax-cron-year .ax-block-container .ax-specific-container{margin-block:.5rem}ax-cron-day .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-hours .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-minutes .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-month .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-seconds .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-year .ax-block-container .ax-specific-container .ax-flex-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-between-container,ax-cron-hours .ax-block-container .ax-between-container,ax-cron-minutes .ax-block-container .ax-between-container,ax-cron-month .ax-block-container .ax-between-container,ax-cron-seconds .ax-block-container .ax-between-container,ax-cron-year .ax-block-container .ax-between-container{display:flex;align-items:center}ax-cron-day .ax-block-container .ax-between-container .ax-flex-container,ax-cron-hours .ax-block-container .ax-between-container .ax-flex-container,ax-cron-minutes .ax-block-container .ax-between-container .ax-flex-container,ax-cron-month .ax-block-container .ax-between-container .ax-flex-container,ax-cron-seconds .ax-block-container .ax-between-container .ax-flex-container,ax-cron-year .ax-block-container .ax-between-container .ax-flex-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-between-container ax-form,ax-cron-hours .ax-block-container .ax-between-container ax-form,ax-cron-minutes .ax-block-container .ax-between-container ax-form,ax-cron-month .ax-block-container .ax-between-container ax-form,ax-cron-seconds .ax-block-container .ax-between-container ax-form,ax-cron-year .ax-block-container .ax-between-container ax-form{width:fit-content;margin-inline:.5rem}ax-cron-day .ax-block-container .ax-week-container,ax-cron-hours .ax-block-container .ax-week-container,ax-cron-minutes .ax-block-container .ax-week-container,ax-cron-month .ax-block-container .ax-week-container,ax-cron-seconds .ax-block-container .ax-week-container,ax-cron-year .ax-block-container .ax-week-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-week-container ax-form,ax-cron-hours .ax-block-container .ax-week-container ax-form,ax-cron-minutes .ax-block-container .ax-week-container ax-form,ax-cron-month .ax-block-container .ax-week-container ax-form,ax-cron-seconds .ax-block-container .ax-week-container ax-form,ax-cron-year .ax-block-container .ax-week-container ax-form{width:fit-content;margin-inline:.5rem}\n"] }]
|
961
|
+
}] });
|
962
|
+
|
963
|
+
class AXCronMonthComponent {
|
964
|
+
constructor() {
|
965
|
+
this.monthService = inject(MonthService);
|
966
|
+
this.dropdownList = [];
|
967
|
+
this.dropdownList2 = [];
|
968
|
+
this.oneTo12 = [];
|
969
|
+
this.#init = afterNextRender(() => {
|
970
|
+
for (const [i, month] of this.monthsList.entries()) {
|
971
|
+
this.dropdownList[i] = new DropDownItem(i, month);
|
972
|
+
}
|
973
|
+
for (const [i, month] of this.monthsList.entries()) {
|
974
|
+
this.dropdownList2[i] = new DropDownItem(i + 1, month);
|
975
|
+
}
|
976
|
+
for (let i = 0; i < 12; i++) {
|
977
|
+
this.oneTo12[i] = new DropDownItem(i, (i + 1).toString());
|
978
|
+
}
|
979
|
+
});
|
980
|
+
}
|
981
|
+
#init;
|
982
|
+
changeHandler(e) {
|
983
|
+
this.monthService.monthModel.custom.specific.values = e.component.selectedItems;
|
984
|
+
}
|
985
|
+
get isCustom() {
|
986
|
+
return this.monthService.monthModel.type === Type.Every ? false : true;
|
987
|
+
}
|
988
|
+
get monthsList() {
|
989
|
+
return this.monthService.monthList;
|
990
|
+
}
|
991
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCronMonthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
992
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXCronMonthComponent, selector: "ax-cron-month", ngImport: i0, template: "<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"every\"\n id=\"option1\"\n value=\"every\"\n [(ngModel)]=\"monthService.monthModel.type\"\n checked\n />\n <label>{{ 'Every' | translate | async }} {{ 'time.month' | translate | async }}</label>\n</div>\n\n<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"custom\"\n id=\"option2\"\n value=\"custom\"\n [(ngModel)]=\"monthService.monthModel.type\"\n />\n <label>{{ 'Custom' | translate | async }}</label>\n</div>\n\n<div class=\"ax-block-container\">\n <div class=\"ax-every-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"monthService.monthModel.custom.repeat.isRepeat\">\n </ax-check-box>\n\n <span>{{ 'Every' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"oneTo12\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"monthService.monthModel.custom.repeat.interval\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'month(s) starting at month' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"dropdownList\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"monthService.monthModel.custom.repeat.startAt\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n\n <div class=\"ax-specific-container\">\n <div class=\"ax-flex-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"monthService.monthModel.custom.specific.isSpecific\">\n </ax-check-box>\n <label> {{ 'Specific month(s) (choose one or many)' | translate | async }}</label>\n </div>\n\n <ax-form>\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"dropdownList2\"\n textField=\"text\"\n valueField=\"id\"\n [placeholder]=\"'select month(s)' | translate | async\"\n [multiple]=\"true\"\n (onValueChanged)=\"changeHandler($event)\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n\n <div class=\"ax-between-container\">\n <div class=\"ax-flex-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"monthService.monthModel.custom.between.isBetween\">\n </ax-check-box>\n <label>\n {{ 'Every' | translate | async }} {{ 'time.month' | translate | async }}\n {{ 'between' | translate | async }} {{ 'time.month' | translate | async }}\n </label>\n </div>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"dropdownList\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"monthService.monthModel.custom.between.from\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'and' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"dropdownList\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"monthService.monthModel.custom.between.to\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n</div>\n", styles: ["ax-cron-day .ax-radio-container,ax-cron-hours .ax-radio-container,ax-cron-minutes .ax-radio-container,ax-cron-month .ax-radio-container,ax-cron-seconds .ax-radio-container,ax-cron-year .ax-radio-container{margin-bottom:.5rem;display:flex;align-items:center}ax-cron-day .ax-radio-container input,ax-cron-hours .ax-radio-container input,ax-cron-minutes .ax-radio-container input,ax-cron-month .ax-radio-container input,ax-cron-seconds .ax-radio-container input,ax-cron-year .ax-radio-container input{margin-inline-end:.5rem}ax-cron-day .ax-block-container,ax-cron-hours .ax-block-container,ax-cron-minutes .ax-block-container,ax-cron-month .ax-block-container,ax-cron-seconds .ax-block-container,ax-cron-year .ax-block-container{padding-inline-start:1.5rem}ax-cron-day .ax-block-container .ax-every-container,ax-cron-hours .ax-block-container .ax-every-container,ax-cron-minutes .ax-block-container .ax-every-container,ax-cron-month .ax-block-container .ax-every-container,ax-cron-seconds .ax-block-container .ax-every-container,ax-cron-year .ax-block-container .ax-every-container{display:flex;align-items:center}ax-cron-day .ax-block-container .ax-every-container ax-form,ax-cron-hours .ax-block-container .ax-every-container ax-form,ax-cron-minutes .ax-block-container .ax-every-container ax-form,ax-cron-month .ax-block-container .ax-every-container ax-form,ax-cron-seconds .ax-block-container .ax-every-container ax-form,ax-cron-year .ax-block-container .ax-every-container ax-form{width:fit-content;margin-inline:.5rem}ax-cron-day .ax-block-container .ax-specific-container,ax-cron-hours .ax-block-container .ax-specific-container,ax-cron-minutes .ax-block-container .ax-specific-container,ax-cron-month .ax-block-container .ax-specific-container,ax-cron-seconds .ax-block-container .ax-specific-container,ax-cron-year .ax-block-container .ax-specific-container{margin-block:.5rem}ax-cron-day .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-hours .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-minutes .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-month .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-seconds .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-year .ax-block-container .ax-specific-container .ax-flex-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-between-container,ax-cron-hours .ax-block-container .ax-between-container,ax-cron-minutes .ax-block-container .ax-between-container,ax-cron-month .ax-block-container .ax-between-container,ax-cron-seconds .ax-block-container .ax-between-container,ax-cron-year .ax-block-container .ax-between-container{display:flex;align-items:center}ax-cron-day .ax-block-container .ax-between-container .ax-flex-container,ax-cron-hours .ax-block-container .ax-between-container .ax-flex-container,ax-cron-minutes .ax-block-container .ax-between-container .ax-flex-container,ax-cron-month .ax-block-container .ax-between-container .ax-flex-container,ax-cron-seconds .ax-block-container .ax-between-container .ax-flex-container,ax-cron-year .ax-block-container .ax-between-container .ax-flex-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-between-container ax-form,ax-cron-hours .ax-block-container .ax-between-container ax-form,ax-cron-minutes .ax-block-container .ax-between-container ax-form,ax-cron-month .ax-block-container .ax-between-container ax-form,ax-cron-seconds .ax-block-container .ax-between-container ax-form,ax-cron-year .ax-block-container .ax-between-container ax-form{width:fit-content;margin-inline:.5rem}ax-cron-day .ax-block-container .ax-week-container,ax-cron-hours .ax-block-container .ax-week-container,ax-cron-minutes .ax-block-container .ax-week-container,ax-cron-month .ax-block-container .ax-week-container,ax-cron-seconds .ax-block-container .ax-week-container,ax-cron-year .ax-block-container .ax-week-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-week-container ax-form,ax-cron-hours .ax-block-container .ax-week-container ax-form,ax-cron-minutes .ax-block-container .ax-week-container ax-form,ax-cron-month .ax-block-container .ax-week-container ax-form,ax-cron-seconds .ax-block-container .ax-week-container ax-form,ax-cron-year .ax-block-container .ax-week-container ax-form{width:fit-content;margin-inline:.5rem}\n"], dependencies: [{ kind: "component", type: i1.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "textTemplate", "dataSource", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "component", type: i4.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i4.AXFormComponent, selector: "ax-form", inputs: ["labelMode", "messageStyle", "updateOn"], outputs: ["onValidate", "updateOnChange"] }, { kind: "component", type: i5.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "checked", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i7.AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
993
|
+
}
|
994
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCronMonthComponent, decorators: [{
|
995
|
+
type: Component,
|
996
|
+
args: [{ selector: 'ax-cron-month', encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"every\"\n id=\"option1\"\n value=\"every\"\n [(ngModel)]=\"monthService.monthModel.type\"\n checked\n />\n <label>{{ 'Every' | translate | async }} {{ 'time.month' | translate | async }}</label>\n</div>\n\n<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"custom\"\n id=\"option2\"\n value=\"custom\"\n [(ngModel)]=\"monthService.monthModel.type\"\n />\n <label>{{ 'Custom' | translate | async }}</label>\n</div>\n\n<div class=\"ax-block-container\">\n <div class=\"ax-every-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"monthService.monthModel.custom.repeat.isRepeat\">\n </ax-check-box>\n\n <span>{{ 'Every' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"oneTo12\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"monthService.monthModel.custom.repeat.interval\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'month(s) starting at month' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"dropdownList\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"monthService.monthModel.custom.repeat.startAt\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n\n <div class=\"ax-specific-container\">\n <div class=\"ax-flex-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"monthService.monthModel.custom.specific.isSpecific\">\n </ax-check-box>\n <label> {{ 'Specific month(s) (choose one or many)' | translate | async }}</label>\n </div>\n\n <ax-form>\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"dropdownList2\"\n textField=\"text\"\n valueField=\"id\"\n [placeholder]=\"'select month(s)' | translate | async\"\n [multiple]=\"true\"\n (onValueChanged)=\"changeHandler($event)\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n\n <div class=\"ax-between-container\">\n <div class=\"ax-flex-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"monthService.monthModel.custom.between.isBetween\">\n </ax-check-box>\n <label>\n {{ 'Every' | translate | async }} {{ 'time.month' | translate | async }}\n {{ 'between' | translate | async }} {{ 'time.month' | translate | async }}\n </label>\n </div>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"dropdownList\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"monthService.monthModel.custom.between.from\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'and' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"dropdownList\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"monthService.monthModel.custom.between.to\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n</div>\n", styles: ["ax-cron-day .ax-radio-container,ax-cron-hours .ax-radio-container,ax-cron-minutes .ax-radio-container,ax-cron-month .ax-radio-container,ax-cron-seconds .ax-radio-container,ax-cron-year .ax-radio-container{margin-bottom:.5rem;display:flex;align-items:center}ax-cron-day .ax-radio-container input,ax-cron-hours .ax-radio-container input,ax-cron-minutes .ax-radio-container input,ax-cron-month .ax-radio-container input,ax-cron-seconds .ax-radio-container input,ax-cron-year .ax-radio-container input{margin-inline-end:.5rem}ax-cron-day .ax-block-container,ax-cron-hours .ax-block-container,ax-cron-minutes .ax-block-container,ax-cron-month .ax-block-container,ax-cron-seconds .ax-block-container,ax-cron-year .ax-block-container{padding-inline-start:1.5rem}ax-cron-day .ax-block-container .ax-every-container,ax-cron-hours .ax-block-container .ax-every-container,ax-cron-minutes .ax-block-container .ax-every-container,ax-cron-month .ax-block-container .ax-every-container,ax-cron-seconds .ax-block-container .ax-every-container,ax-cron-year .ax-block-container .ax-every-container{display:flex;align-items:center}ax-cron-day .ax-block-container .ax-every-container ax-form,ax-cron-hours .ax-block-container .ax-every-container ax-form,ax-cron-minutes .ax-block-container .ax-every-container ax-form,ax-cron-month .ax-block-container .ax-every-container ax-form,ax-cron-seconds .ax-block-container .ax-every-container ax-form,ax-cron-year .ax-block-container .ax-every-container ax-form{width:fit-content;margin-inline:.5rem}ax-cron-day .ax-block-container .ax-specific-container,ax-cron-hours .ax-block-container .ax-specific-container,ax-cron-minutes .ax-block-container .ax-specific-container,ax-cron-month .ax-block-container .ax-specific-container,ax-cron-seconds .ax-block-container .ax-specific-container,ax-cron-year .ax-block-container .ax-specific-container{margin-block:.5rem}ax-cron-day .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-hours .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-minutes .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-month .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-seconds .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-year .ax-block-container .ax-specific-container .ax-flex-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-between-container,ax-cron-hours .ax-block-container .ax-between-container,ax-cron-minutes .ax-block-container .ax-between-container,ax-cron-month .ax-block-container .ax-between-container,ax-cron-seconds .ax-block-container .ax-between-container,ax-cron-year .ax-block-container .ax-between-container{display:flex;align-items:center}ax-cron-day .ax-block-container .ax-between-container .ax-flex-container,ax-cron-hours .ax-block-container .ax-between-container .ax-flex-container,ax-cron-minutes .ax-block-container .ax-between-container .ax-flex-container,ax-cron-month .ax-block-container .ax-between-container .ax-flex-container,ax-cron-seconds .ax-block-container .ax-between-container .ax-flex-container,ax-cron-year .ax-block-container .ax-between-container .ax-flex-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-between-container ax-form,ax-cron-hours .ax-block-container .ax-between-container ax-form,ax-cron-minutes .ax-block-container .ax-between-container ax-form,ax-cron-month .ax-block-container .ax-between-container ax-form,ax-cron-seconds .ax-block-container .ax-between-container ax-form,ax-cron-year .ax-block-container .ax-between-container ax-form{width:fit-content;margin-inline:.5rem}ax-cron-day .ax-block-container .ax-week-container,ax-cron-hours .ax-block-container .ax-week-container,ax-cron-minutes .ax-block-container .ax-week-container,ax-cron-month .ax-block-container .ax-week-container,ax-cron-seconds .ax-block-container .ax-week-container,ax-cron-year .ax-block-container .ax-week-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-week-container ax-form,ax-cron-hours .ax-block-container .ax-week-container ax-form,ax-cron-minutes .ax-block-container .ax-week-container ax-form,ax-cron-month .ax-block-container .ax-week-container ax-form,ax-cron-seconds .ax-block-container .ax-week-container ax-form,ax-cron-year .ax-block-container .ax-week-container ax-form{width:fit-content;margin-inline:.5rem}\n"] }]
|
997
|
+
}] });
|
998
|
+
|
999
|
+
class AXCronSecondsComponent {
|
1000
|
+
constructor() {
|
1001
|
+
this.secondsService = inject(SecondsService);
|
1002
|
+
this.dropdownList = [];
|
1003
|
+
this.zeroTo59 = [];
|
1004
|
+
this.#init = afterNextRender(() => {
|
1005
|
+
for (let i = 0; i < 60; i++) {
|
1006
|
+
this.zeroTo59[i] = i;
|
1007
|
+
this.dropdownList[i] = new DropDownItem(i, i.toString());
|
1008
|
+
}
|
1009
|
+
});
|
1010
|
+
}
|
1011
|
+
#init;
|
1012
|
+
changeHandler(e) {
|
1013
|
+
this.secondsService.secondModel.custom.specific.values = e.component.selectedItems;
|
1014
|
+
}
|
1015
|
+
get isCustom() {
|
1016
|
+
return this.secondsService.secondModel.type === Type.Every ? false : true;
|
1017
|
+
}
|
1018
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCronSecondsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
1019
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXCronSecondsComponent, selector: "ax-cron-seconds", ngImport: i0, template: "<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"every\"\n id=\"option1\"\n value=\"every\"\n [(ngModel)]=\"secondsService.secondModel.type\"\n checked\n />\n <label>{{ 'Every' | translate | async }} {{ 'time.second' | translate | async }}</label>\n</div>\n\n<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"custom\"\n id=\"option2\"\n value=\"custom\"\n [(ngModel)]=\"secondsService.secondModel.type\"\n />\n <label>{{ 'Custom' | translate | async }}</label>\n</div>\n\n<div class=\"ax-block-container\">\n <div class=\"ax-every-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"secondsService.secondModel.custom.repeat.isRepeat\">\n </ax-check-box>\n\n <span>{{ 'Every' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"zeroTo59\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"secondsService.secondModel.custom.repeat.interval\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'second(s) starting at second' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"zeroTo59\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"secondsService.secondModel.custom.repeat.startAt\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n\n <div class=\"ax-specific-container\">\n <div class=\"ax-flex-container\">\n <ax-check-box\n [disabled]=\"!isCustom\"\n [(ngModel)]=\"secondsService.secondModel.custom.specific.isSpecific\"\n >\n </ax-check-box>\n <label>\n {{ 'Specific second(s) (choose one or many)' | translate | async }}\n </label>\n </div>\n\n <ax-form>\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"dropdownList\"\n textField=\"text\"\n valueField=\"id\"\n [placeholder]=\"'select second(s)' | translate | async\"\n [multiple]=\"true\"\n (onValueChanged)=\"changeHandler($event)\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n\n <div class=\"ax-between-container\">\n <div class=\"ax-flex-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"secondsService.secondModel.custom.between.isBetween\">\n </ax-check-box>\n <label>\n {{ 'Every' | translate | async }} {{ 'time.second' | translate | async }}\n {{ 'between' | translate | async }} {{ 'time.second' | translate | async }}\n </label>\n </div>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"zeroTo59\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"secondsService.secondModel.custom.between.from\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'and' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"zeroTo59\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"secondsService.secondModel.custom.between.to\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n</div>\n", styles: ["ax-cron-day .ax-radio-container,ax-cron-hours .ax-radio-container,ax-cron-minutes .ax-radio-container,ax-cron-month .ax-radio-container,ax-cron-seconds .ax-radio-container,ax-cron-year .ax-radio-container{margin-bottom:.5rem;display:flex;align-items:center}ax-cron-day .ax-radio-container input,ax-cron-hours .ax-radio-container input,ax-cron-minutes .ax-radio-container input,ax-cron-month .ax-radio-container input,ax-cron-seconds .ax-radio-container input,ax-cron-year .ax-radio-container input{margin-inline-end:.5rem}ax-cron-day .ax-block-container,ax-cron-hours .ax-block-container,ax-cron-minutes .ax-block-container,ax-cron-month .ax-block-container,ax-cron-seconds .ax-block-container,ax-cron-year .ax-block-container{padding-inline-start:1.5rem}ax-cron-day .ax-block-container .ax-every-container,ax-cron-hours .ax-block-container .ax-every-container,ax-cron-minutes .ax-block-container .ax-every-container,ax-cron-month .ax-block-container .ax-every-container,ax-cron-seconds .ax-block-container .ax-every-container,ax-cron-year .ax-block-container .ax-every-container{display:flex;align-items:center}ax-cron-day .ax-block-container .ax-every-container ax-form,ax-cron-hours .ax-block-container .ax-every-container ax-form,ax-cron-minutes .ax-block-container .ax-every-container ax-form,ax-cron-month .ax-block-container .ax-every-container ax-form,ax-cron-seconds .ax-block-container .ax-every-container ax-form,ax-cron-year .ax-block-container .ax-every-container ax-form{width:fit-content;margin-inline:.5rem}ax-cron-day .ax-block-container .ax-specific-container,ax-cron-hours .ax-block-container .ax-specific-container,ax-cron-minutes .ax-block-container .ax-specific-container,ax-cron-month .ax-block-container .ax-specific-container,ax-cron-seconds .ax-block-container .ax-specific-container,ax-cron-year .ax-block-container .ax-specific-container{margin-block:.5rem}ax-cron-day .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-hours .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-minutes .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-month .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-seconds .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-year .ax-block-container .ax-specific-container .ax-flex-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-between-container,ax-cron-hours .ax-block-container .ax-between-container,ax-cron-minutes .ax-block-container .ax-between-container,ax-cron-month .ax-block-container .ax-between-container,ax-cron-seconds .ax-block-container .ax-between-container,ax-cron-year .ax-block-container .ax-between-container{display:flex;align-items:center}ax-cron-day .ax-block-container .ax-between-container .ax-flex-container,ax-cron-hours .ax-block-container .ax-between-container .ax-flex-container,ax-cron-minutes .ax-block-container .ax-between-container .ax-flex-container,ax-cron-month .ax-block-container .ax-between-container .ax-flex-container,ax-cron-seconds .ax-block-container .ax-between-container .ax-flex-container,ax-cron-year .ax-block-container .ax-between-container .ax-flex-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-between-container ax-form,ax-cron-hours .ax-block-container .ax-between-container ax-form,ax-cron-minutes .ax-block-container .ax-between-container ax-form,ax-cron-month .ax-block-container .ax-between-container ax-form,ax-cron-seconds .ax-block-container .ax-between-container ax-form,ax-cron-year .ax-block-container .ax-between-container ax-form{width:fit-content;margin-inline:.5rem}ax-cron-day .ax-block-container .ax-week-container,ax-cron-hours .ax-block-container .ax-week-container,ax-cron-minutes .ax-block-container .ax-week-container,ax-cron-month .ax-block-container .ax-week-container,ax-cron-seconds .ax-block-container .ax-week-container,ax-cron-year .ax-block-container .ax-week-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-week-container ax-form,ax-cron-hours .ax-block-container .ax-week-container ax-form,ax-cron-minutes .ax-block-container .ax-week-container ax-form,ax-cron-month .ax-block-container .ax-week-container ax-form,ax-cron-seconds .ax-block-container .ax-week-container ax-form,ax-cron-year .ax-block-container .ax-week-container ax-form{width:fit-content;margin-inline:.5rem}\n"], dependencies: [{ kind: "component", type: i1.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "textTemplate", "dataSource", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "component", type: i4.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i4.AXFormComponent, selector: "ax-form", inputs: ["labelMode", "messageStyle", "updateOn"], outputs: ["onValidate", "updateOnChange"] }, { kind: "component", type: i5.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "checked", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i7.AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
1020
|
+
}
|
1021
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCronSecondsComponent, decorators: [{
|
1022
|
+
type: Component,
|
1023
|
+
args: [{ selector: 'ax-cron-seconds', encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"every\"\n id=\"option1\"\n value=\"every\"\n [(ngModel)]=\"secondsService.secondModel.type\"\n checked\n />\n <label>{{ 'Every' | translate | async }} {{ 'time.second' | translate | async }}</label>\n</div>\n\n<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"custom\"\n id=\"option2\"\n value=\"custom\"\n [(ngModel)]=\"secondsService.secondModel.type\"\n />\n <label>{{ 'Custom' | translate | async }}</label>\n</div>\n\n<div class=\"ax-block-container\">\n <div class=\"ax-every-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"secondsService.secondModel.custom.repeat.isRepeat\">\n </ax-check-box>\n\n <span>{{ 'Every' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"zeroTo59\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"secondsService.secondModel.custom.repeat.interval\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'second(s) starting at second' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"zeroTo59\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"secondsService.secondModel.custom.repeat.startAt\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n\n <div class=\"ax-specific-container\">\n <div class=\"ax-flex-container\">\n <ax-check-box\n [disabled]=\"!isCustom\"\n [(ngModel)]=\"secondsService.secondModel.custom.specific.isSpecific\"\n >\n </ax-check-box>\n <label>\n {{ 'Specific second(s) (choose one or many)' | translate | async }}\n </label>\n </div>\n\n <ax-form>\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"dropdownList\"\n textField=\"text\"\n valueField=\"id\"\n [placeholder]=\"'select second(s)' | translate | async\"\n [multiple]=\"true\"\n (onValueChanged)=\"changeHandler($event)\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n\n <div class=\"ax-between-container\">\n <div class=\"ax-flex-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"secondsService.secondModel.custom.between.isBetween\">\n </ax-check-box>\n <label>\n {{ 'Every' | translate | async }} {{ 'time.second' | translate | async }}\n {{ 'between' | translate | async }} {{ 'time.second' | translate | async }}\n </label>\n </div>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"zeroTo59\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"secondsService.secondModel.custom.between.from\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'and' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"zeroTo59\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"secondsService.secondModel.custom.between.to\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n</div>\n", styles: ["ax-cron-day .ax-radio-container,ax-cron-hours .ax-radio-container,ax-cron-minutes .ax-radio-container,ax-cron-month .ax-radio-container,ax-cron-seconds .ax-radio-container,ax-cron-year .ax-radio-container{margin-bottom:.5rem;display:flex;align-items:center}ax-cron-day .ax-radio-container input,ax-cron-hours .ax-radio-container input,ax-cron-minutes .ax-radio-container input,ax-cron-month .ax-radio-container input,ax-cron-seconds .ax-radio-container input,ax-cron-year .ax-radio-container input{margin-inline-end:.5rem}ax-cron-day .ax-block-container,ax-cron-hours .ax-block-container,ax-cron-minutes .ax-block-container,ax-cron-month .ax-block-container,ax-cron-seconds .ax-block-container,ax-cron-year .ax-block-container{padding-inline-start:1.5rem}ax-cron-day .ax-block-container .ax-every-container,ax-cron-hours .ax-block-container .ax-every-container,ax-cron-minutes .ax-block-container .ax-every-container,ax-cron-month .ax-block-container .ax-every-container,ax-cron-seconds .ax-block-container .ax-every-container,ax-cron-year .ax-block-container .ax-every-container{display:flex;align-items:center}ax-cron-day .ax-block-container .ax-every-container ax-form,ax-cron-hours .ax-block-container .ax-every-container ax-form,ax-cron-minutes .ax-block-container .ax-every-container ax-form,ax-cron-month .ax-block-container .ax-every-container ax-form,ax-cron-seconds .ax-block-container .ax-every-container ax-form,ax-cron-year .ax-block-container .ax-every-container ax-form{width:fit-content;margin-inline:.5rem}ax-cron-day .ax-block-container .ax-specific-container,ax-cron-hours .ax-block-container .ax-specific-container,ax-cron-minutes .ax-block-container .ax-specific-container,ax-cron-month .ax-block-container .ax-specific-container,ax-cron-seconds .ax-block-container .ax-specific-container,ax-cron-year .ax-block-container .ax-specific-container{margin-block:.5rem}ax-cron-day .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-hours .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-minutes .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-month .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-seconds .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-year .ax-block-container .ax-specific-container .ax-flex-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-between-container,ax-cron-hours .ax-block-container .ax-between-container,ax-cron-minutes .ax-block-container .ax-between-container,ax-cron-month .ax-block-container .ax-between-container,ax-cron-seconds .ax-block-container .ax-between-container,ax-cron-year .ax-block-container .ax-between-container{display:flex;align-items:center}ax-cron-day .ax-block-container .ax-between-container .ax-flex-container,ax-cron-hours .ax-block-container .ax-between-container .ax-flex-container,ax-cron-minutes .ax-block-container .ax-between-container .ax-flex-container,ax-cron-month .ax-block-container .ax-between-container .ax-flex-container,ax-cron-seconds .ax-block-container .ax-between-container .ax-flex-container,ax-cron-year .ax-block-container .ax-between-container .ax-flex-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-between-container ax-form,ax-cron-hours .ax-block-container .ax-between-container ax-form,ax-cron-minutes .ax-block-container .ax-between-container ax-form,ax-cron-month .ax-block-container .ax-between-container ax-form,ax-cron-seconds .ax-block-container .ax-between-container ax-form,ax-cron-year .ax-block-container .ax-between-container ax-form{width:fit-content;margin-inline:.5rem}ax-cron-day .ax-block-container .ax-week-container,ax-cron-hours .ax-block-container .ax-week-container,ax-cron-minutes .ax-block-container .ax-week-container,ax-cron-month .ax-block-container .ax-week-container,ax-cron-seconds .ax-block-container .ax-week-container,ax-cron-year .ax-block-container .ax-week-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-week-container ax-form,ax-cron-hours .ax-block-container .ax-week-container ax-form,ax-cron-minutes .ax-block-container .ax-week-container ax-form,ax-cron-month .ax-block-container .ax-week-container ax-form,ax-cron-seconds .ax-block-container .ax-week-container ax-form,ax-cron-year .ax-block-container .ax-week-container ax-form{width:fit-content;margin-inline:.5rem}\n"] }]
|
1024
|
+
}] });
|
1025
|
+
|
1026
|
+
class AXCronYearComponent {
|
1027
|
+
constructor() {
|
1028
|
+
this.yearService = inject(YearService);
|
1029
|
+
this.dropdownList = [];
|
1030
|
+
this.oneTo100 = [];
|
1031
|
+
this.#init = afterNextRender(() => {
|
1032
|
+
for (let i = 0; i < 100; i++) {
|
1033
|
+
const year = this.getYearByOffset(i);
|
1034
|
+
this.dropdownList[i] = new DropDownItem(year, year.toString());
|
1035
|
+
}
|
1036
|
+
for (let i = 0; i < 100; i++) {
|
1037
|
+
this.oneTo100[i] = new DropDownItem(i, (i + 1).toString());
|
1038
|
+
}
|
1039
|
+
});
|
1040
|
+
}
|
1041
|
+
#init;
|
1042
|
+
changeHandler(e) {
|
1043
|
+
this.yearService.yearModel.custom.specific.values = e.component.selectedItems;
|
1044
|
+
}
|
1045
|
+
get isCustom() {
|
1046
|
+
return this.yearService.yearModel.type === Type.Every ? false : true;
|
1047
|
+
}
|
1048
|
+
getYearByOffset(offset) {
|
1049
|
+
const currentYear = new Date().getFullYear();
|
1050
|
+
return currentYear + offset;
|
1051
|
+
}
|
1052
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCronYearComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
1053
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXCronYearComponent, selector: "ax-cron-year", ngImport: i0, template: "<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"every\"\n id=\"option1\"\n value=\"every\"\n [(ngModel)]=\"yearService.yearModel.type\"\n checked\n />\n <label>{{ 'Every' | translate | async }} {{ 'time.year' | translate | async }}</label>\n</div>\n\n<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"custom\"\n id=\"option2\"\n value=\"custom\"\n [(ngModel)]=\"yearService.yearModel.type\"\n />\n <label>{{ 'Custom' | translate | async }}</label>\n</div>\n\n<div class=\"ax-block-container\">\n <div class=\"ax-every-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"yearService.yearModel.custom.repeat.isRepeat\">\n </ax-check-box>\n\n <span>{{ 'Every' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n textField=\"text\"\n valueField=\"id\"\n [disabled]=\"!isCustom\"\n [dataSource]=\"oneTo100\"\n [(ngModel)]=\"yearService.yearModel.custom.repeat.interval\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'year(s) starting at year' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"dropdownList\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"yearService.yearModel.custom.repeat.startAt\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n\n <div class=\"ax-specific-container\">\n <div class=\"ax-flex-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"yearService.yearModel.custom.specific.isSpecific\">\n </ax-check-box>\n <label>\n {{ 'Specific year(s) (choose one or many)' | translate | async }}\n </label>\n </div>\n\n <ax-form>\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"dropdownList\"\n textField=\"text\"\n valueField=\"id\"\n [placeholder]=\"'select year(s)' | translate | async\"\n [multiple]=\"true\"\n (onValueChanged)=\"changeHandler($event)\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n\n <div class=\"ax-between-container\">\n <div class=\"ax-flex-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"yearService.yearModel.custom.between.isBetween\">\n </ax-check-box>\n <label>\n {{ 'Every' | translate | async }} {{ 'time.year' | translate | async }}\n {{ 'between' | translate | async }} {{ 'time.year' | translate | async }}\n </label>\n </div>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"dropdownList\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"yearService.yearModel.custom.between.from\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'and' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"dropdownList\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"yearService.yearModel.custom.between.to\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n</div>\n", styles: ["ax-cron-day .ax-radio-container,ax-cron-hours .ax-radio-container,ax-cron-minutes .ax-radio-container,ax-cron-month .ax-radio-container,ax-cron-seconds .ax-radio-container,ax-cron-year .ax-radio-container{margin-bottom:.5rem;display:flex;align-items:center}ax-cron-day .ax-radio-container input,ax-cron-hours .ax-radio-container input,ax-cron-minutes .ax-radio-container input,ax-cron-month .ax-radio-container input,ax-cron-seconds .ax-radio-container input,ax-cron-year .ax-radio-container input{margin-inline-end:.5rem}ax-cron-day .ax-block-container,ax-cron-hours .ax-block-container,ax-cron-minutes .ax-block-container,ax-cron-month .ax-block-container,ax-cron-seconds .ax-block-container,ax-cron-year .ax-block-container{padding-inline-start:1.5rem}ax-cron-day .ax-block-container .ax-every-container,ax-cron-hours .ax-block-container .ax-every-container,ax-cron-minutes .ax-block-container .ax-every-container,ax-cron-month .ax-block-container .ax-every-container,ax-cron-seconds .ax-block-container .ax-every-container,ax-cron-year .ax-block-container .ax-every-container{display:flex;align-items:center}ax-cron-day .ax-block-container .ax-every-container ax-form,ax-cron-hours .ax-block-container .ax-every-container ax-form,ax-cron-minutes .ax-block-container .ax-every-container ax-form,ax-cron-month .ax-block-container .ax-every-container ax-form,ax-cron-seconds .ax-block-container .ax-every-container ax-form,ax-cron-year .ax-block-container .ax-every-container ax-form{width:fit-content;margin-inline:.5rem}ax-cron-day .ax-block-container .ax-specific-container,ax-cron-hours .ax-block-container .ax-specific-container,ax-cron-minutes .ax-block-container .ax-specific-container,ax-cron-month .ax-block-container .ax-specific-container,ax-cron-seconds .ax-block-container .ax-specific-container,ax-cron-year .ax-block-container .ax-specific-container{margin-block:.5rem}ax-cron-day .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-hours .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-minutes .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-month .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-seconds .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-year .ax-block-container .ax-specific-container .ax-flex-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-between-container,ax-cron-hours .ax-block-container .ax-between-container,ax-cron-minutes .ax-block-container .ax-between-container,ax-cron-month .ax-block-container .ax-between-container,ax-cron-seconds .ax-block-container .ax-between-container,ax-cron-year .ax-block-container .ax-between-container{display:flex;align-items:center}ax-cron-day .ax-block-container .ax-between-container .ax-flex-container,ax-cron-hours .ax-block-container .ax-between-container .ax-flex-container,ax-cron-minutes .ax-block-container .ax-between-container .ax-flex-container,ax-cron-month .ax-block-container .ax-between-container .ax-flex-container,ax-cron-seconds .ax-block-container .ax-between-container .ax-flex-container,ax-cron-year .ax-block-container .ax-between-container .ax-flex-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-between-container ax-form,ax-cron-hours .ax-block-container .ax-between-container ax-form,ax-cron-minutes .ax-block-container .ax-between-container ax-form,ax-cron-month .ax-block-container .ax-between-container ax-form,ax-cron-seconds .ax-block-container .ax-between-container ax-form,ax-cron-year .ax-block-container .ax-between-container ax-form{width:fit-content;margin-inline:.5rem}ax-cron-day .ax-block-container .ax-week-container,ax-cron-hours .ax-block-container .ax-week-container,ax-cron-minutes .ax-block-container .ax-week-container,ax-cron-month .ax-block-container .ax-week-container,ax-cron-seconds .ax-block-container .ax-week-container,ax-cron-year .ax-block-container .ax-week-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-week-container ax-form,ax-cron-hours .ax-block-container .ax-week-container ax-form,ax-cron-minutes .ax-block-container .ax-week-container ax-form,ax-cron-month .ax-block-container .ax-week-container ax-form,ax-cron-seconds .ax-block-container .ax-week-container ax-form,ax-cron-year .ax-block-container .ax-week-container ax-form{width:fit-content;margin-inline:.5rem}\n"], dependencies: [{ kind: "component", type: i1.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "textTemplate", "dataSource", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "component", type: i4.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i4.AXFormComponent, selector: "ax-form", inputs: ["labelMode", "messageStyle", "updateOn"], outputs: ["onValidate", "updateOnChange"] }, { kind: "component", type: i5.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "checked", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i7.AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
1054
|
+
}
|
1055
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCronYearComponent, decorators: [{
|
1056
|
+
type: Component,
|
1057
|
+
args: [{ selector: 'ax-cron-year', encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"every\"\n id=\"option1\"\n value=\"every\"\n [(ngModel)]=\"yearService.yearModel.type\"\n checked\n />\n <label>{{ 'Every' | translate | async }} {{ 'time.year' | translate | async }}</label>\n</div>\n\n<div class=\"ax-radio-container\">\n <input\n class=\"ax-radio\"\n type=\"radio\"\n name=\"custom\"\n id=\"option2\"\n value=\"custom\"\n [(ngModel)]=\"yearService.yearModel.type\"\n />\n <label>{{ 'Custom' | translate | async }}</label>\n</div>\n\n<div class=\"ax-block-container\">\n <div class=\"ax-every-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"yearService.yearModel.custom.repeat.isRepeat\">\n </ax-check-box>\n\n <span>{{ 'Every' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n textField=\"text\"\n valueField=\"id\"\n [disabled]=\"!isCustom\"\n [dataSource]=\"oneTo100\"\n [(ngModel)]=\"yearService.yearModel.custom.repeat.interval\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'year(s) starting at year' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"dropdownList\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"yearService.yearModel.custom.repeat.startAt\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n\n <div class=\"ax-specific-container\">\n <div class=\"ax-flex-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"yearService.yearModel.custom.specific.isSpecific\">\n </ax-check-box>\n <label>\n {{ 'Specific year(s) (choose one or many)' | translate | async }}\n </label>\n </div>\n\n <ax-form>\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"dropdownList\"\n textField=\"text\"\n valueField=\"id\"\n [placeholder]=\"'select year(s)' | translate | async\"\n [multiple]=\"true\"\n (onValueChanged)=\"changeHandler($event)\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n\n <div class=\"ax-between-container\">\n <div class=\"ax-flex-container\">\n <ax-check-box [disabled]=\"!isCustom\" [(ngModel)]=\"yearService.yearModel.custom.between.isBetween\">\n </ax-check-box>\n <label>\n {{ 'Every' | translate | async }} {{ 'time.year' | translate | async }}\n {{ 'between' | translate | async }} {{ 'time.year' | translate | async }}\n </label>\n </div>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"dropdownList\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"yearService.yearModel.custom.between.from\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n\n <span>{{ 'and' | translate | async }}</span>\n\n <ax-form class=\"ax-sm\">\n <ax-form-field>\n <ax-select-box\n [disabled]=\"!isCustom\"\n [dataSource]=\"dropdownList\"\n textField=\"text\"\n valueField=\"id\"\n [(ngModel)]=\"yearService.yearModel.custom.between.to\"\n >\n </ax-select-box>\n </ax-form-field>\n </ax-form>\n </div>\n</div>\n", styles: ["ax-cron-day .ax-radio-container,ax-cron-hours .ax-radio-container,ax-cron-minutes .ax-radio-container,ax-cron-month .ax-radio-container,ax-cron-seconds .ax-radio-container,ax-cron-year .ax-radio-container{margin-bottom:.5rem;display:flex;align-items:center}ax-cron-day .ax-radio-container input,ax-cron-hours .ax-radio-container input,ax-cron-minutes .ax-radio-container input,ax-cron-month .ax-radio-container input,ax-cron-seconds .ax-radio-container input,ax-cron-year .ax-radio-container input{margin-inline-end:.5rem}ax-cron-day .ax-block-container,ax-cron-hours .ax-block-container,ax-cron-minutes .ax-block-container,ax-cron-month .ax-block-container,ax-cron-seconds .ax-block-container,ax-cron-year .ax-block-container{padding-inline-start:1.5rem}ax-cron-day .ax-block-container .ax-every-container,ax-cron-hours .ax-block-container .ax-every-container,ax-cron-minutes .ax-block-container .ax-every-container,ax-cron-month .ax-block-container .ax-every-container,ax-cron-seconds .ax-block-container .ax-every-container,ax-cron-year .ax-block-container .ax-every-container{display:flex;align-items:center}ax-cron-day .ax-block-container .ax-every-container ax-form,ax-cron-hours .ax-block-container .ax-every-container ax-form,ax-cron-minutes .ax-block-container .ax-every-container ax-form,ax-cron-month .ax-block-container .ax-every-container ax-form,ax-cron-seconds .ax-block-container .ax-every-container ax-form,ax-cron-year .ax-block-container .ax-every-container ax-form{width:fit-content;margin-inline:.5rem}ax-cron-day .ax-block-container .ax-specific-container,ax-cron-hours .ax-block-container .ax-specific-container,ax-cron-minutes .ax-block-container .ax-specific-container,ax-cron-month .ax-block-container .ax-specific-container,ax-cron-seconds .ax-block-container .ax-specific-container,ax-cron-year .ax-block-container .ax-specific-container{margin-block:.5rem}ax-cron-day .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-hours .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-minutes .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-month .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-seconds .ax-block-container .ax-specific-container .ax-flex-container,ax-cron-year .ax-block-container .ax-specific-container .ax-flex-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-between-container,ax-cron-hours .ax-block-container .ax-between-container,ax-cron-minutes .ax-block-container .ax-between-container,ax-cron-month .ax-block-container .ax-between-container,ax-cron-seconds .ax-block-container .ax-between-container,ax-cron-year .ax-block-container .ax-between-container{display:flex;align-items:center}ax-cron-day .ax-block-container .ax-between-container .ax-flex-container,ax-cron-hours .ax-block-container .ax-between-container .ax-flex-container,ax-cron-minutes .ax-block-container .ax-between-container .ax-flex-container,ax-cron-month .ax-block-container .ax-between-container .ax-flex-container,ax-cron-seconds .ax-block-container .ax-between-container .ax-flex-container,ax-cron-year .ax-block-container .ax-between-container .ax-flex-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-between-container ax-form,ax-cron-hours .ax-block-container .ax-between-container ax-form,ax-cron-minutes .ax-block-container .ax-between-container ax-form,ax-cron-month .ax-block-container .ax-between-container ax-form,ax-cron-seconds .ax-block-container .ax-between-container ax-form,ax-cron-year .ax-block-container .ax-between-container ax-form{width:fit-content;margin-inline:.5rem}ax-cron-day .ax-block-container .ax-week-container,ax-cron-hours .ax-block-container .ax-week-container,ax-cron-minutes .ax-block-container .ax-week-container,ax-cron-month .ax-block-container .ax-week-container,ax-cron-seconds .ax-block-container .ax-week-container,ax-cron-year .ax-block-container .ax-week-container{display:flex;align-items:center;margin-bottom:.5rem}ax-cron-day .ax-block-container .ax-week-container ax-form,ax-cron-hours .ax-block-container .ax-week-container ax-form,ax-cron-minutes .ax-block-container .ax-week-container ax-form,ax-cron-month .ax-block-container .ax-week-container ax-form,ax-cron-seconds .ax-block-container .ax-week-container ax-form,ax-cron-year .ax-block-container .ax-week-container ax-form{width:fit-content;margin-inline:.5rem}\n"] }]
|
1058
|
+
}] });
|
1059
|
+
|
1060
|
+
class AXCronJobContainerComponent {
|
1061
|
+
constructor() {
|
1062
|
+
this.tabComponent = viewChild(AXTabsComponent);
|
1063
|
+
this.activeTab = signal('Seconds');
|
1064
|
+
this.expResult = '* * * ? * * *';
|
1065
|
+
this.onExpressionChange = output();
|
1066
|
+
this.#init = afterNextRender(() => {
|
1067
|
+
this.tabComponent().onActiveTabChanged.subscribe((e) => {
|
1068
|
+
this.activeTab.set(e.tab.key);
|
1069
|
+
});
|
1070
|
+
});
|
1071
|
+
this.options = signal({
|
1072
|
+
fit: true,
|
1073
|
+
look: 'with-line',
|
1074
|
+
location: 'bottom',
|
1075
|
+
});
|
1076
|
+
this.secondsService = inject(SecondsService);
|
1077
|
+
this.minutesService = inject(MinutesService);
|
1078
|
+
this.hoursService = inject(HoursService);
|
1079
|
+
this.monthService = inject(MonthService);
|
1080
|
+
this.dayService = inject(DayService);
|
1081
|
+
this.yearService = inject(YearService);
|
1082
|
+
}
|
1083
|
+
#init;
|
1084
|
+
onGetModel() {
|
1085
|
+
const secondsExp = this.secondsService.getExpression();
|
1086
|
+
const minutesExp = this.minutesService.getExpression();
|
1087
|
+
const hoursExp = this.hoursService.getExpression();
|
1088
|
+
const monthExp = this.monthService.getExpression();
|
1089
|
+
const dayExp = this.dayService.getExpression();
|
1090
|
+
const yearExp = this.yearService.getExpression();
|
1091
|
+
this.expResult = `${secondsExp} ${minutesExp} ${hoursExp} ${dayExp[1]} ${monthExp} ${dayExp[0]} ${yearExp}`;
|
1092
|
+
this.onExpressionChange.emit({ data: this.expResult, component: this });
|
1093
|
+
}
|
1094
|
+
reverseExpression(cronExpressionPattern) {
|
1095
|
+
this.expResult = this.dayService.expressionValidation(this.expResult, cronExpressionPattern);
|
1096
|
+
this.secondsService.reversExpression(cronExpressionPattern);
|
1097
|
+
this.minutesService.reversExpression(cronExpressionPattern);
|
1098
|
+
this.hoursService.reversExpression(cronExpressionPattern);
|
1099
|
+
this.dayService.reversExpression(cronExpressionPattern);
|
1100
|
+
this.monthService.reversExpression(cronExpressionPattern);
|
1101
|
+
this.yearService.reversExpression(cronExpressionPattern);
|
1102
|
+
}
|
1103
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCronJobContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
1104
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXCronJobContainerComponent, selector: "ax-cron-job-container", outputs: { onExpressionChange: "onExpressionChange" }, providers: [
|
1105
|
+
SecondsService,
|
1106
|
+
MinutesService,
|
1107
|
+
HoursService,
|
1108
|
+
DayService,
|
1109
|
+
MonthService,
|
1110
|
+
YearService,
|
1111
|
+
StringService,
|
1112
|
+
], viewQueries: [{ propertyName: "tabComponent", first: true, predicate: AXTabsComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<ax-tabs [look]=\"options().look\" [fitParent]=\"options().fit\" [location]=\"options().location\">\n <ax-tab-item key=\"Seconds\" [text]=\"'time.Seconds' | translate | async\"> </ax-tab-item>\n <ax-tab-item key=\"Minutes\" [text]=\"'time.Minutes' | translate | async\"> </ax-tab-item>\n <ax-tab-item key=\"Hours\" [text]=\"'time.Hours' | translate | async\"> </ax-tab-item>\n <ax-tab-item key=\"Days\" [text]=\"'time.Days' | translate | async\"></ax-tab-item>\n <ax-tab-item key=\"Months\" [text]=\"'time.Months' | translate | async\"></ax-tab-item>\n <ax-tab-item key=\"Years\" [text]=\"'time.Years' | translate | async\"></ax-tab-item>\n</ax-tabs>\n\n<div class=\"ax-cron-tools-container\">\n @switch (activeTab()) {\n @case ('Seconds') {\n <ax-cron-seconds></ax-cron-seconds>\n }\n @case ('Minutes') {\n <ax-cron-minutes></ax-cron-minutes>\n }\n @case ('Hours') {\n <ax-cron-hours></ax-cron-hours>\n }\n @case ('Days') {\n <ax-cron-day></ax-cron-day>\n }\n @case ('Months') {\n <ax-cron-month></ax-cron-month>\n }\n @case ('Years') {\n <ax-cron-year></ax-cron-year>\n }\n }\n</div>\n\n<div class=\"ax-btn-result-container\">\n <ax-button\n color=\"primary\"\n [text]=\"'Generate Expression' | translate | async\"\n class=\"btn btn-success\"\n (click)=\"onGetModel()\"\n ></ax-button>\n\n <div>\n <ax-text-box [ngModel]=\"expResult\" (ngModelChange)=\"reverseExpression($event)\">\n <ax-clear-button></ax-clear-button>\n </ax-text-box>\n </div>\n</div>\n", styles: ["ax-cron-job-container{border:1px solid rgb(var(--ax-color-border-default));border-radius:var(--ax-rounded-border-default);overflow:hidden}.ax-btn-result-container{padding:.5rem 1rem;display:flex;justify-content:space-between;align-items:center}.ax-btn-result-container ax-button{margin-inline-end:1rem}.ax-cron-tools-container{padding:1rem;border-bottom:1px solid rgb(var(--ax-color-border-default))}\n"], dependencies: [{ kind: "component", type: i1$1.AXTabsComponent, selector: "ax-tabs", inputs: ["look", "location", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged"] }, { kind: "component", type: i1$1.AXTabItemComponent, selector: "ax-tab-item", inputs: ["disabled", "text", "key", "headerTemplate", "active"], outputs: ["disabledChange", "onClick", "onBlur", "onFocus", "activeChange"] }, { kind: "component", type: i1.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4$1.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "mask-options", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "component", type: i5$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: AXCronDayComponent, selector: "ax-cron-day" }, { kind: "component", type: AXCronHoursComponent, selector: "ax-cron-hours" }, { kind: "component", type: AXCronMinutesComponent, selector: "ax-cron-minutes" }, { kind: "component", type: AXCronMonthComponent, selector: "ax-cron-month" }, { kind: "component", type: AXCronSecondsComponent, selector: "ax-cron-seconds" }, { kind: "component", type: AXCronYearComponent, selector: "ax-cron-year" }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i7.AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
1113
|
+
}
|
1114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCronJobContainerComponent, decorators: [{
|
1115
|
+
type: Component,
|
1116
|
+
args: [{ selector: 'ax-cron-job-container', providers: [
|
1117
|
+
SecondsService,
|
1118
|
+
MinutesService,
|
1119
|
+
HoursService,
|
1120
|
+
DayService,
|
1121
|
+
MonthService,
|
1122
|
+
YearService,
|
1123
|
+
StringService,
|
1124
|
+
], encapsulation: ViewEncapsulation.None, template: "<ax-tabs [look]=\"options().look\" [fitParent]=\"options().fit\" [location]=\"options().location\">\n <ax-tab-item key=\"Seconds\" [text]=\"'time.Seconds' | translate | async\"> </ax-tab-item>\n <ax-tab-item key=\"Minutes\" [text]=\"'time.Minutes' | translate | async\"> </ax-tab-item>\n <ax-tab-item key=\"Hours\" [text]=\"'time.Hours' | translate | async\"> </ax-tab-item>\n <ax-tab-item key=\"Days\" [text]=\"'time.Days' | translate | async\"></ax-tab-item>\n <ax-tab-item key=\"Months\" [text]=\"'time.Months' | translate | async\"></ax-tab-item>\n <ax-tab-item key=\"Years\" [text]=\"'time.Years' | translate | async\"></ax-tab-item>\n</ax-tabs>\n\n<div class=\"ax-cron-tools-container\">\n @switch (activeTab()) {\n @case ('Seconds') {\n <ax-cron-seconds></ax-cron-seconds>\n }\n @case ('Minutes') {\n <ax-cron-minutes></ax-cron-minutes>\n }\n @case ('Hours') {\n <ax-cron-hours></ax-cron-hours>\n }\n @case ('Days') {\n <ax-cron-day></ax-cron-day>\n }\n @case ('Months') {\n <ax-cron-month></ax-cron-month>\n }\n @case ('Years') {\n <ax-cron-year></ax-cron-year>\n }\n }\n</div>\n\n<div class=\"ax-btn-result-container\">\n <ax-button\n color=\"primary\"\n [text]=\"'Generate Expression' | translate | async\"\n class=\"btn btn-success\"\n (click)=\"onGetModel()\"\n ></ax-button>\n\n <div>\n <ax-text-box [ngModel]=\"expResult\" (ngModelChange)=\"reverseExpression($event)\">\n <ax-clear-button></ax-clear-button>\n </ax-text-box>\n </div>\n</div>\n", styles: ["ax-cron-job-container{border:1px solid rgb(var(--ax-color-border-default));border-radius:var(--ax-rounded-border-default);overflow:hidden}.ax-btn-result-container{padding:.5rem 1rem;display:flex;justify-content:space-between;align-items:center}.ax-btn-result-container ax-button{margin-inline-end:1rem}.ax-cron-tools-container{padding:1rem;border-bottom:1px solid rgb(var(--ax-color-border-default))}\n"] }]
|
1125
|
+
}] });
|
1126
|
+
|
1127
|
+
const COMPONENT = [
|
1128
|
+
AXCronJobContainerComponent,
|
1129
|
+
AXCronDayComponent,
|
1130
|
+
AXCronHoursComponent,
|
1131
|
+
AXCronMinutesComponent,
|
1132
|
+
AXCronMonthComponent,
|
1133
|
+
AXCronSecondsComponent,
|
1134
|
+
AXCronYearComponent,
|
1135
|
+
];
|
1136
|
+
const MODULES = [
|
1137
|
+
AXTabsModule,
|
1138
|
+
AXBadgeModule,
|
1139
|
+
AXDecoratorModule,
|
1140
|
+
CommonModule,
|
1141
|
+
FormsModule,
|
1142
|
+
AXSelectBoxModule,
|
1143
|
+
AXFormModule,
|
1144
|
+
AXLabelModule,
|
1145
|
+
AXCheckBoxModule,
|
1146
|
+
AXTextBoxModule,
|
1147
|
+
AXTranslationModule,
|
1148
|
+
];
|
1149
|
+
class AXCronJobModule {
|
1150
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCronJobModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
1151
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: AXCronJobModule, declarations: [AXCronJobContainerComponent,
|
1152
|
+
AXCronDayComponent,
|
1153
|
+
AXCronHoursComponent,
|
1154
|
+
AXCronMinutesComponent,
|
1155
|
+
AXCronMonthComponent,
|
1156
|
+
AXCronSecondsComponent,
|
1157
|
+
AXCronYearComponent], imports: [AXTabsModule,
|
1158
|
+
AXBadgeModule,
|
1159
|
+
AXDecoratorModule,
|
1160
|
+
CommonModule,
|
1161
|
+
FormsModule,
|
1162
|
+
AXSelectBoxModule,
|
1163
|
+
AXFormModule,
|
1164
|
+
AXLabelModule,
|
1165
|
+
AXCheckBoxModule,
|
1166
|
+
AXTextBoxModule,
|
1167
|
+
AXTranslationModule, AXButtonModule, AXLabelModule], exports: [AXCronJobContainerComponent,
|
1168
|
+
AXCronDayComponent,
|
1169
|
+
AXCronHoursComponent,
|
1170
|
+
AXCronMinutesComponent,
|
1171
|
+
AXCronMonthComponent,
|
1172
|
+
AXCronSecondsComponent,
|
1173
|
+
AXCronYearComponent] }); }
|
1174
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCronJobModule, imports: [MODULES, AXButtonModule, AXLabelModule] }); }
|
1175
|
+
}
|
1176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCronJobModule, decorators: [{
|
1177
|
+
type: NgModule,
|
1178
|
+
args: [{
|
1179
|
+
declarations: [...COMPONENT],
|
1180
|
+
imports: [...MODULES, AXButtonModule, AXLabelModule],
|
1181
|
+
exports: [...COMPONENT],
|
1182
|
+
providers: [],
|
1183
|
+
}]
|
1184
|
+
}] });
|
1185
|
+
|
1186
|
+
/**
|
1187
|
+
* Generated bundle index. Do not edit.
|
1188
|
+
*/
|
1189
|
+
|
1190
|
+
export { AXCronDayComponent, AXCronHoursComponent, AXCronJobContainerComponent, AXCronJobModule, AXCronMinutesComponent, AXCronMonthComponent, AXCronSecondsComponent, AXCronYearComponent };
|
1191
|
+
//# sourceMappingURL=acorex-components-cron-job.mjs.map
|