@smartbit4all/ng-client 3.3.205 → 3.3.207
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/esm2020/lib/smart-form/services/smartform.layout-definition.service.mjs +41 -1
- package/esm2020/lib/smart-grid/smart-grid.component.mjs +2 -1
- package/fesm2015/smartbit4all-ng-client.mjs +41 -0
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +41 -0
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-form/services/smartform.layout-definition.service.d.ts +3 -0
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.3.207.tgz +0 -0
- package/smartbit4all-ng-client-3.3.205.tgz +0 -0
|
@@ -8206,6 +8206,8 @@ class SmartformLayoutDefinitionService {
|
|
|
8206
8206
|
return this.createSortable(config.layoutDefinition);
|
|
8207
8207
|
case SmartFormWidgetType.MONTH_PICKER:
|
|
8208
8208
|
return this.createMonthPicker(config.layoutDefinition);
|
|
8209
|
+
case SmartFormWidgetType.YOUTUBE_PLAYER:
|
|
8210
|
+
return this.createYoutubePlayer(config.layoutDefinition);
|
|
8209
8211
|
}
|
|
8210
8212
|
return;
|
|
8211
8213
|
}
|
|
@@ -8618,6 +8620,44 @@ class SmartformLayoutDefinitionService {
|
|
|
8618
8620
|
};
|
|
8619
8621
|
return widget;
|
|
8620
8622
|
}
|
|
8623
|
+
createYoutubePlayer(layoutDefinition) {
|
|
8624
|
+
const { link, startSeconds, endSeconds } = this.extractYoutubePlayerProps(layoutDefinition);
|
|
8625
|
+
return {
|
|
8626
|
+
type: SmartFormWidgetType.YOUTUBE_PLAYER,
|
|
8627
|
+
key: layoutDefinition.key,
|
|
8628
|
+
label: layoutDefinition.label,
|
|
8629
|
+
hint: layoutDefinition.hint,
|
|
8630
|
+
valueChangeMode: layoutDefinition.valueChangeMode,
|
|
8631
|
+
showLabel: layoutDefinition.showLabel,
|
|
8632
|
+
cssClass: layoutDefinition.cssClass,
|
|
8633
|
+
cssLabelClass: layoutDefinition.cssLabelClass,
|
|
8634
|
+
style: layoutDefinition.style,
|
|
8635
|
+
labelStyle: layoutDefinition.labelStyle,
|
|
8636
|
+
link,
|
|
8637
|
+
startSeconds,
|
|
8638
|
+
endSeconds,
|
|
8639
|
+
};
|
|
8640
|
+
}
|
|
8641
|
+
extractYoutubePlayerProps(layoutDefinition) {
|
|
8642
|
+
const props = layoutDefinition.properties;
|
|
8643
|
+
if (!props) {
|
|
8644
|
+
this.logMissingProperty(layoutDefinition, 'properties');
|
|
8645
|
+
return { link: '', startSeconds: 0 };
|
|
8646
|
+
}
|
|
8647
|
+
const link = (props['link'] ? props['link'] : '');
|
|
8648
|
+
if (!link || link.length < 1) {
|
|
8649
|
+
this.logMissingProperty(layoutDefinition, 'link');
|
|
8650
|
+
}
|
|
8651
|
+
const startSeconds = (props['startSeconds'] ? props['startSeconds'] : 0);
|
|
8652
|
+
let endSeconds = undefined;
|
|
8653
|
+
if (props['endSeconds']) {
|
|
8654
|
+
endSeconds = props['endSeconds'];
|
|
8655
|
+
}
|
|
8656
|
+
return { link, startSeconds, endSeconds };
|
|
8657
|
+
}
|
|
8658
|
+
logMissingProperty(layoutDefinition, prop) {
|
|
8659
|
+
console.error(`Property <${prop}> missing from layout definition: ${JSON.stringify(layoutDefinition)}`);
|
|
8660
|
+
}
|
|
8621
8661
|
}
|
|
8622
8662
|
SmartformLayoutDefinitionService.DEFAULT_QUILL_MODULES = {
|
|
8623
8663
|
toolbar: {
|
|
@@ -10568,6 +10608,7 @@ class SmartGridComponent {
|
|
|
10568
10608
|
.rows.filter((gridRow) => gridRow.selected)
|
|
10569
10609
|
.map((gridRow) => gridRow.id);
|
|
10570
10610
|
tableConfig.selection = new SelectionModel(isMultiple, selectedIds);
|
|
10611
|
+
tableConfig.showCheckboxInHeader = isMultiple;
|
|
10571
10612
|
}
|
|
10572
10613
|
this.smartTable = new SmartTable(tableConfig);
|
|
10573
10614
|
if (this.componentRefTable) {
|