sanity-plugin-recurring-dates 1.4.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +49 -0
- package/dist/index.js +1714 -4161
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2520 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +41 -35
- package/src/components/CustomRule/Monthly.tsx +1 -1
- package/src/utils.ts +1 -0
- package/dist/index.esm.js +0 -4950
- package/dist/index.esm.js.map +0 -1
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type {DateRule} from 'sanity'
|
|
2
|
+
import type {DatetimeOptions} from 'sanity'
|
|
3
|
+
import type {ObjectDefinition} from 'sanity'
|
|
4
|
+
import {Plugin as Plugin_2} from 'sanity'
|
|
5
|
+
|
|
6
|
+
export declare interface PluginConfig {
|
|
7
|
+
defaultRecurrences?: string[]
|
|
8
|
+
hideEndDate?: boolean
|
|
9
|
+
hideCustom?: boolean
|
|
10
|
+
dateTimeOptions?: DatetimeOptions
|
|
11
|
+
dateOnly?: boolean
|
|
12
|
+
validation?: {
|
|
13
|
+
startDate?: (Rule: DateRule) => DateRule
|
|
14
|
+
endDate?: (Rule: DateRule) => DateRule
|
|
15
|
+
}
|
|
16
|
+
fieldTitles?: {
|
|
17
|
+
startDate?: string
|
|
18
|
+
endDate?: string
|
|
19
|
+
}
|
|
20
|
+
fieldDescriptions?: {
|
|
21
|
+
startDate?: string
|
|
22
|
+
endDate?: string
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export declare interface RecurringDate {
|
|
27
|
+
rrule?: string
|
|
28
|
+
startDate?: string
|
|
29
|
+
endDate?: string
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export declare type RecurringDateFieldOptions = Omit<ObjectDefinition, 'type' | 'fields'> & {
|
|
33
|
+
type: 'recurringDates'
|
|
34
|
+
options?: PluginConfig
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export declare const recurringDates: Plugin_2<void | PluginConfig>
|
|
38
|
+
|
|
39
|
+
export declare type WithRequiredProperty<Type, Key extends keyof Type> = Type & {
|
|
40
|
+
[Property in Key]-?: Type[Property]
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export {}
|
|
44
|
+
|
|
45
|
+
declare module 'sanity' {
|
|
46
|
+
interface IntrinsicDefinitions {
|
|
47
|
+
recurringDates: RecurringDateFieldOptions
|
|
48
|
+
}
|
|
49
|
+
}
|