@itfin/components 1.0.59 → 1.0.64
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/package.json +1 -1
- package/src/assets/scss/components/_selected.scss +1 -1
- package/src/components/app/message.js +3 -2
- package/src/components/modal/Modal.vue +1 -2
- package/src/components/text-field/TextField.vue +2 -1
- package/src/nuxt-config/componentNormalizer.js +113 -0
- package/src/nuxt-config/config.js +9 -0
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Vue from 'vue';
|
|
2
2
|
import ToastContainer from './ToastContainer.vue';
|
|
3
|
+
|
|
3
4
|
const MessageConstructor = Vue.extend(ToastContainer);
|
|
4
5
|
|
|
5
6
|
const instances = [];
|
|
@@ -19,8 +20,8 @@ const Message = function (options) {
|
|
|
19
20
|
'itf-toast-container toast-container',
|
|
20
21
|
'is-' + position,
|
|
21
22
|
hasMask ? 'has-mask' : ''
|
|
22
|
-
].filter(
|
|
23
|
-
document.
|
|
23
|
+
].filter(Boolean).join(' ');
|
|
24
|
+
document.body.appendChild(containerEl);
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
if (options.zIndex) {
|
|
@@ -121,8 +121,7 @@ class itfModal extends Vue {
|
|
|
121
121
|
}
|
|
122
122
|
if (this.appendToBody && this.$el instanceof Node && this.$el.parentNode) {
|
|
123
123
|
this.$el.parentNode.removeChild(this.$el);
|
|
124
|
-
|
|
125
|
-
elContext.appendChild(this.$el);
|
|
124
|
+
document.body.appendChild(this.$el); // should append only to body
|
|
126
125
|
}
|
|
127
126
|
const { default: Modal } = await import('bootstrap/js/src/modal.js');
|
|
128
127
|
this.modalEl = new Modal(this.$el);
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
:placeholder="placeholder"
|
|
14
14
|
:class="{ 'is-invalid': isInvalid(), 'is-valid': isSuccess() }"
|
|
15
15
|
class="itf-text-field__input form-control"
|
|
16
|
-
type="
|
|
16
|
+
:type="type"
|
|
17
17
|
:value="value"
|
|
18
18
|
:disabled="disabled"
|
|
19
19
|
:readonly="readonly"
|
|
@@ -71,6 +71,7 @@ class itfTextField extends Vue {
|
|
|
71
71
|
@Prop(Boolean) clearable;
|
|
72
72
|
@Prop(Boolean) disabled;
|
|
73
73
|
@Prop(Boolean) readonly;
|
|
74
|
+
@Prop({ type: String, default: 'text' }) type;
|
|
74
75
|
@Prop({ type: [Number, String], default: 0 }) delayInput;
|
|
75
76
|
|
|
76
77
|
onInput = null;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
// modified copy of https://github.com/vuejs/vue-loader/blob/master/lib/runtime/componentNormalizer.js
|
|
2
|
+
// contains code to inject styles from options.injectStyles
|
|
3
|
+
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/* globals __VUE_SSR_CONTEXT__ */
|
|
6
|
+
|
|
7
|
+
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
8
|
+
// This module is a runtime utility for cleaner component module output and will
|
|
9
|
+
// be included in the final webpack user bundle.
|
|
10
|
+
|
|
11
|
+
export default function normalizeComponent (
|
|
12
|
+
scriptExports,
|
|
13
|
+
render,
|
|
14
|
+
staticRenderFns,
|
|
15
|
+
functionalTemplate,
|
|
16
|
+
injectStyles,
|
|
17
|
+
scopeId,
|
|
18
|
+
moduleIdentifier, /* server only */
|
|
19
|
+
shadowMode /* vue-cli only */
|
|
20
|
+
) {
|
|
21
|
+
// Vue.extend constructor export interop
|
|
22
|
+
var options = typeof scriptExports === 'function'
|
|
23
|
+
? scriptExports.options
|
|
24
|
+
: scriptExports
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
// render functions
|
|
28
|
+
if (render) {
|
|
29
|
+
options.render = render
|
|
30
|
+
options.staticRenderFns = staticRenderFns
|
|
31
|
+
options._compiled = true
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// functional template
|
|
35
|
+
if (functionalTemplate) {
|
|
36
|
+
options.functional = true
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// scopedId
|
|
40
|
+
if (scopeId) {
|
|
41
|
+
options._scopeId = 'data-v-' + scopeId
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
var hook
|
|
45
|
+
if (moduleIdentifier) { // server build
|
|
46
|
+
hook = function (context) {
|
|
47
|
+
// 2.3 injection
|
|
48
|
+
context =
|
|
49
|
+
context || // cached call
|
|
50
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
51
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
52
|
+
// 2.2 with runInNewContext: true
|
|
53
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
54
|
+
context = __VUE_SSR_CONTEXT__
|
|
55
|
+
}
|
|
56
|
+
// modification start
|
|
57
|
+
if (Array.isArray(options.injectStyles)) {
|
|
58
|
+
options.injectStyles.forEach((style) => {
|
|
59
|
+
if (style.__inject__) { // eslint-disable-line no-underscore-dangle
|
|
60
|
+
style.__inject__(context); // eslint-disable-line no-underscore-dangle
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
// modification end
|
|
65
|
+
|
|
66
|
+
// inject component styles
|
|
67
|
+
if (injectStyles) {
|
|
68
|
+
injectStyles.call(this, context)
|
|
69
|
+
}
|
|
70
|
+
// register component module identifier for async chunk inferrence
|
|
71
|
+
if (context && context._registeredComponents) {
|
|
72
|
+
context._registeredComponents.add(moduleIdentifier)
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
// used by ssr in case component is cached and beforeCreate
|
|
76
|
+
// never gets called
|
|
77
|
+
options._ssrRegister = hook
|
|
78
|
+
} else if (injectStyles) {
|
|
79
|
+
hook = shadowMode
|
|
80
|
+
? function () {
|
|
81
|
+
injectStyles.call(
|
|
82
|
+
this,
|
|
83
|
+
(options.functional ? this.parent : this).$root.$options.shadowRoot
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
: injectStyles
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (hook) {
|
|
90
|
+
if (options.functional) {
|
|
91
|
+
// for template-only hot-reload because in that case the render fn doesn't
|
|
92
|
+
// go through the normalizer
|
|
93
|
+
options._injectStyles = hook
|
|
94
|
+
// register for functional component in vue file
|
|
95
|
+
var originalRender = options.render
|
|
96
|
+
options.render = function renderWithStyleInjection (h, context) {
|
|
97
|
+
hook.call(context)
|
|
98
|
+
return originalRender(h, context)
|
|
99
|
+
}
|
|
100
|
+
} else {
|
|
101
|
+
// inject component registration as beforeCreate hook
|
|
102
|
+
var existing = options.beforeCreate
|
|
103
|
+
options.beforeCreate = existing
|
|
104
|
+
? [].concat(existing, hook)
|
|
105
|
+
: [hook]
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return {
|
|
110
|
+
exports: scriptExports,
|
|
111
|
+
options: options
|
|
112
|
+
}
|
|
113
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import webpack from 'webpack';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
|
|
4
|
+
export default function extend(config) {
|
|
5
|
+
config.plugins.push(new webpack.NormalModuleReplacementPlugin(
|
|
6
|
+
/vue-loader\/lib\/runtime\/componentNormalizer.js/,
|
|
7
|
+
path.join(__dirname, 'componentNormalizer.js'),
|
|
8
|
+
));
|
|
9
|
+
};
|