playbook_ui 14.3.2.pre.alpha.PBNTR515typeaheadmarginbottomredux3756 → 14.3.2.pre.alpha.revert3614PBNTR455ganttchartPOC3783
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/_playbook.scss +0 -1
- data/app/pb_kits/playbook/pb_icon/icon.rb +1 -1
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +1 -0
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +0 -14
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +0 -3
- data/app/pb_kits/playbook/pb_typeahead/components/Control.tsx +5 -6
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +1 -2
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +1 -6
- data/dist/chunks/{_typeahead-BOgF-ybo.js → _typeahead-XnxVauwE.js} +3 -3
- data/dist/chunks/_weekday_stacked--VyK5ouD.js +45 -0
- data/dist/chunks/{lib-D9uVVKnh.js → lib-CxRZxMI4.js} +1 -1
- data/dist/chunks/{pb_form_validation-u2wnZ3oe.js → pb_form_validation-9nbXdKfX.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +0 -4
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +6 -14
- data/app/pb_kits/playbook/pb_gantt_chart/_gantt_chart.scss +0 -3
- data/app/pb_kits/playbook/pb_gantt_chart/_gantt_chart.tsx +0 -72
- data/app/pb_kits/playbook/pb_gantt_chart/docs/_gantt_chart_default.jsx +0 -53
- data/app/pb_kits/playbook/pb_gantt_chart/docs/example.yml +0 -7
- data/app/pb_kits/playbook/pb_gantt_chart/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_gantt_chart/gantt_chart.test.jsx +0 -19
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_margin_bottom.html.erb +0 -88
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_margin_bottom.jsx +0 -60
- data/dist/chunks/_weekday_stacked-COb2q6KQ.js +0 -45
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 14.3.2.pre.alpha.
|
4
|
+
version: 14.3.2.pre.alpha.revert3614PBNTR455ganttchartPOC3783
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-09-
|
12
|
+
date: 2024-09-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -1352,12 +1352,6 @@ files:
|
|
1352
1352
|
- app/pb_kits/playbook/pb_form_pill/docs/index.js
|
1353
1353
|
- app/pb_kits/playbook/pb_form_pill/form_pill.html.erb
|
1354
1354
|
- app/pb_kits/playbook/pb_form_pill/form_pill.rb
|
1355
|
-
- app/pb_kits/playbook/pb_gantt_chart/_gantt_chart.scss
|
1356
|
-
- app/pb_kits/playbook/pb_gantt_chart/_gantt_chart.tsx
|
1357
|
-
- app/pb_kits/playbook/pb_gantt_chart/docs/_gantt_chart_default.jsx
|
1358
|
-
- app/pb_kits/playbook/pb_gantt_chart/docs/example.yml
|
1359
|
-
- app/pb_kits/playbook/pb_gantt_chart/docs/index.js
|
1360
|
-
- app/pb_kits/playbook/pb_gantt_chart/gantt_chart.test.jsx
|
1361
1355
|
- app/pb_kits/playbook/pb_gauge/_gauge.scss
|
1362
1356
|
- app/pb_kits/playbook/pb_gauge/_gauge.tsx
|
1363
1357
|
- app/pb_kits/playbook/pb_gauge/docs/_gauge_colors.html.erb
|
@@ -2853,8 +2847,6 @@ files:
|
|
2853
2847
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_error_state.md
|
2854
2848
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_inline.html.erb
|
2855
2849
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_inline.jsx
|
2856
|
-
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_margin_bottom.html.erb
|
2857
|
-
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_margin_bottom.jsx
|
2858
2850
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.html.erb
|
2859
2851
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.jsx
|
2860
2852
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_context.html.erb
|
@@ -3036,11 +3028,11 @@ files:
|
|
3036
3028
|
- app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
|
3037
3029
|
- app/pb_kits/playbook/utilities/text.ts
|
3038
3030
|
- app/pb_kits/playbook/utilities/validEmojiChecker.ts
|
3039
|
-
- dist/chunks/_typeahead-
|
3040
|
-
- dist/chunks/_weekday_stacked
|
3031
|
+
- dist/chunks/_typeahead-XnxVauwE.js
|
3032
|
+
- dist/chunks/_weekday_stacked--VyK5ouD.js
|
3041
3033
|
- dist/chunks/lazysizes-B7xYodB-.js
|
3042
|
-
- dist/chunks/lib-
|
3043
|
-
- dist/chunks/pb_form_validation-
|
3034
|
+
- dist/chunks/lib-CxRZxMI4.js
|
3035
|
+
- dist/chunks/pb_form_validation-9nbXdKfX.js
|
3044
3036
|
- dist/chunks/vendor.js
|
3045
3037
|
- dist/menu.yml
|
3046
3038
|
- dist/playbook-doc.js
|
@@ -1,72 +0,0 @@
|
|
1
|
-
import React, { useState, useEffect } from "react";
|
2
|
-
import classnames from "classnames";
|
3
|
-
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from "../utilities/props";
|
4
|
-
import { globalProps } from "../utilities/globalProps";
|
5
|
-
import HighchartsReact from "highcharts-react-official";
|
6
|
-
import Highcharts from "highcharts/highcharts-gantt";
|
7
|
-
|
8
|
-
import { highchartsTheme } from "../pb_dashboard/pbChartsLightTheme";
|
9
|
-
import { highchartsDarkTheme } from "../pb_dashboard/pbChartsDarkTheme";
|
10
|
-
|
11
|
-
type GanttChartProps = {
|
12
|
-
aria?: { [key: string]: string };
|
13
|
-
className?: string;
|
14
|
-
customOptions: Partial<Highcharts.Options>;
|
15
|
-
dark?: boolean;
|
16
|
-
data?: { [key: string]: string };
|
17
|
-
htmlOptions?: { [key: string]: string | number | boolean | (() => void) };
|
18
|
-
id?: string;
|
19
|
-
};
|
20
|
-
|
21
|
-
const GanttChart = (props: GanttChartProps) => {
|
22
|
-
const {
|
23
|
-
aria = {},
|
24
|
-
className,
|
25
|
-
customOptions = {},
|
26
|
-
dark = false,
|
27
|
-
data = {},
|
28
|
-
htmlOptions = {},
|
29
|
-
id,
|
30
|
-
} = props;
|
31
|
-
|
32
|
-
const ariaProps = buildAriaProps(aria);
|
33
|
-
const dataProps = buildDataProps(data);
|
34
|
-
const htmlProps = buildHtmlProps(htmlOptions);
|
35
|
-
const classes = classnames(
|
36
|
-
buildCss("pb_gantt_chart"),
|
37
|
-
globalProps(props),
|
38
|
-
className
|
39
|
-
);
|
40
|
-
|
41
|
-
const [options, setOptions] = useState<Highcharts.Options | undefined>(customOptions);
|
42
|
-
|
43
|
-
useEffect(() => {
|
44
|
-
setOptions(customOptions);
|
45
|
-
}, [customOptions]);
|
46
|
-
|
47
|
-
const setupTheme = () => {
|
48
|
-
dark
|
49
|
-
? Highcharts.setOptions(highchartsDarkTheme)
|
50
|
-
: Highcharts.setOptions(highchartsTheme);
|
51
|
-
};
|
52
|
-
setupTheme();
|
53
|
-
|
54
|
-
return (
|
55
|
-
<div>
|
56
|
-
<HighchartsReact
|
57
|
-
constructorType={"ganttChart"}
|
58
|
-
containerProps={{
|
59
|
-
className: classnames(globalProps(props), classes),
|
60
|
-
id: id,
|
61
|
-
...ariaProps,
|
62
|
-
...dataProps,
|
63
|
-
...htmlProps,
|
64
|
-
}}
|
65
|
-
highcharts={Highcharts}
|
66
|
-
options={options}
|
67
|
-
/>
|
68
|
-
</div>
|
69
|
-
);
|
70
|
-
};
|
71
|
-
|
72
|
-
export default GanttChart;
|
@@ -1,53 +0,0 @@
|
|
1
|
-
import React from "react";
|
2
|
-
import { GanttChart } from "playbook-ui";
|
3
|
-
|
4
|
-
const mockOptions = {
|
5
|
-
title: {
|
6
|
-
text: "Simple Gantt Chart",
|
7
|
-
},
|
8
|
-
|
9
|
-
xAxis: [
|
10
|
-
{
|
11
|
-
min: Date.UTC(2014, 10, 17),
|
12
|
-
max: Date.UTC(2014, 10, 30),
|
13
|
-
},
|
14
|
-
],
|
15
|
-
|
16
|
-
series: [
|
17
|
-
{
|
18
|
-
name: "Project 1",
|
19
|
-
data: [
|
20
|
-
{
|
21
|
-
name: "Start prototype",
|
22
|
-
start: Date.UTC(2014, 10, 18),
|
23
|
-
end: Date.UTC(2014, 10, 25),
|
24
|
-
},
|
25
|
-
{
|
26
|
-
name: "Develop",
|
27
|
-
start: Date.UTC(2014, 10, 20),
|
28
|
-
end: Date.UTC(2014, 10, 25),
|
29
|
-
},
|
30
|
-
{
|
31
|
-
name: "Run acceptance tests",
|
32
|
-
start: Date.UTC(2014, 10, 23),
|
33
|
-
end: Date.UTC(2014, 10, 26),
|
34
|
-
},
|
35
|
-
{
|
36
|
-
name: "Test prototype",
|
37
|
-
start: Date.UTC(2014, 10, 27),
|
38
|
-
end: Date.UTC(2014, 10, 29),
|
39
|
-
},
|
40
|
-
],
|
41
|
-
},
|
42
|
-
],
|
43
|
-
};
|
44
|
-
|
45
|
-
const GanttChartDefault = (props) => (
|
46
|
-
<div>
|
47
|
-
<GanttChart customOptions={mockOptions}
|
48
|
-
{...props}
|
49
|
-
/>
|
50
|
-
</div>
|
51
|
-
);
|
52
|
-
|
53
|
-
export default GanttChartDefault;
|
@@ -1 +0,0 @@
|
|
1
|
-
export { default as GanttChartDefault } from './_gantt_chart_default.jsx'
|
@@ -1,19 +0,0 @@
|
|
1
|
-
// import { renderKit } from '../utilities/test-utils'
|
2
|
-
|
3
|
-
// import GanttChart from './_gantt_chart'
|
4
|
-
|
5
|
-
/* See these resources for more testing info:
|
6
|
-
- https://github.com/testing-library/jest-dom#usage for useage and examples
|
7
|
-
- https://jestjs.io/docs/en/using-matchers
|
8
|
-
*/
|
9
|
-
|
10
|
-
test('generated scaffold test - update me', () => {
|
11
|
-
// const props = {
|
12
|
-
// data: { testid: 'default' }
|
13
|
-
// }
|
14
|
-
|
15
|
-
|
16
|
-
// const kit = renderKit(GanttChart , props)
|
17
|
-
// expect(kit).toBeInTheDocument()
|
18
|
-
})
|
19
|
-
|
@@ -1,88 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
options = [
|
3
|
-
{ label: 'Orange', value: '#FFA500' },
|
4
|
-
{ label: 'Red', value: '#FF0000' },
|
5
|
-
{ label: 'Green', value: '#00FF00' },
|
6
|
-
{ label: 'Blue', value: '#0000FF' },
|
7
|
-
]
|
8
|
-
%>
|
9
|
-
|
10
|
-
<%= pb_rails("typeahead", props: {
|
11
|
-
id: "typeahead-default",
|
12
|
-
placeholder: "All Colors",
|
13
|
-
options: options,
|
14
|
-
label: "None",
|
15
|
-
name: :foo,
|
16
|
-
is_multi: false,
|
17
|
-
margin_bottom: "none",
|
18
|
-
})
|
19
|
-
%>
|
20
|
-
<%= pb_rails("typeahead", props: {
|
21
|
-
id: "typeahead-default",
|
22
|
-
placeholder: "All Colors",
|
23
|
-
options: options,
|
24
|
-
label: "XXS",
|
25
|
-
name: :foo,
|
26
|
-
is_multi: false,
|
27
|
-
margin_bottom: "xxs",
|
28
|
-
})
|
29
|
-
%>
|
30
|
-
<%= pb_rails("typeahead", props: {
|
31
|
-
id: "typeahead-default",
|
32
|
-
placeholder: "All Colors",
|
33
|
-
options: options,
|
34
|
-
label: "XS",
|
35
|
-
name: :foo,
|
36
|
-
is_multi: false,
|
37
|
-
margin_bottom: "xs",
|
38
|
-
})
|
39
|
-
%>
|
40
|
-
<%= pb_rails("typeahead", props: {
|
41
|
-
id: "typeahead-default",
|
42
|
-
placeholder: "All Colors",
|
43
|
-
options: options,
|
44
|
-
label: "Default - SM",
|
45
|
-
name: :foo,
|
46
|
-
is_multi: false,
|
47
|
-
})
|
48
|
-
%>
|
49
|
-
<%= pb_rails("typeahead", props: {
|
50
|
-
id: "typeahead-default",
|
51
|
-
placeholder: "All Colors",
|
52
|
-
options: options,
|
53
|
-
label: "MD",
|
54
|
-
name: :foo,
|
55
|
-
is_multi: false,
|
56
|
-
margin_bottom: "md",
|
57
|
-
})
|
58
|
-
%>
|
59
|
-
<%= pb_rails("typeahead", props: {
|
60
|
-
id: "typeahead-default",
|
61
|
-
placeholder: "All Colors",
|
62
|
-
options: options,
|
63
|
-
label: "LG",
|
64
|
-
name: :foo,
|
65
|
-
is_multi: false,
|
66
|
-
margin_bottom: "lg",
|
67
|
-
})
|
68
|
-
%>
|
69
|
-
<%= pb_rails("typeahead", props: {
|
70
|
-
id: "typeahead-default",
|
71
|
-
placeholder: "All Colors",
|
72
|
-
options: options,
|
73
|
-
label: "XL",
|
74
|
-
name: :foo,
|
75
|
-
is_multi: false,
|
76
|
-
margin_bottom: "xl",
|
77
|
-
})
|
78
|
-
%>
|
79
|
-
|
80
|
-
<%= javascript_tag defer: "defer" do %>
|
81
|
-
document.addEventListener("pb-typeahead-kit-typeahead-default-result-option-select", function(event) {
|
82
|
-
console.log('Single Option selected')
|
83
|
-
console.dir(event.detail)
|
84
|
-
})
|
85
|
-
document.addEventListener("pb-typeahead-kit-typeahead-default-result-clear", function() {
|
86
|
-
console.log('All options cleared')
|
87
|
-
})
|
88
|
-
<% end %>
|
@@ -1,60 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
|
3
|
-
import Typeahead from '../_typeahead'
|
4
|
-
|
5
|
-
const options = [
|
6
|
-
{ label: 'Orange', value: '#FFA500' },
|
7
|
-
{ label: 'Red', value: '#FF0000' },
|
8
|
-
{ label: 'Green', value: '#00FF00' },
|
9
|
-
{ label: 'Blue', value: '#0000FF' },
|
10
|
-
]
|
11
|
-
|
12
|
-
const TypeaheadMarginBottom = (props) => {
|
13
|
-
return (
|
14
|
-
<>
|
15
|
-
<Typeahead
|
16
|
-
label="None"
|
17
|
-
marginBottom="none"
|
18
|
-
options={options}
|
19
|
-
{...props}
|
20
|
-
/>
|
21
|
-
<Typeahead
|
22
|
-
label="XXS"
|
23
|
-
marginBottom="xxs"
|
24
|
-
options={options}
|
25
|
-
{...props}
|
26
|
-
/>
|
27
|
-
<Typeahead
|
28
|
-
label="XS"
|
29
|
-
marginBottom="xs"
|
30
|
-
options={options}
|
31
|
-
{...props}
|
32
|
-
/>
|
33
|
-
<Typeahead
|
34
|
-
label="Default - SM"
|
35
|
-
options={options}
|
36
|
-
{...props}
|
37
|
-
/>
|
38
|
-
<Typeahead
|
39
|
-
label="MD"
|
40
|
-
marginBottom="md"
|
41
|
-
options={options}
|
42
|
-
{...props}
|
43
|
-
/>
|
44
|
-
<Typeahead
|
45
|
-
label="LG"
|
46
|
-
marginBottom="lg"
|
47
|
-
options={options}
|
48
|
-
{...props}
|
49
|
-
/>
|
50
|
-
<Typeahead
|
51
|
-
label="XL"
|
52
|
-
marginBottom="xl"
|
53
|
-
options={options}
|
54
|
-
{...props}
|
55
|
-
/>
|
56
|
-
</>
|
57
|
-
)
|
58
|
-
}
|
59
|
-
|
60
|
-
export default TypeaheadMarginBottom
|