Skip to content

Commit

Permalink
reverting changes for pkg:: call.
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikeyakirar committed Mar 5, 2024
1 parent d309301 commit 466a652
Show file tree
Hide file tree
Showing 17 changed files with 128 additions and 128 deletions.
24 changes: 12 additions & 12 deletions R/FilterState.R
Original file line number Diff line number Diff line change
Expand Up @@ -296,16 +296,16 @@ FilterState <- R6::R6Class( # nolint
### Title consists of conditional icon, varname, conditional varlabel, and controls, arranged in a row.
### Summary consists of value and controls, arranged in a row.

shiny::tags$div(
tags$div(
id = id,
class = "panel filter-card",
include_js_files("count-bar-labels.js"),
shiny::tags$div(
tags$div(
class = "filter-card-header",
`data-toggle` = "collapse",
`data-bs-toggle` = "collapse",
href = paste0("#", ns("body")),
shiny::tags$div(
tags$div(
class = "filter-card-title",
if (private$is_anchored() && private$is_fixed()) {
icon("anchor-lock", class = "filter-card-icon")
Expand All @@ -314,9 +314,9 @@ FilterState <- R6::R6Class( # nolint
} else if (!private$is_anchored() && private$is_fixed()) {
icon("lock", class = "filter-card-icon")
},
shiny::tags$div(class = "filter-card-varname", shiny::tags$strong(private$get_varname())),
shiny::tags$div(class = "filter-card-varlabel", private$get_varlabel()),
shiny::tags$div(
tags$div(class = "filter-card-varname", tags$strong(private$get_varname())),
tags$div(class = "filter-card-varlabel", private$get_varlabel()),
tags$div(
class = "filter-card-controls",
# Suppress toggling body when clicking on this div.
# This is for bootstrap 3 and 4. Causes page to scroll to top, prevented by setting href on buttons.
Expand Down Expand Up @@ -354,14 +354,14 @@ FilterState <- R6::R6Class( # nolint
}
)
),
shiny::tags$div(class = "filter-card-summary", private$ui_summary(ns("summary")))
tags$div(class = "filter-card-summary", private$ui_summary(ns("summary")))
),
shiny::tags$div(
tags$div(
id = ns("body"),
class = "collapse out",
`data-parent` = paste0("#", parent_id),
`data-bs-parent` = paste0("#", parent_id),
shiny::tags$div(
tags$div(
class = "filter-card-body",
if (private$is_fixed()) {
private$ui_inputs_fixed(ns("inputs"))
Expand Down Expand Up @@ -692,7 +692,7 @@ FilterState <- R6::R6Class( # nolint
# @param id (`character(1)`) `shiny` module instance id.
ui_inputs_fixed = function(id) {
ns <- NS(id)
shiny::tags$div(
tags$div(
class = "choices_state",
uiOutput(ns("selection"))
)
Expand All @@ -717,7 +717,7 @@ FilterState <- R6::R6Class( # nolint
countnow <- private$filtered_na_count()
ui_input <- checkboxInput(
inputId = ns("value"),
label = shiny::tags$span(
label = tags$span(
id = ns("count_label"),
make_count_text(
label = "Keep NA",
Expand All @@ -727,7 +727,7 @@ FilterState <- R6::R6Class( # nolint
),
value = private$get_keep_na()
)
shiny::tags$div(
tags$div(
uiOutput(ns("trigger_visible"), inline = TRUE),
ui_input
)
Expand Down
10 changes: 5 additions & 5 deletions R/FilterStateChoices.R
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ ChoicesFilterState <- R6::R6Class( # nolint
countsnow = countsnow,
countsmax = countsmax
)
shiny::tags$div(
tags$div(
class = "choices_state",
if (private$is_multiple()) {
checkboxGroupInput(
Expand Down Expand Up @@ -416,7 +416,7 @@ ChoicesFilterState <- R6::R6Class( # nolint
)
)
}
shiny::tags$div(
tags$div(
uiOutput(ns("trigger_visible")),
ui_input,
private$keep_na_ui(ns("keep_na"))
Expand Down Expand Up @@ -603,14 +603,14 @@ ChoicesFilterState <- R6::R6Class( # nolint
}
}
tagList(
shiny::tags$span(
tags$span(
class = "filter-card-summary-value",
selected_text
),
shiny::tags$span(
tags$span(
class = "filter-card-summary-controls",
if (private$na_count > 0) {
shiny::tags$span("NA", if (isTRUE(private$get_keep_na())) icon("check") else icon("xmark"))
tags$span("NA", if (isTRUE(private$get_keep_na())) icon("check") else icon("xmark"))
}
)
)
Expand Down
18 changes: 9 additions & 9 deletions R/FilterStateDate.R
Original file line number Diff line number Diff line change
Expand Up @@ -278,16 +278,16 @@ DateFilterState <- R6::R6Class( # nolint
ui_inputs = function(id) {
ns <- NS(id)
isolate({
shiny::tags$div(
shiny::tags$div(
tags$div(
tags$div(
class = "flex",
actionButton(
class = "date_reset_button",
inputId = ns("start_date_reset"),
label = NULL,
icon = icon("fas fa-undo")
),
shiny::tags$div(
tags$div(
class = "w-80 filter_datelike_input",
dateRangeInput(
inputId = ns("selection"),
Expand Down Expand Up @@ -402,9 +402,9 @@ DateFilterState <- R6::R6Class( # nolint

output$selection <- renderUI({
vals <- format(private$get_selected(), nsmall = 3)
shiny::tags$div(
shiny::tags$div(icon("calendar-days"), vals[1]),
shiny::tags$div(span(" - "), icon("calendar-days"), vals[2])
tags$div(
tags$div(icon("calendar-days"), vals[1]),
tags$div(span(" - "), icon("calendar-days"), vals[2])
)
})

Expand All @@ -423,14 +423,14 @@ DateFilterState <- R6::R6Class( # nolint
min <- selected[1]
max <- selected[2]
tagList(
shiny::tags$span(
tags$span(
class = "filter-card-summary-value",
HTML(min, "&ndash;", max)
),
shiny::tags$span(
tags$span(
class = "filter-card-summary-controls",
if (private$na_count > 0) {
shiny::tags$span("NA", if (isTRUE(private$get_keep_na())) icon("check") else icon("xmark"))
tags$span("NA", if (isTRUE(private$get_keep_na())) icon("check") else icon("xmark"))
}
)
)
Expand Down
26 changes: 13 additions & 13 deletions R/FilterStateDatettime.R
Original file line number Diff line number Diff line change
Expand Up @@ -355,19 +355,19 @@ DatetimeFilterState <- R6::R6Class( # nolint
ui_input_1$children[[2]]$attribs <- c(ui_input_1$children[[2]]$attribs, list(class = "input-sm"))
ui_input_2$children[[2]]$attribs <- c(ui_input_2$children[[2]]$attribs, list(class = "input-sm"))

shiny::tags$div(
shiny::tags$div(
tags$div(
tags$div(
class = "flex",
ui_reset_1,
shiny::tags$div(
tags$div(
class = "flex w-80 filter_datelike_input",
shiny::tags$div(class = "w-45 text-center", ui_input_1),
shiny::tags$span(
tags$div(class = "w-45 text-center", ui_input_1),
tags$span(
class = "input-group-addon w-10",
shiny::tags$span(class = "input-group-text w-100 justify-content-center", "to"),
tags$span(class = "input-group-text w-100 justify-content-center", "to"),
title = "Times are displayed in the local timezone and are converted to UTC in the analysis"
),
shiny::tags$div(class = "w-45 text-center", ui_input_2)
tags$div(class = "w-45 text-center", ui_input_2)
),
ui_reset_2
),
Expand Down Expand Up @@ -515,9 +515,9 @@ DatetimeFilterState <- R6::R6Class( # nolint

output$selection <- renderUI({
vals <- format(private$get_selected(), usetz = TRUE, nsmall = 3)
shiny::tags$div(
shiny::tags$div(icon("clock"), vals[1]),
shiny::tags$div(span(" - "), icon("clock"), vals[2])
tags$div(
tags$div(icon("clock"), vals[1]),
tags$div(span(" - "), icon("clock"), vals[2])
)
})

Expand All @@ -536,14 +536,14 @@ DatetimeFilterState <- R6::R6Class( # nolint
min <- selected[1]
max <- selected[2]
tagList(
shiny::tags$span(
tags$span(
class = "filter-card-summary-value",
HTML(min, "&ndash;", max)
),
shiny::tags$span(
tags$span(
class = "filter-card-summary-controls",
if (private$na_count > 0) {
shiny::tags$span("NA", if (isTRUE(private$get_keep_na())) icon("check") else icon("xmark"))
tags$span("NA", if (isTRUE(private$get_keep_na())) icon("check") else icon("xmark"))
}
)
)
Expand Down
8 changes: 4 additions & 4 deletions R/FilterStateEmpty.R
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ EmptyFilterState <- R6::R6Class( # nolint
ui_inputs = function(id) {
ns <- NS(id)
isolate({
shiny::tags$div(
shiny::tags$span("Variable contains missing values only"),
tags$div(
tags$span("Variable contains missing values only"),
private$keep_na_ui(ns("keep_na"))
)
})
Expand All @@ -155,7 +155,7 @@ EmptyFilterState <- R6::R6Class( # nolint
id = id,
function(input, output, session) {
output$selection <- renderUI({
shiny::tags$span("Variable contains missing values only")
tags$span("Variable contains missing values only")
})
NULL
}
Expand All @@ -166,7 +166,7 @@ EmptyFilterState <- R6::R6Class( # nolint
# Server module to display filter summary
# Doesn't render anything
content_summary = function(id) {
shiny::tags$span("All empty")
tags$span("All empty")
}
)
)
14 changes: 7 additions & 7 deletions R/FilterStateExpr.R
Original file line number Diff line number Diff line change
Expand Up @@ -191,22 +191,22 @@ FilterStateExpr <- R6::R6Class( # nolint
ui = function(id, parent_id = "cards") {
ns <- NS(id)
isolate({
shiny::tags$div(
tags$div(
id = id,
class = "panel filter-card",
include_js_files("count-bar-labels.js"),
shiny::tags$div(
tags$div(
class = "filter-card-header",
shiny::tags$div(
tags$div(
class = "filter-card-title",
if (private$is_anchored()) {
icon("anchor-lock", class = "filter-card-icon")
} else {
icon("lock", class = "filter-card-icon")
},
shiny::tags$div(class = "filter-card-varname", shiny::tags$strong(private$teal_slice$id)),
shiny::tags$div(class = "filter-card-varlabel", private$teal_slice$title),
shiny::tags$div(
tags$div(class = "filter-card-varname", tags$strong(private$teal_slice$id)),
tags$div(class = "filter-card-varlabel", private$teal_slice$title),
tags$div(
class = "filter-card-controls",
if (isFALSE(private$is_anchored())) {
actionLink(
Expand All @@ -218,7 +218,7 @@ FilterStateExpr <- R6::R6Class( # nolint
}
)
),
shiny::tags$div(
tags$div(
class = "filter-card-summary",
private$ui_summary(ns("summary"))
)
Expand Down
10 changes: 5 additions & 5 deletions R/FilterStateLogical.R
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ LogicalFilterState <- R6::R6Class( # nolint
width = "100%"
)
}
shiny::tags$div(
shiny::tags$div(
tags$div(
tags$div(
class = "choices_state",
uiOutput(ns("trigger_visible"), inline = TRUE),
ui_input
Expand Down Expand Up @@ -393,14 +393,14 @@ LogicalFilterState <- R6::R6Class( # nolint
# and if NA are included also
content_summary = function(id) {
tagList(
shiny::tags$span(
tags$span(
class = "filter-card-summary-value",
toString(private$get_selected())
),
shiny::tags$span(
tags$span(
class = "filter-card-summary-controls",
if (private$na_count > 0) {
shiny::tags$span("NA", if (isTRUE(private$get_keep_na())) icon("check") else icon("xmark"))
tags$span("NA", if (isTRUE(private$get_keep_na())) icon("check") else icon("xmark"))
}
)
)
Expand Down
20 changes: 10 additions & 10 deletions R/FilterStateRange.R
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,9 @@ RangeFilterState <- R6::R6Class( # nolint
width = "100%"
)
tagList(
shiny::tags$div(
tags$div(
class = "choices_state",
shiny::tags$head(shiny::tags$script(
tags$head(tags$script(
# Inline JS code for popover functionality.
# Adding the script inline because when added from a file with include_js_files(),
# it only works in the first info_button instance and not others.
Expand All @@ -437,7 +437,7 @@ RangeFilterState <- R6::R6Class( # nolint
});'
)
)),
shiny::tags$div(
tags$div(
actionLink(
ns("plotly_info"),
label = NULL,
Expand All @@ -463,7 +463,7 @@ RangeFilterState <- R6::R6Class( # nolint
),
ui_input
),
shiny::tags$div(
tags$div(
class = "filter-card-body-keep-na-inf",
private$keep_inf_ui(ns("keep_inf")),
private$keep_na_ui(ns("keep_na"))
Expand Down Expand Up @@ -640,14 +640,14 @@ RangeFilterState <- R6::R6Class( # nolint
content_summary = function() {
selection <- private$get_selected()
tagList(
shiny::tags$span(HTML(selection[1], "&ndash;", selection[2]), class = "filter-card-summary-value"),
shiny::tags$span(
tags$span(HTML(selection[1], "&ndash;", selection[2]), class = "filter-card-summary-value"),
tags$span(
class = "filter-card-summary-controls",
if (private$na_count > 0) {
shiny::tags$span("NA", if (isTRUE(private$get_keep_na())) icon("check") else icon("xmark"))
tags$span("NA", if (isTRUE(private$get_keep_na())) icon("check") else icon("xmark"))
},
if (private$inf_count > 0) {
shiny::tags$span("Inf", if (isTRUE(private$get_keep_inf())) icon("check") else icon("xmark"))
tags$span("Inf", if (isTRUE(private$get_keep_inf())) icon("check") else icon("xmark"))
}
)
)
Expand All @@ -665,7 +665,7 @@ RangeFilterState <- R6::R6Class( # nolint
countnow <- isolate(private$filtered_na_count())
ui_input <- checkboxInput(
inputId = ns("value"),
label = shiny::tags$span(
label = tags$span(
id = ns("count_label"),
make_count_text(
label = "Keep Inf",
Expand All @@ -675,7 +675,7 @@ RangeFilterState <- R6::R6Class( # nolint
),
value = isolate(private$get_keep_inf())
)
shiny::tags$div(
tags$div(
uiOutput(ns("trigger_visible"), inline = TRUE),
ui_input
)
Expand Down
Loading

0 comments on commit 466a652

Please sign in to comment.