Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

piral

Package Overview
Dependencies
Maintainers
1
Versions
1021
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

piral - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4-pre.357

lib/piral-core/src/state/actions/search.d.ts

24

lib/piral-core/src/modules/api.js

@@ -14,9 +14,8 @@ "use strict";

const prefix = target.name;
const meta = {
name: target.name,
version: target.version,
dependencies: target.dependencies,
hash: target.hash,
};
const api = extendApi(Object.assign({}, events, { getData(name) {
const api = extendApi(Object.assign({}, events, { meta: {
name: target.name,
version: target.version,
dependencies: target.dependencies,
hash: target.hash,
}, getData(name) {
return context.readDataValue(name);

@@ -159,4 +158,11 @@ },

},
pluginMeta() {
return meta;
registerSearchProvider(name, provider) {
const id = buildName(prefix, name);
context.registerSearchProvider(id, {
provider,
});
},
unregisterSearchProvider(name) {
const id = buildName(prefix, name);
context.unregisterSearchProvider(id);
} }), target);

@@ -163,0 +169,0 @@ return api;

@@ -7,2 +7,3 @@ export * from './app';

export * from './notifications';
export * from './search';
export * from './user';

@@ -12,3 +12,4 @@ "use strict";

__export(require("./notifications"));
__export(require("./search"));
__export(require("./user"));
//# sourceMappingURL=index.js.map

@@ -42,2 +42,6 @@ "use strict";

},
search: {
input: '',
providers: {},
},
});

@@ -44,0 +48,0 @@ if (process.env.NODE_ENV !== 'production') {

@@ -8,18 +8,19 @@ import { ReactNode, ComponentType } from 'react';

import { Dict, LocalizationMessages, Disposable, SeverityLevel, EventEmitter } from './utils';
import { SearchProvider } from './search';
import { ForeignComponent, ModalComponentProps, PageComponentProps, TileComponentProps, ExtensionComponentProps, AnyComponent, MenuComponentProps } from './components';
export interface PluginMetadata {
export interface PiletMetadata {
/**
* The name of the plugin.
* The name of the pilet.
*/
name: string;
/**
* The version of the plugin.
* The version of the pilet.
*/
version: string;
/**
* The dependencies of the plugin.
* The dependencies of the pilet.
*/
dependencies: Dict<string>;
/**
* The hashcode of the plugin.
* The hashcode of the pilet.
*/

@@ -37,2 +38,6 @@ hash: string;

/**
* Gets the metadata of the current pilet.
*/
meta: PiletMetadata;
/**
* Creates a connector for wrapping components with data relations.

@@ -53,4 +58,4 @@ * @param resolver The resolver for the initial data set.

/**
* Sets the data using a given name. The name needs to be used exclusively by the current plugin.
* Using the name occupied by another plugin will result in no change.
* Sets the data using a given name. The name needs to be used exclusively by the current pilet.
* Using the name occupied by another pilet will result in no change.
* @param name The name of the data to store.

@@ -91,3 +96,3 @@ * @param value The value of the data to store.

* Provides translations to the portal.
* The translations will be exlusively used for retrieving translations for the plugin.
* The translations will be exlusively used for retrieving translations for the pilet.
* @param messages The messages to use as transslation basis.

@@ -113,3 +118,3 @@ */

* Registers a modal dialog using a generic rendering function.
* The name needs to be unique to be used without the plugin's name.
* The name needs to be unique to be used without the pilet's name.
* @param name The name of the modal to register.

@@ -121,3 +126,3 @@ * @param render The function that is being called once rendering begins.

* Registers a modal dialog using a React component.
* The name needs to be unique to be used without the plugin's name.
* The name needs to be unique to be used without the pilet's name.
* @param name The name of the modal to register.

@@ -155,3 +160,3 @@ * @param Component The component to render the page.

* Registers a tile for general components.
* The name has to be unique within the current plugin.
* The name has to be unique within the current pilet.
* @param name The name of the tile.

@@ -164,3 +169,3 @@ * @param render The function that is being called once rendering begins.

* Registers a tile for React components.
* The name has to be unique within the current plugin.
* The name has to be unique within the current pilet.
* @param name The name of the tile.

@@ -200,3 +205,3 @@ * @param Component The component to be rendered within the Dashboard.

* Registers a menu item for general components.
* The name has to be unique within the current plugin.
* The name has to be unique within the current pilet.
* @param name The name of the menu item.

@@ -209,3 +214,3 @@ * @param render The function that is being called once rendering begins.

* Registers a menu item for React components.
* The name has to be unique within the current plugin.
* The name has to be unique within the current pilet.
* @param name The name of the menu item.

@@ -223,5 +228,14 @@ * @param Component The component to be rendered within the menu.

/**
* Gets the metadata of the current plugin.
* Registers a search provider to respond to search queries.
* The name has to be unique within the current pilet.
* @param name The name of the search provider.
* @param provider The callback to be used for searching.
*/
pluginMeta(): PluginMetadata;
registerSearchProvider(name: string, provider: SearchProvider<PortalApi<TExtraApi>>): void;
/**
* Unregisters a search provider known by the given name.
* Only previously registered search providers can be unregistered.
* @param name The name of the search provider to unregister.
*/
unregisterSearchProvider(name: string): void;
}

@@ -9,2 +9,3 @@ export * from './api';

export * from './plugin';
export * from './search';
export * from './state';

@@ -11,0 +12,0 @@ export * from './tile';

@@ -9,2 +9,3 @@ import { ComponentType, ReactChild } from 'react';

import { MenuSettings } from './menu';
import { SearchProvider } from './search';
import { SharedDataItem, DataStoreTarget } from './data';

@@ -44,2 +45,5 @@ import { NotificationOptions } from './notifications';

}
export interface SearchProviderRegistration {
provider: SearchProvider<any>;
}
export interface AppState {

@@ -166,2 +170,12 @@ /**

}
export interface SearchState {
/**
* Gets the current input value.
*/
input: string;
/**
* Gets the registered search providers.
*/
providers: Dict<SearchProviderRegistration>;
}
export interface GlobalState {

@@ -184,2 +198,6 @@ /**

user: UserState;
/**
* The relevant state for the in-site search.
*/
search: SearchState;
}

@@ -209,2 +227,4 @@ export interface StateActions {

unregisterModal(name: string): void;
registerSearchProvider(name: string, value: SearchProviderRegistration): void;
unregisterSearchProvider(name: string): void;
}

@@ -211,0 +231,0 @@ export interface GlobalStateContext extends StateActions {

{
"name": "piral",
"version": "0.1.3",
"version": "0.1.4-pre.357",
"description": "The all-in-one piral package.",

@@ -31,2 +31,7 @@ "keywords": [

},
"pilets": {
"sharedDependencies": [],
"files": [],
"scripts": {}
},
"devDependencies": {

@@ -46,4 +51,4 @@ "@dbeining/react-atom": "^4.0.0",

"dependencies": {
"piral-core": "^0.1.3",
"piral-ext": "^0.1.3"
"piral-core": "^0.1.4-pre.357",
"piral-ext": "^0.1.4-pre.357"
},

@@ -54,3 +59,3 @@ "scripts": {

},
"gitHead": "937cc96f5961d95ea59c6823fec169f4525d71c2"
"gitHead": "adc5e612a9351be27a9c7aa2fede3d18c920365a"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc