Permalink
Browse files

1.4.0 - Ra Ra Rasputin's Disco Tiara (#84)

## 1.4.0 - Ra Ra Rasputin's Disco Tiara
**New Features**
* Now works out of the box with Fusion 3
* Added support for changing the default query via FUSION_CONFIG.js
* Added support for date range facets type
* Added support for simple grouped results
* New loading state for range facets to prevent multiple selections while page is loading

**Bug Fixes**
* When redirected through login, inital page query will no longer be cleared
* Linked URLS with parameters now click through correctly
* Only show pagination arrows when pagination is possible
* Fixed typeahead autocomplete user entry race condition

**Package Updates**
* Updated ESLint to version 3.3.1.
* Updated angular-ui-router to version 0.4.2

**Deprecated API functions**
* URLService.setQuery()

  Instead of using `URLService.setQuery()` use `QueryService.setQuery()`
  > `URLService.setQuery()` will be removed in View 1.5.0.
  • Loading branch information...
JoshEllinger committed Feb 21, 2017
1 parent 4e29251 commit e8e1924d01fc7f200202a269efac6db9d3dc50e9
Showing with 856 additions and 475 deletions.
  1. +7 −13 .eslintrc.js
  2. +1 −0 .gitignore
  3. +1 −0 .nvmrc
  4. +27 −3 CHANGELOG.md
  5. +11 −5 FUSION_CONFIG.sample.js
  6. +1 −1 README.md
  7. +6 −4 bower.json
  8. +5 −2 client/assets/components/document/document_EXAMPLE/document_EXAMPLE.html
  9. +19 −2 client/assets/components/document/document_EXAMPLE/document_EXAMPLE.js
  10. +8 −9 client/assets/components/document/document_default/document_default.html
  11. +34 −21 client/assets/components/document/document_default/document_default.js
  12. +11 −11 client/assets/components/document/document_file/document_file.html
  13. +10 −6 client/assets/components/document/document_file/document_file.js
  14. +12 −12 client/assets/components/document/document_jira/contentTypes/jiraIssue.html
  15. +7 −18 client/assets/components/document/document_jira/contentTypes/jiraIssue.js
  16. +15 −16 client/assets/components/document/document_jira/contentTypes/jiraProject.html
  17. +7 −21 client/assets/components/document/document_jira/contentTypes/jiraProject.js
  18. +10 −14 client/assets/components/document/document_jira/document_jira.js
  19. +10 −10 client/assets/components/document/document_slack/document_slack.html
  20. +19 −15 client/assets/components/document/document_slack/document_slack.js
  21. +7 −5 client/assets/components/document/document_twitter/document_twitter.html
  22. +15 −14 client/assets/components/document/document_twitter/document_twitter.js
  23. +17 −17 client/assets/components/document/document_web/document_web.html
  24. +23 −14 client/assets/components/document/document_web/document_web.js
  25. +13 −1 client/assets/components/documentList/documentList.html
  26. +14 −9 client/assets/components/documentList/documentList.js
  27. +1 −0 client/assets/components/facetField/facetField.scss
  28. +2 −2 client/assets/components/facetField/facetFieldDirective.js
  29. +1 −1 client/assets/components/facetList/facetList.html
  30. +5 −3 client/assets/components/facetList/facetList.js
  31. +4 −0 client/assets/components/facetList/facetList.scss
  32. +3 −3 client/assets/components/facetRange/facetRange.html
  33. +2 −2 client/assets/components/facetRange/facetRange.js
  34. +0 −1 client/assets/components/facetRange/facetRange.scss
  35. +67 −78 client/assets/components/facetRange/facetRangeDirective.js
  36. +112 −0 client/assets/components/facetRange/facetRangeService.js
  37. +1 −2 client/assets/components/field/field.js
  38. +7 −2 client/assets/components/login/login.js
  39. +2 −2 client/assets/components/paginate/paginateDirective.js
  40. +43 −29 client/assets/components/searchBox/_searchBox.scss
  41. +9 −14 client/assets/components/searchBox/searchBox.html
  42. +1 −2 client/assets/components/searchBox/searchBox.js
  43. +82 −22 client/assets/components/searchBox/searchBoxDirective.js
  44. +3 −3 client/assets/components/sort/sort.js
  45. +1 −0 client/assets/js/app.js
  46. +20 −8 client/assets/js/controllers/HomeController.js
  47. +10 −5 client/assets/js/services/AuthInterceptor.js
  48. +16 −5 client/assets/js/services/ConfigService.js
  49. +76 −0 client/assets/js/services/DocumentService.js
  50. +1 −1 client/assets/js/services/LocalParamService.js
  51. +1 −1 client/assets/js/services/QueryDataService.js
  52. +7 −11 client/assets/js/services/QueryService.js
  53. +30 −13 client/assets/js/services/URLService.js
  54. +1 −0 client/assets/js/services/services.js
  55. +15 −1 client/assets/scss/app.scss
  56. +1 −1 client/templates/home.html
  57. +3 −3 client/templates/home_main-content-frame.html
  58. +1 −1 client/templates/login.html
  59. +1 −1 gulp/package.js
  60. +2 −2 gulp/sass.js
  61. +1 −1 gulp/watch.js
  62. +1 −2 gulpfile.js
  63. +10 −9 package.json
  64. +1 −1 tests/assets/js/services/URLServiceTest.js
  65. +2 −0 win64/installer/Lucidworks View Windows Installer Creation Guide.md
