@malloydata/render 0.0.135-dev240325191847 → 0.0.135-dev240326020414

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 (86) hide show
  1. package/dist/component/render-webcomponent.d.ts +6 -0
  2. package/dist/component/render.d.ts +7 -17
  3. package/dist/component/result-context.d.ts +2 -3
  4. package/dist/component/table/table-context.d.ts +9 -0
  5. package/dist/component/{table-layout.d.ts → table/table-layout.d.ts} +2 -2
  6. package/dist/component/table/table.d.ts +9 -0
  7. package/dist/html/html_view.d.ts +1 -1
  8. package/dist/module/index.mjs +145001 -0
  9. package/dist/module/index.umd.js +1643 -0
  10. package/dist/module/style.css +1 -0
  11. package/dist/stories/bars.stories.d.ts +1 -1
  12. package/dist/stories/tables.stories.d.ts +1 -1
  13. package/dist/stories/themes.stories.d.ts +1 -1
  14. package/dist/webcomponent/malloy-render.mjs +90572 -0
  15. package/dist/webcomponent/malloy-render.umd.js +1491 -0
  16. package/dist/webcomponent/style.css +1 -0
  17. package/package.json +21 -7
  18. package/vite.config.ts +25 -0
  19. package/vite.config.webcomponent.ts +25 -0
  20. package/dist/bundle/bundled_renderer.js +0 -139374
  21. package/dist/bundle/bundled_renderer.min.js +0 -2374
  22. package/dist/bundle/main.js +0 -29
  23. package/dist/bundle/renderer.js +0 -71
  24. package/dist/component/bar-chart.js +0 -130
  25. package/dist/component/chart-settings.js +0 -152
  26. package/dist/component/render-numeric-field.js +0 -104
  27. package/dist/component/render-result-metadata.js +0 -91
  28. package/dist/component/render.js +0 -155
  29. package/dist/component/result-context.js +0 -28
  30. package/dist/component/table-layout.js +0 -83
  31. package/dist/component/table.d.ts +0 -35
  32. package/dist/component/table.js +0 -375
  33. package/dist/component/util.js +0 -53
  34. package/dist/component/vega-chart.js +0 -105
  35. package/dist/component/vega-lite-base-spec.js +0 -61
  36. package/dist/component/vega-types.js +0 -34
  37. package/dist/data_styles.js +0 -50
  38. package/dist/drill.js +0 -124
  39. package/dist/html/area_sparkline.js +0 -118
  40. package/dist/html/bar_chart.js +0 -70
  41. package/dist/html/bar_sparkline.js +0 -119
  42. package/dist/html/boolean.js +0 -53
  43. package/dist/html/bytes.js +0 -47
  44. package/dist/html/cartesian_chart.js +0 -110
  45. package/dist/html/chart.js +0 -120
  46. package/dist/html/column_sparkline.js +0 -120
  47. package/dist/html/container.js +0 -44
  48. package/dist/html/currency.js +0 -75
  49. package/dist/html/dashboard.js +0 -242
  50. package/dist/html/data_volume.js +0 -94
  51. package/dist/html/date.js +0 -66
  52. package/dist/html/duration.js +0 -108
  53. package/dist/html/html_view.js +0 -187
  54. package/dist/html/image.js +0 -77
  55. package/dist/html/index.js +0 -28
  56. package/dist/html/json.js +0 -52
  57. package/dist/html/line_chart.js +0 -72
  58. package/dist/html/link.js +0 -57
  59. package/dist/html/list.js +0 -73
  60. package/dist/html/list_detail.js +0 -33
  61. package/dist/html/number.js +0 -73
  62. package/dist/html/percent.js +0 -50
  63. package/dist/html/point_map.js +0 -182
  64. package/dist/html/scatter_chart.js +0 -72
  65. package/dist/html/segment_map.js +0 -151
  66. package/dist/html/shape_map.js +0 -194
  67. package/dist/html/sparkline.js +0 -120
  68. package/dist/html/state_codes.js +0 -137
  69. package/dist/html/table.js +0 -475
  70. package/dist/html/text.js +0 -65
  71. package/dist/html/unsupported.js +0 -72
  72. package/dist/html/utils.js +0 -277
  73. package/dist/html/vega_spec.js +0 -544
  74. package/dist/index.js +0 -47
  75. package/dist/main_renderer_factory.js +0 -101
  76. package/dist/renderer.js +0 -34
  77. package/dist/renderer_factory.js +0 -57
  78. package/dist/renderer_types.js +0 -25
  79. package/dist/stories/bars.stories.js +0 -52
  80. package/dist/stories/basic.stories.js +0 -34
  81. package/dist/stories/image.stories.js +0 -34
  82. package/dist/stories/render-malloy-legacy.js +0 -27
  83. package/dist/stories/tables.stories.js +0 -65
  84. package/dist/stories/themes.stories.js +0 -47
  85. package/dist/stories/util.js +0 -25
  86. package/dist/tags_utils.js +0 -30
