@lowdefy/blocks-aggrid 4.0.0-alpha.26 → 4.0.0-alpha.29

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.
Files changed (36) hide show
  1. package/package.json +8 -9
  2. package/dist/AgGrid.js +0 -149
  3. package/dist/AgGridInput.js +0 -197
  4. package/dist/blocks/AgGridAlpine/AgGridAlpine.js +0 -38
  5. package/dist/blocks/AgGridAlpine/AgGridAlpine.json +0 -8
  6. package/dist/blocks/AgGridAlpine/style.less +0 -18
  7. package/dist/blocks/AgGridAlpineDark/AgGridAlpineDark.js +0 -38
  8. package/dist/blocks/AgGridAlpineDark/AgGridAlpineDark.json +0 -8
  9. package/dist/blocks/AgGridAlpineDark/style.less +0 -18
  10. package/dist/blocks/AgGridBalham/AgGridBalham.js +0 -38
  11. package/dist/blocks/AgGridBalham/AgGridBalham.json +0 -8
  12. package/dist/blocks/AgGridBalham/style.less +0 -18
  13. package/dist/blocks/AgGridBalhamDark/AgGridBalhamDark.js +0 -38
  14. package/dist/blocks/AgGridBalhamDark/AgGridBalhamDark.json +0 -8
  15. package/dist/blocks/AgGridBalhamDark/style.less +0 -18
  16. package/dist/blocks/AgGridInputAlpine/AgGridInputAlpine.js +0 -43
  17. package/dist/blocks/AgGridInputAlpine/AgGridInputAlpine.json +0 -8
  18. package/dist/blocks/AgGridInputAlpine/style.less +0 -18
  19. package/dist/blocks/AgGridInputAlpineDark/AgGridInputAlpineDark.js +0 -43
  20. package/dist/blocks/AgGridInputAlpineDark/AgGridInputAlpineDark.json +0 -8
  21. package/dist/blocks/AgGridInputAlpineDark/style.less +0 -18
  22. package/dist/blocks/AgGridInputBalham/AgGridInputBalham.js +0 -43
  23. package/dist/blocks/AgGridInputBalham/AgGridInputBalham.json +0 -8
  24. package/dist/blocks/AgGridInputBalham/style.less +0 -18
  25. package/dist/blocks/AgGridInputBalhamDark/AgGridInputBalhamDark.js +0 -43
  26. package/dist/blocks/AgGridInputBalhamDark/AgGridInputBalhamDark.json +0 -8
  27. package/dist/blocks/AgGridInputBalhamDark/style.less +0 -18
  28. package/dist/blocks/AgGridInputMaterial/AgGridInputMaterial.js +0 -43
  29. package/dist/blocks/AgGridInputMaterial/AgGridInputMaterial.json +0 -8
  30. package/dist/blocks/AgGridInputMaterial/style.less +0 -18
  31. package/dist/blocks/AgGridMaterial/AgGridMaterial.js +0 -38
  32. package/dist/blocks/AgGridMaterial/AgGridMaterial.json +0 -8
  33. package/dist/blocks/AgGridMaterial/style.less +0 -18
  34. package/dist/blocks.js +0 -20
  35. package/dist/processColDefs.js +0 -40
  36. package/dist/types.js +0 -29
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/blocks-aggrid",
3
- "version": "4.0.0-alpha.26",
3
+ "version": "4.0.0-alpha.29",
4
4
  "license": "Apache-2.0",
5
5
  "description": "AgGrid Blocks for Lowdefy.",
6
6
  "homepage": "https://lowdefy.com",
@@ -42,11 +42,10 @@
42
42
  "dist/*"
43
43
  ],
44
44
  "scripts": {
45
- "build": "yarn swc",
45
+ "build": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start && pnpm copyfiles",
46
46
  "clean": "rm -rf dist",
47
47
  "copyfiles": "copyfiles -u 1 \"./src/**/*\" dist -e \"./src/**/*.js\" -e \"./src/**/*.yaml\" -e \"./src/**/*.snap\"",
48
- "prepare": "yarn build",
49
- "swc": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start && yarn copyfiles",
48
+ "prepublishOnly": "pnpm build",
50
49
  "test:watch": "jest --coverage --watch",
51
50
  "test": "jest --coverage"
52
51
  },
@@ -54,15 +53,15 @@
54
53
  "@ag-grid-community/all-modules": "27.3.0",
55
54
  "@ag-grid-community/core": "27.3.0",
56
55
  "@ag-grid-community/react": "27.3.0",
57
- "@lowdefy/block-utils": "4.0.0-alpha.26",
58
- "@lowdefy/helpers": "4.0.0-alpha.26",
56
+ "@lowdefy/block-utils": "4.0.0-alpha.29",
57
+ "@lowdefy/helpers": "4.0.0-alpha.29",
59
58
  "react": "18.1.0",
