@cling-se/widget 0.2.0 → 0.3.1
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/.env +13 -0
- package/dist/DocFormSend.4167e485.js +10948 -0
- package/dist/DocSendReminder.ea59eb89.js +101 -0
- package/dist/{index.a3fd764a.js → index.01c25e08.js} +1 -1
- package/dist/{index.b30bff25.js → index.06409a2f.js} +1 -1
- package/dist/{index.fa3979ff.js → index.08111bb7.js} +1 -1
- package/dist/{index.30a47f01.js → index.0b1b812f.js} +1 -1
- package/dist/{index.d13e57cf.js → index.0d00d7bd.js} +1 -1
- package/dist/{index.1265b7da.js → index.0e7c6d61.js} +1 -1
- package/dist/{index.a5c3b597.js → index.0ed558c6.js} +1 -1
- package/dist/{index.a07a37f5.js → index.1139f21e.js} +5 -5
- package/dist/{index.f307515f.js → index.129d08c4.js} +1 -1
- package/dist/{index.3d0ad149.js → index.155e790a.js} +1 -1
- package/dist/{index.736554af.js → index.1d1a95d4.js} +4 -4
- package/dist/{index.4f7f13dc.js → index.1dabfb0c.js} +1 -1
- package/dist/{index.a2f48a18.js → index.2003fa47.js} +1 -1
- package/dist/{index.9d90fe0c.js → index.23ef6d49.js} +1 -1
- package/dist/{index.ec45956e.js → index.2484f858.js} +1 -1
- package/dist/{index.b1c1a04f.js → index.256635f9.js} +1 -1
- package/dist/{index.2b2f9a52.js → index.25b970da.js} +3 -3
- package/dist/{index.08db6199.js → index.2797c7a7.js} +1 -1
- package/dist/{index.3375d9b3.js → index.2be363fd.js} +1 -1
- package/dist/{index.9364c1c6.js → index.30113922.js} +3 -3
- package/dist/{index.52c2fd8e.js → index.30a4c616.js} +4 -4
- package/dist/{index.18e53c3e.js → index.3342df5b.js} +3 -3
- package/dist/{index.ad1e8ec6.js → index.35bb18c6.js} +3 -3
- package/dist/{index.7d747110.js → index.3a4adc1e.js} +1 -1
- package/dist/{index.cf454df9.js → index.3a576af9.js} +1 -1
- package/dist/{index.c430e388.js → index.3b743171.js} +1 -1
- package/dist/{index.c8311579.js → index.3d004e78.js} +4 -4
- package/dist/{index.e663a7fa.js → index.3d942988.js} +1 -1
- package/dist/{index.8ff3f6fe.js → index.3f213bda.js} +1 -1
- package/dist/{index.4b27a8bd.js → index.41fda479.js} +1 -1
- package/dist/{index.c0b94a81.js → index.42f72a0a.js} +1 -1
- package/dist/{index.aae425fc.js → index.4b5231be.js} +1 -1
- package/dist/{index.277d536f.js → index.4c7f301f.js} +2 -2
- package/dist/{index.bb6ac9de.js → index.4dfa2b20.js} +1 -1
- package/dist/{index.04eb7666.js → index.4dffcb9c.js} +11 -11
- package/dist/{index.19add93d.js → index.4efc8cb4.js} +1 -1
- package/dist/{index.41db2202.js → index.5169ae52.js} +3 -3
- package/dist/{index.81632a09.js → index.517a6724.js} +1 -1
- package/dist/{index.473ddf78.js → index.5282ac36.js} +1 -1
- package/dist/{index.e9598267.js → index.55c534ff.js} +4 -4
- package/dist/{index.d63ceb60.js → index.56714d78.js} +1 -1
- package/dist/{index.402e8bd1.js → index.569dd909.js} +1 -1
- package/dist/{index.ddbff289.js → index.5da9fafd.js} +1 -1
- package/dist/{index.15db1572.js → index.628e9d30.js} +1 -1
- package/dist/{index.7aa3e74c.js → index.647dbf81.js} +1 -1
- package/dist/{index.8f5eeca4.js → index.69bbb9b5.js} +3 -3
- package/dist/{index.d15f9723.js → index.6aebf764.js} +9 -9
- package/dist/{index.1073e205.js → index.6c00772b.js} +1 -1
- package/dist/{index.df57b586.js → index.6dcf7370.js} +4 -4
- package/dist/{index.4b5204bc.js → index.724d1312.js} +3 -3
- package/dist/{index.7bf3d4ae.js → index.7547246a.js} +1 -1
- package/dist/{index.b990c929.js → index.756eb2f9.js} +7 -7
- package/dist/{index.aac60c09.js → index.784a699d.js} +13 -13
- package/dist/{index.43a8365b.js → index.7bdb91f0.js} +5 -5
- package/dist/{index.8eaac06a.js → index.7e878114.js} +1 -1
- package/dist/{index.bee7f9f0.js → index.7f5b95a1.js} +1 -1
- package/dist/{index.63e6ecf1.js → index.809771d5.js} +2 -2
- package/dist/{index.fb9a79e7.js → index.842cdca5.js} +1 -1
- package/dist/{index.7cc6d8c0.js → index.85759566.js} +1 -1
- package/dist/{index.82c8026b.js → index.91061a60.js} +1 -1
- package/dist/{index.041c2add.js → index.95a392ee.js} +2 -2
- package/dist/{index.b1aeb670.js → index.96120e6d.js} +7 -7
- package/dist/{index.1f19f38f.js → index.982477cd.js} +1 -1
- package/dist/{index.a3748b7c.js → index.a24c27e0.js} +1 -1
- package/dist/{index.84542042.js → index.a3eece60.js} +1 -1
- package/dist/{index.ab4abda4.js → index.a9d3e8ad.js} +1 -1
- package/dist/{index.18ea0e80.js → index.af77bced.js} +1 -1
- package/dist/{index.c8e68ad8.js → index.b971ee0c.js} +3 -3
- package/dist/{index.2a095a12.js → index.c076812f.js} +3 -3
- package/dist/{index.ad63dbc8.js → index.c0ecaaa7.js} +1 -1
- package/dist/{index.ae9289ad.js → index.c1b1459e.js} +4 -4
- package/dist/{index.25e849f2.js → index.c36dad5b.js} +1 -1
- package/dist/{index.b8bc3146.js → index.c42286ec.js} +4 -4
- package/dist/{index.cf85278c.js → index.c6979fb6.js} +1 -1
- package/dist/{index.0da4e088.js → index.cb95bd5c.js} +1 -1
- package/dist/{index.040f2309.js → index.cc8daeed.js} +3 -3
- package/dist/{index.f2850cab.js → index.cf4ccd13.js} +3 -3
- package/dist/{index.52d8a6ec.js → index.d7c13f64.js} +5 -5
- package/dist/{index.a18dc115.js → index.d9d9cbb9.js} +1 -1
- package/dist/{index.eba4a007.js → index.daeef8fa.js} +1 -1
- package/dist/{index.11bdbbb0.js → index.e1be038b.js} +3 -3
- package/dist/{index.f0de1d88.js → index.e4afc779.js} +1 -1
- package/dist/{index.7787c681.js → index.e51d0dfe.js} +1 -1
- package/dist/{index.a6fa9957.js → index.e779dc87.js} +1 -1
- package/dist/{index.7158edd8.js → index.e7c54cc7.js} +1 -1
- package/dist/{index.f8240c2c.js → index.e888c32b.js} +4 -4
- package/dist/{index.7d7b57ef.js → index.ea23c736.js} +3 -3
- package/dist/{index.b3720a24.js → index.efe268c2.js} +3 -3
- package/dist/{index.6b13feca.js → index.efffdb7d.js} +3 -3
- package/dist/index.es.js +8 -0
- package/dist/{index.d07f7043.js → index.f37e9e48.js} +1 -1
- package/dist/{index.661a0b24.js → index.f3e48619.js} +9 -9
- package/dist/{index.520ec8bf.js → index.f8df4dfb.js} +1 -1
- package/dist/{index.6a53828a.js → index.faa46a40.js} +1 -1
- package/dist/{index.872decd6.js → index.fc2cb4eb.js} +4 -4
- package/dist/index.umd.js +588 -0
- package/dist/init.018b2925.js +570 -0
- package/dist/{main.9cdf4a3f.js → main.c0ec9a75.js} +8974 -9341
- package/package.json +7 -6
- package/stats.html +4044 -0
- package/tailwind.config.cjs +0 -28
- package/dist/DocFormSend.1491ed08.js +0 -13859
- package/dist/main.es.js +0 -8
- package/dist/main.umd.js +0 -598
- package/vite-plugin-inject-css/index.js +0 -86
- package/vite-plugin-inject-css/utils.js +0 -70
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This plugin will walk through all the generated bundle files,
|
|
3
|
-
* and extract all css references.
|
|
4
|
-
* The extracted css will get added to document.head as an DISABLED style
|
|
5
|
-
* element with an identifer. The ID can later be used to move the
|
|
6
|
-
* style element around.
|
|
7
|
-
*
|
|
8
|
-
* This code is a slighly modified version of
|
|
9
|
-
* https://github.com/Marco-Prontera/vite-plugin-css-injected-by-js
|
|
10
|
-
* MIT license
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import { buildCSSInjectionCode, removeLinkStyleSheets } from './utils.js'
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Inject the CSS compiled with JS.
|
|
17
|
-
*
|
|
18
|
-
*/
|
|
19
|
-
export default function cssInjectedByJsPlugin(
|
|
20
|
-
{ topExecutionPriority, styleId } = {
|
|
21
|
-
topExecutionPriority: true,
|
|
22
|
-
styleId: ''
|
|
23
|
-
}
|
|
24
|
-
) {
|
|
25
|
-
//Globally so we can add it to legacy and non-legacy bundle.
|
|
26
|
-
let cssToInject
|
|
27
|
-
let config
|
|
28
|
-
|
|
29
|
-
return {
|
|
30
|
-
apply: 'build',
|
|
31
|
-
enforce: 'post',
|
|
32
|
-
name: 'css-in-js-plugin',
|
|
33
|
-
configResolved(_config) {
|
|
34
|
-
config = _config
|
|
35
|
-
},
|
|
36
|
-
async generateBundle(opts, bundle) {
|
|
37
|
-
if (config.build.ssr) {
|
|
38
|
-
return
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const htmlFiles = Object.keys(bundle).filter(i => i.endsWith('.html'))
|
|
42
|
-
const cssAssets = Object.keys(bundle).filter(
|
|
43
|
-
i => bundle[i].type == 'asset' && bundle[i].fileName.endsWith('.css')
|
|
44
|
-
)
|
|
45
|
-
const jsAssets = Object.keys(bundle).filter(
|
|
46
|
-
i =>
|
|
47
|
-
bundle[i].type == 'chunk' &&
|
|
48
|
-
bundle[i].fileName.match(/.[cm]?js$/) != null &&
|
|
49
|
-
!bundle[i].fileName.includes('polyfill')
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
const allCssCode = cssAssets.reduce(
|
|
53
|
-
function extractCssCodeAndDeleteFromBundle(previousValue, cssName) {
|
|
54
|
-
const cssAsset = bundle[cssName]
|
|
55
|
-
const result = previousValue + cssAsset.source
|
|
56
|
-
delete bundle[cssName]
|
|
57
|
-
|
|
58
|
-
return result
|
|
59
|
-
},
|
|
60
|
-
''
|
|
61
|
-
)
|
|
62
|
-
|
|
63
|
-
if (allCssCode.length > 0) {
|
|
64
|
-
cssToInject = allCssCode
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
for (const name of htmlFiles) {
|
|
68
|
-
const htmlChunk = bundle[name]
|
|
69
|
-
let replacedHtml = htmlChunk.source
|
|
70
|
-
|
|
71
|
-
cssAssets.forEach(cssName => {
|
|
72
|
-
replacedHtml = removeLinkStyleSheets(replacedHtml, cssName)
|
|
73
|
-
htmlChunk.source = replacedHtml
|
|
74
|
-
})
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
const jsAsset = bundle[jsAssets[0]]
|
|
78
|
-
|
|
79
|
-
const cssInjectionCode = await buildCSSInjectionCode(cssToInject, styleId)
|
|
80
|
-
const appCode = jsAsset.code
|
|
81
|
-
jsAsset.code = topExecutionPriority ? '' : appCode
|
|
82
|
-
jsAsset.code += cssInjectionCode ? cssInjectionCode.code : ''
|
|
83
|
-
jsAsset.code += !topExecutionPriority ? '' : appCode
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { build } from 'vite'
|
|
2
|
-
|
|
3
|
-
const cssInjectedByJsId = '\0vite/all-css'
|
|
4
|
-
|
|
5
|
-
export async function buildCSSInjectionCode(cssToInject, styleId) {
|
|
6
|
-
const res = await build({
|
|
7
|
-
root: '',
|
|
8
|
-
configFile: false,
|
|
9
|
-
logLevel: 'error',
|
|
10
|
-
plugins: [injectionCSSCodePlugin(cssToInject, styleId)],
|
|
11
|
-
build: {
|
|
12
|
-
write: false,
|
|
13
|
-
target: 'es2015',
|
|
14
|
-
minify: 'esbuild',
|
|
15
|
-
assetsDir: '',
|
|
16
|
-
rollupOptions: {
|
|
17
|
-
input: {
|
|
18
|
-
['all-css']: cssInjectedByJsId
|
|
19
|
-
},
|
|
20
|
-
output: {
|
|
21
|
-
format: 'iife',
|
|
22
|
-
manualChunks: undefined
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
})
|
|
27
|
-
const _cssChunk = Array.isArray(res) ? res[0] : res
|
|
28
|
-
if (!('output' in _cssChunk)) return null
|
|
29
|
-
|
|
30
|
-
return _cssChunk.output[0]
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @param {string} cssToInject
|
|
35
|
-
* @param {string|null} styleId
|
|
36
|
-
*/
|
|
37
|
-
function injectionCSSCodePlugin(cssToInject, styleId) {
|
|
38
|
-
return {
|
|
39
|
-
name: 'vite:injection-css-code-plugin',
|
|
40
|
-
resolveId(id) {
|
|
41
|
-
if (id == cssInjectedByJsId) {
|
|
42
|
-
return id
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
load(id) {
|
|
46
|
-
if (id == cssInjectedByJsId) {
|
|
47
|
-
const cssCode = JSON.stringify(cssToInject.trim())
|
|
48
|
-
|
|
49
|
-
return `try {
|
|
50
|
-
if (typeof document != 'undefined') {
|
|
51
|
-
var elementStyle = document.createElement('style');
|
|
52
|
-
${typeof styleId == 'string' && styleId.length > 0 ? `elementStyle.id = '${styleId}';` : ''}
|
|
53
|
-
elementStyle.appendChild(document.createTextNode(${cssCode}));
|
|
54
|
-
document.head.appendChild(elementStyle);
|
|
55
|
-
elementStyle.disabled = true;
|
|
56
|
-
}
|
|
57
|
-
} catch(e) {
|
|
58
|
-
console.error('vite-plugin-css-injected-by-js', e);
|
|
59
|
-
}`
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export function removeLinkStyleSheets(html, cssFileName) {
|
|
66
|
-
const removeCSS = new RegExp(
|
|
67
|
-
`<link rel=".*"[^>]*?href=".*/?${cssFileName}"[^>]*?>`
|
|
68
|
-
)
|
|
69
|
-
return html.replace(removeCSS, '')
|
|
70
|
-
}
|