@sprucelabs/calendar-utils 36.1.8 → 36.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/.spruce/schemas/calendarUtils/v2021_05_19/calendarEvent.schema.js +5 -0
- package/build/.spruce/schemas/schemas.types.d.ts +8 -0
- package/build/esm/.spruce/schemas/calendarUtils/v2021_05_19/calendarEvent.schema.js +5 -0
- package/build/esm/.spruce/schemas/schemas.types.d.ts +8 -0
- package/build/esm/locales/Locale.js +5 -2
- package/build/esm/schemas/v2021_05_19/calendarEvent.builder.d.ts +6 -0
- package/build/esm/schemas/v2021_05_19/calendarEvent.builder.js +6 -0
- package/build/locales/Locale.js +5 -2
- package/build/schemas/v2021_05_19/calendarEvent.builder.d.ts +6 -0
- package/build/schemas/v2021_05_19/calendarEvent.builder.js +6 -0
- package/package.json +1 -1
|
@@ -148,6 +148,11 @@ const calendarEventSchema = {
|
|
|
148
148
|
type: 'number',
|
|
149
149
|
options: undefined
|
|
150
150
|
},
|
|
151
|
+
/** . */
|
|
152
|
+
'meta': {
|
|
153
|
+
type: 'raw',
|
|
154
|
+
options: { valueType: `Record<string, any>`, }
|
|
155
|
+
},
|
|
151
156
|
}
|
|
152
157
|
};
|
|
153
158
|
schema_1.SchemaRegistry.getInstance().trackSchema(calendarEventSchema);
|
|
@@ -611,6 +611,7 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
|
|
|
611
611
|
'dateCreated': SpruceSchema.DateTimeFieldValue;
|
|
612
612
|
'nthInRepeating'?: number | undefined | null;
|
|
613
613
|
'totalInRepeating'?: number | undefined | null;
|
|
614
|
+
'meta'?: (Record<string, any>) | undefined | null;
|
|
614
615
|
}
|
|
615
616
|
interface CalendarEventSchema extends SpruceSchema.Schema {
|
|
616
617
|
id: 'calendarEvent';
|
|
@@ -918,6 +919,13 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
|
|
|
918
919
|
type: 'number';
|
|
919
920
|
options: undefined;
|
|
920
921
|
};
|
|
922
|
+
/** . */
|
|
923
|
+
'meta': {
|
|
924
|
+
type: 'raw';
|
|
925
|
+
options: {
|
|
926
|
+
valueType: `Record<string, any>`;
|
|
927
|
+
};
|
|
928
|
+
};
|
|
921
929
|
};
|
|
922
930
|
}
|
|
923
931
|
interface CalendarEventEntity extends SchemaEntity<SpruceSchemas.CalendarUtils.v2021_05_19.CalendarEventSchema> {
|
|
@@ -143,6 +143,11 @@ const calendarEventSchema = {
|
|
|
143
143
|
type: 'number',
|
|
144
144
|
options: undefined
|
|
145
145
|
},
|
|
146
|
+
/** . */
|
|
147
|
+
'meta': {
|
|
148
|
+
type: 'raw',
|
|
149
|
+
options: { valueType: `Record<string, any>`, }
|
|
150
|
+
},
|
|
146
151
|
}
|
|
147
152
|
};
|
|
148
153
|
SchemaRegistry.getInstance().trackSchema(calendarEventSchema);
|
|
@@ -611,6 +611,7 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
|
|
|
611
611
|
'dateCreated': SpruceSchema.DateTimeFieldValue;
|
|
612
612
|
'nthInRepeating'?: number | undefined | null;
|
|
613
613
|
'totalInRepeating'?: number | undefined | null;
|
|
614
|
+
'meta'?: (Record<string, any>) | undefined | null;
|
|
614
615
|
}
|
|
615
616
|
interface CalendarEventSchema extends SpruceSchema.Schema {
|
|
616
617
|
id: 'calendarEvent';
|
|
@@ -918,6 +919,13 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
|
|
|
918
919
|
type: 'number';
|
|
919
920
|
options: undefined;
|
|
920
921
|
};
|
|
922
|
+
/** . */
|
|
923
|
+
'meta': {
|
|
924
|
+
type: 'raw';
|
|
925
|
+
options: {
|
|
926
|
+
valueType: `Record<string, any>`;
|
|
927
|
+
};
|
|
928
|
+
};
|
|
921
929
|
};
|
|
922
930
|
}
|
|
923
931
|
interface CalendarEventEntity extends SchemaEntity<SpruceSchemas.CalendarUtils.v2021_05_19.CalendarEventSchema> {
|
|
@@ -24,6 +24,7 @@ export default class LocaleImpl extends AbstractEventEmitter {
|
|
|
24
24
|
setTimezoneOffsetMinutes(offset) {
|
|
25
25
|
assertOptions({ offset }, ['offset']);
|
|
26
26
|
this.offset = offset;
|
|
27
|
+
this.currentZone = undefined;
|
|
27
28
|
}
|
|
28
29
|
getTimezoneOffsetMinutes(onDate) {
|
|
29
30
|
if (onDate) {
|
|
@@ -49,8 +50,10 @@ export default class LocaleImpl extends AbstractEventEmitter {
|
|
|
49
50
|
});
|
|
50
51
|
}
|
|
51
52
|
getZoneName() {
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
if (!this.currentZone) {
|
|
54
|
+
this.currentZone = this.offsetMinutesToZoneName(this.getTimezoneOffsetMinutes());
|
|
55
|
+
}
|
|
56
|
+
return this.currentZone;
|
|
54
57
|
}
|
|
55
58
|
offsetMinutesToZoneName(offset) {
|
|
56
59
|
if (offset === 0) {
|
package/build/locales/Locale.js
CHANGED
|
@@ -20,6 +20,7 @@ class LocaleImpl extends mercury_event_emitter_1.AbstractEventEmitter {
|
|
|
20
20
|
setTimezoneOffsetMinutes(offset) {
|
|
21
21
|
(0, schema_1.assertOptions)({ offset }, ['offset']);
|
|
22
22
|
this.offset = offset;
|
|
23
|
+
this.currentZone = undefined;
|
|
23
24
|
}
|
|
24
25
|
getTimezoneOffsetMinutes(onDate) {
|
|
25
26
|
if (onDate) {
|
|
@@ -43,8 +44,10 @@ class LocaleImpl extends mercury_event_emitter_1.AbstractEventEmitter {
|
|
|
43
44
|
});
|
|
44
45
|
}
|
|
45
46
|
getZoneName() {
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
if (!this.currentZone) {
|
|
48
|
+
this.currentZone = this.offsetMinutesToZoneName(this.getTimezoneOffsetMinutes());
|
|
49
|
+
}
|
|
50
|
+
return this.currentZone;
|
|
48
51
|
}
|
|
49
52
|
offsetMinutesToZoneName(offset) {
|
|
50
53
|
if (offset === 0) {
|
|
@@ -179,6 +179,12 @@ exports.default = (0, schema_1.buildSchema)({
|
|
|
179
179
|
totalInRepeating: {
|
|
180
180
|
type: 'number',
|
|
181
181
|
},
|
|
182
|
+
meta: {
|
|
183
|
+
type: 'raw',
|
|
184
|
+
options: {
|
|
185
|
+
valueType: 'Record<string, any>',
|
|
186
|
+
},
|
|
187
|
+
},
|
|
182
188
|
},
|
|
183
189
|
});
|
|
184
190
|
function buildDaysOfWeekChoices() {
|