diff --git a/client/web/compose/src/components/PageBlocks/Configurator.vue b/client/web/compose/src/components/PageBlocks/Configurator.vue index e924d7942..7184867e3 100644 --- a/client/web/compose/src/components/PageBlocks/Configurator.vue +++ b/client/web/compose/src/components/PageBlocks/Configurator.vue @@ -21,69 +21,73 @@ active :title="$t('general.label.general')" > -
- + - - - - + + - - - + + + + + + - - - - - + + - - - + + + + + + - - - + + + - {{ $t('general.wrap') }} - + - - - - {{ $t('general.refresh.enabled') }} - - - - - - + + + {{ $t('general.refresh.show') }} + + - - - -
+ + + + + {{ block.description }} diff --git a/client/web/compose/src/components/PageBlocks/Wrap/Plain.vue b/client/web/compose/src/components/PageBlocks/Wrap/Plain.vue index 3e831a53f..c663ee3f9 100644 --- a/client/web/compose/src/components/PageBlocks/Wrap/Plain.vue +++ b/client/web/compose/src/components/PageBlocks/Wrap/Plain.vue @@ -27,7 +27,7 @@ class="ml-auto" > {{ block.description }} diff --git a/client/web/compose/src/components/PageBlocks/Wrap/base.vue b/client/web/compose/src/components/PageBlocks/Wrap/base.vue index 28a494f1c..2418ae61a 100644 --- a/client/web/compose/src/components/PageBlocks/Wrap/base.vue +++ b/client/web/compose/src/components/PageBlocks/Wrap/base.vue @@ -48,14 +48,14 @@ export default { this.block.title, this.block.description, this.block.options.magnifyOption, - this.block.options.refreshEnabled, + this.block.options.showRefresh, ].some(c => !!c) }, showOptions () { return [ this.block.options.magnifyOption, - this.block.options.refreshEnabled, + this.block.options.showRefresh, ].some(c => !!c) }, }, diff --git a/client/web/reporter/src/components/Report/Blocks/index.vue b/client/web/reporter/src/components/Report/Blocks/index.vue index 8e7db89c7..0e2bf7890 100644 --- a/client/web/reporter/src/components/Report/Blocks/index.vue +++ b/client/web/reporter/src/components/Report/Blocks/index.vue @@ -4,70 +4,43 @@ v-bind="$props" v-on="$listeners" > - - - + @update="updateDataframes({ displayElementIndex, definition: $event })" + /> + + diff --git a/lib/js/src/compose/types/page-block/calendar/page-block.ts b/lib/js/src/compose/types/page-block/calendar/page-block.ts index c9f5fe2c3..c22241977 100644 --- a/lib/js/src/compose/types/page-block/calendar/page-block.ts +++ b/lib/js/src/compose/types/page-block/calendar/page-block.ts @@ -36,7 +36,7 @@ class CalendarOptions { public header: Partial = {} public locale = 'en-gb' public refreshRate = 0 - public refreshEnabled = false + public showRefresh = false public magnifyOption = '' } @@ -61,7 +61,7 @@ export class PageBlockCalendar extends PageBlock { if (!o) return Apply(this.options, o, Number, 'refreshRate') - Apply(this.options, o, Boolean, 'refreshEnabled') + Apply(this.options, o, Boolean, 'showRefresh') Apply(this.options, o, String, 'magnifyOption') diff --git a/lib/js/src/compose/types/page-block/chart.ts b/lib/js/src/compose/types/page-block/chart.ts index bee9cc9c1..59b5df37a 100644 --- a/lib/js/src/compose/types/page-block/chart.ts +++ b/lib/js/src/compose/types/page-block/chart.ts @@ -6,7 +6,7 @@ const kind = 'Chart' interface Options { chartID: string; refreshRate: number; - refreshEnabled: boolean; + showRefresh: boolean; magnifyOption: string; } @@ -14,7 +14,7 @@ const defaults: Readonly = Object.freeze({ chartID: NoID, refreshRate: 0, magnifyOption: '', - refreshEnabled: false, + showRefresh: false, }) export class PageBlockChart extends PageBlock { @@ -32,7 +32,7 @@ export class PageBlockChart extends PageBlock { Apply(this.options, o, CortezaID, 'chartID') Apply(this.options, o, Number, 'refreshRate') - Apply(this.options, o, Boolean, 'refreshEnabled') + Apply(this.options, o, Boolean, 'showRefresh') Apply(this.options, o, String, 'magnifyOption') } } diff --git a/lib/js/src/compose/types/page-block/comment.ts b/lib/js/src/compose/types/page-block/comment.ts index c2a6fb5fb..3892e5d78 100644 --- a/lib/js/src/compose/types/page-block/comment.ts +++ b/lib/js/src/compose/types/page-block/comment.ts @@ -10,7 +10,7 @@ interface Options { referenceField: string; sortDirection: string; refreshRate: number; - refreshEnabled: boolean; + showRefresh: boolean; magnifyOption: string; } @@ -22,7 +22,7 @@ const defaults: Readonly = Object.freeze({ sortDirection: '', referenceField: '', refreshRate: 0, - refreshEnabled: false, + showRefresh: false, magnifyOption: '', }) @@ -41,7 +41,7 @@ export class PageBlockComment extends PageBlock { Apply(this.options, o, CortezaID, 'moduleID') Apply(this.options, o, String, 'titleField', 'contentField', 'referenceField', 'filter', 'sortDirection', 'magnifyOption') Apply(this.options, o, Number, 'refreshRate') - Apply(this.options, o, Boolean, 'refreshEnabled') + Apply(this.options, o, Boolean, 'showRefresh') } } diff --git a/lib/js/src/compose/types/page-block/iframe.ts b/lib/js/src/compose/types/page-block/iframe.ts index 764d77053..7e5c2ae81 100644 --- a/lib/js/src/compose/types/page-block/iframe.ts +++ b/lib/js/src/compose/types/page-block/iframe.ts @@ -8,7 +8,7 @@ interface Options { src: string; wrap: PageBlockWrap; refreshRate: number; - refreshEnabled: boolean; + showRefresh: boolean; magnifyOption: string; } @@ -17,7 +17,7 @@ const defaults: Readonly = Object.freeze({ src: '', wrap: 'Plain', refreshRate: 0, - refreshEnabled: false, + showRefresh: false, magnifyOption: '', }) @@ -36,7 +36,7 @@ export class PageBlockIFrame extends PageBlock { Apply(this.options, o, String, 'srcField', 'src', 'wrap', 'magnifyOption') Apply(this.options, o, Number, 'refreshRate') - Apply(this.options, o, Boolean, 'refreshEnabled') + Apply(this.options, o, Boolean, 'showRefresh') } } diff --git a/lib/js/src/compose/types/page-block/metric.ts b/lib/js/src/compose/types/page-block/metric.ts index 5eba42cd0..176c6f804 100644 --- a/lib/js/src/compose/types/page-block/metric.ts +++ b/lib/js/src/compose/types/page-block/metric.ts @@ -41,13 +41,13 @@ interface Metric { interface Options { metrics: Array; refreshRate: number; - refreshEnabled: boolean; + showRefresh: boolean; } const defaults: Readonly = Object.freeze({ metrics: [], refreshRate: 0, - refreshEnabled: false, + showRefresh: false, }) export class PageBlockMetric extends PageBlock { @@ -63,7 +63,7 @@ export class PageBlockMetric extends PageBlock { applyOptions (o?: Partial): void { if (!o) return Apply(this.options, o, Number, 'refreshRate') - Apply(this.options, o, Boolean, 'refreshEnabled') + Apply(this.options, o, Boolean, 'showRefresh') if (o.metrics) { this.options.metrics = o.metrics } diff --git a/lib/js/src/compose/types/page-block/progress.ts b/lib/js/src/compose/types/page-block/progress.ts index 72e9d6d30..9e97e9136 100644 --- a/lib/js/src/compose/types/page-block/progress.ts +++ b/lib/js/src/compose/types/page-block/progress.ts @@ -34,7 +34,7 @@ interface Options { maxValue: ValueOptions; display: DisplayOptions; refreshRate: number; - refreshEnabled: boolean; + showRefresh: boolean; } const defaults: Readonly = Object.freeze({ @@ -71,7 +71,7 @@ const defaults: Readonly = Object.freeze({ thresholds: [], }, refreshRate: 0, - refreshEnabled: false, + showRefresh: false, }) export class PageBlockProgress extends PageBlock { @@ -88,7 +88,7 @@ export class PageBlockProgress extends PageBlock { if (!o) return Apply(this.options, o, Number, 'refreshRate') - Apply(this.options, o, Boolean, 'refreshEnabled') + Apply(this.options, o, Boolean, 'showRefresh') if (o.value) { this.options.value = { ...this.options.value, ...o.value } diff --git a/lib/js/src/compose/types/page-block/record-list.ts b/lib/js/src/compose/types/page-block/record-list.ts index 6add972c0..3c0edc3e9 100644 --- a/lib/js/src/compose/types/page-block/record-list.ts +++ b/lib/js/src/compose/types/page-block/record-list.ts @@ -30,7 +30,7 @@ interface Options { showTotalCount: boolean; showDeletedRecordsOption: boolean; refreshRate: number; - refreshEnabled: boolean; + showRefresh: boolean; // Record-lines editable: boolean; @@ -94,7 +94,7 @@ const defaults: Readonly = Object.freeze({ selectionButtons: [], refreshRate: 0, - refreshEnabled: false, + showRefresh: false, }) export class PageBlockRecordList extends PageBlock { @@ -146,7 +146,7 @@ export class PageBlockRecordList extends PageBlock { 'editable', 'draggable', 'linkToParent', - 'refreshEnabled', + 'showRefresh', ) if (o.selectionButtons) { diff --git a/lib/js/src/compose/types/page-block/record-organizer.ts b/lib/js/src/compose/types/page-block/record-organizer.ts index 11e7e40a5..e84c3dcf1 100644 --- a/lib/js/src/compose/types/page-block/record-organizer.ts +++ b/lib/js/src/compose/types/page-block/record-organizer.ts @@ -11,7 +11,7 @@ interface Options { groupField: string; group: string; refreshRate: number; - refreshEnabled: boolean; + showRefresh: boolean; } const defaults: Readonly = Object.freeze({ @@ -23,7 +23,7 @@ const defaults: Readonly = Object.freeze({ groupField: '', group: '', refreshRate: 0, - refreshEnabled: false, + showRefresh: false, }) export class PageBlockRecordOrganizer extends PageBlock { @@ -42,7 +42,7 @@ export class PageBlockRecordOrganizer extends PageBlock { Apply(this.options, o, CortezaID, 'moduleID') Apply(this.options, o, String, 'labelField', 'descriptionField', 'filter', 'positionField', 'groupField', 'group') Apply(this.options, o, Number, 'refreshRate') - Apply(this.options, o, Boolean, 'refreshEnabled') + Apply(this.options, o, Boolean, 'showRefresh') } } diff --git a/lib/js/src/compose/types/page-block/record-revisions.ts b/lib/js/src/compose/types/page-block/record-revisions.ts index 14448e21a..8d399a89e 100644 --- a/lib/js/src/compose/types/page-block/record-revisions.ts +++ b/lib/js/src/compose/types/page-block/record-revisions.ts @@ -17,7 +17,7 @@ interface Options { // referenced fields (records, users) we want to expand expRefFields: string[]; refreshRate: number; - refreshEnabled: boolean; + showRefresh: boolean; magnifyOption: string; } @@ -26,7 +26,7 @@ const defaults: Readonly = Object.freeze({ displayedFields: [], expRefFields: [], refreshRate: 0, - refreshEnabled: false, + showRefresh: false, magnifyOption: '', }) @@ -43,7 +43,7 @@ export class PageBlockRecordRevisions extends PageBlock { applyOptions (o?: Partial): void { if (!o) return - Apply(this.options, o, Boolean, 'preload', 'refreshEnabled') + Apply(this.options, o, Boolean, 'preload', 'showRefresh') Apply(this.options, o, Number, 'refreshRate') Apply(this.options, o, String, 'magnifyOption') diff --git a/lib/js/src/compose/types/page-block/report.ts b/lib/js/src/compose/types/page-block/report.ts index 5e5a7f149..f1660f85f 100644 --- a/lib/js/src/compose/types/page-block/report.ts +++ b/lib/js/src/compose/types/page-block/report.ts @@ -8,7 +8,7 @@ interface Options { scenarioID: string; elementID: string; refreshRate: number; - refreshEnabled: boolean; + showRefresh: boolean; magnifyOption: string; } @@ -17,7 +17,7 @@ const defaults: Readonly = Object.freeze({ scenarioID: NoID, elementID: NoID, refreshRate: 0, - refreshEnabled: false, + showRefresh: false, magnifyOption: '', }) @@ -36,7 +36,7 @@ export class PageBlockReport extends PageBlock { Apply(this.options, o, CortezaID, 'reportID', 'scenarioID', 'elementID') Apply(this.options, o, Number, 'refreshRate') - Apply(this.options, o, Boolean, 'refreshEnabled') + Apply(this.options, o, Boolean, 'showRefresh') Apply(this.options, o, String, 'magnifyOption') } } diff --git a/lib/js/src/compose/types/page-block/social-feed.ts b/lib/js/src/compose/types/page-block/social-feed.ts index 9c07a8c96..b06cc2819 100644 --- a/lib/js/src/compose/types/page-block/social-feed.ts +++ b/lib/js/src/compose/types/page-block/social-feed.ts @@ -7,7 +7,7 @@ interface Options { fields: unknown[]; profileSourceField: string; profileUrl: string; - refreshEnabled: boolean; + showRefresh: boolean; refreshRate: number; } @@ -16,7 +16,7 @@ const defaults: Readonly = Object.freeze({ fields: [], profileSourceField: '', profileUrl: '', - refreshEnabled: false, + showRefresh: false, refreshRate: 0, }) @@ -36,7 +36,7 @@ export class PageBlockSocialFeed extends PageBlock { Apply(this.options, o, CortezaID, 'moduleID') Apply(this.options, o, String, 'profileSourceField', 'profileUrl') Apply(this.options, o, Number, 'refreshRate') - Apply(this.options, o, Boolean, 'refreshEnabled') + Apply(this.options, o, Boolean, 'showRefresh') if (o.fields) { this.options.fields = o.fields diff --git a/locale/en/corteza-webapp-compose/block.yaml b/locale/en/corteza-webapp-compose/block.yaml index ec388deac..f0c6fc4b5 100644 --- a/locale/en/corteza-webapp-compose/block.yaml +++ b/locale/en/corteza-webapp-compose/block.yaml @@ -120,8 +120,9 @@ general: fullscreen: Fullscreen wrap: Display block as a card refresh: - enabled: Enabled label: Refresh + auto: Auto refresh + show: Show refresh button description: Setting value to 5 seconds or more enables auto-refresh rate: seconds label: