@fluid-topics/ft-app-context 1.1.68 → 1.1.69

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/build/index.d.ts CHANGED
@@ -1,8 +1,6 @@
1
1
  export * from "./redux-stores/FtAppInfoStore";
2
2
  export * from "./redux-stores/FtUserAssetsStore";
3
- export * from "./services/FtServiceWithCache";
4
- export * from "./services/FluidTopicsApiProvider";
5
- export * from "./services/FtI18nService";
3
+ export * from "./services";
6
4
  export * from "./ft-app-context.styles";
7
5
  export * from "./ft-app-context.properties";
8
6
  export * from "./ft-app-context";
package/build/index.js CHANGED
@@ -2,9 +2,7 @@ import { customElement } from "@fluid-topics/ft-wc-utils";
2
2
  import { FtAppContext } from "./ft-app-context";
3
3
  export * from "./redux-stores/FtAppInfoStore";
4
4
  export * from "./redux-stores/FtUserAssetsStore";
5
- export * from "./services/FtServiceWithCache";
6
- export * from "./services/FluidTopicsApiProvider";
7
- export * from "./services/FtI18nService";
5
+ export * from "./services";
8
6
  export * from "./ft-app-context.styles";
9
7
  export * from "./ft-app-context.properties";
10
8
  export * from "./ft-app-context";
