sample-piral 0.14.20 → 0.14.21-beta.4074
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/app/index.d.ts +12 -2
- package/app/{index.f57726.js → index.dc2593.js} +18 -11
- package/app/index.dc2593.js.map +1 -0
- package/app/index.html +1 -1
- package/app/index.js +1 -1
- package/files.tar +0 -0
- package/files_once.tar +0 -0
- package/package.json +1 -1
- package/app/index.f57726.js.map +0 -1
package/app/index.d.ts
CHANGED
|
@@ -226,8 +226,9 @@ declare module "sample-piral" {
|
|
|
226
226
|
* @param name The name of the modal to register.
|
|
227
227
|
* @param Component The component to render the page.
|
|
228
228
|
* @param defaults Optionally, sets the default values for the inserted options.
|
|
229
|
+
* @param layout Optionally, sets the layout options for the dialog wrapper.
|
|
229
230
|
*/
|
|
230
|
-
registerModal<T>(name: T extends string ? T : string, Component: AnyComponent<ModalComponentProps<T>>, defaults?: ModalOptions<T
|
|
231
|
+
registerModal<T>(name: T extends string ? T : string, Component: AnyComponent<ModalComponentProps<T>>, defaults?: ModalOptions<T>, layout?: ModalLayoutOptions): RegistrationDisposer;
|
|
231
232
|
/**
|
|
232
233
|
* Unregisters a modal by its name.
|
|
233
234
|
* @param name The name that was previously registered.
|
|
@@ -466,6 +467,11 @@ declare module "sample-piral" {
|
|
|
466
467
|
|
|
467
468
|
export type ModalComponentProps<T> = BaseComponentProps & BareModalComponentProps<ModalOptions<T>>;
|
|
468
469
|
|
|
470
|
+
/**
|
|
471
|
+
* The options provided for the dialog layout.
|
|
472
|
+
*/
|
|
473
|
+
export interface ModalLayoutOptions {}
|
|
474
|
+
|
|
469
475
|
export interface FeedResolver<TData> {
|
|
470
476
|
(): Promise<TData>;
|
|
471
477
|
}
|
|
@@ -1755,6 +1761,7 @@ declare module "sample-piral" {
|
|
|
1755
1761
|
name: string;
|
|
1756
1762
|
component: WrappedComponent<ModalComponentProps<any>>;
|
|
1757
1763
|
defaults: any;
|
|
1764
|
+
layout: ModalLayoutOptions;
|
|
1758
1765
|
}
|
|
1759
1766
|
|
|
1760
1767
|
export interface ConnectorDetails<TData, TItem, TReducers extends FeedConnectorReducers<TData> = {}> extends FeedConnectorOptions<TData, TItem, TReducers> {
|
|
@@ -1989,7 +1996,10 @@ declare module "sample-piral" {
|
|
|
1989
1996
|
close(): void;
|
|
1990
1997
|
}
|
|
1991
1998
|
|
|
1992
|
-
export interface ModalsDialogProps extends OpenModalDialog {
|
|
1999
|
+
export interface ModalsDialogProps extends OpenModalDialog {
|
|
2000
|
+
layout: ModalLayoutOptions;
|
|
2001
|
+
defaults: any;
|
|
2002
|
+
}
|
|
1993
2003
|
|
|
1994
2004
|
export interface SearchResultProps {}
|
|
1995
2005
|
|
|
@@ -3685,7 +3685,7 @@ function createInstance() {
|
|
|
3685
3685
|
var createApi = apiFactory(context, usedPlugins);
|
|
3686
3686
|
var root = createApi({
|
|
3687
3687
|
name: 'root',
|
|
3688
|
-
version: "0.14.
|
|
3688
|
+
version: "0.14.21-beta.4074" || 0,
|
|
3689
3689
|
spec: ''
|
|
3690
3690
|
});
|
|
3691
3691
|
var options = (0,_helpers__WEBPACK_IMPORTED_MODULE_6__.createPiletOptions)({
|
|
@@ -7357,15 +7357,17 @@ var Modals = function Modals() {
|
|
|
7357
7357
|
var reg = modals[n.name] || findModal(modals, n.alternative);
|
|
7358
7358
|
var Component = reg && reg.component;
|
|
7359
7359
|
var defaults = reg && reg.defaults;
|
|
7360
|
+
var options = Object.assign(Object.assign({}, defaults), n.options);
|
|
7360
7361
|
return Component && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components__WEBPACK_IMPORTED_MODULE_2__.PiralModalsDialog, Object.assign({}, n, {
|
|
7362
|
+
options: options,
|
|
7363
|
+
defaults: reg.defaults,
|
|
7364
|
+
layout: reg.layout,
|
|
7361
7365
|
key: n.name
|
|
7362
7366
|
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component, {
|
|
7363
7367
|
onClose: n.close,
|
|
7364
|
-
options:
|
|
7368
|
+
options: options
|
|
7365
7369
|
}));
|
|
7366
|
-
}).filter(
|
|
7367
|
-
return !!m;
|
|
7368
|
-
});
|
|
7370
|
+
}).filter(Boolean);
|
|
7369
7371
|
var open = children.length > 0;
|
|
7370
7372
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components__WEBPACK_IMPORTED_MODULE_2__.PiralModalsHost, {
|
|
7371
7373
|
open: open,
|
|
@@ -7487,12 +7489,15 @@ function getModalDialogs(dialogs) {
|
|
|
7487
7489
|
var _step$value = _step.value,
|
|
7488
7490
|
name = _step$value.name,
|
|
7489
7491
|
component = _step$value.component,
|
|
7490
|
-
defaults = _step$value.defaults
|
|
7492
|
+
defaults = _step$value.defaults,
|
|
7493
|
+
_step$value$layout = _step$value.layout,
|
|
7494
|
+
layout = _step$value$layout === void 0 ? {} : _step$value$layout;
|
|
7491
7495
|
modals["global-".concat(name)] = {
|
|
7492
7496
|
pilet: undefined,
|
|
7493
7497
|
name: name,
|
|
7494
7498
|
component: component,
|
|
7495
|
-
defaults: defaults
|
|
7499
|
+
defaults: defaults,
|
|
7500
|
+
layout: layout
|
|
7496
7501
|
};
|
|
7497
7502
|
}
|
|
7498
7503
|
} catch (err) {
|
|
@@ -7554,12 +7559,14 @@ function createModalsApi() {
|
|
|
7554
7559
|
return dialog.close;
|
|
7555
7560
|
},
|
|
7556
7561
|
registerModal: function registerModal(name, arg, defaults) {
|
|
7562
|
+
var layout = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
7557
7563
|
var id = (0,piral_core__WEBPACK_IMPORTED_MODULE_4__.buildName)(pilet, name);
|
|
7558
7564
|
context.registerModal(id, {
|
|
7559
7565
|
pilet: pilet,
|
|
7560
7566
|
name: name,
|
|
7561
7567
|
component: (0,piral_core__WEBPACK_IMPORTED_MODULE_5__.withApi)(context, arg, api, 'modal'),
|
|
7562
|
-
defaults: defaults
|
|
7568
|
+
defaults: defaults,
|
|
7569
|
+
layout: layout
|
|
7563
7570
|
});
|
|
7564
7571
|
return function () {
|
|
7565
7572
|
return api.unregisterModal(name);
|
|
@@ -9554,11 +9561,11 @@ function installPiralDebug(options) {
|
|
|
9554
9561
|
debug: debugApiVersion,
|
|
9555
9562
|
instance: {
|
|
9556
9563
|
name: "sample-piral",
|
|
9557
|
-
version: "0.14.
|
|
9564
|
+
version: "0.14.21-beta.4074",
|
|
9558
9565
|
dependencies: "reactstrap,react,react-dom,react-router,react-router-dom,history,tslib,path-to-regexp,@libre/atom,@dbeining/react-atom"
|
|
9559
9566
|
},
|
|
9560
9567
|
build: {
|
|
9561
|
-
date: "2022-04-
|
|
9568
|
+
date: "2022-04-11T10:35:07.832Z",
|
|
9562
9569
|
cli: "0.14.20",
|
|
9563
9570
|
compat: "0.14"
|
|
9564
9571
|
},
|
|
@@ -80972,4 +80979,4 @@ var layout_1 = __webpack_require__(/*! ./layout */ "./src/layout.tsx");
|
|
|
80972
80979
|
|
|
80973
80980
|
/******/ })()
|
|
80974
80981
|
;
|
|
80975
|
-
//# sourceMappingURL=index.
|
|
80982
|
+
//# sourceMappingURL=index.dc2593.js.map
|