plmt-constructor-sdk 0.13.2 → 0.13.4

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.
@@ -2,11 +2,11 @@ import { Text, DataQueryMethod, DataQueryFunction } from '../config';
2
2
  import { ColumnType } from '../data';
3
3
  import { DatasetColumnType_Server } from './dataset';
4
4
  export declare enum ConfigDataBlockType_Server {
5
- Column = "column",
6
- Filter = "filter",
7
- Sort = "sort",
8
- Colorizer = "colorizer",
9
- Drilldown = "drilldown"
5
+ Column = 'column',
6
+ Filter = 'filter',
7
+ Sort = 'sort',
8
+ Colorizer = 'colorizer',
9
+ Drilldown = 'drilldown',
10
10
  }
11
11
  export interface Config_Server {
12
12
  label: Text;
@@ -18,6 +18,7 @@ export interface Config_Server {
18
18
  images: string[];
19
19
  };
20
20
  sdk_version: string;
21
+ type?: string;
21
22
  version: string;
22
23
  }
23
24
  export interface ConfigDataOption_Server {
@@ -42,11 +43,15 @@ export interface ConfigDataOptionBlock_Server {
42
43
  max?: number;
43
44
  function?: DataQueryFunction;
44
45
  }
45
- export declare const configDataBlock_Server = "8316067a-d04b-4b21-bd4d-35529846617b";
46
- export declare const blockFilterKey = "34642664-dbd1-4e35-b0ea-2eaabe796b48";
47
- export declare const blockSortKey = "2c849ed6-6105-4aa2-a961-9f95135dfe3b";
48
- export declare const blockColorizeKey = "badd51f7-82ce-45b2-a67e-37d52df88c5c";
49
- export declare function decodeDrilldownData(source: string, additionalFilterSources: string[]): string;
46
+ export declare const configDataBlock_Server =
47
+ '8316067a-d04b-4b21-bd4d-35529846617b';
48
+ export declare const blockFilterKey = '34642664-dbd1-4e35-b0ea-2eaabe796b48';
49
+ export declare const blockSortKey = '2c849ed6-6105-4aa2-a961-9f95135dfe3b';
50
+ export declare const blockColorizeKey = 'badd51f7-82ce-45b2-a67e-37d52df88c5c';
51
+ export declare function decodeDrilldownData(
52
+ source: string,
53
+ additionalFilterSources: string[],
54
+ ): string;
50
55
  export declare function encodeDrilldownData(key: string): {
51
56
  source: string;
52
57
  additionalFilterSources: string[];
@@ -16,7 +16,7 @@ const providedCssVariablesMap = {};
16
16
  let prevThemeClassName = '';
17
17
  let prevThemeProjectClassName = '';
18
18
  function provideCssVariables({ theme, themeKey, themeProjectKey, }) {
19
- const themeClassName = `ptnl-theme-${kebabCase(themeKey)}`;
19
+ const themeClassName = `plmt-theme-${kebabCase(themeKey)}`;
20
20
  if ((0, logical_not_1.not)(themeClassName in providedCssVariablesMap)) {
21
21
  const cssVariables = [];
22
22
  Object.entries(theme).forEach(([key, source]) => {
@@ -36,10 +36,10 @@ function provideCssVariables({ theme, themeKey, themeProjectKey, }) {
36
36
  ]);
37
37
  }
38
38
  prevThemeClassName = switchClassName(prevThemeClassName, themeClassName);
39
- const themeProjectClassName = `ptnl-project-${themeProjectKey}`;
39
+ const themeProjectClassName = `plmt-project-${themeProjectKey}`;
40
40
  if ((0, logical_not_1.not)(themeProjectClassName in providedCssVariablesMap)) {
41
41
  const cssVariables = theme.colors.map((value, i) => ({
42
- name: `--ptnl-color-${i}`,
42
+ name: `--plmt-color-${i}`,
43
43
  value,
44
44
  }));
45
45
  addStyles(themeProjectClassName, [
@@ -65,7 +65,7 @@ function provideCssVariables({ theme, themeKey, themeProjectKey, }) {
65
65
  }
66
66
  exports.provideCssVariables = provideCssVariables;
67
67
  function colorizeClassName(i, j) {
68
- return `ptnl-colorize-${i}-${j}`;
68
+ return `plmt-colorize-${i}-${j}`;
69
69
  }
70
70
  exports.colorizeClassName = colorizeClassName;
71
71
  const range10 = [...Array(10)].map((_, i) => i);
@@ -4,20 +4,20 @@ import { WidgetRenderEnv } from '../widget';
4
4
  import { ThemeProvide } from './theme';
5
5
  import { WidgetDataOptionColumn_Server, WidgetRepresent } from './widget';
6
6
  export declare enum Input {
7
- Change = "ptnl.input.change",
8
- ChangeLang = "ptnl.input.changeLang",
9
- ChangeTheme = "ptnl.input.changeTheme",
10
- ChangeOtherFilters = "ptnl.input.ChangeOtherFilters",
11
- ChangeWidgetRenderEnv = "ptnl.input.changeWidgetRenderEnv"
7
+ Change = "plmt.input.change",
8
+ ChangeLang = "plmt.input.changeLang",
9
+ ChangeTheme = "plmt.input.changeTheme",
10
+ ChangeOtherFilters = "plmt.input.ChangeOtherFilters",
11
+ ChangeWidgetRenderEnv = "plmt.input.changeWidgetRenderEnv"
12
12
  }
13
13
  export declare enum Output {
14
- Init = "ptnl.output.init",
15
- Ready = "ptnl.output.ready",
16
- SetFilter = "ptnl.output.setFilter",
17
- RemoveFilterAt = "ptnl.output.RemoveFilterAt",
18
- SetSort = "ptnl.output.setSort",
19
- RemoveSortAt = "ptnl.output.RemoveSortAt",
20
- Interact = "ptnl.output.interact"
14
+ Init = "plmt.output.init",
15
+ Ready = "plmt.output.ready",
16
+ SetFilter = "plmt.output.setFilter",
17
+ RemoveFilterAt = "plmt.output.RemoveFilterAt",
18
+ SetSort = "plmt.output.setSort",
19
+ RemoveSortAt = "plmt.output.RemoveSortAt",
20
+ Interact = "plmt.output.interact"
21
21
  }
22
22
  export interface InputParameter extends Record<Input, any> {
23
23
  [Input.Change]: WidgetRepresent;
@@ -3,19 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Output = exports.Input = void 0;
4
4
  var Input;
5
5
  (function (Input) {
6
- Input["Change"] = "ptnl.input.change";
7
- Input["ChangeLang"] = "ptnl.input.changeLang";
8
- Input["ChangeTheme"] = "ptnl.input.changeTheme";
9
- Input["ChangeOtherFilters"] = "ptnl.input.ChangeOtherFilters";
10
- Input["ChangeWidgetRenderEnv"] = "ptnl.input.changeWidgetRenderEnv";
6
+ Input["Change"] = "plmt.input.change";
7
+ Input["ChangeLang"] = "plmt.input.changeLang";
8
+ Input["ChangeTheme"] = "plmt.input.changeTheme";
9
+ Input["ChangeOtherFilters"] = "plmt.input.ChangeOtherFilters";
10
+ Input["ChangeWidgetRenderEnv"] = "plmt.input.changeWidgetRenderEnv";
11
11
  })(Input = exports.Input || (exports.Input = {}));
12
12
  var Output;
13
13
  (function (Output) {
14
- Output["Init"] = "ptnl.output.init";
15
- Output["Ready"] = "ptnl.output.ready";
16
- Output["SetFilter"] = "ptnl.output.setFilter";
17
- Output["RemoveFilterAt"] = "ptnl.output.RemoveFilterAt";
18
- Output["SetSort"] = "ptnl.output.setSort";
19
- Output["RemoveSortAt"] = "ptnl.output.RemoveSortAt";
20
- Output["Interact"] = "ptnl.output.interact";
14
+ Output["Init"] = "plmt.output.init";
15
+ Output["Ready"] = "plmt.output.ready";
16
+ Output["SetFilter"] = "plmt.output.setFilter";
17
+ Output["RemoveFilterAt"] = "plmt.output.RemoveFilterAt";
18
+ Output["SetSort"] = "plmt.output.setSort";
19
+ Output["RemoveSortAt"] = "plmt.output.RemoveSortAt";
20
+ Output["Interact"] = "plmt.output.interact";
21
21
  })(Output = exports.Output || (exports.Output = {}));
package/config.d.ts CHANGED
@@ -31,6 +31,7 @@ export declare type Text = Record<Locale, string>;
31
31
  export interface Config {
32
32
  label: Text;
33
33
  icon: string;
34
+ type?: string;
34
35
  documentation: ConfigDocumentation;
35
36
  dataSettings: Omit<DataSettings, 'key'> | DataSettings[];
36
37
  }
package/declare.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * класс виджета необходимо декорировать функцией Declare:
4
4
  *
5
5
  * ```ts
6
- * import { Declare, Widget } from 'ptnl-constructor-sdk';
6
+ * import { Declare, Widget } from 'plmt-constructor-sdk';
7
7
  *
8
8
  * @Declare()
9
9
  * class MyWidget extends Widget {}
package/declare.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * класс виджета необходимо декорировать функцией Declare:
5
5
  *
6
6
  * ```ts
7
- * import { Declare, Widget } from 'ptnl-constructor-sdk';
7
+ * import { Declare, Widget } from 'plmt-constructor-sdk';
8
8
  *
9
9
  * @Declare()
10
10
  * class MyWidget extends Widget {}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "plmt-constructor-sdk",
3
- "version": "0.13.2",
3
+ "version": "0.13.4",
4
4
  "description": "Набор инструментов для создания виджетов.",
5
5
  "dependencies": {
6
6
  "logical-not": "^1.0.9"
7
7
  }
8
- }
8
+ }
package/theme.d.ts CHANGED
@@ -3,8 +3,8 @@
3
3
  * интерфейс OnThemeChange:
4
4
  *
5
5
  * ```ts
6
- * import { Declare, Widget, OnThemeChange } from 'ptnl-constructor-sdk';
7
- * import { Theme } from 'ptnl-constructor-sdk/theme';
6
+ * import { Declare, Widget, OnThemeChange } from 'plmt-constructor-sdk';
7
+ * import { Theme } from 'plmt-constructor-sdk/theme';
8
8
  *
9
9
  * @Declare()
10
10
  * class MyWidget extends Widget implements OnThemeChange {
package/theme.js CHANGED
@@ -4,8 +4,8 @@
4
4
  * интерфейс OnThemeChange:
5
5
  *
6
6
  * ```ts
7
- * import { Declare, Widget, OnThemeChange } from 'ptnl-constructor-sdk';
8
- * import { Theme } from 'ptnl-constructor-sdk/theme';
7
+ * import { Declare, Widget, OnThemeChange } from 'plmt-constructor-sdk';
8
+ * import { Theme } from 'plmt-constructor-sdk/theme';
9
9
  *
10
10
  * @Declare()
11
11
  * class MyWidget extends Widget implements OnThemeChange {