-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsearch-fields-dialog.html
1876 lines (1694 loc) · 60.3 KB
/
search-fields-dialog.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!--
Copyright 2017 Next Century Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../polymer-fontawesome-iconset/fa-all.html">
<link rel="import" href="../auto-paginated-image-gallery/auto-paginated-image-gallery.html">
<link rel="import" href="../button-action/button-action.html">
<link rel="import" href="../image-gallery/image-gallery.html">
<link rel="import" href="../iron-flex-layout/iron-flex-layout-classes.html">
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../paper-styles/color.html">
<link rel="import" href="../search-image-gallery/search-image-gallery.html">
<link rel="import" href="../styled-dialog/styled-dialog.html">
<link rel="import" href="../styled-dialog/styled-dialog-styles.html">
<link rel="import" href="../stylized-icon/stylized-icon.html">
<link rel="import" href="../vaadin-date-picker-display/vaadin-date-picker-display.html">
<link rel="import" href="../vaadin-upload/vaadin-upload.html">
<!--
A Polymer Element showing search fields in a configurable styled dialog.
### Example
```html
<search-fields-dialog
date-config='{"dateStart": "postingDate", "dateEnd": "postingDate"}'
search-fields-config="[[searchFieldsConfig]]"
search-parameters="{{searchParameters}}"
process-request="{{processRequest}}">
</search-fields-dialog>
```
@demo demo/index.html
-->
<dom-module id="search-fields-dialog">
<template>
<style include="iron-flex iron-flex-alignment"></style>
<style include="styled-dialog-styles"></style>
<style>
:host {
display: block;
@apply --layout-horizontal;
}
stylized-icon {
--stylized-icon-mixin: {
padding: 0 5px;
}
}
[slot="top"] {
margin-bottom: 10px;
}
.header > button-action {
margin: 5px 10px;
}
.footer {
margin-top: 10px;
}
#searchDialog {
--styled-dialog-min-width: 940px;
--styled-dialog-max-width: 940px;
--styled-dialog-style-mixin: {
max-width: 980px;
min-width: 980px;
overflow: auto;
};
--styled-dialog-inside-style-mixin: {
overflow: none;
};
}
#searchDialog.backdrop {
--styled-dialog-style-mixin: {
max-width: 980px;
min-width: 980px;
opacity: 0.6;
overflow: auto;
};
}
.images-name,
.search-name {
font-size: 14px;
font-weight: 500;
max-width: var(--styled-dialog-label-width, 100px);
min-width: var(--styled-dialog-label-width, 100px);
overflow: hidden;
text-align: end;
text-overflow: ellipsis;
}
.images-name {
padding-top: 20px;
}
.search-name {
/* Vertically align the label with their paper-input-containers. */
padding-top: 20px;
}
.search-data {
margin-left: 10px;
}
vaadin-date-picker-display {
display: inline-block;
width: 360px;
--date-picker-style-mixin: {
padding-bottom: 0;
};
}
paper-input {
padding-bottom: 1px;
width: 100%;
--paper-input-container-color: var(--paper-grey-600);
--paper-input-container-input-color: var(--paper-grey-900);
--paper-input-container-focus-color: var(--paper-grey-900);
--paper-input-container: {
padding: 0;
};
--paper-input-container-input: {
display: block;
font-size: 14px;
font-weight: 500;
height: 20px;
line-height: 20px;
padding: 1px 0;
};
--paper-input-container-label: {
font-size: 14px;
font-weight: 500;
height: 20px;
line-height: 20px;
};
}
.search-data paper-input {
--paper-input-container: {
padding: 0;
width: 360px;
}
}
.search-data paper-input.one-icon {
--paper-input-container: {
padding: 0;
width: 330px;
}
}
.search-data paper-input.two-icon {
--paper-input-container: {
padding: 0;
width: 300px;
}
}
.selected {
background-color: var(--paper-grey-100);
}
.hovering {
background-color: yellow;
}
auto-paginated-image-gallery {
--auto-paginated-image-gallery-hovering-color: yellow;
--auto-paginated-image-gallery-selected-color: var(--paper-grey-100);
--auto-paginated-image-gallery-max-height: none;
--auto-paginated-image-gallery-show-more-button: {
margin-top: 10px;
};
}
image-gallery,
search-image-gallery {
--image-gallery-hovering-color: yellow;
--image-gallery-selected-color: var(--paper-grey-100);
}
search-image-gallery {
margin: 15px 0 0 20px;
}
image-gallery.input-gallery {
margin-right: 10px;
/* Max Height = 1 Row of Images */
max-height: 160px;
overflow: auto;
}
.link-data {
margin: 10px;
}
vaadin-upload {
margin: 10px;
padding: 10px;
--vaadin-upload-file-list: {
display: none;
};
}
.search-data icon-button {
--icon-button-mixin: {
/* Vertically align the icons with their label & paper-input-containers. */
margin-top: 15px;
};
}
.search-data stylized-icon {
--stylized-icon-mixin: {
/* Vertically align the icons with their label & paper-input-containers. */
margin-top: 15px;
padding: 5px 10px 0;
};
}
#helpDialog {
--styled-dialog-min-width: 0;
--styled-dialog-max-width: 800px;
}
.help-text {
color: var(--paper-grey-900);
font-size: 16px;
line-height: 18px;
min-height: 18px;
}
.help-text > div {
margin-left: 10px;
}
</style>
<styled-dialog id="searchDialog" class$="[[_isBackdrop(_openedDialogHelp, _openedDialogImages)]]" fill modal opened="{{opened}}">
<div slot="top" class="layout horizontal center center-justified header">
<button-action icon="fa:search" text="Search" title="Run Search" on-tap="handleSearch"></button-action>
<button-action icon="fa:question" text="Help" title="Open Help" on-tap="openHelp"></button-action>
<template is="dom-if" if="[[!hideImages]]">
<button-action icon="fa:picture-o" text="Images" title="View Images" on-tap="openImages"></button-action>
</template>
<button-action active="[[_showAdvanced]]" icon="fa:flask" text="Advanced" title="Toggle Advanced Options" on-tap="toggleShowAdvanced"></button-action>
<button-action icon="fa:trash" text="Clear" title="Clear All Terms" on-tap="removeAllSearchTerms"></button-action>
<button-action icon="fa:times" text="Cancel" title="Cancel Search" on-tap="cancelSearch"></button-action>
</div>
<template is="dom-repeat" items="[[_searchFields]]" as="dialogConfig">
<div class="layout horizontal" style="margin-bottom: 0;">
<template is="dom-if" if="[[dialogConfig.isDate]]">
<div class="search-name">[[dialogConfig.name]]</div>
<template is="dom-repeat" items="[[dialogConfig.data]]" as="searchConfig">
<div class="layout horizontal search-data nowrap">
<stylized-icon icon="[[searchConfig.icon]]" style-class="[[searchConfig.styleClass]]"></stylized-icon>
<vaadin-date-picker-display
facet-key="value"
facets="{{searchConfig}}"
key="[[searchConfig.key]]"
category="[[searchConfig.title]]">
</vaadin-date-picker-display>
</div>
</template>
</template>
<template is="dom-if" if="[[!dialogConfig.isDate]]">
<template is="dom-if" if="[[dialogConfig.isImage]]">
<div class="images-name">[[dialogConfig.name]]</div>
<div class="layout vertical">
<template is="dom-repeat" items="[[dialogConfig.data]]" as="searchConfig">
<search-image-gallery
large-image-style-class="[[largeImageStyleClass]]"
small-image-style-class="[[smallImageStyleClass]]"
excluded="{{searchConfig.excluded}}"
images="{{searchConfig.images}}"
required="{{searchConfig.required}}"
selected="{{searchConfig.selected}}"
union="{{searchConfig.union}}">
</search-image-gallery>
</template>
</div>
</template>
<template is="dom-if" if="[[!dialogConfig.isImage]]">
<div class="search-name">[[dialogConfig.name]]</div>
<div class="layout horizontal wrap">
<template is="dom-repeat" items="[[dialogConfig.data]]" as="searchConfig">
<div class="layout horizontal nowrap search-data">
<stylized-icon icon="[[searchConfig.icon]]" style-class="[[searchConfig.styleClass]]"></stylized-icon>
<paper-input
class$="[[_getInputWidthStyleClass(searchConfig.enableNetworkExpansion, _showAdvanced)]]"
id$="input_[[searchConfig.key]]"
label="[[searchConfig.title]]"
value="{{searchConfig.value}}"
on-keyup="_didUserHitEnterKey">
</paper-input>
<template is="dom-if" if="[[_showAdvanced]]">
<div class="layout horizontal">
<template is="dom-if" if="[[searchConfig.enableNetworkExpansion]]">
<icon-button
active="[[_getNetworkExpansionButtonActiveStatus(searchConfig.activateNetworkExpansion, _isNetworkExpansionViable)]]"
bigger
class="network-expansion-icon"
icon="fa:arrows-alt"
padded
title-tooltip="Toggle Network Expansion of [[searchConfig.title]] (Currently [[_getButtonText(searchConfig.activateNetworkExpansion)]])"
on-tap="_toggleNetworkExpansion">
</icon-button>
</template>
<icon-button
active="[[searchConfig.requireOne]]"
bigger
class="require-one-icon"
icon="fa:asterisk"
padded
title-tooltip="Require at Least One Term from [[searchConfig.title]] (Currently [[_getButtonText(searchConfig.requireOne)]])"
on-tap="_toggleRequireOne">
</icon-button>
</div>
</template>
</div>
</template>
</div>
</template>
</template>
</div>
</template>
<template is="dom-if" if="[[!hideImages]]">
<div slot="bottom" class="footer">
<div class="layout horizontal link-data">
<paper-input
no-label-float
placeholder="Enter or Paste Image Links"
value="{{_linksInput}}"
on-keyup="_didUserHitEnterKeyOnLinksInput">
</paper-input>
<icon-button
active="[[_linksInput]]"
bigger
disabled="[[!_linksInput]]"
icon="fa:plus-circle"
title-tooltip="Add Image Links"
padded
on-tap="_handleLinksInput">
</icon-button>
</div>
<vaadin-upload
accept="image/*"
files="{{_uploadedFiles}}"
method="POST"
target="[[imageUploadUrl]]"
on-upload-success="_handleImageFileUploadSuccess">
</vaadin-upload>
</div>
</template>
</styled-dialog>
<styled-dialog id="helpDialog" header="Search Help" opened="{{_openedDialogHelp}}">
<div class="help-text">
Enter words or phrases as <strong>search terms</strong> in one or more text fields.
Use <strong>commas</strong> to separate search terms.
</div>
<div class="help-text">
A phrase of multiple words (without commas) is treated as a <strong>single</strong> search term (no quotation marks needed).
</div>
<div class="help-text">
For any term, use a <strong>plus</strong> (<strong>+</strong>) to mark a <strong>required</strong> search term and a
<strong>minus</strong> (<strong>-</strong>) to mark an <strong>excluded</strong> search term.
</div>
<div class="help-text">
<span class="styled-dialog-right-space">Example:</span>
<strong>+New York, New Jersey, -New Hampshire</strong>
</div>
<div class="help-text">
For any number, use a <strong>greater than</strong> (<strong>></strong>) to mark a search term as a <strong>lower bound</strong>
and a <strong>less than</strong> (<strong><</strong>) to mark a search term as an <strong>upper bound</strong>.
All search results must have a term within that bounds.
</div>
<div class="help-text">
<span class="styled-dialog-right-space">Example:</span>
<strong>>18, <21</strong>
</div>
<div class="help-text">
Click the <strong>SEARCH</strong> button or press the <strong>ENTER</strong> key to run the search.
Click the <strong>RESET</strong> button to clear all terms.
</div>
<div class="help-text">
Click the <strong>IMAGES</strong> button to show your uploaded images and image matches.
</div>
<div class="help-text">
Click the <strong>ADVANCED</strong> button to show <strong>required grouping</strong> and <strong>network expansion</strong> options.
</div>
<div class="styled-dialog-divider"></div>
<div class="help-text layout horizontal center">
<stylized-icon active bigger class="require-one-icon" icon="fa:asterisk"></stylized-icon>
<div>
Click the <strong>asterisk</strong> button to activate a <strong>required grouping</strong> on all the search terms of a field.
Search results must match <strong>at least one term from all required groupings</strong>.
Terms marked as required (+) or excluded (-) are not included in the required grouping.
This is helpful if you don't need to match multiple search terms simultaneously.
For example, to find matches for any of the suburbs of New York City, you can activate a required grouping on the
<strong>City</strong> field with the search terms <strong>New York, Bronx, Brooklyn, Manhattan, Queens</strong>.
</div>
</div>
<div class="styled-dialog-divider"></div>
<div class="help-text layout horizontal center">
<stylized-icon active bigger class="network-expansion-icon" icon="fa:arrows-alt"></stylized-icon>
<div class="layout vertical">
<div>
Click the <strong>expand</strong> button to activate <strong>network expansion</strong> on a field and run a <strong>multi-stage search</strong>:
first, DIG finds results that match the search terms like normal;
next, DIG finds results that match the terms in the network expansion fields from the results of the first search;
then, DIG shows the combined results.
</div>
<div style="margin-top: 10px;">
Network expansion will only work if one or more network expansion fields have one or more search terms.
Please note that it may take a minute or more to run a search with network expansion activated.
</div>
</div>
</div>
</styled-dialog>
<styled-dialog id="imagesDialog" fill header="Your Image Links and Uploaded Image Files" opened="{{_openedDialogImages}}">
<div slot="top" class="styled-dialog-text">Click the check icon next to an image to see the image matches from the DIG data.</div>
<image-gallery
slot="top"
class="input-gallery"
large-image-style-class="[[largeImageStyleClass]]"
select-word="View"
unselect-word="Viewing"
show-delete
show-labels
show-select
small-image-style-class="[[smallImageStyleClass]]"
image-name-property="id"
images="{{images}}"
processing="[[imagesProcessing]]"
selected="{{_imagesSelected}}">
</image-gallery>
<div slot="top" class="styled-dialog-note">
<strong>How does it work?</strong>
Image matches are found by looking at the features in the image like faces, physical characteristics, hairstyle, dress, environment, and pose. Better matches are shown first in the gallery. To learn more, please visit <a href="http://www.ee.columbia.edu/ln/dvmm/memex/" target="_blank">here</a>.
</div>
<div slot="top" class="styled-dialog-divider"></div>
<template is="dom-if" if="[[_imageResults.id]]">
<div slot="top" class="styled-dialog-bold styled-dialog-tall">[[_imageResults.images.length]] DIG Image Matches</div>
<div slot="top" class="styled-dialog-text">Click the check icon next to an image match to add it to your search.</div>
<auto-paginated-image-gallery
class="results-gallery"
large-image-style-class="[[largeImageStyleClass]]"
new-tab
page-size="100"
select-word="Add to Search"
unselect-word="Added to Search"
show-labels
show-select
show-select-preceding
small-image-style-class="[[smallImageStyleClass]]"
images="{{_imageResults.images}}"
selected="{{_imageResults.selected}}">
</auto-paginated-image-gallery>
</template>
<div slot="bottom" class="footer">
<div class="layout horizontal link-data">
<paper-input
no-label-float
placeholder="Enter or Paste Image Links"
value="{{_linksInput}}"
on-keyup="_didUserHitEnterKeyOnLinksInput">
</paper-input>
<icon-button
active="[[_linksInput]]"
bigger
disabled="[[!_linksInput]]"
icon="fa:plus-circle"
title-tooltip="Add Image Links"
padded
on-tap="_handleLinksInput">
</icon-button>
</div>
<vaadin-upload
accept="image/*"
files="{{_uploadedFiles}}"
method="POST"
target="[[imageUploadUrl]]"
on-upload-success="_handleImageFileUploadSuccess">
</vaadin-upload>
</div>
</styled-dialog>
</template>
<script>
(function() {
/* globals _ */
'use strict';
Polymer({
is: 'search-fields-dialog',
properties: {
/**
* (Optional)
*
* A function that returns whether all the search parameters in the given object are disabled (or empty).
*
* @type {Object}
* @default function
*/
areSearchParametersDisabled: {
type: Object,
value: function() {
return function(searchParameters) {
return _.keys(searchParameters).every(function(type) {
if(_.isEmpty(searchParameters[type])) {
return true;
}
return _.keys(searchParameters[type]).every(function(term) {
return !searchParameters[type][term].enabled;
});
});
};
}
},
/**
* (Optional)
*
* A function that transforms search parameter data into a search parameter object.
*
* @type {Object}
* @default function(category, enabled, key, text, search, date) { return { category: category, date: date, enabled: enabled, key: key, search: search, text: text }; }
*/
buildSearchParameter: {
type: Object,
value: function() {
return function(category, enabled, key, text, search, date) {
return {
category: category,
date: date,
enabled: enabled,
key: key,
search: search,
text: text
};
};
}
},
/**
* (Output)
*
* Object containing the callbacks for the `search-fields-button` with properties `handleSearch` and `toggleDialog`.
*
* @type {Object}
*/
buttonCallbacks: {
notify: true,
type: Object,
value: function() {
var self = this;
return {
handleSearch: function(freeTextSearchFields, freeText) {
self.handleFreeTextSearch(freeTextSearchFields, freeText);
},
toggleDialog: function() {
self.toggleSearchFieldsDialog();
}
};
}
},
/**
* (Optional)
*
* The data property in the searchFieldsConfig.
*
* @type {String}
* @default 'data'
*/
dataProperty: {
type: String,
value: 'data'
},
/**
* (Optional)
*
* The icon property in the data in the searchFieldsConfig.
*
* @type {String}
* @default 'title'
*/
dataIconProperty: {
type: String,
value: 'icon'
},
/**
* (Optional)
*
* The key property in the data in the searchFieldsConfig.
*
* @type {String}
* @default 'key'
*/
dataKeyProperty: {
type: String,
value: 'key'
},
/**
* (Optional)
*
* The style class property in the data in the searchFieldsConfig.
*
* @type {String}
* @default 'title'
*/
dataStyleClassProperty: {
type: String,
value: 'styleClass'
},
/**
* (Optional)
*
* The title property in the data in the searchFieldsConfig.
*
* @type {String}
* @default 'title'
*/
dataTitleProperty: {
type: String,
value: 'title'
},
/**
* (Optional)
*
* The type property in the data in the searchFieldsConfig.
*
* @type {String}
* @default 'type'
*/
dataTypeProperty: {
type: String,
value: 'type'
},
/**
* (Optional)
*
* The keys of dates in the searchFieldsConfig mapped to the keys of dates in the searchParameters.
*
* @type {Object}
* @default {}
*/
dateConfig: {
type: Object,
value: function() {
return {};
}
},
/**
* (Optional)
*
* A function that transforms a search parameter object into an object with "enabled", "search", and "text" properties.
*
* @type {Object}
* @default function(searchParameter) { return { enabled: searchParameter.enabled, search: searchParameter.search, text: searchParameter.text }; }
*/
getSearchParameterData: {
type: Object,
value: function() {
return function(searchParameter) {
return {
enabled: searchParameter.enabled,
search: searchParameter.search,
text: searchParameter.text
};
};
}
},
/**
* (Optional)
*
* Whether to hide the image button and upload elements.
*
* @type {Boolean}
* @default false
*/
hideImages: {
type: Boolean,
value: false
},
/**
* (Output)
*
* The list of image objects (links and/or file data) added and/or uploaded by the user.
*
* @type {Array}
* @default []
*/
images: {
notify: true,
type: Array,
value: function() {
return [];
}
},
/**
* (Optional)
*
* The list of image IDs corresponding to each ID in `images` that is processing.
*
* @type {Array}
* @default []
*/
imagesProcessing: {
type: Array,
value: function() {
return [];
}
},
/**
* (Optional)
*
* The URL for the image uploads.
*
* @type {String}
* @default '/uploadImage'
*/
imageUploadUrl: {
type: String,
value: '/uploadImage'
},
/**
* (Optional)
*
* The prefix for the image URL for image field data.
*
* @type {String}
* @default ''
*/
imageUrlPrefix: {
type: String,
value: ''
},
/**
* (Optional)
*
* The suffix for the image URL for image field data.
*
* @type {String}
* @default ''
*/
imageUrlSuffix: {
type: String,
value: ''
},
/**
* (Optional)
*
* The style class for any image in a popup.
*
* @type {String}
* @default ''
*/
largeImageStyleClass: {
type: String,
value: ''
},
/**
* (Optional)
*
* The name property in the searchFieldsConfig.
*
* @type {String}
* @default 'name'
*/
nameProperty: {
type: String,
value: 'name'
},
/**
* (Optional|Output)
*
* The network expansion parameters passed in.
*
* @type {Object}
*/
networkExpansionParameters: {
type: Object,
notify: true
},
/**
* (Optional|Output)
*
* Whether the dialog is opened.
*
* @type {Boolean}
* @default false
*/
opened: {
notify: true,
observer: '_updateFocusedInput',
type: Boolean,
value: false
},
/**
* (Optional|Output)
*
* Whether to let queries run.
*
* @type {Boolean}
* @default false
*/
processRequest: {
notify: true,
type: Boolean,
value: false
},
/**
* (Required|Output)
*
* A list of objects that correspond to groupings of search fields.
*
* @type {Array}
*/
searchFieldsConfig: {
type: Array
},
/**
* (Required|Output)
*
* The search parameters created from the terms entered into the dialog.
*
* @type {Object}
*/
searchParameters: {
notify: true,
type: Object
},
/**
* (Optional)
*
* The style class for all the images in the galleries.
*
* @type {String}
* @default ''
*/
smallImageStyleClass: {
type: String,
value: ''
},
/**
* (Optional)
*
* The type property in the searchFieldsConfig.
*
* @type {String}
* @default 'type'
*/
typeProperty: {
type: String,
value: 'type'
},
/**
* An object containing the list of image results and the list of selected image IDs to be shown in the images dialog.
*
* @type {Object}
* @default {images:[],selected:[]}
* @private
*/
_imageResults: {
type: Object,
value: function() {
return {
images: [],
selected: []
};
}
},
/**
* The list of image IDs corresponding to each ID in `images` that is selected.
*
* @type {Array}
* @default []
* @private
*/
_imagesSelected: {
type: Array,
value: function() {
return [];
}
},
/**
* Whether network expansion is viable based on the fields and values.
*
* @type {Boolean}
* @default false
* @private
*/
_isNetworkExpansionViable: {
type: Boolean,
value: false
},
/**
* The image links entered by the user.
*
* @type {String}
* @default ''
* @private
*/
_linksInput: {
type: String,
value: ''
},
/**
* Whether the help dialog is opened.
*
* @type {Boolean}
* @default false
* @private
*/
_openedDialogHelp: {
observer: '_updateFocusedInput',
type: Boolean,
value: false
},
/**
* Whether the images dialog is opened.
*
* @type {Boolean}
* @default false
* @private
*/
_openedDialogImages: {
observer: '_updateFocusedInput',
type: Boolean,