@plasmicpkgs/plasmic-rich-components 1.0.118 → 1.0.119
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/.tsbuildinfo +1 -1
- package/dist/common-prop-types.d.ts +7 -0
- package/dist/formatting.d.ts +1 -0
- package/dist/index.js +764 -247
- package/dist/index.js.map +1 -1
- package/dist/plasmic-rich-components.esm.js +764 -249
- package/dist/plasmic-rich-components.esm.js.map +1 -1
- package/dist/rich-calendar/RichCalendar.d.ts +31 -0
- package/dist/rich-calendar/index.d.ts +14 -0
- package/dist/utils.d.ts +11 -0
- package/package.json +2 -2
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Calendar } from "antd";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { BaseColumnConfig, FieldfulProps, RowFunc } from "../field-mappings";
|
|
4
|
+
type RichCalendarPropsBase = Omit<React.ComponentProps<typeof Calendar>, "value" | "defaultValue" | "validRange">;
|
|
5
|
+
export interface RichCalendarProps extends FieldfulProps<EventsConfig>, RichCalendarPropsBase {
|
|
6
|
+
color: EventsConfig[];
|
|
7
|
+
date: EventsConfig[];
|
|
8
|
+
title: EventsConfig[];
|
|
9
|
+
value: string;
|
|
10
|
+
defaultValue: string;
|
|
11
|
+
validRange: [string | undefined, string | undefined] | undefined;
|
|
12
|
+
}
|
|
13
|
+
export declare function RichCalendar(props: RichCalendarProps): JSX.Element;
|
|
14
|
+
interface StyleConfig {
|
|
15
|
+
styles: Record<string, any>;
|
|
16
|
+
align: "left" | "center" | "right";
|
|
17
|
+
freeze: "off" | "left" | "right";
|
|
18
|
+
}
|
|
19
|
+
declare const roles: readonly ["date", "title", "color", "unset"];
|
|
20
|
+
export type Role = typeof roles[number];
|
|
21
|
+
export type EventsConfig = BaseColumnConfig & {
|
|
22
|
+
isEditableExpr: RowFunc<boolean>;
|
|
23
|
+
disableSorting: boolean;
|
|
24
|
+
sortByExpr?: RowFunc<any>;
|
|
25
|
+
formatting: StyleConfig;
|
|
26
|
+
/**
|
|
27
|
+
* The default inferred role, not the actual user-set role.
|
|
28
|
+
*/
|
|
29
|
+
role: undefined | Role | "unset";
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Registerable } from "../utils";
|
|
2
|
+
import { Dayjs } from "dayjs";
|
|
3
|
+
export declare const calendarHelpers: {
|
|
4
|
+
states: {
|
|
5
|
+
mode: {
|
|
6
|
+
onChangeArgsToValue: (_date: Dayjs, mode: string) => string;
|
|
7
|
+
};
|
|
8
|
+
selectedDate: {
|
|
9
|
+
onChangeArgsToValue: (date: Dayjs) => string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare const calendarComponentName = "hostless-rich-calendar";
|
|
14
|
+
export declare function registerRichCalendar(loader?: Registerable): void;
|
package/dist/utils.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { ComponentMeta, default as registerComponent } from "@plasmicapp/host/re
|
|
|
2
2
|
import { default as registerGlobalContext, GlobalContextMeta } from "@plasmicapp/host/registerGlobalContext";
|
|
3
3
|
import { default as registerToken } from "@plasmicapp/host/registerToken";
|
|
4
4
|
import React from "react";
|
|
5
|
+
import { DateTime } from "luxon";
|
|
5
6
|
export type Registerable = {
|
|
6
7
|
registerComponent: typeof registerComponent;
|
|
7
8
|
registerGlobalContext: typeof registerGlobalContext;
|
|
@@ -25,7 +26,17 @@ export declare function ensureNumber(x: number | string): number;
|
|
|
25
26
|
export declare function ensure<T>(x: T | null | undefined): T;
|
|
26
27
|
export declare function isOneOf<T, U extends T>(elem: T, arr: readonly U[]): elem is U;
|
|
27
28
|
export declare function maybe<T, U>(x: T | undefined | null, f: (y: T) => U): U | undefined;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @param str iso string
|
|
32
|
+
* @param extendedOnly boolean for extended mode (i.e. time)
|
|
33
|
+
* @returns Returns true for strings in ISO 8601 format
|
|
34
|
+
*/
|
|
35
|
+
export declare function isValidIsoDate(str: string | undefined, extendedOnly?: boolean): boolean;
|
|
36
|
+
export declare function parseDate(value: unknown): DateTime | undefined;
|
|
37
|
+
export declare function isLikeDate(value: unknown): boolean;
|
|
28
38
|
export declare function isLikeImage(value: unknown): false | RegExpMatchArray | null;
|
|
39
|
+
export declare function isLikeColor(value: unknown): boolean;
|
|
29
40
|
export declare function isInteractable(target: HTMLElement): boolean;
|
|
30
41
|
export declare function ensureArray<T>(xs: T | T[]): T[];
|
|
31
42
|
export declare const tuple: <T extends any[]>(...args: T) => T;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plasmicpkgs/plasmic-rich-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.119",
|
|
4
4
|
"description": "Rich batteries-included general purpose components for business apps, admin panels, etc.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"luxon": "^3.3.0",
|
|
68
68
|
"tinycolor2": "^1.6.0"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "e3cc35613e56d7a5f3eab3721480bfc18c2fab42"
|
|
71
71
|
}
|