diff --git a/src/components/Breadcrumb/index.d.ts b/src/components/Breadcrumb/index.d.ts index 26ba4be36..7038e7908 100644 --- a/src/components/Breadcrumb/index.d.ts +++ b/src/components/Breadcrumb/index.d.ts @@ -14,7 +14,7 @@ export interface BreadcrumbProps { rootNode?: BreadcrumbRootNode; divider?: React.ReactNode; nodes?: BreadcrumbNodes[]; - onClick?: (...args: any[]) => any; + onClick: (...args: any[]) => any; disabled?: boolean; } diff --git a/src/components/ConfirmModal/index.d.ts b/src/components/ConfirmModal/index.d.ts index 4dabec9bc..9de0e17df 100644 --- a/src/components/ConfirmModal/index.d.ts +++ b/src/components/ConfirmModal/index.d.ts @@ -12,7 +12,7 @@ export interface ConfirmModalProps { /** * function called when modalApply event is fired */ - modalApply?: (...args: any[]) => any; + modalApply: (...args: any[]) => any; /** * function called when modalClose event is fired */ diff --git a/src/components/ListPicker/index.d.ts b/src/components/ListPicker/index.d.ts index 726136745..0a13e19ac 100644 --- a/src/components/ListPicker/index.d.ts +++ b/src/components/ListPicker/index.d.ts @@ -41,10 +41,10 @@ export interface ListPickerProps { itemType?: string; labelFormatter?: (...args: any[]) => any; addonFormatter?: (...args: any[]) => any; - modalApply?: (...args: any[]) => any; + modalApply: (...args: any[]) => any; modalDescription?: string; modalClassName?: string; - modalClose?: (...args: any[]) => any; + modalClose: (...args: any[]) => any; modalFootnote?: string; modalTitle?: string; show?: boolean; diff --git a/src/components/ListPickerPure/index.d.ts b/src/components/ListPickerPure/index.d.ts index 94ba04066..a81574860 100644 --- a/src/components/ListPickerPure/index.d.ts +++ b/src/components/ListPickerPure/index.d.ts @@ -16,7 +16,7 @@ export interface ListPickerPureSelectedItems { export interface ListPickerPureProps { allowMultiSelection?: boolean; - deselectItem?: (...args: any[]) => any; + deselectItem: (...args: any[]) => any; emptyMessage?: string; emptySvgSymbol?: React.ReactNode; labelFormatter?: (...args: any[]) => any; @@ -24,7 +24,7 @@ export interface ListPickerPureProps { itemHeaders?: ListPickerPureItemHeaders; items?: ListPickerPureItems[]; itemType?: string; - selectItem?: (...args: any[]) => any; + selectItem: (...args: any[]) => any; selectedItems?: ListPickerPureSelectedItems[]; } diff --git a/src/components/Toast/index.d.ts b/src/components/Toast/index.d.ts index 9a85b3f75..47d11437d 100644 --- a/src/components/Toast/index.d.ts +++ b/src/components/Toast/index.d.ts @@ -28,31 +28,6 @@ export interface ToastContainerProps { declare const ToastContainer: React.FC; -export type ToastNotificationPosition = - | 'top-right' - | 'top-center' - | 'top-left' - | 'bottom-right' - | 'bottom-center' - | 'bottom-left'; - -export type ToastNotificationAutoClose = number | boolean; - -export type ToastNotificationTheme = 'success' | 'info' | 'alert' | 'attention'; - -export interface ToastNotificationProps { - /** - * PropTypes.oneOf(['top-right', 'top-center', 'top-left', 'bottom-right', 'bottom-center', 'bottom-left']) - */ - position?: ToastNotificationPosition; - autoClose?: ToastNotificationAutoClose; - title?: string; - theme?: ToastNotificationTheme; - message: React.ReactNode; -} - -declare const ToastNotification: React.FC; - export type notifyTheme = 'success' | 'info' | 'alert' | 'attention'; export interface notifyProps { @@ -69,7 +44,6 @@ declare const dismiss: React.FC; declare const Toast: { Container: typeof ToastContainer; - Notification: typeof ToastNotification; notify: typeof notify; dismiss: typeof dismiss; }; diff --git a/src/components/UserListPicker/index.d.ts b/src/components/UserListPicker/index.d.ts index 37f6b7a90..fb1510d5a 100644 --- a/src/components/UserListPicker/index.d.ts +++ b/src/components/UserListPicker/index.d.ts @@ -32,9 +32,9 @@ export interface UserListPickerProps { * Array of { avatar: PropTypes.string, givenName: PropTypes.string, surname: PropTypes.string, id: PropTypes.number } */ initialSelection?: UserListPickerInitialSelection[]; - modalApply?: (...args: any[]) => any; + modalApply: (...args: any[]) => any; modalDescription?: string; - modalClose?: (...args: any[]) => any; + modalClose: (...args: any[]) => any; modalTitle?: string; show?: boolean; /** diff --git a/www/containers/props.json b/www/containers/props.json index 294b8e761..8333062ce 100644 --- a/www/containers/props.json +++ b/www/containers/props.json @@ -2488,12 +2488,8 @@ "type": { "name": "func" }, - "required": false, - "description": "", - "defaultValue": { - "value": "() => {\n throw new Error('AdslotUi ListPicker needs a modalApply handler');\n}", - "computed": false - } + "required": true, + "description": "" }, "modalDescription": { "type": { @@ -2517,12 +2513,8 @@ "type": { "name": "func" }, - "required": false, - "description": "", - "defaultValue": { - "value": "() => {\n throw new Error('AdslotUi ListPicker needs a modalClose handler');\n}", - "computed": false - } + "required": true, + "description": "" }, "modalFootnote": { "type": { @@ -2577,12 +2569,8 @@ "type": { "name": "func" }, - "required": false, - "description": "", - "defaultValue": { - "value": "() => {\n throw new Error('AdslotUi ListPickerPure needs a deselectItem handler');\n}", - "computed": false - } + "required": true, + "description": "" }, "emptyMessage": { "type": { @@ -2671,12 +2659,8 @@ "type": { "name": "func" }, - "required": false, - "description": "", - "defaultValue": { - "value": "() => {\n throw new Error('AdslotUi ListPickerPure needs a selectItem handler');\n}", - "computed": false - } + "required": true, + "description": "" }, "selectedItems": { "type": { @@ -6382,7 +6366,7 @@ "required": false, "description": "", "defaultValue": { - "value": "(node) => {\n throw new Error(`AdslotUi TreePickerNode needs an includeNode handler for ${node}`);\n}", + "value": "(node) => {\n console.error(`AdslotUi TreePickerNode needs an includeNode handler for ${node.id}`);\n}", "computed": false } }, @@ -6419,7 +6403,7 @@ "required": false, "description": "", "defaultValue": { - "value": "(node) => {\n throw new Error(`AdslotUi TreePickerNode needs a removeNode handler for ${node}`);\n}", + "value": "(node) => {\n console.error(`AdslotUi TreePickerNode needs a removeNode handler for ${node.id}`);\n}", "computed": false } }, @@ -6534,12 +6518,8 @@ "type": { "name": "func" }, - "required": false, - "description": "", - "defaultValue": { - "value": "() => {\n throw new Error('AdslotUi UserListPicker needs a modalApply handler');\n}", - "computed": false - } + "required": true, + "description": "" }, "modalDescription": { "type": { @@ -6556,12 +6536,8 @@ "type": { "name": "func" }, - "required": false, - "description": "", - "defaultValue": { - "value": "() => {\n throw new Error('AdslotUi UserListPicker needs a modalClose handler');\n}", - "computed": false - } + "required": true, + "description": "" }, "modalTitle": { "type": {