@teipublisher/pb-components 1.30.4 → 1.32.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.
- package/CHANGELOG.md +40 -0
- package/css/leaflet/MarkerCluster.Default.css +60 -0
- package/css/leaflet/MarkerCluster.css +14 -0
- package/dist/demo/demos.json +3 -0
- package/dist/demo/pb-custom-form.html +61 -0
- package/dist/demo/pb-leaflet-map.html +9 -7
- package/dist/demo/pb-leaflet-map2.html +2 -2
- package/dist/demo/pb-leaflet-map3.html +3 -5
- package/dist/es-global-bridge-6abe3a88.js +5 -0
- package/dist/pb-components-bundle.js +126 -92
- package/dist/pb-elements.json +207 -5
- package/dist/pb-leaflet-map.js +4 -8
- package/lib/leaflet-src.js +14062 -0
- package/lib/leaflet.markercluster-src.js +2718 -0
- package/package.json +2 -1
- package/pb-elements.json +207 -5
- package/src/pb-components.js +1 -0
- package/src/pb-custom-form.js +49 -7
- package/src/pb-geolocation.js +18 -0
- package/src/pb-leaflet-map.js +113 -38
- package/src/pb-split-list.js +188 -0
package/dist/pb-elements.json
CHANGED
|
@@ -2249,8 +2249,13 @@
|
|
|
2249
2249
|
{
|
|
2250
2250
|
"name": "pb-custom-form",
|
|
2251
2251
|
"path": "./src/pb-custom-form.js",
|
|
2252
|
-
"description": "A custom form element which loads the actual form from a server-side script using AJAX.\nEmits
|
|
2252
|
+
"description": "A custom form element which loads the actual form from a server-side script using AJAX.\nEmits `pb-search-resubmit` and `pb-submit` events, signalling the receiver that it should\nrefresh.\n\nThe component is currently used to implement the additional search facets on the start and\nsearch result page. It can also be combined with `pb-split-list` to contain an additional form\nwith options.",
|
|
2253
2253
|
"attributes": [
|
|
2254
|
+
{
|
|
2255
|
+
"name": "auto-submit",
|
|
2256
|
+
"description": "Register event handlers on all inputs and submit the form\nautomatically if any of those changes. For button-like controls,\na submit is triggered on click, for text input on keyUp, and for\nall other form components on change.",
|
|
2257
|
+
"type": "string"
|
|
2258
|
+
},
|
|
2254
2259
|
{
|
|
2255
2260
|
"name": "url",
|
|
2256
2261
|
"description": "The URL for the AJAX request. If a relative URL is passed, it will be resolved\nagainst the current API endpoint.",
|
|
@@ -2345,6 +2350,12 @@
|
|
|
2345
2350
|
}
|
|
2346
2351
|
],
|
|
2347
2352
|
"properties": [
|
|
2353
|
+
{
|
|
2354
|
+
"name": "autoSubmit",
|
|
2355
|
+
"attribute": "auto-submit",
|
|
2356
|
+
"description": "Register event handlers on all inputs and submit the form\nautomatically if any of those changes. For button-like controls,\na submit is triggered on click, for text input on keyUp, and for\nall other form components on change.",
|
|
2357
|
+
"type": "string"
|
|
2358
|
+
},
|
|
2348
2359
|
{
|
|
2349
2360
|
"name": "url",
|
|
2350
2361
|
"attribute": "url",
|
|
@@ -2466,7 +2477,16 @@
|
|
|
2466
2477
|
],
|
|
2467
2478
|
"events": [
|
|
2468
2479
|
{
|
|
2469
|
-
"name": "pb-custom-form-loaded"
|
|
2480
|
+
"name": "pb-custom-form-loaded",
|
|
2481
|
+
"description": "Fired before the element updates its content"
|
|
2482
|
+
},
|
|
2483
|
+
{
|
|
2484
|
+
"name": "pb-search-resubmit",
|
|
2485
|
+
"description": "Fired when the form is submitted"
|
|
2486
|
+
},
|
|
2487
|
+
{
|
|
2488
|
+
"name": "pb-submit",
|
|
2489
|
+
"description": "Fired when the form is submitted"
|
|
2470
2490
|
},
|
|
2471
2491
|
{
|
|
2472
2492
|
"name": "pb-start-update",
|
|
@@ -3735,14 +3755,21 @@
|
|
|
3735
3755
|
},
|
|
3736
3756
|
{
|
|
3737
3757
|
"name": "event",
|
|
3758
|
+
"description": "Name of the event which triggers a pb-geolocation event, e.g. 'click'.\nDefault is 'mouseover'.",
|
|
3738
3759
|
"type": "string",
|
|
3739
3760
|
"default": "\"mouseover\""
|
|
3740
3761
|
},
|
|
3741
3762
|
{
|
|
3742
3763
|
"name": "auto",
|
|
3764
|
+
"description": "If set, add location to a map automatically upon load by\nemitting an event. If not set, locations are only added when\nthe configured event is triggered.",
|
|
3743
3765
|
"type": "boolean",
|
|
3744
3766
|
"default": "false"
|
|
3745
3767
|
},
|
|
3768
|
+
{
|
|
3769
|
+
"name": "zoom",
|
|
3770
|
+
"description": "Zoom level to use for the map if it centers on the location.",
|
|
3771
|
+
"type": "number"
|
|
3772
|
+
},
|
|
3746
3773
|
{
|
|
3747
3774
|
"name": "key",
|
|
3748
3775
|
"description": "The key to which this element is connected.",
|
|
@@ -3821,15 +3848,23 @@
|
|
|
3821
3848
|
{
|
|
3822
3849
|
"name": "event",
|
|
3823
3850
|
"attribute": "event",
|
|
3851
|
+
"description": "Name of the event which triggers a pb-geolocation event, e.g. 'click'.\nDefault is 'mouseover'.",
|
|
3824
3852
|
"type": "string",
|
|
3825
3853
|
"default": "\"mouseover\""
|
|
3826
3854
|
},
|
|
3827
3855
|
{
|
|
3828
3856
|
"name": "auto",
|
|
3829
3857
|
"attribute": "auto",
|
|
3858
|
+
"description": "If set, add location to a map automatically upon load by\nemitting an event. If not set, locations are only added when\nthe configured event is triggered.",
|
|
3830
3859
|
"type": "boolean",
|
|
3831
3860
|
"default": "false"
|
|
3832
3861
|
},
|
|
3862
|
+
{
|
|
3863
|
+
"name": "zoom",
|
|
3864
|
+
"attribute": "zoom",
|
|
3865
|
+
"description": "Zoom level to use for the map if it centers on the location.",
|
|
3866
|
+
"type": "number"
|
|
3867
|
+
},
|
|
3833
3868
|
{
|
|
3834
3869
|
"name": "key",
|
|
3835
3870
|
"attribute": "key",
|
|
@@ -4558,6 +4593,23 @@
|
|
|
4558
4593
|
"type": "boolean",
|
|
4559
4594
|
"default": "false"
|
|
4560
4595
|
},
|
|
4596
|
+
{
|
|
4597
|
+
"name": "cluster",
|
|
4598
|
+
"description": "If set, combine markers into clusters if they are located too close together\nto display as single markers",
|
|
4599
|
+
"type": "boolean",
|
|
4600
|
+
"default": "false"
|
|
4601
|
+
},
|
|
4602
|
+
{
|
|
4603
|
+
"name": "fit-markers",
|
|
4604
|
+
"description": "If set, the map will automatically zoom so it can fit all the markers",
|
|
4605
|
+
"type": "boolean",
|
|
4606
|
+
"default": "false"
|
|
4607
|
+
},
|
|
4608
|
+
{
|
|
4609
|
+
"name": "disable-clustering-at",
|
|
4610
|
+
"description": "Limits up to which zoom level markers are arranged into clusters.\nUsing a higher zoom level here will result in more markers to be shown.\n\nRequires `cluster` option to be enabled.",
|
|
4611
|
+
"type": "number"
|
|
4612
|
+
},
|
|
4561
4613
|
{
|
|
4562
4614
|
"name": "subscribe",
|
|
4563
4615
|
"description": "The name of the channel to subscribe to. Only events on a channel corresponding\nto this property are listened to.",
|
|
@@ -4647,6 +4699,26 @@
|
|
|
4647
4699
|
"type": "boolean",
|
|
4648
4700
|
"default": "false"
|
|
4649
4701
|
},
|
|
4702
|
+
{
|
|
4703
|
+
"name": "cluster",
|
|
4704
|
+
"attribute": "cluster",
|
|
4705
|
+
"description": "If set, combine markers into clusters if they are located too close together\nto display as single markers",
|
|
4706
|
+
"type": "boolean",
|
|
4707
|
+
"default": "false"
|
|
4708
|
+
},
|
|
4709
|
+
{
|
|
4710
|
+
"name": "fitMarkers",
|
|
4711
|
+
"attribute": "fit-markers",
|
|
4712
|
+
"description": "If set, the map will automatically zoom so it can fit all the markers",
|
|
4713
|
+
"type": "boolean",
|
|
4714
|
+
"default": "false"
|
|
4715
|
+
},
|
|
4716
|
+
{
|
|
4717
|
+
"name": "disableClusteringAt",
|
|
4718
|
+
"attribute": "disable-clustering-at",
|
|
4719
|
+
"description": "Limits up to which zoom level markers are arranged into clusters.\nUsing a higher zoom level here will result in more markers to be shown.\n\nRequires `cluster` option to be enabled.",
|
|
4720
|
+
"type": "number"
|
|
4721
|
+
},
|
|
4650
4722
|
{
|
|
4651
4723
|
"name": "subscribe",
|
|
4652
4724
|
"attribute": "subscribe",
|
|
@@ -4692,15 +4764,15 @@
|
|
|
4692
4764
|
},
|
|
4693
4765
|
{
|
|
4694
4766
|
"name": "pb-update-map",
|
|
4695
|
-
"description": "When received, redraws the map to fit markers passed in with the event"
|
|
4767
|
+
"description": "When received, redraws the map to fit markers passed in with the event.\nEvent details should include an array of locations, see `pb-geolocation` event below."
|
|
4696
4768
|
},
|
|
4697
4769
|
{
|
|
4698
4770
|
"name": "pb-update",
|
|
4699
|
-
"description": "When received, redraws the map to show markers for all pb-geolocation elements"
|
|
4771
|
+
"description": "When received, redraws the map to show markers for all pb-geolocation elements found in the content of the pb-view"
|
|
4700
4772
|
},
|
|
4701
4773
|
{
|
|
4702
4774
|
"name": "pb-geolocation",
|
|
4703
|
-
"description": "When received, focuses the map on the geocoordinates passed in with the event"
|
|
4775
|
+
"description": "When received, focuses the map on the geocoordinates passed in with the event.\nThe event details should include an object:\n```\n{\ncoordinates: {\n latitude: Number,\n longitude: Number\n},\nlabel: string - the label to show on mouseover,\nzoom: Number - fixed zoom level to zoom to,\nfitBounds: Boolean - if true, recompute current zoom level to show all markers\n}\n```"
|
|
4704
4776
|
}
|
|
4705
4777
|
],
|
|
4706
4778
|
"slots": [
|
|
@@ -8852,6 +8924,136 @@
|
|
|
8852
8924
|
}
|
|
8853
8925
|
]
|
|
8854
8926
|
},
|
|
8927
|
+
{
|
|
8928
|
+
"name": "pb-split-list",
|
|
8929
|
+
"path": "./src/pb-split-list.js",
|
|
8930
|
+
"description": "Implements a list which is split into different categories \n(e.g. letters of the alphabet, countries ...).\nOnly one category is shown at a time unless the server reports\nno categories (e.g. if the number of items to display goes below\na defined threshold).\n\nThe server-side API endpoint should return a JSON object with two\nproperties:\n\n+ `categories`: an array of category descriptions: each item should \n be an object with two properties: `category` - containing the name of the category\n and `count` - containing a count of items available under this category.\n+ `items`: an array with the items to be shown for the currently selected\n category. Those may contain HTML markup.",
|
|
8931
|
+
"attributes": [
|
|
8932
|
+
{
|
|
8933
|
+
"name": "url",
|
|
8934
|
+
"description": "Server-side API endpoint to retrieve items from",
|
|
8935
|
+
"type": "string"
|
|
8936
|
+
},
|
|
8937
|
+
{
|
|
8938
|
+
"name": "selected",
|
|
8939
|
+
"description": "The initially selected category",
|
|
8940
|
+
"type": "string"
|
|
8941
|
+
},
|
|
8942
|
+
{
|
|
8943
|
+
"name": "subforms",
|
|
8944
|
+
"description": "A CSS selector pointing to one or more `pb-custom-form`\ninstances. The element will collect additional parameters\nfrom those forms and includes them in the request to the server",
|
|
8945
|
+
"type": "string"
|
|
8946
|
+
},
|
|
8947
|
+
{
|
|
8948
|
+
"name": "subscribe",
|
|
8949
|
+
"description": "The name of the channel to subscribe to. Only events on a channel corresponding\nto this property are listened to.",
|
|
8950
|
+
"type": "string"
|
|
8951
|
+
},
|
|
8952
|
+
{
|
|
8953
|
+
"name": "subscribe-config",
|
|
8954
|
+
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to listen to.",
|
|
8955
|
+
"type": "object"
|
|
8956
|
+
},
|
|
8957
|
+
{
|
|
8958
|
+
"name": "emit",
|
|
8959
|
+
"description": "The name of the channel to send events to.",
|
|
8960
|
+
"type": "string"
|
|
8961
|
+
},
|
|
8962
|
+
{
|
|
8963
|
+
"name": "emit-config",
|
|
8964
|
+
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to be dispatched.",
|
|
8965
|
+
"type": "object"
|
|
8966
|
+
},
|
|
8967
|
+
{
|
|
8968
|
+
"name": "wait-for",
|
|
8969
|
+
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.",
|
|
8970
|
+
"type": "string"
|
|
8971
|
+
},
|
|
8972
|
+
{
|
|
8973
|
+
"name": "disabled",
|
|
8974
|
+
"description": "Common property to disable the functionality associated with a component.\n`pb-highlight` and `pb-popover` react to this.",
|
|
8975
|
+
"type": "boolean",
|
|
8976
|
+
"default": "false"
|
|
8977
|
+
}
|
|
8978
|
+
],
|
|
8979
|
+
"properties": [
|
|
8980
|
+
{
|
|
8981
|
+
"name": "url",
|
|
8982
|
+
"attribute": "url",
|
|
8983
|
+
"description": "Server-side API endpoint to retrieve items from",
|
|
8984
|
+
"type": "string"
|
|
8985
|
+
},
|
|
8986
|
+
{
|
|
8987
|
+
"name": "selected",
|
|
8988
|
+
"attribute": "selected",
|
|
8989
|
+
"description": "The initially selected category",
|
|
8990
|
+
"type": "string"
|
|
8991
|
+
},
|
|
8992
|
+
{
|
|
8993
|
+
"name": "subforms",
|
|
8994
|
+
"attribute": "subforms",
|
|
8995
|
+
"description": "A CSS selector pointing to one or more `pb-custom-form`\ninstances. The element will collect additional parameters\nfrom those forms and includes them in the request to the server",
|
|
8996
|
+
"type": "string"
|
|
8997
|
+
},
|
|
8998
|
+
{
|
|
8999
|
+
"name": "subscribe",
|
|
9000
|
+
"attribute": "subscribe",
|
|
9001
|
+
"description": "The name of the channel to subscribe to. Only events on a channel corresponding\nto this property are listened to.",
|
|
9002
|
+
"type": "string"
|
|
9003
|
+
},
|
|
9004
|
+
{
|
|
9005
|
+
"name": "subscribeConfig",
|
|
9006
|
+
"attribute": "subscribe-config",
|
|
9007
|
+
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to listen to.",
|
|
9008
|
+
"type": "object"
|
|
9009
|
+
},
|
|
9010
|
+
{
|
|
9011
|
+
"name": "emit",
|
|
9012
|
+
"attribute": "emit",
|
|
9013
|
+
"description": "The name of the channel to send events to.",
|
|
9014
|
+
"type": "string"
|
|
9015
|
+
},
|
|
9016
|
+
{
|
|
9017
|
+
"name": "emitConfig",
|
|
9018
|
+
"attribute": "emit-config",
|
|
9019
|
+
"description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to be dispatched.",
|
|
9020
|
+
"type": "object"
|
|
9021
|
+
},
|
|
9022
|
+
{
|
|
9023
|
+
"name": "waitFor",
|
|
9024
|
+
"attribute": "wait-for",
|
|
9025
|
+
"description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.",
|
|
9026
|
+
"type": "string"
|
|
9027
|
+
},
|
|
9028
|
+
{
|
|
9029
|
+
"name": "disabled",
|
|
9030
|
+
"attribute": "disabled",
|
|
9031
|
+
"description": "Common property to disable the functionality associated with a component.\n`pb-highlight` and `pb-popover` react to this.",
|
|
9032
|
+
"type": "boolean",
|
|
9033
|
+
"default": "false"
|
|
9034
|
+
}
|
|
9035
|
+
],
|
|
9036
|
+
"events": [
|
|
9037
|
+
{
|
|
9038
|
+
"name": "pb-submit",
|
|
9039
|
+
"description": "when received, submit a request to the server and refresh"
|
|
9040
|
+
},
|
|
9041
|
+
{
|
|
9042
|
+
"name": "pb-start-update",
|
|
9043
|
+
"description": "sent before the element sends the request to the server"
|
|
9044
|
+
},
|
|
9045
|
+
{
|
|
9046
|
+
"name": "pb-end-update",
|
|
9047
|
+
"description": "sent after new content has been received"
|
|
9048
|
+
}
|
|
9049
|
+
],
|
|
9050
|
+
"cssProperties": [
|
|
9051
|
+
{
|
|
9052
|
+
"name": "--pb-categorized-list-columns",
|
|
9053
|
+
"description": "the number of columns to display (default: 2)"
|
|
9054
|
+
}
|
|
9055
|
+
]
|
|
9056
|
+
},
|
|
8855
9057
|
{
|
|
8856
9058
|
"name": "pb-svg",
|
|
8857
9059
|
"path": "./src/pb-svg.js",
|