@@ -1,120 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright 2023 Google LLC
4
- *
5
- * Permission is hereby granted, free of charge, to any person obtaining
6
- * a copy of this software and associated documentation files
7
- * (the "Software"), to deal in the Software without restriction,
8
- * including without limitation the rights to use, copy, modify, merge,
9
- * publish, distribute, sublicense, and/or sell copies of the Software,
10
- * and to permit persons to whom the Software is furnished to do so,
11
- * subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be
14
- * included in all copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
- */
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.SparkLineRendererFactory = exports.HTMLSparkLineRenderer = void 0;
26
- const line_chart_1 = require("./line_chart");
27
- const utils_1 = require("./utils");
28
- const vega_spec_1 = require("./vega_spec");
29
- const renderer_factory_1 = require("../renderer_factory");
30
- class HTMLSparkLineRenderer extends line_chart_1.HTMLLineChartRenderer {
31
- getSize() {
32
- if (this.size === 'large') {
33
- return { height: 100, width: 250 };
34
- }
35
- else {
36
- return { height: 50, width: 125 };
37
- }
38
- }
39
- getVegaLiteSpec(data) {
40
- const fields = data.field.intrinsicFields;
41
- const xField = fields[0];
42
- const yField = fields[1];
43
- const colorField = fields[2];
44
- const xType = this.getDataType(xField);
45
- const yType = this.getDataType(yField);
46
- const colorType = colorField ? this.getDataType(colorField) : undefined;
47
- const colorDef = colorField !== undefined
48
- ? {
49
- field: colorField.name,
50
- type: colorType,
51
- axis: { title: null },
52
- scale: (0, utils_1.getColorScale)(colorType, false),
53
- }
54
- : { value: '#4285F4' };
55
- const xSort = xType === 'nominal' ? null : undefined;
56
- const ySort = yType === 'nominal' ? null : undefined;
57
- const xDef = {
58
- field: xField.name,
59
- type: xType,
60
- sort: xSort,
61
- axis: {
62
- title: null,
63
- domain: false,
64
- grid: false,
65
- lables: false,
66
- ticks: false,
67
- values: [],
68
- },
69
- scale: { zero: false },
70
- };
71
- const yDef = {
72
- field: yField.name,
73
- type: yType,
74
- sort: ySort,
75
- axis: {
76
- title: null,
77
- domain: false,
78
- ticks: false,
79
- grid: false,
80
- lables: false,
81
- values: [],
82
- },
83
- scale: { zero: false },
84
- };
85
- return {
86
- ...vega_spec_1.DEFAULT_SPEC,
87
- ...this.getSize(),
88
- data: {
89
- values: this.mapData(data),
90
- },
91
- config: {
92
- view: {
93
- stroke: 'transparent',
94
- },
95
- },
96
- mark: {
97
- type: 'line',
98
- tooltip: true,
99
- },
100
- encoding: {
101
- x: xDef,
102
- y: yDef,
103
- color: colorDef,
104
- },
105
- background: 'transparent',
106
- };
107
- }
108
- }
109
- exports.HTMLSparkLineRenderer = HTMLSparkLineRenderer;
110
- class SparkLineRendererFactory extends renderer_factory_1.RendererFactory {
111
- create(document, styleDefaults, rendererOptions, _field, options, timezone) {
112
- return new HTMLSparkLineRenderer(document, styleDefaults, rendererOptions, options, timezone);
113
- }
114
- get rendererName() {
115
- return 'sparkline';
116
- }
117
- }
118
- exports.SparkLineRendererFactory = SparkLineRendererFactory;
119
- SparkLineRendererFactory.instance = new SparkLineRendererFactory();
120
- //# sourceMappingURL=sparkline.js.map
@@ -1,137 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright 2023 Google LLC
4
- *
5
- * Permission is hereby granted, free of charge, to any person obtaining
6
- * a copy of this software and associated documentation files
7
- * (the "Software"), to deal in the Software without restriction,
8
- * including without limitation the rights to use, copy, modify, merge,
9
- * publish, distribute, sublicense, and/or sell copies of the Software,
10
- * and to permit persons to whom the Software is furnished to do so,
11
- * subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be
14
- * included in all copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
- */
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.STATE_CODES = void 0;
26
- // force a branch
27
- exports.STATE_CODES = {
28
- 'AL': '01',
29
- 'Alabama': '01',
30
- 'AK': '02',
31
- 'Alaska': '02',
32
- 'AZ': '04',
33
- 'Arizona': '04',
34
- 'AR': '05',
35
- 'Arkansas': '05',
36
- 'CA': '06',
37
- 'California': '06',
38
- 'CO': '08',
39
- 'Colorado': '08',
40
- 'CT': '09',
41
- 'Connecticut': '09',
42
- 'DE': '10',
43
- 'Delaware': '10',
44
- 'DC': '11',
45
- 'District of Columbia': '11',
46
- 'FL': '12',
47
- 'Florida': '12',
48
- 'GA': '13',
49
- 'Georgia': '13',
50
- 'HI': '15',
51
- 'Hawaii': '12',
52
- 'ID': '16',
53
- 'Idaho': '16',
54
- 'IL': '17',
55
- 'Illinois': '17',
56
- 'IN': '18',
57
- 'Indiana': '18',
58
- 'IA': '19',
59
- 'Iowa': '19',
60
- 'KS': '20',
61
- 'Kansas': '20',
62
- 'KY': '21',
63
- 'Kentucky': '21',
64
- 'LA': '22',
65
- 'Louisiana': '22',
66
- 'ME': '23',
67
- 'Maine': '23',
68
- 'MD': '24',
69
- 'Maryland': '24',
70
- 'MA': '25',
71
- 'Massachusetts': '25',
72
- 'MI': '26',
73
- 'Michigan': '26',
74
- 'MN': '27',
75
- 'Minnesota': '27',
76
- 'MS': '28',
77
- 'Mississippi': '28',
78
- 'MO': '29',
79
- 'Missouri': '29',
80
- 'MT': '30',
81
- 'Montana': '30',
82
- 'NE': '31',
83
- 'Nebraska': '31',
84
- 'NV': '32',
85
- 'Nevada': '32',
86
- 'NH': '33',
87
- 'New Hampshire': '33',
88
- 'NJ': '34',
89
- 'New Jersey': '34',
90
- 'NM': '35',
91
- 'New Mexico': '35',
92
- 'NY': '36',
93
- 'New York': '36',
94
- 'NC': '37',
95
- 'North Carolina': '37',
96
- 'ND': '38',
97
- 'North Dakota': '38',
98
- 'OH': '39',
99
- 'Ohio': '39',
100
- 'OK': '40',
101
- 'Oklahoma': '40',
102
- 'OR': '41',
103
- 'Oregon': '41',
104
- 'PA': '42',
105
- 'Pennsylvania': '42',
106
- 'RI': '44',
107
- 'Rhode Island': '44',
108
- 'SC': '45',
109
- 'South Carolina': '45',
110
- 'SD': '46',
111
- 'South Dakota': '46',
112
- 'TN': '47',
113
- 'Tennessee': '47',
114
- 'TX': '48',
115
- 'Texas': '48',
116
- 'UT': '49',
117
- 'Utah': '49',
118
- 'VT': '50',
119
- 'Vermont': '50',
120
- 'VA': '51',
121
- 'Virginia': '51',
122
- 'WA': '53',
123
- 'Washington': '53',
124
- 'WV': '54',
125
- 'West Virginia': '54',
126
- 'WI': '55',
127
- 'Wisconsin': '55',
128
- 'WY': '56',
129
- 'Wyoming': '56',
130
- 'PR': '72',
131
- 'Puerto Rico': '72',
132
- 'VI': '78',
133
- 'AS': '60',
134
- 'MP': '69',
135
- 'GU': '66',
136
- };
137
- //# sourceMappingURL=state_codes.js.map