sample-piral 0.14.23 → 0.14.24-beta.4157
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.1ecdc1.js → index.c37743.js} +23 -7
- package/app/index.c37743.js.map +1 -0
- package/app/index.d.ts +60 -20
- 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.1ecdc1.js.map +0 -1
package/app/index.d.ts
CHANGED
|
@@ -594,6 +594,10 @@ declare module "sample-piral" {
|
|
|
594
594
|
* The provided parameters for showing the extension.
|
|
595
595
|
*/
|
|
596
596
|
params: T extends keyof PiralExtensionSlotMap ? PiralExtensionSlotMap[T] : T extends string ? any : T;
|
|
597
|
+
/**
|
|
598
|
+
* The optional children to receive, if any.
|
|
599
|
+
*/
|
|
600
|
+
children?: React.ReactNode;
|
|
597
601
|
}
|
|
598
602
|
|
|
599
603
|
/**
|
|
@@ -614,9 +618,27 @@ declare module "sample-piral" {
|
|
|
614
618
|
* for the specified extension.
|
|
615
619
|
*/
|
|
616
620
|
empty?(): React.ReactNode;
|
|
621
|
+
/**
|
|
622
|
+
* Determines if the `render` function should be called in case no
|
|
623
|
+
* components are available for the specified extension.
|
|
624
|
+
*
|
|
625
|
+
* If true, `empty` will be called and returned from the slot.
|
|
626
|
+
* If false, `render` will be called with the result of calling `empty`.
|
|
627
|
+
* The result of calling `render` will then be returned from the slot.
|
|
628
|
+
*/
|
|
629
|
+
noEmptyRender?: boolean;
|
|
630
|
+
/**
|
|
631
|
+
* Defines the order of the components to render.
|
|
632
|
+
* May be more convient than using `render` w.r.t. ordering extensions
|
|
633
|
+
* by their supplied metadata.
|
|
634
|
+
* @param extensions The registered extensions.
|
|
635
|
+
* @returns The ordered extensions.
|
|
636
|
+
*/
|
|
637
|
+
order?(extensions: Array<ExtensionRegistration>): Array<ExtensionRegistration>;
|
|
617
638
|
/**
|
|
618
639
|
* Defines how the provided nodes should be rendered.
|
|
619
640
|
* @param nodes The rendered extension nodes.
|
|
641
|
+
* @returns The rendered nodes, i.e., an ReactElement.
|
|
620
642
|
*/
|
|
621
643
|
render?(nodes: Array<React.ReactNode>): React.ReactElement<any, any> | null;
|
|
622
644
|
/**
|
|
@@ -948,6 +970,24 @@ declare module "sample-piral" {
|
|
|
948
970
|
*/
|
|
949
971
|
export interface PiralCustomExtensionSlotMap {}
|
|
950
972
|
|
|
973
|
+
/**
|
|
974
|
+
* The interface modeling the registration of a pilet extension component.
|
|
975
|
+
*/
|
|
976
|
+
export interface ExtensionRegistration extends BaseRegistration {
|
|
977
|
+
/**
|
|
978
|
+
* The wrapped registered extension component.
|
|
979
|
+
*/
|
|
980
|
+
component: WrappedComponent<ExtensionComponentProps<string>>;
|
|
981
|
+
/**
|
|
982
|
+
* The original extension component that has been registered.
|
|
983
|
+
*/
|
|
984
|
+
reference: any;
|
|
985
|
+
/**
|
|
986
|
+
* The default params (i.e., meta) of the extension.
|
|
987
|
+
*/
|
|
988
|
+
defaults: any;
|
|
989
|
+
}
|
|
990
|
+
|
|
951
991
|
/**
|
|
952
992
|
* Metadata for pilets using the v0 schema with a content.
|
|
953
993
|
*/
|
|
@@ -995,6 +1035,18 @@ declare module "sample-piral" {
|
|
|
995
1035
|
readState: PiralActions["readState"];
|
|
996
1036
|
}
|
|
997
1037
|
|
|
1038
|
+
/**
|
|
1039
|
+
* The base type for pilet component registration in the global state context.
|
|
1040
|
+
*/
|
|
1041
|
+
export interface BaseRegistration {
|
|
1042
|
+
/**
|
|
1043
|
+
* The pilet registering the component.
|
|
1044
|
+
*/
|
|
1045
|
+
pilet: string;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
export type WrappedComponent<TProps> = React.ComponentType<Without<TProps, keyof BaseComponentProps>>;
|
|
1049
|
+
|
|
998
1050
|
/**
|
|
999
1051
|
* Basic metadata for pilets using the v0 schema.
|
|
1000
1052
|
*/
|
|
@@ -1204,6 +1256,8 @@ declare module "sample-piral" {
|
|
|
1204
1256
|
readState<S>(select: (state: GlobalState) => S): S;
|
|
1205
1257
|
}
|
|
1206
1258
|
|
|
1259
|
+
export type Without<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
1260
|
+
|
|
1207
1261
|
/**
|
|
1208
1262
|
* Custom state extensions defined outside of piral-core.
|
|
1209
1263
|
*/
|
|
@@ -1527,19 +1581,16 @@ declare module "sample-piral" {
|
|
|
1527
1581
|
* The interface modeling the registration of a pilet page component.
|
|
1528
1582
|
*/
|
|
1529
1583
|
export interface PageRegistration extends BaseRegistration {
|
|
1584
|
+
/**
|
|
1585
|
+
* The registered page component.
|
|
1586
|
+
*/
|
|
1530
1587
|
component: WrappedComponent<PageComponentProps>;
|
|
1588
|
+
/**
|
|
1589
|
+
* The page's associated metadata.
|
|
1590
|
+
*/
|
|
1531
1591
|
meta: PiralPageMeta;
|
|
1532
1592
|
}
|
|
1533
1593
|
|
|
1534
|
-
/**
|
|
1535
|
-
* The interface modeling the registration of a pilet extension component.
|
|
1536
|
-
*/
|
|
1537
|
-
export interface ExtensionRegistration extends BaseRegistration {
|
|
1538
|
-
component: WrappedComponent<ExtensionComponentProps<string>>;
|
|
1539
|
-
reference: any;
|
|
1540
|
-
defaults: any;
|
|
1541
|
-
}
|
|
1542
|
-
|
|
1543
1594
|
export interface OpenNotification {
|
|
1544
1595
|
id: string;
|
|
1545
1596
|
component: React.ComponentType<BareNotificationProps>;
|
|
@@ -1820,15 +1871,6 @@ declare module "sample-piral" {
|
|
|
1820
1871
|
options: LoadPiletsOptions;
|
|
1821
1872
|
}
|
|
1822
1873
|
|
|
1823
|
-
/**
|
|
1824
|
-
* The base type for pilet component registration in the global state context.
|
|
1825
|
-
*/
|
|
1826
|
-
export interface BaseRegistration {
|
|
1827
|
-
pilet: string;
|
|
1828
|
-
}
|
|
1829
|
-
|
|
1830
|
-
export type WrappedComponent<TProps> = React.ComponentType<Without<TProps, keyof BaseComponentProps>>;
|
|
1831
|
-
|
|
1832
1874
|
export interface FeedDataState {
|
|
1833
1875
|
/**
|
|
1834
1876
|
* Determines if the feed data is currently loading.
|
|
@@ -2103,8 +2145,6 @@ declare module "sample-piral" {
|
|
|
2103
2145
|
strategy?: PiletLoadingStrategy;
|
|
2104
2146
|
}
|
|
2105
2147
|
|
|
2106
|
-
export type Without<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
2107
|
-
|
|
2108
2148
|
export interface TileErrorInfoProps {
|
|
2109
2149
|
/**
|
|
2110
2150
|
* The type of the error.
|
package/app/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<title>Piral Sample</title>
|
|
6
6
|
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
|
|
7
7
|
|
|
8
|
-
<script defer src="/index.
|
|
8
|
+
<script defer src="/index.c37743.js"></script></head>
|
|
9
9
|
<body>
|
|
10
10
|
<div id="app">
|
|
11
11
|
<div class="pi-center">
|
package/app/index.js
CHANGED
|
@@ -2,7 +2,7 @@ if (process.env.NODE_ENV === 'test') {
|
|
|
2
2
|
// behavior for the test environment, we'll try to make it work
|
|
3
3
|
|
|
4
4
|
if (typeof window !== 'undefined') {
|
|
5
|
-
require('.//index.
|
|
5
|
+
require('.//index.c37743.js');
|
|
6
6
|
const ctx = window['dbg:piral'];
|
|
7
7
|
const dependencies = (ctx && ctx.pilets && ctx.pilets.getDependencies({})) || {};
|
|
8
8
|
module.exports = dependencies['sample-piral'] || {};
|
package/files.tar
CHANGED
|
Binary file
|
package/files_once.tar
CHANGED
|
Binary file
|
package/package.json
CHANGED