plmt-constructor-sdk 0.13.2 → 0.13.3
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/__internal__/theme.js +4 -4
- package/__internal__/widget-io.d.ts +12 -12
- package/__internal__/widget-io.js +12 -12
- package/config.d.ts +1 -0
- package/declare.d.ts +1 -1
- package/declare.js +1 -1
- package/package.json +1 -1
- package/theme.d.ts +2 -2
- package/theme.js +2 -2
package/__internal__/theme.js
CHANGED
|
@@ -16,7 +16,7 @@ const providedCssVariablesMap = {};
|
|
|
16
16
|
let prevThemeClassName = '';
|
|
17
17
|
let prevThemeProjectClassName = '';
|
|
18
18
|
function provideCssVariables({ theme, themeKey, themeProjectKey, }) {
|
|
19
|
-
const themeClassName = `
|
|
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 = `
|
|
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: `--
|
|
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 `
|
|
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 = "
|
|
8
|
-
ChangeLang = "
|
|
9
|
-
ChangeTheme = "
|
|
10
|
-
ChangeOtherFilters = "
|
|
11
|
-
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 = "
|
|
15
|
-
Ready = "
|
|
16
|
-
SetFilter = "
|
|
17
|
-
RemoveFilterAt = "
|
|
18
|
-
SetSort = "
|
|
19
|
-
RemoveSortAt = "
|
|
20
|
-
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"] = "
|
|
7
|
-
Input["ChangeLang"] = "
|
|
8
|
-
Input["ChangeTheme"] = "
|
|
9
|
-
Input["ChangeOtherFilters"] = "
|
|
10
|
-
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"] = "
|
|
15
|
-
Output["Ready"] = "
|
|
16
|
-
Output["SetFilter"] = "
|
|
17
|
-
Output["RemoveFilterAt"] = "
|
|
18
|
-
Output["SetSort"] = "
|
|
19
|
-
Output["RemoveSortAt"] = "
|
|
20
|
-
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
package/declare.d.ts
CHANGED
package/declare.js
CHANGED
package/package.json
CHANGED
package/theme.d.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* интерфейс OnThemeChange:
|
|
4
4
|
*
|
|
5
5
|
* ```ts
|
|
6
|
-
* import { Declare, Widget, OnThemeChange } from '
|
|
7
|
-
* import { Theme } from '
|
|
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 '
|
|
8
|
-
* import { Theme } from '
|
|
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 {
|