OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Replace dynamic bootstrapped components with angular elements
Oliver Güntherac3940634732
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rbindex e42b6724886..341888e7390 100644--- a/app/helpers/application_helper.rb+++ b/app/helpers/application_helper.rb@@ -174,7 +174,7 @@ module ApplicationHelperdef html_hours(text)text.gsub(%r{(\d+)\.(\d+)},'<span class="hours hours-int">\1</span><span class="hours hours-dec">.\2</span>')- .html_safe+ .html_safeenddef authoring(created, author, options = {})@@ -202,7 +202,7 @@ module ApplicationHelperelsedatetime = time.acts_like?(:time) ? time.xmlschema : time.iso8601content_tag(:time, text, datetime:,- title: format_time(time), class: "timestamp")+ title: format_time(time), class: "timestamp")endend@@ -253,18 +253,18 @@ module ApplicationHelper# Same as Rails' simple_format helper without using paragraphsdef simple_format_without_paragraph(text)text.to_s- .gsub(/\r\n?/, "\n") # \r\n and \r -> \n- .gsub(/\n\n+/, "<br /><br />") # 2+ newline -> 2 br- .gsub(/([^\n]\n)(?=[^\n])/, '\1<br />') # 1 newline -> br- .html_safe+ .gsub(/\r\n?/, "\n") # \r\n and \r -> \n+ .gsub(/\n\n+/, "<br /><br />") # 2+ newline -> 2 br+ .gsub(/([^\n]\n)(?=[^\n])/, '\1<br />') # 1 newline -> br+ .html_safeenddef lang_options_for_select(blank = true)auto = if blank && (valid_languages - all_languages) == (all_languages - valid_languages)- [["(auto)", ""]]- else- []- end+ [["(auto)", ""]]+ else+ []+ endmapped_languages = valid_languages.map { |lang| translate_language(lang) }@@ -347,7 +347,7 @@ module ApplicationHelperdef progress_bar(pcts, options = {})pcts = Array(pcts).map(&:round)closed = pcts[0]- done = pcts[1] || 0+ done = pcts[1] || 0width = options[:width] || "100px;"legend = options[:legend] || ""total_progress = options[:hide_total_progress] ? "" : t(:total_progress)@@ -356,7 +356,7 @@ module ApplicationHelpercontent_tag :span doprogress = content_tag :span, class: "progress-bar", style: "width: #{width}" doconcat content_tag(:span, "", class: "inner-progress closed", style: "width: #{closed}%")- concat content_tag(:span, "", class: "inner-progress done", style: "width: #{done}%")+ concat content_tag(:span, "", class: "inner-progress done", style: "width: #{done}%")endprogress + content_tag(:span, "#{legend}#{percent_sign} #{total_progress}", class: "progress-bar-legend")end@@ -369,8 +369,10 @@ module ApplicationHelperenddef calendar_for(*_args)- ActiveSupport::Deprecation.warn "calendar_for has been removed. Please use the op-basic-single-date-picker angular component instead",- caller+ ActiveSupport::Deprecation.warn(+ "calendar_for has been removed. Please use the opce-basic-single-date-picker angular component instead",+ caller+ )enddef locale_first_day_of_week@@ -435,7 +437,7 @@ module ApplicationHelperdef translate_language(lang_code)# rename in-context translation language name for the language select boxif lang_code.to_sym == Redmine::I18n::IN_CONTEXT_TRANSLATION_CODE &&- ::I18n.locale != Redmine::I18n::IN_CONTEXT_TRANSLATION_CODE+ ::I18n.locale != Redmine::I18n::IN_CONTEXT_TRANSLATION_CODE[Redmine::I18n::IN_CONTEXT_TRANSLATION_NAME, lang_code.to_s]else[I18n.t("cldr.language_name", locale: lang_code), lang_code.to_s]diff --git a/app/helpers/custom_fields_helper.rb b/app/helpers/custom_fields_helper.rbindex fa2e4b641e9..6d16917b363 100644--- a/app/helpers/custom_fields_helper.rb+++ b/app/helpers/custom_fields_helper.rb@@ -72,7 +72,7 @@ module CustomFieldsHelpertag = case field_format.try(:edit_as)when "date"- angular_component_tag "op-basic-single-date-picker",+ angular_component_tag "opce-basic-single-date-picker",inputs: {required: custom_field.is_required,value: custom_value.value,@@ -150,7 +150,7 @@ module CustomFieldsHelpercase field_format.try(:edit_as)when "date"- angular_component_tag "op-modal-single-date-picker",+ angular_component_tag "opce-modal-single-date-picker",inputs: {id: field_id,name: field_namediff --git a/app/views/admin/backups/show.html.erb b/app/views/admin/backups/show.html.erbindex 4c9d1568395..1b6f6fa64d1 100644--- a/app/views/admin/backups/show.html.erb+++ b/app/views/admin/backups/show.html.erb@@ -90,7 +90,7 @@ See COPYRIGHT and LICENSE files for more details.<% end %><% if @backup_token.present? %>-<%= tag :backup, data: {+<%= angular_component_tag "opce-backup", data: {'job-status-id': @job_status_id,'last-backup-date': @last_backup_date,'last-backup-attachment-id': @last_backup_attachment_id,diff --git a/app/views/admin/settings/projects_settings/show.html.erb b/app/views/admin/settings/projects_settings/show.html.erbindex aabbee95cf6..f8ee4cf5648 100644--- a/app/views/admin/settings/projects_settings/show.html.erb+++ b/app/views/admin/settings/projects_settings/show.html.erb@@ -61,14 +61,13 @@ See COPYRIGHT and LICENSE files for more details.</div><span class="form--field-container"><span class="form--text-field-container">- <%= content_tag 'editable-query-props',- '',- data: {- name: 'settings[project_gantt_query]',- id: 'settings_project_gantt_query',- query: ::Projects::GanttQueryGeneratorService.current_query,- 'url-params': 'true'- }+ <%= angular_component_tag 'opce-editable-query-props',+ data: {+ name: 'settings[project_gantt_query]',+ id: 'settings_project_gantt_query',+ query: ::Projects::GanttQueryGeneratorService.current_query,+ 'url-params': 'true'+ }%></span></span>diff --git a/app/views/admin/settings/work_packages_settings/_enterprise_feature_hint.html.erb b/app/views/admin/settings/work_packages_settings/_enterprise_feature_hint.html.erbindex 88daaf17848..d82dc602b7c 100644--- a/app/views/admin/settings/work_packages_settings/_enterprise_feature_hint.html.erb+++ b/app/views/admin/settings/work_packages_settings/_enterprise_feature_hint.html.erb@@ -1,7 +1,7 @@<% unless EnterpriseToken.allows_to?(ee_feature) %><span class="form--field -indented"><%=- angular_component_tag 'op-enterprise-banner',+ angular_component_tag 'opce-enterprise-banner',inputs: {collapsible: true,textMessage: explanation,diff --git a/app/views/admin/settings/working_days_and_hours_settings/show.html.erb b/app/views/admin/settings/working_days_and_hours_settings/show.html.erbindex 6dd8ceaac2b..80f82d5479f 100644--- a/app/views/admin/settings/working_days_and_hours_settings/show.html.erb+++ b/app/views/admin/settings/working_days_and_hours_settings/show.html.erb@@ -90,7 +90,7 @@ See COPYRIGHT and LICENSE files for more details.<p><%= t("working_days.instance_wide_info") %></p>- <%= angular_component_tag "op-non-working-days-list",+ <%= angular_component_tag "opce-non-working-days-list",data: { modified_non_working_days: @modified_non_working_days } %></fieldset>diff --git a/app/views/attribute_help_texts/_tab.html.erb b/app/views/attribute_help_texts/_tab.html.erbindex edc64251d14..1da41bb295a 100644--- a/app/views/attribute_help_texts/_tab.html.erb+++ b/app/views/attribute_help_texts/_tab.html.erb@@ -42,7 +42,7 @@edit_attribute_help_text_path(attribute_help_text) %></td><td>- <%= angular_component_tag 'attribute-help-text',+ <%= angular_component_tag 'opce-attribute-help-text',inputs: {helpTextId: attribute_help_text.id,attribute: attribute_help_text.attribute_name,diff --git a/app/views/augmented/_collapsible_section.html.erb b/app/views/augmented/_collapsible_section.html.erbindex b223a5c174a..4b9986a9ffd 100644--- a/app/views/augmented/_collapsible_section.html.erb+++ b/app/views/augmented/_collapsible_section.html.erb@@ -1,6 +1,6 @@-<collapsible-section-augment initially-expanded="<%= initiallyExpanded %>"+<opce-collapsible-section-augment initially-expanded="<%= initiallyExpanded %>"section-title="<%= title %>">-</collapsible-section-augment>-<div class="collapsible-section-augment--body" hidden>+</opce-collapsible-section-augment>+<div class="opce-collapsible-section-augment--body" hidden><%= capture(&block) %></div>diff --git a/app/views/colors/_color_autocomplete_field.html.erb b/app/views/colors/_color_autocomplete_field.html.erbindex e0c6ee7820a..7f62de55413 100644--- a/app/views/colors/_color_autocomplete_field.html.erb+++ b/app/views/colors/_color_autocomplete_field.html.erb@@ -7,7 +7,7 @@</label><div class="form--field-container"><%= form.hidden_field :color_id %>- <%= content_tag('colors-autocompleter',+ <%= content_tag('opce-colors-autocompleter','',class: "colors-autocomplete form--select-container " + "#{container_class.present? ? container_class : '-middle'}",data: { colors: options_for_colors(object),diff --git a/app/views/common/_tabs.html.erb b/app/views/common/_tabs.html.erbindex 85c1c9a5768..d451fb41ac0 100644--- a/app/views/common/_tabs.html.erb+++ b/app/views/common/_tabs.html.erb@@ -29,7 +29,7 @@ See COPYRIGHT and LICENSE files for more details.<% gon.contentTabs = { tabs: tabs.to_json.html_safe, selected: selected_tab.to_json.html_safe } %><% if with_tab_nav %>- <content-tabs></content-tabs>+ <opce-content-tabs></opce-content-tabs><% end %><%= content_tag 'div',diff --git a/app/views/common/upsale.html.erb b/app/views/common/upsale.html.erbindex 503f19ece9d..227ee9e63f1 100644--- a/app/views/common/upsale.html.erb+++ b/app/views/common/upsale.html.erb@@ -56,5 +56,5 @@<%= spot_icon('enterprise-addons') %><span class="button--text"><%= t('admin.enterprise.buttons.upgrade') %></span><% end %>- <free-trial-button></free-trial-button>+ <opce-free-trial-button></opce-free-trial-button></div>diff --git a/app/views/custom_actions/_form.html.erb b/app/views/custom_actions/_form.html.erbindex 0c6909b2808..b1e2620f55a 100644--- a/app/views/custom_actions/_form.html.erb+++ b/app/views/custom_actions/_form.html.erb@@ -66,7 +66,8 @@<% elsif %i(date_property).include?(action.type) %><div class="form--field-container"><% date = action.values.first %>- <%= tag 'custom-date-action-admin', data: { 'field-value': date.try(:iso8601) || date, 'field-name': input_name } %>+ <%= angular_component_tag 'opce-custom-date-action-admin',+ data: { 'field-value': date.try(:iso8601) || date, 'field-name': input_name } %></div><% elsif %i(string_property text_property).include?(action.type) %><div class="form--field-container">@@ -101,7 +102,7 @@step: 1 %></div><% end %>- <hide-section-link data-section-name="<%= action.key %>"></hide-section-link>+ <opce-hide-section-link data-section-name="<%= action.key %>"></opce-hide-section-link></div></section><% end %>@@ -116,8 +117,8 @@</label><span class="form--field-container"><span class="form--text-field-container -middle">- <add-section-dropdown data-html-id="custom-actions-form--add-action">- </add-section-dropdown>+ <opce-add-section-dropdown data-html-id="custom-actions-form--add-action">+ </opce-add-section-dropdown></span></span></div>diff --git a/app/views/custom_styles/show.html.erb b/app/views/custom_styles/show.html.erbindex 1368cf54c11..9ffedb2176f 100644--- a/app/views/custom_styles/show.html.erb+++ b/app/views/custom_styles/show.html.erb@@ -156,10 +156,10 @@ See COPYRIGHT and LICENSE files for more details.<% end %><% custom_export_expanded = @custom_style.id && (@custom_style.export_logo.present? || @custom_style.export_cover.present? || @custom_style.export_cover_text_color.present?) %>-<collapsible-section-augment initially-expanded="<%= custom_export_expanded %>"+<opce-collapsible-section-augment initially-expanded="<%= custom_export_expanded %>"section-title="<%= I18n.t(:label_custom_pdf_export_settings) %>">-</collapsible-section-augment>-<div class="collapsible-section-augment--body" hidden>+</opce-collapsible-section-augment>+<div class="opce-collapsible-section-augment--body" hidden><%= form_for @custom_style, url: custom_style_path, html: { multipart: true, class: "form -vertical" } do |f| %><section class="form--section">diff --git a/app/views/enterprises/_current.html.erb b/app/views/enterprises/_current.html.erbindex 238c3a70762..06eb4e6d525 100644--- a/app/views/enterprises/_current.html.erb+++ b/app/views/enterprises/_current.html.erb@@ -1,4 +1,4 @@-<enterprise-active-saved-trial+<opce-enterprise-active-saved-trialdata-subscriber="<%= @current_token.subscriber %>"data-email="<%= @current_token.mail %>"data-company="<%= @current_token.try(:company) %>"@@ -9,7 +9,7 @@data-is-expired="<%= @current_token.expired?(reprieve: false) %>"data-reprieve-days-left="<%= @current_token.reprieve_days_left %>">-</enterprise-active-saved-trial>+</opce-enterprise-active-saved-trial><%= form_tag(enterprise_path,method: :delete,diff --git a/app/views/enterprises/_info.html.erb b/app/views/enterprises/_info.html.erbindex e805153655b..14ac7797514 100644--- a/app/views/enterprises/_info.html.erb+++ b/app/views/enterprises/_info.html.erb@@ -34,7 +34,7 @@ See COPYRIGHT and LICENSE files for more details.<div class="upsale--information-container"><div class='upsale-information'>- <enterprise-base></enterprise-base>+ <opce-enterprise-base></opce-enterprise-base></div><div class='upsale-actions'>diff --git a/app/views/filters/_boolean.html.erb b/app/views/filters/_boolean.html.erbindex 14e336108f1..983afb848aa 100644--- a/app/views/filters/_boolean.html.erb+++ b/app/views/filters/_boolean.html.erb@@ -1,7 +1,7 @@<label class="advanced-filters--filter-value"data-filter--filters-form-target="filterValueContainer"data-filter-name="<%= filter.name %>">- <%= angular_component_tag 'spot-switch',+ <%= angular_component_tag 'opce-spot-switch',inputs: {name: "v-" + filter.class.key.to_s,checked: filter.values.first != 'f',diff --git a/app/views/filters/date/_between_dates.html.erb b/app/views/filters/date/_between_dates.html.erbindex ea25818fb2a..b1b0f46240a 100644--- a/app/views/filters/date/_between_dates.html.erb+++ b/app/views/filters/date/_between_dates.html.erb@@ -1,6 +1,6 @@<div class="between-dates"><span><%= t(:label_date_from) %>:</span>- <%= angular_component_tag 'op-basic-single-date-picker',+ <%= angular_component_tag 'opce-basic-single-date-picker',inputs: {value: from_value,id: "between-dates-from-value-#{filter.name}",@@ -8,7 +8,7 @@}%><span><%= t(:label_date_to) %>:</span>- <%= angular_component_tag 'op-basic-single-date-picker',+ <%= angular_component_tag 'opce-basic-single-date-picker',inputs: {value: to_value,id: "between-dates-to-value-#{filter.name}",diff --git a/app/views/filters/date/_on_date.html.erb b/app/views/filters/date/_on_date.html.erbindex 01f1ade947c..7cc2a8fbd35 100644--- a/app/views/filters/date/_on_date.html.erb+++ b/app/views/filters/date/_on_date.html.erb@@ -1,6 +1,6 @@<div class="on-date"><div class="form--field-container -visible-overflow">- <%= angular_component_tag 'op-basic-single-date-picker',+ <%= angular_component_tag 'opce-basic-single-date-picker',inputs: {value: value,id: "on-date-value-#{filter.name}",diff --git a/app/views/homescreen/blocks/_new_features.html.erb b/app/views/homescreen/blocks/_new_features.html.erbindex a84a4023638..d005bbc7e57 100644--- a/app/views/homescreen/blocks/_new_features.html.erb+++ b/app/views/homescreen/blocks/_new_features.html.erb@@ -1,3 +1,3 @@<%= render 'homescreen/blocks/header', title: t(:label_new_features) %>-<homescreen-new-features-block></homescreen-new-features-block>+<opce-homescreen-new-features-block></opce-homescreen-new-features-block>diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erbindex f156ae23e78..3fc45b8b390 100644--- a/app/views/layouts/base.html.erb+++ b/app/views/layouts/base.html.erb@@ -62,9 +62,9 @@ See COPYRIGHT and LICENSE files for more details.</p></div></noscript>-<op-toasts-container></op-toasts-container>-<op-modal-overlay></op-modal-overlay>-<spot-drop-modal-portal></spot-drop-modal-portal>+<opce-toasts-container></opce-toasts-container>+<opce-modal-overlay></opce-modal-overlay>+<opce-spot-drop-modal-portal></opce-spot-drop-modal-portal><% main_menu = render_main_menu(local_assigns.fetch(:menu_name, nil), @project) %><% side_displayed = content_for?(:sidebar) || content_for?(:main_menu) || !main_menu.blank? %><% initial_classes = initial_menu_classes(side_displayed, show_decoration) %>@@ -75,7 +75,7 @@ See COPYRIGHT and LICENSE files for more details.<h1 class="hidden-for-sighted"><%= t(:label_top_menu) %></h1>- <main-menu-toggle></main-menu-toggle>+ <opce-main-menu-toggle></opce-main-menu-toggle><a href="" class="hidden-for-sighted skip-navigation-link"id="skip-navigation--content"aria-label="<%= I18n.t('js.work_packages.jump_marks.label_content') %>">@@ -102,7 +102,7 @@ See COPYRIGHT and LICENSE files for more details.data-application-target="dynamic"><h1 class="hidden-for-sighted"><%= t(:label_main_menu) %></h1>- <main-menu-resizer></main-menu-resizer>+ <opce-main-menu-resizer></opce-main-menu-resizer><div id="menu-sidebar"><%= main_menu %><%= content_for :main_menu %>diff --git a/app/views/members/_member_form.html.erb b/app/views/members/_member_form.html.erbindex 2f861fb4a09..b5ce3f3ca19 100644--- a/app/views/members/_member_form.html.erb+++ b/app/views/members/_member_form.html.erb@@ -72,7 +72,7 @@ See COPYRIGHT and LICENSE files for more details.<div class="form--field"><%= styled_label_tag :member_role_ids do %><%= content_tag :span, t(:label_role_search) %>- <%= angular_component_tag 'attribute-help-text',+ <%= angular_component_tag 'opce-attribute-help-text',inputs: {attribute: 'members',attributeScope: 'Project'diff --git a/app/views/repositories/_repository_header.html.erb b/app/views/repositories/_repository_header.html.erbindex 81e20bd9984..c4ceadb3497 100644--- a/app/views/repositories/_repository_header.html.erb+++ b/app/views/repositories/_repository_header.html.erb@@ -27,7 +27,7 @@ See COPYRIGHT and LICENSE files for more details.++#%>-<persistent-toggle data-identifier="repository.checkout_instructions"></persistent-toggle>+<opce-persistent-toggle data-identifier="repository.checkout_instructions"></opce-persistent-toggle><%= toolbar title: t('repositories.named_repository',vendor_name: @repository.class.vendor_name) do %><% if @instructions && @instructions.available? %>@@ -40,9 +40,9 @@ See COPYRIGHT and LICENSE files for more details.value="<%= @instructions.checkout_url(true) %>"readonly><% csp_onclick('this.focus(); this.select();', '#repository-checkout-url') %>- <copy-to-clipboard click-target=".repository-checkout-copy-button"+ <opce-copy-to-clipboard click-target=".repository-checkout-copy-button"clipboard-target="#repository-checkout-url">- </copy-to-clipboard>+ </opce-copy-to-clipboard><button class="repository-checkout-copy-button toolbar-input--affix toolbar-input-group--affix -append"title="<%= t(:button_copy_to_clipboard) %>"><%= op_icon('icon-copy') %>@@ -82,5 +82,3 @@ See COPYRIGHT and LICENSE files for more details.<%= render partial: 'checkout_instructions',locals: { repository: @repository, instructions: @instructions } %><% end %>--diff --git a/app/views/search/index.html.erb b/app/views/search/index.html.erbindex 4646329ee85..92da85f9c56 100644--- a/app/views/search/index.html.erb+++ b/app/views/search/index.html.erb@@ -32,12 +32,12 @@ See COPYRIGHT and LICENSE files for more details.<% end %>-<global-search-title></global-search-title>+<opce-global-search-title></opce-global-search-title>-<global-search-tabs></global-search-tabs>+<opce-global-search-tabs></opce-global-search-tabs><% if params[:work_packages].present? %>- <global-search-work-packages-entry></global-search-work-packages-entry>+ <opce-global-search-work-packages></opce-global-search-work-packages><% else %><h3><%= t(:label_result_plural) %> (<%= @results_count&.values&.sum || 0 %>)</h3>diff --git a/app/views/statuses/_form.html.erb b/app/views/statuses/_form.html.erbindex 0f2f43fc165..ccc96b2d68d 100644--- a/app/views/statuses/_form.html.erb+++ b/app/views/statuses/_form.html.erb@@ -44,7 +44,7 @@ See COPYRIGHT and LICENSE files for more details.<% if disabled %><div class="form--field-instructions -no-italic -xwide"><%=- angular_component_tag "op-enterprise-banner",+ angular_component_tag "opce-enterprise-banner",inputs: {collapsible: true,textMessage: t("text_wp_status_read_only_html"),diff --git a/app/views/types/form/_form_configuration.html.erb b/app/views/types/form/_form_configuration.html.erbindex 8646594c899..8d4551607bd 100644--- a/app/views/types/form/_form_configuration.html.erb+++ b/app/views/types/form/_form_configuration.html.erb@@ -34,12 +34,12 @@ See COPYRIGHT and LICENSE files for more details.<div class="grid-block -visible-overflow wrap"><div class="grid-content -visible-overflow small-12 large-10"><% if EnterpriseToken.show_banners? %>- <%= angular_component_tag 'op-no-results',+ <%= angular_component_tag 'opce-no-results',inputs: {title: t('text_form_configuration') + t('text_custom_field_hint_activate_per_project'),}%>- <%= angular_component_tag 'op-enterprise-banner',+ <%= angular_component_tag 'opce-enterprise-banner',inputs: {collapsible: true,opReferrer: 'form-configuration',@@ -55,7 +55,7 @@ See COPYRIGHT and LICENSE files for more details.<% no_filter_query = ::API::V3::Queries::QueryParamsRepresenter.new(Query.new_default.tap { |q| q.filters = [] }).to_json %><%= f.hidden_field :attribute_groups, value: '', class: 'admin-type-form--hidden-field' %>- <%= content_tag('admin-type-form-configuration',+ <%= content_tag('opce-admin-type-form-configuration','',data: {'active-groups': form_attributes[:actives],diff --git a/app/views/versions/show.html.erb b/app/views/versions/show.html.erbindex 25b6c95d35e..b1c43a297ac 100644--- a/app/views/versions/show.html.erb+++ b/app/views/versions/show.html.erb@@ -109,10 +109,10 @@ See COPYRIGHT and LICENSE files for more details.<% if @version.work_packages.count > 0 %><div class="widget-box -thin -wider">- <wp-overview-graph+ <opce-wp-overview-graphglobal-scope='<%= @version.systemwide? %>'initial-filters='<%= version_wp_overview_graph_initial_filters(@version) %>'>- </wp-overview-graph>+ </opce-wp-overview-graph></div><% end %></div>diff --git a/app/views/wiki/_page_form.html.erb b/app/views/wiki/_page_form.html.erbindex 9b55008f36f..8614f12f9db 100644--- a/app/views/wiki/_page_form.html.erb+++ b/app/views/wiki/_page_form.html.erb@@ -4,7 +4,7 @@<%= editable_toolbar(form: f, field_name: :title) do %><li class="toolbar-item">- <zen-mode-toggle-button></zen-mode-toggle-button>+ <opce-zen-mode-toggle-button></opce-zen-mode-toggle-button></li><% end %>diff --git a/app/views/work_packages/bulk/edit.html.erb b/app/views/work_packages/bulk/edit.html.erbindex 33dcfa74cb6..cfb90829141 100644--- a/app/views/work_packages/bulk/edit.html.erb+++ b/app/views/work_packages/bulk/edit.html.erb@@ -151,7 +151,7 @@ See COPYRIGHT and LICENSE files for more details.<div class="form--field"><%= styled_label_tag :work_package_start_date, WorkPackage.human_attribute_name(:start_date) %><div class="form--field-container -visible-overflow">- <%= angular_component_tag 'op-basic-single-date-picker',+ <%= angular_component_tag 'opce-basic-single-date-picker',inputs: {id: "work_package_start_date",name: "work_package[start_date]"@@ -162,7 +162,7 @@ See COPYRIGHT and LICENSE files for more details.<div class="form--field"><%= styled_label_tag :work_package_due_date, WorkPackage.human_attribute_name(:due_date) %><div class="form--field-container -visible-overflow">- <%= angular_component_tag 'op-basic-single-date-picker',+ <%= angular_component_tag 'opce-basic-single-date-picker',inputs: {id: "work_package_due_date",name: "work_package[due_date]"diff --git a/app/views/work_packages/moves/new.html.erb b/app/views/work_packages/moves/new.html.erbindex db732055f37..921b0724c6b 100644--- a/app/views/work_packages/moves/new.html.erb+++ b/app/views/work_packages/moves/new.html.erb@@ -156,7 +156,7 @@ See COPYRIGHT and LICENSE files for more details.<div class="form--field"><label class="form--label" for='start_date'><%= WorkPackage.human_attribute_name(:start_date) %></label><div class="form--field-container -visible-overflow">- <%= angular_component_tag 'op-basic-single-date-picker',+ <%= angular_component_tag 'opce-basic-single-date-picker',inputs: {id: "start_date",name: "start_date"@@ -167,7 +167,7 @@ See COPYRIGHT and LICENSE files for more details.<div class="form--field"><label class="form--label" for='due_date'><%= WorkPackage.human_attribute_name(:due_date) %></label><div class="form--field-container -visible-overflow">- <%= angular_component_tag 'op-basic-single-date-picker',+ <%= angular_component_tag 'opce-basic-single-date-picker',inputs: {id: "due_date",name: "due_date"diff --git a/docs/development/application-architecture/README.md b/docs/development/application-architecture/README.mdindex 15a23acfae9..2c333480878 100644--- a/docs/development/application-architecture/README.md+++ b/docs/development/application-architecture/README.md@@ -217,7 +217,7 @@ A response that is fully controlled by Rails but extended by some Angular compon3. The rendered response is returned to the Browser and Angular is initialized globally once in [`frontend/src/main.ts`](https://github.com/opf/openproject/blob/dev/frontend/src/main.ts#L48-L49).-4. A global service, the [`DynamicBootstrapper`](https://github.com/opf/openproject/blob/dev/frontend/src/app/core/setup/globals/dynamic-bootstrapper.ts), looks for eligible components to bootstrap in the rendered template and forces the global angular application to bootstrap this component. This may result in many dom-separated components in the page to be bootstrapped by Angular for dynamic content.+4. Dynamic components in Angular are registered as [custom elements](https://angular.dev/guide/elements) so they can be used throughout the page as web components.5. This triggers the [`FormConfigurationComponent`](https://github.com/opf/openproject/blob/dev/frontend/src/app/features/admin/types/type-form-configuration.component.ts) to be initialized and allows the application to include a highly dynamic component (drag & drop organization of attributes) to be used on an admin form that otherwise has no connection to Angular.diff --git a/frontend/.eslintrc.js b/frontend/.eslintrc.jsindex 79d2b879695..8e1c4fb6f5c 100644--- a/frontend/.eslintrc.js+++ b/frontend/.eslintrc.js@@ -176,6 +176,8 @@ module.exports = {// It's common in Angular to wrap even pure functions in classes for injection purposes"class-methods-use-this": "off",++ "spaced-comment": "off",},},{diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.tsindex 86d3af6284e..ea217028849 100644--- a/frontend/src/app/app.module.ts+++ b/frontend/src/app/app.module.ts@@ -26,7 +26,7 @@// See COPYRIGHT and LICENSE files for more details.//++-import { APP_INITIALIZER, ApplicationRef, Injector, NgModule } from '@angular/core';+import { APP_INITIALIZER, ApplicationRef, DoBootstrap, Injector, NgModule } from '@angular/core';import { A11yModule } from '@angular/cdk/a11y';import { HTTP_INTERCEPTORS, HttpClient, HttpClientModule } from '@angular/common/http';import { ReactiveFormsModule } from '@angular/forms';@@ -38,7 +38,6 @@ import { OpenprojectFieldsModule } from 'core-app/shared/components/fields/openpimport { OpSharedModule } from 'core-app/shared/shared.module';import { OpSpotModule } from 'core-app/spot/spot.module';import { OpDragScrollDirective } from 'core-app/shared/directives/op-drag-scroll/op-drag-scroll.directive';-import { DynamicBootstrapper } from 'core-app/core/setup/globals/dynamic-bootstrapper';import { OpenprojectWorkPackagesModule } from 'core-app/features/work-packages/openproject-work-packages.module';import { OpenprojectAttachmentsModule } from 'core-app/shared/components/attachments/openproject-attachments.module';import { OpenprojectEditorModule } from 'core-app/shared/components/editor/openproject-editor.module';@@ -92,8 +91,6 @@ import { MainMenuResizerComponent } from 'core-app/shared/components/resizer/resimport { OpenprojectTabsModule } from 'core-app/shared/components/tabs/openproject-tabs.module';import { OpenprojectAdminModule } from 'core-app/features/admin/openproject-admin.module';import { OpenprojectHalModule } from 'core-app/features/hal/openproject-hal.module';-import { globalDynamicComponents } from 'core-app/core/setup/global-dynamic-components.const';-import { HookService } from 'core-app/features/plugins/hook-service';import { OpenprojectPluginsModule } from 'core-app/features/plugins/openproject-plugins.module';import { LinkedPluginsModule } from 'core-app/features/plugins/linked-plugins.module';import {@@ -171,12 +168,79 @@ import {import {WorkPackageSplitViewEntryComponent,} from 'core-app/features/work-packages/routing/wp-split-view/wp-split-view-entry.component';-import { InAppNotificationsDateAlertsUpsaleComponent } from 'core-app/features/in-app-notifications/date-alerts-upsale/ian-date-alerts-upsale.component';+import {+ InAppNotificationsDateAlertsUpsaleComponent,+} from 'core-app/features/in-app-notifications/date-alerts-upsale/ian-date-alerts-upsale.component';import { ShareUpsaleComponent } from 'core-app/features/enterprise/share-upsale/share-upsale.component';import {StorageLoginButtonComponent,} from 'core-app/shared/components/storages/storage-login-button/storage-login-button.component';import { OpCustomModalOverlayComponent } from 'core-app/shared/components/modal/custom-modal-overlay.component';+import { TimerAccountMenuComponent } from 'core-app/shared/components/time_entries/timer/timer-account-menu.component';+import {+ RemoteFieldUpdaterComponent,+} from 'core-app/shared/components/remote-field-updater/remote-field-updater.component';+import {+ OpModalSingleDatePickerComponent,+} from 'core-app/shared/components/datepicker/modal-single-date-picker/modal-single-date-picker.component';+import { SpotDropModalPortalComponent } from 'core-app/spot/components/drop-modal/drop-modal-portal.component';+import { OpModalOverlayComponent } from 'core-app/shared/components/modal/modal-overlay.component';+import {+ InAppNotificationBellComponent,+} from 'core-app/features/in-app-notifications/bell/in-app-notification-bell.component';+import { BackupComponent } from 'core-app/core/setup/globals/components/admin/backup.component';+import {+ EditableQueryPropsComponent,+} from 'core-app/features/admin/editable-query-props/editable-query-props.component';+import {+ TriggerActionsEntryComponent,+} from 'core-app/shared/components/time_entries/edit/trigger-actions-entry.component';+import {+ WorkPackageOverviewGraphComponent,+} from 'core-app/shared/components/work-package-graphs/overview/wp-overview-graph.component';+import {+ EEActiveSavedTrialComponent,+} from 'core-app/features/enterprise/enterprise-active-trial/ee-active-saved-trial.component';+import { FreeTrialButtonComponent } from 'core-app/features/enterprise/free-trial-button/free-trial-button.component';+import { EnterpriseBaseComponent } from 'core-app/features/enterprise/enterprise-base.component';+import { NoResultsComponent } from 'core-app/shared/components/no-results/no-results.component';+import {+ OpNonWorkingDaysListComponent,+} from 'core-app/shared/components/op-non-working-days-list/op-non-working-days-list.component';+import { EnterpriseBannerComponent } from 'core-app/shared/components/enterprise-banner/enterprise-banner.component';+import {+ CollapsibleSectionComponent,+} from 'core-app/shared/components/collapsible-section/collapsible-section.component';+import { CopyToClipboardComponent } from 'core-app/shared/components/copy-to-clipboard/copy-to-clipboard.component';+import { GlobalSearchTitleComponent } from 'core-app/core/global_search/title/global-search-title.component';+import { ContentTabsComponent } from 'core-app/shared/components/tabs/content-tabs/content-tabs.component';+import {+ AddSectionDropdownComponent,+} from 'core-app/shared/components/hide-section/add-section-dropdown/add-section-dropdown.component';+import {+ HideSectionLinkComponent,+} from 'core-app/shared/components/hide-section/hide-section-link/hide-section-link.component';+import { PersistentToggleComponent } from 'core-app/shared/components/persistent-toggle/persistent-toggle.component';+import { TypeFormConfigurationComponent } from 'core-app/features/admin/types/type-form-configuration.component';+import { ToastsContainerComponent } from 'core-app/shared/components/toaster/toasts-container.component';+import { GlobalSearchWorkPackagesComponent } from 'core-app/core/global_search/global-search-work-packages.component';+import {+ CustomDateActionAdminComponent,+} from 'core-app/features/work-packages/components/wp-custom-actions/date-action/custom-date-action-admin.component';+import { HomescreenNewFeaturesBlockComponent } from 'core-app/features/homescreen/blocks/new-features.component';+import { GlobalSearchTabsComponent } from 'core-app/core/global_search/tabs/global-search-tabs.component';+import {+ ZenModeButtonComponent,+} from 'core-app/features/work-packages/components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component';+import { ColorsAutocompleterComponent } from 'core-app/shared/components/colors/colors-autocompleter.component';+import {+ StaticAttributeHelpTextComponent,+} from 'core-app/shared/components/attribute-help-texts/static-attribute-help-text.component';+import {+ AvatarUploadFormComponent,+} from 'core-app/features/plugins/linked/openproject-avatars/avatar-upload-form/avatar-upload-form.component';+import { appBaseSelector, ApplicationBaseComponent } from 'core-app/core/routing/base/application-base.component';+import { SpotSwitchComponent } from 'core-app/spot/components/switch/switch.component';export function initializeServices(injector:Injector) {return () => {@@ -324,27 +388,16 @@ export function initializeServices(injector:Injector) {OpDragScrollDirective,],})-export class OpenProjectModule {+export class OpenProjectModule implements DoBootstrap {// noinspection JSUnusedGlobalSymbolsngDoBootstrap(appRef:ApplicationRef) {- // Register global dynamic components- // this is necessary to ensure they are not tree-shaken- // (if they are not used anywhere in Angular, they would be removed)- DynamicBootstrapper.register(...globalDynamicComponents);-- // Perform global dynamic bootstrapping of our entry components- // that are in the current DOM response.- DynamicBootstrapper.bootstrapOptionalDocument(appRef, document);- this.registerCustomElements(appRef.injector);+ // Try to bootstrap a dynamic root element+ const root = document.querySelector(appBaseSelector);+ if (root) {+ appRef.bootstrap(ApplicationBaseComponent, root);+ }- // Call hook service to allow modules to bootstrap additional elements.- // We can't use ngDoBootstrap in nested modules since they are not called.- const hookService = (appRef as any)._injector.get(HookService);- hookService- .call('openProjectAngularBootstrap')- .forEach((results:{ selector:string, cls:any }[]) => {- DynamicBootstrapper.bootstrapOptionalDocument(appRef, document, results);- });+ this.registerCustomElements(appRef.injector);}private registerCustomElements(injector:Injector) {@@ -364,6 +417,7 @@ export class OpenProjectModule {registerCustomElement('opce-ckeditor-augmented-textarea', CkeditorAugmentedTextareaComponent, { injector });registerCustomElement('opce-draggable-autocompleter', DraggableAutocompleteComponent, { injector });registerCustomElement('opce-attribute-help-text', AttributeHelpTextComponent, { injector });+ registerCustomElement('opce-static-attribute-help-text', StaticAttributeHelpTextComponent, { injector });registerCustomElement('opce-exclusion-info', OpExclusionInfoComponent, { injector });registerCustomElement('opce-attachments', OpAttachmentsComponent, { injector });registerCustomElement('opce-storage-login-button', StorageLoginButtonComponent, { injector });@@ -380,5 +434,43 @@ export class OpenProjectModule {registerCustomElement('opce-ian-date-alerts-upsale', InAppNotificationsDateAlertsUpsaleComponent, { injector });registerCustomElement('opce-share-upsale', ShareUpsaleComponent, { injector });registerCustomElement('opce-wp-split-view', WorkPackageSplitViewEntryComponent, { injector });+ registerCustomElement('opce-timer-account-menu', TimerAccountMenuComponent, { injector });+ registerCustomElement('opce-remote-field-updater', RemoteFieldUpdaterComponent, { injector });+ registerCustomElement('opce-modal-single-date-picker', OpModalSingleDatePickerComponent, { injector });+ registerCustomElement('opce-basic-single-date-picker', OpBasicSingleDatePickerComponent, { injector });+ registerCustomElement('opce-storage-login-button', StorageLoginButtonComponent, { injector });+ registerCustomElement('opce-spot-drop-modal-portal', SpotDropModalPortalComponent, { injector });+ registerCustomElement('opce-spot-switch', SpotSwitchComponent, { injector });+ registerCustomElement('opce-modal-overlay', OpModalOverlayComponent, { injector });+ registerCustomElement('opce-in-app-notification-bell', InAppNotificationBellComponent, { injector });+ registerCustomElement('opce-backup', BackupComponent, { injector });+ registerCustomElement('opce-editable-query-props', EditableQueryPropsComponent, { injector });+ registerCustomElement('opce-time-entry-trigger-actions', TriggerActionsEntryComponent, { injector });+ registerCustomElement('opce-wp-overview-graph', WorkPackageOverviewGraphComponent, { injector });+ registerCustomElement('opce-header-project-select', OpHeaderProjectSelectComponent, { injector });+ registerCustomElement('opce-enterprise-active-saved-trial', EEActiveSavedTrialComponent, { injector });+ registerCustomElement('opce-free-trial-button', FreeTrialButtonComponent, { injector });+ registerCustomElement('opce-enterprise-base', EnterpriseBaseComponent, { injector });+ registerCustomElement('opce-no-results', NoResultsComponent, { injector });+ registerCustomElement('opce-non-working-days-list', OpNonWorkingDaysListComponent, { injector });+ registerCustomElement('opce-enterprise-banner', EnterpriseBannerComponent, { injector });+ registerCustomElement('opce-collapsible-section-augment', CollapsibleSectionComponent, { injector });+ registerCustomElement('opce-main-menu-toggle', MainMenuToggleComponent, { injector });+ registerCustomElement('opce-main-menu-resizer', MainMenuResizerComponent, { injector });+ registerCustomElement('opce-copy-to-clipboard', CopyToClipboardComponent, { injector });+ registerCustomElement('opce-global-search-title', GlobalSearchTitleComponent, { injector });+ registerCustomElement('opce-content-tabs', ContentTabsComponent, { injector });+ registerCustomElement('opce-add-section-dropdown', AddSectionDropdownComponent, { injector });+ registerCustomElement('opce-hide-section-link', HideSectionLinkComponent, { injector });+ registerCustomElement('opce-persistent-toggle', PersistentToggleComponent, { injector });+ registerCustomElement('opce-admin-type-form-configuration', TypeFormConfigurationComponent, { injector });+ registerCustomElement('opce-toasts-container', ToastsContainerComponent, { injector });+ registerCustomElement('opce-global-search-work-packages', GlobalSearchWorkPackagesComponent, { injector });+ registerCustomElement('opce-custom-date-action-admin', CustomDateActionAdminComponent, { injector });+ registerCustomElement('opce-homescreen-new-features-block', HomescreenNewFeaturesBlockComponent, { injector });+ registerCustomElement('opce-global-search-tabs', GlobalSearchTabsComponent, { injector });+ registerCustomElement('opce-zen-mode-toggle-button', ZenModeButtonComponent, { injector });+ registerCustomElement('opce-colors-autocompleter', ColorsAutocompleterComponent, { injector });+ registerCustomElement('opce-avatar-upload-form', AvatarUploadFormComponent, { injector });}}diff --git a/frontend/src/app/core/global_search/global-search-work-packages-entry.component.ts b/frontend/src/app/core/global_search/global-search-work-packages-entry.component.tsdeleted file mode 100644index 36a254c9146..00000000000--- a/frontend/src/app/core/global_search/global-search-work-packages-entry.component.ts+++ /dev/null@@ -1,46 +0,0 @@-//-- copyright-// OpenProject is an open source project management software.-// Copyright (C) the OpenProject GmbH-//-// This program is free software; you can redistribute it and/or-// modify it under the terms of the GNU General Public License version 3.-//-// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:-// Copyright (C) 2006-2013 Jean-Philippe Lang-// Copyright (C) 2010-2013 the ChiliProject Team-//-// This program is free software; you can redistribute it and/or-// modify it under the terms of the GNU General Public License-// as published by the Free Software Foundation; either version 2-// of the License, or (at your option) any later version.-//-// This program is distributed in the hope that it will be useful,-// but WITHOUT ANY WARRANTY; without even the implied warranty of-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-// GNU General Public License for more details.-//-// You should have received a copy of the GNU General Public License-// along with this program; if not, write to the Free Software-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.-//-// See COPYRIGHT and LICENSE files for more details.-//++--import { Component } from '@angular/core';-import {- WorkPackageIsolatedQuerySpaceDirective,-} from 'core-app/features/work-packages/directives/query-space/wp-isolated-query-space.directive';--export const globalSearchWorkPackagesSelectorEntry = 'global-search-work-packages-entry';--/**- * An entry component to be rendered by Rails which opens an isolated query space- * for the work package search embedded table.- */-@Component({- selector: globalSearchWorkPackagesSelectorEntry,- hostDirectives: [WorkPackageIsolatedQuerySpaceDirective],- template: '<global-search-work-packages></global-search-work-packages>',-})-export class GlobalSearchWorkPackagesEntryComponent {-}diff --git a/frontend/src/app/core/global_search/global-search-work-packages.component.ts b/frontend/src/app/core/global_search/global-search-work-packages.component.tsindex 79538726cce..38cb7edcd25 100644--- a/frontend/src/app/core/global_search/global-search-work-packages.component.ts+++ b/frontend/src/app/core/global_search/global-search-work-packages.component.ts@@ -27,26 +27,42 @@//++import {- AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, OnDestroy, OnInit, Renderer2,+ AfterViewInit,+ ChangeDetectionStrategy,+ ChangeDetectorRef,+ Component,+ ElementRef,+ OnDestroy,+ OnInit,+ Renderer2,} from '@angular/core';import { FocusHelperService } from 'core-app/shared/directives/focus/focus-helper';import { I18nService } from 'core-app/core/i18n/i18n.service';import { HalResourceService } from 'core-app/features/hal/services/hal-resource.service';import { GlobalSearchService } from 'core-app/core/global_search/services/global-search.service';import { UrlParamsHelperService } from 'core-app/features/work-packages/components/wp-query/url-params-helper';-import { WorkPackageTableConfigurationObject } from 'core-app/features/work-packages/components/wp-table/wp-table-configuration';+import {+ WorkPackageTableConfigurationObject+} from 'core-app/features/work-packages/components/wp-table/wp-table-configuration';import { IsolatedQuerySpace } from 'core-app/features/work-packages/directives/query-space/isolated-query-space';-import { WorkPackageViewFiltersService } from 'core-app/features/work-packages/routing/wp-view-base/view-services/wp-view-filters.service';+import {+ WorkPackageViewFiltersService+} from 'core-app/features/work-packages/routing/wp-view-base/view-services/wp-view-filters.service';import { debounceTime, distinctUntilChanged, skip } from 'rxjs/operators';import { combineLatest } from 'rxjs';import { UntilDestroyedMixin } from 'core-app/shared/helpers/angular/until-destroyed.mixin';-import { WorkPackageFiltersService } from 'core-app/features/work-packages/components/filters/wp-filters/wp-filters.service';+import {+ WorkPackageFiltersService+} from 'core-app/features/work-packages/components/filters/wp-filters/wp-filters.service';+import {+ WorkPackageIsolatedQuerySpaceDirective+} from "core-app/features/work-packages/directives/query-space/wp-isolated-query-space.directive";-export const globalSearchWorkPackagesSelector = 'global-search-work-packages';@Component({- selector: globalSearchWorkPackagesSelector,+ selector: 'opce-global-search-work-packages',changeDetection: ChangeDetectionStrategy.OnPush,+ hostDirectives: [WorkPackageIsolatedQuerySpaceDirective],template: `<wp-embedded-table *ngIf="!resultsHidden"[queryProps]="queryProps"diff --git a/frontend/src/app/core/global_search/openproject-global-search.module.ts b/frontend/src/app/core/global_search/openproject-global-search.module.tsindex 642ea9dc279..5b14b2b0cf4 100644--- a/frontend/src/app/core/global_search/openproject-global-search.module.ts+++ b/frontend/src/app/core/global_search/openproject-global-search.module.ts@@ -33,9 +33,6 @@ import { GlobalSearchWorkPackagesComponent } from 'core-app/core/global_search/gimport { GlobalSearchTabsComponent } from 'core-app/core/global_search/tabs/global-search-tabs.component';import { GlobalSearchTitleComponent } from 'core-app/core/global_search/title/global-search-title.component';import { GlobalSearchService } from 'core-app/core/global_search/services/global-search.service';-import {- GlobalSearchWorkPackagesEntryComponent,-} from 'core-app/core/global_search/global-search-work-packages-entry.component';import {OpenprojectAutocompleterModule,} from 'core-app/shared/components/autocompleter/openproject-autocompleter.module';@@ -54,7 +51,6 @@ import { RecentItemsService } from 'core-app/core/recent-items.service';],declarations: [GlobalSearchInputComponent,- GlobalSearchWorkPackagesEntryComponent,GlobalSearchWorkPackagesComponent,GlobalSearchTabsComponent,GlobalSearchTitleComponent,diff --git a/frontend/src/app/core/global_search/tabs/global-search-tabs.component.ts b/frontend/src/app/core/global_search/tabs/global-search-tabs.component.tsindex a93478f3ff8..e71ebd37d06 100644--- a/frontend/src/app/core/global_search/tabs/global-search-tabs.component.ts+++ b/frontend/src/app/core/global_search/tabs/global-search-tabs.component.ts@@ -26,24 +26,16 @@// See COPYRIGHT and LICENSE files for more details.//++-import {- ChangeDetectorRef,- Component,- OnDestroy,- Injector,- OnInit,- ChangeDetectionStrategy,-} from '@angular/core';+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Injector, OnDestroy, OnInit, } from '@angular/core';import { StateService } from '@uirouter/core';import { Subscription } from 'rxjs';import { GlobalSearchService } from 'core-app/core/global_search/services/global-search.service';import { ScrollableTabsComponent } from 'core-app/shared/components/tabs/scrollable-tabs/scrollable-tabs.component';import { TabDefinition } from 'core-app/shared/components/tabs/tab.interface';-export const globalSearchTabsSelector = 'global-search-tabs';@Component({- selector: globalSearchTabsSelector,+ selector: 'opce-global-search-tabs',templateUrl: '../../../shared/components/tabs/scrollable-tabs/scrollable-tabs.component.html',changeDetection: ChangeDetectionStrategy.OnPush,})diff --git a/frontend/src/app/core/global_search/title/global-search-title.component.ts b/frontend/src/app/core/global_search/title/global-search-title.component.tsindex 96385ff5932..5457936ed40 100644--- a/frontend/src/app/core/global_search/title/global-search-title.component.ts+++ b/frontend/src/app/core/global_search/title/global-search-title.component.ts@@ -25,14 +25,7 @@//// See COPYRIGHT and LICENSE files for more details.//++-import {- ChangeDetectorRef,- Component,- ElementRef,- Injector,- Input,- OnInit,-} from '@angular/core';+import { ChangeDetectorRef, Component, ElementRef, Injector, Input, OnInit, } from '@angular/core';import { distinctUntilChanged } from 'rxjs/operators';import { combineLatest } from 'rxjs';import { I18nService } from 'core-app/core/i18n/i18n.service';@@ -41,10 +34,8 @@ import { CurrentProjectService } from 'core-app/core/current-project/current-proimport { InjectField } from 'core-app/shared/helpers/angular/inject-field.decorator';import { UntilDestroyedMixin } from 'core-app/shared/helpers/angular/until-destroyed.mixin';-export const globalSearchTitleSelector = 'global-search-title';-@Component({- selector: 'global-search-title',+ selector: 'opce-global-search-title',templateUrl: './global-search-title.component.html',})export class GlobalSearchTitleComponent extends UntilDestroyedMixin implements OnInit {diff --git a/frontend/src/app/core/main-menu/main-menu-toggle.component.ts b/frontend/src/app/core/main-menu/main-menu-toggle.component.tsindex 129343eb4f7..1bb85b01673 100644--- a/frontend/src/app/core/main-menu/main-menu-toggle.component.ts+++ b/frontend/src/app/core/main-menu/main-menu-toggle.component.ts@@ -26,9 +26,7 @@// See COPYRIGHT and LICENSE files for more details.//++-import {- ChangeDetectionStrategy, ChangeDetectorRef, Component, Injector, OnInit,-} from '@angular/core';+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Injector, OnInit, } from '@angular/core';import { distinctUntilChanged } from 'rxjs/operators';import { CurrentProjectService } from 'core-app/core/current-project/current-project.service';import { InjectField } from 'core-app/shared/helpers/angular/inject-field.decorator';@@ -36,10 +34,9 @@ import { UntilDestroyedMixin } from 'core-app/shared/helpers/angular/until-destrimport { MainMenuToggleService } from './main-menu-toggle.service';import { TopMenuService } from 'core-app/core/top-menu/top-menu.service';-export const mainMenuToggleSelector = 'main-menu-toggle';@Component({- selector: mainMenuToggleSelector,+ selector: 'opce-main-menu-toggle',changeDetection: ChangeDetectionStrategy.OnPush,host: {class: 'op-app-menu op-main-menu-toggle',diff --git a/frontend/src/app/core/setup/global-dynamic-components.const.ts b/frontend/src/app/core/setup/global-dynamic-components.const.tsdeleted file mode 100644index 006b5c52b79..00000000000--- a/frontend/src/app/core/setup/global-dynamic-components.const.ts+++ /dev/null@@ -1,215 +0,0 @@-import { OptionalBootstrapDefinition } from 'core-app/core/setup/globals/dynamic-bootstrapper';-import { appBaseSelector, ApplicationBaseComponent } from 'core-app/core/routing/base/application-base.component';-import {- ColorsAutocompleterComponent,- colorsAutocompleterSelector,-} from 'core-app/shared/components/colors/colors-autocompleter.component';-import {- ZenModeButtonComponent,- zenModeComponentSelector,-} from 'core-app/features/work-packages/components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component';-import {- GlobalSearchWorkPackagesComponent,- globalSearchWorkPackagesSelector,-} from 'core-app/core/global_search/global-search-work-packages.component';-import {- CustomDateActionAdminComponent,- customDateActionAdminSelector,-} from 'core-app/features/work-packages/components/wp-custom-actions/date-action/custom-date-action-admin.component';-import {- GlobalSearchWorkPackagesEntryComponent,- globalSearchWorkPackagesSelectorEntry,-} from 'core-app/core/global_search/global-search-work-packages-entry.component';-import {- ToastsContainerComponent,- toastsContainerSelector,-} from 'core-app/shared/components/toaster/toasts-container.component';-import {- CkeditorAugmentedTextareaComponent,- ckeditorAugmentedTextareaSelector,-} from 'core-app/shared/components/editor/components/ckeditor-augmented-textarea/ckeditor-augmented-textarea.component';-import {- PersistentToggleComponent,- persistentToggleSelector,-} from 'core-app/shared/components/persistent-toggle/persistent-toggle.component';-import {- HideSectionLinkComponent,- hideSectionLinkSelector,-} from 'core-app/shared/components/hide-section/hide-section-link/hide-section-link.component';-import {- ShowSectionDropdownComponent,- showSectionDropdownSelector,-} from 'core-app/shared/components/hide-section/show-section-dropdown.component';-import {- AddSectionDropdownComponent,- addSectionDropdownSelector,-} from 'core-app/shared/components/hide-section/add-section-dropdown/add-section-dropdown.component';-import {- ContentTabsComponent,- contentTabsSelector,-} from 'core-app/shared/components/tabs/content-tabs/content-tabs.component';-import {- CopyToClipboardComponent,- copyToClipboardSelector,-} from 'core-app/shared/components/copy-to-clipboard/copy-to-clipboard.component';-import {- collapsibleSectionAugmentSelector,- CollapsibleSectionComponent,-} from 'core-app/shared/components/collapsible-section/collapsible-section.component';-import {- headerProjectSelectSelector,- OpHeaderProjectSelectComponent,-} from 'core-app/shared/components/header-project-select/header-project-select.component';-import {- RemoteFieldUpdaterComponent,- remoteFieldUpdaterSelector,-} from 'core-app/shared/components/remote-field-updater/remote-field-updater.component';-import {- WorkPackageOverviewGraphComponent,- wpOverviewGraphSelector,-} from 'core-app/shared/components/work-package-graphs/overview/wp-overview-graph.component';-import {- GlobalSearchTitleComponent,- globalSearchTitleSelector,-} from 'core-app/core/global_search/title/global-search-title.component';-import {- GlobalSearchTabsComponent,- globalSearchTabsSelector,-} from 'core-app/core/global_search/tabs/global-search-tabs.component';-import {- TriggerActionsEntryComponent,- triggerActionsEntryComponentSelector,-} from 'core-app/shared/components/time_entries/edit/trigger-actions-entry.component';-import {- AttributeHelpTextComponent,- attributeHelpTextSelector,-} from 'core-app/shared/components/attribute-help-texts/attribute-help-text.component';-import { SpotSwitchComponent, spotSwitchSelector } from 'core-app/spot/components/switch/switch.component';-import { BackupComponent, backupSelector } from 'core-app/core/setup/globals/components/admin/backup.component';-import {- EnterpriseBaseComponent,- enterpriseBaseSelector,-} from 'core-app/features/enterprise/enterprise-base.component';-import {- FreeTrialButtonComponent,- freeTrialButtonSelector,-} from 'core-app/features/enterprise/free-trial-button/free-trial-button.component';-import {- EnterpriseBannerComponent,- enterpriseBannerSelector,-} from 'core-app/shared/components/enterprise-banner/enterprise-banner.component';-import {- EnterprisePageComponent,- enterprisePageSelector,-} from 'core-app/shared/components/enterprise-page/enterprise-page.component';-import {- nonWorkingDaysListSelector,- OpNonWorkingDaysListComponent,-} from 'core-app/shared/components/op-non-working-days-list/op-non-working-days-list.component';-import {- EEActiveSavedTrialComponent,- enterpriseActiveSavedTrialSelector,-} from 'core-app/features/enterprise/enterprise-active-trial/ee-active-saved-trial.component';-import { NoResultsComponent, noResultsSelector } from 'app/shared/components/no-results/no-results.component';-import {- HomescreenNewFeaturesBlockComponent,- homescreenNewFeaturesBlockSelector,-} from 'core-app/features/homescreen/blocks/new-features.component';-import { MainMenuToggleComponent, mainMenuToggleSelector } from 'core-app/core/main-menu/main-menu-toggle.component';-import {- MainMenuResizerComponent,- mainMenuResizerSelector,-} from 'core-app/shared/components/resizer/resizer/main-menu-resizer.component';-import {- adminTypeFormConfigurationSelector,- TypeFormConfigurationComponent,-} from 'core-app/features/admin/types/type-form-configuration.component';-import {- EditableQueryPropsComponent,- editableQueryPropsSelector,-} from 'core-app/features/admin/editable-query-props/editable-query-props.component';-import {- InAppNotificationBellComponent,- opInAppNotificationBellSelector,-} from 'core-app/features/in-app-notifications/bell/in-app-notification-bell.component';-import {- OpModalOverlayComponent,- opModalOverlaySelector,-} from 'core-app/shared/components/modal/modal-overlay.component';-import {- OpModalSingleDatePickerComponent,- opModalSingleDatePickerSelector,-} from 'core-app/shared/components/datepicker/modal-single-date-picker/modal-single-date-picker.component';-import {- OpBasicSingleDatePickerComponent,- opBasicSingleDatePickerSelector,-} from 'core-app/shared/components/datepicker/basic-single-date-picker/basic-single-date-picker.component';-import {- SpotDropModalPortalComponent,- spotDropModalPortalComponentSelector,-} from 'core-app/spot/components/drop-modal/drop-modal-portal.component';-import {- StaticAttributeHelpTextComponent,- staticAttributeHelpTextSelector,-} from 'core-app/shared/components/attribute-help-texts/static-attribute-help-text.component';-import {- opStorageLoginButtonSelector,- StorageLoginButtonComponent,-} from 'core-app/shared/components/storages/storage-login-button/storage-login-button.component';-import {- TimerAccountMenuComponent,- timerAccountSelector,-} from 'core-app/shared/components/time_entries/timer/timer-account-menu.component';--export const globalDynamicComponents:OptionalBootstrapDefinition[] = [- { selector: appBaseSelector, cls: ApplicationBaseComponent },- { selector: attributeHelpTextSelector, cls: AttributeHelpTextComponent },- { selector: staticAttributeHelpTextSelector, cls: StaticAttributeHelpTextComponent },- { selector: colorsAutocompleterSelector, cls: ColorsAutocompleterComponent },- { selector: zenModeComponentSelector, cls: ZenModeButtonComponent },- { selector: globalSearchTabsSelector, cls: GlobalSearchTabsComponent },- { selector: globalSearchWorkPackagesSelector, cls: GlobalSearchWorkPackagesComponent },- { selector: homescreenNewFeaturesBlockSelector, cls: HomescreenNewFeaturesBlockComponent },- { selector: customDateActionAdminSelector, cls: CustomDateActionAdminComponent },- { selector: globalSearchWorkPackagesSelectorEntry, cls: GlobalSearchWorkPackagesEntryComponent },- { selector: toastsContainerSelector, cls: ToastsContainerComponent },- { selector: adminTypeFormConfigurationSelector, cls: TypeFormConfigurationComponent },- { selector: ckeditorAugmentedTextareaSelector, cls: CkeditorAugmentedTextareaComponent, embeddable: true },- { selector: persistentToggleSelector, cls: PersistentToggleComponent },- { selector: hideSectionLinkSelector, cls: HideSectionLinkComponent },- { selector: showSectionDropdownSelector, cls: ShowSectionDropdownComponent },- { selector: addSectionDropdownSelector, cls: AddSectionDropdownComponent },- { selector: contentTabsSelector, cls: ContentTabsComponent },- { selector: globalSearchTitleSelector, cls: GlobalSearchTitleComponent },- { selector: copyToClipboardSelector, cls: CopyToClipboardComponent },- { selector: mainMenuResizerSelector, cls: MainMenuResizerComponent },- { selector: mainMenuToggleSelector, cls: MainMenuToggleComponent },- { selector: collapsibleSectionAugmentSelector, cls: CollapsibleSectionComponent },- { selector: enterpriseBannerSelector, cls: EnterpriseBannerComponent },- { selector: nonWorkingDaysListSelector, cls: OpNonWorkingDaysListComponent },- { selector: enterprisePageSelector, cls: EnterprisePageComponent },- { selector: noResultsSelector, cls: NoResultsComponent },- { selector: enterpriseBaseSelector, cls: EnterpriseBaseComponent },- { selector: freeTrialButtonSelector, cls: FreeTrialButtonComponent },- { selector: enterpriseActiveSavedTrialSelector, cls: EEActiveSavedTrialComponent },- { selector: headerProjectSelectSelector, cls: OpHeaderProjectSelectComponent },- { selector: wpOverviewGraphSelector, cls: WorkPackageOverviewGraphComponent },- { selector: triggerActionsEntryComponentSelector, cls: TriggerActionsEntryComponent, embeddable: true },- { selector: editableQueryPropsSelector, cls: EditableQueryPropsComponent },- { selector: backupSelector, cls: BackupComponent },- { selector: opInAppNotificationBellSelector, cls: InAppNotificationBellComponent },-- { selector: opModalOverlaySelector, cls: OpModalOverlayComponent },- { selector: spotDropModalPortalComponentSelector, cls: SpotDropModalPortalComponent },- { selector: spotSwitchSelector, cls: SpotSwitchComponent },- { selector: opStorageLoginButtonSelector, cls: StorageLoginButtonComponent },-- { selector: opModalSingleDatePickerSelector, cls: OpModalSingleDatePickerComponent, embeddable: true },- { selector: opBasicSingleDatePickerSelector, cls: OpBasicSingleDatePickerComponent, embeddable: true },-- // It is important to initialize the remoteFieldUpdaterSelector after the datepickers,- // because we need to access the input field of the datepickers inside the remoteFieldUpdaterSelector- { selector: remoteFieldUpdaterSelector, cls: RemoteFieldUpdaterComponent },-- { selector: timerAccountSelector, cls: TimerAccountMenuComponent },-];diff --git a/frontend/src/app/core/setup/globals/components/admin/backup.component.ts b/frontend/src/app/core/setup/globals/components/admin/backup.component.tsindex 917a7fe2f78..19060a8745f 100644--- a/frontend/src/app/core/setup/globals/components/admin/backup.component.ts+++ b/frontend/src/app/core/setup/globals/components/admin/backup.component.ts@@ -26,14 +26,7 @@// See COPYRIGHT and LICENSE files for more details.//++-import {- AfterViewInit,- ChangeDetectionStrategy,- Component,- ElementRef,- Injector,- ViewChild,-} from '@angular/core';+import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, Injector, ViewChild, } from '@angular/core';import { InjectField } from 'core-app/shared/helpers/angular/inject-field.decorator';import { I18nService } from 'core-app/core/i18n/i18n.service';import { ToastService } from 'core-app/shared/components/toaster/toast.service';@@ -44,10 +37,9 @@ import { OpenProjectBackupService } from 'core-app/core/backup/op-backup.serviceimport { HalResource } from 'core-app/features/hal/resources/hal-resource';import { HalError } from 'core-app/features/hal/services/hal-error';-export const backupSelector = 'backup';@Component({- selector: backupSelector,+ selector: 'opce-backup',templateUrl: './backup.component.html',changeDetection: ChangeDetectionStrategy.OnPush,})diff --git a/frontend/src/app/core/setup/globals/dynamic-bootstrapper.ts b/frontend/src/app/core/setup/globals/dynamic-bootstrapper.tsdeleted file mode 100644index b2ed5fbaa35..00000000000--- a/frontend/src/app/core/setup/globals/dynamic-bootstrapper.ts+++ /dev/null@@ -1,129 +0,0 @@-// -- copyright-// OpenProject is an open source project management software.-// Copyright (C) the OpenProject GmbH-//-// This program is free software; you can redistribute it and/or-// modify it under the terms of the GNU General Public License version 3.-//-// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:-// Copyright (C) 2006-2013 Jean-Philippe Lang-// Copyright (C) 2010-2013 the ChiliProject Team-//-// This program is free software; you can redistribute it and/or-// modify it under the terms of the GNU General Public License-// as published by the Free Software Foundation; either version 2-// of the License, or (at your option) any later version.-//-// This program is distributed in the hope that it will be useful,-// but WITHOUT ANY WARRANTY; without even the implied warranty of-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-// GNU General Public License for more details.-//-// You should have received a copy of the GNU General Public License-// along with this program; if not, write to the Free Software-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.-//-// See COPYRIGHT and LICENSE files for more details.--import { ComponentType } from '@angular/cdk/portal';-import { ApplicationRef } from '@angular/core';-import { debugLog } from 'core-app/shared/helpers/debug_output';--/**- * Optional bootstrap definition to allow selecting all matching- * DOM nodes to manually bootstrap them.- *- * This differs from Angular's bootstrap module definition since it expects these- * entries to be present on ALL pages. This is never the case for our optional- * bootstrapped components.- */-export interface OptionalBootstrapDefinition {- // The DOM selector used to locate an optional node- selector:string;- // The component class tied to it.- cls:ComponentType<any>;- // Whether the component may be embeddable in dynamically generated responses- // e.g., previews- embeddable?:boolean;-}--/**- * Static lookup table for dynamically bootstrapped components within our application- */-export class DynamicBootstrapper {- private static optionalBoostrapComponents:OptionalBootstrapDefinition[] = [];-- /**- * Register an optional bootstrap component to be dynamically bootstrapped- * whenever it occurs in the initially loaded DOM.- *- * @param {OptionalBootstrapDefinition} definition- */- public static register(...defs:OptionalBootstrapDefinition[]) {- this.optionalBoostrapComponents.push(...defs);- }-- /**- * Perform bootstrapping of matched elements within the given document.- *- * @param {ApplicationRef} appRef The application reference to lookup elements.- * @param {Document} doc The document element- * @param {OptionalBootstrapDefinition[]|undefined} definitions An optional set of components to bootstrap- */- public static bootstrapOptionalDocument(appRef:ApplicationRef, doc:Document, definitions = this.optionalBoostrapComponents) {- this.performBootstrap(appRef, doc, false, definitions);- }-- /**- * Perform bootstrapping of embeddable elements within the given node.- *- * @param {ApplicationRef} appRef The application reference to lookup elements.- * @param {HTMLElement} element A node to bootstrap elements within.- * @param {OptionalBootstrapDefinition[]|undefined} definitions An optional set of components to bootstrap- */- public static bootstrapOptionalEmbeddable(appRef:ApplicationRef, element:HTMLElement, definitions = this.optionalBoostrapComponents) {- // Delay the execution to avoid bootstrapping the embedded components while- // the app is running the Change Detection. This was throwing "ApplicationRef.tick- // is called recursively" error because of bootstrapOptionalEmbeddable and- // bootstrapOptionalDocument were called too close (ie: ckEditor macros).- Promise.resolve().then(() => this.performBootstrap(appRef, element, true, definitions));- }-- /**- * Get embeddable components- */- public static getEmbeddable() {- return this.optionalBoostrapComponents.filter((el) => el.embeddable);- }-- /**- * Bootstrap within a given document (globally, all components available) or within an element (embeddable compoennts- * only).- *- * @param {ApplicationRef} appRef- * @param {Document | HTMLElement} root- * @param {boolean} embedded- */- private static performBootstrap(appRef:ApplicationRef, root:Document|HTMLElement, embedded:boolean, definitions:OptionalBootstrapDefinition[]) {- definitions- .forEach((el) => {- // Skip non-embeddable components in an embedded bootstrap.- if (embedded && !el.embeddable) {- return;- }-- const elements = root.querySelectorAll(el.selector);- for (let i = 0; i < elements.length; i++) {- const target = elements[i];-- if (!embedded && target.closest('[op-dynamic-bootstrap]')) {- debugLog(`Skipping nested bootstrap ${el.selector} in %O`, target);- return;- }-- appRef.bootstrap(el.cls, target);- target.setAttribute('op-dynamic-bootstrap', 'true');- }- });- }-}diff --git a/frontend/src/app/core/setup/init-globals.ts b/frontend/src/app/core/setup/init-globals.tsindex 3558d044bd1..1dc8d4a6f4b 100644--- a/frontend/src/app/core/setup/init-globals.ts+++ b/frontend/src/app/core/setup/init-globals.ts@@ -30,5 +30,4 @@ import 'hammerjs';// Global scripts previously part of the application.js// Avoid require.context since that crashes angular regularly-import './globals/dynamic-bootstrapper';import './globals/openproject';diff --git a/frontend/src/app/features/admin/editable-query-props/editable-query-props.component.ts b/frontend/src/app/features/admin/editable-query-props/editable-query-props.component.tsindex 8197f534dbb..51486f66dda 100644--- a/frontend/src/app/features/admin/editable-query-props/editable-query-props.component.ts+++ b/frontend/src/app/features/admin/editable-query-props/editable-query-props.component.ts@@ -1,14 +1,13 @@-import {- ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, OnInit,-} from '@angular/core';+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, OnInit, } from '@angular/core';import { I18nService } from 'core-app/core/i18n/i18n.service';-import { ExternalQueryConfigurationService } from 'core-app/features/work-packages/components/wp-table/external-configuration/external-query-configuration.service';+import {+ ExternalQueryConfigurationService+} from 'core-app/features/work-packages/components/wp-table/external-configuration/external-query-configuration.service';import { UrlParamsHelperService } from 'core-app/features/work-packages/components/wp-query/url-params-helper';-export const editableQueryPropsSelector = 'editable-query-props';@Component({- selector: editableQueryPropsSelector,+ selector: 'opce-editable-query-props',templateUrl: './editable-query-props.component.html',changeDetection: ChangeDetectionStrategy.OnPush,})diff --git a/frontend/src/app/features/admin/types/type-form-configuration.component.ts b/frontend/src/app/features/admin/types/type-form-configuration.component.tsindex 9400bd0a1f9..b2618d6cb3d 100644--- a/frontend/src/app/features/admin/types/type-form-configuration.component.ts+++ b/frontend/src/app/features/admin/types/type-form-configuration.component.ts@@ -30,11 +30,11 @@ export interface TypeGroup {type:TypeGroupType;}-export const adminTypeFormConfigurationSelector = 'admin-type-form-configuration';+export const emptyTypeGroup = '__empty';@Component({- selector: adminTypeFormConfigurationSelector,+ selector: 'opce-admin-type-form-configuration',templateUrl: './type-form-configuration.html',providers: [TypeBannerService,diff --git a/frontend/src/app/features/enterprise/enterprise-active-trial/ee-active-saved-trial.component.ts b/frontend/src/app/features/enterprise/enterprise-active-trial/ee-active-saved-trial.component.tsindex 891076f79f5..cdbe0554bae 100644--- a/frontend/src/app/features/enterprise/enterprise-active-trial/ee-active-saved-trial.component.ts+++ b/frontend/src/app/features/enterprise/enterprise-active-trial/ee-active-saved-trial.component.ts@@ -30,10 +30,9 @@ import { ChangeDetectionStrategy, Component, ElementRef } from '@angular/core';import { I18nService } from 'core-app/core/i18n/i18n.service';import { EEActiveTrialBase } from 'core-app/features/enterprise/enterprise-active-trial/ee-active-trial.base';-export const enterpriseActiveSavedTrialSelector = 'enterprise-active-saved-trial';@Component({- selector: enterpriseActiveSavedTrialSelector,+ selector: 'opce-enterprise-active-saved-trial',templateUrl: './ee-active-trial.component.html',styleUrls: ['./ee-active-trial.component.sass'],changeDetection: ChangeDetectionStrategy.OnPush,diff --git a/frontend/src/app/features/enterprise/enterprise-base.component.ts b/frontend/src/app/features/enterprise/enterprise-base.component.tsindex 1546ce4922b..19a4f45e84a 100644--- a/frontend/src/app/features/enterprise/enterprise-base.component.ts+++ b/frontend/src/app/features/enterprise/enterprise-base.component.ts@@ -32,10 +32,9 @@ import { EnterpriseTrialModalComponent } from 'core-app/features/enterprise/enteimport { OpModalService } from 'core-app/shared/components/modal/modal.service';import { EnterpriseTrialService } from 'core-app/features/enterprise/enterprise-trial.service';-export const enterpriseBaseSelector = 'enterprise-base';@Component({- selector: enterpriseBaseSelector,+ selector: 'enterprise-base',templateUrl: './enterprise-base.component.html',styleUrls: ['./enterprise-base.component.sass'],})diff --git a/frontend/src/app/features/enterprise/free-trial-button/free-trial-button.component.ts b/frontend/src/app/features/enterprise/free-trial-button/free-trial-button.component.tsindex e1e03356ed5..73caea8b37f 100644--- a/frontend/src/app/features/enterprise/free-trial-button/free-trial-button.component.ts+++ b/frontend/src/app/features/enterprise/free-trial-button/free-trial-button.component.ts@@ -26,13 +26,7 @@// See COPYRIGHT and LICENSE files for more details.//++-import {- ChangeDetectionStrategy,- ChangeDetectorRef,- Component,- Injector,- OnInit,-} from '@angular/core';+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Injector, OnInit, } from '@angular/core';import { I18nService } from 'core-app/core/i18n/i18n.service';import { EnterpriseTrialModalComponent } from 'core-app/features/enterprise/enterprise-modal/enterprise-trial.modal';import { OpModalService } from 'core-app/shared/components/modal/modal.service';@@ -43,14 +37,13 @@ import { HttpClient } from '@angular/common/http';import { GonService } from 'core-app/core/gon/gon.service';import { IEnterpriseData } from 'core-app/features/enterprise/enterprise-trial.model';-export const freeTrialButtonSelector = 'free-trial-button';export interface EETrialKey {created:string;value:string;}@Component({- selector: freeTrialButtonSelector,+ selector: 'opce-free-trial-button',templateUrl: './free-trial-button.component.html',changeDetection: ChangeDetectionStrategy.OnPush,})diff --git a/frontend/src/app/features/homescreen/blocks/new-features.component.ts b/frontend/src/app/features/homescreen/blocks/new-features.component.tsindex 38f9dbe0fba..2079a0ed843 100644--- a/frontend/src/app/features/homescreen/blocks/new-features.component.ts+++ b/frontend/src/app/features/homescreen/blocks/new-features.component.ts@@ -32,8 +32,6 @@ import { BcfRestApi } from 'core-app/features/bim/bcf/bcf-constants.const';import { I18nService } from 'core-app/core/i18n/i18n.service';import { imagePath } from 'core-app/shared/helpers/images/path-helper';-export const homescreenNewFeaturesBlockSelector = 'homescreen-new-features-block';-// The key used in the I18n files to distinguish between versions.const OpVersionI18n = '14_4';@@ -59,7 +57,7 @@ const featureTeaserImage = `${OpVersionI18n}_features.png`;<a [href]="teaserWebsiteUrl" target="_blank">{{ text.learnAbout }}</a></div>`,- selector: homescreenNewFeaturesBlockSelector,+ selector: 'opce-homescreen-new-features-block',styleUrls: ['./new-features.component.sass'],changeDetection: ChangeDetectionStrategy.OnPush,})diff --git a/frontend/src/app/features/in-app-notifications/bell/in-app-notification-bell.component.ts b/frontend/src/app/features/in-app-notifications/bell/in-app-notification-bell.component.tsindex 3266e8cbe9f..417a2534b2b 100644--- a/frontend/src/app/features/in-app-notifications/bell/in-app-notification-bell.component.ts+++ b/frontend/src/app/features/in-app-notifications/bell/in-app-notification-bell.component.ts@@ -7,10 +7,9 @@ import { ApiV3Service } from 'core-app/core/apiv3/api-v3.service';import { IanBellService } from 'core-app/features/in-app-notifications/bell/state/ian-bell.service';import { populateInputsFromDataset } from 'core-app/shared/components/dataset-inputs';-export const opInAppNotificationBellSelector = 'op-in-app-notification-bell';@Component({- selector: opInAppNotificationBellSelector,+ selector: 'opce-in-app-notification-bell',templateUrl: './in-app-notification-bell.component.html',styleUrls: ['./in-app-notification-bell.component.sass'],changeDetection: ChangeDetectionStrategy.OnPush,diff --git a/frontend/src/app/features/plugins/plugin-context.ts b/frontend/src/app/features/plugins/plugin-context.tsindex 181976dfa9b..1a2afbebff1 100644--- a/frontend/src/app/features/plugins/plugin-context.ts+++ b/frontend/src/app/features/plugins/plugin-context.ts@@ -1,17 +1,20 @@-import { ApplicationRef, Injector, NgZone } from '@angular/core';+import { Injector, NgZone } from '@angular/core';import { ToastService } from 'core-app/shared/components/toaster/toast.service';import { I18nService } from 'core-app/core/i18n/i18n.service';-import { ExternalQueryConfigurationService } from 'core-app/features/work-packages/components/wp-table/external-configuration/external-query-configuration.service';+import {+ ExternalQueryConfigurationService+} from 'core-app/features/work-packages/components/wp-table/external-configuration/external-query-configuration.service';import { OpModalService } from 'core-app/shared/components/modal/modal.service';import { DisplayField } from 'core-app/shared/components/fields/display/display-field.module';import { HalResource } from 'core-app/features/hal/resources/hal-resource';import idFromLink from 'core-app/features/hal/helpers/id-from-link';import { DisplayFieldService } from 'core-app/shared/components/fields/display/display-field.service';import { EditFieldService } from 'core-app/shared/components/fields/edit/edit-field.service';-import { DynamicBootstrapper } from 'core-app/core/setup/globals/dynamic-bootstrapper';import { States } from 'core-app/core/states/states.service';import { CKEditorPreviewService } from 'core-app/shared/components/editor/components/ckeditor/ckeditor-preview.service';-import { ExternalRelationQueryConfigurationService } from 'core-app/features/work-packages/components/wp-table/external-configuration/external-relation-query-configuration.service';+import {+ ExternalRelationQueryConfigurationService+} from 'core-app/features/work-packages/components/wp-table/external-configuration/external-relation-query-configuration.service';import { InjectField } from 'core-app/shared/helpers/angular/inject-field.decorator';import { ApiV3Service } from 'core-app/core/apiv3/api-v3.service';import { ConfigurationService } from 'core-app/core/config/configuration.service';@@ -22,7 +25,9 @@ import { HookService } from 'core-app/features/plugins/hook-service';import { PathHelperService } from '../../core/path-helper/path-helper.service';import { HTMLSanitizeService } from '../../core/html-sanitize/html-sanitize.service';import { DynamicContentModalComponent } from '../../shared/components/modals/modal-wrapper/dynamic-content.modal';-import { PasswordConfirmationModalComponent } from '../../shared/components/modals/request-for-confirmation/password-confirmation.modal';+import {+ PasswordConfirmationModalComponent+} from '../../shared/components/modals/request-for-confirmation/password-confirmation.modal';import { DomAutoscrollService } from 'core-app/shared/helpers/drag-and-drop/dom-autoscroll.service';import { AttachmentsResourceService } from 'core-app/core/state/attachments/attachments.service';import { HttpClient } from '@angular/common/http';@@ -101,15 +106,4 @@ export class OpenProjectPluginContext {public runInZone(cb:() => void) {this.zone.run(cb);}-- /**- * Bootstrap a dynamically embeddable component- * @param element- */- public bootstrap(element:HTMLElement) {- DynamicBootstrapper.bootstrapOptionalEmbeddable(- this.injector.get(ApplicationRef),- element,- );- }}diff --git a/frontend/src/app/features/work-packages/components/wp-activity/user/user-activity.component.ts b/frontend/src/app/features/work-packages/components/wp-activity/user/user-activity.component.tsindex 15e60a19aa7..a40f604d9e1 100644--- a/frontend/src/app/features/work-packages/components/wp-activity/user/user-activity.component.ts+++ b/frontend/src/app/features/work-packages/components/wp-activity/user/user-activity.component.ts@@ -35,14 +35,19 @@ import {Component,ElementRef,Injector,- Input, NgZone,+ Input,+ NgZone,OnInit,} from '@angular/core';import { I18nService } from 'core-app/core/i18n/i18n.service';import { DomSanitizer, SafeHtml } from '@angular/platform-browser';import { ApiV3Service } from 'core-app/core/apiv3/api-v3.service';-import { WorkPackageCommentFieldHandler } from 'core-app/features/work-packages/components/work-package-comment/work-package-comment-field-handler';-import { WorkPackagesActivityService } from 'core-app/features/work-packages/components/wp-single-view-tabs/activity-panel/wp-activity.service';+import {+ WorkPackageCommentFieldHandler+} from 'core-app/features/work-packages/components/work-package-comment/work-package-comment-field-handler';+import {+ WorkPackagesActivityService+} from 'core-app/features/work-packages/components/wp-single-view-tabs/activity-panel/wp-activity.service';import { CommentService } from 'core-app/features/work-packages/components/wp-activity/comment-service';import { WorkPackageResource } from 'core-app/features/hal/resources/work-package-resource';import { UserResource } from 'core-app/features/hal/resources/user-resource';@@ -255,6 +260,6 @@ export class UserActivityComponent extends WorkPackageCommentFieldHandler implem}private updateCommentText() {- this.postedComment = this.activity.comment.html;+ this.postedComment = this.sanitization.bypassSecurityTrustHtml(this.activity.comment.html);}}diff --git a/frontend/src/app/features/work-packages/components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component.ts b/frontend/src/app/features/work-packages/components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component.tsindex 4f0c96f5cfd..acfc0949a07 100644--- a/frontend/src/app/features/work-packages/components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component.ts+++ b/frontend/src/app/features/work-packages/components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component.ts@@ -34,12 +34,11 @@ import { Screenfull } from 'screenfull';import { AbstractWorkPackageButtonComponent } from '../wp-buttons.module';const screenfull:Screenfull = sfimport as any;-export const zenModeComponentSelector = 'zen-mode-toggle-button';@Component({templateUrl: '../wp-button.template.html',changeDetection: ChangeDetectionStrategy.OnPush,- selector: zenModeComponentSelector,+ selector: 'opce-zen-mode-toggle-button',})export class ZenModeButtonComponent extends AbstractWorkPackageButtonComponent {public buttonId = 'work-packages-zen-mode-toggle-button';diff --git a/frontend/src/app/features/work-packages/components/wp-custom-actions/date-action/custom-date-action-admin.component.ts b/frontend/src/app/features/work-packages/components/wp-custom-actions/date-action/custom-date-action-admin.component.tsindex 13c1537de50..407ba4de615 100644--- a/frontend/src/app/features/work-packages/components/wp-custom-actions/date-action/custom-date-action-admin.component.ts+++ b/frontend/src/app/features/work-packages/components/wp-custom-actions/date-action/custom-date-action-admin.component.ts@@ -26,15 +26,12 @@// See COPYRIGHT and LICENSE files for more details.//++-import {- ApplicationRef, ChangeDetectorRef, Component, ElementRef, OnInit,-} from '@angular/core';+import { ApplicationRef, ChangeDetectorRef, Component, ElementRef, OnInit, } from '@angular/core';import { I18nService } from 'core-app/core/i18n/i18n.service';-export const customDateActionAdminSelector = 'custom-date-action-admin';@Component({- selector: customDateActionAdminSelector,+ selector: 'opce-custom-date-action-admin',templateUrl: './custom-date-action-admin.html',})export class CustomDateActionAdminComponent implements OnInit {diff --git a/frontend/src/app/features/work-packages/components/wp-new/wp-new-full-view.html b/frontend/src/app/features/work-packages/components/wp-new/wp-new-full-view.htmlindex 62ab62ccb4a..235c38a6dcb 100644--- a/frontend/src/app/features/work-packages/components/wp-new/wp-new-full-view.html+++ b/frontend/src/app/features/work-packages/components/wp-new/wp-new-full-view.html@@ -11,7 +11,7 @@</div><ul class="toolbar-items hide-when-print"><li class="toolbar-item hidden-for-tablet">- <zen-mode-toggle-button></zen-mode-toggle-button>+ <opce-zen-mode-toggle-button></opce-zen-mode-toggle-button></li><li class="toolbar-item hidden-for-tablet"><button id="create-wp-menu-button"diff --git a/frontend/src/app/features/work-packages/routing/wp-full-view/wp-full-view.html b/frontend/src/app/features/work-packages/routing/wp-full-view/wp-full-view.htmlindex da5a80a1405..68482fef358 100644--- a/frontend/src/app/features/work-packages/routing/wp-full-view/wp-full-view.html+++ b/frontend/src/app/features/work-packages/routing/wp-full-view/wp-full-view.html@@ -49,8 +49,8 @@></op-work-package-mark-notification-button></li><li class="toolbar-item hidden-for-tablet">- <zen-mode-toggle-button>- </zen-mode-toggle-button>+ <opce-zen-mode-toggle-button>+ </opce-zen-mode-toggle-button></li><li class="toolbar-item action_menu_main" id="action-show-more-dropdown-menu"><button class="button dropdown-relative toolbar-icon"diff --git a/frontend/src/app/shared/components/attribute-help-texts/static-attribute-help-text.component.ts b/frontend/src/app/shared/components/attribute-help-texts/static-attribute-help-text.component.tsindex 34f5b10953d..42489cfd887 100644--- a/frontend/src/app/shared/components/attribute-help-texts/static-attribute-help-text.component.ts+++ b/frontend/src/app/shared/components/attribute-help-texts/static-attribute-help-text.component.ts@@ -40,10 +40,9 @@ import { populateInputsFromDataset } from 'core-app/shared/components/dataset-inimport { OpModalService } from 'core-app/shared/components/modal/modal.service';import { StaticAttributeHelpTextModalComponent } from './static-attribute-help-text.modal';-export const staticAttributeHelpTextSelector = 'op-static-attribute-help-text';@Component({- selector: staticAttributeHelpTextSelector,+ selector: 'opce-static-attribute-help-text',changeDetection: ChangeDetectionStrategy.OnPush,templateUrl: './static-attribute-help-text.component.html',})diff --git a/frontend/src/app/shared/components/collapsible-section/collapsible-section.component.ts b/frontend/src/app/shared/components/collapsible-section/collapsible-section.component.tsindex a014750e8d5..9c1b6ce0e24 100644--- a/frontend/src/app/shared/components/collapsible-section/collapsible-section.component.ts+++ b/frontend/src/app/shared/components/collapsible-section/collapsible-section.component.ts@@ -26,14 +26,11 @@// See COPYRIGHT and LICENSE files for more details.//++-import {- Component, ElementRef, OnInit, ViewChild,-} from '@angular/core';+import { Component, ElementRef, OnInit, ViewChild, } from '@angular/core';-export const collapsibleSectionAugmentSelector = 'collapsible-section-augment';@Component({- selector: collapsibleSectionAugmentSelector,+ selector: 'opce-opce-collapsible-section-augment',templateUrl: './collapsible-section.html',})export class CollapsibleSectionComponent implements OnInit {diff --git a/frontend/src/app/shared/components/colors/colors-autocompleter.component.ts b/frontend/src/app/shared/components/colors/colors-autocompleter.component.tsindex 0fde38d79dc..e4c034f70e4 100644--- a/frontend/src/app/shared/components/colors/colors-autocompleter.component.ts+++ b/frontend/src/app/shared/components/colors/colors-autocompleter.component.ts@@ -27,10 +27,11 @@//++import { Component, ElementRef, OnInit } from '@angular/core';-import { Highlighting } from 'core-app/features/work-packages/components/wp-fast-table/builders/highlighting/highlighting.functions';+import {+ Highlighting+} from 'core-app/features/work-packages/components/wp-fast-table/builders/highlighting/highlighting.functions';import { I18nService } from 'core-app/core/i18n/i18n.service';-export const colorsAutocompleterSelector = 'colors-autocompleter';@Component({template: `@@ -50,7 +51,7 @@ export const colorsAutocompleterSelector = 'colors-autocompleter';</ng-template></ng-select>`,- selector: colorsAutocompleterSelector,+ selector: 'opce-colors-autocompleter',})export class ColorsAutocompleterComponent implements OnInit {public options:any[];diff --git a/frontend/src/app/shared/components/copy-to-clipboard/copy-to-clipboard.component.ts b/frontend/src/app/shared/components/copy-to-clipboard/copy-to-clipboard.component.tsindex a54b068f482..d7322f779db 100644--- a/frontend/src/app/shared/components/copy-to-clipboard/copy-to-clipboard.component.ts+++ b/frontend/src/app/shared/components/copy-to-clipboard/copy-to-clipboard.component.ts@@ -26,22 +26,16 @@// See COPYRIGHT and LICENSE files for more details.//++-import {- Component,- ChangeDetectionStrategy,- ElementRef,- OnInit,-} from '@angular/core';+import { ChangeDetectionStrategy, Component, ElementRef, OnInit, } from '@angular/core';import { ToastService } from 'core-app/shared/components/toaster/toast.service';import { I18nService } from 'core-app/core/i18n/i18n.service';import { CopyToClipboardService } from './copy-to-clipboard.service';-export const copyToClipboardSelector = 'copy-to-clipboard';@Component({template: '',- selector: copyToClipboardSelector,+ selector: 'opce-copy-to-clipboard',changeDetection: ChangeDetectionStrategy.OnPush,})diff --git a/frontend/src/app/shared/components/datepicker/basic-single-date-picker/basic-single-date-picker.component.ts b/frontend/src/app/shared/components/datepicker/basic-single-date-picker/basic-single-date-picker.component.tsindex 3c720d6435a..130ab9e59b1 100644--- a/frontend/src/app/shared/components/datepicker/basic-single-date-picker/basic-single-date-picker.component.ts+++ b/frontend/src/app/shared/components/datepicker/basic-single-date-picker/basic-single-date-picker.component.ts@@ -43,14 +43,8 @@ import {ViewEncapsulation,} from '@angular/core';import { I18nService } from 'core-app/core/i18n/i18n.service';-import {- ControlValueAccessor,- NG_VALUE_ACCESSOR,-} from '@angular/forms';-import {- onDayCreate,- validDate,-} from 'core-app/shared/components/datepicker/helpers/date-modal.helpers';+import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';+import { onDayCreate, validDate } from 'core-app/shared/components/datepicker/helpers/date-modal.helpers';import { TimezoneService } from 'core-app/core/datetime/timezone.service';import { DatePicker } from '../datepicker';import flatpickr from 'flatpickr';@@ -58,10 +52,9 @@ import { DayElement } from 'flatpickr/dist/types/instance';import { populateInputsFromDataset } from '../../dataset-inputs';import { DeviceService } from 'core-app/core/browser/device.service';-export const opBasicSingleDatePickerSelector = 'op-basic-single-date-picker';@Component({- selector: opBasicSingleDatePickerSelector,+ selector: 'op-basic-single-date-picker',templateUrl: './basic-single-date-picker.component.html',styleUrls: ['../styles/datepicker.modal.sass'],changeDetection: ChangeDetectionStrategy.OnPush,diff --git a/frontend/src/app/shared/components/datepicker/modal-single-date-picker/modal-single-date-picker.component.html b/frontend/src/app/shared/components/datepicker/modal-single-date-picker/modal-single-date-picker.component.htmlindex 8ed5a87a897..5b35f2ec620 100644--- a/frontend/src/app/shared/components/datepicker/modal-single-date-picker/modal-single-date-picker.component.html+++ b/frontend/src/app/shared/components/datepicker/modal-single-date-picker/modal-single-date-picker.component.html@@ -1,7 +1,7 @@<spot-drop-modal[opened]="opened"(closed)="opened = false"- data-test-selector="op-modal-single-date-picker"+ data-test-selector="opce-modal-single-date-picker"><ng-contentslot="trigger"diff --git a/frontend/src/app/shared/components/datepicker/modal-single-date-picker/modal-single-date-picker.component.ts b/frontend/src/app/shared/components/datepicker/modal-single-date-picker/modal-single-date-picker.component.tsindex 71665ad833c..b0d6152b766 100644--- a/frontend/src/app/shared/components/datepicker/modal-single-date-picker/modal-single-date-picker.component.ts+++ b/frontend/src/app/shared/components/datepicker/modal-single-date-picker/modal-single-date-picker.component.ts@@ -42,27 +42,20 @@ import {ViewEncapsulation,} from '@angular/core';import { I18nService } from 'core-app/core/i18n/i18n.service';-import {- ControlValueAccessor,- NG_VALUE_ACCESSOR,-} from '@angular/forms';-import {- onDayCreate,- parseDate,- setDates,-} from 'core-app/shared/components/datepicker/helpers/date-modal.helpers';+import { ControlValueAccessor, NG_VALUE_ACCESSOR, } from '@angular/forms';+import { onDayCreate, parseDate, setDates, } from 'core-app/shared/components/datepicker/helpers/date-modal.helpers';import { TimezoneService } from 'core-app/core/datetime/timezone.service';import { DatePicker } from '../datepicker';import flatpickr from 'flatpickr';import { DayElement } from 'flatpickr/dist/types/instance';import { populateInputsFromDataset } from '../../dataset-inputs';import { debounce } from 'lodash';-import { SpotDropModalTeleportationService } from 'core-app/spot/components/drop-modal/drop-modal-teleportation.service';--export const opModalSingleDatePickerSelector = 'op-modal-single-date-picker';+import {+ SpotDropModalTeleportationService+} from 'core-app/spot/components/drop-modal/drop-modal-teleportation.service';@Component({- selector: opModalSingleDatePickerSelector,+ selector: 'opce-modal-single-date-picker',templateUrl: './modal-single-date-picker.component.html',styleUrls: ['../styles/datepicker.modal.sass', './modal-single-date-picker.component.sass'],changeDetection: ChangeDetectionStrategy.OnPush,diff --git a/frontend/src/app/shared/components/dynamic-bootstrap/component/dynamic-bootstrap/dynamic-bootstrap.component.html b/frontend/src/app/shared/components/dynamic-bootstrap/component/dynamic-bootstrap/dynamic-bootstrap.component.htmldeleted file mode 100644index 9351db2af0b..00000000000--- a/frontend/src/app/shared/components/dynamic-bootstrap/component/dynamic-bootstrap/dynamic-bootstrap.component.html+++ /dev/null@@ -1,4 +0,0 @@-<div- [innerHtml]="innerHtml"- class="op-uc-container"-></div>\ No newline at end of filediff --git a/frontend/src/app/shared/components/dynamic-bootstrap/component/dynamic-bootstrap/dynamic-bootstrap.component.spec.ts b/frontend/src/app/shared/components/dynamic-bootstrap/component/dynamic-bootstrap/dynamic-bootstrap.component.spec.tsdeleted file mode 100644index 63ca11d1fd2..00000000000--- a/frontend/src/app/shared/components/dynamic-bootstrap/component/dynamic-bootstrap/dynamic-bootstrap.component.spec.ts+++ /dev/null@@ -1,57 +0,0 @@-import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';-import { ApplicationRef, Component, DebugElement } from '@angular/core';-import { DynamicBootstrapper } from 'core-app/core/setup/globals/dynamic-bootstrapper';-import { DynamicBootstrapComponent } from './dynamic-bootstrap.component';--// Stub component to bootstrap dynamically-@Component({- selector: 'op-test',- template: '<div class="dynamic-component-div"></div>',-})-export class TestComponent {}--// Stub DynamicBootstrapper so we can pass the stub component definition-class TestDynamicBootstrapper extends DynamicBootstrapper {- static bootstrapOptionalEmbeddable(appRef:ApplicationRef, element:HTMLElement) {- DynamicBootstrapper.bootstrapOptionalEmbeddable(appRef, element, [{ selector: 'op-test', cls: TestComponent, embeddable: true }]);- }-}--describe('DynamicBootstrapComponent', () => {- let component:DynamicBootstrapComponent;- let fixture:ComponentFixture<DynamicBootstrapComponent>;- let element:DebugElement;-- beforeEach(async () => {- await TestBed.configureTestingModule({- declarations: [- DynamicBootstrapComponent,- TestComponent,- ],- })- .compileComponents();- });-- beforeEach(() => {- fixture = TestBed.createComponent(DynamicBootstrapComponent);- component = fixture.componentInstance;- element = fixture.debugElement;-- fixture.detectChanges();- });-- it('should create', () => {- expect(component).toBeTruthy();- });-- it('should render HTML strings and bootstrap Angular directives', fakeAsync(() => {- // Overwrite with the stub dynamicBootstrapper- component.dynamicBootstrapper = TestDynamicBootstrapper;- component.HTML = '<op-test></op-test>';-- fixture.detectChanges();- tick();-- expect(element.nativeElement.querySelector('.dynamic-component-div')).toBeTruthy();- }));-});diff --git a/frontend/src/app/shared/components/dynamic-bootstrap/component/dynamic-bootstrap/dynamic-bootstrap.component.ts b/frontend/src/app/shared/components/dynamic-bootstrap/component/dynamic-bootstrap/dynamic-bootstrap.component.tsdeleted file mode 100644index 93df98f0fc0..00000000000--- a/frontend/src/app/shared/components/dynamic-bootstrap/component/dynamic-bootstrap/dynamic-bootstrap.component.ts+++ /dev/null@@ -1,41 +0,0 @@-/**- * Allows to dynamically render an HTML string into any HTML node, dynamically- * bootstrapping all its Angular components and directives.- *- * ```- * <op-dynamic-bootstrap HTML="<macro data-id="1" data-detailed="false" title="Macro nº1"></macro>">- * </op-dynamic-bootstrap>- * ```- * @module- * @public- */-import {- ApplicationRef, Component, ElementRef, Input,-} from '@angular/core';-import { DomSanitizer, SafeHtml } from '@angular/platform-browser';-import { DynamicBootstrapper } from 'core-app/core/setup/globals/dynamic-bootstrapper';--@Component({- selector: 'op-dynamic-bootstrap',- templateUrl: './dynamic-bootstrap.component.html',-})-export class DynamicBootstrapComponent {- /*- * HTML string to be rendered.- */- @Input()- set HTML(templateString:string) {- this.innerHtml = this.domSanitizer.bypassSecurityTrustHtml(templateString);- this.dynamicBootstrapper.bootstrapOptionalEmbeddable(this.appRef, this.elementRef.nativeElement);- }-- innerHtml:SafeHtml;-- dynamicBootstrapper = DynamicBootstrapper;-- constructor(- readonly domSanitizer:DomSanitizer,- readonly elementRef:ElementRef,- readonly appRef:ApplicationRef,- ) { }-}diff --git a/frontend/src/app/shared/components/dynamic-bootstrap/dynamic-bootstrap.module.ts b/frontend/src/app/shared/components/dynamic-bootstrap/dynamic-bootstrap.module.tsdeleted file mode 100644index 97d4745fbcd..00000000000--- a/frontend/src/app/shared/components/dynamic-bootstrap/dynamic-bootstrap.module.ts+++ /dev/null@@ -1,8 +0,0 @@-import { NgModule } from '@angular/core';-import { DynamicBootstrapComponent } from './component/dynamic-bootstrap/dynamic-bootstrap.component';--@NgModule({- declarations: [DynamicBootstrapComponent],- exports: [DynamicBootstrapComponent],-})-export class DynamicBootstrapModule { }diff --git a/frontend/src/app/shared/components/editor/components/ckeditor-augmented-textarea/ckeditor-augmented-textarea.component.ts b/frontend/src/app/shared/components/editor/components/ckeditor-augmented-textarea/ckeditor-augmented-textarea.component.tsindex 7352921fa6e..e6d82bc52d3 100644--- a/frontend/src/app/shared/components/editor/components/ckeditor-augmented-textarea/ckeditor-augmented-textarea.component.ts+++ b/frontend/src/app/shared/components/editor/components/ckeditor-augmented-textarea/ckeditor-augmented-textarea.component.ts@@ -50,10 +50,8 @@ import { AttachmentCollectionResource } from 'core-app/features/hal/resources/atimport { populateInputsFromDataset } from 'core-app/shared/components/dataset-inputs';import { navigator } from '@hotwired/turbo';-export const ckeditorAugmentedTextareaSelector = 'ckeditor-augmented-textarea';@Component({- selector: ckeditorAugmentedTextareaSelector,templateUrl: './ckeditor-augmented-textarea.html',changeDetection: ChangeDetectionStrategy.OnPush,})diff --git a/frontend/src/app/shared/components/editor/components/ckeditor/ckeditor-preview.service.ts b/frontend/src/app/shared/components/editor/components/ckeditor/ckeditor-preview.service.tsindex cc40a33db0f..8d2ec30c9a5 100644--- a/frontend/src/app/shared/components/editor/components/ckeditor/ckeditor-preview.service.ts+++ b/frontend/src/app/shared/components/editor/components/ckeditor/ckeditor-preview.service.ts@@ -26,16 +26,15 @@// See COPYRIGHT and LICENSE files for more details.//++-import {- ApplicationRef, ComponentFactoryResolver, ComponentRef, Injectable, Injector,-} from '@angular/core';-import { DynamicBootstrapper } from 'core-app/core/setup/globals/dynamic-bootstrapper';+import { ApplicationRef, ComponentFactoryResolver, ComponentRef, Injectable, Injector, } from '@angular/core';@Injectable()export class CKEditorPreviewService {- constructor(private readonly componentFactoryResolver:ComponentFactoryResolver,+ constructor(+ private readonly componentFactoryResolver:ComponentFactoryResolver,private readonly appRef:ApplicationRef,- private readonly injector:Injector) {+ private readonly injector:Injector,+ ) {}/**@@ -50,21 +49,6 @@ export class CKEditorPreviewService {hostElement.innerHTML = preview;const refs:ComponentRef<any>[] = [];- DynamicBootstrapper- .getEmbeddable()- .forEach((entry) => {- const matchedElements = hostElement.querySelectorAll(entry.selector);-- for (let i = 0, l = matchedElements.length; i < l; i++) {- const factory = this.componentFactoryResolver.resolveComponentFactory(entry.cls);- const componentRef = factory.create(this.injector, [], matchedElements[i]);-- refs.push(componentRef);- this.appRef.attachView(componentRef.hostView);- componentRef.changeDetectorRef.detectChanges();- }- });-return () => {refs.forEach((ref) => {this.appRef.detachView(ref.hostView);diff --git a/frontend/src/app/shared/components/enterprise-banner/enterprise-banner.component.ts b/frontend/src/app/shared/components/enterprise-banner/enterprise-banner.component.tsindex 86918626bb4..82052c1fb1d 100644--- a/frontend/src/app/shared/components/enterprise-banner/enterprise-banner.component.ts+++ b/frontend/src/app/shared/components/enterprise-banner/enterprise-banner.component.ts@@ -1,11 +1,4 @@-import {- ChangeDetectionStrategy,- Component,- ElementRef,- Injector,- Input,- OnInit,-} from '@angular/core';+import { ChangeDetectionStrategy, Component, ElementRef, Injector, Input, OnInit, } from '@angular/core';import { BannersService } from 'core-app/core/enterprise/banners.service';import { I18nService } from 'core-app/core/i18n/i18n.service';import { imagePath } from 'core-app/shared/helpers/images/path-helper';@@ -14,10 +7,9 @@ import { PathHelperService } from 'core-app/core/path-helper/path-helper.serviceimport { populateInputsFromDataset } from 'core-app/shared/components/dataset-inputs';import { pricingUrl } from 'core-app/core/setup/globals/constants.const';-export const enterpriseBannerSelector = 'op-enterprise-banner';@Component({- selector: enterpriseBannerSelector,+ selector: 'op-enterprise-banner',changeDetection: ChangeDetectionStrategy.OnPush,styleUrls: ['./enterprise-banner.component.sass'],templateUrl: './enterprise-banner.component.html',diff --git a/frontend/src/app/shared/components/enterprise-page/enterprise-page.component.html b/frontend/src/app/shared/components/enterprise-page/enterprise-page.component.htmlindex a048cfbd9c2..37870323435 100644--- a/frontend/src/app/shared/components/enterprise-page/enterprise-page.component.html+++ b/frontend/src/app/shared/components/enterprise-page/enterprise-page.component.html@@ -47,5 +47,5 @@<span class="spot-icon spot-icon_enterprise-addons"></span>{{ text.upgrade }}</a>- <free-trial-button></free-trial-button>+ <opce-free-trial-button></opce-free-trial-button></div>diff --git a/frontend/src/app/shared/components/enterprise-page/enterprise-page.component.ts b/frontend/src/app/shared/components/enterprise-page/enterprise-page.component.tsindex 74c2f480807..0c12e1444f9 100644--- a/frontend/src/app/shared/components/enterprise-page/enterprise-page.component.ts+++ b/frontend/src/app/shared/components/enterprise-page/enterprise-page.component.ts@@ -1,18 +1,12 @@-import {- ChangeDetectionStrategy,- Component,- ElementRef,- Input,-} from '@angular/core';+import { ChangeDetectionStrategy, Component, ElementRef, Input, } from '@angular/core';import { I18nService } from 'core-app/core/i18n/i18n.service';import { imagePath } from 'core-app/shared/helpers/images/path-helper';import { PathHelperService } from 'core-app/core/path-helper/path-helper.service';-import { pricingUrl, contactUrl } from 'core-app/core/setup/globals/constants.const';+import { contactUrl, pricingUrl } from 'core-app/core/setup/globals/constants.const';-export const enterprisePageSelector = 'op-enterprise-page';@Component({- selector: enterprisePageSelector,+ selector: 'op-enterprise-page',changeDetection: ChangeDetectionStrategy.OnPush,templateUrl: './enterprise-page.component.html',})diff --git a/frontend/src/app/shared/components/fields/display/field-types/formattable-display-field.module.ts b/frontend/src/app/shared/components/fields/display/field-types/formattable-display-field.module.tsindex 993104f4404..36d5fbf5edc 100644--- a/frontend/src/app/shared/components/fields/display/field-types/formattable-display-field.module.ts+++ b/frontend/src/app/shared/components/fields/display/field-types/formattable-display-field.module.ts@@ -28,7 +28,6 @@import { DisplayField } from 'core-app/shared/components/fields/display/display-field.module';import { ApplicationRef } from '@angular/core';-import { DynamicBootstrapper } from 'core-app/core/setup/globals/dynamic-bootstrapper';import { InjectField } from 'core-app/shared/helpers/angular/inject-field.decorator';import { ExpressionService } from 'core-app/core/expression/expression.service';@@ -53,9 +52,6 @@ export class FormattableDisplayField extends DisplayField {element.innerHTML = '';element.appendChild(div);-- // Allow embeddable rendered content- DynamicBootstrapper.bootstrapOptionalEmbeddable(this.appRef, div);}get placeholder():string {diff --git a/frontend/src/app/shared/components/grids/grid/page/grid-page.component.html b/frontend/src/app/shared/components/grids/grid/page/grid-page.component.htmlindex 7ae64efdbf7..01a5002f85d 100644--- a/frontend/src/app/shared/components/grids/grid/page/grid-page.component.html+++ b/frontend/src/app/shared/components/grids/grid/page/grid-page.component.html@@ -7,7 +7,7 @@<ul class="op-grid-page--toolbar-items toolbar-items hidden-for-mobile"><li class="toolbar-item hidden-for-tablet">- <zen-mode-toggle-button></zen-mode-toggle-button>+ <opce-zen-mode-toggle-button></opce-zen-mode-toggle-button></li></ul></div>diff --git a/frontend/src/app/shared/components/grids/widgets/custom-text/custom-text.component.ts b/frontend/src/app/shared/components/grids/widgets/custom-text/custom-text.component.tsindex bb43ba20a5f..9b2605731bf 100644--- a/frontend/src/app/shared/components/grids/widgets/custom-text/custom-text.component.ts+++ b/frontend/src/app/shared/components/grids/widgets/custom-text/custom-text.component.ts@@ -12,13 +12,14 @@ import {SimpleChanges,ViewChild,} from '@angular/core';-import { CustomTextEditFieldService } from 'core-app/shared/components/grids/widgets/custom-text/custom-text-edit-field.service';+import {+ CustomTextEditFieldService+} from 'core-app/shared/components/grids/widgets/custom-text/custom-text-edit-field.service';import { I18nService } from 'core-app/core/i18n/i18n.service';import { HalResource } from 'core-app/features/hal/resources/hal-resource';import { filter } from 'rxjs/operators';import { GridAreaService } from 'core-app/shared/components/grids/grid/area.service';import { DomSanitizer, SafeHtml } from '@angular/platform-browser';-import { DynamicBootstrapper } from 'core-app/core/setup/globals/dynamic-bootstrapper';@Component({templateUrl: './custom-text.component.html',@@ -137,11 +138,6 @@ export class WidgetCustomTextComponent extends AbstractWidgetComponent implementprivate memorizeCustomText() {this.customText = this.sanitization.bypassSecurityTrustHtml(this.handler.htmlText);-- // Allow embeddable rendered content- setTimeout(() => {- DynamicBootstrapper.bootstrapOptionalEmbeddable(this.appRef, this.displayContainer.nativeElement);- }, 100);}private clickedElementIsLinkWithinDisplayContainer(event:any) {diff --git a/frontend/src/app/shared/components/grids/widgets/wp-overview/wp-overview.component.html b/frontend/src/app/shared/components/grids/widgets/wp-overview/wp-overview.component.htmlindex b112df72352..7da705aeca7 100644--- a/frontend/src/app/shared/components/grids/widgets/wp-overview/wp-overview.component.html+++ b/frontend/src/app/shared/components/grids/widgets/wp-overview/wp-overview.component.html@@ -8,7 +8,7 @@</widget-menu></widget-header>-<wp-overview-graph+<opce-wp-overview-graphclass='grid--widget-content -no-overflow'[groupBy]="'type'">-</wp-overview-graph>+</opce-wp-overview-graph>diff --git a/frontend/src/app/shared/components/header-project-select/header-project-select.component.ts b/frontend/src/app/shared/components/header-project-select/header-project-select.component.tsindex 8da1e71b942..a91c8b3f444 100644--- a/frontend/src/app/shared/components/header-project-select/header-project-select.component.ts+++ b/frontend/src/app/shared/components/header-project-select/header-project-select.component.ts@@ -46,10 +46,9 @@ import { ApiV3Filter } from 'core-app/shared/helpers/api-v3/api-v3-filter-buildeimport { IHALCollection } from 'core-app/core/apiv3/types/hal-collection.type';import { ConfigurationService } from 'core-app/core/config/configuration.service';-export const headerProjectSelectSelector = 'op-header-project-select';@Component({- selector: headerProjectSelectSelector,+ selector: 'opce-header-project-select',templateUrl: './header-project-select.component.html',styleUrls: ['./header-project-select.component.sass'],encapsulation: ViewEncapsulation.None,diff --git a/frontend/src/app/shared/components/hide-section/add-section-dropdown/add-section-dropdown.component.ts b/frontend/src/app/shared/components/hide-section/add-section-dropdown/add-section-dropdown.component.tsindex 926e4003797..66dca3c4006 100644--- a/frontend/src/app/shared/components/hide-section/add-section-dropdown/add-section-dropdown.component.ts+++ b/frontend/src/app/shared/components/hide-section/add-section-dropdown/add-section-dropdown.component.ts@@ -27,9 +27,7 @@//++import { I18nService } from 'core-app/core/i18n/i18n.service';-import {- Component, ElementRef, OnInit, ViewChild,-} from '@angular/core';+import { Component, ElementRef, OnInit, ViewChild, } from '@angular/core';import {HideSectionDefinition,HideSectionService,@@ -37,10 +35,9 @@ import {import { trackByProperty } from 'core-app/shared/helpers/angular/tracking-functions';import { UntilDestroyedMixin } from 'core-app/shared/helpers/angular/until-destroyed.mixin';-export const addSectionDropdownSelector = 'add-section-dropdown';@Component({- selector: addSectionDropdownSelector,+ selector: 'opce-add-section-dropdown',templateUrl: './add-section-dropdown.component.html',})export class AddSectionDropdownComponent extends UntilDestroyedMixin implements OnInit {diff --git a/frontend/src/app/shared/components/hide-section/hide-section-link/hide-section-link.component.ts b/frontend/src/app/shared/components/hide-section/hide-section-link/hide-section-link.component.tsindex eb12c7f7b9b..d9d00618bd6 100644--- a/frontend/src/app/shared/components/hide-section/hide-section-link/hide-section-link.component.ts+++ b/frontend/src/app/shared/components/hide-section/hide-section-link/hide-section-link.component.ts@@ -30,10 +30,9 @@ import { Component, ElementRef, OnInit } from '@angular/core';import { HideSectionService } from 'core-app/shared/components/hide-section/hide-section.service';import { I18nService } from 'core-app/core/i18n/i18n.service';-export const hideSectionLinkSelector = 'hide-section-link';@Component({- selector: hideSectionLinkSelector,+ selector: 'opce-hide-section-link',templateUrl: './hide-section-link.component.html',})export class HideSectionLinkComponent implements OnInit {diff --git a/frontend/src/app/shared/components/hide-section/show-section-dropdown.component.ts b/frontend/src/app/shared/components/hide-section/show-section-dropdown.component.tsdeleted file mode 100644index 99c965c6fb6..00000000000--- a/frontend/src/app/shared/components/hide-section/show-section-dropdown.component.ts+++ /dev/null@@ -1,63 +0,0 @@-//-- copyright-// OpenProject is an open source project management software.-// Copyright (C) the OpenProject GmbH-//-// This program is free software; you can redistribute it and/or-// modify it under the terms of the GNU General Public License version 3.-//-// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:-// Copyright (C) 2006-2013 Jean-Philippe Lang-// Copyright (C) 2010-2013 the ChiliProject Team-//-// This program is free software; you can redistribute it and/or-// modify it under the terms of the GNU General Public License-// as published by the Free Software Foundation; either version 2-// of the License, or (at your option) any later version.-//-// This program is distributed in the hope that it will be useful,-// but WITHOUT ANY WARRANTY; without even the implied warranty of-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-// GNU General Public License for more details.-//-// You should have received a copy of the GNU General Public License-// along with this program; if not, write to the Free Software-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.-//-// See COPYRIGHT and LICENSE files for more details.-//++--import { Component, ElementRef, OnInit } from '@angular/core';-import { HideSectionService } from './hide-section.service';--export const showSectionDropdownSelector = 'show-section-dropdown';--@Component({- selector: showSectionDropdownSelector,- template: '',-})-export class ShowSectionDropdownComponent implements OnInit {- public optValue:string; // value of option for which hide-section should be visible-- public hideSecWithName:string; // section-name of hide-section-- constructor(private HideSection:HideSectionService,- private elementRef:ElementRef) {- }-- ngOnInit() {- const element = jQuery(this.elementRef.nativeElement);- this.optValue = element.data('optValue');- this.hideSecWithName = element.data('hideSecWithName');-- const target = jQuery(this.elementRef.nativeElement).prev();- target.on('change', (event) => {- const selectedOption = jQuery('option:selected', event.target);-- if (selectedOption.val() !== this.optValue) {- this.HideSection.hide(this.hideSecWithName);- } else {- this.HideSection.show(this.hideSecWithName);- }- });- }-}diff --git a/frontend/src/app/shared/components/modal/modal-overlay.component.ts b/frontend/src/app/shared/components/modal/modal-overlay.component.tsindex d7e1c0c857c..50cd8fe72b8 100644--- a/frontend/src/app/shared/components/modal/modal-overlay.component.ts+++ b/frontend/src/app/shared/components/modal/modal-overlay.component.ts@@ -34,10 +34,7 @@ import {ElementRef,ViewChild,} from '@angular/core';-import {- CdkPortalOutlet,- ComponentPortal,-} from '@angular/cdk/portal';+import { CdkPortalOutlet, ComponentPortal, } from '@angular/cdk/portal';import { combineLatest } from 'rxjs';import { distinctUntilChanged, filter } from 'rxjs/operators';@@ -46,10 +43,9 @@ import { OpModalComponent } from 'core-app/shared/components/modal/modal.componeimport { ModalData, OpModalService } from 'core-app/shared/components/modal/modal.service';import { PortalOutletTarget } from 'core-app/shared/components/modal/portal-outlet-target.enum';-export const opModalOverlaySelector = 'op-modal-overlay';@Component({- selector: opModalOverlaySelector,+ selector: 'opce-modal-overlay',templateUrl: './modal-overlay.component.html',changeDetection: ChangeDetectionStrategy.OnPush,})diff --git a/frontend/src/app/shared/components/no-results/no-results.component.ts b/frontend/src/app/shared/components/no-results/no-results.component.tsindex e8b40635e3a..a503d8266de 100644--- a/frontend/src/app/shared/components/no-results/no-results.component.ts+++ b/frontend/src/app/shared/components/no-results/no-results.component.ts@@ -26,20 +26,13 @@// See COPYRIGHT and LICENSE files for more details.//++-import {- ChangeDetectionStrategy,- Component,- ElementRef,- HostBinding,- Input,-} from '@angular/core';+import { ChangeDetectionStrategy, Component, ElementRef, HostBinding, Input, } from '@angular/core';import { populateInputsFromDataset } from 'core-app/shared/components/dataset-inputs';-export const noResultsSelector = 'op-no-results';@Component({templateUrl: './no-results.component.html',- selector: noResultsSelector,+ selector: 'op-no-results',changeDetection: ChangeDetectionStrategy.OnPush,})diff --git a/frontend/src/app/shared/components/op-non-working-days-list/op-non-working-days-list.component.html b/frontend/src/app/shared/components/op-non-working-days-list/op-non-working-days-list.component.htmlindex acd7caeec96..c3c033361fc 100644--- a/frontend/src/app/shared/components/op-non-working-days-list/op-non-working-days-list.component.html+++ b/frontend/src/app/shared/components/op-non-working-days-list/op-non-working-days-list.component.html@@ -19,7 +19,7 @@<divclass="op-non-working-days-list--add-button">- <op-modal-single-date-picker+ <opce-modal-single-date-pickerid="test"name="test"[showIgnoreNonWorkingDays]="false"@@ -54,6 +54,5 @@<span class="spot-icon spot-icon_add"></span><span [textContent]="text.add_non_working_day"></span></button>- </op-modal-single-date-picker>+ </opce-modal-single-date-picker></div>-diff --git a/frontend/src/app/shared/components/op-non-working-days-list/op-non-working-days-list.component.ts b/frontend/src/app/shared/components/op-non-working-days-list/op-non-working-days-list.component.tsindex bcadd684b7f..96b85136348 100644--- a/frontend/src/app/shared/components/op-non-working-days-list/op-non-working-days-list.component.ts+++ b/frontend/src/app/shared/components/op-non-working-days-list/op-non-working-days-list.component.ts@@ -30,7 +30,6 @@ import { ToastService } from 'core-app/shared/components/toaster/toast.service';import * as moment from 'moment-timezone';import allLocales from '@fullcalendar/core/locales-all';-export const nonWorkingDaysListSelector = 'op-non-working-days-list';export interface INonWorkingDay {id:string|null;@@ -40,7 +39,7 @@ export interface INonWorkingDay {}@Component({- selector: nonWorkingDaysListSelector,+ selector: 'opce-non-working-days-list',changeDetection: ChangeDetectionStrategy.OnPush,encapsulation: ViewEncapsulation.None,styleUrls: ['./op-non-working-days-list.component.sass'],diff --git a/frontend/src/app/shared/components/persistent-toggle/persistent-toggle.component.ts b/frontend/src/app/shared/components/persistent-toggle/persistent-toggle.component.tsindex 73124c27a4e..2b461c6a964 100644--- a/frontend/src/app/shared/components/persistent-toggle/persistent-toggle.component.ts+++ b/frontend/src/app/shared/components/persistent-toggle/persistent-toggle.component.ts@@ -28,10 +28,9 @@import { Component, ElementRef, OnInit } from '@angular/core';-export const persistentToggleSelector = 'persistent-toggle';@Component({- selector: persistentToggleSelector,+ selector: 'opce-persistent-toggle',template: '',})export class PersistentToggleComponent implements OnInit {diff --git a/frontend/src/app/shared/components/resizer/resizer/main-menu-resizer.component.ts b/frontend/src/app/shared/components/resizer/resizer/main-menu-resizer.component.tsindex efc11cdc6d9..afd1c0e3c08 100644--- a/frontend/src/app/shared/components/resizer/resizer/main-menu-resizer.component.ts+++ b/frontend/src/app/shared/components/resizer/resizer/main-menu-resizer.component.ts@@ -26,23 +26,16 @@// See COPYRIGHT and LICENSE files for more details.//++-import {- ChangeDetectionStrategy,- ChangeDetectorRef,- Component,- ElementRef,- OnInit,-} from '@angular/core';+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, OnInit, } from '@angular/core';import { distinctUntilChanged } from 'rxjs/operators';import { ResizeDelta } from 'core-app/shared/components/resizer/resizer.component';import { UntilDestroyedMixin } from 'core-app/shared/helpers/angular/until-destroyed.mixin';import { MainMenuToggleService } from 'core-app/core/main-menu/main-menu-toggle.service';-export const mainMenuResizerSelector = 'main-menu-resizer';@Component({- selector: mainMenuResizerSelector,+ selector: 'opce-main-menu-resizer',changeDetection: ChangeDetectionStrategy.OnPush,template: `<op-resizer class="main-menu--resizer"diff --git a/frontend/src/app/shared/components/storages/storage-information/storage-information.html b/frontend/src/app/shared/components/storages/storage-information/storage-information.htmlindex b399aee676d..fe26c1dbca1 100644--- a/frontend/src/app/shared/components/storages/storage-information/storage-information.html+++ b/frontend/src/app/shared/components/storages/storage-information/storage-information.html@@ -19,8 +19,8 @@*ngIf="content.login"class="button-box">- <op-storage-login-button+ <opce-storage-login-buttonclass="op-files-tab--storage-info-box-button"[input]="content.login"- ></op-storage-login-button>+ ></opce-storage-login-button></div>diff --git a/frontend/src/app/shared/components/storages/storage-login-button/storage-login-button.component.ts b/frontend/src/app/shared/components/storages/storage-login-button/storage-login-button.component.tsindex 3c9b838fe4c..6a74bfe0349 100644--- a/frontend/src/app/shared/components/storages/storage-login-button/storage-login-button.component.ts+++ b/frontend/src/app/shared/components/storages/storage-login-button/storage-login-button.component.ts@@ -26,13 +26,7 @@// See COPYRIGHT and LICENSE files for more details.//++-import {- ChangeDetectionStrategy,- Component,- ElementRef,- Input,- OnInit,-} from '@angular/core';+import { ChangeDetectionStrategy, Component, ElementRef, Input, OnInit, } from '@angular/core';import { CookieService } from 'ngx-cookie-service';import { v4 as uuidv4 } from 'uuid';@@ -41,10 +35,9 @@ import { IStorageLoginInput } from 'core-app/shared/components/storages/storage-import { storageLocaleString } from 'core-app/shared/components/storages/functions/storages.functions';import { populateInputsFromDataset } from 'core-app/shared/components/dataset-inputs';-export const opStorageLoginButtonSelector = 'op-storage-login-button';@Component({- selector: opStorageLoginButtonSelector,+ selector: 'opce-storage-login-button',templateUrl: 'storage-login-button.component.html',changeDetection: ChangeDetectionStrategy.OnPush,})diff --git a/frontend/src/app/shared/components/tabs/content-tabs/content-tabs.component.ts b/frontend/src/app/shared/components/tabs/content-tabs/content-tabs.component.tsindex 7f0d845965e..ab5ce2b9389 100644--- a/frontend/src/app/shared/components/tabs/content-tabs/content-tabs.component.ts+++ b/frontend/src/app/shared/components/tabs/content-tabs/content-tabs.component.ts@@ -26,20 +26,13 @@// See COPYRIGHT and LICENSE files for more details.//++-import {- ChangeDetectionStrategy,- ChangeDetectorRef,- Component,- ElementRef,- Injector,-} from '@angular/core';+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Injector, } from '@angular/core';import { GonService } from 'core-app/core/gon/gon.service';import { StateService } from '@uirouter/core';import { I18nService } from 'core-app/core/i18n/i18n.service';import { ScrollableTabsComponent } from 'core-app/shared/components/tabs/scrollable-tabs/scrollable-tabs.component';import { TabDefinition } from 'core-app/shared/components/tabs/tab.interface';-export const contentTabsSelector = 'content-tabs';interface GonTab extends TabDefinition {partial:string;@@ -47,7 +40,7 @@ interface GonTab extends TabDefinition {}@Component({- selector: 'op-content-tabs',+ selector: 'opce-content-tabs',templateUrl: '../scrollable-tabs/scrollable-tabs.component.html',styleUrls: ['./content-tabs.component.sass'],changeDetection: ChangeDetectionStrategy.OnPush,diff --git a/frontend/src/app/shared/components/time_entries/edit/trigger-actions-entry.component.ts b/frontend/src/app/shared/components/time_entries/edit/trigger-actions-entry.component.tsindex b7a69bb25ba..79242faa326 100644--- a/frontend/src/app/shared/components/time_entries/edit/trigger-actions-entry.component.ts+++ b/frontend/src/app/shared/components/time_entries/edit/trigger-actions-entry.component.ts@@ -1,26 +1,18 @@-import {- ChangeDetectionStrategy,- ChangeDetectorRef,- Component,- ElementRef,- Injector,-} from '@angular/core';+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Injector, } from '@angular/core';import { InjectField } from 'core-app/shared/helpers/angular/inject-field.decorator';import { TimeEntryEditService } from 'core-app/shared/components/time_entries/edit/edit.service';import { I18nService } from 'core-app/core/i18n/i18n.service';import { ToastService } from 'core-app/shared/components/toaster/toast.service';-import { HalResourceEditingService } from 'core-app/shared/components/fields/edit/services/hal-resource-editing.service';+import {+ HalResourceEditingService+} from 'core-app/shared/components/fields/edit/services/hal-resource-editing.service';import { ApiV3Service } from 'core-app/core/apiv3/api-v3.service';import { TimeEntryResource } from 'core-app/features/hal/resources/time-entry-resource';-import {- Observable,- switchMap,-} from 'rxjs';+import { Observable, switchMap, } from 'rxjs';-export const triggerActionsEntryComponentSelector = 'time-entry--trigger-actions-entry';@Component({- selector: triggerActionsEntryComponentSelector,+ selector: 'opce-time-entry-trigger-actions',template: `<a (click)="editTimeEntry()"[title]="text.edit"diff --git a/frontend/src/app/shared/components/toaster/toasts-container.component.ts b/frontend/src/app/shared/components/toaster/toasts-container.component.tsindex 4c6df54f4d3..6f8492c01e7 100644--- a/frontend/src/app/shared/components/toaster/toasts-container.component.ts+++ b/frontend/src/app/shared/components/toaster/toasts-container.component.ts@@ -26,13 +26,10 @@// See COPYRIGHT and LICENSE files for more details.//++-import {- ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit,-} from '@angular/core';+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, } from '@angular/core';import { UntilDestroyedMixin } from 'core-app/shared/helpers/angular/until-destroyed.mixin';import { IToast, ToastService } from './toast.service';-export const toastsContainerSelector = 'op-toasts-container';@Component({template: `@@ -43,7 +40,7 @@ export const toastsContainerSelector = 'op-toasts-container';</div>`,changeDetection: ChangeDetectionStrategy.OnPush,- selector: toastsContainerSelector,+ selector: 'opce-toasts-container',})export class ToastsContainerComponent extends UntilDestroyedMixin implements OnInit {public stack:IToast[] = [];diff --git a/frontend/src/app/shared/components/work-package-graphs/overview/wp-overview-graph.component.ts b/frontend/src/app/shared/components/work-package-graphs/overview/wp-overview-graph.component.tsindex 39f4db7dba6..fa8c996263c 100644--- a/frontend/src/app/shared/components/work-package-graphs/overview/wp-overview-graph.component.ts+++ b/frontend/src/app/shared/components/work-package-graphs/overview/wp-overview-graph.component.ts@@ -13,16 +13,17 @@ import {} from 'core-app/shared/components/work-package-graphs/embedded/wp-embedded-graph.component';import { I18nService } from 'core-app/core/i18n/i18n.service';import { ChartOptions } from 'chart.js';-import { WpGraphConfigurationService } from 'core-app/shared/components/work-package-graphs/configuration/wp-graph-configuration.service';+import {+ WpGraphConfigurationService+} from 'core-app/shared/components/work-package-graphs/configuration/wp-graph-configuration.service';import {WpGraphConfiguration,WpGraphQueryParams,} from 'core-app/shared/components/work-package-graphs/configuration/wp-graph-configuration';-export const wpOverviewGraphSelector = 'wp-overview-graph';@Component({- selector: wpOverviewGraphSelector,+ selector: 'opce-wp-overview-graph',templateUrl: './wp-overview-graph.template.html',styleUrls: ['./wp-overview-graph.component.sass'],changeDetection: ChangeDetectionStrategy.OnPush,diff --git a/frontend/src/app/shared/shared.module.ts b/frontend/src/app/shared/shared.module.tsindex 9c56bc7b346..afa6221fc2a 100644--- a/frontend/src/app/shared/shared.module.ts+++ b/frontend/src/app/shared/shared.module.ts@@ -26,10 +26,7 @@// See COPYRIGHT and LICENSE files for more details.//++import { FormsModule } from '@angular/forms';-import {- Injector,- NgModule,-} from '@angular/core';+import { Injector, NgModule, } from '@angular/core';import { A11yModule } from '@angular/cdk/a11y';import { UIRouterGlobals } from '@uirouter/core';import { NgSelectModule } from '@ng-select/ng-select';@@ -42,13 +39,21 @@ import { DynamicModule } from 'ng-dynamic-component';import { UIRouterModule } from '@uirouter/angular';import { OpSpotModule } from 'core-app/spot/spot.module';import { CurrentUserModule } from 'core-app/core/current-user/current-user.module';-import { OpenprojectAutocompleterModule } from 'core-app/shared/components/autocompleter/openproject-autocompleter.module';+import {+ OpenprojectAutocompleterModule+} from 'core-app/shared/components/autocompleter/openproject-autocompleter.module';import { IconModule } from 'core-app/shared/components/icon/icon.module';import { AttributeHelpTextModule } from 'core-app/shared/components/attribute-help-texts/attribute-help-text.module';-import { IconTriggeredContextMenuComponent } from 'core-app/shared/components/op-context-menu/icon-triggered-context-menu/icon-triggered-context-menu.component';+import {+ IconTriggeredContextMenuComponent+} from 'core-app/shared/components/op-context-menu/icon-triggered-context-menu/icon-triggered-context-menu.component';import { CurrentProjectService } from 'core-app/core/current-project/current-project.service';-import { SortHeaderDirective } from 'core-app/features/work-packages/components/wp-table/sort-header/sort-header.directive';-import { ZenModeButtonComponent } from 'core-app/features/work-packages/components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component';+import {+ SortHeaderDirective+} from 'core-app/features/work-packages/components/wp-table/sort-header/sort-header.directive';+import {+ ZenModeButtonComponent+} from 'core-app/features/work-packages/components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component';import { OPContextMenuComponent } from 'core-app/shared/components/op-context-menu/op-context-menu.component';import { OpenprojectPrincipalRenderingModule } from 'core-app/shared/components/principal/principal-rendering.module';import { FocusModule } from 'core-app/shared/directives/focus/focus.module';@@ -59,17 +64,16 @@ import { HomescreenNewFeaturesBlockComponent } from 'core-app/features/homescreeimport { TablePaginationComponent } from 'core-app/shared/components/table-pagination/table-pagination.component';import { HookService } from 'core-app/features/plugins/hook-service';import { StaticQueriesService } from 'core-app/shared/components/op-view-select/op-static-queries.service';-import {- highlightColSelector,- OpHighlightColDirective,-} from './directives/highlight-col/highlight-col.directive';+import { highlightColSelector, OpHighlightColDirective, } from './directives/highlight-col/highlight-col.directive';import { CopyToClipboardService } from './components/copy-to-clipboard/copy-to-clipboard.service';import { CopyToClipboardComponent } from './components/copy-to-clipboard/copy-to-clipboard.component';import { OpDateTimeComponent } from './components/date/op-date-time.component';import { ToastComponent } from './components/toaster/toast.component';// Old datepickers-import { OpMultiDatePickerComponent } from 'core-app/shared/components/datepicker/multi-date-picker/multi-date-picker.component';+import {+ OpMultiDatePickerComponent+} from 'core-app/shared/components/datepicker/multi-date-picker/multi-date-picker.component';import { ToastsContainerComponent } from './components/toaster/toasts-container.component';import { UploadProgressComponent } from './components/toaster/upload-progress.component';@@ -78,18 +82,22 @@ import { CollapsibleSectionComponent } from './components/collapsible-section/coimport { NoResultsComponent } from './components/no-results/no-results.component';import { EditableToolbarTitleComponent } from './components/editable-toolbar-title/editable-toolbar-title.component';import { PersistentToggleComponent } from './components/persistent-toggle/persistent-toggle.component';-import { AddSectionDropdownComponent } from './components/hide-section/add-section-dropdown/add-section-dropdown.component';+import {+ AddSectionDropdownComponent+} from './components/hide-section/add-section-dropdown/add-section-dropdown.component';import { HideSectionLinkComponent } from './components/hide-section/hide-section-link/hide-section-link.component';import { RemoteFieldUpdaterComponent } from './components/remote-field-updater/remote-field-updater.component';-import { ShowSectionDropdownComponent } from './components/hide-section/show-section-dropdown.component';-import { DynamicBootstrapModule } from './components/dynamic-bootstrap/dynamic-bootstrap.module';import { OpOptionListComponent } from './components/option-list/option-list.component';import { OpProjectIncludeComponent } from './components/project-include/project-include.component';import { OpProjectIncludeListComponent } from './components/project-include/list/project-include-list.component';import { OpLoadingProjectListComponent } from './components/searchable-project-list/loading-project-list.component';-import { OpNonWorkingDaysListComponent } from './components/op-non-working-days-list/op-non-working-days-list.component';+import {+ OpNonWorkingDaysListComponent+} from './components/op-non-working-days-list/op-non-working-days-list.component';import { ViewsResourceService } from 'core-app/core/state/views/views.service';-import { OpenprojectContentLoaderModule } from 'core-app/shared/components/op-content-loader/openproject-content-loader.module';+import {+ OpenprojectContentLoaderModule+} from 'core-app/shared/components/op-content-loader/openproject-content-loader.module';import { OpenprojectModalModule } from 'core-app/shared/components/modal/modal.module';import { FullCalendarModule } from '@fullcalendar/angular';import { OpDatePickerModule } from 'core-app/shared/components/datepicker/datepicker.module';@@ -133,7 +141,6 @@ export function bootstrapModule(injector:Injector):void {NgSelectModule,NgOptionHighlightModule,- DynamicBootstrapModule,OpenprojectPrincipalRenderingModule,OpenprojectContentLoaderModule,OpenprojectAutocompleterModule,@@ -158,7 +165,6 @@ export function bootstrapModule(injector:Injector):void {AttributeHelpTextModule,FormsModule,NgOptionHighlightModule,- DynamicBootstrapModule,OpenprojectPrincipalRenderingModule,OpenprojectAutocompleterModule,OpenprojectContentLoaderModule,@@ -244,7 +250,6 @@ export function bootstrapModule(injector:Injector):void {PersistentToggleComponent,HideSectionLinkComponent,- ShowSectionDropdownComponent,AddSectionDropdownComponent,RemoteFieldUpdaterComponent,diff --git a/frontend/src/app/spot/components/drop-modal/drop-modal-portal.component.ts b/frontend/src/app/spot/components/drop-modal/drop-modal-portal.component.tsindex a1a3e04bf33..161f10b9b0f 100644--- a/frontend/src/app/spot/components/drop-modal/drop-modal-portal.component.ts+++ b/frontend/src/app/spot/components/drop-modal/drop-modal-portal.component.ts@@ -1,22 +1,18 @@import {- OnInit,AfterViewChecked,ChangeDetectionStrategy,+ ChangeDetectorRef,Component,ElementRef,HostBinding,- ChangeDetectorRef,+ OnInit,} from '@angular/core';-import {- SpotDropModalTeleportationService,- TeleportInstance,-} from './drop-modal-teleportation.service';+import { SpotDropModalTeleportationService, TeleportInstance, } from './drop-modal-teleportation.service';import { UntilDestroyedMixin } from 'core-app/shared/helpers/angular/until-destroyed.mixin';-export const spotDropModalPortalComponentSelector = 'spot-drop-modal-portal';@Component({- selector: spotDropModalPortalComponentSelector,+ selector: 'opce-spot-drop-modal-portal',template: '<ng-container *ngTemplateOutlet="template"></ng-container>',changeDetection: ChangeDetectionStrategy.OnPush,})diff --git a/frontend/src/app/spot/components/switch/switch.component.ts b/frontend/src/app/spot/components/switch/switch.component.tsindex f0e549b1b5e..e3b22e91159 100644--- a/frontend/src/app/spot/components/switch/switch.component.ts+++ b/frontend/src/app/spot/components/switch/switch.component.ts@@ -10,18 +10,13 @@ import {Output,ViewChild,} from '@angular/core';-import {- ControlValueAccessor,- NG_VALUE_ACCESSOR,-} from '@angular/forms';+import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';import { populateInputsFromDataset } from 'core-app/shared/components/dataset-inputs';export type SpotSwitchState = boolean;-export const spotSwitchSelector = 'spot-switch';-@Component({- selector: spotSwitchSelector,+ selector: 'spot-switch',templateUrl: './switch.component.html',providers: [{provide: NG_VALUE_ACCESSOR,diff --git a/lib/open_project/text_formatting/filters/macro_filter.rb b/lib/open_project/text_formatting/filters/macro_filter.rbindex c61215200d6..f801ba2d03b 100644--- a/lib/open_project/text_formatting/filters/macro_filter.rb+++ b/lib/open_project/text_formatting/filters/macro_filter.rb@@ -92,5 +92,6 @@ OpenProject::TextFormatting::Filters::MacroFilter.register(OpenProject::TextFormatting::Filters::Macros::CreateWorkPackageLink,OpenProject::TextFormatting::Filters::Macros::IncludeWikiPage,OpenProject::TextFormatting::Filters::Macros::EmbeddedTable,- OpenProject::TextFormatting::Filters::Macros::ChildPages+ OpenProject::TextFormatting::Filters::Macros::ChildPages,+ OpenProject::TextFormatting::Filters::Macros::GithubPullRequest)diff --git a/lib/open_project/text_formatting/filters/macros/github_pull_request.rb b/lib/open_project/text_formatting/filters/macros/github_pull_request.rbnew file mode 100644index 00000000000..db1030b634b--- /dev/null+++ b/lib/open_project/text_formatting/filters/macros/github_pull_request.rb@@ -0,0 +1,48 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++module OpenProject::TextFormatting::Filters::Macros+ module GithubPullRequest+ CUSTOM_ELEMENT = "opce-github-pull-request".freeze+ HTML_CLASS = "github_pull_request".freeze++ module_function++ def identifier+ HTML_CLASS+ end++ def apply(macro, **)+ macro.name = CUSTOM_ELEMENT+ end++ def is?(macro)+ macro["class"].include?(HTML_CLASS)+ end+ end+enddiff --git a/lib/redmine/menu_manager/top_menu/projects_menu.rb b/lib/redmine/menu_manager/top_menu/projects_menu.rbindex caaa8e9d7ff..e8876aba140 100644--- a/lib/redmine/menu_manager/top_menu/projects_menu.rb+++ b/lib/redmine/menu_manager/top_menu/projects_menu.rb@@ -38,7 +38,7 @@ module Redmine::MenuManager::TopMenu::ProjectsMenudef render_projects_dropdowncontent_tag(:li, class: "op-app-menu--item") do- angular_component_tag("op-header-project-select")+ angular_component_tag("opce-header-project-select")endenddiff --git a/lib/redmine/menu_manager/top_menu_helper.rb b/lib/redmine/menu_manager/top_menu_helper.rbindex 1859b708e27..1881d9b12bf 100644--- a/lib/redmine/menu_manager/top_menu_helper.rb+++ b/lib/redmine/menu_manager/top_menu_helper.rb@@ -92,7 +92,7 @@ module Redmine::MenuManager::TopMenuHelperreturn "".html_safe if Setting.notifications_hidden?content_tag("li", class: "op-app-menu--item", title: I18n.t("mail.notification.center")) do- angular_component_tag "op-in-app-notification-bell",+ angular_component_tag "opce-in-app-notification-bell",inputs: {interval: Setting.notifications_polling_interval}diff --git a/lib/tabular_form_builder.rb b/lib/tabular_form_builder.rbindex fa97bab69f1..88576b7869c 100644--- a/lib/tabular_form_builder.rb+++ b/lib/tabular_form_builder.rb@@ -117,7 +117,7 @@ class TabularFormBuilder < ActionView::Helpers::FormBuilderendlabel = label_for_field(field, label_options)- input = angular_component_tag("op-basic-single-date-picker",+ input = angular_component_tag("opce-basic-single-date-picker",class: options[:class],inputs:)(label + container_wrap_field(input, :date_picker, options))diff --git a/lookbook/previews/open_project/deprecated/collapsible_section_preview/default.html.erb b/lookbook/previews/open_project/deprecated/collapsible_section_preview/default.html.erbindex 672cfe08c28..79186a66d13 100644--- a/lookbook/previews/open_project/deprecated/collapsible_section_preview/default.html.erb+++ b/lookbook/previews/open_project/deprecated/collapsible_section_preview/default.html.erb@@ -1,13 +1,13 @@-<collapsible-section-augment initially-expanded="true"+<opce-collapsible-section-augment initially-expanded="true"section-title="My section title">-</collapsible-section-augment>-<div class="collapsible-section-augment--body" hidden>+</opce-collapsible-section-augment>+<div class="opce-collapsible-section-augment--body" hidden><p><strong>Initially expanded</strong></p></div>-<collapsible-section-augment section-title="My closed section title">-</collapsible-section-augment>-<div class="collapsible-section-augment--body" hidden>+<opce-collapsible-section-augment section-title="My closed section title">+</opce-collapsible-section-augment>+<div class="opce-collapsible-section-augment--body" hidden><p><strong>Initially closed</strong></p></div>diff --git a/modules/avatars/app/views/avatars/users/_local_avatars.html.erb b/modules/avatars/app/views/avatars/users/_local_avatars.html.erbindex 531907f84a5..8b7fca49908 100644--- a/modules/avatars/app/views/avatars/users/_local_avatars.html.erb+++ b/modules/avatars/app/views/avatars/users/_local_avatars.html.erb@@ -30,5 +30,5 @@</div></div></div>- <avatar-upload-form target="<%= @target_avatar_path %>" method="PUT"></avatar-upload-form>+ <opce-avatar-upload-form target="<%= @target_avatar_path %>" method="PUT"></opce-avatar-upload-form></fieldset>diff --git a/modules/avatars/frontend/module/avatar-upload-form/avatar-upload-form.component.ts b/modules/avatars/frontend/module/avatar-upload-form/avatar-upload-form.component.tsindex 324f720b064..677b0e3454d 100644--- a/modules/avatars/frontend/module/avatar-upload-form/avatar-upload-form.component.ts+++ b/modules/avatars/frontend/module/avatar-upload-form/avatar-upload-form.component.ts@@ -26,14 +26,7 @@// See COPYRIGHT and LICENSE files for more details.//++-import {- ChangeDetectionStrategy,- ChangeDetectorRef,- Component,- ElementRef,- OnInit,- ViewChild,-} from '@angular/core';+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, OnInit, ViewChild, } from '@angular/core';import { resizeFile } from 'core-app/shared/helpers/images/resizer';import { I18nService } from 'core-app/core/i18n/i18n.service';@@ -44,7 +37,7 @@ import { AvatarUploadFile, AvatarUploadService } from '../avatar-upload.service'import { HttpErrorResponse } from '@angular/common/http';@Component({- selector: 'avatar-upload-form',+ selector: 'opce-avatar-upload-form',templateUrl: './avatar-upload-form.html',providers: [{ provide: OpUploadService, useClass: AvatarUploadService }],changeDetection: ChangeDetectionStrategy.OnPush,diff --git a/modules/avatars/frontend/module/main.ts b/modules/avatars/frontend/module/main.tsindex 9454534db80..5707cca4857 100644--- a/modules/avatars/frontend/module/main.ts+++ b/modules/avatars/frontend/module/main.ts@@ -26,7 +26,6 @@import { Injector, NgModule } from '@angular/core';import { CommonModule } from '@angular/common';-import { HookService } from 'core-app/features/plugins/hook-service';import { AvatarUploadFormComponent } from './avatar-upload-form/avatar-upload-form.component';@NgModule({@@ -39,9 +38,5 @@ import { AvatarUploadFormComponent } from './avatar-upload-form/avatar-upload-fo})export class PluginModule {constructor(injector:Injector) {- const hookService = injector.get(HookService);- hookService.register('openProjectAngularBootstrap', () => [- { selector: 'avatar-upload-form', cls: AvatarUploadFormComponent },- ]);}}diff --git a/modules/backlogs/app/views/rb_sprints/_sprint.html.erb b/modules/backlogs/app/views/rb_sprints/_sprint.html.erbindex 9055f2fd94a..e50d04d0add 100644--- a/modules/backlogs/app/views/rb_sprints/_sprint.html.erb+++ b/modules/backlogs/app/views/rb_sprints/_sprint.html.erb@@ -52,14 +52,14 @@ See COPYRIGHT and LICENSE files for more details.<% if User.current.allowed_in_project?(:update_sprints, @project) %><div class="editors permanent">- <%= angular_component_tag "op-basic-single-date-picker",+ <%= angular_component_tag "opce-basic-single-date-picker",inputs: {value: sprint.effective_date,inputClassNames: 'effective_date editor',id: "effective_date_#{sprint.id}",name: :effective_date} %>- <%= angular_component_tag "op-basic-single-date-picker",+ <%= angular_component_tag "opce-basic-single-date-picker",inputs: {value: sprint.start_date,inputClassNames: 'start_date editor',diff --git a/modules/budgets/frontend/module/augment/cost-subform.augment.service.ts b/modules/budgets/frontend/module/augment/cost-subform.augment.service.tsindex 574728afd22..6c93f684f68 100644--- a/modules/budgets/frontend/module/augment/cost-subform.augment.service.ts+++ b/modules/budgets/frontend/module/augment/cost-subform.augment.service.ts@@ -27,7 +27,6 @@//++import { Injectable } from "@angular/core";-import { OpenProjectPluginContext } from 'core-app/features/plugins/plugin-context';@Injectable()export class CostSubformAugmentService {@@ -60,11 +59,6 @@ export class CostSubformAugmentService {container.append(row);rowIndex += 1;- window.OpenProject.getPluginContext()- .then((pluginContext:OpenProjectPluginContext) => {- pluginContext.bootstrap(row[0]);- });-setTimeout(() => container.find('.subform-row:last-child input:first').focus(), 10)return false;@@ -72,5 +66,3 @@ export class CostSubformAugmentService {});}}--diff --git a/modules/costs/app/views/cost_types/index.html.erb b/modules/costs/app/views/cost_types/index.html.erbindex beb8b9d0490..4e0d119c86e 100644--- a/modules/costs/app/views/cost_types/index.html.erb+++ b/modules/costs/app/views/cost_types/index.html.erb@@ -56,7 +56,7 @@ See COPYRIGHT and LICENSE files for more details.<li class="simple-filters--filter"><%= styled_label_tag :fixed_date, t(:'attributes.fixed_date'), class: 'simple-filters--filter-name' %><div class='simple-filters--filter-value'>- <%= angular_component_tag 'op-basic-single-date-picker',+ <%= angular_component_tag 'opce-basic-single-date-picker',inputs: {value: @fixed_date,id: :start_date,diff --git a/modules/costs/app/views/costlog/edit.html.erb b/modules/costs/app/views/costlog/edit.html.erbindex 9233e5cfb07..bcbcd54cca8 100644--- a/modules/costs/app/views/costlog/edit.html.erb+++ b/modules/costs/app/views/costlog/edit.html.erb@@ -38,9 +38,9 @@ See COPYRIGHT and LICENSE files for more details.:post ::put %>-<remote-field-updater data-url="<%= url_for(controller: :budgets, action: :update_material_budget_item, project_id: @cost_entry.project) %>"+<opce-remote-field-updater data-url="<%= url_for(controller: :budgets, action: :update_material_budget_item, project_id: @cost_entry.project) %>"data-mode="json">-</remote-field-updater>+</opce-remote-field-updater><%= labelled_tabular_form_for @cost_entry, url: url, html: { method: method } do |f| %><%= error_messages_for 'cost_entry' %><%= back_url_hidden_field_tag %>diff --git a/modules/costs/app/views/my/timer/_menu.html.erb b/modules/costs/app/views/my/timer/_menu.html.erbindex 393d9436e9b..4dbdc7a8944 100644--- a/modules/costs/app/views/my/timer/_menu.html.erb+++ b/modules/costs/app/views/my/timer/_menu.html.erb@@ -1 +1 @@-<%= angular_component_tag 'op-timer-account-menu' %>+<%= angular_component_tag 'opce-timer-account-menu' %>diff --git a/modules/github_integration/frontend/module/main.ts b/modules/github_integration/frontend/module/main.tsindex 45f0f92eded..2133ff879ba 100644--- a/modules/github_integration/frontend/module/main.ts+++ b/modules/github_integration/frontend/module/main.ts@@ -24,13 +24,12 @@//// See COPYRIGHT and LICENSE files for more details.-import {- Injector,- NgModule,-} from '@angular/core';+import { Injector, NgModule, } from '@angular/core';import { OpSharedModule } from 'core-app/shared/shared.module';import { OpenprojectTabsModule } from 'core-app/shared/components/tabs/openproject-tabs.module';-import { WorkPackageTabsService } from 'core-app/features/work-packages/components/wp-tabs/services/wp-tabs/wp-tabs.service';+import {+ WorkPackageTabsService+} from 'core-app/features/work-packages/components/wp-tabs/services/wp-tabs/wp-tabs.service';import { GitHubTabComponent } from './github-tab/github-tab.component';import { TabHeaderComponent } from './tab-header/tab-header.component';import { TabPrsComponent } from './tab-prs/tab-prs.component';@@ -41,12 +40,9 @@ import { WorkPackageResource } from 'core-app/features/hal/resources/work-packagimport { Observable } from 'rxjs';import { map } from 'rxjs/operators';import { GithubPullRequestResourceService } from './state/github-pull-request.service';-import {- githubPullRequestMacroSelector,- PullRequestMacroComponent,-} from './pull-request/pull-request-macro.component';-import { DynamicBootstrapper } from 'core-app/core/setup/globals/dynamic-bootstrapper';+import { PullRequestMacroComponent, } from './pull-request/pull-request-macro.component';import { PullRequestStateComponent } from './pull-request/pull-request-state.component';+import { registerCustomElement } from 'core-app/shared/helpers/angular/custom-elements.helper';export function workPackageGithubPrsCount(workPackage:WorkPackageResource,@@ -101,8 +97,6 @@ export function initializeGithubIntegrationPlugin(injector:Injector) {export class PluginModule {constructor(injector:Injector) {initializeGithubIntegrationPlugin(injector);- DynamicBootstrapper.register(- { selector: githubPullRequestMacroSelector, cls: PullRequestMacroComponent, embeddable: true },- );+ registerCustomElement('opce-github-pull-request', PullRequestMacroComponent, { injector });}}diff --git a/modules/github_integration/frontend/module/pull-request/pull-request-macro.component.ts b/modules/github_integration/frontend/module/pull-request/pull-request-macro.component.tsindex d952bcf5db3..2e05a4282d6 100644--- a/modules/github_integration/frontend/module/pull-request/pull-request-macro.component.ts+++ b/modules/github_integration/frontend/module/pull-request/pull-request-macro.component.ts@@ -38,10 +38,7 @@ import { map } from 'rxjs/operators';import { I18nService } from 'core-app/core/i18n/i18n.service';import { PullRequestState } from './pull-request-state.component';-export const githubPullRequestMacroSelector = 'macro.github_pull_request';-@Component({- selector: githubPullRequestMacroSelector,templateUrl: './pull-request-macro.component.html',styleUrls: ['./pull-request-macro.component.sass'],changeDetection: ChangeDetectionStrategy.OnPush,diff --git a/modules/reporting/lib/widget/filters/date.rb b/modules/reporting/lib/widget/filters/date.rbindex 73fc96529ab..c4764876c26 100644--- a/modules/reporting/lib/widget/filters/date.rb+++ b/modules/reporting/lib/widget/filters/date.rb@@ -41,7 +41,7 @@ class Widget::Filters::Date < Widget::Filters::Baseclass: "hidden-for-sighted"arg1 = content_tag :span, id: "#{id_prefix}arg_1" do- text1 = angular_component_tag "op-basic-single-date-picker",+ text1 = angular_component_tag "opce-basic-single-date-picker",inputs: {value: filter.values.first.to_s,id: "#{id_prefix}arg_1_val",@@ -55,7 +55,7 @@ class Widget::Filters::Date < Widget::Filters::Baseclass: "hidden-for-sighted"arg2 = content_tag :span, id: "#{id_prefix}arg_2", class: "advanced-filters--filter-value2" do- text2 = angular_component_tag "op-basic-single-date-picker",+ text2 = angular_component_tag "opce-basic-single-date-picker",inputs: {value: filter.values.second.to_s,id: "#{id_prefix}arg_2_val",diff --git a/modules/reporting/lib/widget/reporting_widget.rb b/modules/reporting/lib/widget/reporting_widget.rbindex a4552f65ca9..9be484e4a3f 100644--- a/modules/reporting/lib/widget/reporting_widget.rb+++ b/modules/reporting/lib/widget/reporting_widget.rb@@ -34,6 +34,7 @@ class Widget::ReportingWidget < ActionView::Baseinclude ActionView::Helpers::OutputSafetyHelperinclude Rails.application.routes.url_helpersinclude ApplicationHelper+ include AngularHelperinclude ReportingHelperinclude Redmine::I18ndiff --git a/modules/reporting/lib/widget/table/entry_table.rb b/modules/reporting/lib/widget/table/entry_table.rbindex a1fa09ec7e1..dfb95fcb419 100644--- a/modules/reporting/lib/widget/table/entry_table.rb+++ b/modules/reporting/lib/widget/table/entry_table.rb@@ -162,19 +162,19 @@ class Widget::Table::EntryTable < Widget::Tableicons << link_to(icon_wrapper("icon-context icon-delete", I18n.t(:button_delete)),action_for(result, action: "destroy")- .reverse_merge(authenticity_token: form_authenticity_token),+ .reverse_merge(authenticity_token: form_authenticity_token),data: { confirm: I18n.t(:text_are_you_sure) },method: :delete,class: "no-decoration-on-hover",title: I18n.t(:button_delete))else- icons = content_tag(:"time-entry--trigger-actions-entry",- "",- data: { entry: result["id"] })+ icons = angular_component_tag("opce-time-entry-trigger-actions",+ data: { entry: result["id"] })endendendiconsend+# rubocop:enable Metrics/AbcSizeenddiff --git a/modules/storages/app/views/storages/project_settings/_project_folder_form.html.erb b/modules/storages/app/views/storages/project_settings/_project_folder_form.html.erbindex d667e379aad..3811901d3d2 100644--- a/modules/storages/app/views/storages/project_settings/_project_folder_form.html.erb+++ b/modules/storages/app/views/storages/project_settings/_project_folder_form.html.erb@@ -68,7 +68,7 @@ See COPYRIGHT and LICENSE files for more details.<%= styled_label_tag :project_folder_mode,class: "-bold -flex" do %><%= t(:"storages.label_project_folder") %>- <%= angular_component_tag 'op-static-attribute-help-text',+ <%= angular_component_tag 'opce-static-attribute-help-text',inputs: {title: t(:"storages.label_project_folder"),content: t(:"storages.help_texts.project_folder"),@@ -133,7 +133,7 @@ See COPYRIGHT and LICENSE files for more details.<%= spot_icon('folder-open') %><%= content_tag :span, t(:"storages.buttons.select_folder") %><% end %>- <%= angular_component_tag 'op-storage-login-button',+ <%= angular_component_tag 'opce-storage-login-button',inputs: {input: storage_login_input(@project_storage.storage)},diff --git a/spec/lib/custom_field_form_builder_spec.rb b/spec/lib/custom_field_form_builder_spec.rbindex b87d0009033..00820ae9037 100644--- a/spec/lib/custom_field_form_builder_spec.rb+++ b/spec/lib/custom_field_form_builder_spec.rb@@ -102,14 +102,14 @@ RSpec.describe CustomFieldFormBuilder doit "outputs element" doexpect(output).to be_html_eql(<<~HTML- <op-basic-single-date-picker+ <opce-basic-single-date-pickerclass="custom-class"data-value="null"data-id='"user_custom_field_#{custom_field.id}"'data-name='"user[#{custom_field.id}]"'- ></op-basic-single-date-picker>+ ></opce-basic-single-date-picker>HTML- ).at_path("op-basic-single-date-picker")+ ).at_path("opce-basic-single-date-picker")endenddiff --git a/spec/lib/tabular_form_builder_spec.rb b/spec/lib/tabular_form_builder_spec.rbindex e309eb5a3a4..4f2eb6931f2 100644--- a/spec/lib/tabular_form_builder_spec.rb+++ b/spec/lib/tabular_form_builder_spec.rb@@ -279,9 +279,9 @@ JJ Abrams</textarea>it_behaves_like "wrapped in field-container by default"it "outputs element" do- expect(output).to have_css "op-basic-single-date-picker"+ expect(output).to have_css "opce-basic-single-date-picker"# Regression test, allow for the name to be passed through- expect(output).to have_css "op-basic-single-date-picker[data-name='\"#{options[:name]}\"']"+ expect(output).to have_css "opce-basic-single-date-picker[data-name='\"#{options[:name]}\"']"endenddiff --git a/spec/support/capybara_browser_logs.rb b/spec/support/capybara_browser_logs.rbindex d7f9faf372f..4bb493b7210 100644--- a/spec/support/capybara_browser_logs.rb+++ b/spec/support/capybara_browser_logs.rb@@ -41,7 +41,7 @@ module Capybara::BrowserLogsattr_reader :output- EXCLUDE_PATTERN = /Angular is running in development mode./+ EXCLUDE_PATTERN = /(Angular is running in development mode|\[DEBUG\]|"details:" Object|DEPRECATED)/def initialize(output)@output = outputdiff --git a/spec/support/pages/custom_fields.rb b/spec/support/pages/custom_fields.rbindex 45214059b9c..593f859d0b9 100644--- a/spec/support/pages/custom_fields.rb+++ b/spec/support/pages/custom_fields.rb@@ -36,7 +36,7 @@ module Pagesdef visit_tab(name)visit!- within("content-tabs") do+ within("opce-content-tabs") doclick_link name.to_sendenddiff --git a/spec/support/pages/notifications/center.rb b/spec/support/pages/notifications/center.rbindex 697f44ad082..0539b219212 100644--- a/spec/support/pages/notifications/center.rb+++ b/spec/support/pages/notifications/center.rb@@ -139,7 +139,7 @@ module Pagesenddef bell_element- page.find('op-in-app-notification-bell [data-test-selector="op-ian-bell"]')+ page.find('opce-in-app-notification-bell [data-test-selector="op-ian-bell"]')enddef expect_no_toaster