@teipublisher/pb-components 2.26.1-next.3 → 3.0.0-next-4.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/.github/workflows/docker-cypress.yml +53 -0
- package/.github/workflows/node.js.yml +70 -21
- package/.releaserc.json +7 -2
- package/CHANGELOG.md +363 -11
- package/Dockerfile +78 -70
- package/README.md +112 -4
- package/css/components.css +5 -5
- package/css/gridjs/mermaid.min.css +1 -1
- package/css/leaflet/Control.Geocoder.css +1 -126
- package/css/leaflet/images/layers.png +0 -0
- package/css/tify/tify.css +6 -5
- package/css/tom-select/tom-select.bootstrap4.min.css +1 -1
- package/css/tom-select/tom-select.bootstrap5.min.css +1 -1
- package/css/tom-select/tom-select.default.min.css +1 -1
- package/css/tom-select/tom-select.default.min.css.map +1 -0
- package/css/tom-select/tom-select.min.css +1 -1
- package/cypress.config.js +84 -0
- package/dist/api.html +1 -1
- package/dist/css/design-system.css +607 -0
- package/dist/demo/bundle-test.html +4 -3
- package/dist/demo/components.css +46 -1
- package/dist/demo/design-system.html +710 -0
- package/dist/demo/dts-client.html +2 -2
- package/dist/demo/pb-autocomplete.html +23 -11
- package/dist/demo/pb-autocomplete2.html +66 -55
- package/dist/demo/pb-autocomplete3.html +17 -8
- package/dist/demo/pb-blacklab-highlight.html +28 -11
- package/dist/demo/pb-blacklab-results.html +3 -2
- package/dist/demo/pb-browse-docs.html +24 -24
- package/dist/demo/pb-browse-docs2.html +3 -3
- package/dist/demo/pb-clipboard.html +32 -28
- package/dist/demo/pb-code-editor.html +6 -6
- package/dist/demo/pb-code-highlight.html +63 -63
- package/dist/demo/pb-codepen.html +1 -1
- package/dist/demo/pb-collapse.html +1 -1
- package/dist/demo/pb-collapse2.html +2 -2
- package/dist/demo/pb-combo-box.html +135 -130
- package/dist/demo/pb-custom-form.html +64 -55
- package/dist/demo/pb-dialog.html +12 -6
- package/dist/demo/pb-document.html +1 -1
- package/dist/demo/pb-download.html +68 -59
- package/dist/demo/pb-drawer.html +67 -46
- package/dist/demo/pb-drawer2.html +65 -58
- package/dist/demo/pb-edit-app.html +2 -2
- package/dist/demo/pb-edit-xml.html +1 -1
- package/dist/demo/pb-facsimile-2.html +26 -11
- package/dist/demo/pb-facsimile-3.html +25 -10
- package/dist/demo/pb-facsimile-dedup-test-2.html +48 -0
- package/dist/demo/pb-facsimile-dedup-test.html +48 -0
- package/dist/demo/pb-facsimile.html +4 -4
- package/dist/demo/pb-formula.html +1 -1
- package/dist/demo/pb-grid.html +22 -8
- package/dist/demo/pb-highlight.html +2 -2
- package/dist/demo/pb-i18n-simple.html +1 -0
- package/dist/demo/pb-i18n.html +15 -5
- package/dist/demo/pb-image-strip-standalone.html +2 -2
- package/dist/demo/pb-image-strip-view.html +2 -2
- package/dist/demo/pb-leaflet-map.html +3 -3
- package/dist/demo/pb-leaflet-map2.html +2 -2
- package/dist/demo/pb-leaflet-map3.html +3 -3
- package/dist/demo/pb-link.html +1 -1
- package/dist/demo/pb-load.html +2 -6
- package/dist/demo/pb-login.html +1 -3
- package/dist/demo/pb-manage-odds.html +9 -4
- package/dist/demo/pb-markdown.html +1 -1
- package/dist/demo/pb-media-query.html +2 -2
- package/dist/demo/pb-mei.html +2 -2
- package/dist/demo/pb-mei2.html +2 -2
- package/dist/demo/pb-message.html +2 -3
- package/dist/demo/pb-odd-editor.html +54 -52
- package/dist/demo/pb-page-header.html +27 -0
- package/dist/demo/pb-popover.html +1 -1
- package/dist/demo/pb-print-preview.html +2 -2
- package/dist/demo/pb-progress.html +4 -4
- package/dist/demo/pb-repeat.html +32 -36
- package/dist/demo/pb-search.html +16 -5
- package/dist/demo/pb-search2.html +4 -4
- package/dist/demo/pb-search3.html +3 -3
- package/dist/demo/pb-search4.html +3 -3
- package/dist/demo/pb-select-feature.html +4 -4
- package/dist/demo/pb-select-feature2.html +4 -4
- package/dist/demo/pb-select-feature3.html +2 -2
- package/dist/demo/pb-select-i18n.html +58 -53
- package/dist/demo/pb-select-odd.html +1 -1
- package/dist/demo/pb-select.html +190 -75
- package/dist/demo/pb-select2.html +91 -37
- package/dist/demo/pb-select3.html +109 -41
- package/dist/demo/pb-svg.html +1 -1
- package/dist/demo/pb-table-grid.html +26 -15
- package/dist/demo/pb-tabs.html +15 -7
- package/dist/demo/pb-tify.html +7 -7
- package/dist/demo/pb-timeline.html +1 -1
- package/dist/demo/pb-timeline2.html +1 -1
- package/dist/demo/pb-toggle-feature.html +26 -23
- package/dist/demo/pb-toggle-feature2.html +4 -4
- package/dist/demo/pb-toggle-feature3.html +2 -2
- package/dist/demo/pb-toggle-feature4.html +56 -54
- package/dist/demo/pb-version.html +2 -2
- package/dist/demo/pb-view.html +78 -40
- package/dist/demo/pb-view2.html +69 -46
- package/dist/demo/pb-view3.html +53 -48
- package/dist/demo/pb-view4.html +70 -49
- package/dist/demo/pb-zoom.html +2 -2
- package/dist/{es-global-bridge-d8ce175d.js → es-global-bridge-D8ZcUcx_.js} +0 -4
- package/dist/focus-mixin-VCsFap6b.js +768 -0
- package/dist/images/icons.svg +217 -0
- package/dist/jinn-codemirror-DETLdm08.js +1 -0
- package/dist/lib/openseadragon.min.js +80 -0
- package/dist/lib/openseadragon.min.js.map +1 -0
- package/dist/pb-code-editor.js +25 -20
- package/dist/pb-component-docs.js +414 -3225
- package/dist/pb-components-bundle.js +3046 -4402
- package/dist/pb-dialog-tklYGWfc.js +121 -0
- package/dist/pb-edit-app.js +208 -107
- package/dist/pb-elements.json +716 -249
- package/dist/pb-facsimile.js +46 -0
- package/dist/pb-i18n-C0NDma4h.js +1 -0
- package/dist/pb-leaflet-map.js +23 -23
- package/dist/pb-mei.js +152 -134
- package/dist/pb-mixin-DHoWQheB.js +1 -0
- package/dist/pb-odd-editor.js +1671 -1231
- package/dist/pb-tify.js +1 -27
- package/dist/unsafe-html-D5VGo9Oq.js +1 -0
- package/dist/urls-BEONu_g4.js +1 -0
- package/eslint.config.mjs +92 -0
- package/gh-pages.js +5 -3
- package/i18n/common/en.json +6 -0
- package/i18n/common/pl.json +2 -2
- package/images/icons.svg +217 -0
- package/index.html +0 -5
- package/lib/leaflet-src.js.map +1 -0
- package/lib/leaflet.markercluster-src.js.map +1 -0
- package/lib/openseadragon.min.js +6 -6
- package/package.json +56 -81
- package/pb-elements.json +716 -249
- package/rollup.config.mjs +312 -0
- package/src/assets/components.css +5 -5
- package/src/assets/design-system.css +607 -0
- package/src/authority/airtable.js +20 -21
- package/src/authority/anton.js +129 -129
- package/src/authority/custom.js +70 -27
- package/src/authority/geonames.js +38 -32
- package/src/authority/gnd.js +50 -42
- package/src/authority/kbga.js +136 -134
- package/src/authority/metagrid.js +44 -46
- package/src/authority/reconciliation.js +66 -68
- package/src/authority/registry.js +4 -4
- package/src/docs/demo-utils.js +91 -0
- package/src/docs/pb-component-docs.js +287 -147
- package/src/docs/pb-component-view.js +380 -273
- package/src/docs/pb-components-list.js +115 -51
- package/src/docs/pb-demo-snippet.js +199 -174
- package/src/dts-client.js +306 -303
- package/src/dts-select-endpoint.js +125 -85
- package/src/parse-date-service.js +184 -135
- package/src/pb-ajax.js +175 -173
- package/src/pb-authority-lookup.js +198 -158
- package/src/pb-autocomplete.js +731 -313
- package/src/pb-blacklab-highlight.js +266 -260
- package/src/pb-blacklab-results.js +230 -225
- package/src/pb-browse-docs.js +601 -484
- package/src/pb-browse.js +68 -65
- package/src/pb-clipboard.js +97 -76
- package/src/pb-code-editor.js +111 -103
- package/src/pb-code-highlight.js +234 -204
- package/src/pb-codepen.js +81 -73
- package/src/pb-collapse.js +265 -152
- package/src/pb-combo-box.js +191 -191
- package/src/pb-components-bundle.js +1 -7
- package/src/pb-components.js +2 -6
- package/src/pb-custom-form.js +230 -141
- package/src/pb-dialog.js +99 -63
- package/src/pb-document.js +118 -91
- package/src/pb-download.js +214 -198
- package/src/pb-drawer.js +146 -149
- package/src/pb-edit-app.js +471 -240
- package/src/pb-edit-xml.js +101 -98
- package/src/pb-events.js +126 -107
- package/src/pb-facs-link.js +130 -101
- package/src/pb-facsimile.js +494 -410
- package/src/pb-fetch.js +389 -0
- package/src/pb-formula.js +152 -154
- package/src/pb-geolocation.js +130 -132
- package/src/pb-grid-action.js +59 -56
- package/src/pb-grid.js +388 -228
- package/src/pb-highlight.js +142 -142
- package/src/pb-hotkeys.js +40 -42
- package/src/pb-i18n.js +115 -127
- package/src/pb-icon-button.js +108 -0
- package/src/pb-icon.js +283 -0
- package/src/pb-image-strip.js +85 -79
- package/src/pb-lang.js +142 -57
- package/src/pb-leaflet-map.js +551 -483
- package/src/pb-link.js +132 -126
- package/src/pb-load.js +495 -428
- package/src/pb-login.js +303 -248
- package/src/pb-manage-odds.js +384 -338
- package/src/pb-map-icon.js +90 -90
- package/src/pb-map-layer.js +86 -86
- package/src/pb-markdown.js +107 -110
- package/src/pb-media-query.js +75 -73
- package/src/pb-mei.js +523 -303
- package/src/pb-message.js +144 -98
- package/src/pb-mixin.js +268 -265
- package/src/pb-navigation.js +83 -96
- package/src/pb-observable.js +39 -39
- package/src/pb-odd-editor.js +1209 -948
- package/src/pb-odd-elementspec-editor.js +375 -310
- package/src/pb-odd-model-editor.js +1189 -941
- package/src/pb-odd-parameter-editor.js +269 -170
- package/src/pb-odd-rendition-editor.js +184 -131
- package/src/pb-page.js +451 -422
- package/src/pb-paginate.js +260 -178
- package/src/pb-panel.js +217 -183
- package/src/pb-popover-themes.js +16 -9
- package/src/pb-popover.js +297 -288
- package/src/pb-print-preview.js +128 -128
- package/src/pb-progress.js +52 -52
- package/src/pb-repeat.js +141 -108
- package/src/pb-restricted.js +85 -78
- package/src/pb-search.js +258 -230
- package/src/pb-select-feature.js +210 -126
- package/src/pb-select-odd.js +184 -118
- package/src/pb-select-template.js +113 -78
- package/src/pb-select.js +330 -229
- package/src/pb-split-list.js +181 -176
- package/src/pb-svg.js +81 -80
- package/src/pb-table-column.js +55 -55
- package/src/pb-table-grid.js +334 -205
- package/src/pb-tabs.js +238 -61
- package/src/pb-tify.js +3331 -126
- package/src/pb-timeline.js +394 -255
- package/src/pb-toggle-feature.js +196 -188
- package/src/pb-upload.js +201 -176
- package/src/pb-version.js +22 -34
- package/src/pb-view-annotate.js +138 -102
- package/src/pb-view.js +1722 -1272
- package/src/pb-zoom.js +144 -46
- package/src/search-result-service.js +256 -223
- package/src/seed-element.js +14 -22
- package/src/settings.js +4 -4
- package/src/theming.js +98 -91
- package/src/urls.js +403 -289
- package/src/utils.js +53 -51
- package/vite.config.js +86 -0
- package/.github/workflows/main.yml +0 -24
- package/.github/workflows/release.js.yml +0 -34
- package/css/pb-styles.css +0 -51
- package/dist/iron-form-3b8dcaa7.js +0 -210
- package/dist/jinn-codemirror-da0e2d1f.js +0 -1
- package/dist/paper-checkbox-515a5284.js +0 -1597
- package/dist/paper-icon-button-b1d31571.js +0 -398
- package/dist/paper-listbox-a3b7175c.js +0 -1265
- package/dist/pb-i18n-0611135a.js +0 -1
- package/dist/pb-mixin-b1caa22e.js +0 -158
- package/dist/polymer-hack.js +0 -1
- package/dist/vaadin-element-mixin-fe4a4883.js +0 -527
- package/lib/Control.Geocoder.min.js +0 -2
- package/lib/Control.Geocoder.min.js.map +0 -1
- package/src/assets/pb-styles.css +0 -51
- package/src/pb-light-dom.js +0 -41
- package/src/polymer-hack.js +0 -6
package/src/utils.js
CHANGED
|
@@ -1,51 +1,53 @@
|
|
|
1
|
-
export function resolveURL(relPath) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export function cmpVersion(a, b) {
|
|
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
|
-
* @param {
|
|
39
|
-
* @
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
1
|
+
export function resolveURL(relPath) {
|
|
2
|
+
const src = document.querySelector('script[src*=pb-components]');
|
|
3
|
+
if (src) {
|
|
4
|
+
return new URL(relPath, src.src).href;
|
|
5
|
+
}
|
|
6
|
+
return new URL(relPath, window.location.href).href;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function cmpVersion(a, b) {
|
|
10
|
+
let i;
|
|
11
|
+
let cmp;
|
|
12
|
+
let len;
|
|
13
|
+
a = `${a}`.split('.');
|
|
14
|
+
b = `${b}`.split('.');
|
|
15
|
+
len = Math.max(a.length, b.length);
|
|
16
|
+
for (i = 0; i < len; i++) {
|
|
17
|
+
if (a[i] === undefined) {
|
|
18
|
+
a[i] = '0';
|
|
19
|
+
}
|
|
20
|
+
if (b[i] === undefined) {
|
|
21
|
+
b[i] = '0';
|
|
22
|
+
}
|
|
23
|
+
cmp = parseInt(a[i], 10) - parseInt(b[i], 10);
|
|
24
|
+
if (cmp !== 0) {
|
|
25
|
+
return cmp < 0 ? -1 : 1;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function minVersion(given, required) {
|
|
32
|
+
return cmpVersion(given, required) >= 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Retrieve value of a CSS property.
|
|
37
|
+
*
|
|
38
|
+
* @param {Element} elem the component
|
|
39
|
+
* @param {string} name name of the property
|
|
40
|
+
* @param {any} defaultValue default value
|
|
41
|
+
* @returns the value or defaultValue if it does not exist
|
|
42
|
+
*/
|
|
43
|
+
export function getCSSProperty(elem, name, defaultValue) {
|
|
44
|
+
const property = getComputedStyle(elem).getPropertyValue(name);
|
|
45
|
+
if (property) {
|
|
46
|
+
try {
|
|
47
|
+
return JSON.parse(property);
|
|
48
|
+
} catch (e) {
|
|
49
|
+
return defaultValue;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return defaultValue;
|
|
53
|
+
}
|
package/vite.config.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
const MOCK_VERSION = {
|
|
2
|
+
api: '1.0.0',
|
|
3
|
+
app: { name: 'mock-app', version: '0.0.0' },
|
|
4
|
+
engine: { name: 'mock-engine', version: '0.0.0' }
|
|
5
|
+
}
|
|
6
|
+
import { defineConfig } from 'vite';
|
|
7
|
+
import { fileURLToPath } from 'node:url';
|
|
8
|
+
|
|
9
|
+
const isCypress = !!process.env.CYPRESS;
|
|
10
|
+
|
|
11
|
+
// Vite dev server for pb-components demos and local development
|
|
12
|
+
// - Serves from repo root so existing demo and api pages work
|
|
13
|
+
// - Opens api.html by default
|
|
14
|
+
// - Replaces process.env.NODE_ENV usages for legacy code paths
|
|
15
|
+
export default defineConfig({
|
|
16
|
+
root: '.',
|
|
17
|
+
server: {
|
|
18
|
+
port: 5173,
|
|
19
|
+
// Don't auto-open a path when Cypress runs CT; it uses a special base
|
|
20
|
+
open: isCypress ? false : '/api.html',
|
|
21
|
+
cors: true,
|
|
22
|
+
headers: {
|
|
23
|
+
// Keep CORS relaxed for local eXist/dev interactions
|
|
24
|
+
'Access-Control-Allow-Origin': '*',
|
|
25
|
+
},
|
|
26
|
+
proxy: isCypress ? undefined : {
|
|
27
|
+
'/exist': {
|
|
28
|
+
target: 'http://localhost:8080',
|
|
29
|
+
changeOrigin: true,
|
|
30
|
+
secure: false,
|
|
31
|
+
rewrite: (path) => path.replace(/^\/demo/, ''),
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
// Ensure lib/ directory is served as static files
|
|
35
|
+
fs: {
|
|
36
|
+
allow: ['..', '.', 'lib']
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
plugins: [
|
|
40
|
+
{
|
|
41
|
+
name: 'mock-teipublisher-handshake',
|
|
42
|
+
configureServer(server) {
|
|
43
|
+
server.middlewares.use((req, res, next) => {
|
|
44
|
+
const url = req.url || ''
|
|
45
|
+
// Normalize both rooted and app-rooted paths
|
|
46
|
+
const isLogin = url.startsWith('/login') || url.startsWith('/exist/apps/tei-publisher/login')
|
|
47
|
+
const isVersion = url.startsWith('/api/version') || url.startsWith('/exist/apps/tei-publisher/api/version')
|
|
48
|
+
|
|
49
|
+
if (isLogin) {
|
|
50
|
+
res.statusCode = 404
|
|
51
|
+
res.setHeader('content-type', 'text/plain')
|
|
52
|
+
res.end('Not Found')
|
|
53
|
+
return
|
|
54
|
+
}
|
|
55
|
+
if (isVersion) {
|
|
56
|
+
res.statusCode = 200
|
|
57
|
+
res.setHeader('content-type', 'application/json')
|
|
58
|
+
res.end(JSON.stringify(MOCK_VERSION))
|
|
59
|
+
return
|
|
60
|
+
}
|
|
61
|
+
next()
|
|
62
|
+
})
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
resolve: {
|
|
67
|
+
alias: [
|
|
68
|
+
// Normalize any accidental /node_modules path imports to bare package names
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
define: {
|
|
72
|
+
'process.env.NODE_ENV': JSON.stringify('production'),
|
|
73
|
+
},
|
|
74
|
+
optimizeDeps: {
|
|
75
|
+
// Prebundle common deps once so they aren't evaluated from multiple URLs
|
|
76
|
+
include: [
|
|
77
|
+
// Add commonly used packages here if needed
|
|
78
|
+
],
|
|
79
|
+
exclude: [
|
|
80
|
+
// keep heavy/legacy libs out of prebundle
|
|
81
|
+
'gridjs',
|
|
82
|
+
'hotkeys-js',
|
|
83
|
+
'construct-style-sheets-polyfill'
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
});
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
on:
|
|
2
|
-
push:
|
|
3
|
-
tags:
|
|
4
|
-
- v*
|
|
5
|
-
workflow_dispatch:
|
|
6
|
-
name: Deploy to GitHub Pages
|
|
7
|
-
jobs:
|
|
8
|
-
build:
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
steps:
|
|
11
|
-
- uses: actions/checkout@v4
|
|
12
|
-
- name: Setup Node.js environment
|
|
13
|
-
uses: actions/setup-node@v4
|
|
14
|
-
with:
|
|
15
|
-
node-version: "16"
|
|
16
|
-
- run: npm ci
|
|
17
|
-
- run: npm run gh-pages
|
|
18
|
-
- name: Deploy to gh-pages
|
|
19
|
-
uses: peaceiris/actions-gh-pages@v4
|
|
20
|
-
with:
|
|
21
|
-
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
22
|
-
publish_dir: ./docs
|
|
23
|
-
keep_files: true
|
|
24
|
-
cname: cdn.tei-publisher.com
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
name: Release npm package
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- master
|
|
7
|
-
- next
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
release:
|
|
11
|
-
name: Release
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v4
|
|
15
|
-
- uses: actions/setup-node@v4
|
|
16
|
-
with:
|
|
17
|
-
node-version: "16"
|
|
18
|
-
- name: npm install and build
|
|
19
|
-
run:
|
|
20
|
-
npm ci
|
|
21
|
-
npm run build:production
|
|
22
|
-
- name: Build docker image
|
|
23
|
-
run: docker build -t exist-db -f Dockerfile .
|
|
24
|
-
- name: Start docker image
|
|
25
|
-
run: docker run --publish 8080:8080 --detach exist-db
|
|
26
|
-
- name: Wait for eXist
|
|
27
|
-
uses: iFaxity/wait-on-action@v1
|
|
28
|
-
with:
|
|
29
|
-
resource: http-get://localhost:8080/exist/apps/tei-publisher/api/version
|
|
30
|
-
- run: npm test
|
|
31
|
-
- run: npx semantic-release
|
|
32
|
-
env:
|
|
33
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
34
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/css/pb-styles.css
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--pb-dialog-box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
|
|
3
|
-
--pb-dialog-backdrop-color: rgba(0, 0, 0, 0.4);
|
|
4
|
-
--pb-dialog-padding-horizontal: 1em;
|
|
5
|
-
--pb-dialog-padding-vertical: 1em;
|
|
6
|
-
--pb-dialog-border-color: #eee;
|
|
7
|
-
--pb-dialog-min-width: 300px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
pb-dialog dialog {
|
|
11
|
-
min-width: var(--pb-dialog-min-width);
|
|
12
|
-
max-width: 100vw;
|
|
13
|
-
max-height: 90vh;
|
|
14
|
-
border-radius: 6px;
|
|
15
|
-
box-shadow: var(--pb-dialog-box-shadow);
|
|
16
|
-
border: none;
|
|
17
|
-
padding: 0;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
pb-dialog dialog::backdrop {
|
|
21
|
-
background: var(--pb-dialog-backdrop-color);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
pb-dialog>dialog>article>* {
|
|
25
|
-
padding-left: var(--pb-dialog-padding-horizontal);
|
|
26
|
-
padding-right: var(--pb-dialog-padding-horizontal);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
pb-dialog>dialog>article>header {
|
|
30
|
-
border-bottom: 1px solid var(--pb-dialog-border-color);
|
|
31
|
-
display: flex;
|
|
32
|
-
margin-bottom: var(--pb-dialog-padding-vertical);
|
|
33
|
-
justify-content: space-between;
|
|
34
|
-
align-items: center;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
pb-dialog>dialog>article>footer {
|
|
38
|
-
display: flex;
|
|
39
|
-
justify-content: flex-end;
|
|
40
|
-
gap: 0.5rem;
|
|
41
|
-
padding-top: var(--pb-dialog-padding-vertical);
|
|
42
|
-
padding-bottom: var(--pb-dialog-padding-vertical);
|
|
43
|
-
border-top: 1px solid var(--pb-dialog-border-color);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
pb-dialog [rel="prev"] {
|
|
47
|
-
background: none;
|
|
48
|
-
border: none;
|
|
49
|
-
font-size: 1.2em;
|
|
50
|
-
cursor: pointer;
|
|
51
|
-
}
|
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
import{x as e,a as t,I as i,b as s,d as o,P as a,h as n}from"./paper-checkbox-515a5284.js";import{f as r,N as l}from"./paper-listbox-a3b7175c.js";
|
|
2
|
-
/**
|
|
3
|
-
@license
|
|
4
|
-
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
5
|
-
This code may only be used under the BSD style license found at
|
|
6
|
-
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
7
|
-
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
8
|
-
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
9
|
-
part of the polymer project is also subject to an additional IP rights grant
|
|
10
|
-
found at http://polymer.github.io/PATENTS.txt
|
|
11
|
-
*/const h={properties:{elevation:{type:Number,reflectToAttribute:!0,readOnly:!0}},observers:["_calculateElevation(focused, disabled, active, pressed, receivedFocusFromKeyboard)","_computeKeyboardClass(receivedFocusFromKeyboard)"],hostAttributes:{role:"button",tabindex:"0",animated:!0},_calculateElevation:function(){var e=1;this.disabled?e=0:this.active||this.pressed?e=4:this.receivedFocusFromKeyboard&&(e=3),this._setElevation(e)},_computeKeyboardClass:function(e){this.toggleClass("keyboard-focus",e)},_spaceKeyDownHandler:function(t){e._spaceKeyDownHandler.call(this,t),this.hasRipple()&&this.getRipple().ripples.length<1&&this._ripple.uiDownAction()},_spaceKeyUpHandler:function(t){e._spaceKeyUpHandler.call(this,t),this.hasRipple()&&this._ripple.uiUpAction()}},d=[t,i,s,h],p=document.createElement("template");p.setAttribute("style","display: none;"),p.innerHTML='<dom-module id="paper-dialog-shared-styles">\n <template>\n <style>\n :host {\n display: block;\n margin: 24px 40px;\n\n background: var(--paper-dialog-background-color, var(--primary-background-color));\n color: var(--paper-dialog-color, var(--primary-text-color));\n\n @apply --paper-font-body1;\n @apply --shadow-elevation-16dp;\n @apply --paper-dialog;\n }\n\n :host > ::slotted(*) {\n margin-top: 20px;\n padding: 0 24px;\n }\n\n :host > ::slotted(.no-padding) {\n padding: 0;\n }\n\n \n :host > ::slotted(*:first-child) {\n margin-top: 24px;\n }\n\n :host > ::slotted(*:last-child) {\n margin-bottom: 24px;\n }\n\n /* In 1.x, this selector was `:host > ::content h2`. In 2.x <slot> allows\n to select direct children only, which increases the weight of this\n selector, so we have to re-define first-child/last-child margins below. */\n :host > ::slotted(h2) {\n position: relative;\n margin: 0;\n\n @apply --paper-font-title;\n @apply --paper-dialog-title;\n }\n\n /* Apply mixin again, in case it sets margin-top. */\n :host > ::slotted(h2:first-child) {\n margin-top: 24px;\n @apply --paper-dialog-title;\n }\n\n /* Apply mixin again, in case it sets margin-bottom. */\n :host > ::slotted(h2:last-child) {\n margin-bottom: 24px;\n @apply --paper-dialog-title;\n }\n\n :host > ::slotted(.paper-dialog-buttons),\n :host > ::slotted(.buttons) {\n position: relative;\n padding: 8px 8px 8px 24px;\n margin: 0;\n\n color: var(--paper-dialog-button-color, var(--primary-color));\n\n @apply --layout-horizontal;\n @apply --layout-end-justified;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(p.content);
|
|
12
|
-
/**
|
|
13
|
-
@license
|
|
14
|
-
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
15
|
-
This code may only be used under the BSD style license found at
|
|
16
|
-
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
17
|
-
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
18
|
-
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
19
|
-
part of the polymer project is also subject to an additional IP rights grant
|
|
20
|
-
found at http://polymer.github.io/PATENTS.txt
|
|
21
|
-
*/
|
|
22
|
-
const c={hostAttributes:{role:"dialog",tabindex:"-1"},properties:{modal:{type:Boolean,value:!1},__readied:{type:Boolean,value:!1}},observers:["_modalChanged(modal, __readied)"],listeners:{tap:"_onDialogClick"},ready:function(){this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.__readied=!0},_modalChanged:function(e,t){t&&(e?(this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.noCancelOnOutsideClick=!0,this.noCancelOnEscKey=!0,this.withBackdrop=!0):(this.noCancelOnOutsideClick=this.noCancelOnOutsideClick&&this.__prevNoCancelOnOutsideClick,this.noCancelOnEscKey=this.noCancelOnEscKey&&this.__prevNoCancelOnEscKey,this.withBackdrop=this.withBackdrop&&this.__prevWithBackdrop))},_updateClosingReasonConfirmed:function(e){this.closingReason=this.closingReason||{},this.closingReason.confirmed=e},_onDialogClick:function(e){for(var t=o(e).path,i=0,s=t.indexOf(this);i<s;i++){var a=t[i];if(a.hasAttribute&&(a.hasAttribute("dialog-dismiss")||a.hasAttribute("dialog-confirm"))){this._updateClosingReasonConfirmed(a.hasAttribute("dialog-confirm")),this.close(),e.stopPropagation();break}}}};
|
|
23
|
-
/**
|
|
24
|
-
@license
|
|
25
|
-
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
26
|
-
This code may only be used under the BSD style license found at
|
|
27
|
-
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
28
|
-
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
29
|
-
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
30
|
-
part of the polymer project is also subject to an additional IP rights grant
|
|
31
|
-
found at http://polymer.github.io/PATENTS.txt
|
|
32
|
-
*/
|
|
33
|
-
a({_template:n`
|
|
34
|
-
<style include="paper-dialog-shared-styles"></style>
|
|
35
|
-
<slot></slot>
|
|
36
|
-
`,is:"paper-dialog",behaviors:[[r,c],l],listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},_renderOpened:function(){this.cancelAnimation(),this.playAnimation("entry")},_renderClosed:function(){this.cancelAnimation(),this.playAnimation("exit")},_onNeonAnimationFinish:function(){this.opened?this._finishRenderOpened():this._finishRenderClosed()}}),
|
|
37
|
-
/**
|
|
38
|
-
@license
|
|
39
|
-
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
40
|
-
This code may only be used under the BSD style license found at
|
|
41
|
-
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
42
|
-
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
43
|
-
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
44
|
-
part of the polymer project is also subject to an additional IP rights grant
|
|
45
|
-
found at http://polymer.github.io/PATENTS.txt
|
|
46
|
-
*/
|
|
47
|
-
a({_template:n`
|
|
48
|
-
<style>
|
|
49
|
-
|
|
50
|
-
:host {
|
|
51
|
-
display: block;
|
|
52
|
-
@apply --layout-relative;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
:host(.is-scrolled:not(:first-child))::before {
|
|
56
|
-
content: '';
|
|
57
|
-
position: absolute;
|
|
58
|
-
top: 0;
|
|
59
|
-
left: 0;
|
|
60
|
-
right: 0;
|
|
61
|
-
height: 1px;
|
|
62
|
-
background: var(--divider-color);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
:host(.can-scroll:not(.scrolled-to-bottom):not(:last-child))::after {
|
|
66
|
-
content: '';
|
|
67
|
-
position: absolute;
|
|
68
|
-
bottom: 0;
|
|
69
|
-
left: 0;
|
|
70
|
-
right: 0;
|
|
71
|
-
height: 1px;
|
|
72
|
-
background: var(--divider-color);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.scrollable {
|
|
76
|
-
padding: 0 24px;
|
|
77
|
-
|
|
78
|
-
@apply --layout-scroll;
|
|
79
|
-
@apply --paper-dialog-scrollable;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.fit {
|
|
83
|
-
@apply --layout-fit;
|
|
84
|
-
}
|
|
85
|
-
</style>
|
|
86
|
-
|
|
87
|
-
<div id="scrollable" class="scrollable" on-scroll="updateScrollState">
|
|
88
|
-
<slot></slot>
|
|
89
|
-
</div>
|
|
90
|
-
`,is:"paper-dialog-scrollable",properties:{dialogElement:{type:Object}},get scrollTarget(){return this.$.scrollable},ready:function(){this._ensureTarget(),this.classList.add("no-padding")},attached:function(){this._ensureTarget(),requestAnimationFrame(this.updateScrollState.bind(this))},updateScrollState:function(){this.toggleClass("is-scrolled",this.scrollTarget.scrollTop>0),this.toggleClass("can-scroll",this.scrollTarget.offsetHeight<this.scrollTarget.scrollHeight),this.toggleClass("scrolled-to-bottom",this.scrollTarget.scrollTop+this.scrollTarget.offsetHeight>=this.scrollTarget.scrollHeight)},_ensureTarget:function(){this.dialogElement=this.dialogElement||this.parentElement,this.dialogElement&&this.dialogElement.behaviors&&this.dialogElement.behaviors.indexOf(c)>=0?(this.dialogElement.sizingTarget=this.scrollTarget,this.scrollTarget.classList.remove("fit")):this.dialogElement&&this.scrollTarget.classList.add("fit")}});
|
|
91
|
-
/**
|
|
92
|
-
@license
|
|
93
|
-
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
94
|
-
This code may only be used under the BSD style license found at
|
|
95
|
-
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
96
|
-
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
97
|
-
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
98
|
-
part of the polymer project is also subject to an additional IP rights grant
|
|
99
|
-
found at http://polymer.github.io/PATENTS.txt
|
|
100
|
-
*/
|
|
101
|
-
const u=n`
|
|
102
|
-
<style include="paper-material-styles">
|
|
103
|
-
/* Need to specify the same specificity as the styles imported from paper-material. */
|
|
104
|
-
:host {
|
|
105
|
-
@apply --layout-inline;
|
|
106
|
-
@apply --layout-center-center;
|
|
107
|
-
position: relative;
|
|
108
|
-
box-sizing: border-box;
|
|
109
|
-
min-width: 5.14em;
|
|
110
|
-
margin: 0 0.29em;
|
|
111
|
-
background: transparent;
|
|
112
|
-
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
113
|
-
-webkit-tap-highlight-color: transparent;
|
|
114
|
-
font: inherit;
|
|
115
|
-
text-transform: uppercase;
|
|
116
|
-
outline-width: 0;
|
|
117
|
-
border-radius: 3px;
|
|
118
|
-
-moz-user-select: none;
|
|
119
|
-
-ms-user-select: none;
|
|
120
|
-
-webkit-user-select: none;
|
|
121
|
-
user-select: none;
|
|
122
|
-
cursor: pointer;
|
|
123
|
-
z-index: 0;
|
|
124
|
-
padding: 0.7em 0.57em;
|
|
125
|
-
|
|
126
|
-
@apply --paper-font-common-base;
|
|
127
|
-
@apply --paper-button;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
:host([elevation="1"]) {
|
|
131
|
-
@apply --paper-material-elevation-1;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
:host([elevation="2"]) {
|
|
135
|
-
@apply --paper-material-elevation-2;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
:host([elevation="3"]) {
|
|
139
|
-
@apply --paper-material-elevation-3;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
:host([elevation="4"]) {
|
|
143
|
-
@apply --paper-material-elevation-4;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
:host([elevation="5"]) {
|
|
147
|
-
@apply --paper-material-elevation-5;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
:host([hidden]) {
|
|
151
|
-
display: none !important;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
:host([raised].keyboard-focus) {
|
|
155
|
-
font-weight: bold;
|
|
156
|
-
@apply --paper-button-raised-keyboard-focus;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
:host(:not([raised]).keyboard-focus) {
|
|
160
|
-
font-weight: bold;
|
|
161
|
-
@apply --paper-button-flat-keyboard-focus;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
:host([disabled]) {
|
|
165
|
-
background: none;
|
|
166
|
-
color: #a8a8a8;
|
|
167
|
-
cursor: auto;
|
|
168
|
-
pointer-events: none;
|
|
169
|
-
|
|
170
|
-
@apply --paper-button-disabled;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
:host([disabled][raised]) {
|
|
174
|
-
background: #eaeaea;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
:host([animated]) {
|
|
179
|
-
@apply --shadow-transition;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
paper-ripple {
|
|
183
|
-
color: var(--paper-button-ink-color);
|
|
184
|
-
}
|
|
185
|
-
</style>
|
|
186
|
-
|
|
187
|
-
<slot></slot>`;u.setAttribute("strip-whitespace",""),a({_template:u,is:"paper-button",behaviors:[d],properties:{raised:{type:Boolean,reflectToAttribute:!0,value:!1,observer:"_calculateElevation"}},_calculateElevation:function(){this.raised?h._calculateElevation.apply(this):this._setElevation(0)}}),
|
|
188
|
-
/**
|
|
189
|
-
@license
|
|
190
|
-
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
191
|
-
This code may only be used under the BSD style license found at
|
|
192
|
-
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
193
|
-
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
194
|
-
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
195
|
-
part of the polymer project is also subject to an additional IP rights grant
|
|
196
|
-
found at http://polymer.github.io/PATENTS.txt
|
|
197
|
-
*/
|
|
198
|
-
a({_template:n`
|
|
199
|
-
<style>
|
|
200
|
-
:host {
|
|
201
|
-
display: block;
|
|
202
|
-
}
|
|
203
|
-
</style>
|
|
204
|
-
|
|
205
|
-
<!-- This form is used to collect the elements that should be submitted -->
|
|
206
|
-
<slot></slot>
|
|
207
|
-
|
|
208
|
-
<!-- This form is used for submission -->
|
|
209
|
-
<form id="helper" action\$="[[action]]" method\$="[[method]]" enctype\$="[[enctype]]"></form>
|
|
210
|
-
`,is:"iron-form",properties:{allowRedirect:{type:Boolean,value:!1},headers:{type:Object,value:function(){return{}}},withCredentials:{type:Boolean,value:!1}},attached:function(){this._form||(this._form=o(this).querySelector("form"),this._form?(this._init(),this.async(this._saveInitialValues.bind(this),1)):this._nodeObserver=o(this).observeNodes(function(e){for(var t=0;t<e.addedNodes.length;t++)"FORM"===e.addedNodes[t].tagName&&(this._form=e.addedNodes[t],this._init(),o(this).unobserveNodes(this._nodeObserver),this._nodeObserver=null)}.bind(this)))},detached:function(){this._nodeObserver&&(o(this).unobserveNodes(this._nodeObserver),this._nodeObserver=null)},_init:function(){this._form.addEventListener("submit",this.submit.bind(this)),this._form.addEventListener("reset",this.reset.bind(this)),this._defaults=this._defaults||new WeakMap,this._saveInitialValues()},saveResetValues:function(){this._saveInitialValues(!0)},_saveInitialValues:function(e){for(var t=this._getValidatableElements(),i=0;i<t.length;i++){var s=t[i];if(!this._defaults.has(s)||e){var o={value:s.value};"checked"in s&&(o.checked=s.checked),"invalid"in s&&(o.invalid=s.invalid),this._defaults.set(s,o)}}},validate:function(){if(!this._form)return!1;if(""===this._form.getAttribute("novalidate"))return!0;for(var e,t=this._form.checkValidity(),i=this._getValidatableElements(),s=0;e=i[s],s<i.length;s++){var o=e;o.validate&&(t=!!o.validate()&&t)}return t},submit:function(e){if(e&&e.preventDefault(),this._form)if(this.validate()){this.$.helper.textContent="";var t=this.serializeForm();if(this.allowRedirect){for(var i in t)this.$.helper.appendChild(this._createHiddenElement(i,t[i]));this.$.helper.action=this._form.getAttribute("action"),this.$.helper.method=this._form.getAttribute("method")||"GET",this.$.helper.contentType=this._form.getAttribute("enctype")||"application/x-www-form-urlencoded",this.$.helper.submit(),this.fire("iron-form-submit")}else this._makeAjaxRequest(t)}else this.fire("iron-form-invalid")},reset:function(e){if(e&&e.preventDefault(),this._form)if(e&&"reset"===e.type&&e.target===this._form){for(var t=this._getValidatableElements(),i=0;i<t.length;i++){var s=t[i];if(this._defaults.has(s)){var o=this._defaults.get(s);for(var a in o)s[a]=o[a]}}this.fire("iron-form-reset")}else this._form.reset()},serializeForm:function(){for(var e=this._getSubmittableElements(),t={},i=0;i<e.length;i++)for(var s=this._serializeElementValues(e[i]),o=0;o<s.length;o++)this._addSerializedElement(t,e[i].name,s[o]);return t},_handleFormResponse:function(e){this.fire("iron-form-response",e.detail)},_handleFormError:function(e){this.fire("iron-form-error",e.detail)},_makeAjaxRequest:function(e){this.request||(this.request=document.createElement("iron-ajax"),this.request.addEventListener("response",this._handleFormResponse.bind(this)),this.request.addEventListener("error",this._handleFormError.bind(this))),this.request.url=this._form.getAttribute("action"),this.request.method=this._form.getAttribute("method")||"GET",this.request.contentType=this._form.getAttribute("enctype")||"application/x-www-form-urlencoded",this.request.withCredentials=this.withCredentials,this.request.headers=this.headers,"POST"===this._form.method.toUpperCase()?this.request.body=e:this.request.params=e,this.fire("iron-form-presubmit",{},{cancelable:!0}).defaultPrevented||(this.request.generateRequest(),this.fire("iron-form-submit",e))},_getValidatableElements:function(){return this._findElements(this._form,!0,!1)},_getSubmittableElements:function(){return this._findElements(this._form,!1,!1)},_findElements:function(e,t,i,s){s=s||[];for(var a=o(e).querySelectorAll("*"),n=0;n<a.length;n++)i||"slot"!==a[n].localName&&"content"!==a[n].localName?this._searchSubmittable(s,a[n],t):this._searchSubmittableInSlot(s,a[n],t);return s},_searchSubmittableInSlot:function(e,t,i){for(var s=o(t).getDistributedNodes(),a=0;a<s.length;a++)if(s[a].nodeType!==Node.TEXT_NODE){this._searchSubmittable(e,s[a],i);for(var n=o(s[a]).querySelectorAll("*"),r=0;r<n.length;r++)this._searchSubmittable(e,n[r],i)}},_searchSubmittable:function(e,t,i){this._isSubmittable(t,i)?e.push(t):t.root&&this._findElements(t.root,i,!0,e)},_isSubmittable:function(e,t){return!e.disabled&&(t?e.name||"function"==typeof e.validate:e.name)},_serializeElementValues:function(e){var t=e.tagName.toLowerCase();return"button"===t||"input"===t&&("submit"===e.type||"reset"===e.type)?[]:"select"===t?this._serializeSelectValues(e):"input"===t?this._serializeInputValues(e):e._hasIronCheckedElementBehavior&&!e.checked?[]:[e.value]},_serializeSelectValues:function(e){for(var t=[],i=0;i<e.options.length;i++)e.options[i].selected&&t.push(e.options[i].value);return t},_serializeInputValues:function(e){var t=e.type.toLowerCase();return("checkbox"!==t&&"radio"!==t||e.checked)&&"file"!==t?[e.value]:[]},_createHiddenElement:function(e,t){var i=document.createElement("input");return i.setAttribute("type","hidden"),i.setAttribute("name",e),i.setAttribute("value",t),i},_addSerializedElement:function(e,t,i){void 0===e[t]?e[t]=i:(Array.isArray(e[t])||(e[t]=[e[t]]),e[t].push(i))}});export{d as P};
|