bmdl-sdk 0.0.2 → 1.1.0

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.
@@ -1,17 +0,0 @@
1
- export enum EBlockKey {
2
- X = 'X',
3
- Y = 'Y',
4
- S = 'S',
5
- }
6
-
7
- //
8
-
9
- export enum GeneralEViewKey {
10
- General = 'General',
11
- Title = 'Title',
12
- }
13
-
14
- export enum BarEViewKey {
15
- ColType = 'ColType',
16
- ColorBy = 'ColorBy',
17
- }
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BlockIcon = exports.DataQueryFunction = exports.ColumnType = void 0;
4
- var ColumnType;
5
- (function (ColumnType) {
6
- ColumnType["String"] = "string";
7
- ColumnType["Number"] = "number";
8
- ColumnType["Date"] = "date";
9
- })(ColumnType || (exports.ColumnType = ColumnType = {}));
10
- var DataQueryFunction;
11
- (function (DataQueryFunction) {
12
- DataQueryFunction["Group"] = "group";
13
- DataQueryFunction["Sum"] = "sum";
14
- DataQueryFunction["Avg"] = "avg";
15
- DataQueryFunction["Count"] = "count";
16
- })(DataQueryFunction || (exports.DataQueryFunction = DataQueryFunction = {}));
17
- var BlockIcon;
18
- (function (BlockIcon) {
19
- BlockIcon["AxisX"] = "sys:axis-x";
20
- BlockIcon["AxisY"] = "sys:axis-y";
21
- })(BlockIcon || (exports.BlockIcon = BlockIcon = {}));
@@ -1,79 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.createViewOptions = void 0;
15
- var custom_1 = require("./types/custom");
16
- var group = function (props) { return props; };
17
- var checkbox = function (props) { return (__assign({ element: 'checkbox' }, props)); };
18
- var select = function (props) { return (__assign({ element: 'select' }, props)); };
19
- var input = function (props) { return (__assign({ element: 'input' }, props)); };
20
- var colorBy = [
21
- ['red', { ru: 'Красный', en: 'Red' }],
22
- ['blue', { ru: 'Синий', en: 'Blue' }],
23
- ['green', { ru: 'Зеленый', en: 'Green' }],
24
- ];
25
- var createViewOptions = function () {
26
- return [
27
- group({
28
- key: custom_1.GeneralEViewKey.General,
29
- label: {
30
- ru: 'Заголовок',
31
- en: 'Title',
32
- },
33
- defaultOpen: true,
34
- children: [
35
- checkbox({
36
- key: custom_1.GeneralEViewKey.Title,
37
- label: {
38
- ru: 'Заголовок',
39
- en: 'Title',
40
- },
41
- defaultValue: true,
42
- }),
43
- select({
44
- key: custom_1.BarEViewKey.ColType,
45
- label: {
46
- ru: 'Тип столбцов',
47
- en: 'Column type',
48
- },
49
- options: [
50
- {
51
- label: {
52
- ru: 'Стандартный',
53
- en: 'Default',
54
- },
55
- value: 'default',
56
- },
57
- {
58
- label: {
59
- ru: 'Стандартный 2',
60
- en: 'Default 2',
61
- },
62
- value: 'default2',
63
- },
64
- ],
65
- defaultValue: 'default',
66
- }),
67
- ],
68
- }),
69
- input({
70
- key: custom_1.BarEViewKey.ColorBy,
71
- label: {
72
- ru: 'Цвет элемента',
73
- en: 'Item color',
74
- },
75
- defaultValue: colorBy[0][0],
76
- }),
77
- ];
78
- };
79
- exports.createViewOptions = createViewOptions;
@@ -1,68 +0,0 @@
1
- import { CreateViewOptions } from './types'
2
- import { BarEViewKey, GeneralEViewKey } from './types/custom'
3
-
4
- const group = (props: any) => props
5
- const checkbox = (props: any) => ({ element: 'checkbox', ...props })
6
- const select = (props: any) => ({ element: 'select', ...props })
7
- const input = (props: any) => ({ element: 'input', ...props })
8
-
9
- const colorBy = [
10
- ['red', { ru: 'Красный', en: 'Red' }],
11
- ['blue', { ru: 'Синий', en: 'Blue' }],
12
- ['green', { ru: 'Зеленый', en: 'Green' }],
13
- ] as const
14
-
15
- export const createViewOptions: CreateViewOptions = () => {
16
- return [
17
- group({
18
- key: GeneralEViewKey.General,
19
- label: {
20
- ru: 'Заголовок',
21
- en: 'Title',
22
- },
23
- defaultOpen: true,
24
- children: [
25
- checkbox({
26
- key: GeneralEViewKey.Title,
27
- label: {
28
- ru: 'Заголовок',
29
- en: 'Title',
30
- },
31
- defaultValue: true,
32
- }),
33
- select({
34
- key: BarEViewKey.ColType,
35
- label: {
36
- ru: 'Тип столбцов',
37
- en: 'Column type',
38
- },
39
- options: [
40
- {
41
- label: {
42
- ru: 'Стандартный',
43
- en: 'Default',
44
- },
45
- value: 'default',
46
- },
47
- {
48
- label: {
49
- ru: 'Стандартный 2',
50
- en: 'Default 2',
51
- },
52
- value: 'default2',
53
- },
54
- ],
55
- defaultValue: 'default',
56
- }),
57
- ],
58
- }),
59
- input({
60
- key: BarEViewKey.ColorBy,
61
- label: {
62
- ru: 'Цвет элемента',
63
- en: 'Item color',
64
- },
65
- defaultValue: colorBy[0][0],
66
- }),
67
- ]
68
- }
package/vite.config.js DELETED
@@ -1,46 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- var plugin_react_1 = __importDefault(require("@vitejs/plugin-react"));
7
- var path_1 = require("path");
8
- var vite_1 = require("vite");
9
- exports.default = (0, vite_1.defineConfig)({
10
- plugins: [
11
- (0, plugin_react_1.default)({
12
- jsxRuntime: 'classic',
13
- }),
14
- ],
15
- build: {
16
- lib: {
17
- entry: (0, path_1.resolve)(__dirname, 'src/main.tsx'),
18
- name: 'Component',
19
- fileName: 'index',
20
- formats: ['iife'],
21
- },
22
- rollupOptions: {
23
- external: ['react'],
24
- output: {
25
- globals: {
26
- react: 'React',
27
- },
28
- },
29
- },
30
- minify: 'terser',
31
- terserOptions: {
32
- compress: {
33
- global_defs: {
34
- 'process.env.NODE_ENV': 'production',
35
- 'process.browser': true,
36
- },
37
- },
38
- format: {
39
- comments: false,
40
- },
41
- },
42
- },
43
- server: {
44
- port: 3000,
45
- },
46
- });
package/vite.config.ts DELETED
@@ -1,44 +0,0 @@
1
- import react from '@vitejs/plugin-react'
2
- import { resolve } from 'path'
3
- import { defineConfig } from 'vite'
4
-
5
- export default defineConfig({
6
- plugins: [
7
- react({
8
- jsxRuntime: 'classic',
9
- }),
10
- ],
11
-
12
- build: {
13
- lib: {
14
- entry: resolve(__dirname, 'src/main.tsx'),
15
- name: 'Component',
16
- fileName: 'index',
17
- formats: ['iife'],
18
- },
19
- rollupOptions: {
20
- external: ['react'],
21
- output: {
22
- globals: {
23
- react: 'React',
24
- },
25
- },
26
- },
27
- minify: 'terser',
28
- terserOptions: {
29
- compress: {
30
- global_defs: {
31
- 'process.env.NODE_ENV': 'production',
32
- 'process.browser': true,
33
- },
34
- },
35
- format: {
36
- comments: false,
37
- },
38
- },
39
- },
40
-
41
- server: {
42
- port: 3000,
43
- },
44
- })