@@ -0,0 +1,10 @@
1
+ import { FtCommand } from "@fluid-topics/ft-wc-utils";
2
+ declare global {
3
+ interface Window {
4
+ FluidTopicsAppInfoStoreService: AppInfoStoreService;
5
+ }
6
+ }
7
+ export declare class AppInfoStoreService {
8
+ addCommand(command: FtCommand, unique?: boolean): void;
9
+ consumeCommand(type: string): import("@fluid-topics/ft-wc-utils").Optional<FtCommand>;
10
+ }
@@ -0,0 +1,10 @@
1
+ import { ftAppInfoStore } from "../redux-stores/FtAppInfoStore";
2
+ export class AppInfoStoreService {
3
+ addCommand(command, unique = false) {
4
+ ftAppInfoStore.commands.add(command, unique);
5
+ }
6
+ consumeCommand(type) {
7
+ return ftAppInfoStore.commands.consume(type);
8
+ }
9
+ }
10
+ window.FluidTopicsAppInfoStoreService = new AppInfoStoreService();
@@ -0,0 +1,8 @@
1
+ declare global {
2
+ interface Window {
3
+ FluidTopicsHighlightHtmlService: HighlightHtmlService;
4
+ }
5
+ }
6
+ export declare class HighlightHtmlService {
7
+ highlightHtml(container: HTMLElement, query: string): void;
8
+ }
@@ -0,0 +1,7 @@
1
+ import { highlightHtml } from "@fluid-topics/ft-wc-utils";
2
+ export class HighlightHtmlService {
3
+ highlightHtml(container, query) {
4
+ highlightHtml(container, query);
5
+ }
6
+ }
7
+ window.FluidTopicsHighlightHtmlService = new HighlightHtmlService();
@@ -0,0 +1,7 @@
1
+ export * from "./BookmarksService";
2
+ export * from "./FluidTopicsApiProvider";
3
+ export * from "./FtAppInfoStoreService";
4
+ export * from "./FtI18nService";
5
+ export * from "./FtServiceWithCache";
6
+ export * from "./HighlightHtmlService";
7
+ export * from "./SavedSearchesService";
@@ -0,0 +1,7 @@
1
+ export * from "./BookmarksService";
2
+ export * from "./FluidTopicsApiProvider";
3
+ export * from "./FtAppInfoStoreService";
4
+ export * from "./FtI18nService";
5
+ export * from "./FtServiceWithCache";
6
+ export * from "./HighlightHtmlService";
7
+ export * from "./SavedSearchesService";
@@ -0,0 +1,25 @@
1
+ export interface FtWebappUser {
2
+ isAuthenticated: boolean;
3
+ roles: string[];
4
+ profile?: {
5
+ id: string;
6
+ displayName: string;
7
+ emailAddress: string;
8
+ };
9
+ }
10
+ interface FluidTopicsAuthenticationService {
11
+ getUser(): FtWebappUser;
12
+ directLogin(login: string, password: string): Promise<FtWebappUser>;
13
+ logout(): Promise<FtWebappUser>;
14
+ }
15
+ declare global {
16
+ interface Window {
17
+ FluidTopicsAuthenticationService: FluidTopicsAuthenticationService;
18
+ }
19
+ }
20
+ export declare class FtWebappAuthenticationService {
21
+ static getUser(): FtWebappUser;
22
+ static directLogin(login: string, password: string): Promise<FtWebappUser>;
23
+ static logout(): Promise<FtWebappUser>;
24
+ }
25
+ export {};
@@ -0,0 +1,11 @@
1
+ export class FtWebappAuthenticationService {
2
+ static getUser() {
3
+ return window.FluidTopicsAuthenticationService.getUser();
4
+ }
5
+ static directLogin(login, password) {
6
+ return window.FluidTopicsAuthenticationService.directLogin(login, password);
7
+ }
8
+ static logout() {
9
+ return window.FluidTopicsAuthenticationService.logout();
10
+ }
11
+ }
@@ -0,0 +1,12 @@
1
+ import { FtCssVariables } from "@fluid-topics/ft-wc-utils";
2
+ import type { TraitProperties } from "grapesjs";
3
+ export type FluidTopicsExternalComponentsInfo = {
4
+ displayName: string;
5
+ cssVariables: FtCssVariables;
6
+ traits?: Array<Partial<TraitProperties>>;
7
+ };
8
+ declare global {
9
+ interface Window {
10
+ fluidTopicsExternalComponentsInfo: Record<string, FluidTopicsExternalComponentsInfo>;
11
+ }
12
+ }
@@ -0,0 +1,3 @@
1
+ var _a;
2
+ window.fluidTopicsExternalComponentsInfo = (_a = window.fluidTopicsExternalComponentsInfo) !== null && _a !== void 0 ? _a : {};
3
+ export {};
@@ -0,0 +1,19 @@
1
+ export type NotificationType = "INFO" | "WARN" | "ERROR" | "FATAL" | "OTHER";
2
+ interface FluidTopicsNotificationService {
3
+ notify(type: NotificationType, message: string): void;
4
+ info(message: string): void;
5
+ warn(message: string): void;
6
+ error(message: string): void;
7
+ }
8
+ declare global {
9
+ interface Window {
10
+ FluidTopicsNotificationService: FluidTopicsNotificationService;
11
+ }
12
+ }
13
+ export declare class FtWebappNotificationService {
14
+ static notify(type: NotificationType, message: string): void;
15
+ static info(message: string): void;
16
+ static warn(message: string): void;
17
+ static error(message: string): void;
18
+ }
19
+ export {};
@@ -0,0 +1,14 @@
1
+ export class FtWebappNotificationService {
2
+ static notify(type, message) {
3
+ window.FluidTopicsNotificationService.notify(type, message);
4
+ }
5
+ static info(message) {
6
+ window.FluidTopicsNotificationService.info(message);
7
+ }
8
+ static warn(message) {
9
+ window.FluidTopicsNotificationService.warn(message);
10
+ }
11
+ static error(message) {
12
+ window.FluidTopicsNotificationService.error(message);
13
+ }
14
+ }
@@ -0,0 +1,12 @@
1
+ interface FluidTopicsRouterService {
2
+ navigateTo(token: string): void;
3
+ }
4
+ declare global {
5
+ interface Window {
6
+ FluidTopicsRouterService: FluidTopicsRouterService;
7
+ }
8
+ }
9
+ export declare class FtWebappRouterService {
10
+ static navigateTo(token: string): void;
11
+ }
12
+ export {};
@@ -0,0 +1,5 @@
1
+ export class FtWebappRouterService {
2
+ static navigateTo(token) {
3
+ window.FluidTopicsRouterService.navigateTo(token);
4
+ }
5
+ }
@@ -0,0 +1,4 @@
1
+ export * from "./AuthenticationService";
2
+ export * from "./ExternalComponents";
3
+ export * from "./NotificationService";
4
+ export * from "./RouterService";
@@ -0,0 +1,4 @@
1
+ export * from "./AuthenticationService";
2
+ export * from "./ExternalComponents";
3
+ export * from "./NotificationService";
4
+ export * from "./RouterService";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-app-context",
3
- "version": "1.1.68",
3
+ "version": "1.1.69",
4
4
  "description": "Global application context for Fluid Topics integrations",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,11 +19,12 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-wc-utils": "1.1.68",
22
+ "@fluid-topics/ft-wc-utils": "1.1.69",
23
23
  "lit": "3.1.0"
24
24
  },
25
25
  "devDependencies": {
26
- "@fluid-topics/public-api": "1.0.67"
26
+ "@fluid-topics/public-api": "1.0.67",
27
+ "grapesjs": "0.21.8"
27
28
  },
28
- "gitHead": "d10171ba718cee726044d0cc44820ebbb1ab7cbc"
29
+ "gitHead": "2174dcd6c0339b1a1722fa2eb263462ee4621c72"
29
30
  }