Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-125114

Remove {core}, {isFunction}, {isDefAndNotNull}, {isString}, {isObject}, {isBoolean}, {isNumber}, {isDef}, {getUid} usages of metal

Details

    • Task
    • Status: Closed
    • Minor
    • Resolution: Completed
    • None
    • 7.4.13 DXP GA1, Master
    • Metal.js
    • None

    Description

      Part of our plan to remove usages of metal in DXP codebase

      The goal of this task is to remove existing usages of {core}, {isFunction}, {isDefAndNotNull}, {isString}, {isObject}, {isBoolean}, {isNumber}, {isDef}, {getUid} from the metal package. 

      The intended order of removal is:

      1. Replace the function calls with standard APIs or specific DXP functions when needed.
      2. Remove imports of these functions/objects in the .js files
      3. Remove the dependencies in package.json file if it's declared there

      Do not look for occurrences in neither .npmbundlerrc nor .eslintrc.js files as these will be dealt with in a separate task.

      For the case of {core} object, only  isBoolean(), isString() and isObject() functions are used.

      Here is a list of usages

      Family Module File Usage
      data-engine data-engine-taglib META-INF/resources/data_layout_builder/js/data-layout-builder/DataLayoutBuilder.es.js core (isString)
      dynamic-data-mapping dynamic-data-mapping-form-renderer META-INF/resources/js/components/PageRenderer/index.js core (isObject)
        dynamic-data-mapping-form-web META-INF/resources/admin.js/main.es.js core (isString)
      frontend-js frontend-js-web META-INF/resources/liferay/CompatibilityEventProxy.es.js core (isObject)
          META-INF/resources/liferay/component.es.js isFunction
          META-INF/resources/liferay/DynamicInlineScroll.es.js core (isBoolean, isString)
          META-INF/resources/liferay/PortletBase.es.js core (isString)
          META-INF/resources/liferay/portlet/portlet_util.es.js isDefAndNotNull, isString
          META-INF/resources/liferay/portlet/PortletInit.es.js isDefAndNotNull, isFunction, isObject, isString
          META-INF/resources/liferay/portlet/RenderState.es.js isObject, isString
          META-INF/resources/liferay/util/format_storage.es.js isNumber
          META-INF/resources/liferay/util/format_xml.es.js isString
          META-INF/resources/liferay/util/get_crop_region.es.js isObject
          META-INF/resources/liferay/util/object_to_url_search_params.es.js isObject
          META-INF/resources/liferay/util/form/get_form_element.es.js isDef, isString
          META-INF/resources/liferay/util/form/object_to_form_data.es.js isObject
          META-INF/resources/liferay/util/form/post_form.es.js isDef, isObject, isString
          META-INF/resources/liferay/util/form/set_form_values.es.js isDef, isObject
      layout layout-seo-web META-INF/resources/js/seo/PreviewSeo.es.js isObject
      segments segments-web META-INF/resources/js/utils/utils.es.js getUid

      Attachments

        Activity

          People

            bryce.osterhaus Bryce Osterhaus
            daniel.sanz Daniel Sanz
            SE Support SE Support
            Kiyoshi Lee Kiyoshi Lee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Packages

                Version Package
                7.4.13 DXP GA1
                Master