piral-modals
Advanced tools
Comparing version 0.8.3 to 0.9.0-pre.739
@@ -11,2 +11,3 @@ "use strict"; | ||
modals[`global-${name}`] = { | ||
pilet: undefined, | ||
name, | ||
@@ -28,7 +29,7 @@ component, | ||
return (api, target) => { | ||
const prefix = target.name; | ||
const pilet = target.name; | ||
return { | ||
showModal(name, options) { | ||
const dialog = { | ||
name: piral_core_1.buildName(prefix, name), | ||
name: piral_core_1.buildName(pilet, name), | ||
alternative: name, | ||
@@ -44,4 +45,5 @@ options, | ||
registerModal(name, arg, defaults) { | ||
const id = piral_core_1.buildName(prefix, name); | ||
const id = piral_core_1.buildName(pilet, name); | ||
context.registerModal(id, { | ||
pilet, | ||
name, | ||
@@ -53,3 +55,3 @@ component: piral_core_1.withApi(context.converters, arg, api, 'modal'), | ||
unregisterModal(name) { | ||
const id = piral_core_1.buildName(prefix, name); | ||
const id = piral_core_1.buildName(pilet, name); | ||
context.unregisterModal(id); | ||
@@ -56,0 +58,0 @@ }, |
import { ComponentType } from 'react'; | ||
import { Dict, WrappedComponent, BaseComponentProps, Disposable } from 'piral-core'; | ||
import { Dict, WrappedComponent, BaseComponentProps, BaseRegistration, Disposable } from 'piral-core'; | ||
declare module 'piral-core/lib/types/custom' { | ||
@@ -113,3 +113,3 @@ interface PiletCustomApi extends PiletModalsApi { | ||
export declare type ModalComponentProps<TOpts> = BaseComponentProps & BareModalComponentProps<TOpts>; | ||
export interface ModalRegistration { | ||
export interface ModalRegistration extends BaseRegistration { | ||
name: string; | ||
@@ -116,0 +116,0 @@ component: WrappedComponent<ModalComponentProps<any>>; |
{ | ||
"name": "piral-modals", | ||
"version": "0.8.3", | ||
"version": "0.9.0-pre.739", | ||
"description": "Extensions for the display of modal dialogs in Piral.", | ||
@@ -39,3 +39,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"piral-core": "^0.8.3" | ||
"piral-core": "^0.9.0-pre.739" | ||
}, | ||
@@ -45,3 +45,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "0e031b4cad4c255dfde11f5f62dbc27160f26f08" | ||
"gitHead": "92414f91e86075e1bddcfcb3f838a61fee60888e" | ||
} |
@@ -9,4 +9,6 @@ [![Piral Logo](https://github.com/smapiot/piral/raw/master/docs/assets/logo.png)](https://piral.io) | ||
For details on the provided API check out the [documentation at the Piral website](https://docs.piral.io) or [on GitHub](https://github.com/smapiot/piral/tree/master/docs). | ||
The following functions are brought to the Pilet API. | ||
(tbd) | ||
## Setup and Bootstrapping | ||
@@ -13,0 +15,0 @@ |
@@ -38,2 +38,3 @@ import * as actions from './actions'; | ||
modals[`global-${name}`] = { | ||
pilet: undefined, | ||
name, | ||
@@ -72,3 +73,3 @@ component, | ||
return (api, target) => { | ||
const prefix = target.name; | ||
const pilet = target.name; | ||
@@ -78,3 +79,3 @@ return { | ||
const dialog = { | ||
name: buildName(prefix, name), | ||
name: buildName(pilet, name), | ||
alternative: name, | ||
@@ -90,4 +91,5 @@ options, | ||
registerModal(name, arg, defaults) { | ||
const id = buildName(prefix, name); | ||
const id = buildName(pilet, name); | ||
context.registerModal(id, { | ||
pilet, | ||
name, | ||
@@ -99,3 +101,3 @@ component: withApi(context.converters, arg, api, 'modal'), | ||
unregisterModal(name) { | ||
const id = buildName(prefix, name); | ||
const id = buildName(pilet, name); | ||
context.unregisterModal(id); | ||
@@ -102,0 +104,0 @@ }, |
import { ComponentType } from 'react'; | ||
import { Dict, WrappedComponent, BaseComponentProps, ForeignComponent, Disposable } from 'piral-core'; | ||
import { Dict, WrappedComponent, BaseComponentProps, BaseRegistration, Disposable } from 'piral-core'; | ||
@@ -124,3 +124,3 @@ declare module 'piral-core/lib/types/custom' { | ||
export interface ModalRegistration { | ||
export interface ModalRegistration extends BaseRegistration { | ||
name: string; | ||
@@ -127,0 +127,0 @@ component: WrappedComponent<ModalComponentProps<any>>; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33248
738
55