@performant-software/core-data 1.2.0-beta.1 → 1.2.0-beta.10

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 (50) hide show
  1. package/build/index.js +1 -1
  2. package/build/index.js.map +1 -1
  3. package/build/main.css +824 -5
  4. package/package.json +14 -4
  5. package/postcss.config.js +6 -0
  6. package/src/components/MediaGallery.js +1 -1
  7. package/src/components/PlaceDetailsPanel.js +14 -1
  8. package/src/components/PlaceMarker.js +2 -0
  9. package/src/components/PlaceResultsList.css +7 -0
  10. package/src/components/PlaceResultsList.js +178 -0
  11. package/src/components/{PlaceDetailsPanel.css → RelatedItemsList.css} +5 -5
  12. package/src/components/RelatedItemsList.js +14 -3
  13. package/src/components/RelatedList.js +16 -2
  14. package/src/components/RelatedMedia.js +15 -1
  15. package/src/components/RelatedOrganizations.js +9 -2
  16. package/src/components/RelatedPeople.js +9 -2
  17. package/src/components/RelatedPlaces.js +9 -2
  18. package/src/components/RelatedTaxonomies.js +9 -2
  19. package/src/i18n/en.json +27 -0
  20. package/src/i18n/i18n.js +26 -0
  21. package/src/index.css +3 -0
  22. package/src/index.js +4 -0
  23. package/src/types/AnnotationPage.js +15 -0
  24. package/src/types/Feature.js +10 -0
  25. package/src/types/FeatureGeometry.js +6 -0
  26. package/src/types/Place.js +1 -1
  27. package/src/types/RelatedItems.js +1 -1
  28. package/src/types/typesense/Place.js +14 -0
  29. package/tailwind.config.js +19 -0
  30. package/types/components/MediaGallery.js.flow +1 -1
  31. package/types/components/PlaceDetailsPanel.js.flow +14 -1
  32. package/types/components/PlaceMarker.js.flow +2 -0
  33. package/types/components/PlaceResultsList.js.flow +178 -0
  34. package/types/components/RelatedItemsList.js.flow +14 -3
  35. package/types/components/RelatedList.js.flow +16 -2
  36. package/types/components/RelatedMedia.js.flow +15 -1
  37. package/types/components/RelatedOrganizations.js.flow +9 -2
  38. package/types/components/RelatedPeople.js.flow +9 -2
  39. package/types/components/RelatedPlaces.js.flow +9 -2
  40. package/types/components/RelatedTaxonomies.js.flow +9 -2
  41. package/types/components/SearchResultsList.js.flow +160 -0
  42. package/types/i18n/i18n.js.flow +26 -0
  43. package/types/index.js.flow +4 -0
  44. package/types/types/AnnotationPage.js.flow +15 -0
  45. package/types/types/Feature.js.flow +10 -0
  46. package/types/types/FeatureGeometry.js.flow +6 -0
  47. package/types/types/Place.js.flow +1 -1
  48. package/types/types/RelatedItems.js.flow +1 -1
  49. package/types/types/typesense/Place.js.flow +14 -0
  50. package/webpack.config.js +31 -1
@@ -0,0 +1,26 @@
1
+ // @flow
2
+
3
+ import i18next from 'i18next';
4
+
5
+ import en from './en.json';
6
+
7
+ const resources = {
8
+ en: {
9
+ translation: en
10
+ }
11
+ };
12
+
13
+ const i18n = i18next.createInstance();
14
+
15
+ i18n
16
+ .init({
17
+ debug: true,
18
+ fallbackLng: 'en',
19
+ lng: 'en',
20
+ interpolation: {
21
+ escapeValue: false,
22
+ },
23
+ resources
24
+ });
25
+
26
+ export default i18n;
@@ -1,10 +1,14 @@
1
1
  // @flow
2
2
 
3
+ // CSS
4
+ import './index.css';
5
+
3
6
  // Components
