@aarhus-university/au-lib-react-components 10.1.0 → 10.2.2

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 (43) hide show
  1. package/build/umd/all.css +2 -2
  2. package/build/umd/all.js +1 -1
  3. package/build/umd/alphabox.js +1 -1
  4. package/build/umd/databox.js +1 -1
  5. package/build/umd/diagramme.js +1 -1
  6. package/build/umd/flowbox.js +1 -1
  7. package/build/umd/universe.js +1 -1
  8. package/package.json +4 -4
  9. package/src/components/AUAutoSuggestComponent.js +158 -158
  10. package/src/components/AUTabbedContentComponent.tsx +1 -1
  11. package/src/components/AUToastComponent.tsx +12 -13
  12. package/src/components/profile/AUProfileLoginComponent.tsx +26 -26
  13. package/src/layout-2016/components/alphabox/AlphaBoxComponent.js +143 -143
  14. package/src/layout-2016/components/alphabox/AlphaBoxContentComponent.js +136 -136
  15. package/src/layout-2016/components/common/AUCollapsibleComponent.js +152 -152
  16. package/src/layout-2016/components/common/AUSpinnerComponent.js +103 -103
  17. package/src/layout-2016/components/databox/DataBoxAlphabetComponent.js +144 -144
  18. package/src/layout-2016/components/databox/DataBoxAssociationComponent.js +122 -122
  19. package/src/layout-2016/components/databox/DataBoxButtonComponent.js +157 -157
  20. package/src/layout-2016/components/databox/DataBoxComponent.js +297 -297
  21. package/src/layout-2016/components/databox/DataBoxGroupingComponent.js +64 -64
  22. package/src/layout-2016/components/databox/DataBoxSearchResultComponent.js +36 -36
  23. package/src/layout-2016/components/databox/DataBoxStackedAssociationComponent.js +54 -54
  24. package/src/layout-2016/components/databox/DataBoxSuggestionComponent.js +39 -39
  25. package/src/layout-2016/components/diagramme/AUDiagrammeComponent.js +309 -309
  26. package/src/layout-2016/components/flowbox/FlowBoxComponent.js +126 -126
  27. package/src/layout-2016/components/flowbox/FlowBoxPhoneComponent.js +104 -104
  28. package/src/layout-2016/components/profile/AUProfileAvatar2016Component.js +103 -103
  29. package/src/layout-2016/components/universe/StaffTopComponent.js +363 -363
  30. package/src/layout-2016/components/universe/StudentTopComponent.js +137 -137
  31. package/src/layout-2016/components/universe/UniverseContainerComponent.js +65 -65
  32. package/src/layout-2016/lib/all.js +3 -3
  33. package/src/layout-2016/lib/au-alphabox.js +100 -100
  34. package/src/layout-2016/lib/au-databox.js +400 -400
  35. package/src/layout-2016/lib/au-diagramme.js +85 -85
  36. package/src/layout-2016/lib/au-flowbox.js +93 -93
  37. package/src/layout-2016/lib/universe.js +9 -9
  38. package/src/lib/helpers.ts +194 -194
  39. package/tsconfig.json +46 -46
  40. package/types/common/interfaces/gui.d.ts +2 -1
  41. package/types/common/interfaces/model.d.ts +29 -29
  42. package/types/common/props.d.ts +166 -165
  43. package/webpack.config.js +89 -89
