sample-piral 1.1.0-beta.5752 → 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.0dafac.js → index.53afa6.js} +54 -71
- package/app/index.53afa6.js.map +1 -0
- package/app/index.d.ts +87 -54
- 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 +8 -7
- package/app/index.0dafac.js.map +0 -1
package/app/index.d.ts
CHANGED
|
@@ -256,7 +256,7 @@ export interface PiletNotificationsApi {
|
|
|
256
256
|
* @param options The options to consider for showing the notification.
|
|
257
257
|
* @returns A callback to trigger closing the notification.
|
|
258
258
|
*/
|
|
259
|
-
showNotification
|
|
259
|
+
showNotification(content: string | React.ReactElement<any, any> | AnyComponent<NotificationComponentProps>, options?: NotificationOptions): Disposable;
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
export interface PiletModalsApi {
|
|
@@ -474,55 +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
|
-
export type NotificationComponentProps
|
|
486
|
-
|
|
487
|
-
export interface NotificationOptions<TType extends keyof PiralNotificationTypes> extends PiralCustomNotificationOptions {
|
|
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?: TType;
|
|
502
|
-
/**
|
|
503
|
-
* The extra options to specify, if any.
|
|
504
|
-
*/
|
|
505
|
-
extra?: PiralNotificationTypes[TType];
|
|
506
|
-
}
|
|
479
|
+
export type NotificationComponentProps = BaseComponentProps & BareNotificationProps;
|
|
507
480
|
|
|
508
|
-
export
|
|
509
|
-
/**
|
|
510
|
-
* The info type. No extra options.
|
|
511
|
-
*/
|
|
512
|
-
info: void;
|
|
513
|
-
/**
|
|
514
|
-
* The success type. No extra options.
|
|
515
|
-
*/
|
|
516
|
-
success: void;
|
|
517
|
-
/**
|
|
518
|
-
* The warning type. No extra options.
|
|
519
|
-
*/
|
|
520
|
-
warning: void;
|
|
521
|
-
/**
|
|
522
|
-
* The error type. No extra options.
|
|
523
|
-
*/
|
|
524
|
-
error: void;
|
|
525
|
-
}
|
|
481
|
+
export type NotificationOptions = PiralCustomNotificationOptions & PiralStandardNotificationOptions & PiralSpecificNotificationOptions;
|
|
526
482
|
|
|
527
483
|
export type ModalOptions<T> = T extends keyof PiralModalsMap ? PiralModalsMap[T] & BaseModalOptions : T extends string ? BaseModalOptions : T;
|
|
528
484
|
|
|
@@ -772,9 +728,16 @@ export interface PiralCustomTilePreferences {}
|
|
|
772
728
|
|
|
773
729
|
export interface PiralCustomMenuSettings {}
|
|
774
730
|
|
|
775
|
-
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
|
+
}>;
|
|
776
739
|
|
|
777
|
-
export interface BareNotificationProps
|
|
740
|
+
export interface BareNotificationProps {
|
|
778
741
|
/**
|
|
779
742
|
* Callback for closing the notification programmatically.
|
|
780
743
|
*/
|
|
@@ -782,12 +745,32 @@ export interface BareNotificationProps<TType extends keyof PiralNotificationType
|
|
|
782
745
|
/**
|
|
783
746
|
* Provides the passed in options for this particular notification.
|
|
784
747
|
*/
|
|
785
|
-
options: NotificationOptions
|
|
748
|
+
options: NotificationOptions;
|
|
786
749
|
}
|
|
787
750
|
|
|
788
751
|
export interface PiralCustomNotificationOptions {}
|
|
789
752
|
|
|
790
|
-
export interface
|
|
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
|
+
}>;
|
|
791
774
|
|
|
792
775
|
export interface BaseModalOptions {}
|
|
793
776
|
|
|
@@ -914,9 +897,51 @@ export interface ExtensionRegistration extends BaseRegistration {
|
|
|
914
897
|
defaults: any;
|
|
915
898
|
}
|
|
916
899
|
|
|
917
|
-
export type
|
|
900
|
+
export type UnionOf<T> = {
|
|
901
|
+
[K in keyof T]: T[K];
|
|
902
|
+
}[keyof T];
|
|
918
903
|
|
|
919
|
-
export interface PiralCustomMenuTypes {
|
|
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
|
+
}
|
|
926
|
+
|
|
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
|
+
}
|
|
920
945
|
|
|
921
946
|
export interface PiralCustomModalsMap {}
|
|
922
947
|
|
|
@@ -955,6 +980,10 @@ export interface BaseRegistration {
|
|
|
955
980
|
|
|
956
981
|
export type WrappedComponent<TProps> = React.ComponentType<React.PropsWithChildren<Without<TProps, keyof BaseComponentProps>>>;
|
|
957
982
|
|
|
983
|
+
export interface PiralCustomMenuTypes {}
|
|
984
|
+
|
|
985
|
+
export interface PiralCustomNotificationTypes {}
|
|
986
|
+
|
|
958
987
|
export interface NavigationApi {
|
|
959
988
|
/**
|
|
960
989
|
* Pushes a new location onto the history stack.
|
|
@@ -997,6 +1026,10 @@ export interface NavigationApi {
|
|
|
997
1026
|
* as the implementation is router specific and may change over time.
|
|
998
1027
|
*/
|
|
999
1028
|
router: any;
|
|
1029
|
+
/**
|
|
1030
|
+
* Gets the public path of the application.
|
|
1031
|
+
*/
|
|
1032
|
+
publicPath: string;
|
|
1000
1033
|
}
|
|
1001
1034
|
|
|
1002
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.1.0-beta.
|
|
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.1.0-beta.
|
|
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.1.0-beta.
|
|
47
|
-
"piral-cli-webpack5": "^1.1.0-beta.
|
|
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.1.0-beta.
|
|
51
|
-
"piral-auth": "^1.1.0-beta.
|
|
51
|
+
"piral": "^1.1.0-beta.5756",
|
|
52
|
+
"piral-auth": "^1.1.0-beta.5756",
|
|
52
53
|
"piral-hooks-utils": "^1.0.2",
|
|
53
|
-
"piral-search": "^1.1.0-beta.
|
|
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",
|