60
59
  "react-dom": "18.1.0"
61
60
  },
62
61
  "devDependencies": {
63
62
  "@emotion/jest": "11.9.1",
64
- "@lowdefy/block-dev": "4.0.0-alpha.26",
65
- "@lowdefy/jest-yaml-transform": "4.0.0-alpha.26",
63
+ "@lowdefy/block-dev": "4.0.0-alpha.29",
64
+ "@lowdefy/jest-yaml-transform": "4.0.0-alpha.29",
66
65
  "@swc/cli": "0.1.57",
67
66
  "@swc/core": "1.2.194",
68
67
  "@swc/jest": "0.2.21",
@@ -77,5 +76,5 @@
77
76
  "publishConfig": {
78
77
  "access": "public"
79
78
  },
80
- "gitHead": "ef60e34f87b95204d103db4a65e4ba3c54a5a1b5"
79
+ "gitHead": "621a191ebc0a1569ee6669dc74c12f8be5a8c7f3"
81
80
  }
package/dist/AgGrid.js DELETED
@@ -1,149 +0,0 @@
1
- function _extends() {
2
- _extends = Object.assign || function(target) {
3
- for(var i = 1; i < arguments.length; i++){
4
- var source = arguments[i];
5
- for(var key in source){
6
- if (Object.prototype.hasOwnProperty.call(source, key)) {
7
- target[key] = source[key];
8
- }
9
- }
10
- }
11
- return target;
12
- };
13
- return _extends.apply(this, arguments);
14
- }
15
- /*
16
- Copyright 2021 Lowdefy, Inc
17
-
18
- Licensed under the Apache License, Version 2.0 (the "License");
19
- you may not use this file except in compliance with the License.
20
- You may obtain a copy of the License at
21
-
22
- http://www.apache.org/licenses/LICENSE-2.0
23
-
24
- Unless required by applicable law or agreed to in writing, software
25
- distributed under the License is distributed on an "AS IS" BASIS,
26
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27
- See the License for the specific language governing permissions and
28
- limitations under the License.
29
- */ import React from 'react';
30
- import { AgGridReact } from '@ag-grid-community/react';
31
- import { AllCommunityModules } from '@ag-grid-community/all-modules';
32
- import processColDefs from './processColDefs.js';
33
- let AgGrid = class AgGrid extends React.Component {
34
- // see https://stackoverflow.com/questions/55182118/ag-grid-resize-detail-height-when-data-changes
35
- componentDidUpdate() {
36
- if (this.gridApi) {
37
- this.gridApi.resetRowHeights();
38
- }
39
- }
40
- onGridReady(params) {
41
- this.gridApi = params.api;
42
- this.gridColumnApi = params.columnApi;
43
- this.props.methods.registerMethod('exportDataAsCsv', (args)=>this.gridApi.exportDataAsCsv(args));
44
- this.props.methods.registerMethod('sizeColumnsToFit', ()=>this.gridApi.sizeColumnsToFit());
45
- this.props.methods.registerMethod('setFilterModel', (model)=>this.gridApi.setFilterModel(model));
46
- this.props.methods.registerMethod('setQuickFilter', (value)=>this.gridApi.setQuickFilter(value));
47
- this.props.methods.registerMethod('autoSize', (args = {})=>{
48
- const { skipHeader , colIds } = args;
49
- const allColumnIds = colIds || [];
50
- if (!colIds) {
51
- this.gridColumnApi.getAllColumns().forEach((column)=>{
52
- allColumnIds.push(column.getId());
53
- });
54
- }
55
- this.gridColumnApi.autoSizeColumns(allColumnIds, skipHeader);
56
- });
57
- }
58
- onRowClick(event) {
59
- if (this.props.events.onRowClick) {
60
- this.props.methods.triggerEvent({
61
- event: {
62
- row: event.data,
63
- selected: this.gridApi.getSelectedRows()
64
- },
65
- index: parseInt(event.node.id),
66
- name: 'onRowClick',
67
- rowIndex: event.rowIndex
68
- });
69
- }
70
- }
71
- onCellClicked(event) {
72
- if (this.props.events.onCellClick) {
73
- this.props.methods.triggerEvent({
74
- name: 'onCellClick',
75
- event: {
76
- cell: {
77
- column: event.colDef.field,
78
- value: event.value
79
- },
80
- colId: event.column.colId,
81
- index: parseInt(event.node.id),
82
- row: event.data,
83
- rowIndex: event.rowIndex,
84
- selected: this.gridApi.getSelectedRows()
85
- }
86
- });
87
- }
88
- }
89
- onRowSelected(event) {
90
- if (!event.node.selected) return; // see https://stackoverflow.com/a/63265775/2453657
91
- if (this.props.events.onRowSelected) {
92
- this.props.methods.triggerEvent({
93
- event: {
94
- row: event.data,
95
- selected: this.gridApi.getSelectedRows()
96
- },
97
- index: parseInt(event.node.id),
98
- name: 'onRowSelected',
99
- rowIndex: event.rowIndex
100
- });
101
- }
102
- }
103
- onSelectionChanged() {
104
- if (this.props.events.onSelectionChanged) {
105
- this.props.methods.triggerEvent({
106
- name: 'onSelectionChanged',
107
- event: {
108
- selected: this.gridApi.getSelectedRows()
109
- }
110
- });
111
- }
112
- }
113
- onFilterChanged(event) {
114
- if (this.props.events.onFilterChanged) {
115
- this.props.methods.triggerEvent({
116
- name: 'onFilterChanged',
117
- event: {
118
- rows: event.api.rowModel.rowsToDisplay.map((row)=>row.data)
119
- }
120
- });
121
- }
122
- }
123
- render() {
124
- const { quickFilterValue , columnDefs , ...someProperties } = this.props.properties;
125
- if (quickFilterValue && quickFilterValue === '') {
126
- this.gridApi.setQuickFilter(quickFilterValue); // check if empty string matches all
127
- }
128
- return /*#__PURE__*/ React.createElement(AgGridReact, _extends({
129
- onFilterChanged: this.onFilterChanged,
130
- onSelectionChanged: this.onSelectionChanged,
131
- onRowSelected: this.onRowSelected,
132
- onRowClicked: this.onRowClick,
133
- onCellClicked: this.onCellClicked,
134
- onGridReady: this.onGridReady,
135
- modules: AllCommunityModules,
136
- columnDefs: processColDefs(columnDefs, this.props.methods)
137
- }, someProperties));
138
- }
139
- constructor(props){
140
- super(props);
141
- this.onGridReady = this.onGridReady.bind(this);
142
- this.onRowClick = this.onRowClick.bind(this);
143
- this.onCellClicked = this.onCellClicked.bind(this);
144
- this.onRowSelected = this.onRowSelected.bind(this);
145
- this.onSelectionChanged = this.onSelectionChanged.bind(this);
146
- this.onFilterChanged = this.onFilterChanged.bind(this);
147
- }
148
- };
149
- export default AgGrid;
@@ -1,197 +0,0 @@
1
- function _extends() {
2
- _extends = Object.assign || function(target) {
3
- for(var i = 1; i < arguments.length; i++){
4
- var source = arguments[i];
5
- for(var key in source){
6
- if (Object.prototype.hasOwnProperty.call(source, key)) {
7
- target[key] = source[key];
8
- }
9
- }
10
- }
11
- return target;
12
- };
13
- return _extends.apply(this, arguments);
14
- }
15
- /*
16
- Copyright 2021 Lowdefy, Inc
17
-
18
- Licensed under the Apache License, Version 2.0 (the "License");
19
- you may not use this file except in compliance with the License.
20
- You may obtain a copy of the License at
21
-
22
- http://www.apache.org/licenses/LICENSE-2.0
23
-
24
- Unless required by applicable law or agreed to in writing, software
25
- distributed under the License is distributed on an "AS IS" BASIS,
26
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27
- See the License for the specific language governing permissions and
28
- limitations under the License.
29
- */ import React from 'react';
30
- import { AgGridReact } from '@ag-grid-community/react';
31
- import { AllCommunityModules } from '@ag-grid-community/all-modules';
32
- import processColDefs from './processColDefs.js';
33
- let AgGridInput = class AgGridInput extends React.Component {
34
- // see https://stackoverflow.com/questions/55182118/ag-grid-resize-detail-height-when-data-changes
35
- componentDidUpdate() {
36
- if (this.gridApi) {
37
- this.gridApi.resetRowHeights();
38
- }
39
- }
40
- onGridReady(params) {
41
- this.gridApi = params.api;
42
- this.gridColumnApi = params.columnApi;
43
- this.props.methods.registerMethod('exportDataAsCsv', (args)=>this.gridApi.exportDataAsCsv(args));
44
- this.props.methods.registerMethod('sizeColumnsToFit', ()=>this.gridApi.sizeColumnsToFit());
45
- this.props.methods.registerMethod('setFilterModel', (model)=>this.gridApi.setFilterModel(model));
46
- this.props.methods.registerMethod('setQuickFilter', (value)=>this.gridApi.setQuickFilter(value));
47
- this.props.methods.registerMethod('autoSize', (args = {})=>{
48
- const { skipHeader , colIds } = args;
49
- const allColumnIds = colIds || [];
50
- if (!colIds) {
51
- this.gridColumnApi.getAllColumns().forEach((column)=>{
52
- allColumnIds.push(column.getId());
53
- });
54
- }
55
- this.gridColumnApi.autoSizeColumns(allColumnIds, skipHeader);
56
- });
57
- }
58
- onRowClick(event) {
59
- if (this.props.events.onRowClick) {
60
- this.props.methods.triggerEvent({
61
- name: 'onRowClick',
62
- event: {
63
- row: event.data,
64
- selected: this.gridApi.getSelectedRows(),
65
- rowIndex: event.rowIndex,
66
- index: parseInt(event.node.id)
67
- }
68
- });
69
- }
70
- }
71
- onCellClicked(event) {
72
- if (this.props.events.onCellClick) {
73
- this.props.methods.triggerEvent({
74
- name: 'onCellClick',
75
- event: {
76
- cell: {
77
- column: event.colDef.field,
78
- value: event.value
79
- },
80
- colId: event.column.colId,
81
- index: parseInt(event.node.id),
82
- row: event.data,
83
- rowIndex: event.rowIndex,
84
- selected: this.gridApi.getSelectedRows()
85
- }
86
- });
87
- }
88
- }
89
- onRowSelected(event) {
90
- if (!event.node.selected) return; // see https://stackoverflow.com/a/63265775/2453657
91
- if (this.props.events.onRowSelected) {
92
- this.props.methods.triggerEvent({
93
- event: {
94
- row: event.data,
95
- selected: this.gridApi.getSelectedRows()
96
- },
97
- index: parseInt(event.node.id),
98
- name: 'onRowSelected',
99
- rowIndex: event.rowIndex
100
- });
101
- }
102
- }
103
- onSelectionChanged() {
104
- if (this.props.events.onSelectionChanged) {
105
- this.props.methods.triggerEvent({
106
- name: 'onSelectionChanged',
107
- event: {
108
- selected: this.gridApi.getSelectedRows()
109
- }
110
- });
111
- }
112
- }
113
- onFilterChanged(event) {
114
- if (this.props.events.onFilterChanged) {
115
- this.props.methods.triggerEvent({
116
- name: 'onFilterChanged',
117
- event: {
118
- rows: event.api.rowModel.rowsToDisplay.map((row)=>row.data)
119
- }
120
- });
121
- }
122
- }
123
- onRowDragEnd(event) {
124
- if (event.overNode !== event.node) {
125
- const fromData = event.node.data;
126
- const toData = event.overNode.data;
127
- const fromIndex = this.props.value.indexOf(fromData);
128
- const toIndex = this.props.value.indexOf(toData);
129
- const newRowData = this.props.value.slice();
130
- const element = newRowData[fromIndex];
131
- newRowData.splice(fromIndex, 1);
132
- newRowData.splice(toIndex, 0, element);
133
- this.props.methods.setValue(newRowData);
134
- this.gridApi.setRowData(this.props.value);
135
- this.gridApi.clearFocusedCell();
136
- this.props.methods.triggerEvent({
137
- name: 'onRowDragEnd',
138
- event: {
139
- fromData,
140
- toData,
141
- fromIndex,
142
- toIndex,
143
- newRowData
144
- }
145
- });
146
- }
147
- }
148
- onCellValueChanged(params) {
149
- const newRowData = this.props.value;
150
- newRowData[parseInt(params.node.id)][params.colDef.field] = params.newValue;
151
- this.props.methods.setValue(newRowData);
152
- this.props.methods.triggerEvent({
153
- name: 'onCellValueChanged',
154
- event: {
155
- field: params.colDef.field,
156
- index: parseInt(params.node.id),
157
- newRowData,
158
- newValue: params.newValue,
159
- oldValue: params.oldValue,
160
- rowData: params.data,
161
- rowIndex: params.rowIndex
162
- }
163
- });
164
- }
165
- render() {
166
- const { quickFilterValue , columnDefs , ...someProperties } = this.props.properties;
167
- if (quickFilterValue && quickFilterValue === '') {
168
- this.gridApi.setQuickFilter(quickFilterValue); // check if empty string matches all
169
- }
170
- return /*#__PURE__*/ React.createElement(AgGridReact, _extends({
171
- onSelectionChanged: this.onSelectionChanged,
172
- onRowSelected: this.onRowSelected,
173
- onRowClicked: this.onRowClick,
174
- onCellClicked: this.onCellClicked,
175
- onGridReady: this.onGridReady,
176
- onRowDragEnd: this.onRowDragEnd,
177
- onCellValueChanged: this.onCellValueChanged,
178
- postSort: this.postSort,
179
- modules: AllCommunityModules,
180
- columnDefs: processColDefs(columnDefs, this.props.methods)
181
- }, someProperties, {
182
- rowData: this.props.value
183
- }));
184
- }
185
- constructor(props){
186
- super(props);
187
- this.onGridReady = this.onGridReady.bind(this);
188
- this.onRowClick = this.onRowClick.bind(this);
189
- this.onCellClicked = this.onCellClicked.bind(this);
190
- this.onRowSelected = this.onRowSelected.bind(this);
191
- this.onSelectionChanged = this.onSelectionChanged.bind(this);
192
- this.onRowDragEnd = this.onRowDragEnd.bind(this);
193
- this.onCellValueChanged = this.onCellValueChanged.bind(this);
194
- this.onFilterChanged = this.onFilterChanged.bind(this);
195
- }
196
- };
197
- export default AgGridInput;
@@ -1,38 +0,0 @@
1
- /*
2
- Copyright 2021 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ import React from 'react';
16
- import { blockDefaultProps } from '@lowdefy/block-utils';
17
- import AgGrid from '../../AgGrid.js';
18
- const AgGridAlpine = ({ blockId , events , methods , properties })=>/*#__PURE__*/ React.createElement("div", {
19
- id: blockId,
20
- className: `ag-theme-alpine ${methods.makeCssClass({
21
- width: '100%',
22
- height: properties.height || 500,
23
- ...properties.style
24
- })}`
25
- }, /*#__PURE__*/ React.createElement(AgGrid, {
26
- events: events,
27
- properties: properties,
28
- methods: methods
29
- }));
30
- AgGridAlpine.defaultProps = blockDefaultProps;
31
- AgGridAlpine.meta = {
32
- category: 'display',
33
- icons: [],
34
- styles: [
35
- 'blocks/AgGridAlpine/style.less'
36
- ]
37
- };
38
- export default AgGridAlpine;
@@ -1,8 +0,0 @@
1
- {
2
- "type": "object",
3
- "properties": {
4
- "properties": {
5
- "type": "object"
6
- }
7
- }
8
- }
@@ -1,18 +0,0 @@
1
- /*
2
- Copyright 2020-2022 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- @import (less) '@ag-grid-community/all-modules/dist/styles/ag-grid.css';
18
- @import (less) '@ag-grid-community/all-modules/dist/styles/ag-theme-alpine.css';
@@ -1,38 +0,0 @@
1
- /*
2
- Copyright 2021 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ import React from 'react';
16
- import { blockDefaultProps } from '@lowdefy/block-utils';
17
- import AgGrid from '../../AgGrid.js';
18
- const AgGridAlpineDark = ({ blockId , events , methods , properties })=>/*#__PURE__*/ React.createElement("div", {
19
- id: blockId,
20
- className: `ag-theme-alpine-dark ${methods.makeCssClass({
21
- width: '100%',
22
- height: properties.height || 500,
23
- ...properties.style
24
- })}`
25
- }, /*#__PURE__*/ React.createElement(AgGrid, {
26
- events: events,
27
- properties: properties,
28
- methods: methods
29
- }));
30
- AgGridAlpineDark.defaultProps = blockDefaultProps;
31
- AgGridAlpineDark.meta = {
32
- category: 'display',
33
- icons: [],
34
- styles: [
35
- 'blocks/AgGridAlpineDark/style.less'
36
- ]
37
- };
38
- export default AgGridAlpineDark;
@@ -1,8 +0,0 @@
1
- {
2
- "type": "object",
3
- "properties": {
4
- "properties": {
5
- "type": "object"
6
- }
7
- }
8
- }
@@ -1,18 +0,0 @@
1
- /*
2
- Copyright 2020-2022 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- @import (less) '@ag-grid-community/all-modules/dist/styles/ag-grid.css';
18
- @import (less) '@ag-grid-community/all-modules/dist/styles/ag-theme-alpine-dark.css';
@@ -1,38 +0,0 @@
1
- /*
2
- Copyright 2021 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ import React from 'react';
16
- import { blockDefaultProps } from '@lowdefy/block-utils';
17
- import AgGrid from '../../AgGrid.js';
18
- const AgGridBalham = ({ blockId , events , methods , properties })=>/*#__PURE__*/ React.createElement("div", {
19
- id: blockId,
20
- className: `ag-theme-balham ${methods.makeCssClass({
21
- width: '100%',
22
- height: properties.height || 500,
23
- ...properties.style
24
- })}`
25
- }, /*#__PURE__*/ React.createElement(AgGrid, {
26
- events: events,
27
- properties: properties,
28
- methods: methods
29
- }));
30
- AgGridBalham.defaultProps = blockDefaultProps;
31
- AgGridBalham.meta = {
32
- category: 'display',
33
- icons: [],
34
- styles: [
35
- 'blocks/AgGridBalham/style.less'
36
- ]
37
- };
38
- export default AgGridBalham;
@@ -1,8 +0,0 @@
1
- {
2
- "type": "object",
3
- "properties": {
4
- "properties": {
5
- "type": "object"
6
- }
7
- }
8
- }
@@ -1,18 +0,0 @@
1
- /*
2
- Copyright 2020-2022 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- @import (less) '@ag-grid-community/all-modules/dist/styles/ag-grid.css';
18
- @import (less) '@ag-grid-community/all-modules/dist/styles/ag-theme-balham.css';
@@ -1,38 +0,0 @@
1
- /*
2
- Copyright 2021 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ import React from 'react';
16
- import { blockDefaultProps } from '@lowdefy/block-utils';
17
- import AgGrid from '../../AgGrid.js';
18
- const AgGridBalhamDark = ({ blockId , events , methods , properties })=>/*#__PURE__*/ React.createElement("div", {
19
- id: blockId,
20
- className: `ag-theme-balham-dark ${methods.makeCssClass({
21
- width: '100%',
22
- height: properties.height || 500,
23
- ...properties.style
24
- })}`
25
- }, /*#__PURE__*/ React.createElement(AgGrid, {
26
- events: events,
27
- properties: properties,
28
- methods: methods
29
- }));
30
- AgGridBalhamDark.defaultProps = blockDefaultProps;
31
- AgGridBalhamDark.meta = {
32
- category: 'display',
33
- icons: [],
34
- styles: [
35
- 'blocks/AgGridBalhamDark/style.less'
36
- ]
37
- };
38
- export default AgGridBalhamDark;
@@ -1,8 +0,0 @@
1
- {
2
- "type": "object",
3
- "properties": {
4
- "properties": {
5
- "type": "object"
6
- }
7
- }
8
- }
@@ -1,18 +0,0 @@
1
- /*
2
- Copyright 2020-2022 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- @import (less) '@ag-grid-community/all-modules/dist/styles/ag-grid.css';
18
- @import (less) '@ag-grid-community/all-modules/dist/styles/ag-theme-balham-dark.css';
@@ -1,43 +0,0 @@
1
- /*
2
- Copyright 2021 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ import React from 'react';
16
- import { blockDefaultProps } from '@lowdefy/block-utils';
17
- import AgGridInput from '../../AgGridInput.js';
18
- const AgGridInputAlpine = ({ blockId , events , loading , methods , properties , required , validation , value , })=>/*#__PURE__*/ React.createElement("div", {
19
- id: blockId,
20
- className: `ag-theme-alpine ${methods.makeCssClass({
21
- width: '100%',
22
- height: properties.height || 500,
23
- ...properties.style
24
- })}`
25
- }, /*#__PURE__*/ React.createElement(AgGridInput, {
26
- blockId: blockId,
27
- events: events,
28
- loading: loading,
29
- methods: methods,
30
- properties: properties,
31
- required: required,
32
- validation: validation,
33
- value: value
34
- }));
35
- AgGridInputAlpine.defaultProps = blockDefaultProps;
36
- AgGridInputAlpine.meta = {
37
- category: 'input',
38
- icons: [],
39
- styles: [
40
- 'blocks/AgGridInputAlpine/style.less'
41
- ]
42
- };
43
- export default AgGridInputAlpine;
@@ -1,8 +0,0 @@
1
- {
2
- "type": "object",
3
- "properties": {
4
- "properties": {
5
- "type": "object"
6
- }
7
- }
8
- }
@@ -1,18 +0,0 @@
1
- /*
2
- Copyright 2020-2022 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- @import (less) '@ag-grid-community/all-modules/dist/styles/ag-grid.css';
18
- @import (less) '@ag-grid-community/all-modules/dist/styles/ag-theme-alpine.css';
@@ -1,43 +0,0 @@
1
- /*
2
- Copyright 2021 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ import React from 'react';
16
- import { blockDefaultProps } from '@lowdefy/block-utils';
17
- import AgGridInput from '../../AgGridInput.js';
18
- const AgGridInputAlpineDark = ({ blockId , events , loading , methods , properties , required , validation , value , })=>/*#__PURE__*/ React.createElement("div", {
19
- id: blockId,
20
- className: `ag-theme-alpine-dark ${methods.makeCssClass({
21
- width: '100%',
22
- height: properties.height || 500,
23
- ...properties.style
24
- })}`
25
- }, /*#__PURE__*/ React.createElement(AgGridInput, {
26
- blockId: blockId,
27
- events: events,
28
- loading: loading,
29
- methods: methods,
30
- properties: properties,
31
- required: required,
32
- validation: validation,
33
- value: value
34
- }));
35
- AgGridInputAlpineDark.defaultProps = blockDefaultProps;
36
- AgGridInputAlpineDark.meta = {
37
- category: 'input',
38
- icons: [],
39
- styles: [
40
- 'blocks/AgGridInputAlpineDark/style.less'
41
- ]
42
- };
43
- export default AgGridInputAlpineDark;
@@ -1,8 +0,0 @@
1
- {
2
- "type": "object",
3
- "properties": {
4
- "properties": {
5
- "type": "object"
6
- }
7
- }
8
- }
@@ -1,18 +0,0 @@
1
- /*
2
- Copyright 2020-2022 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- @import (less) '@ag-grid-community/all-modules/dist/styles/ag-grid.css';
18
- @import (less) '@ag-grid-community/all-modules/dist/styles/ag-theme-alpine-dark.css';
@@ -1,43 +0,0 @@
1
- /*
2
- Copyright 2021 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ import React from 'react';
16
- import { blockDefaultProps } from '@lowdefy/block-utils';
17
- import AgGridInput from '../../AgGridInput.js';
18
- const AgGridInputBalham = ({ blockId , events , loading , methods , properties , required , validation , value , })=>/*#__PURE__*/ React.createElement("div", {
19
- id: blockId,
20
- className: `ag-theme-balham ${methods.makeCssClass({
21
- width: '100%',
22
- height: properties.height || 500,
23
- ...properties.style
24
- })}`
25
- }, /*#__PURE__*/ React.createElement(AgGridInput, {
26
- blockId: blockId,
27
- events: events,
28
- loading: loading,
29
- methods: methods,
30
- properties: properties,
31
- required: required,
32
- validation: validation,
33
- value: value
34
- }));
35
- AgGridInputBalham.defaultProps = blockDefaultProps;
36
- AgGridInputBalham.meta = {
37
- category: 'input',
38
- icons: [],
39
- styles: [
40
- 'blocks/AgGridInputBalham/style.less'
41
- ]
42
- };
43
- export default AgGridInputBalham;
@@ -1,8 +0,0 @@
1
- {
2
- "type": "object",
3
- "properties": {
4
- "properties": {
5
- "type": "object"
6
- }
7
- }
8
- }
@@ -1,18 +0,0 @@
1
- /*
2
- Copyright 2020-2022 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- @import (less) '@ag-grid-community/all-modules/dist/styles/ag-grid.css';
18
- @import (less) '@ag-grid-community/all-modules/dist/styles/ag-theme-balham.css';
@@ -1,43 +0,0 @@
1
- /*
2
- Copyright 2021 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ import React from 'react';
16
- import { blockDefaultProps } from '@lowdefy/block-utils';
17
- import AgGridInput from '../../AgGridInput.js';
18
- const AgGridInputBalhamDark = ({ blockId , events , loading , methods , properties , required , validation , value , })=>/*#__PURE__*/ React.createElement("div", {
19
- id: blockId,
20
- className: `ag-theme-balham-dark ${methods.makeCssClass({
21
- width: '100%',
22
- height: properties.height || 500,
23
- ...properties.style
24
- })}`
25
- }, /*#__PURE__*/ React.createElement(AgGridInput, {
26
- blockId: blockId,
27
- events: events,
28
- loading: loading,
29
- methods: methods,
30
- properties: properties,
31
- required: required,
32
- validation: validation,
33
- value: value
34
- }));
35
- AgGridInputBalhamDark.defaultProps = blockDefaultProps;
36
- AgGridInputBalhamDark.meta = {
37
- category: 'input',
38
- icons: [],
39
- styles: [
40
- 'blocks/AgGridInputBalhamDark/style.less'
41
- ]
42
- };
43
- export default AgGridInputBalhamDark;
@@ -1,8 +0,0 @@
1
- {
2
- "type": "object",
3
- "properties": {
4
- "properties": {
5
- "type": "object"
6
- }
7
- }
8
- }
@@ -1,18 +0,0 @@
1
- /*
2
- Copyright 2020-2022 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- @import (less) '@ag-grid-community/all-modules/dist/styles/ag-grid.css';
18
- @import (less) '@ag-grid-community/all-modules/dist/styles/ag-theme-balham-dark.css';
@@ -1,43 +0,0 @@
1
- /*
2
- Copyright 2021 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ import React from 'react';
16
- import { blockDefaultProps } from '@lowdefy/block-utils';
17
- import AgGridInput from '../../AgGridInput.js';
18
- const AgGridInputMaterial = ({ blockId , events , loading , methods , properties , required , validation , value , })=>/*#__PURE__*/ React.createElement("div", {
19
- id: blockId,
20
- className: `ag-theme-material ${methods.makeCssClass({
21
- width: '100%',
22
- height: properties.height || 500,
23
- ...properties.style
24
- })}`
25
- }, /*#__PURE__*/ React.createElement(AgGridInput, {
26
- blockId: blockId,
27
- events: events,
28
- loading: loading,
29
- methods: methods,
30
- properties: properties,
31
- required: required,
32
- validation: validation,
33
- value: value
34
- }));
35
- AgGridInputMaterial.defaultProps = blockDefaultProps;
36
- AgGridInputMaterial.meta = {
37
- category: 'input',
38
- icons: [],
39
- styles: [
40
- 'blocks/AgGridInputMaterial/style.less'
41
- ]
42
- };
43
- export default AgGridInputMaterial;
@@ -1,8 +0,0 @@
1
- {
2
- "type": "object",
3
- "properties": {
4
- "properties": {
5
- "type": "object"
6
- }
7
- }
8
- }
@@ -1,18 +0,0 @@
1
- /*
2
- Copyright 2020-2022 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- @import (less) '@ag-grid-community/all-modules/dist/styles/ag-grid.css';
18
- @import (less) '@ag-grid-community/all-modules/dist/styles/ag-theme-material.css';
@@ -1,38 +0,0 @@
1
- /*
2
- Copyright 2021 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ import React from 'react';
16
- import { blockDefaultProps } from '@lowdefy/block-utils';
17
- import AgGrid from '../../AgGrid.js';
18
- const AgGridMaterial = ({ blockId , events , methods , properties })=>/*#__PURE__*/ React.createElement("div", {
19
- id: blockId,
20
- className: `ag-theme-material ${methods.makeCssClass({
21
- width: '100%',
22
- height: properties.height || 500,
23
- ...properties.style
24
- })}`
25
- }, /*#__PURE__*/ React.createElement(AgGrid, {
26
- events: events,
27
- properties: properties,
28
- methods: methods
29
- }));
30
- AgGridMaterial.defaultProps = blockDefaultProps;
31
- AgGridMaterial.meta = {
32
- category: 'display',
33
- icons: [],
34
- styles: [
35
- 'blocks/AgGridMaterial/style.less'
36
- ]
37
- };
38
- export default AgGridMaterial;
@@ -1,8 +0,0 @@
1
- {
2
- "type": "object",
3
- "properties": {
4
- "properties": {
5
- "type": "object"
6
- }
7
- }
8
- }
@@ -1,18 +0,0 @@
1
- /*
2
- Copyright 2020-2022 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- @import (less) '@ag-grid-community/all-modules/dist/styles/ag-grid.css';
18
- @import (less) '@ag-grid-community/all-modules/dist/styles/ag-theme-material.css';
package/dist/blocks.js DELETED
@@ -1,20 +0,0 @@
1
- /*
2
- Copyright 2021 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ export { default as AgGridAlpine } from './blocks/AgGridAlpine/AgGridAlpine.js';
16
- export { default as AgGridAlpineDark } from './blocks/AgGridAlpineDark/AgGridAlpineDark.js';
17
- export { default as AgGridBalham } from './blocks/AgGridBalham/AgGridBalham.js';
18
- export { default as AgGridBalhamDark } from './blocks/AgGridBalhamDark/AgGridBalhamDark.js';
19
- export { default as AgGridInputAlpine } from './blocks/AgGridInputAlpine/AgGridInputAlpine.js';
20
- export { default as AgGridMaterial } from './blocks/AgGridMaterial/AgGridMaterial.js';
@@ -1,40 +0,0 @@
1
- /*
2
- Copyright 2021 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ import { renderHtml } from '@lowdefy/block-utils';
16
- import { type } from '@lowdefy/helpers';
17
- function recProcessColDefs(columnDefs, methods) {
18
- return columnDefs.map((col)=>{
19
- const newColDef = {};
20
- if (type.isArray(col.children)) {
21
- newColDef.children = recProcessColDefs(col.children, methods);
22
- }
23
- if (type.isFunction(col.cellRenderer)) {
24
- newColDef.cellRenderer = (params)=>{
25
- return renderHtml({
26
- html: col.cellRenderer(params),
27
- methods
28
- });
29
- };
30
- }
31
- return {
32
- ...col,
33
- ...newColDef
34
- };
35
- });
36
- }
37
- function processColDefs(columnDefs = [], methods) {
38
- return recProcessColDefs(columnDefs, methods);
39
- }
40
- export default processColDefs;
package/dist/types.js DELETED
@@ -1,29 +0,0 @@
1
- /* eslint-disable import/namespace */ /*
2
- Copyright 2020-2022 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ import * as blocks from './blocks.js';
16
- const icons = {};
17
- const styles = {};
18
- Object.keys(blocks).forEach((block)=>{
19
- icons[block] = blocks[block].meta.icons || [];
20
- styles[block] = blocks[block].meta.styles || [];
21
- });
22
- export default {
23
- blocks: Object.keys(blocks),
24
- icons,
25
- styles: {
26
- default: [],
27
- ...styles
28
- }
29
- };