@@ -1,165 +1,166 @@
1
- interface AUAlertComponentProps {
2
- message: string,
3
- children: JSX.Element,
4
- alert: boolean,
5
- buttons?: IAlertButton[],
6
- }
7
-
8
- interface AUCalendarComponentProps {
9
- lang?: string,
10
- day: number,
11
- month: number,
12
- year: number,
13
- hour: number,
14
- minute: number,
15
- selected?: Date,
16
- onSelected: (selected: Date) => void,
17
- highlightWeekend?: boolean,
18
- highlightHolidays?: boolean,
19
- yearSpanMinus?: number,
20
- yearSpanPlus?: number,
21
- minuteInterval?: number,
22
- showTime?: boolean,
23
- closeable?: boolean,
24
- onClose?: () => void,
25
- limitStart?: Date | null,
26
- limitEnd?: Date | null,
27
- controls: string,
28
- }
29
-
30
- interface AUContentToggleComponentProps {
31
- toggled: boolean,
32
- classNames?: string | undefined,
33
- children: JSX.Element,
34
- }
35
-
36
- interface AUDatepickerComponentProps {
37
- id: string;
38
- lang?: string;
39
- date?: Date;
40
- onDateChange: (date: Date, formatted: string) => void;
41
- onHide: (date: Date, dateFormatted: string) => void;
42
- format?: string;
43
- showTime?: boolean;
44
- showLabel?: boolean;
45
- labelInline?: boolean;
46
- labelText?: string;
47
- fullWidth?: boolean;
48
- yearSpanMinus?: number;
49
- yearSpanPlus?: number;
50
- limitStart?: Date | null;
51
- limitEnd?: Date | null;
52
- disabled?: boolean;
53
- }
54
-
55
- interface AUModalComponentProps {
56
- domId: string,
57
- children?: JSX.Element,
58
- onClose?: () => void,
59
- closeButton?: boolean,
60
- closeButtonDisabled?: boolean,
61
- lang?: string,
62
- sender: HTMLElement | null,
63
- className?: string,
64
- }
65
-
66
- interface AUSpinnerComponentProps {
67
- domID?: string,
68
- className?: string,
69
- children: JSX.Element,
70
- visible?: boolean,
71
- loaded: boolean,
72
- loadingCondition: boolean,
73
- height?: string,
74
- init?: string,
75
- onLoad: () => void,
76
- }
77
-
78
- interface AUSubNavComponentProps {
79
- children: JSX.Element,
80
- className: string,
81
- dataIcon: string,
82
- text: string,
83
- ariaLabel: string,
84
- id: string,
85
- }
86
-
87
- interface AUTableComponentProps {
88
- children: JSX.Element,
89
- className: string,
90
- }
91
-
92
- interface TabRoutesProps {
93
- onRouteChange: (location: any) => void, // Noget react-router-dom halløj her der ikke spiller...
94
- content: JSX.Element[],
95
- }
96
-
97
- interface AUTabbedContentComponentProps {
98
- tabKey?: number,
99
- tabs: ITabbedTab[],
100
- tabContent?: ITabbedObject[] | null,
101
- children?: JSX.Element | null,
102
- focus?: boolean,
103
- initial?: number,
104
- lang?: string,
105
- callback?: () => void,
106
- withRouter?: boolean,
107
- classNames?: string,
108
- }
109
-
110
- interface AUToastComponentProps {
111
- message: IToastMessage,
112
- dismiss?: () => void,
113
- onOpen?: () => void,
114
- }
115
-
116
- interface AUToolbarComponentProps {
117
- lang: string,
118
- elements: JSX.Element[],
119
- }
120
-
121
- interface AUSubmitButtonContainerComponentProps {
122
- lang: string,
123
- disabled: boolean,
124
- onSubmit: () => void,
125
- onCancel: () => void,
126
- }
127
-
128
- interface AUMobilePrefixComponentProps {
129
- countryCodes: AU.ICountryCode[],
130
- important: boolean,
131
- }
132
-
133
- interface AUReceiptComponentProps {
134
- receiptText: string,
135
- helpText: JSX.Element | null,
136
- showGoTo: boolean,
137
- buttons: IReceiptButton[],
138
- }
139
-
140
- interface AUProfileWidgetComponentProps {
141
- lang: string,
142
- name: string,
143
- auId: number,
144
- studentNumber?: string,
145
- settings: IProfileSettings[],
146
- changeLanguageUri: string,
147
- logoutUri: string,
148
- profileLabels: any, // Noget med labels her?
149
- }
150
-
151
- interface AUProfileAvatarComponentProps {
152
- user: AU.IUserContext,
153
- settings: IProfileSettings[],
154
- profileLabels: any, // Noget med labels her?
155
- logoutUri: string,
156
- changeLanguageUri?: string,
157
- lang: string,
158
- }
159
-
160
- interface AUProfileLoginComponentProps {
161
- loggedIn: boolean,
162
- loginUri: string,
163
- children: JSX.Element,
164
- text: string,
165
- }
1
+ interface AUAlertComponentProps {
2
+ message: string,
3
+ children: JSX.Element,
4
+ alert: boolean,
5
+ buttons?: IAlertButton[],
6
+ }
7
+
8
+ interface AUCalendarComponentProps {
9
+ lang?: string,
10
+ day: number,
11
+ month: number,
12
+ year: number,
13
+ hour: number,
14
+ minute: number,
15
+ selected?: Date,
16
+ onSelected: (selected: Date) => void,
17
+ highlightWeekend?: boolean,
18
+ highlightHolidays?: boolean,
19
+ yearSpanMinus?: number,
20
+ yearSpanPlus?: number,
21
+ minuteInterval?: number,
22
+ showTime?: boolean,
23
+ closeable?: boolean,
24
+ onClose?: () => void,
25
+ limitStart?: Date | null,
26
+ limitEnd?: Date | null,
27
+ controls: string,
28
+ }
29
+
30
+ interface AUContentToggleComponentProps {
31
+ toggled: boolean,
32
+ classNames?: string | undefined,
33
+ children: JSX.Element,
34
+ }
35
+
36
+ interface AUDatepickerComponentProps {
37
+ id: string;
38
+ lang?: string;
39
+ date?: Date;
40
+ onDateChange: (date: Date, formatted: string) => void;
41
+ onHide: (date: Date, dateFormatted: string) => void;
42
+ format?: string;
43
+ showTime?: boolean;
44
+ showLabel?: boolean;
45
+ labelInline?: boolean;
46
+ labelText?: string;
47
+ fullWidth?: boolean;
48
+ yearSpanMinus?: number;
49
+ yearSpanPlus?: number;
50
+ limitStart?: Date | null;
51
+ limitEnd?: Date | null;
52
+ disabled?: boolean;
53
+ }
54
+
55
+ interface AUModalComponentProps {
56
+ domId: string,
57
+ children?: JSX.Element,
58
+ onClose?: () => void,
59
+ closeButton?: boolean,
60
+ closeButtonDisabled?: boolean,
61
+ lang?: string,
62
+ sender: HTMLElement | null,
63
+ className?: string,
64
+ }
65
+
66
+ interface AUSpinnerComponentProps {
67
+ domID?: string,
68
+ className?: string,
69
+ children: JSX.Element,
70
+ visible?: boolean,
71
+ loaded: boolean,
72
+ loadingCondition: boolean,
73
+ height?: string,
74
+ init?: string,
75
+ onLoad: () => void,
76
+ }
77
+
78
+ interface AUSubNavComponentProps {
79
+ children: JSX.Element,
80
+ className: string,
81
+ dataIcon: string,
82
+ text: string,
83
+ ariaLabel: string,
84
+ id: string,
85
+ }
86
+
87
+ interface AUTableComponentProps {
88
+ children: JSX.Element,
89
+ className: string,
90
+ }
91
+
92
+ interface TabRoutesProps {
93
+ onRouteChange: (location: any) => void, // Noget react-router-dom halløj her der ikke spiller...
94
+ content: JSX.Element[],
95
+ }
96
+
97
+ interface AUTabbedContentComponentProps {
98
+ tabKey?: number,
99
+ tabs: ITabbedTab[],
100
+ tabContent?: ITabbedObject[] | null,
101
+ children?: JSX.Element | null,
102
+ focus?: boolean,
103
+ initial?: number,
104
+ lang?: string,
105
+ callback?: () => void,
106
+ withRouter?: boolean,
107
+ classNames?: string,
108
+ }
109
+
110
+ interface AUToastComponentProps {
111
+ message: IToastMessage,
112
+ buttonText?: string,
113
+ dismiss?: () => void,
114
+ onOpen?: () => void,
115
+ }
116
+
117
+ interface AUToolbarComponentProps {
118
+ lang: string,
119
+ elements: JSX.Element[],
120
+ }
121
+
122
+ interface AUSubmitButtonContainerComponentProps {
123
+ lang: string,
124
+ disabled: boolean,
125
+ onSubmit: () => void,
126
+ onCancel: () => void,
127
+ }
128
+
129
+ interface AUMobilePrefixComponentProps {
130
+ countryCodes: AU.ICountryCode[],
131
+ important: boolean,
132
+ }
133
+
134
+ interface AUReceiptComponentProps {
135
+ receiptText: string,
136
+ helpText: JSX.Element | null,
137
+ showGoTo: boolean,
138
+ buttons: IReceiptButton[],
139
+ }
140
+
141
+ interface AUProfileWidgetComponentProps {
142
+ lang: string,
143
+ name: string,
144
+ auId: number,
145
+ studentNumber?: string,
146
+ settings: IProfileSettings[],
147
+ changeLanguageUri: string,
148
+ logoutUri: string,
149
+ profileLabels: any, // Noget med labels her?
150
+ }
151
+
152
+ interface AUProfileAvatarComponentProps {
153
+ user: AU.IUserContext,
154
+ settings: IProfileSettings[],
155
+ profileLabels: any, // Noget med labels her?
156
+ logoutUri: string,
157
+ changeLanguageUri?: string,
158
+ lang: string,
159
+ }
160
+
161
+ interface AUProfileLoginComponentProps {
162
+ loggedIn: boolean,
163
+ loginUri: string,
164
+ children: JSX.Element,
165
+ text: string,
166
+ }
package/webpack.config.js CHANGED
@@ -1,89 +1,89 @@
1
- /* eslint-disable @typescript-eslint/no-var-requires */
2
- /* eslint-disable import/no-extraneous-dependencies */
3
- const ESLintPlugin = require('eslint-webpack-plugin');
4
- const MiniCssExtractPlugin = require('mini-css-extract-plugin');
5
- const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
6
- const path = require('path');
7
-
8
- // https://github.com/webpack/webpack/issues/4453
9
-
10
- const entries = {
11
- all: './src/layout-2016/lib/all',
12
- alphabox: './src/layout-2016/lib/au-alphabox',
13
- databox: './src/layout-2016/lib/au-databox',
14
- diagramme: './src/layout-2016/lib/au-diagramme',
15
- flowbox: './src/layout-2016/lib/au-flowbox',
16
- universe: './src/layout-2016/lib/universe',
17
- };
18
-
19
- module.exports = Object.entries(entries).map((entry) => ({
20
- mode: 'production',
21
- devtool: 'source-map',
22
- entry: {
23
- [entry[0]]: entry[1],
24
- },
25
- output: {
26
- path: path.resolve(__dirname, './build/umd'),
27
- filename: '[name].js',
28
- libraryTarget: 'umd', // https://webpack.js.org/configuration/output/#output-librarytarget
29
- },
30
- plugins: [
31
- new ESLintPlugin({
32
- fix: true,
33
- }),
34
- new MiniCssExtractPlugin({
35
- filename: 'all.css',
36
- chunkFilename: '[id].css',
37
- }),
38
- new ForkTsCheckerWebpackPlugin(),
39
- ],
40
- resolve: {
41
- extensions: ['.ts', '.tsx', '.js', '.jsx'],
42
- },
43
- module: {
44
- rules: [
45
- {
46
- test: /\.(ts|js)x?$/,
47
- include: path.resolve(__dirname, '.'),
48
- exclude: /(node_modules)/,
49
- use: {
50
- loader: 'babel-loader',
51
- },
52
- },
53
- {
54
- test: /\.js$/,
55
- include: path.resolve(__dirname, './node_modules/@aarhus-university/au-designsystem-delphinus/source'),
56
- use: {
57
- loader: 'babel-loader',
58
- },
59
- },
60
- {
61
- test: /\.scss/,
62
- include: path.resolve(__dirname, './src/styles'),
63
- sideEffects: true,
64
- use: [
65
- MiniCssExtractPlugin.loader,
66
- { loader: 'css-loader' },
67
- { loader: 'sass-loader' },
68
- ],
69
- },
70
- ],
71
- },
72
- externals: {
73
- moment: 'moment',
74
- react: {
75
- root: 'React',
76
- commonjs2: 'react',
77
- commonjs: 'react',
78
- amd: 'react',
79
- umd: 'react',
80
- },
81
- 'react-dom': {
82
- root: 'ReactDOM',
83
- commonjs2: 'react-dom',
84
- commonjs: 'react-dom',
85
- amd: 'react-dom',
86
- umd: 'react-dom',
87
- },
88
- },
89
- }));
1
+ /* eslint-disable @typescript-eslint/no-var-requires */
2
+ /* eslint-disable import/no-extraneous-dependencies */
3
+ const ESLintPlugin = require('eslint-webpack-plugin');
4
+ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
5
+ const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
6
+ const path = require('path');
7
+
8
+ // https://github.com/webpack/webpack/issues/4453
9
+
10
+ const entries = {
11
+ all: './src/layout-2016/lib/all',
12
+ alphabox: './src/layout-2016/lib/au-alphabox',
13
+ databox: './src/layout-2016/lib/au-databox',
14
+ diagramme: './src/layout-2016/lib/au-diagramme',
15
+ flowbox: './src/layout-2016/lib/au-flowbox',
16
+ universe: './src/layout-2016/lib/universe',
17
+ };
18
+
19
+ module.exports = Object.entries(entries).map((entry) => ({
20
+ mode: 'production',
21
+ devtool: 'source-map',
22
+ entry: {
23
+ [entry[0]]: entry[1],
24
+ },
25
+ output: {
26
+ path: path.resolve(__dirname, './build/umd'),
27
+ filename: '[name].js',
28
+ libraryTarget: 'umd', // https://webpack.js.org/configuration/output/#output-librarytarget
29
+ },
30
+ plugins: [
31
+ new ESLintPlugin({
32
+ fix: true,
33
+ }),
34
+ new MiniCssExtractPlugin({
35
+ filename: 'all.css',
36
+ chunkFilename: '[id].css',
37
+ }),
38
+ new ForkTsCheckerWebpackPlugin(),
39
+ ],
40
+ resolve: {
41
+ extensions: ['.ts', '.tsx', '.js', '.jsx'],
42
+ },
43
+ module: {
44
+ rules: [
45
+ {
46
+ test: /\.(ts|js)x?$/,
47
+ include: path.resolve(__dirname, '.'),
48
+ exclude: /(node_modules)/,
49
+ use: {
50
+ loader: 'babel-loader',
51
+ },
52
+ },
53
+ {
54
+ test: /\.js$/,
55
+ include: path.resolve(__dirname, './node_modules/@aarhus-university/au-designsystem-delphinus/source'),
56
+ use: {
57
+ loader: 'babel-loader',
58
+ },
59
+ },
60
+ {
61
+ test: /\.scss/,
62
+ include: path.resolve(__dirname, './src/styles'),
63
+ sideEffects: true,
64
+ use: [
65
+ MiniCssExtractPlugin.loader,
66
+ { loader: 'css-loader' },
67
+ { loader: 'sass-loader' },
68
+ ],
69
+ },
70
+ ],
71
+ },
72
+ externals: {
73
+ moment: 'moment',
74
+ react: {
75
+ root: 'React',
76
+ commonjs2: 'react',
77
+ commonjs: 'react',
78
+ amd: 'react',
79
+ umd: 'react',
80
+ },
81
+ 'react-dom': {
82
+ root: 'ReactDOM',
83
+ commonjs2: 'react-dom',
84
+ commonjs: 'react-dom',
85
+ amd: 'react-dom',
86
+ umd: 'react-dom',
87
+ },
88
+ },
89
+ }));