@openremote/or-scheduler 1.13.0 → 1.14.0-snapshot
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements-jsx.d.ts +131 -53
- package/custom-elements.json +263 -108
- package/dist/umd/index.bundle.js +3612 -628
- package/dist/umd/index.bundle.js.map +1 -1
- package/dist/umd/index.js +3612 -628
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/index.orbundle.js +3611 -627
- package/dist/umd/index.orbundle.js.map +1 -1
- package/lib/index.d.ts +62 -31
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +160 -106
- package/lib/index.js.map +1 -1
- package/lib/types.d.ts +7 -5
- package/lib/types.d.ts.map +1 -1
- package/lib/util.d.ts +61 -23
- package/lib/util.d.ts.map +1 -1
- package/lib/util.js +1 -1
- package/lib/util.js.map +1 -1
- package/package.json +10 -4
package/lib/index.d.ts
CHANGED
|
@@ -1,11 +1,25 @@
|
|
|
1
|
+
import "@openremote/or-icon";
|
|
2
|
+
import "@openremote/or-translate";
|
|
3
|
+
import "@openremote/or-vaadin-components/or-vaadin-button";
|
|
4
|
+
import "@openremote/or-vaadin-components/or-vaadin-checkbox";
|
|
5
|
+
import "@openremote/or-vaadin-components/or-vaadin-checkbox-group";
|
|
6
|
+
import "@openremote/or-vaadin-components/or-vaadin-date-picker";
|
|
7
|
+
import "@openremote/or-vaadin-components/or-vaadin-date-time-picker";
|
|
8
|
+
import "@openremote/or-vaadin-components/or-vaadin-dialog";
|
|
9
|
+
import "@openremote/or-vaadin-components/or-vaadin-icon";
|
|
10
|
+
import "@openremote/or-vaadin-components/or-vaadin-number-field";
|
|
11
|
+
import "@openremote/or-vaadin-components/or-vaadin-radio-group";
|
|
12
|
+
import "@openremote/or-vaadin-components/or-vaadin-select";
|
|
13
|
+
import "@openremote/or-vaadin-components/or-vaadin-multi-select-combo-box";
|
|
14
|
+
import "@openremote/or-vaadin-components/or-vaadin-time-picker";
|
|
1
15
|
import { LitElement, PropertyValues, TemplateResult } from "lit";
|
|
2
16
|
import { CalendarEvent } from "@openremote/model";
|
|
3
|
-
import { InputType } from "@openremote/or-
|
|
4
|
-
import {
|
|
17
|
+
import { InputType } from "@openremote/or-vaadin-components/util";
|
|
18
|
+
import { OrVaadinDialog } from "@openremote/or-vaadin-components/or-vaadin-dialog";
|
|
5
19
|
import { RRule } from "rrule";
|
|
6
|
-
import { EventTypes,
|
|
7
|
-
import type {
|
|
8
|
-
export
|
|
20
|
+
import { EventTypes, RRULE_ENDS } from "./util";
|
|
21
|
+
import type { PartKeys, RRulePartKeys, Frequency, ByRRuleCombination, ByRRulePartsKeys } from "./types";
|
|
22
|
+
export type * from "./types";
|
|
9
23
|
export * from "./util";
|
|
10
24
|
export interface OrSchedulerChangedEventDetail {
|
|
11
25
|
value?: CalendarEvent;
|
|
@@ -14,9 +28,14 @@ export declare class OrSchedulerChangedEvent extends CustomEvent<OrSchedulerChan
|
|
|
14
28
|
static readonly NAME = "or-scheduler-changed";
|
|
15
29
|
constructor(value?: CalendarEvent);
|
|
16
30
|
}
|
|
31
|
+
export declare class OrSchedulerRemovedEvent extends CustomEvent<void> {
|
|
32
|
+
static readonly NAME = "or-scheduler-removed";
|
|
33
|
+
constructor();
|
|
34
|
+
}
|
|
17
35
|
declare global {
|
|
18
36
|
export interface HTMLElementEventMap {
|
|
19
37
|
[OrSchedulerChangedEvent.NAME]: OrSchedulerChangedEvent;
|
|
38
|
+
[OrSchedulerRemovedEvent.NAME]: OrSchedulerRemovedEvent;
|
|
20
39
|
}
|
|
21
40
|
}
|
|
22
41
|
declare const OrScheduler_base: (new (...args: any[]) => {
|
|
@@ -30,55 +49,68 @@ declare const OrScheduler_base: (new (...args: any[]) => {
|
|
|
30
49
|
readonly isConnected: boolean;
|
|
31
50
|
}) & typeof LitElement;
|
|
32
51
|
export declare class OrScheduler extends OrScheduler_base {
|
|
52
|
+
static styles: import("lit").CSSResult;
|
|
33
53
|
defaultSchedule?: CalendarEvent;
|
|
34
54
|
defaultEventTypeLabel: string;
|
|
55
|
+
disableNegativeByPartValues: boolean;
|
|
35
56
|
disabledFrequencies: Frequency[];
|
|
36
|
-
disabledRRuleParts:
|
|
57
|
+
disabledRRuleParts: RRulePartKeys[];
|
|
58
|
+
disabledByPartCombinations: ByRRuleCombination;
|
|
37
59
|
header: string;
|
|
38
60
|
isAllDay: boolean;
|
|
61
|
+
open: boolean;
|
|
62
|
+
removable: boolean;
|
|
39
63
|
schedule?: CalendarEvent;
|
|
40
64
|
timezoneOffset: number;
|
|
41
|
-
protected _ends: keyof typeof rruleEnds;
|
|
42
|
-
protected _normalizedSchedule: CalendarEvent | undefined;
|
|
43
|
-
protected _rrule?: RRule;
|
|
44
|
-
protected dialog?: OrMwcDialog;
|
|
45
|
-
protected _byRRuleParts?: RulePartKey[];
|
|
46
65
|
protected _count: number;
|
|
47
|
-
protected
|
|
66
|
+
protected _ends: keyof typeof RRULE_ENDS;
|
|
48
67
|
protected _eventType: EventTypes;
|
|
49
|
-
protected
|
|
68
|
+
protected _rrule?: RRule;
|
|
69
|
+
protected _dialog: OrVaadinDialog;
|
|
70
|
+
protected _byRRuleParts?: RRulePartKeys[];
|
|
50
71
|
protected _until: Date;
|
|
51
|
-
protected
|
|
52
|
-
protected
|
|
53
|
-
protected
|
|
72
|
+
protected get _scheduleWithOffset(): CalendarEvent | undefined;
|
|
73
|
+
protected set _scheduleWithOffset(schedule: CalendarEvent | undefined);
|
|
74
|
+
protected get _timeLabel(): TemplateResult | undefined;
|
|
75
|
+
connectedCallback(): void;
|
|
76
|
+
shouldUpdate(changedProps: PropertyValues): any;
|
|
77
|
+
protected _setAllDay(): void;
|
|
54
78
|
/**
|
|
55
79
|
* Converts the recurrence rule to string and normalizes it.
|
|
56
80
|
*
|
|
57
81
|
* The UTC timezone offset 'Z' for the UNTIL rule part is removed,
|
|
58
|
-
* because the
|
|
82
|
+
* because the timezone is configurable.
|
|
59
83
|
* @param rrule The recurrence rule to normalize.
|
|
60
84
|
* @returns String representation of the defined Recurrence Rule
|
|
61
85
|
*/
|
|
62
|
-
protected
|
|
63
|
-
protected
|
|
64
|
-
protected
|
|
65
|
-
protected setCalendarEventType(value: any): void;
|
|
86
|
+
protected _getRRule(rrule?: RRule | undefined): string | undefined;
|
|
87
|
+
protected _setRRuleValue(value: any, key: PartKeys): void;
|
|
88
|
+
protected _setCalendarEventType(event: any): void;
|
|
66
89
|
/**
|
|
67
90
|
* Apply the timezone offset to the calendarEvent
|
|
68
91
|
* @param schedule The schedule for which to add/substract the offset
|
|
69
|
-
* @param
|
|
92
|
+
* @param offset The timezone offset in millis to apply
|
|
70
93
|
* @returns The transformed calendar event
|
|
71
94
|
*/
|
|
72
|
-
protected
|
|
95
|
+
protected _applyTimezoneOffset(schedule: CalendarEvent | undefined, offset: number): CalendarEvent | undefined;
|
|
96
|
+
protected _getDefaultMessageOptions(): {
|
|
97
|
+
date: string;
|
|
98
|
+
time: string;
|
|
99
|
+
};
|
|
73
100
|
protected render(): TemplateResult<1>;
|
|
74
|
-
protected
|
|
75
|
-
protected
|
|
101
|
+
protected _getDialogHeader(): TemplateResult;
|
|
102
|
+
protected _getDialogContent(): TemplateResult;
|
|
103
|
+
protected _getDialogFooter(): TemplateResult;
|
|
104
|
+
protected _onClose(): void;
|
|
105
|
+
protected _onDelete(): void;
|
|
106
|
+
protected _onSave(): void;
|
|
107
|
+
protected _onPartChange(part: PartKeys, valueProp: "checked" | "value" | "detail", value?: any): (e: any) => void;
|
|
76
108
|
/**
|
|
77
109
|
* Check if this frequency is allowed
|
|
78
110
|
* @param freq The frequency to check
|
|
79
111
|
* @returns Whether the frequency is allowed
|
|
80
112
|
*/
|
|
81
|
-
protected
|
|
113
|
+
protected _isAllowedFrequency(freq: Frequency): boolean;
|
|
82
114
|
/**
|
|
83
115
|
* Displays the interval, frequency and BY_XXX RRule part fields
|
|
84
116
|
*
|
|
@@ -98,20 +130,19 @@ export declare class OrScheduler extends OrScheduler_base {
|
|
|
98
130
|
*
|
|
99
131
|
* @returns Inputs for the applicable rule parts
|
|
100
132
|
*/
|
|
101
|
-
protected
|
|
133
|
+
protected _getRepeatTemplate(): TemplateResult;
|
|
102
134
|
/**
|
|
103
135
|
* Displays the BY_XXX RRule part fields if allowed by the frequency
|
|
104
136
|
*
|
|
105
137
|
* @returns The specified BY_XXX RRule part field or undefined if not applicable
|
|
106
138
|
*/
|
|
107
|
-
protected
|
|
139
|
+
protected _getByRulePart<T extends number | [string, string]>(part: ByRRulePartsKeys, type: InputType, options: T[]): TemplateResult | undefined;
|
|
108
140
|
/**
|
|
109
141
|
* Displays the fields that define when and how long the particular event is
|
|
110
142
|
*
|
|
111
|
-
* @param calendar The specified calendar event
|
|
112
143
|
* @returns The periods allDay and from/to date and time fields
|
|
113
144
|
*/
|
|
114
|
-
protected
|
|
145
|
+
protected _getPeriodTemplate(): TemplateResult;
|
|
115
146
|
/**
|
|
116
147
|
* Displays the fields that define how a recurring event should end
|
|
117
148
|
*
|
|
@@ -120,6 +151,6 @@ export declare class OrScheduler extends OrScheduler_base {
|
|
|
120
151
|
* - `count`
|
|
121
152
|
* @returns The recurrence ends fields
|
|
122
153
|
*/
|
|
123
|
-
protected
|
|
154
|
+
protected _getEndsTemplate(): TemplateResult;
|
|
124
155
|
}
|
|
125
156
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAmBA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
package/lib/index.js
CHANGED
|
@@ -1,131 +1,185 @@
|
|
|
1
|
-
var __decorate=this&&this.__decorate||function(e,t,i,
|
|
2
|
-
<or-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
var __decorate=this&&this.__decorate||function(e,t,i,a){var r,l=arguments.length,s=l<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(l<3?r(s):l>3?r(t,i,s):r(t,i))||s);return l>3&&s&&Object.defineProperty(t,i,s),s};import"@openremote/or-icon";import{translate as e,i18next as t}from"@openremote/or-translate";import"@openremote/or-vaadin-components/or-vaadin-button";import"@openremote/or-vaadin-components/or-vaadin-checkbox";import"@openremote/or-vaadin-components/or-vaadin-checkbox-group";import"@openremote/or-vaadin-components/or-vaadin-date-picker";import"@openremote/or-vaadin-components/or-vaadin-date-time-picker";import{dialogRenderer as i,dialogHeaderRenderer as a,dialogFooterRenderer as r}from"@openremote/or-vaadin-components/or-vaadin-dialog";import"@openremote/or-vaadin-components/or-vaadin-icon";import"@openremote/or-vaadin-components/or-vaadin-number-field";import"@openremote/or-vaadin-components/or-vaadin-radio-group";import"@openremote/or-vaadin-components/or-vaadin-select";import"@openremote/or-vaadin-components/or-vaadin-multi-select-combo-box";import"@openremote/or-vaadin-components/or-vaadin-time-picker";import{css as l,html as s,LitElement as o}from"lit";import{customElement as n,property as d,query as u,state as c}from"lit/decorators.js";import{when as h}from"lit/directives/when.js";import{Util as p}from"@openremote/core";import{InputType as v}from"@openremote/or-vaadin-components/util";import{Frequency as m,RRule as f}from"rrule";import{BY_RRULE_PARTS as y,EventTypes as _,FREQUENCIES as b,MONTHS as g,RFC_STRICT_NOT_APPLICABLE as O,RRULE_ENDS as $,WEEKDAYS as S}from"./util";import D from"moment";export*from"./util";function range(e,t){return Array.from({length:t-e+1},(t,i)=>e+i)}let byWeekNoOptions=range(-53,53).filter(Boolean),byYearDayOptions=range(-366,366).filter(Boolean),byMonthDayOptions=range(-31,31).filter(Boolean),byHourOptions=range(1,24),byMinuteOrSecondsOptions=range(1,60);export class OrSchedulerChangedEvent extends CustomEvent{constructor(e){super(OrSchedulerChangedEvent.NAME,{detail:{value:e},bubbles:!0,composed:!0})}}OrSchedulerChangedEvent.NAME="or-scheduler-changed";export class OrSchedulerRemovedEvent extends CustomEvent{constructor(){super(OrSchedulerRemovedEvent.NAME,{bubbles:!0,composed:!0})}}OrSchedulerRemovedEvent.NAME="or-scheduler-removed";let OrScheduler=class extends e(t)(o){constructor(){super(...arguments),this.defaultEventTypeLabel="default",this.disableNegativeByPartValues=!1,this.disabledFrequencies=[],this.disabledRRuleParts=[],this.disabledByPartCombinations=O,this.header="scheduleActivity",this.isAllDay=!0,this.open=!1,this.removable=!1,this.schedule=this.defaultSchedule,this.timezoneOffset=0,this._count=1,this._ends="never",this._eventType=_.default,this._until=D().toDate()}get _scheduleWithOffset(){return this._applyTimezoneOffset(this.schedule,this.timezoneOffset)}set _scheduleWithOffset(e){this.schedule=this._applyTimezoneOffset(e,-this.timezoneOffset)}get _timeLabel(){if(this._eventType===_.default)return s`<or-translate value="${this.defaultEventTypeLabel}" .options="${this._getDefaultMessageOptions()}"></or-translate>`;if(this._scheduleWithOffset){let e=this._scheduleWithOffset;if(e.recurrence){let i=D(e.end).diff(e.start,"days"),a={start:D(e.start).format("HH:mm"),end:D(e.end).format("HH:mm")},r=s``;this.isAllDay&&i>0?r=s`<or-translate value="forDays" .options="${{days:i,count:i}}"></or-translate>`:i>0?r=s`<or-translate value="fromToDays" .options="${Object.assign(Object.assign({},a),{days:i,count:i})}"></or-translate>`:0===i&&(r=s`<or-translate value="fromTo" .options="${a}"></or-translate>`);let l=s`<span> ${r}</span>`,o=Object.values(g).map(t.t),n=Object.values(S).map(t.t),d=[n.pop(),...n],u=this._rrule.toText(e=>t.t(`rrule.${e}`),{dayNames:d,monthNames:o,tokens:{}});return s`<span class="time-label"><span>${u}</span>${l}</span>`}let i=this.isAllDay?"DD-MM-YYYY":"DD-MM-YYYY HH:mm";return s`<or-translate value="activeFromTo" .options="${{start:D(e.start).format(i),end:D(e.end).format(i)}}"></or-translate>`}}connectedCallback(){var e,t,i;super.connectedCallback();let a=this._applyTimezoneOffset(null!=(e=this.schedule)?e:this.defaultSchedule,this.timezoneOffset);if((null==a?void 0:a.start)&&(null==a?void 0:a.start)){let e=D(null==a?void 0:a.start),t=D(null==a?void 0:a.end);this.isAllDay=e.isSame(e.clone().startOf("day"))&&t.isSame(t.clone().endOf("day"))}if(null==(t=this.schedule)?void 0:t.recurrence){let e=f.fromString(this.schedule.recurrence).origOptions;e.until?this._until=D(e.until).toDate():e.count&&(this._count=e.count)}!this.schedule||p.objectsEqual(this.schedule,this.defaultSchedule)?this._eventType=_.default:this._eventType=(null==(i=this.schedule)?void 0:i.recurrence)?_.recurrence:_.period}shouldUpdate(e){var t,i,a,r,l,s,o;return this.schedule&&!this.schedule.end&&(null==(t=this.defaultSchedule)?void 0:t.end)&&(this.schedule=Object.assign(Object.assign({},this.schedule),{end:this.defaultSchedule.end})),e.has("schedule")&&((null==(i=this._scheduleWithOffset)?void 0:i.recurrence)?this._rrule=f.fromString(this._scheduleWithOffset.recurrence):this._eventType===_.default&&(null==(a=this.defaultSchedule)?void 0:a.recurrence)&&(this._rrule=f.fromString(this.defaultSchedule.recurrence))),e.has("_rrule")&&this._rrule&&(this._byRRuleParts=y.filter(e=>{var t;return!(null==(t=this.disabledByPartCombinations[m[this._rrule.options.freq]])?void 0:t.includes(e))}).filter(e=>!this.disabledRRuleParts.includes(e)),this._ends=(null==(l=null==(r=this._rrule)?void 0:r.origOptions)?void 0:l.until)&&"until"||(null==(o=null==(s=this._rrule)?void 0:s.origOptions)?void 0:o.count)&&"count"||"never"),super.shouldUpdate(e)}_setAllDay(){let e=this._scheduleWithOffset;if(this.isAllDay&&this._eventType!==_.default){let t=D(null==e?void 0:e.start).startOf("day").valueOf(),i=D(null==e?void 0:e.end).endOf("day").valueOf();this._scheduleWithOffset=Object.assign(Object.assign({},e),{start:t,end:i})}}_getRRule(e=this._rrule){var t,i,a;return null==(a=null==(i=null==(t=null==e?void 0:e.toString())?void 0:t.split("RRULE:"))?void 0:i[1])?void 0:a.replace(/(UNTIL=\d+T\d+)Z/,"$1")}_setRRuleValue(e,t){var i;let a=null==(i=this._rrule)?void 0:i.origOptions,r=this._scheduleWithOffset;if("interval"===t||"freq"===t||t.startsWith("by"))if("byweekday"===t)a.byweekday=e.map(e=>f[e]);else if("freq"===t){for(let e of y)delete a[e];a[t]=e}else a[t]=e;else if("start"===t&&a){let[t,i,l]=e.split("-").map(Number);a.dtstart=D(r.start).set({year:t,month:i-1,date:l}).toDate(),r.start=a.dtstart.getTime()}else if("end"===t){let[t,i,a]=e.split("-").map(Number);r.end=D(r.end).set({year:t,month:i-1,date:a}).toDate().getTime()}else if("start-time"===t){let[t,i]=e.split(":");a?a.dtstart=D(r.start).set({hour:t,minute:i,second:0,millisecond:0}).toDate():a=new f({dtstart:D(r.start).set({hour:t,minute:i,second:0,millisecond:0}).toDate()}).origOptions,r.start=D(a.dtstart).toDate().getTime()}else if("end-time"===t){let[t,i]=e.split(":");r.end=D(r.end).set({hour:t,minute:i,second:0,millisecond:0}).toDate().getTime()}else switch(t){case"all-day":this.isAllDay=e;break;case"recurrence-ends":"until"===e?(a.until=this._until,delete a.count):("count"===e?a.count=this._count:delete a.count,delete a.until),this._ends=e;break;case"until":this._until=new Date(e),a.until=this._until;break;case"count":this._count=e,a.count=this._count}this._eventType===_.recurrence?(this._rrule=new f(a),this._scheduleWithOffset=Object.assign(Object.assign({},r),{recurrence:this._getRRule()})):this._scheduleWithOffset=Object.assign({},r)}_setCalendarEventType(e){var t,i,a,r,l,s,o,n,d,u;let c=e.target.value;this._eventType=c;let h=D().startOf("day");if(c===_.default){this.schedule={start:null!=(i=null==(t=this.defaultSchedule)?void 0:t.start)?i:h.valueOf()-this.timezoneOffset,end:null!=(r=null==(a=this.defaultSchedule)?void 0:a.end)?r:h.endOf("day").valueOf()-this.timezoneOffset};let e=null==(l=this.defaultSchedule)?void 0:l.recurrence;this._rrule=e?f.fromString(e):void 0;return}let p={start:null!=(o=null==(s=this._scheduleWithOffset)?void 0:s.start)?o:h.valueOf(),end:null!=(d=null==(n=this._scheduleWithOffset)?void 0:n.end)?d:h.endOf("day").valueOf()};c===_.period?this._scheduleWithOffset=p:this._scheduleWithOffset=Object.assign(Object.assign({},p),{recurrence:null!=(u=this._getRRule())?u:"FREQ=DAILY"})}_applyTimezoneOffset(e,t){if(e){let{start:i,end:a,recurrence:r}=Object.assign({},e);if(r&&f.fromString(r).origOptions.until){let e=f.fromString(r).origOptions;e.until=new Date(Number(e.until)+t),r=this._getRRule(new f(e))}return{start:null!=i?i+t:i,end:null!=a?a+t:a,recurrence:r}}}_getDefaultMessageOptions(){var e,t;return{date:D.utc(null==(e=this.defaultSchedule)?void 0:e.start).format("YYYY-MM-DD"),time:D.utc(null==(t=this.defaultSchedule)?void 0:t.start).format("HH:mm")}}render(){return s`
|
|
2
|
+
<or-vaadin-button style="max-width: 100%" @click="${()=>this._dialog.open()}">${this._timeLabel}</or-vaadin-button>
|
|
3
|
+
<or-vaadin-dialog id="scheduler" header-title="${t.t(this.header)}" ?opened="${this.open}" @closed="${this._onClose}"
|
|
4
|
+
${a(this._getDialogHeader,[])}
|
|
5
|
+
${i(this._getDialogContent,[this.defaultSchedule,this.defaultEventTypeLabel,this.disabledFrequencies,this.disabledRRuleParts,this.header,this.isAllDay,this.schedule,this.timezoneOffset,this._count,this._ends,this._rrule])}
|
|
6
|
+
${r(this._getDialogFooter,[])}
|
|
7
|
+
></or-vaadin-dialog>
|
|
8
|
+
`}_getDialogHeader(){return s`
|
|
9
|
+
<vaadin-button theme="tertiary" @click="${this._onClose}">
|
|
10
|
+
<vaadin-icon icon="lumo:cross"></vaadin-icon>
|
|
11
|
+
</vaadin-button>
|
|
12
|
+
`}_getDialogContent(){let e=[{value:"default",label:t.t(this.defaultEventTypeLabel,this._getDefaultMessageOptions())},{value:"period",label:t.t("planPeriod")},{value:"recurrence",label:t.t("planRecurrence")}];return s`
|
|
13
|
+
<style>
|
|
14
|
+
/* Showing just a number is not intuitive when using numbers as options */
|
|
15
|
+
vaadin-multi-select-combo-box-chip[slot="overflow"]::part(label)::before {
|
|
16
|
+
content: "+";
|
|
17
|
+
}
|
|
10
18
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
19
|
+
vaadin-checkbox {
|
|
20
|
+
font-weight: 600;
|
|
21
|
+
}
|
|
14
22
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
23
|
+
.period {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex: 1;
|
|
26
|
+
gap: 2px;
|
|
27
|
+
}
|
|
20
28
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
.section {
|
|
30
|
+
background-color: white;
|
|
31
|
+
border-radius: var(--lumo-border-radius-m);
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
padding: var(--lumo-space-l);
|
|
35
|
+
}
|
|
26
36
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
.title {
|
|
38
|
+
padding-bottom: var(--lumo-space-m);
|
|
39
|
+
font-size: var(--lumo-font-size-l);
|
|
40
|
+
font-style: normal;
|
|
41
|
+
font-weight: 600;
|
|
42
|
+
line-height: 125.303%; /* 22.554px */
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.label {
|
|
46
|
+
margin-left: 10px;
|
|
47
|
+
}
|
|
48
|
+
or-vaadin-number-field[disabled] + .label {
|
|
49
|
+
color: var(--lumo-contrast-20pct);
|
|
50
|
+
user-select: revert;
|
|
51
|
+
-webkit-user-select: none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@media only screen and (min-width: 768px) {
|
|
55
|
+
or-vaadin-date-picker[combined] {
|
|
56
|
+
--vaadin-input-field-top-end-radius: 0;
|
|
57
|
+
--vaadin-input-field-bottom-end-radius: 0;
|
|
38
58
|
}
|
|
39
|
-
|
|
40
|
-
|
|
59
|
+
or-vaadin-time-picker {
|
|
60
|
+
--vaadin-input-field-top-start-radius: 0;
|
|
61
|
+
--vaadin-input-field-bottom-start-radius: 0;
|
|
41
62
|
}
|
|
63
|
+
}
|
|
42
64
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
65
|
+
@media only screen and (max-width: 768px) {
|
|
66
|
+
.period {
|
|
67
|
+
flex-wrap: wrap;
|
|
46
68
|
}
|
|
47
|
-
|
|
48
|
-
|
|
69
|
+
}
|
|
70
|
+
</style>
|
|
71
|
+
<div style="display: flex; flex-direction: column; gap: var(--lumo-space-m)">
|
|
49
72
|
<div id="event-type" class="section">
|
|
50
73
|
<label class="title"><or-translate value="schedule.type"></or-translate></label>
|
|
51
|
-
<
|
|
52
|
-
<or-mwc-input style="width: 100%"
|
|
53
|
-
.value="${this._eventType}"
|
|
54
|
-
.type="${s.SELECT}"
|
|
55
|
-
.options="${Object.entries(this._eventTypes)}"
|
|
56
|
-
@or-mwc-input-changed="${e=>this.setCalendarEventType(e.detail.value)}"></or-mwc-input>
|
|
57
|
-
</div>
|
|
74
|
+
<or-vaadin-select style="flex: 1" .value="${this._eventType}" .items="${e}" @change="${this._setCalendarEventType}"></or-vaadin-select>
|
|
58
75
|
</div>
|
|
59
|
-
${this._eventType
|
|
60
|
-
${
|
|
61
|
-
${this._eventType===
|
|
62
|
-
</div>`}
|
|
76
|
+
${h(this._eventType!==_.default,()=>this._getPeriodTemplate())}
|
|
77
|
+
${h(this._eventType===_.recurrence,()=>this._getRepeatTemplate())}
|
|
78
|
+
${h(this._eventType===_.recurrence,()=>this._getEndsTemplate())}
|
|
79
|
+
</div>`}_getDialogFooter(){return s`
|
|
80
|
+
${h(this.removable,()=>s`
|
|
81
|
+
<or-vaadin-button style="background-color: unset; margin-right: auto" theme="error" @click="${this._onDelete}">
|
|
82
|
+
<or-icon icon="or:trash" style="--or-icon-fill: white"></or-icon>
|
|
83
|
+
<or-translate value="schedule.delete"></or-translate>
|
|
84
|
+
</or-vaadin-button>`)}
|
|
85
|
+
<or-vaadin-button theme="primary" @click="${this._onSave}"><or-translate value="schedule.save"></or-translate></or-vaadin-button>
|
|
86
|
+
`}_onClose(){this._dialog.close()}_onDelete(){this._dialog.close(),this.dispatchEvent(new OrSchedulerRemovedEvent)}_onSave(){var e;this._setAllDay(),this.dispatchEvent(new OrSchedulerChangedEvent(null!=(e=this.schedule)?e:this.defaultSchedule)),this._dialog.close()}_onPartChange(e,t,i){return a=>{if("detail"===t){p.objectsEqual(a.detail.value,i,!0)||this._setRRuleValue(a.detail.value,e);return}this._setRRuleValue(a.target[t],e)}}_isAllowedFrequency(e){return"SECONDLY"!==e&&!this.disabledFrequencies.includes(e)}_getRepeatTemplate(){var e,i,a,r,l;let o=null!=(i=null==(e=this._rrule)?void 0:e.origOptions.interval)?i:1,n=null!=(r=null==(a=this._rrule)?void 0:a.origOptions.freq)?r:m.DAILY,d=Object.entries(b).map(([e,i])=>({value:String(m[e]),label:t.t(i,{count:o})})).filter(({value:e})=>this._isAllowedFrequency(m[e]));return s`
|
|
63
87
|
<div id="recurrence" class="section">
|
|
64
88
|
<label class="title"><or-translate value="schedule.repeat"></or-translate></label>
|
|
65
|
-
<div
|
|
66
|
-
${
|
|
67
|
-
<or-
|
|
68
|
-
@
|
|
89
|
+
<div style="display: flex; gap: 8px">
|
|
90
|
+
${h(!(null==(l=this.disabledRRuleParts)?void 0:l.includes("interval")),()=>s`
|
|
91
|
+
<or-vaadin-number-field min="1" max="9" step-buttons-visible style="width: 106px" .value="${o}"
|
|
92
|
+
@change="${this._onPartChange("interval","value")}">
|
|
93
|
+
</or-vaadin-number-field>
|
|
69
94
|
`)}
|
|
70
|
-
<or-
|
|
71
|
-
@
|
|
72
|
-
|
|
73
|
-
<div>${this.getByRulePart("bymonth",s.CHECKBOX_LIST,Object.entries(f))}</div>
|
|
74
|
-
<div>
|
|
75
|
-
${this.getByRulePart("byweekno",s.SELECT,byWeekNoOptions)}
|
|
76
|
-
${this.getByRulePart("byyearday",s.SELECT,byYearDayOptions)}
|
|
77
|
-
${this.getByRulePart("bymonthday",s.SELECT,byMonthDayOptions)}
|
|
95
|
+
<or-vaadin-select style="flex: 1;" .value="${n.toString()}" .items="${d}"
|
|
96
|
+
@change="${this._onPartChange("freq","value")}">
|
|
97
|
+
</or-vaadin-select>
|
|
78
98
|
</div>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
${this.getByRulePart("byminute",s.SELECT,byMinuteOrSecondsOptions)}
|
|
83
|
-
${this.getByRulePart("bysecond",s.SELECT,byMinuteOrSecondsOptions)}
|
|
84
|
-
</div>
|
|
85
|
-
</div>`}getByRulePart(t,i,l){var r,n,s,a,o;if(!(null==(r=this._byRRuleParts)?void 0:r.includes(t)))return;let d="byweekday"===t?null==(a=null==(s=null==(n=this._rrule)?void 0:n.origOptions)?void 0:s.byweekday)?void 0:a.map(String):null==(o=this._rrule)?void 0:o.origOptions[t];return e`<or-mwc-input style="min-width: 30%"
|
|
86
|
-
.value="${null!=d?d:[]}"
|
|
87
|
-
.type="${i}"
|
|
88
|
-
.options="${l}"
|
|
89
|
-
.label="${t}"
|
|
90
|
-
multiple
|
|
91
|
-
@or-mwc-input-changed="${e=>{this.setRRuleValue(e.detail.value,t)}}"></or-mwc-input>`}getPeriodTemplate(t){return e`
|
|
92
|
-
<div id="period" class="section">
|
|
93
|
-
<label class="title"><or-translate value="period"></or-translate></label>
|
|
94
|
-
<div style="display: flex; gap: 8px;" class="layout horizontal">
|
|
99
|
+
${h(y.some(e=>{var t;return null==(t=this._byRRuleParts)?void 0:t.includes(e)}),()=>s`
|
|
100
|
+
<label class="title" style="margin-top: var(--lumo-space-l)"><or-translate value="schedule.repeatOn"></or-translate></label>
|
|
101
|
+
<div>${this._getByRulePart("bymonth",v.CHECKBOX_LIST,Object.entries(g))}</div>
|
|
95
102
|
<div>
|
|
96
|
-
|
|
97
|
-
|
|
103
|
+
${this._getByRulePart("byweekno",v.SELECT,byWeekNoOptions)}
|
|
104
|
+
${this._getByRulePart("byyearday",v.SELECT,byYearDayOptions)}
|
|
105
|
+
${this._getByRulePart("bymonthday",v.SELECT,byMonthDayOptions)}
|
|
98
106
|
</div>
|
|
107
|
+
<div>${this._getByRulePart("byweekday",v.CHECKBOX_LIST,Object.entries(S))}</div>
|
|
99
108
|
<div>
|
|
100
|
-
|
|
101
|
-
|
|
109
|
+
${this._getByRulePart("byhour",v.SELECT,byHourOptions)}
|
|
110
|
+
${this._getByRulePart("byminute",v.SELECT,byMinuteOrSecondsOptions)}
|
|
111
|
+
${this._getByRulePart("bysecond",v.SELECT,byMinuteOrSecondsOptions)}
|
|
112
|
+
</div>
|
|
113
|
+
`)}
|
|
114
|
+
</div>`}_getByRulePart(e,i,a){var r,l,o,n;if(!(null==(r=this._byRRuleParts)?void 0:r.includes(e)))return;let d=null!=(n=null==(o=null==(l=this._rrule)?void 0:l.origOptions)?void 0:o[e])?n:[],u="byweekday"===e?null==d?void 0:d.map(String):Array.isArray(d)?d:[d];return i===v.CHECKBOX_LIST?s`
|
|
115
|
+
<or-vaadin-checkbox-group .value="${u}" @value-changed="${this._onPartChange(e,"detail",u)}">
|
|
116
|
+
${a.map(([e,i])=>s`<vaadin-checkbox theme="button" value="${e}" label="${t.t(i).slice(0,3)}"></vaadin-checkbox>`)}
|
|
117
|
+
</or-vaadin-checkbox-group>
|
|
118
|
+
`:s`
|
|
119
|
+
<or-vaadin-multi-select-combo-box .selectedItems="${u}" .label="${t.t(`rrule.${e}`)}"
|
|
120
|
+
.items="${this.disableNegativeByPartValues?a.filter(e=>+e>0):a}"
|
|
121
|
+
@selected-items-changed="${this._onPartChange(e,"detail",u)}">
|
|
122
|
+
</or-vaadin-multi-select-combo-box>
|
|
123
|
+
`}_getPeriodTemplate(){let e=this._scheduleWithOffset;return s`
|
|
124
|
+
<div id="period" class="section">
|
|
125
|
+
<label class="title"><or-translate value="period"></or-translate></label>
|
|
126
|
+
<div style="display: flex; gap: 8px">
|
|
127
|
+
<div class="period">
|
|
128
|
+
<or-vaadin-date-picker style="text-transform: capitalize" ?combined="${!this.isAllDay}" .value="${D(e.start).format("YYYY-MM-DD")}"
|
|
129
|
+
@change="${this._onPartChange("start","value")}" label="${t.t("from")}" .max="${D(e.end).format("YYYY-MM-DD")}">
|
|
130
|
+
</or-vaadin-date-picker>
|
|
131
|
+
<or-vaadin-time-picker style="margin-top: auto" ?hidden=${this.isAllDay} .value="${D(e.start).format("HH:mm")}"
|
|
132
|
+
@change="${this._onPartChange("start-time","value")}"
|
|
133
|
+
.max="${D(e.end).isSameOrBefore(D(e.start),"day")&&D(e.end).format("HH:mm")}">
|
|
134
|
+
</or-vaadin-time-picker>
|
|
135
|
+
</div>
|
|
136
|
+
<div class="period">
|
|
137
|
+
<or-vaadin-date-picker style="text-transform: capitalize" ?combined="${!this.isAllDay}" .value="${D(e.end).format("YYYY-MM-DD")}"
|
|
138
|
+
@change="${this._onPartChange("end","value")}" label="${t.t("to")}" .min="${D(e.start).format("YYYY-MM-DD")}">
|
|
139
|
+
</or-vaadin-date-picker>
|
|
140
|
+
<or-vaadin-time-picker style="margin-top: auto" ?hidden=${this.isAllDay} .value="${D(e.end).format("HH:mm")}"
|
|
141
|
+
@change="${this._onPartChange("end-time","value")}"
|
|
142
|
+
.min="${D(e.end).isSameOrBefore(D(e.start),"day")&&D(e.start).format("HH:mm")}">
|
|
143
|
+
</or-vaadin-time-picker>
|
|
102
144
|
</div>
|
|
103
145
|
</div>
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
<or-mwc-input .value=${this.isAllDay} @or-mwc-input-changed="${e=>this.setRRuleValue(e.detail.value,"all-day")}" .type="${s.CHECKBOX}" .label="${o.t("allDay")}"></or-mwc-input>
|
|
107
|
-
</div>
|
|
108
|
-
</div>`}getEndsTemplate(){return e`
|
|
146
|
+
<or-vaadin-checkbox .checked=${this.isAllDay} @change="${this._onPartChange("all-day","checked")}" .label="${t.t("allDay")}"></or-vaadin-checkbox>
|
|
147
|
+
</div>`}_getEndsTemplate(){return s`
|
|
109
148
|
<div id="recurrence-ends" class="section">
|
|
110
149
|
<label class="title"><or-translate value="schedule._ends"></or-translate></label>
|
|
111
|
-
<div style="display: flex; gap: 8px;"
|
|
112
|
-
<or-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
150
|
+
<div style="display: flex; gap: 8px;">
|
|
151
|
+
<or-vaadin-radio-group style="padding-right: 10px; width: unset" .value="${this._ends}" theme="vertical"
|
|
152
|
+
@change="${this._onPartChange("recurrence-ends","value")}">
|
|
153
|
+
${Object.entries($).filter(([e])=>{var t;return!(null==(t=this.disabledRRuleParts)?void 0:t.includes(e))}).map(([e,i])=>s`
|
|
154
|
+
<vaadin-radio-button style="margin: 6px 0" value="${e}" label="${t.t(i)}"></vaadin-radio-button>
|
|
155
|
+
`)}
|
|
156
|
+
</or-vaadin-radio-group>
|
|
157
|
+
<div style="display: flex; flex-direction: column; flex: 1; ">
|
|
158
|
+
${h(!this.disabledRRuleParts.includes("until"),()=>s`
|
|
159
|
+
<or-vaadin-date-time-picker style="margin-top: auto; padding: var(--lumo-space-s) 0" ?disabled="${"until"!==this._ends}"
|
|
160
|
+
.value="${D(this._until).format("YYYY-MM-DDTHH:mm")}"
|
|
161
|
+
@change="${this._onPartChange("until","value")}">
|
|
162
|
+
</or-vaadin-date-time-picker>`)}
|
|
163
|
+
${h(!this.disabledRRuleParts.includes("count"),()=>s`<div style="display: inline-flex">
|
|
164
|
+
<or-vaadin-number-field ?disabled="${"count"!==this._ends}" min="1" style="width: 120px"
|
|
165
|
+
step-buttons-visible
|
|
120
166
|
.value="${this._count}"
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
.value="${p(this._until).format("YYYY-MM-DD HH:mm")}"
|
|
127
|
-
@or-mwc-input-changed="${e=>this.setRRuleValue(e.detail.value,"until")}">
|
|
128
|
-
</or-mwc-input>`)}
|
|
167
|
+
@change="${this._onPartChange("count","value")}">
|
|
168
|
+
</or-vaadin-number-field><or-translate class="label" value="schedule.count"
|
|
169
|
+
?disabled="${"count"!==this._ends}" .options="${{count:+this._count}}">
|
|
170
|
+
</or-translate>
|
|
171
|
+
</div>`)}
|
|
129
172
|
</div>
|
|
130
173
|
</div>
|
|
131
|
-
</div>`}};
|
|
174
|
+
</div>`}};OrScheduler.styles=l`
|
|
175
|
+
.time-label {
|
|
176
|
+
display: flex;
|
|
177
|
+
&>:first-child {
|
|
178
|
+
display: inline-block;
|
|
179
|
+
overflow: hidden;
|
|
180
|
+
text-overflow: ellipsis;
|
|
181
|
+
white-space: nowrap;
|
|
182
|
+
&::first-letter { text-transform: uppercase; }
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
`,__decorate([d({type:Object})],OrScheduler.prototype,"defaultSchedule",void 0),__decorate([d({type:String})],OrScheduler.prototype,"defaultEventTypeLabel",void 0),__decorate([d({type:Boolean})],OrScheduler.prototype,"disableNegativeByPartValues",void 0),__decorate([d({type:Array})],OrScheduler.prototype,"disabledFrequencies",void 0),__decorate([d({type:Array})],OrScheduler.prototype,"disabledRRuleParts",void 0),__decorate([d({type:Object})],OrScheduler.prototype,"disabledByPartCombinations",void 0),__decorate([d({type:String})],OrScheduler.prototype,"header",void 0),__decorate([d({type:Boolean})],OrScheduler.prototype,"isAllDay",void 0),__decorate([d({type:Boolean})],OrScheduler.prototype,"open",void 0),__decorate([d({type:Boolean})],OrScheduler.prototype,"removable",void 0),__decorate([d({type:Object})],OrScheduler.prototype,"schedule",void 0),__decorate([d({type:Number})],OrScheduler.prototype,"timezoneOffset",void 0),__decorate([c()],OrScheduler.prototype,"_count",void 0),__decorate([c()],OrScheduler.prototype,"_ends",void 0),__decorate([c()],OrScheduler.prototype,"_eventType",void 0),__decorate([c()],OrScheduler.prototype,"_rrule",void 0),__decorate([u("#scheduler")],OrScheduler.prototype,"_dialog",void 0),OrScheduler=__decorate([n("or-scheduler")],OrScheduler);export{OrScheduler};
|