4
7
  export { default as LoadAnimation } from './components/LoadAnimation';
5
8
  export { default as MediaGallery } from './components/MediaGallery';
6
9
  export { default as PlaceDetailsPanel } from './components/PlaceDetailsPanel';
7
10
  export { default as PlaceMarker } from './components/PlaceMarker';
11
+ export { default as PlaceResultsList } from './components/PlaceResultsList';
8
12
  export { default as RelatedItemsList } from './components/RelatedItemsList';
9
13
  export { default as RelatedList } from './components/RelatedList';
10
14
  export { default as RelatedMedia } from './components/RelatedMedia';
@@ -0,0 +1,15 @@
1
+ // @flow
2
+
3
+ import type { Annotation } from './Annotation';
4
+
5
+ export type AnnotationPage = {
6
+ '@context': 'http://www.w3.org/ns/anno.jsonld';
7
+ id: string;
8
+ type: 'AnnotationPage';
9
+ partOf: {
10
+ id: string;
11
+ label: string;
12
+ total: number;
13
+ };
14
+ items: Annotation<T>[];
15
+ };
@@ -0,0 +1,10 @@
1
+ // @flow
2
+
3
+ import type { FeatureGeometry } from './FeatureGeometry';
4
+
5
+ export type Feature = {
6
+ id: number,
7
+ type: 'Feature',
8
+ properties: any,
9
+ geometry: FeatureGeometry
10
+ };
@@ -0,0 +1,6 @@
1
+ // @flow
2
+
3
+ export type FeatureGeometry = {
4
+ type: 'Point' | 'Polygon' | 'Polyline' | 'GeometryCollection';
5
+ coordinates: number[] | number[][] | number[][][];
6
+ };
@@ -1,7 +1,7 @@
1
1
  // @flow
2
2
 
3
- import type { FeatureGeometry } from '@peripleo/peripleo';
4
3
  import type { Annotation } from './Annotation';
4
+ import type { FeatureGeometry } from './FeatureGeometry';
5
5
 
6
6
  export type Place = Annotation & {
7
7
  type: 'Place',
@@ -1,7 +1,7 @@
1
1
  // @flow
2
2
 
3
- import { AnnotationPage } from '@peripleo/peripleo';
4
3
  import type { Annotation } from './Annotation';
4
+ import type { AnnotationPage } from './AnnotationPage';
5
5
 
6
6
  export type RelatedItems = {
7
7
  endpoint: string,
@@ -0,0 +1,14 @@
1
+ // @flow
2
+
3
+ export type Place = {
4
+ uuid: string;
5
+ record_id: string;
6
+ type: string;
7
+ name: string;
8
+ names: string[];
9
+ coordinates: number[];
10
+ geometry: {
11
+ type: 'Point' | 'GeometryCollection',
12
+ coordinates: [ number, number ];
13
+ }
14
+ };
package/webpack.config.js CHANGED
@@ -1,3 +1,33 @@
1
1
  const { configure } = require('@performant-software/webpack-config');
2
+ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
3
+ const path = require('path');
2
4
 
3
- module.exports = configure(__dirname);
5
+ const options = {
6
+ module: {
7
+ rules: [{
8
+ test: /\.(c|le)ss$/,
9
+ use: [
10
+ MiniCssExtractPlugin.loader,
11
+ 'css-loader',
12
+ 'postcss-loader'
13
+ ],
14
+ include: [
15
+ path.resolve(__dirname)
16
+ ]
17
+ }]
18
+ }
19
+ };
20
+
21
+ const mergeOptions = {
22
+ module: {
23
+ rules: {
24
+ test: /\.(c|le)ss$/,
25
+ use: {
26
+ loader: 'match',
27
+ options: 'replace',
28
+ },
29
+ },
30
+ },
31
+ };
32
+
33
+ module.exports = configure(__dirname, options, mergeOptions);