saasufy-components 6.0.0 → 6.0.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/README.md +1 -1
- package/collection-reducer.js +11 -2
- package/collection-viewer.js +10 -1
- package/input-provider.js +1 -1
- package/model-input.js +7 -0
- package/model-text.js +7 -0
- package/model-viewer.js +8 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -692,7 +692,7 @@ This component can be configured to provide its data to multiple components (con
|
|
|
692
692
|
- `autocapitalize`: Can be `on` or `off` - It will set the auto-capitalize attribute on the inner input element. This is useful for mobile devices to enable or disable auto-capitalization of the first character which is typed into the input element.
|
|
693
693
|
- `autocorrect`: Can be `on` or `off` - It will set the auto-correct attribute on the inner input element. This is useful for mobile devices to enable or disable auto-correct.
|
|
694
694
|
- `input-props`: Can be used to set additional attributes on the inner `input` element. Must be in the format `attr1=value1,attr2=value2`.
|
|
695
|
-
- `
|
|
695
|
+
- `skip-init-change`: This attribute can be used to prevent an `input-provider` of type `select` from triggering a change when initialized with a default option. By default, the `input-provider` will trigger a change when initialized with a default value.
|
|
696
696
|
|
|
697
697
|
### input-combiner
|
|
698
698
|
|
package/collection-reducer.js
CHANGED
|
@@ -138,6 +138,7 @@ class CollectionReducer extends SocketConsumer {
|
|
|
138
138
|
|
|
139
139
|
renderReduction() {
|
|
140
140
|
let viewportSlot = this.shadowRoot.querySelector('slot[name="viewport"]');
|
|
141
|
+
if (!viewportSlot) return;
|
|
141
142
|
|
|
142
143
|
let viewportNode = viewportSlot.assignedNodes()[0];
|
|
143
144
|
if (!viewportNode) return;
|
|
@@ -176,11 +177,19 @@ class CollectionReducer extends SocketConsumer {
|
|
|
176
177
|
}
|
|
177
178
|
|
|
178
179
|
render() {
|
|
180
|
+
if (
|
|
181
|
+
!this.hasAttribute('collection-type') ||
|
|
182
|
+
!this.hasAttribute('collection-fields') ||
|
|
183
|
+
!this.hasAttribute('collection-view') ||
|
|
184
|
+
!this.getAttribute('collection-view-params')
|
|
185
|
+
) {
|
|
186
|
+
return;
|
|
187
|
+
};
|
|
179
188
|
let collectionType = this.getAttribute('collection-type');
|
|
180
189
|
let collectionFields = this.getAttribute('collection-fields') || '';
|
|
181
|
-
let collectionView = this.getAttribute('collection-view');
|
|
182
|
-
let collectionPageSize = this.getAttribute('collection-page-size');
|
|
190
|
+
let collectionView = this.getAttribute('collection-view') || 'defaultView';
|
|
183
191
|
let collectionViewParams = this.getAttribute('collection-view-params') || '';
|
|
192
|
+
let collectionPageSize = this.getAttribute('collection-page-size');
|
|
184
193
|
let collectionPageOffset = this.getAttribute('collection-page-offset');
|
|
185
194
|
let collectionGetCount = this.hasAttribute('collection-get-count');
|
|
186
195
|
let hideErrorLogs = this.hasAttribute('hide-error-logs');
|
package/collection-viewer.js
CHANGED
|
@@ -201,6 +201,7 @@ class CollectionViewer extends SocketConsumer {
|
|
|
201
201
|
|
|
202
202
|
renderList() {
|
|
203
203
|
let viewportSlot = this.shadowRoot.querySelector('slot[name="viewport"]');
|
|
204
|
+
if (!viewportSlot) return;
|
|
204
205
|
|
|
205
206
|
let viewportNode = viewportSlot.assignedNodes()[0];
|
|
206
207
|
if (!viewportNode) return;
|
|
@@ -271,12 +272,20 @@ class CollectionViewer extends SocketConsumer {
|
|
|
271
272
|
}
|
|
272
273
|
|
|
273
274
|
render() {
|
|
275
|
+
if (
|
|
276
|
+
!this.hasAttribute('collection-type') ||
|
|
277
|
+
!this.hasAttribute('collection-fields') ||
|
|
278
|
+
!this.hasAttribute('collection-view') ||
|
|
279
|
+
!this.getAttribute('collection-view-params')
|
|
280
|
+
) {
|
|
281
|
+
return;
|
|
282
|
+
};
|
|
274
283
|
let collectionType = this.getAttribute('collection-type');
|
|
275
284
|
let collectionFields = this.getAttribute('collection-fields') || '';
|
|
276
285
|
let collectionView = this.getAttribute('collection-view') || 'defaultView';
|
|
277
|
-
let collectionPageSize = this.getAttribute('collection-page-size');
|
|
278
286
|
let collectionViewParams = this.getAttribute('collection-view-params') || '';
|
|
279
287
|
let collectionViewPrimaryFields = this.getAttribute('collection-view-primary-fields');
|
|
288
|
+
let collectionPageSize = this.getAttribute('collection-page-size');
|
|
280
289
|
let collectionPageOffset = this.getAttribute('collection-page-offset');
|
|
281
290
|
let collectionGetCount = this.hasAttribute('collection-get-count');
|
|
282
291
|
let hideErrorLogs = this.hasAttribute('hide-error-logs');
|
package/input-provider.js
CHANGED
|
@@ -194,7 +194,7 @@ class InputProvider extends HTMLElement {
|
|
|
194
194
|
let destroyHandlers = this.updateConsumerElementsOnEdit();
|
|
195
195
|
|
|
196
196
|
if (value) {
|
|
197
|
-
if (this.hasAttribute('
|
|
197
|
+
if (type === 'select' && !this.hasAttribute('skip-init-change')) {
|
|
198
198
|
this.forceTriggerChange = true;
|
|
199
199
|
}
|
|
200
200
|
this.value = value;
|
package/model-input.js
CHANGED
|
@@ -105,6 +105,13 @@ class ModelInput extends SocketConsumer {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
render() {
|
|
108
|
+
if (
|
|
109
|
+
!this.hasAttribute('model-type') ||
|
|
110
|
+
!this.hasAttribute('model-id') ||
|
|
111
|
+
!this.hasAttribute('model-field')
|
|
112
|
+
) {
|
|
113
|
+
return;
|
|
114
|
+
};
|
|
108
115
|
this.innerHTML = '';
|
|
109
116
|
let socketInstanceProperty = this.getAttribute('socket-instance-property');
|
|
110
117
|
let showErrorMessage = this.hasAttribute('show-error-message');
|
package/model-text.js
CHANGED
|
@@ -47,6 +47,13 @@ class ModelText extends SocketConsumer {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
render() {
|
|
50
|
+
if (
|
|
51
|
+
!this.hasAttribute('model-type') ||
|
|
52
|
+
!this.hasAttribute('model-id') ||
|
|
53
|
+
!this.hasAttribute('model-field')
|
|
54
|
+
) {
|
|
55
|
+
return;
|
|
56
|
+
};
|
|
50
57
|
this.innerHTML = '';
|
|
51
58
|
let socketInstanceProperty = this.getAttribute('socket-instance-property');
|
|
52
59
|
let modelType = this.getAttribute('model-type');
|
package/model-viewer.js
CHANGED
|
@@ -54,6 +54,7 @@ class ModelViewer extends SocketConsumer {
|
|
|
54
54
|
|
|
55
55
|
renderItem() {
|
|
56
56
|
let viewportSlot = this.shadowRoot.querySelector('slot[name="viewport"]');
|
|
57
|
+
if (!viewportSlot) return;
|
|
57
58
|
|
|
58
59
|
let viewportNode = viewportSlot.assignedNodes()[0];
|
|
59
60
|
if (!viewportNode) return;
|
|
@@ -89,6 +90,13 @@ class ModelViewer extends SocketConsumer {
|
|
|
89
90
|
}
|
|
90
91
|
|
|
91
92
|
render() {
|
|
93
|
+
if (
|
|
94
|
+
!this.hasAttribute('model-type') ||
|
|
95
|
+
!this.hasAttribute('model-id') ||
|
|
96
|
+
!this.hasAttribute('model-fields')
|
|
97
|
+
) {
|
|
98
|
+
return;
|
|
99
|
+
};
|
|
92
100
|
let socketInstanceProperty = this.getAttribute('socket-instance-property');
|
|
93
101
|
let modelType = this.getAttribute('model-type');
|
|
94
102
|
let modelId = this.getAttribute('model-id');
|