View
@@ -1,24 +1,18 @@
/*eslint-disable */
module.exports = {
"rules": {
- "indent": [
- 2,
- 2
- ],
- "quotes": [
- 2,
- "single"
- ],
+ "indent": ["error", 2, {"SwitchCase": 1 }],
+ "quotes": [ "error", "single"],
"linebreak-style": [
- 2,
+ "error",
"unix"
],
"semi": [
- 2,
- "always"
+ "error",
+ "always"
],
- "no-extra-semi": 1, // disallow unnecessary semicolons
- "no-inner-declarations": 2, // disallow function or variable declarations in nested blocks
+ "no-extra-semi": "warn", // disallow unnecessary semicolons
+ "no-inner-declarations": "error", // disallow function or variable declarations in nested blocks
},
"extends": [
"eslint:recommended"
View
@@ -14,4 +14,5 @@ FUSION_CONFIG.*.js
!FUSION_CONFIG.sample.js
.jira-prefix
.project
+.vscode
installer/Output
View
1 .nvmrc
@@ -0,0 +1 @@
+5.2.0
View
@@ -1,6 +1,30 @@
# CHANGELOG
-## 1.3.0 - Pikachu's Invisible Tiara
+## 1.4.0 - Ra Ra Rasputin's Disco Tiara
+**New Features**
+* Now works out of the box with Fusion 3
+* Added support for changing the default query via FUSION_CONFIG.js
+* Added support for date range facets type
+* Added support for simple grouped results
+* New loading state for range facets to prevent multiple selections while page is loading
+
+**Bug Fixes**
+* When redirected through login, inital page query will no longer be cleared
+* Linked URLS with parameters now click through correctly
+* Only show pagination arrows when pagination is possible
+* Fixed typeahead autocomplete user entry race condition
+
+**Package Updates**
+* Updated ESLint to version 3.3.1.
+* Updated angular-ui-router to version 0.4.2
+
+**Deprecated API functions**
+* URLService.setQuery()
+
+ Instead of using `URLService.setQuery()` use `QueryService.setQuery()`
+ > `URLService.setQuery()` will be removed in View 1.5.0.
+
+## 1.3.0 - Pikachu's Invisible Tiara - August 5, 2016
**New Features**
* Added a Windows packaged build, you can now run View on Windows
* Improved performance by minifying builds by default and turning off page change animations
@@ -13,8 +37,8 @@
## 1.2.0 - Cersei's Iron Tiara - June 30, 2016
**New Features**
* Now support range facet type
-* Add multi select faceting, meaning you can facet on multiple items within a single query
-* Add 'clear all' button to facet lists, clearing all selected facets
+* Added multi select faceting, meaning you can facet on multiple items within a single query
+* Added 'clear all' button to facet lists, clearing all selected facets
* Improved signals now pass in more information including position, language, and platform
* Enhanced signals service, adding additional functionality
* Improved field display in templates by setting set max-length
View
@@ -55,13 +55,13 @@ appConfig = { //eslint-disable-line
// password: 'search-user-password-here'
},
- // The name of your collection
- collection: 'MyCollection',
+ // The name of your collection - defaults to Fusion 3.0 default collection
+ collection: 'default',
// Please specify a pipeline or profile that you want to leverage with this UI.
query_pipeline_id: 'default',
query_profile_id: 'default',
- use_query_profile: true, // Force use of query-profile
+ use_query_profile: false, // Force use of query-profile
// Search UI Title
// This title appears in a number of places in the app, including page title.
@@ -191,7 +191,7 @@ appConfig = { //eslint-disable-line
* Typeahead or autocomplete shows you a number of suggested queries as you
* type in the search box.
*/
- typeahead_use_query_profile: true,
+ typeahead_use_query_profile: false,
typeahead_query_pipeline_id: 'default',
typeahead_query_profile_id: 'default',
typeahead_fields: ['id'],
@@ -201,6 +201,12 @@ appConfig = { //eslint-disable-line
// @see https://lucidworks.com/blog/2016/02/04/fusion-plus-solr-suggesters-search-less-typing/
//typeahead_requesthandler: 'suggest', // recommended (requires configuration)
- typeahead_requesthandler: 'select'
+ typeahead_requesthandler: 'select',
+ /**
+ * Default query
+ *
+ * If there is no query provided in the URL this query will be used. It is in object form.
+ */
+ default_query: {q:'*'}
};
View
@@ -112,7 +112,7 @@ Search results from different document types can use different templates. The `
## View on Windows
- Download the latest view installer from <https://lucidworks.com/products/view> and run it **as an administrator**.
+ Download the latest view installer from <https://github.com/lucidworks/lucidworks-view/releases> and run it **as an administrator**.
## What's Next
View
@@ -1,6 +1,6 @@
{
"name": "lucidworks-view",
- "version": "1.3.0",
+ "version": "1.4.0",
"authors": [
"Lucidworks"
],
@@ -25,15 +25,17 @@
"foundation-apps": "~1.2.0",
"lodash": "https://github.com/lodash/lodash.git",
"ng-orwell": "~1.1.2",
- "angucomplete-alt": "~2.2.0",
"angular-sanitize": "~1.4.10",
"angular-rison": "~0.0.13",
- "angularjs-humanize": "master"
+ "angularjs-humanize": "master",
+ "angular-mass-autocomplete": "^0.5.0",
+ "angular-ui-router": "~0.4.2"
},
"devDependencies": {
"angular-mocks": "~1.4.10"
},
"resolutions": {
- "angular": "1.3.x - 1.4.x"
+ "angular": "1.3.x - 1.4.x",
+ "angular-ui-router": "^0.4.2"
}
}
@@ -1,9 +1,12 @@
<article class="grid-block document row">
<div class="detail vertical grid-content">
<h3 class="subheader">
- <field value="vm.doc.id" maxlength="200"></field>
+ <field value="vm.doc._templateDisplayFields.id" maxlength="200"></field>
</h3>
<!-- Add your fields here. -->
- </div>
+ <!-- Field with highlight. -->
+ <p class="large-8 xlarge-7 xx-large-6">
+ <field value="::vm.doc._templateDisplayFields.body" highlight="::vm.highlight[doc._templateDisplayFields.id]" hkey="{{::vm.getTemplateDisplayFieldName('body')}}"></field>
+ </p>
</div>
</article>
@@ -23,14 +23,31 @@
}
- function Controller(SignalsService) {
+ function Controller(DocumentService) {
'ngInject';
var vm = this;
+ var templateFields = Object.keys(vm.doc);
+ vm.getTemplateDisplayFieldName = getTemplateDisplayFieldName;
activate();
function activate() {
- vm.postSignal = SignalsService.postClickSignal;
+ vm.doc = processDocument(vm.doc);
+ }
+
+ function processDocument(doc) {
+ //set properties needed for display
+ doc._templateDisplayFields = DocumentService.setTemplateDisplayFields(doc, templateFields);
+ doc._templateDisplayFields._lw_id_decoded = DocumentService.decodeFieldValue(doc._templateDisplayFields, 'id');
+
+ //set properties needed for signals
+ doc._signals = DocumentService.setSignalsProperties(doc, vm.position);
+
+ return doc;
+ }
+
+ function getTemplateDisplayFieldName(field){
+ return DocumentService.getTemplateDisplayFieldName(vm.doc, field);
}
}
})();
@@ -27,24 +27,23 @@ <h5>categories:</h5>
every category in that result.
-->
<article class="grid-block document row">
- <div class="image small-4 medium-2 grid-content" ng-class="::{hide:!vm.doc.lw_image}">
+ <div class="image small-4 medium-2 grid-content" ng-class="::{hide:!vm.doc.lw_image.value}">
<div zf-interchange="">
- <img media="small" ng-src="{{::vm.doc.lw_image}}">
+ <img media="small" ng-src="{{::vm.doc.lw_image.value}}">
</div>
</div>
- <div class="detail vertical grid-content" ng-class="::{'small-8':vm.doc.lw_image, 'medium-10': vm.doc.lw_image, 'small-12':!vm.doc.lw_image}">
+ <div class="detail vertical grid-content" ng-class="::{'small-8':vm.doc.lw_image.value, 'medium-10': vm.doc.lw_image.value, 'small-12':!vm.doc.lw_image.value}">
<!-- {{vm.doc}} -->
<!-- show head field linked with a url. -->
- <h3 class="head-field" ng-if="::vm.doc.lw_url">
- <a ng-href="{{::vm.doc.lw_url}}" ng-click="vm.postSignal({params: {lw_url: vm.doc.lw_url}})" rel="noopener" target="_blank">{{::vm.doc.lw_head}}</a>
-
+ <h3 class="head-field" ng-if="::vm.doc.lw_url.value">
+ <a ng-href="{{::vm.doc.lw_url.value}}" ng-click="vm.postSignal({params: {lw_url: vm.doc.lw_url.value}})" rel="noopener" target="_blank"><field value="::vm.doc.lw_head.value" hkey="{{::vm.doc.lw_head.key}}"></field></a>
</h3>
<!-- show head field without a url. -->
- <h3 class="head-field" ng-if="::(!vm.doc.lw_url)">{{::vm.doc.lw_head}}</h3>
+ <h3 class="head-field" ng-if="::(!vm.doc.lw_url.value)"><field value="::vm.doc.lw_head.value" hkey="{{::vm.doc.lw_head.key}}"></field></h3>
- <h4 class="subheader">{{::vm.doc.lw_subhead}}</h4>
+ <h4 class="subheader"><field value="::vm.doc.lw_subhead.value" hkey="{{::vm.doc.lw_subhead.key}}"></field></h4>
<p class="large-8 xlarge-7 xx-large-6">
- {{::vm.doc.lw_description}}
+ <field value="::vm.doc.lw_description.value" highlight="::vm.highlight[doc.id]" maxlength="450" hkey="{{::vm.doc.lw_description.key}}"></field>
</p>
<!-- Output of CONFIG BASED FIELD DISPLAY -->
<p ng-repeat="(field, value) in vm.doc.fieldsToDisplay">
@@ -1,8 +1,8 @@
(function () {
angular.module('lucidworksView.components.document', ['lucidworksView.services.config',
- 'lucidworksView.utils.docs', 'lucidworksView.services.signals'
- ])
- .directive('documentDefault', documentDefault);
+ 'lucidworksView.utils.docs', 'lucidworksView.services.signals'
+ ])
+ .directive('documentDefault', documentDefault);
function documentDefault() {
@@ -21,17 +21,22 @@
};
}
- function Controller($log, $scope, DocsHelper, ConfigService, SignalsService, PaginateService) {
+ function Controller($log, $scope, DocsHelper, ConfigService, SignalsService, PaginateService, DocumentService) {
'ngInject';
var vm = this;
vm.postSignal = postSignal;
+ var templateFields = [];
+ var specialFields = ['head', 'subhead', 'description', 'image', 'head_url'];
activate();
///////////
function activate() {
vm.doc = processDocument(DocsHelper.concatMultivaluedFields(vm.doc));
+ _.forEach(specialFields, function(fieldType) {
+ templateFields.push(ConfigService.getFields.get(fieldType));
+ });
}
/**
@@ -53,20 +58,32 @@
ConfigService.getFieldLabels()
);
- doc.lw_head = getField('head', doc) ?
- getField('head', doc) : 'Title Field Not Found';
+ doc.lw_head = {
+ key: getTemplateDisplayFieldName(ConfigService.getFields.get('head')),
+ value: getField('head', doc) ? getField('head', doc) : 'Title Field Not Found'
+ };
- doc.lw_subhead = getField('subhead', doc);
+ doc.lw_subhead = {
+ key: getTemplateDisplayFieldName(ConfigService.getFields.get('subhead')),
+ value: getField('subhead', doc)
+ };
- doc.lw_description = getField('description', doc);
+ doc.lw_description = {
+ key: getTemplateDisplayFieldName(ConfigService.getFields.get('description')),
+ value: getField('description', doc)
+ };
- doc.lw_image = getField('image', doc);
+ doc.lw_image = {
+ key: getTemplateDisplayFieldName(ConfigService.getFields.get('image')),
+ value: getField('image', doc) ? DocumentService.decodeFieldValue(doc, ConfigService.getFields.get('image')) : null
+ };
- doc.lw_url = getField('head_url', doc);
+ doc.lw_url = {
+ key: getTemplateDisplayFieldName(ConfigService.getFields.get('head_url')),
+ value: getField('head_url', doc) ? DocumentService.decodeFieldValue(doc, ConfigService.getFields.get('head_url')) : null
+ };
- doc.__signals_doc_id__ = SignalsService.getSignalsDocumentId(doc);
- doc.position = vm.position;
- doc.page = PaginateService.getNormalizedCurrentPage();
+ doc._signals = DocumentService.setSignalsProperties(doc, vm.position);
return doc;
}
@@ -86,15 +103,11 @@
}
function postSignal(options){
- var paramsObj = {
- params: {
- position: vm.doc.position,
- page: vm.doc.page
- }
- };
- _.defaultsDeep(paramsObj, options);
- SignalsService.postClickSignal(vm.doc.__signals_doc_id__, paramsObj);
+ DocumentService.postSignal(vm.doc._signals, options);
}
+ function getTemplateDisplayFieldName(field){
+ return DocumentService.getTemplateDisplayFieldName(vm.doc, field);
+ }
}
})();
@@ -1,20 +1,20 @@
<article class="grid-block document document-file row">
<div class="detail vertical grid-content">
- <field class="subheader" value="::vm.doc.id" maxlength="200"></field>
+ <field class="subheader" value="::vm.doc._templateDisplayFields.id" maxlength="200"></field>
<div class="large-8 xlarge-7 xx-large-6">
- <div class="size" ng-if="::vm.doc.length_l">
- <span class="doc-label">size:</span> <field value="::vm.doc.length_lFormatted"></field>
+ <div class="size" ng-if="::vm.doc._templateDisplayFields.length">
+ <span class="doc-label">size:</span> <field value="::vm.doc._templateDisplayFields.length | humanizeFilesize"></field>
</div>
- <div class="mimetype" ng-if="::vm.doc.mimeType_s">
- <span class="doc-label">mimetype:</span> <field value="::vm.doc.mimeType_s" highlight="::vm.highlight[doc.id]" maxlength="200"
- hkey="mimeType_s"></field>
+ <div class="mimetype" ng-if="::vm.doc._templateDisplayFields.mimeType">
+ <span class="doc-label">mimetype:</span> <field value="::vm.doc._templateDisplayFields.mimeType" highlight="::vm.highlight[doc._templateDisplayFields.id]" maxlength="200"
+ hkey="{{::vm.getTemplateDisplayFieldName('mimeType')}}"></field>
</div>
- <div class="owner" ng-if="::vm.doc.owner_s">
- <span class="doc-label">owner:</span> <field value="::vm.doc.owner_s" highlight="::vm.highlight[doc.id]" maxlength="200"
- hkey="owner_s"></field>
+ <div class="owner" ng-if="::vm.doc._templateDisplayFields.owner">
+ <span class="doc-label">owner:</span> <field value="::vm.doc._templateDisplayFields.owner" highlight="::vm.highlight[doc._templateDisplayFields.id]" maxlength="200"
+ hkey="{{::vm.getTemplateDisplayFieldName('owner')}}"></field>
</div>
- <div class="last-modified" ng-if="::vm.doc.lastModified_dt">
- <span class="doc-label">last modified:</span> <field value="::vm.doc.lastModified_dtFormatted"></field> UTC
+ <div class="last-modified" ng-if="::vm.doc._templateDisplayFields.lastModified">
+ <span class="doc-label">last modified:</span> <field value="::vm.doc._templateDisplayFields.lastModified | date"></field> UTC
</div>
</div>
Oops, something went wrong.

0 comments on commit e8e1924

Please sign in to comment.