Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFX-437: Rename project to "Elements" #18

Merged
merged 6 commits into from
Nov 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]
### Added
- SFX-248: Added a number of event names and interfaces used by SF-X.
- SFX-248: Added a number of event names and interfaces used by GB Elements.
- Event name constants:
- `AUTOCOMPLETE_ERROR`
- `AUTOCOMPLETE_REQUEST`
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# SF-X Events
# GroupBy Elements Events

This package contains all of the event names and payload interfaces that
are used in the SF-X project.
are used in the GB Elements project.

## Commands

### Building the Project

To build the SF-X Events project, run the following command:
To build the GB Elements Events project, run the following command:

```sh
yarn build
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@sfx/events",
"name": "@groupby/elements-events",
"version": "0.0.0",
"description": "Shared event names and interfaces used in the SF-X project",
"description": "Shared event names and interfaces used in the GroupBy Elements project",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"esnext": "esnext/index.ts",
Expand All @@ -17,14 +17,14 @@
},
"repository": {
"type": "git",
"url": "https://github.com/groupby/sfx-events.git"
"url": "https://github.com/groupby/elements-events.git"
},
"author": "",
"license": "MIT",
"bugs": {
"url": "https://github.com/groupby/sfx-events/issues"
"url": "https://github.com/groupby/elements-events/issues"
},
"homepage": "https://github.com/groupby/sfx-events#readme",
"homepage": "https://github.com/groupby/elements-events#readme",
"devDependencies": {
"typedoc": "^0.15.0",
"typedoc-plugin-nojekyll": "^1.0.1",
Expand Down
6 changes: 3 additions & 3 deletions src/cache/cache.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ErrorPayload, WithGroup } from '../includes';

/** The name of the event fired when data is being requested from the cache. */
export const CACHE_REQUEST = 'sfx::cache_request';
export const CACHE_REQUEST = 'gbe::cache_request';
/** The type of the [[CACHE_REQUEST]] event payload. */
export interface CacheRequestPayload extends WithGroup {
/** The name of the cached data to return. */
Expand All @@ -11,7 +11,7 @@ export interface CacheRequestPayload extends WithGroup {
}

/** The recommended prefix to use for the name of the event fired when data is returned from the cache. */
export const CACHE_RESPONSE_PREFIX = 'sfx::cache_response-';
export const CACHE_RESPONSE_PREFIX = 'gbe::cache_response-';
/** The type of the cache response event payload. */
export interface CacheResponsePayload extends WithGroup {
/** The name of the cached data that was returned. */
Expand All @@ -21,6 +21,6 @@ export interface CacheResponsePayload extends WithGroup {
}

/** The name of the event fired when retrieving data from the cache failed. */
export const CACHE_ERROR = 'sfx::cache_error';
export const CACHE_ERROR = 'gbe::cache_error';
/** The type of the [[CACHE_ERROR]] event payload. */
export interface CacheErrorPayload extends ErrorPayload, WithGroup {}
2 changes: 1 addition & 1 deletion src/sayt/autocomplete-list.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { WithQuery, WithGroup } from '../includes';

/** The name of the event fired to change the active query term. */
export const AUTOCOMPLETE_ACTIVE_TERM = 'sfx::autocomplete_active_term';
export const AUTOCOMPLETE_ACTIVE_TERM = 'gbe::autocomplete_active_term';
/** The type of the [[AUTOCOMPLETE_ACTIVE_TERM]] event payload. */
export interface AutocompleteActiveTermPayload extends WithQuery, WithGroup {}
6 changes: 3 additions & 3 deletions src/sayt/autocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ import { ErrorPayload, WithQuery, WithGroup } from '../includes';
import { AutocompleteResultGroup } from './results';

/** The name of the event fired to request autocomplete data. */
export const AUTOCOMPLETE_REQUEST = 'sfx::autocomplete_request';
export const AUTOCOMPLETE_REQUEST = 'gbe::autocomplete_request';
/** The type of the [[AUTOCOMPLETE_REQUEST]] event payload. */
export interface AutocompleteRequestPayload extends WithQuery, WithGroup {
/** The extra configuration options to customize the request. */
config?: QueryTimeAutocompleteConfig;
}

/** The name of the event fired when the results of an autocomplete request have been received. */
export const AUTOCOMPLETE_RESPONSE = 'sfx::autocomplete_response';
export const AUTOCOMPLETE_RESPONSE = 'gbe::autocomplete_response';
/** The type of the [[AUTOCOMPLETE_RESPONSE]] event payload. */
export interface AutocompleteResponsePayload extends WithGroup {
/** A list of autocomplete results. */
results: AutocompleteResultGroup[];
}

/** The name of the event fired when an autocomplete request fails. */
export const AUTOCOMPLETE_ERROR = 'sfx::autocomplete_error';
export const AUTOCOMPLETE_ERROR = 'gbe::autocomplete_error';
/** The type of the [[AUTOCOMPLETE_ERROR]] event payload. */
export interface AutocompleteErrorPayload extends ErrorPayload, WithGroup {}
6 changes: 3 additions & 3 deletions src/sayt/products.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import { Request, Results } from 'groupby-api';
import { ErrorPayload, Product, WithQuery, WithGroup } from '../includes';

/** The name of the event fired to request SAYT products. */
export const SAYT_PRODUCTS_REQUEST = 'sfx::sayt_products_request';
export const SAYT_PRODUCTS_REQUEST = 'gbe::sayt_products_request';
/** The type of the [[SAYT_PRODUCTS_REQUEST]] event payload. */
export interface SaytProductsRequestPayload extends WithQuery, WithGroup {
/** The extra configuration options to customize the request. */
config?: Partial<Request>;
}

/** The name of the event fired when the results of a SAYT products request have been received. */
export const SAYT_PRODUCTS_RESPONSE = 'sfx::sayt_products_response';
export const SAYT_PRODUCTS_RESPONSE = 'gbe::sayt_products_response';
/**
* The type of the [[SAYT_PRODUCTS_RESPONSE]] event payload.
*
Expand All @@ -22,6 +22,6 @@ export interface SaytProductsResponsePayload<P> extends WithGroup {
}

/** The name of the event fired when a SAYT products request fails. */
export const SAYT_PRODUCTS_ERROR = 'sfx::sayt_products_error';
export const SAYT_PRODUCTS_ERROR = 'gbe::sayt_products_error';
/** The type of the [[SAYT_PRODUCTS_ERROR]] event payload. */
export interface SaytProductsErrorPayload extends ErrorPayload, WithGroup {}
4 changes: 2 additions & 2 deletions src/sayt/sayt.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { WithGroup } from '../includes';

/** The name of the event fired when SAYT should be hidden. */
export const SAYT_HIDE = 'sfx::sayt_hide';
export const SAYT_HIDE = 'gbe::sayt_hide';
/** The type of the [[SAYT_HIDE]] event payload. */
export interface SaytHidePayload extends SaytVisibilityPayload {}

/** The name of the event fired when SAYT should be shown. */
export const SAYT_SHOW = 'sfx::sayt_show';
export const SAYT_SHOW = 'gbe::sayt_show';
/** The type of the [[SAYT_SHOW]] event payload. */
export interface SaytShowPayload extends SaytVisibilityPayload {}

Expand Down
6 changes: 3 additions & 3 deletions src/search/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { ErrorPayload, WithQuery, WithGroup } from '../includes';
import { Product } from '../includes/product';

/** The name of the event fired to request a search. */
export const SEARCH_REQUEST = 'sfx::search_request';
export const SEARCH_REQUEST = 'gbe::search_request';
/** The type of the [[SEARCH_REQUEST]] event payload. */
export interface SearchRequestPayload extends WithQuery, WithGroup {
config?: Partial<Request>;
}

/** The name of the event fired when the results of a search request have been received. */
export const SEARCH_RESPONSE = 'sfx::search_response';
export const SEARCH_RESPONSE = 'gbe::search_response';

/**
* The type of the results within a search response payload.
Expand All @@ -32,6 +32,6 @@ export interface SearchResponsePayload<P> extends WithGroup {
}

/** The name of the event fired when a search request fails. */
export const SEARCH_ERROR = 'sfx::search_error';
export const SEARCH_ERROR = 'gbe::search_error';
/** The type of the [[SEARCH_ERROR]] event payload. */
export interface SearchErrorPayload extends ErrorPayload, WithGroup {}
8 changes: 4 additions & 4 deletions src/search/searchbox.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
import { WithGroup } from '../includes/group';

/** The name of the event fired when the search term is to be updated. */
export const UPDATE_SEARCH_TERM = 'sfx::update_search_term';
export const UPDATE_SEARCH_TERM = 'gbe::update_search_term';
/** The type of the [[UPDATE_SEARCH_TERM]] event payload. */
export interface UpdateSearchTermPayload extends WithGroup {
/** A search term. */
term: string;
}

/** The name of the event fired when the user has changed the text in the search box. */
export const SEARCHBOX_INPUT = 'sfx::searchbox_input';
export const SEARCHBOX_INPUT = 'gbe::searchbox_input';
/** The type of the [[SEARCHBOX_INPUT]] event payload. */
export interface SearchboxInputPayload extends WithGroup {
/** A search term. */
term: string;
}

/** The name of the event fired when the search box is clicked. */
export const SEARCHBOX_CLICK = 'sfx::searchbox_click';
export const SEARCHBOX_CLICK = 'gbe::searchbox_click';
/** The type of the [[SEARCHBOX_CLICK]] event payload. */
export interface SearchboxClickPayload extends WithGroup {}

/** The name of the event fired when the search box is cleared. */
export const SEARCHBOX_CLEAR = 'sfx::searchbox_clear';
export const SEARCHBOX_CLEAR = 'gbe::searchbox_clear';
/** The type of the [[SEARCHBOX_CLEAR]] event payload. */
export interface SearchboxClearPayload extends WithGroup {}