piral-dashboard 1.9.2-beta.8358 → 1.9.2-beta.8388
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/lib/Dashboard.d.ts +1 -2
- package/lib/Dashboard.js.map +1 -1
- package/lib/types.d.ts +1 -2
- package/package.json +5 -5
- package/piral-dashboard.min.js +1 -1
- package/src/Dashboard.tsx +1 -2
- package/src/types.ts +1 -2
package/lib/Dashboard.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { RouteComponentProps } from 'react-router-dom';
|
|
3
2
|
import { TileRegistration } from './types';
|
|
4
|
-
export interface DashboardProps
|
|
3
|
+
export interface DashboardProps {
|
|
5
4
|
filter?(tile: TileRegistration): boolean;
|
|
6
5
|
}
|
|
7
6
|
/**
|
package/lib/Dashboard.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dashboard.js","sourceRoot":"","sources":["../src/Dashboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Dashboard.js","sourceRoot":"","sources":["../src/Dashboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAO3E;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAA6B,CAAC,KAAK,EAAE,EAAE;IAC3D,MAAM,KAAK,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtD,MAAM,EAAE,MAAM,GAAG,GAAG,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC;IACtC,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;SAChC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;SACrC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACZ,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;QAC1D,MAAM,EAAE,cAAc,GAAG,CAAC,EAAE,WAAW,GAAG,CAAC,EAAE,SAAS,GAAG,KAAK,EAAE,GAAG,WAAW,CAAC;QAC/E,OAAO,CACL,oBAAC,kBAAkB,IACjB,GAAG,EAAE,IAAI,EACT,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,WAAW,EACjB,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,WAAW;YAEjB,oBAAC,SAAS,IAAC,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,WAAW,GAAI,CACtC,CACtB,CAAC;IACJ,CAAC,CAAC,CAAC;IAEL,OAAO,oBAAC,uBAAuB,OAAK,KAAK,EAAE,QAAQ,EAAE,QAAQ,GAAI,CAAC;AACpE,CAAC,CAAC;AACF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC"}
|
package/lib/types.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ComponentType, ReactNode } from 'react';
|
|
2
|
-
import type { RouteComponentProps } from 'react-router-dom';
|
|
3
2
|
import type { Dict, WrappedComponent, BaseComponentProps, AnyComponent, BaseRegistration, RegistrationDisposer } from 'piral-core';
|
|
4
3
|
declare module 'piral-core/lib/types/custom' {
|
|
5
4
|
interface PiletCustomApi extends PiletDashboardApi {
|
|
@@ -49,7 +48,7 @@ export interface InitialTile {
|
|
|
49
48
|
*/
|
|
50
49
|
preferences?: TilePreferences;
|
|
51
50
|
}
|
|
52
|
-
export interface DashboardContainerProps
|
|
51
|
+
export interface DashboardContainerProps {
|
|
53
52
|
/**
|
|
54
53
|
* The tiles to display.
|
|
55
54
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "piral-dashboard",
|
|
3
|
-
"version": "1.9.2-beta.
|
|
3
|
+
"version": "1.9.2-beta.8388",
|
|
4
4
|
"description": "Plugin for creating a centralized dashboard in Piral.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"piral",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"exports": {
|
|
24
24
|
".": "./lib/index.js",
|
|
25
25
|
"./lib/*": {
|
|
26
|
-
"
|
|
27
|
-
"
|
|
26
|
+
"types": "./lib/*.d.ts",
|
|
27
|
+
"import": "./lib/*"
|
|
28
28
|
},
|
|
29
29
|
"./package.json": "./package.json"
|
|
30
30
|
},
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/react": "^18.0.0",
|
|
54
54
|
"@types/react-router-dom": "^5.1.6",
|
|
55
|
-
"piral-core": "1.9.2-beta.
|
|
55
|
+
"piral-core": "1.9.2-beta.8388",
|
|
56
56
|
"react": "^18.0.0"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "25023f913ae9423c9cecd23e44d70e959ff58c8a"
|
|
59
59
|
}
|
package/piral-dashboard.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var piralDashboard=(()=>{var N=Object.create;var h=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames;var _=Object.getPrototypeOf,$=Object.prototype.hasOwnProperty;var s=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,t)=>(typeof require<"u"?require:r)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var R=(e,r)=>{for(var t in r)h(e,t,{get:r[t],enumerable:!0})},w=(e,r,t,
|
|
1
|
+
var piralDashboard=(()=>{var N=Object.create;var h=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames;var _=Object.getPrototypeOf,$=Object.prototype.hasOwnProperty;var s=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,t)=>(typeof require<"u"?require:r)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var R=(e,r)=>{for(var t in r)h(e,t,{get:r[t],enumerable:!0})},w=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of O(r))!$.call(e,i)&&i!==t&&h(e,i,{get:()=>r[i],enumerable:!(o=j(r,i))||o.enumerable});return e};var A=(e,r,t)=>(t=e!=null?N(_(e)):{},w(r||!e||!e.__esModule?h(t,"default",{value:e,enumerable:!0}):t,e)),q=e=>w(h({},"__esModule",{value:!0}),e);var J={};R(J,{Dashboard:()=>p,PiralDashboardContainer:()=>P,PiralDashboardTile:()=>x,createDashboardApi:()=>H});var g={};R(g,{registerTile:()=>v,unregisterTile:()=>B});var b=s("piral-core");function v(e,r,t){e.dispatch(o=>({...o,registry:{...o.registry,tiles:(0,b.withKey)(o.registry.tiles,r,t)}}))}function B(e,r){e.dispatch(t=>({...t,registry:{...t.registry,tiles:(0,b.withoutKey)(t.registry.tiles,r)}}))}var n=s("piral-core");var T=A(s("react")),S=s("piral-core");var D=s("piral-core"),P=(0,D.getPiralComponent)("DashboardContainer"),x=(0,D.getPiralComponent)("DashboardTile");var p=e=>{let r=(0,S.useGlobalState)(i=>i.registry.tiles),{filter:t=()=>!0}=e,o=Object.keys(r).filter(i=>t(r[i])).map(i=>{let{component:l,preferences:d}=r[i],{initialColumns:f=1,initialRows:u=1,resizable:a=!1}=d;return T.createElement(x,{key:i,columns:f,rows:u,resizable:a,meta:d},T.createElement(l,{columns:f,rows:u}))});return T.createElement(P,{...e,children:o})};p.displayName="Dashboard";var G=A(s("react")),m=s("piral-core"),I=e=>G.createElement(m.ExtensionSlot,{name:"dashboard",params:e,empty:()=>(0,m.defaultRender)(e.children,"default_dashboard")}),F=e=>(0,m.defaultRender)(e.children);function y(e,r={}){return{...e,...r}}function k(e,r){let t={},o=0;for(let{component:i,preferences:l}of e)t[`global-${o++}`]={pilet:void 0,component:i,preferences:y(r,l)};return t}function z(e){return r=>({...r,components:{DashboardTile:F,DashboardContainer:I,...r.components},registry:{...r.registry,tiles:e}})}function E(e){return r=>({...r,routes:{...r.routes,...e.reduce((t,o)=>(t[o]=p,t),{})}})}function H(e={}){let{tiles:r=[],defaultPreferences:t={},routes:o=["/"]}=e;return i=>(i.defineActions(g),i.dispatch((0,n.withAll)(z(k(r,t)),(0,n.withRootExtension)("piral-dashboard",p),E(o))),(l,d)=>{let f=d.name,u=0;return{registerTile(a,c,C){typeof a!="string"&&(C=c,c=a,a=u++);let K=(0,n.buildName)(f,a);return i.registerTile(K,{pilet:f,component:(0,n.withApi)(i,c,l,"tile"),preferences:y(t,C)}),()=>l.unregisterTile(a)},unregisterTile(a){let c=(0,n.buildName)(f,a);i.unregisterTile(c)}}})}return q(J);})();
|
package/src/Dashboard.tsx
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { RouteComponentProps } from 'react-router-dom';
|
|
3
2
|
import { useGlobalState } from 'piral-core';
|
|
4
3
|
import { PiralDashboardContainer, PiralDashboardTile } from './components';
|
|
5
4
|
import { TileRegistration } from './types';
|
|
6
5
|
|
|
7
|
-
export interface DashboardProps
|
|
6
|
+
export interface DashboardProps {
|
|
8
7
|
filter?(tile: TileRegistration): boolean;
|
|
9
8
|
}
|
|
10
9
|
|
package/src/types.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ComponentType, ReactNode } from 'react';
|
|
2
|
-
import type { RouteComponentProps } from 'react-router-dom';
|
|
3
2
|
import type {
|
|
4
3
|
Dict,
|
|
5
4
|
WrappedComponent,
|
|
@@ -62,7 +61,7 @@ export interface InitialTile {
|
|
|
62
61
|
preferences?: TilePreferences;
|
|
63
62
|
}
|
|
64
63
|
|
|
65
|
-
export interface DashboardContainerProps
|
|
64
|
+
export interface DashboardContainerProps {
|
|
66
65
|
/**
|
|
67
66
|
* The tiles to display.
|
|
68
67
|
*/
|