sample-piral 1.0.2 → 1.1.0-beta.5756
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.2134b9.js → index.53afa6.js} +54 -71
- package/app/index.53afa6.js.map +1 -0
- package/app/index.d.ts +84 -26
- 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 +9 -8
- package/app/index.2134b9.js.map +0 -1
package/app/index.d.ts
CHANGED
|
@@ -474,32 +474,11 @@ export interface TilePreferences extends PiralCustomTilePreferences {
|
|
|
474
474
|
|
|
475
475
|
export interface MenuComponentProps extends BaseComponentProps {}
|
|
476
476
|
|
|
477
|
-
export
|
|
478
|
-
/**
|
|
479
|
-
* Sets the type of the menu to attach to.
|
|
480
|
-
* @default "general"
|
|
481
|
-
*/
|
|
482
|
-
type?: MenuType;
|
|
483
|
-
}
|
|
477
|
+
export type MenuSettings = PiralCustomMenuSettings & PiralSpecificMenuSettings;
|
|
484
478
|
|
|
485
479
|
export type NotificationComponentProps = BaseComponentProps & BareNotificationProps;
|
|
486
480
|
|
|
487
|
-
export
|
|
488
|
-
/**
|
|
489
|
-
* The title of the notification, if any.
|
|
490
|
-
*/
|
|
491
|
-
title?: string;
|
|
492
|
-
/**
|
|
493
|
-
* Determines when the notification should automatically close in milliseconds.
|
|
494
|
-
* A value of 0 or undefined forces the user to close the notification.
|
|
495
|
-
*/
|
|
496
|
-
autoClose?: number;
|
|
497
|
-
/**
|
|
498
|
-
* The type of the notification used when displaying the message.
|
|
499
|
-
* By default info is used.
|
|
500
|
-
*/
|
|
501
|
-
type?: "info" | "success" | "warning" | "error";
|
|
502
|
-
}
|
|
481
|
+
export type NotificationOptions = PiralCustomNotificationOptions & PiralStandardNotificationOptions & PiralSpecificNotificationOptions;
|
|
503
482
|
|
|
504
483
|
export type ModalOptions<T> = T extends keyof PiralModalsMap ? PiralModalsMap[T] & BaseModalOptions : T extends string ? BaseModalOptions : T;
|
|
505
484
|
|
|
@@ -749,7 +728,14 @@ export interface PiralCustomTilePreferences {}
|
|
|
749
728
|
|
|
750
729
|
export interface PiralCustomMenuSettings {}
|
|
751
730
|
|
|
752
|
-
export type
|
|
731
|
+
export type PiralSpecificMenuSettings = UnionOf<{
|
|
732
|
+
[P in keyof PiralMenuType]: Partial<PiralMenuType[P]> & {
|
|
733
|
+
/**
|
|
734
|
+
* The type of the menu used.
|
|
735
|
+
*/
|
|
736
|
+
type?: P;
|
|
737
|
+
};
|
|
738
|
+
}>;
|
|
753
739
|
|
|
754
740
|
export interface BareNotificationProps {
|
|
755
741
|
/**
|
|
@@ -764,6 +750,28 @@ export interface BareNotificationProps {
|
|
|
764
750
|
|
|
765
751
|
export interface PiralCustomNotificationOptions {}
|
|
766
752
|
|
|
753
|
+
export interface PiralStandardNotificationOptions {
|
|
754
|
+
/**
|
|
755
|
+
* The title of the notification, if any.
|
|
756
|
+
*/
|
|
757
|
+
title?: string;
|
|
758
|
+
/**
|
|
759
|
+
* Determines when the notification should automatically close in milliseconds.
|
|
760
|
+
* A value of 0 or undefined forces the user to close the notification.
|
|
761
|
+
*/
|
|
762
|
+
autoClose?: number;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
export type PiralSpecificNotificationOptions = UnionOf<{
|
|
766
|
+
[P in keyof PiralNotificationTypes]: Partial<PiralNotificationTypes[P]> & {
|
|
767
|
+
/**
|
|
768
|
+
* The type of the notification used when displaying the message.
|
|
769
|
+
* By default info is used.
|
|
770
|
+
*/
|
|
771
|
+
type?: P;
|
|
772
|
+
};
|
|
773
|
+
}>;
|
|
774
|
+
|
|
767
775
|
export interface BaseModalOptions {}
|
|
768
776
|
|
|
769
777
|
export interface PiralModalsMap extends PiralCustomModalsMap {}
|
|
@@ -889,9 +897,51 @@ export interface ExtensionRegistration extends BaseRegistration {
|
|
|
889
897
|
defaults: any;
|
|
890
898
|
}
|
|
891
899
|
|
|
892
|
-
export type
|
|
900
|
+
export type UnionOf<T> = {
|
|
901
|
+
[K in keyof T]: T[K];
|
|
902
|
+
}[keyof T];
|
|
903
|
+
|
|
904
|
+
export interface PiralMenuType extends PiralCustomMenuTypes {
|
|
905
|
+
/**
|
|
906
|
+
* The general type. No extra options.
|
|
907
|
+
*/
|
|
908
|
+
general: {};
|
|
909
|
+
/**
|
|
910
|
+
* The admin type. No extra options.
|
|
911
|
+
*/
|
|
912
|
+
admin: {};
|
|
913
|
+
/**
|
|
914
|
+
* The user type. No extra options.
|
|
915
|
+
*/
|
|
916
|
+
user: {};
|
|
917
|
+
/**
|
|
918
|
+
* The header type. No extra options.
|
|
919
|
+
*/
|
|
920
|
+
header: {};
|
|
921
|
+
/**
|
|
922
|
+
* The footer type. No extra options.
|
|
923
|
+
*/
|
|
924
|
+
footer: {};
|
|
925
|
+
}
|
|
893
926
|
|
|
894
|
-
export interface
|
|
927
|
+
export interface PiralNotificationTypes extends PiralCustomNotificationTypes {
|
|
928
|
+
/**
|
|
929
|
+
* The info type. No extra options.
|
|
930
|
+
*/
|
|
931
|
+
info: {};
|
|
932
|
+
/**
|
|
933
|
+
* The success type. No extra options.
|
|
934
|
+
*/
|
|
935
|
+
success: {};
|
|
936
|
+
/**
|
|
937
|
+
* The warning type. No extra options.
|
|
938
|
+
*/
|
|
939
|
+
warning: {};
|
|
940
|
+
/**
|
|
941
|
+
* The error type. No extra options.
|
|
942
|
+
*/
|
|
943
|
+
error: {};
|
|
944
|
+
}
|
|
895
945
|
|
|
896
946
|
export interface PiralCustomModalsMap {}
|
|
897
947
|
|
|
@@ -930,6 +980,10 @@ export interface BaseRegistration {
|
|
|
930
980
|
|
|
931
981
|
export type WrappedComponent<TProps> = React.ComponentType<React.PropsWithChildren<Without<TProps, keyof BaseComponentProps>>>;
|
|
932
982
|
|
|
983
|
+
export interface PiralCustomMenuTypes {}
|
|
984
|
+
|
|
985
|
+
export interface PiralCustomNotificationTypes {}
|
|
986
|
+
|
|
933
987
|
export interface NavigationApi {
|
|
934
988
|
/**
|
|
935
989
|
* Pushes a new location onto the history stack.
|
|
@@ -972,6 +1026,10 @@ export interface NavigationApi {
|
|
|
972
1026
|
* as the implementation is router specific and may change over time.
|
|
973
1027
|
*/
|
|
974
1028
|
router: any;
|
|
1029
|
+
/**
|
|
1030
|
+
* Gets the public path of the application.
|
|
1031
|
+
*/
|
|
1032
|
+
publicPath: string;
|
|
975
1033
|
}
|
|
976
1034
|
|
|
977
1035
|
export type Without<T, K> = Pick<T, Exclude<keyof T, K>>;
|
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.53afa6.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.53afa6.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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sample-piral",
|
|
3
3
|
"description": "Example project illustrating the use of the piral and piral-cli packages.",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.1.0-beta.5756",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://piral.io",
|
|
7
7
|
"keywords": [
|
|
@@ -31,26 +31,27 @@
|
|
|
31
31
|
"files": []
|
|
32
32
|
},
|
|
33
33
|
"piralCLI": {
|
|
34
|
-
"version": "1.0.
|
|
34
|
+
"version": "1.1.0-beta.5756",
|
|
35
35
|
"generated": true
|
|
36
36
|
},
|
|
37
37
|
"main": "./app/index.js",
|
|
38
38
|
"typings": "./app/index.d.ts",
|
|
39
39
|
"app": "./app/index.html",
|
|
40
40
|
"peerDependencies": {},
|
|
41
|
+
"optionalDependencies": {},
|
|
41
42
|
"devDependencies": {
|
|
42
43
|
"@types/react": "^18.0.0",
|
|
43
44
|
"@types/react-dom": "^18.0.0",
|
|
44
45
|
"@types/react-router": "^5.1.8",
|
|
45
46
|
"@types/react-router-dom": "^5.1.6",
|
|
46
|
-
"piral-cli": "^1.0.
|
|
47
|
-
"piral-cli-webpack5": "^1.0.
|
|
47
|
+
"piral-cli": "^1.1.0-beta.5756",
|
|
48
|
+
"piral-cli-webpack5": "^1.1.0-beta.5756",
|
|
48
49
|
"sass": "^1.17.0",
|
|
49
50
|
"bootstrap": "^4.3.1",
|
|
50
|
-
"piral": "^1.0.
|
|
51
|
-
"piral-auth": "^1.0.
|
|
52
|
-
"piral-hooks-utils": "^1.0.
|
|
53
|
-
"piral-search": "^1.0.
|
|
51
|
+
"piral": "^1.1.0-beta.5756",
|
|
52
|
+
"piral-auth": "^1.1.0-beta.5756",
|
|
53
|
+
"piral-hooks-utils": "^1.0.2",
|
|
54
|
+
"piral-search": "^1.1.0-beta.5756",
|
|
54
55
|
"reactstrap": "8.10.1",
|
|
55
56
|
"tslib": "2.5.2",
|
|
56
57
|
"react": "18.2.0",
|