@nocobase/plugin-calendar 0.20.0-alpha.9 → 0.21.0-alpha.10

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.
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  export declare const CalendarBlockContext: React.Context<any>;
3
- export declare const CalendarBlockProvider: (props: any) => React.JSX.Element;
3
+ export declare const CalendarBlockProvider: React.FunctionComponent<any>;
4
4
  export declare const useCalendarBlockContext: () => any;
5
5
  export declare const useCalendarBlockProps: () => {
6
6
  fieldNames: any;
@@ -0,0 +1,7 @@
1
+ import { ISchema } from '@formily/react';
2
+ export declare const createCalendarBlockUISchema: (options: {
3
+ dataSource: string;
4
+ fieldNames: object;
5
+ collectionName?: string;
6
+ association?: string;
7
+ }) => ISchema;
@@ -1,2 +1,8 @@
1
- import { SchemaInitializer } from '@nocobase/client';
2
- export declare const CalendarActionInitializers: SchemaInitializer;
1
+ import { CompatibleSchemaInitializer } from '@nocobase/client';
2
+ /**
3
+ * @deprecated
4
+ * use `calendarActionInitializers` instead
5
+ * 日历的操作配置
6
+ */
7
+ export declare const CalendarActionInitializers_deprecated: CompatibleSchemaInitializer;
8
+ export declare const calendarActionInitializers: CompatibleSchemaInitializer;
@@ -1,2 +1,7 @@
1
- import { SchemaInitializer } from '@nocobase/client';
2
- export declare const CalendarFormActionInitializers: SchemaInitializer;
1
+ import { SchemaInitializer, SchemaInitializerItemType } from '@nocobase/client';
2
+ export declare const deleteEventActionInitializer: SchemaInitializerItemType<any>;
3
+ /**
4
+ * @deprecated
5
+ * 表单的操作配置
6
+ */
7
+ export declare const CalendarFormActionInitializers: SchemaInitializer<import("antd").ButtonProps, {}>;
@@ -1,2 +1,17 @@
1
+ import { Collection, CollectionFieldOptions } from '@nocobase/client';
1
2
  import React from 'react';
2
- export declare const CalendarBlockInitializer: () => React.JSX.Element;
3
+ export declare const CalendarBlockInitializer: ({ filterCollections, onlyCurrentDataSource, hideSearch, createBlockSchema, showAssociationFields, }: {
4
+ filterCollections: (options: {
5
+ collection?: Collection;
6
+ associationField?: CollectionFieldOptions;
7
+ }) => boolean;
8
+ onlyCurrentDataSource: boolean;
9
+ hideSearch?: boolean;
10
+ createBlockSchema?: (options: any) => any;
11
+ showAssociationFields?: boolean;
12
+ }) => React.JSX.Element;
13
+ export declare const useCreateCalendarBlock: () => {
14
+ createCalendarBlock: ({ item }: {
15
+ item: any;
16
+ }) => Promise<void>;
17
+ };
@@ -1,2 +1,7 @@
1
1
  import React from 'react';
2
2
  export declare const RecordAssociationCalendarBlockInitializer: () => React.JSX.Element;
3
+ export declare function useCreateAssociationCalendarBlock(): {
4
+ createAssociationCalendarBlock: ({ item }: {
5
+ item: any;
6
+ }) => Promise<void>;
7
+ };
@@ -1,7 +1,8 @@
1
1
  module.exports = {
2
- "@nocobase/client": "0.20.0-alpha.9",
2
+ "@nocobase/client": "0.21.0-alpha.10",
3
3
  "react-i18next": "11.18.6",
4
- "@nocobase/server": "0.20.0-alpha.9",
4
+ "@nocobase/server": "0.21.0-alpha.10",
5
+ "@nocobase/test": "0.21.0-alpha.10",
5
6
  "react": "18.2.0",
6
7
  "@ant-design/icons": "5.2.6",
7
8
  "@formily/react": "2.3.0",
@@ -1,4 +1,4 @@
1
1
  export declare const NAMESPACE = "calendar";
2
2
  export declare function i18nt(key: string, options?: any): import("i18next").TFunctionDetailedResult<object>;
3
3
  export declare function generateNTemplate(key: string): string;
4
- export declare function useTranslation(): import("react-i18next").UseTranslationResponse<"calendar", undefined>;
4
+ export declare function useTranslation(): import("react-i18next").UseTranslationResponse<("calendar" | "client")[], undefined>;
@@ -33,7 +33,9 @@ function generateNTemplate(key) {
33
33
  return `{{t('${key}', { ns: '${NAMESPACE}' })}}`;
34
34
  }
35
35
  function useTranslation() {
36
- return (0, import_react_i18next.useTranslation)(NAMESPACE);
36
+ return (0, import_react_i18next.useTranslation)([NAMESPACE, "client"], {
37
+ nsMode: "fallback"
38
+ });
37
39
  }
38
40
  // Annotate the CommonJS export names for ESM import in node:
39
41
  0 && (module.exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-calendar",
3
- "version": "0.20.0-alpha.9",
3
+ "version": "0.21.0-alpha.10",
4
4
  "displayName": "Calendar",
5
5
  "displayName.zh-CN": "日历",
6
6
  "description": "Provides callendar collection template and block for managing date data, typically for date/time related information such as events, appointments, tasks, and so on.",
@@ -36,7 +36,7 @@
36
36
  "url": "git+https://github.com/nocobase/nocobase.git",
37
37
  "directory": "packages/plugins/calendar"
38
38
  },
39
- "gitHead": "5473d9039cfdb649a8c8c625edefc9a3ac464be5",
39
+ "gitHead": "98adf5ec996a4f359c6ca1c4a6ac837c43b6e268",
40
40
  "keywords": [
41
41
  "Collections",
42
42
  "Blocks"
@@ -1,57 +0,0 @@
1
- export declare const createCalendarBlockSchema: (options: any) => import("@formily/react").Stringify<{
2
- [key: symbol]: any;
3
- [key: `x-${string}`]: any;
4
- [key: `x-${number}`]: any;
5
- version?: string;
6
- name?: import("@formily/react").SchemaKey;
7
- title?: any;
8
- description?: any;
9
- default?: any;
10
- readOnly?: boolean;
11
- writeOnly?: boolean;
12
- type?: import("@formily/react").SchemaTypes;
13
- enum?: import("@formily/react").SchemaEnum<any>;
14
- const?: any;
15
- multipleOf?: number;
16
- maximum?: number;
17
- exclusiveMaximum?: number;
18
- minimum?: number;
19
- exclusiveMinimum?: number;
20
- maxLength?: number;
21
- minLength?: number;
22
- pattern?: string | RegExp;
23
- maxItems?: number;
24
- minItems?: number;
25
- uniqueItems?: boolean;
26
- maxProperties?: number;
27
- minProperties?: number;
28
- required?: string | boolean | string[];
29
- format?: string;
30
- $ref?: string;
31
- $namespace?: string;
32
- definitions?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
33
- properties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
34
- items?: import("@formily/react").SchemaItems<any, any, any, any, any, any, any, any>;
35
- additionalItems?: import("@formily/react").Stringify<any>;
36
- patternProperties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
37
- additionalProperties?: import("@formily/react").Stringify<any>;
38
- "x-value"?: any;
39
- "x-index"?: number;
40
- "x-pattern"?: any;
41
- "x-display"?: any;
42
- "x-validator"?: any;
43
- "x-decorator"?: any;
44
- "x-decorator-props"?: any;
45
- "x-component"?: any;
46
- "x-component-props"?: any;
47
- "x-reactions"?: import("@formily/react").SchemaReactions<any>;
48
- "x-content"?: any;
49
- "x-data"?: any;
50
- "x-visible"?: boolean;
51
- "x-hidden"?: boolean;
52
- "x-disabled"?: boolean;
53
- "x-editable"?: boolean;
54
- "x-read-only"?: boolean;
55
- "x-read-pretty"?: boolean;
56
- "x-compile-omitted"?: string[];
57
- }>;