cx 23.9.0 → 23.11.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/charts.js +6 -0
- package/dist/manifest.js +664 -664
- package/dist/svg.js +14 -2
- package/dist/widgets.css +43 -22
- package/dist/widgets.js +59 -12
- package/package.json +1 -1
- package/src/charts/PieLabel.js +7 -0
- package/src/svg/Text.d.ts +20 -19
- package/src/svg/Text.js +49 -33
- package/src/ui/Repeater.d.ts +60 -61
- package/src/widgets/List.d.ts +5 -6
- package/src/widgets/form/ColorPicker.js +43 -14
- package/src/widgets/form/ColorPicker.scss +275 -185
- package/src/widgets/form/ColorPicker.variables.scss +22 -21
- package/src/widgets/form/UploadButton.d.ts +34 -34
- package/src/widgets/grid/Grid.d.ts +11 -11
- package/src/widgets/grid/Grid.js +3276 -3273
- package/src/widgets/icons/pixel-picker.js +17 -0
- package/src/widgets/overlay/Tooltip.d.ts +1 -1
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import * as Cx from "../../core";
|
|
2
|
-
import { FieldProps } from "./Field";
|
|
3
|
-
|
|
4
|
-
interface UploadButtonProps extends FieldProps {
|
|
5
|
-
/** Text description. */
|
|
6
|
-
text?: Cx.StringProp;
|
|
7
|
-
|
|
8
|
-
url?: Cx.StringProp;
|
|
9
|
-
|
|
10
|
-
/** Base CSS class to be applied to the element. Default is 'uploadbutton'. */
|
|
11
|
-
baseClass?: string;
|
|
12
|
-
|
|
13
|
-
/** Defaults to `false`. Set to `true` to enable multiple selection. */
|
|
14
|
-
multiple?: boolean;
|
|
15
|
-
|
|
16
|
-
method?: string;
|
|
17
|
-
uploadInProgressText?: string;
|
|
18
|
-
|
|
19
|
-
/** Defaults to `false`. Set to `true` to abort uploads if the button is destroyed (unmounted). */
|
|
20
|
-
abortOnDestroy
|
|
21
|
-
|
|
22
|
-
/** Defines file types that are accepted for upload. */
|
|
23
|
-
accept?: Cx.StringProp;
|
|
24
|
-
|
|
25
|
-
/** Name of the icon to be put on the left side of the button. */
|
|
26
|
-
icon?: Cx.StringProp;
|
|
27
|
-
|
|
28
|
-
onUploadStarting?: ((xhr: XMLHttpRequest, instance: any, file: File, formData: FormData) => boolean) | string;
|
|
29
|
-
onUploadComplete?: ((xhr: XMLHttpRequest, instance: any, file: File, formData: FormData) => void) | string;
|
|
30
|
-
onUploadProgress?: ((event: ProgressEvent, instance: any, file: File, formData: FormData) => void) | string;
|
|
31
|
-
onUploadError?: ((event: ProgressEvent, instance: any, file: File, formData: FormData) => void) | string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export class UploadButton extends Cx.Widget<UploadButtonProps> {}
|
|
1
|
+
import * as Cx from "../../core";
|
|
2
|
+
import { FieldProps } from "./Field";
|
|
3
|
+
|
|
4
|
+
interface UploadButtonProps extends FieldProps {
|
|
5
|
+
/** Text description. */
|
|
6
|
+
text?: Cx.StringProp;
|
|
7
|
+
|
|
8
|
+
url?: Cx.StringProp;
|
|
9
|
+
|
|
10
|
+
/** Base CSS class to be applied to the element. Default is 'uploadbutton'. */
|
|
11
|
+
baseClass?: string;
|
|
12
|
+
|
|
13
|
+
/** Defaults to `false`. Set to `true` to enable multiple selection. */
|
|
14
|
+
multiple?: boolean;
|
|
15
|
+
|
|
16
|
+
method?: string;
|
|
17
|
+
uploadInProgressText?: string;
|
|
18
|
+
|
|
19
|
+
/** Defaults to `false`. Set to `true` to abort uploads if the button is destroyed (unmounted). */
|
|
20
|
+
abortOnDestroy?: boolean;
|
|
21
|
+
|
|
22
|
+
/** Defines file types that are accepted for upload. */
|
|
23
|
+
accept?: Cx.StringProp;
|
|
24
|
+
|
|
25
|
+
/** Name of the icon to be put on the left side of the button. */
|
|
26
|
+
icon?: Cx.StringProp;
|
|
27
|
+
|
|
28
|
+
onUploadStarting?: ((xhr: XMLHttpRequest, instance: any, file: File, formData: FormData) => boolean) | string;
|
|
29
|
+
onUploadComplete?: ((xhr: XMLHttpRequest, instance: any, file: File, formData: FormData) => void) | string;
|
|
30
|
+
onUploadProgress?: ((event: ProgressEvent, instance: any, file: File, formData: FormData) => void) | string;
|
|
31
|
+
onUploadError?: ((event: ProgressEvent, instance: any, file: File, formData: FormData) => void) | string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export class UploadButton extends Cx.Widget<UploadButtonProps> {}
|
|
@@ -155,9 +155,9 @@ interface GridRowConfig {
|
|
|
155
155
|
mod?: StringProp | Prop<string[]> | StructuredProp;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
interface GridProps extends StyledContainerProps {
|
|
158
|
+
interface GridProps<T = unknown> extends StyledContainerProps {
|
|
159
159
|
/** An array of records to be displayed in the grid. */
|
|
160
|
-
records?: Prop<
|
|
160
|
+
records?: Prop<T[]>;
|
|
161
161
|
|
|
162
162
|
/** Set to true to add a vertical scroll and a fixed header to the grid. */
|
|
163
163
|
scrollable?: boolean;
|
|
@@ -298,7 +298,7 @@ interface GridProps extends StyledContainerProps {
|
|
|
298
298
|
filterParams?: StructuredProp;
|
|
299
299
|
|
|
300
300
|
/** Callback to create a filter function for given filter params. */
|
|
301
|
-
onCreateFilter?: (filterParams: any, instance?: Instance) => (record:
|
|
301
|
+
onCreateFilter?: (filterParams: any, instance?: Instance) => (record: T) => boolean;
|
|
302
302
|
|
|
303
303
|
/** Enable infinite scrolling */
|
|
304
304
|
infinite?: boolean;
|
|
@@ -337,7 +337,7 @@ interface GridProps extends StyledContainerProps {
|
|
|
337
337
|
onBeforeCellEdit?: string | ((change: GridCellBeforeEditInfo, record: DataAdapterRecord) => any);
|
|
338
338
|
|
|
339
339
|
/** A callback function which is executed after a cell has been successfully edited. */
|
|
340
|
-
onCellEdited?: string | ((change: GridCellEditInfo
|
|
340
|
+
onCellEdited?: string | ((change: GridCellEditInfo<T>, record: DataAdapterRecord) => void);
|
|
341
341
|
|
|
342
342
|
/** A callback function which is executed after a column has been resized. */
|
|
343
343
|
onColumnResize?: (data: { width: number; column: Record }, instance: Instance) => void;
|
|
@@ -349,7 +349,7 @@ interface GridProps extends StyledContainerProps {
|
|
|
349
349
|
onCreateIsRecordSelectable?: (
|
|
350
350
|
params: any,
|
|
351
351
|
instance: Instance
|
|
352
|
-
) => (record:
|
|
352
|
+
) => (record: T, options?: { range?: boolean; toggle?: boolean }) => boolean;
|
|
353
353
|
|
|
354
354
|
/** Parameters whose change will cause scroll to be reset. */
|
|
355
355
|
scrollResetParams?: StructuredProp;
|
|
@@ -380,10 +380,10 @@ interface GridProps extends StyledContainerProps {
|
|
|
380
380
|
* Accepts new records as a first argument.
|
|
381
381
|
* If onCreateFilter callback is defined, filtered records can be retrieved using this callback.
|
|
382
382
|
*/
|
|
383
|
-
onTrackMappedRecords?: string | ((records:
|
|
383
|
+
onTrackMappedRecords?: string | ((records: T[], instance: Instance) => void);
|
|
384
384
|
|
|
385
385
|
/** Callback to create a function that can be used to check whether a record is draggable. */
|
|
386
|
-
onCreateIsRecordDraggable?: (params: any, instance: Instance) => (record:
|
|
386
|
+
onCreateIsRecordDraggable?: (params: any, instance: Instance) => (record: T) => boolean;
|
|
387
387
|
}
|
|
388
388
|
|
|
389
389
|
interface GridCellInfo {
|
|
@@ -395,9 +395,9 @@ interface GridCellBeforeEditInfo extends GridCellInfo {
|
|
|
395
395
|
data: any;
|
|
396
396
|
}
|
|
397
397
|
|
|
398
|
-
interface GridCellEditInfo extends GridCellInfo {
|
|
399
|
-
oldData:
|
|
400
|
-
newData:
|
|
398
|
+
interface GridCellEditInfo<T> extends GridCellInfo {
|
|
399
|
+
oldData: T;
|
|
400
|
+
newData: T;
|
|
401
401
|
}
|
|
402
402
|
|
|
403
|
-
export class Grid extends Widget<GridProps
|
|
403
|
+
export class Grid<T = unknown> extends Widget<GridProps<T>> {}
|