@atlaskit/editor-plugin-date
Version:
Date plugin for @atlaskit/editor-core
91 lines (70 loc) • 2.23 kB
Markdown
<!-- API Report Version: 2.3 -->
## API Report File for "@atlaskit/editor-plugin-date"
> Do not edit this file. This report is auto-generated using
> [API Extractor](https://api-extractor.com/).
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
### Table of contents
- [Main Entry Types](#main-entry-types)
- [Peer Dependencies](#peer-dependencies)
### Main Entry Types
<!--SECTION START: Main Entry Types-->
```ts
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
import type { EditorCommand } from '@atlaskit/editor-common/types';
import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
import type { TOOLBAR_MENU_TYPE } from '@atlaskit/editor-common/types';
import type { WeekDay } from '@atlaskit/calendar/types';
// @public (undocumented)
export type DatePlugin = NextEditorPlugin<
'date',
{
pluginConfiguration: DatePluginConfig | undefined;
dependencies: [typeof analyticsPlugin, EditorDisabledPlugin];
sharedState: DatePluginSharedState;
commands: {
insertDate: InsertDate;
deleteDate: DeleteDate;
};
}
>;
// @public (undocumented)
export const datePlugin: DatePlugin;
// @public (undocumented)
export interface DatePluginConfig {
// (undocumented)
weekStartDay?: WeekDay;
}
// @public (undocumented)
export type DatePluginSharedState = {
showDatePickerAt?: null | number;
isNew: boolean;
focusDateInput: boolean;
};
// @public (undocumented)
export type DateType = {
year: number;
month: number;
day?: number;
};
// @public (undocumented)
type DeleteDate = EditorCommand;
// @public (undocumented)
type InsertDate = (props: {
date?: DateType;
inputMethod?: TOOLBAR_MENU_TYPE;
commitMethod?: INPUT_METHOD.KEYBOARD | INPUT_METHOD.PICKER;
enterPressed?: boolean;
}) => EditorCommand;
// (No @packageDocumentation comment for this package)
```
<!--SECTION END: Main Entry Types-->
### Peer Dependencies
<!--SECTION START: Peer Dependencies-->
```json
{
"react": "^16.8.0"
}
```
<!--SECTION END: Peer Dependencies-->