@wavemaker/app-ng-runtime 12.0.0-next.45078 → 12.0.0-next.45080
Sign up to get free protection for your applications and to get access to all the features.
- app-ng-runtime/build-task/bundles/index.umd.js +8 -1
- app-ng-runtime/build-task/esm2022/data/form/form-field/form-field.build.mjs +9 -2
- app-ng-runtime/build-task/fesm2022/index.mjs +8 -1
- app-ng-runtime/build-task/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/advanced/custom/bundles/index.umd.js +49 -12
- app-ng-runtime/components/advanced/custom/custom-widget-container/custom-widget-container.directive.d.ts +11 -4
- app-ng-runtime/components/advanced/custom/esm2022/custom-widget-container/custom-widget-container.directive.mjs +51 -11
- app-ng-runtime/components/advanced/custom/fesm2022/index.mjs +50 -10
- app-ng-runtime/components/advanced/custom/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/base/bundles/index.umd.js +13 -3
- app-ng-runtime/components/base/esm2022/widgets/common/base/base.component.mjs +14 -4
- app-ng-runtime/components/base/esm2022/widgets/framework/property-change-handler.mjs +2 -2
- app-ng-runtime/components/base/fesm2022/index.mjs +14 -4
- app-ng-runtime/components/base/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/base/widgets/common/base/base.component.d.ts +1 -0
- app-ng-runtime/components/basic/search/bundles/index.umd.js +36 -24
- app-ng-runtime/components/basic/search/esm2022/search.component.mjs +33 -24
- app-ng-runtime/components/basic/search/esm2022/search.props.mjs +5 -2
- app-ng-runtime/components/basic/search/fesm2022/index.mjs +36 -24
- app-ng-runtime/components/basic/search/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/basic/search/search.component.d.ts +3 -0
- app-ng-runtime/components/data/form/bundles/index.umd.js +23 -11
- app-ng-runtime/components/data/form/esm2022/form-field/form-field.directive.mjs +24 -12
- app-ng-runtime/components/data/form/fesm2022/index.mjs +23 -11
- app-ng-runtime/components/data/form/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/data/form/form-field/form-field.directive.d.ts +1 -0
- app-ng-runtime/components/input/default/base-form-custom.component.d.ts +2 -1
- app-ng-runtime/components/input/default/bundles/index.umd.js +13 -4
- app-ng-runtime/components/input/default/dataset-aware-form.component.d.ts +2 -2
- app-ng-runtime/components/input/default/esm2022/base-form-custom.component.mjs +6 -1
- app-ng-runtime/components/input/default/esm2022/checkboxset/checkboxset.component.mjs +3 -1
- app-ng-runtime/components/input/default/esm2022/dataset-aware-form.component.mjs +5 -5
- app-ng-runtime/components/input/default/esm2022/radioset/radioset.component.mjs +3 -1
- app-ng-runtime/components/input/default/fesm2022/index.mjs +13 -4
- app-ng-runtime/components/input/default/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/core/bundles/index.umd.js +6 -6
- app-ng-runtime/core/enums/enums.d.ts +2 -2
- app-ng-runtime/core/esm2022/enums/enums.mjs +2 -2
- app-ng-runtime/core/esm2022/utils/build-utils.mjs +6 -6
- app-ng-runtime/core/fesm2022/index.mjs +6 -6
- app-ng-runtime/core/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/package.json +1 -1
- app-ng-runtime/runtime/base/bundles/index.umd.js +9 -0
- app-ng-runtime/runtime/base/components/base-custom-widget.component.d.ts +2 -0
- app-ng-runtime/runtime/base/esm2022/components/base-custom-widget.component.mjs +10 -1
- app-ng-runtime/runtime/base/fesm2022/index.mjs +9 -0
- app-ng-runtime/runtime/base/fesm2022/index.mjs.map +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../projects/components/base/src/widgets/framework/types.ts","../../../../projects/components/base/src/utils/widget-utils.ts","../../../../projects/components/base/src/widgets/framework/styler.ts","../../../../projects/components/base/src/widgets/framework/widget-props.ts","../../../../projects/components/base/src/widgets/common/container/container.props.ts","../../../../projects/components/base/src/widgets/framework/widget-registry.ts","../../../../projects/components/base/src/widgets/framework/widget-id-generator.ts","../../../../projects/components/base/src/widgets/framework/constants.ts","../../../../projects/components/base/src/widgets/framework/property-change-handler.ts","../../../../projects/components/base/src/widgets/framework/widget-proxy-provider.ts","../../../../projects/components/base/src/widgets/common/base/base.component.ts","../../../../projects/components/base/src/widgets/common/base/stylable.component.ts","../../../../projects/components/base/src/widgets/common/redraw/redrawable.directive.ts","../../../../projects/components/base/src/widgets/common/base/base-container.component.ts","../../../../projects/components/base/src/widgets/common/container/container.directive.ts","../../../../projects/components/base/src/pipes/image.pipe.ts","../../../../projects/components/base/src/widgets/common/item-template/item-template.props.ts","../../../../projects/components/base/src/widgets/common/item-template/item-template.directive.ts","../../../../projects/components/base/src/widgets/common/repeat-template/repeat-template.props.ts","../../../../projects/components/base/src/widgets/common/repeat-template/repeat-template.directive.ts","../../../../projects/components/base/src/widgets/common/lazy-load/lazy-load.directive.ts","../../../../projects/components/base/src/widgets/common/message/message.props.ts","../../../../projects/components/base/src/widgets/common/message/message.component.ts","../../../../projects/components/base/src/widgets/common/message/message.component.html","../../../../projects/components/base/src/widgets/common/partial/partial.props.ts","../../../../projects/components/base/src/widgets/common/partial/partial.directive.ts","../../../../projects/components/base/src/widgets/common/partial-param/partial-param.directive.ts","../../../../projects/components/base/src/widgets/common/base/partial-container.directive.ts","../../../../projects/components/base/src/widgets/common/base/custom-widget-container.directive.ts","../../../../projects/components/base/src/directives/show-in-device.directive.ts","../../../../projects/components/base/src/widgets/common/smooth-scroll/smooth-scroll.directive.ts","../../../../projects/components/base/src/widgets/common/base/text-content.directive.ts","../../../../projects/components/base/src/pipes/wm-pipe.ts","../../../../projects/components/base/src/pipes/custom-pipes.ts","../../../../projects/components/base/src/pipes/trust-as.pipe.ts","../../../../projects/components/base/src/widgets/common/dialog/dialog.service.ts","../../../../projects/components/base/src/pipes/sanitize.pipe.ts","../../../../projects/components/base/src/components.module.ts","../../../../projects/components/base/src/utils/data-utils.ts","../../../../projects/components/base/src/utils/form-utils.ts","../../../../projects/components/base/src/utils/live-utils.ts","../../../../projects/components/base/src/widgets/common/base/dataset-aware-nav.component.ts","../../../../projects/components/base/src/widgets/common/base/base-field-validations.ts","../../../../projects/components/base/src/widgets/common/pull-to-refresh/pull-to-refresh.ts","../../../../projects/components/base/src/widgets/framework/deviceview.ts","../../../../projects/components/base/src/index.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nimport { BaseComponent } from '../common/base/base.component';\n\nexport const WidgetConfig = new InjectionToken<IWidgetConfig>('WidgetConfig');\n\nexport interface IWidgetConfig {\n widgetType: string;\n widgetSubType?: string;\n hostClass?: string;\n displayType?: string;\n}\n\nexport interface IRedrawableComponent {\n redraw: Function;\n}\n\nexport type ChangeListener = (key: string, nv: any, ov?: any) => void;\n\nexport abstract class WidgetRef {}\n\nexport abstract class DialogRef<T extends BaseComponent> {\n bsModal: any;\n}\n\nexport const Context = new InjectionToken('Context Provider Reference');\n\nexport interface IDialog {\n open: (initState?: any) => void;\n close: () => void;\n}\n","import {forwardRef} from '@angular/core';\n\nimport {\n $parseExpr,\n checkIsCustomPipeExpression,\n deHyphenate,\n encodeUrl,\n FormWidgetType,\n getClonedObject,\n initCaps,\n isValidWebURL,\n prettifyLabel,\n stringStartsWith\n} from '@wm/core';\nimport {DialogRef, WidgetRef} from '../widgets/framework/types';\nimport {createFocusTrap} from '@wavemaker/focus-trap';\nimport {NavNode} from \"../widgets/common/base/dataset-aware-nav.component\";\nimport {assignWith, forEach, get, includes, isArray, isNull, isObject, isString, join, split, union} from \"lodash-es\";\n\nconst DATASET_WIDGETS = new Set([FormWidgetType.SELECT, FormWidgetType.CHECKBOXSET, FormWidgetType.RADIOSET,\n FormWidgetType.SWITCH, FormWidgetType.AUTOCOMPLETE, FormWidgetType.CHIPS, FormWidgetType.TYPEAHEAD, FormWidgetType.RATING]);\n/**\n * Returns the parsed, updated bound expression\n * if the expression is $[data[$i][firstName]] + '--' + $[lastName] + '--' + $['@ID@']\n * returns __1.firstName + '--' + lastName + '--' + __1['@ID@']\n */\nconst getUpdatedExpr = (expr: string) => {\n let updated = '', ch, next, i, j, matchCh, matchCount, isQuotedStr, subStr, isQuotedStrEvaluated;\n\n expr = expr.replace(/\\$\\[data\\[\\$i\\]/g, '$[__1');\n\n for (i = 0; i < expr.length; i++) {\n ch = expr[i];\n next = expr[i + 1];\n\n /**\n * if the expression starts with $[, check the next(ch) character,\n * if ch is a quote(', \") change the expr to __[\n * if ch is a whiteSpace, remove it\n * else remove $[\n */\n if (ch === '$' && next === '[') {\n matchCount = 1;\n isQuotedStrEvaluated = false;\n isQuotedStr = false;\n\n for (j = i + 2; j < expr.length; j++) {\n\n matchCh = expr[j];\n\n if (matchCh === ' ') {\n continue;\n }\n\n if (!isQuotedStrEvaluated) {\n isQuotedStr = expr[j] === '\"' || expr[j] === '\\'';\n isQuotedStrEvaluated = true;\n }\n\n if (matchCh === '[') {\n matchCount++;\n } else if (matchCh === ']') {\n matchCount--;\n }\n\n if (!matchCount) {\n subStr = expr.substring(i + 2, j);\n if (isQuotedStr) {\n updated += '__1[' + subStr + ']';\n } else {\n updated += subStr;\n }\n\n break;\n }\n }\n i = j;\n } else {\n updated += ch;\n }\n }\n\n return updated;\n};\n\n/**\n * Returns the value for the provided key in the object\n */\nexport const getObjValueByKey = (obj: any, strKey: string) => {\n /* check for the key-string */\n if (strKey) {\n let val;\n /* convert indexes to properties, so as to work for even 'key1[0].child1'*/\n strKey.replace(/\\[(\\w+)\\]/g, '.$1').split('.').forEach(key => {\n // If obj is null, then assign val to null.\n val = (val && val[key]) || (isNull(obj) ? obj : obj[key]);\n });\n return val;\n }\n return obj;\n};\n\n/**\n * returns the display field data for any dataset widgets\n * Based on the bind display expression or display expression or display name,\n * data is extracted and formatted from the passed option object\n * If there is field is specified, field value is obtained from the dataObj.\n * If expression is given, evaluates the expression value.\n * else check for bindExpression, extract the value from the dataObj\n */\nexport const getEvaluatedData = (dataObj: any, options: any, context?: any) => {\n let expressionValue;\n const field = options.field,\n expr = options.expression,\n bindExpr = options.bindExpression;\n\n // if key is bound expression\n if (bindExpr) {\n // remove 'bind:' prefix from the boundExpressionName\n expressionValue = bindExpr.replace('bind:', '');\n\n // For bind expression passing the last argument that the object of dataset item.\n // Note: For parse expression we are sending dataObj with the propery name \"__1\", we used the same propery to send the last argument as dataset item\n if(checkIsCustomPipeExpression(expressionValue)){\n expressionValue = expressionValue+': __1';\n }\n // parse the expressionValue for replacing all the expressions with values in the object\n expressionValue = getUpdatedExpr(expressionValue);\n } else {\n expressionValue = expr ? expr : field;\n }\n\n // Handling field name with special charecters\n // Ex: field = \"f name\"\n if (!bindExpr && !expr) {\n return get(dataObj, field);\n }\n\n return $parseExpr(expressionValue)(context, Object.assign({}, dataObj, {__1: dataObj}));\n};\n\nexport const isActiveNavItem = (link, routeName) => {\n if (!link || !routeName) {\n return false;\n }\n routeName = routeName.indexOf('?') === -1 ? routeName : routeName.substring(0, routeName.indexOf('?'));\n link = link.indexOf('?') === -1 ? link : link.substring(0, link.indexOf('?'));\n const routeRegex = new RegExp('^(#\\/|#)' + routeName + '$');\n return routeRegex.test(link);\n};\n\n/**\n* returns true if the menu has link to the current page.\n* @param nodes\n* @param routeUrl\n*/\nexport const hasLinkToCurrentPage = (nodes: Array<NavNode>, routeUrl) => {\n return nodes.some(node => {\n if (isActiveNavItem(node.link, routeUrl)) {\n return true;\n }\n if (node.children) {\n return hasLinkToCurrentPage(node.children, routeUrl);\n }\n });\n}\n\n/**\n * Returns the orderBy Expression based on the 'sort 'option in pageable object\n * returned by backend\n * @param pageableObj\n * @returns {string}\n */\nexport const getOrderByExpr = pageableObj => {\n pageableObj = pageableObj || [];\n const expressions = [],\n KEY_VAL_SEPARATOR = ' ',\n FIELD_SEPARATOR = ',';\n forEach(pageableObj, obj => {\n if (obj.direction) {\n expressions.push(obj.property + KEY_VAL_SEPARATOR + obj.direction.toLowerCase());\n }\n });\n\n return join(expressions, FIELD_SEPARATOR);\n};\n\nexport const isDataSetWidget = widget => {\n return DATASET_WIDGETS.has(widget);\n};\n\n/*This function returns the url to the image after checking the validity of url*/\nexport const getImageUrl = (urlString, shouldEncode?, defaultUrl?) => {\n /*In studio mode before setting picturesource, check if the studioController is loaded and new picturesource is in 'styles/images/' path or not.\n * When page is refreshed, loader.gif will be loaded first and it will be in 'style/images/'.\n * Prepend 'services/projects/' + $rootScope.project.id + '/web/resources/images/imagelists/' if the image url is just image name in the project root,\n * and if the url pointing to resources/images/ then 'services/projects/' + $rootScope.project.id + '/web/'*/\n if (isValidWebURL(urlString)) {\n return urlString;\n }\n\n // If no value is provided for picturesource assign pictureplaceholder or default-image\n if (!urlString) {\n urlString = defaultUrl || 'resources/images/imagelists/default-image.png';\n }\n\n urlString = shouldEncode ? encodeUrl(urlString) : urlString;\n\n // if the resource to be loaded is inside a prefab\n if (stringStartsWith(urlString, 'services/prefabs')) {\n return urlString;\n }\n\n return urlString;\n};\n\n/*This method returns the url to the backgroundImage*/\nexport const getBackGroundImageUrl = (urlString) => {\n if (urlString === '' || urlString === 'none') {\n return urlString;\n }\n return 'url(' + getImageUrl(urlString) + ')';\n};\n\nexport function provideAs(reference: any, key: any, multi?: boolean) {\n return {\n provide: key,\n useExisting: forwardRef(() => reference),\n multi: multi\n };\n}\n\nexport function provideAsWidgetRef(reference: any) {\n return provideAs(reference, WidgetRef);\n}\n\nexport function provideAsDialogRef(reference: any) {\n return provideAs(reference, DialogRef);\n}\n\nexport const NAVIGATION_TYPE = {\n ADVANCED: 'Advanced',\n BASIC: 'Basic',\n CLASSIC: 'Classic',\n INLINE: 'Inline',\n NONE: 'None',\n ONDEMAND: 'On-Demand',\n PAGER: 'Pager',\n SCROLL: 'Scroll'\n};\n\nexport const INPUTMODE = {\n FINANCIAL: 'financial',\n NATURAL: 'natural'\n};\n\nexport const AUTOCLOSE_TYPE = {\n OUTSIDECLICK: 'outsideClick',\n ALWAYS: 'always',\n DISABLED: 'disabled'\n}\n\nexport const unsupportedStatePersistenceTypes = ['On-Demand', 'Scroll'];\n\nexport const getWatchIdentifier = (...args) => args.join('_');\n\nconst typesMap = {\n number: ['number', 'integer', 'big_integer', 'short', 'float', 'big_decimal', 'double', 'long', 'byte'],\n string: ['string', 'text'],\n character: ['character'],\n date: ['date', 'time', 'timestamp', 'datetime']\n};\nconst modes = {\n number: ['exact', 'notequals', 'lessthan', 'lessthanequal', 'greaterthan', 'greaterthanequal', 'null', 'isnotnull'],\n string: ['anywhereignorecase', 'anywhere', 'startignorecase', 'start', 'endignorecase', 'end', 'exactignorecase', 'exact', 'notequalsignorecase', 'notequals', 'null', 'isnotnull', 'empty', 'isnotempty', 'nullorempty'],\n character: ['exactignorecase', 'exact', 'notequalsignorecase', 'notequals', 'null', 'isnotnull', 'empty', 'isnotempty', 'nullorempty'],\n date: ['exact', 'lessthan', 'lessthanequal', 'greaterthan', 'greaterthanequal', 'null', 'notequals', 'isnotnull']\n};\nconst matchModeTypesMap = {\n boolean: ['exact', 'null', 'isnotnull'],\n clob: [],\n blob: []\n};\nexport const getMatchModeTypesMap = (multiMode?) => {\n if (multiMode) {\n modes.number.push('in', 'notin', 'between');\n modes.date.push('between');\n modes.string.push('in', 'notin');\n modes.character.push('in', 'notin');\n }\n\n forEach(typesMap, (types, primType) => {\n forEach(types, type => {\n matchModeTypesMap[type] = modes[primType];\n });\n });\n // this is used in filter criteria when the user types the column name manually and where we dont know the type of the column\n matchModeTypesMap['default'] = union(modes['number'], modes['string'], modes['character'], modes['date'], modes['date']);\n return matchModeTypesMap;\n};\n\nexport const getMatchModeMsgs = (appLocale) => {\n return {\n start : appLocale.LABEL_STARTS_WITH,\n startignorecase : appLocale.LABEL_STARTS_WITH_IGNORECASE,\n end : appLocale.LABEL_ENDS_WITH,\n endignorecase : appLocale.LABEL_ENDS_WITH_IGNORECASE,\n anywhere : appLocale.LABEL_CONTAINS,\n anywhereignorecase: appLocale.LABEL_CONTAINS_IGNORECASE,\n exact : appLocale.LABEL_IS_EQUAL_TO,\n exactignorecase : appLocale.LABEL_IS_EQUAL_TO_IGNORECASE,\n notequals : appLocale.LABEL_IS_NOT_EQUAL_TO,\n notequalsignorecase: appLocale.LABEL_IS_NOT_EQUAL_TO_IGNORECASE,\n lessthan : appLocale.LABEL_LESS_THAN,\n lessthanequal : appLocale.LABEL_LESS_THAN_OR_EQUALS_TO,\n greaterthan : appLocale.LABEL_GREATER_THAN,\n greaterthanequal : appLocale.LABEL_GREATER_THAN_OR_EQUALS_TO,\n null : appLocale.LABEL_IS_NULL,\n isnotnull : appLocale.LABEL_IS_NOT_NULL,\n empty : appLocale.LABEL_IS_EMPTY,\n isnotempty : appLocale.LABEL_IS_NOT_EMPTY,\n nullorempty : appLocale.LABEL_IS_NULL_OR_EMPTY,\n in : appLocale.LABEL_IN,\n notin : appLocale.LABEL_NOT_IN,\n between : appLocale.LABEL_BETWEEN\n };\n};\n\n// Returns array of classes that are evaluated true for given object or array\nconst getClassesArray = classVal => {\n let classes = [];\n\n if (isArray(classVal)) {\n classVal.forEach(v => {\n classes = classes.concat(getClassesArray(v));\n });\n return classes;\n }\n if (isObject(classVal)) {\n forEach(classVal, (val, key) => {\n if (val) {\n classes = classes.concat(key.split(' '));\n }\n });\n return classes;\n }\n};\n\nexport const getConditionalClasses = (nv, ov?) => {\n let toAdd;\n let toRemove;\n // if the conditional class property has already toAdd and toRemove arrays then take that otherwise build those arrays\n const classToAdd = nv.toAdd || nv;\n const classToRemove = nv.toRemove || ov;\n if (isObject(nv)) {\n toAdd = isArray(classToAdd) ? classToAdd : getClassesArray(classToAdd || []);\n toRemove = classToRemove ? (isArray(classToRemove) ? classToRemove : getClassesArray(classToRemove)) : [];\n } else {\n toAdd = classToAdd ? [classToAdd] : [];\n toRemove = classToRemove ? [classToRemove] : [];\n }\n return {toAdd, toRemove};\n};\n\n/*helper function for prepareFieldDefs*/\nconst pushFieldDef = (dataObject, columnDefObj, namePrefix, options) => {\n /*loop over the fields in the dataObject to process them*/\n let modifiedTitle,\n relatedTable,\n relatedField,\n relatedInfo,\n fieldName,\n isRelated;\n if (!options) {\n options = {};\n }\n forEach(dataObject, (value, title) => {\n if (includes(title, '.')) {\n relatedInfo = split(title, '.');\n relatedTable = relatedInfo[0];\n relatedField = relatedInfo[1];\n isRelated = true;\n }\n if (options.noModifyTitle) {\n modifiedTitle = title;\n } else {\n if (isString(title)) {\n modifiedTitle = prettifyLabel(title);\n modifiedTitle = deHyphenate(modifiedTitle);\n modifiedTitle = namePrefix ? initCaps(namePrefix) + ' ' + modifiedTitle : modifiedTitle;\n } else {\n modifiedTitle = title;\n }\n }\n title = namePrefix ? namePrefix + '.' + title : title;\n if (isRelated) {\n // For related columns, shorten the title to last two words\n fieldName = split(modifiedTitle, ' ');\n fieldName = fieldName.length > 1 ? fieldName[fieldName.length - 2] + ' ' + fieldName[fieldName.length - 1] : fieldName[0];\n } else {\n fieldName = modifiedTitle;\n }\n const defObj = options.setBindingField ? {'displayName': fieldName, 'field': title, 'relatedTable': relatedTable, 'relatedField': relatedField || modifiedTitle}\n : {'displayName': fieldName, 'relatedTable': relatedTable, 'relatedField': relatedField || modifiedTitle};\n /*if field is a leaf node, push it in the columnDefs*/\n if (!isObject(value) || (isArray(value) && !value[0])) {\n /*if the column counter has reached upperBound return*/\n if (options.upperBound && options.columnCount === options.upperBound) {\n return;\n }\n columnDefObj.terminals.push(defObj);\n /*increment the column counter*/\n options.columnCount += 1;\n } else {\n /*else field is an object, process it recursively*/\n /* if parent node to be included, include it */\n if (options.columnCount !== options.upperBound) {\n columnDefObj.objects.push(defObj);\n }\n\n /* if field is an array node, process its first child */\n if (isArray(value) && value[0]) {\n pushFieldDef(value[0], columnDefObj, title + '[0]', options);\n } else {\n pushFieldDef(value, columnDefObj, title, options);\n }\n }\n });\n};\n\nconst getMetaDataFromData = (data) => {\n let dataObject;\n if (isArray(data)) {\n if (isObject(data[0])) {\n dataObject = getClonedObject(data[0]);\n /*Loop over the object to find out any null values. If any null values are present in the first row, check and assign the values from other row.\n * As column generation is dependent on data, for related fields if first row value is null, columns are not generated.\n * To prevent this, check the data in other rows and generate the columns. New keys from others rows are also added*/\n forEach(data, (row, index) => {\n if ((index + 1) >= 10) { // Limit the data search to first 10 records\n return false;\n }\n assignWith(dataObject, row, (objValue, srcValue) => {\n return (objValue === null || objValue === undefined) ? srcValue : objValue;\n });\n });\n } else {\n dataObject = data[0];\n }\n } else {\n dataObject = data;\n }\n return dataObject;\n};\n\nexport const prepareFieldDefs = (data, options?) => {\n let dataObject;\n const columnDef = {\n 'objects' : [],\n 'terminals' : []\n };\n /*if no data provided, initialize default column definitions*/\n if (!data) {\n data = [];\n }\n if (!options) {\n options = {};\n }\n options.setBindingField = true;\n options.columnCount = 0;\n dataObject = getMetaDataFromData(data);\n /*first of the many data objects from grid data*/\n pushFieldDef(dataObject, columnDef, '', options);\n if (!options || (options && !options.filter)) {\n return columnDef.terminals;\n }\n switch (options.filter) {\n case 'all':\n return columnDef;\n case 'objects':\n return columnDef.objects;\n case 'terminals':\n return columnDef.terminals;\n }\n return columnDef;\n};\n\n\n/**\n * To get container target element to append the list for search and datepicker panel when field present in dialog\n */\nexport const getContainerTargetClass = (element) => {\n return '.wm-app';\n\n // Below code is not working when we have nested dialogs.\n // Nested dialogs case we will have multiple '.modal-content' classes on DOM due to that container positions is not working as expected.\n // Below code to fix the issue ==> WMS-18751\n // As regression we got ==> WMS-19835\n\n // if (element.closest('.modal-dialog')) {\n // return '.modal-content';\n // } else {\n // return 'body';\n // }\n\n}\n\n/**\n * To extract the Variable Name from a Widget's binddatasource attribute\n */\nexport const extractDataSourceName = (bindDataSource) => {\n if (!bindDataSource) {\n return;\n }\n let dataSourceName;\n const parts = bindDataSource.split('.');\n if (parts.length > 1 && parts[0] === 'Variables') {\n dataSourceName = parts[1];\n }\n return dataSourceName;\n}\n\nexport const setFocusTrap = (container, allowOutsideClick, setReturnFocusElement?) => {\n return createFocusTrap(container, {\n onActivate: () => container.classList.add('is-active'),\n onDeactivate: () => container.classList.remove('is-active'),\n allowOutsideClick: allowOutsideClick,\n setReturnFocus: setReturnFocusElement,\n });\n}\n\n/**\n * Gets keyboard focusable elements within a specified element\n * @param element {HTMLElement}\n * @returns {Array}\n */\nexport const getKeyboardFocusableElements = (element: HTMLElement) => {\n const elementNodeList = element.querySelectorAll('a, button, input, textarea, select, details, iframe, embed, object, summary dialog, audio[controls], video[controls], [contenteditable]');\n const elements = Array.from(elementNodeList);\n return elements.filter(el => {\n return (!el.hasAttribute('disabled') && !el.hasAttribute('hidden')\n && (!el.hasAttribute('tabindex') || (el.hasAttribute('tabindex') && !el.getAttribute(\"tabindex\").startsWith('-'))));\n });\n}\n","import { setCSS } from '@wm/core';\n\nimport { getBackGroundImageUrl } from '../../utils/widget-utils';\nimport { StylableComponent } from '../common/base/stylable.component';\n\nexport enum APPLY_STYLES_TYPE {\n CONTAINER,\n SCROLLABLE_CONTAINER,\n INNER_SHELL,\n SHELL\n}\n\nexport const propNameCSSKeyMap = {\n 'backgroundattachment': 'backgroundAttachment',\n 'backgroundcolor': 'backgroundColor',\n 'backgroundgradient': 'backgroundGradient',\n 'backgroundimage': 'backgroundImage',\n 'backgroundposition': 'backgroundPosition',\n 'backgroundrepeat': 'backgroundRepeat',\n 'backgroundsize': 'backgroundSize',\n 'bordercolor': 'borderColor',\n 'borderradius': 'borderRadius',\n 'borderstyle': 'borderStyle',\n 'borderwidth': 'borderWidth',\n 'borderbottomwidth': 'borderBottomWidth',\n 'borderleftwidth': 'borderLeftWidth',\n 'borderrightwidth': 'borderRightWidth',\n 'bordertopwidth': 'borderTopWidth',\n 'color': 'color',\n 'cursor': 'cursor',\n 'display': 'display',\n 'fontsize': 'fontSize',\n 'fontfamily': 'fontFamily',\n 'fontstyle': 'fontStyle',\n 'fontunit': 'fontunit',\n 'fontvariant': 'fontVariant',\n 'fontweight': 'fontWeight',\n 'height': 'height',\n 'horizontalalign': 'textAlign',\n 'lineheight': 'lineHeight',\n 'margin': 'margin',\n 'marginbottom': 'marginBottom',\n 'marginleft': 'marginLeft',\n 'marginright': 'marginRight',\n 'margintop': 'marginTop',\n 'opacity': 'opacity',\n 'overflow': 'overflow',\n 'padding': 'padding',\n 'paddingbottom': 'paddingBottom',\n 'paddingleft': 'paddingLeft',\n 'paddingright': 'paddingRight',\n 'paddingtop': 'paddingTop',\n 'picturesource': 'backgroundImage',\n 'textalign': 'textAlign',\n 'textdecoration': 'textDecoration',\n 'verticalalign': 'verticalAlign',\n 'visibility': 'visibility',\n 'whitespace': 'whiteSpace',\n 'width': 'width',\n 'wordbreak': 'wordbreak',\n 'zindex': 'zIndex'\n};\n\nexport const isStyle = key => !!propNameCSSKeyMap[key];\n\nconst MAP_SHELL_TYPE_IGNORE_LIST = {\n height: true,\n overflow: true,\n padding: true,\n paddingbottom: true,\n paddingleft: true,\n paddingright: true,\n paddingtop: true\n};\n\nconst MAP_CONTAINER_TYPE_IGNORE_LIST = {\n textalign: true\n};\n\nconst MAP_SCROLLABLE_CONTAINER_TYPE_IGNORE_LIST = {\n textalign: true,\n width: true\n};\n\n\nexport function styler($node: HTMLElement, component: StylableComponent, type?: APPLY_STYLES_TYPE, skipList?: Array<string>) {\n // apply init styles;\n const skipListMap = Object.create(null);\n if (skipList) {\n skipList.forEach(k => skipListMap[k] = true);\n }\n\n component.registerStyleChangeListener((key, nv) => {\n\n if (skipListMap[key]) {\n return;\n }\n\n // if the type is `shell` and the key is in the SHELL_TYPE_IGNORE_LIST, return\n if (type === APPLY_STYLES_TYPE.SHELL && MAP_SHELL_TYPE_IGNORE_LIST[key]) {\n return;\n }\n\n // if the type is `inner-shell` and the key is NOT in the SHELL_TYPE_IGNORE_LIST, return\n if (type === APPLY_STYLES_TYPE.INNER_SHELL) {\n if (!MAP_SHELL_TYPE_IGNORE_LIST[key]) {\n return;\n }\n if (key === 'height') {\n setCSS($node, 'overflow', nv ? 'auto' : '');\n }\n }\n\n // if the type is `container` and the key is in the CONTAINER_TYPE_IGNORE_LIST, return\n if (type === APPLY_STYLES_TYPE.CONTAINER && MAP_CONTAINER_TYPE_IGNORE_LIST[key]) {\n return;\n }\n\n if (type === APPLY_STYLES_TYPE.SCROLLABLE_CONTAINER) {\n if (MAP_SCROLLABLE_CONTAINER_TYPE_IGNORE_LIST[key]) {\n return;\n }\n\n if (key === 'height') {\n setCSS($node, 'overflow', nv ? 'auto' : '');\n }\n }\n\n if (key === 'fontsize' || key === 'fontunit') {\n setCSS($node, 'fontSize', component.fontsize === '' ? '' : component.fontsize + (component.fontunit || 'px'));\n } else if (key === 'backgroundimage') {\n setCSS($node, 'backgroundImage', component.picturesource || getBackGroundImageUrl(nv));\n } else if (propNameCSSKeyMap[key]) {\n setCSS($node, propNameCSSKeyMap[key], nv);\n }\n });\n}\n","import { FormWidgetType } from '@wm/core';\n\ndeclare const window;\nconst formFieldPrefix = 'wm-form-field-';\n// map of widgetSubType vs WidgetProps\nconst widgetProps = (() => {\n const props = new Map<string, Map<string, any>>();\n for (const key in FormWidgetType) {\n props.set(formFieldPrefix + FormWidgetType[key], new Map<string, any>());\n }\n return props;\n})();\n\n// returns the widgetPropsMap associated with the given identifier\nexport const getWidgetPropsByType = (identifier: string): Map<string, any> => widgetProps.get(identifier);\n\n// register the widgetProps with the given identifier\nexport const register = (identifier: string, props: Map<string, any>) => {\n widgetProps.set(identifier, props);\n window.WM_LOADED_COMPONENTS = [...window.WM_LOADED_COMPONENTS || [], identifier ];\n};\n\nexport const registerFormWidget = (identifier: string, props: Map<string, any>) => {\n const widgetName = formFieldPrefix + identifier;\n const existingProps = widgetProps.get(widgetName);\n if (existingProps) {\n props.forEach((v: any, k) => existingProps.set(k, v));\n }\n};\n\nexport enum PROP_TYPE {\n BOOLEAN = 1,\n NUMBER,\n STRING\n}\n\nexport const PROP_STRING: any = {type: PROP_TYPE.STRING};\nexport const PROP_NUMBER: any = {type: PROP_TYPE.NUMBER};\nexport const PROP_BOOLEAN: any = {type: PROP_TYPE.BOOLEAN};\nexport const PROP_ANY: any = {arrayType: true};\n","import { PROP_ANY, PROP_BOOLEAN, PROP_STRING, register } from '../../framework/widget-props';\n\nexport const registerProps = () => {\n register(\n 'wm-container',\n new Map(\n [\n ['animation', PROP_STRING],\n ['class', PROP_STRING],\n ['conditionalclass', PROP_ANY],\n ['conditionalstyle', PROP_ANY],\n ['content', PROP_STRING],\n ['name', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}]\n ]\n )\n );\n};\n","import { isDefined } from '@wm/core';\n\n/**\n * Widget Registry\n */\nconst registryById = new Map<string, any>();\n\n/**\n * returns the widget by the given widgetId\n */\nexport const getById = (widgetId: string) => registryById.get(widgetId);\n\n\n/**\n * Registers the Widget with the given id and name\n * Makes the Widget available with the viewParent\n * returns unRegister method\n */\nexport const register = (widget: any, viewParent: any, widgetId: string, name?: string): () => void => {\n let registered = false;\n registryById.set(widgetId, widget);\n if (name) {\n if (isDefined(viewParent.Widgets)) {\n registered = true;\n viewParent.Widgets[name] = widget;\n }\n }\n\n // Unregister method.\n return () => {\n registryById.delete(widgetId);\n if (registered) {\n viewParent.Widgets[name] = undefined;\n }\n };\n};\n\n/**\n * Deregisters the oldname in widgets registry and sets new name\n */\nexport const renameWidget = (viewParent: any, widget: any, nv: string, ov?: string) => {\n if (!isDefined(viewParent.Widgets)) {\n return;\n }\n if (ov) {\n viewParent.Widgets[ov] = undefined;\n }\n if (nv) {\n viewParent.Widgets[nv] = widget;\n }\n};\n","import { IDGenerator } from '@wm/core';\n\nexport const widgetIdGenerator = new IDGenerator('widget-id');\n","\nexport const EVENTS_MAP = new Map<string, string>([\n // ['enterkeypress', 'keypress.enter']\n ['tap', 'click']\n]);\n\n\n// TODO: Implement touch events for the mobile\n\nexport const DISPLAY_TYPE = {\n BLOCK: 'block',\n INLINE_BLOCK: 'inline-block',\n INLINE: 'inline'\n};\n\n// set of boolean attrs\nconst BOOLEAN_ATTRS = new Set([\n 'readonly', 'autofocus', 'disabled', 'startchecked', 'multiple',\n 'selected', 'required', 'controls', 'autoplay', 'loop', 'muted', 'show'\n]);\n\n/**\n * Returns true if the provided key is a boolean attribute\n * @param {string} key\n * @returns {boolean}\n */\nexport const isBooleanAttr = (key: string): boolean => BOOLEAN_ATTRS.has(key);\n\nconst DIMENSION_PROPS = new Set([\n 'width',\n 'height',\n 'iconheight',\n 'iconwidth',\n 'popoverwidth',\n 'popoverheight',\n 'imagewidth',\n 'imageheight'\n]);\n\nexport const isDimensionProp = (key: string): boolean => DIMENSION_PROPS.has(key);\n\nexport const DEBOUNCE_TIMES = {\n PAGINATION_DEBOUNCE_TIME : 250\n};\n","import { $appDigest, $unwatch, isChangeFromWatch, isObject, resetChangeFromWatch, toBoolean, toDimension } from '@wm/core';\n\nimport { BaseComponent } from '../common/base/base.component';\nimport { getWidgetPropsByType, PROP_TYPE } from './widget-props';\nimport { isStyle } from './styler';\nimport { getConditionalClasses, getWatchIdentifier } from '../../utils/widget-utils';\nimport { isBooleanAttr, isDimensionProp } from './constants';\nimport {startsWith} from \"lodash-es\";\n\n/**\n * Returns the parsed value based on the provided type\n * if the type is PROP_TYPE.NUMBER returns a number/NaN\n * if the type is PROP_BOOLEAN returns true/false\n * else returns the same value without any type conversion\n *\n * @param {string} key\n * @param value\n * @param {PROP_TYPE} type\n * @returns {any}\n */\nconst parseValue = (key: string, value: any, type: PROP_TYPE): any => {\n if (type === PROP_TYPE.BOOLEAN) {\n return toBoolean(value, isBooleanAttr(key) && key);\n }\n\n if (type === PROP_TYPE.NUMBER) {\n return +value;\n }\n\n return value;\n};\n\n\n/**\n * Whenever a property on a component changes through a proxy this method will be triggered\n * If the new value is not from a watch, the existing watch on that particular property will be removed\n * This method invokes the defaultPropertyChange handler where the common widget properties like name, class are handled\n * Notifies the component about the style/property change\n */\nexport const globalPropertyChangeHandler = (component: BaseComponent, key: string, nv: any) => {\n const widgetId = component.widgetId;\n const ov = component[key];\n\n // if the change is not from the bound watch, remove the existing watch\n if (!isChangeFromWatch()) {\n $unwatch(getWatchIdentifier(widgetId, key));\n }\n\n resetChangeFromWatch();\n\n const widgetProps = getWidgetPropsByType(component.getWidgetSubType());\n const propInfo = widgetProps.get(key);\n if (propInfo) {\n const type = propInfo.type;\n if (type) {\n nv = parseValue(key, nv, type);\n }\n }\n\n // Set the value in the component and trigger appDigest when there is a change in the value\n if (nv !== ov || isObject(nv) || isObject(ov)) {\n\n if (isDimensionProp(key)) {\n nv = toDimension(nv);\n } else if (startsWith(nv, 'resources/')) {\n const ref: any = component;\n if (ref._parentPrefab_ === undefined) {\n ref._parentPrefab_ = component.$element.parent().closest('[prefabname][prefabname!=\"__self__\"]').attr('prefabname') || '';\n }\n if (ref._parentPrefab_) {\n nv = `./app/prefabs/${ref._parentPrefab_}/${nv}`;\n } else if(propInfo && nv != propInfo.value) {\n nv = './' + nv;\n }\n }\n\n component[key] = nv;\n\n if (isStyle(key)) {\n component.notifyStyleChange(key, nv, ov);\n } else {\n\n if (key === 'conditionalclass') {\n nv = getConditionalClasses(nv, ov);\n }\n\n if (propInfo) {\n component.notifyPropertyChange(key, nv, ov);\n }\n }\n\n $appDigest();\n }\n};\n","/**\n * Proxy Provider - Creates a JS proxy for the given object\n */\nimport { propNameCSSKeyMap } from './styler';\nimport { globalPropertyChangeHandler } from './property-change-handler';\nimport { BaseComponent } from '../common/base/base.component';\nimport {isFunction, startsWith} from \"lodash-es\";\n\n/**\n * proxy handler for the components\n */\nexport const proxyHandler = {\n set: (target: BaseComponent, key: string, value: any): boolean => {\n globalPropertyChangeHandler(target, key, value);\n return true;\n },\n get: (target: BaseComponent, key: string): any => {\n const v = target[key];\n if (isFunction(v)) { // bind the proper context for the methods\n return v.bind(target);\n }\n return v;\n }\n};\n\nconst $RAF = window.requestAnimationFrame;\nconst $RAFQueue = [];\n\nconst invokeLater = fn => {\n if (!$RAFQueue.length) {\n $RAF(() => {\n $RAFQueue.forEach(f => f());\n $RAFQueue.length = 0;\n });\n }\n $RAFQueue.push(fn);\n};\n\nexport class WidgetProxyProvider {\n public static create(instance: BaseComponent, widgetSubType: string, propsByWidgetSubType: Map<string, any>) {\n // If the native Proxy is supported\n if ((window as any).Proxy) {\n return new Proxy(instance, proxyHandler);\n } else {\n\n // If the native Proxy is not supported, IE11\n const widget = Object.create(instance);\n\n // bind proper context for the methods\n invokeLater(() => {\n for (const key in instance) {\n if (isFunction(instance[key]) && key !== 'constructor' && key !== 'super' && !startsWith(key, 'ng')) {\n instance[key] = instance[key].bind(instance);\n }\n }\n });\n\n // define setters and getters for styles\n Object.keys(propNameCSSKeyMap)\n .forEach(key => {\n Object.defineProperty(widget, key, {\n get: () => instance[key],\n set: nv => globalPropertyChangeHandler(instance, key, nv)\n });\n });\n\n // define the setters and getters for Props\n if (propsByWidgetSubType) {\n propsByWidgetSubType\n .forEach((value, key) => {\n Object.defineProperty(widget, key, {\n get: () => instance[key],\n set: nv => globalPropertyChangeHandler(instance, key, nv)\n });\n });\n }\n\n return widget;\n }\n }\n}\n","import {\n AfterContentInit,\n AfterViewInit,\n ElementRef,\n Inject,\n inject,\n Injectable,\n Injector,\n OnDestroy,\n OnInit,\n Optional,\n ViewContainerRef\n} from '@angular/core';\nimport {EventManager} from '@angular/platform-browser';\n\nimport {ReplaySubject, Subject} from 'rxjs';\n\nimport {\n $invokeWatchers,\n $parseEvent,\n $unwatch,\n $watch,\n addClass,\n App,\n findParent,\n isDefined,\n isMobileApp,\n removeAttr,\n removeClass,\n setAttr,\n setCSS,\n setCSSFromObj,\n switchClass\n} from '@wm/core';\n\nimport {getWidgetPropsByType} from '../../framework/widget-props';\nimport {isStyle} from '../../framework/styler';\nimport {register, renameWidget} from '../../framework/widget-registry';\nimport {ChangeListener, Context, IWidgetConfig, WidgetConfig} from '../../framework/types';\nimport {widgetIdGenerator} from '../../framework/widget-id-generator';\nimport {DISPLAY_TYPE, EVENTS_MAP} from '../../framework/constants';\nimport {WidgetProxyProvider} from '../../framework/widget-proxy-provider';\nimport {getWatchIdentifier} from '../../../utils/widget-utils';\nimport {camelCase, extend, forEach, isArray, isObject, join, map} from \"lodash-es\";\n\ndeclare const $;\n\n// Gets list of classes to add and remove and applies on the $el\nconst updateClasses = (toAdd, toRemove, el) => {\n if (toRemove && toRemove.length) {\n removeClass(el, join(toRemove, ' '));\n }\n if (toAdd && toAdd.length) {\n addClass(el, join(toAdd, ' '));\n }\n};\n\n// To add and remove styles on the $el\nconst updateStyles = (nv, ov, el) => {\n if (ov && isObject(ov)) {\n const keys = Object.keys(ov || {});\n keys.forEach(function(key) {\n setCSS(el, key, '');\n });\n }\n if (nv && isObject(nv)) {\n setCSSFromObj(el, nv);\n }\n\n};\n\ninterface Child {\n widget: any,\n nativeElement: any\n}\n\n@Injectable()\nexport abstract class BaseComponent implements OnDestroy, OnInit, AfterViewInit, AfterContentInit {\n\n /**\n * unique identifier for the widget\n */\n public readonly widgetId: any;\n\n public isDestroyed: boolean;\n\n public isAttached = false;\n\n /**\n * jQuery nativeElement reference of the component root\n */\n public get $element() {\n return $(this.nativeElement);\n }\n\n /**\n * DOM node reference of the component root\n */\n public readonly nativeElement: HTMLElement;\n\n /**\n * Type of the component\n */\n protected readonly widgetType: string;\n\n /**\n * Most of the cases it is same as widgetType\n * for specific widgets like charts widgetType can be wm-chart where as the subtype can be wm-bar-chart\n */\n protected readonly widgetSubType: string;\n\n /**\n * Proxy for the component instance.\n */\n protected widget: any;\n\n /**\n * View parent component\n * eg, Page, Partial, Prefab\n */\n protected readonly viewParent: any;\n\n /**\n * EventManger to add/remove events\n */\n protected readonly eventManager: EventManager;\n\n /**\n * App Locale\n */\n public readonly appLocale: any;\n\n /**\n * Style change subject and observable\n */\n private readonly styleChange = new ReplaySubject();\n\n /**\n * Property change subject and observable\n */\n private readonly propertyChange = new Subject();\n\n /**\n * On Ready State change subject and observable\n */\n private readonly readyState = new Subject();\n\n /**\n * Component destroy subject and observable\n */\n private readonly destroy = new Subject();\n\n /**\n * Map of event handler callbacks\n */\n private eventHandlers = new Map<string, {callback: Function, locals: any}>();\n\n /**\n * context of the widget\n * when the widget is preset inside a repeater this context will have the repeater related properties\n */\n public context: any;\n\n /**\n * Initial state of the widget.\n * Will be undefined once the initial properties are set on to the component\n */\n private initState: Map<string, any>;\n\n /**\n * Internal flag to determine whether to wait for the widget initialization or not\n * If the initPromise is provided in the construction wait till the promise is resolved\n * If the initPromise is not provided proceed with the initialization, which is the default behavior.\n */\n private readonly delayedInit: boolean;\n\n /**\n * Display type of the component. eg, block(Default), inline-block, inline etc\n */\n private readonly displayType: string;\n\n /**\n * Holds the event registration functions.\n * these functions needs to be executed after onViewInit\n */\n private toBeSetupEventsQueue: Array<Function> = [];\n\n public __cloneable__ = false;\n\n public widgetProps: Map<string, any>;\n\n private $attrs = new Map<string, string>();\n\n private isMuted = false;\n\n public viewContainerRef: ViewContainerRef;\n public viewParentApp: App;\n /**\n * To avoid re-rendering of widget, passing unique id as contextKey to createCustomInjector\n * (for List, Dynamic Tabs, Accordion, Nav, Carousel)\n */\n public trackId: string;\n\n protected constructor(\n protected inj: Injector,\n @Inject(WidgetConfig) config: IWidgetConfig,\n @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext?: any,\n initPromise?: Promise<any> // Promise on which the initialization has to wait\n ) {\n const elementRef = inj.get(ElementRef);\n this.nativeElement = elementRef.nativeElement;\n //making the code compatible in both the JIT and AOT modes\n this.viewParentApp = inj ? inj.get(App) : inject(App);\n this.widgetType = config.widgetType;\n this.widgetSubType = config.widgetSubType || config.widgetType;\n this.viewContainerRef = inj.get(ViewContainerRef);\n // this.viewParent = (inj as any).view.component;\n // this.viewParent = (this.viewContainerRef as any).parentInjector._lView[8];\n // this.viewParent = _viewParent || (this.viewContainerRef as any).parentInjector._lView[8];\n // https://github.com/angular/angular/blob/main/packages/core/src/render3/interfaces/view.ts\n\n let lView = (this.inj as any)._lView;\n this.viewParent = findParent(lView, this.viewParentApp);\n //console.log(\"---*************--context--*************---\", lView[8]);\n this.context = (this.inj as any)._lView[8];\n\n this.displayType = config.displayType || DISPLAY_TYPE.BLOCK;\n // this.context = (inj as any).view.context;\n // this.context = (this.viewContainerRef as any)._hostLView.debug.context;\n // let hasImplicitContext = (this.viewContainerRef as any)._hostLView.find(t => t && !!t.$implicit);\n // when $implicit is not available, this object contains some ngFor context or listitem context of the widget then\n // we use the direct parent for example: nav component is the parent for anchor => anchor gets viewParent as Nav\n // In other case, where we have implicitContext there we can make use of page/app level context hence viewParent.viewParent to get page level context\n /*if (hasImplicitContext && this.viewParent.viewParent) {\n if (this.viewParent.widgetType !== 'wm-card' && this.viewParent.widgetType !== 'wm-iframedialog'\n && this.viewParent.widgetType !== 'wm-partialdialog') {\n this.viewParent = this.viewParent.viewParent;\n }\n }\n if (!hasImplicitContext || (!this.viewParent.widgetType)) {\n this.context = (this.viewContainerRef as any)._hostLView.find(t => t && !!t.$implicit);\n } else {\n this.context = (this.viewContainerRef as any).parentInjector._lView[8];\n }*/\n\n /*if(_viewParent && !hasImplicitContext) {\n this.context = (this.viewContainerRef as any)._hostLView[8];\n } else {\n this.context = hasImplicitContext;\n }*/\n // if (['wm-list', 'wm-nav'].includes(this.viewParent.widgetType) || ['wm-carousel-template', 'wm-card'].includes(this.widgetType)) {\n // this.context = (this.viewContainerRef as any)._hostLView.debug.context;\n // } else {\n // this.context = (this.viewContainerRef as any).parentInjector._lView[8];\n // }\n this.widget = this.createProxy();\n this.eventManager = inj.get(EventManager);\n (this.nativeElement as any).widget = this.widget;\n\n this.appLocale = inj.get(App).appLocale || {};\n\n this.initContext();\n\n if (config.hostClass) {\n addClass(this.nativeElement, config.hostClass);\n }\n\n this.widgetId = this.generateWidgetId();\n this.trackId = this.generateWidgetId();\n setAttr(this.nativeElement, 'widget-id', this.widgetId, true);\n\n // register default property change handler and style change handler\n this.registerStyleChangeListener(this.onStyleChange, this);\n this.registerPropertyChangeListener(this.onPropertyChange, this);\n\n // if the initPromise is provided, wait till the promise is resolved to proceed with the widget initialization\n if (!initPromise) {\n this.initWidget();\n } else {\n this.delayedInit = true;\n initPromise.then((resolveFn) => {\n this.initWidget();\n this.setInitProps();\n resolveFn && resolveFn()\n });\n }\n if(explicitContext) {\n extend(this.context, explicitContext);\n }\n }\n\n public getNativeElement(): HTMLElement {\n return this.nativeElement;\n }\n\n public getWidgetType(): string {\n return this.widgetType;\n }\n\n public getWidgetSubType(): string {\n return this.widgetSubType;\n }\n\n public getWidget(): any {\n return this.widget;\n }\n\n public setProperty(propName, propValue) {\n this.widget[propName] = propValue;\n }\n\n public getViewParent(): any {\n return this.viewParent;\n }\n\n public notifyStyleChange(key: string, nv: any, ov: any) {\n this.styleChange.next({key, nv, ov});\n }\n\n public notifyPropertyChange(key: string, nv: any, ov: any) {\n this.propertyChange.next({key, nv, ov});\n }\n\n public registerStyleChangeListener(fn: ChangeListener, ctx?: any) {\n if (ctx) {\n fn = fn.bind(ctx);\n }\n this.styleChange.subscribe(({key, nv, ov}) => fn(key, nv, ov));\n }\n\n public registerReadyStateListener(fn: Function, ctx?: any) {\n if (ctx) {\n fn = fn.bind(ctx);\n }\n if (this.readyState.isStopped) {\n fn();\n return;\n }\n this.readyState.subscribe(() => fn());\n }\n\n public registerPropertyChangeListener(fn: ChangeListener, ctx?: any) {\n if (ctx) {\n fn = fn.bind(ctx);\n }\n this.propertyChange.subscribe(({key, nv, ov}) => fn(key, nv, ov));\n }\n\n public registerDestroyListener(fn: Function, ctx?: any) {\n if (ctx) {\n fn = fn.bind(ctx);\n }\n this.destroy.subscribe(() => {}, () => {}, () => fn());\n }\n\n public getDisplayType(): string {\n return this.displayType;\n }\n\n protected createProxy(): any {\n return WidgetProxyProvider.create(this, this.widgetSubType, getWidgetPropsByType(this.widgetSubType));\n }\n\n protected initContext() {\n // const context = (this.inj as any).view.context;\n const context = this.context || {};\n\n const parentContexts = this.inj.get(Context, {});\n\n // assign the context property accordingly\n if (this.viewParent !== context) {\n this.context = context;\n } else {\n this.context = {};\n }\n\n if (parentContexts) {\n let parentContextObj = {};\n if (isArray(parentContexts)) {\n forEach(parentContexts, (contextObj) => {\n Object.assign(parentContextObj, contextObj);\n });\n } else {\n parentContextObj = parentContexts;\n }\n this.context = Object.assign({}, parentContextObj, this.context);\n }\n }\n\n /**\n * set the value on the proxy object ie, widget\n * setting the property on the proxy will invoke the change listeners\n * @param {string} key\n * @param value\n */\n public setWidgetProperty(key: string, value: any) {\n this.widget[key] = value;\n }\n\n public getAttr(attrName: string): string {\n return this.$attrs.get(attrName);\n }\n\n /**\n * returns app instance\n * @returns {App}\n */\n public getAppInstance() {\n return this.inj.get(App);\n }\n\n /**\n * Generates a unique id\n * Default pattern is `widget-id-${id}`\n * Components can override this method to generate a different id eg, bar-chart-1\n */\n protected generateWidgetId(): string {\n return widgetIdGenerator.nextUid();\n }\n\n /**\n * Handles the common functionality across the components\n * eg,\n * 1. value of the class property will be applied on the host element\n * 2. based on the value of show property component is shown/hidden\n *\n * @param {string} key\n * @param nv\n * @param ov\n */\n protected onPropertyChange(key: string, nv: any, ov?: any) {\n if (key === 'show') {\n this.nativeElement.hidden = !nv;\n } else if (key === 'hint') {\n if (!isMobileApp()) {\n setAttr(this.nativeElement, 'title', nv);\n }\n } else if (key === 'class') {\n switchClass(this.nativeElement, nv, ov);\n let result = nv.match(/(\\W|^)(h([0-6]))(?=\\s|$)/);\n if (result) {\n setAttr(this.nativeElement, 'role', 'heading');\n setAttr(this.nativeElement, 'aria-level', result[3]);\n }\n } else if (key === 'name' || key === 'tabindex') {\n setAttr(this.nativeElement, key, nv);\n if (key === 'name' && nv) {\n renameWidget(this.viewParent, this.widget, nv, ov);\n }\n } else if (key === 'conditionalclass') {\n // update classes if old and nv value are different\n updateClasses(nv.toAdd, nv.toRemove, this.nativeElement);\n } else if (key === 'autoplay') {\n const tagName = this.widgetType === 'wm-audio' ? 'audio' : 'video';\n // Trigger media(audio/video) element load method after changing autoplay property\n this.nativeElement.querySelector(tagName).load();\n } else if (key === 'conditionalstyle') {\n // update styles if old and nv value are different\n updateStyles(nv, ov, this.nativeElement);\n } else if (key === 'animation') {\n // update styles if old and nv value are different\n addClass(this.nativeElement, \"animated \" + nv);\n } else if (key === 'disabled') {\n // WMS-19321: In IE, widget is in disabled state when disabled=\"false\" attribute is present\n (nv === true) ? setAttr(this.nativeElement, 'disabled', 'true', true) : removeAttr(this.nativeElement, 'disabled', true);\n }\n }\n\n /**\n * Default style change handler\n */\n protected onStyleChange(k: string, nv: any, ov?: any) {}\n\n /**\n * Register the widget with the widgetRegistry\n */\n protected registerWidget(widgetName: string) {\n this.registerDestroyListener(register(this.widget, this.viewParent, this.widgetId, widgetName));\n }\n\n /**\n * override the\n */\n protected getMappedEventName(eventName) {\n return EVENTS_MAP.get(eventName) || eventName;\n }\n\n /**\n * invoke the event handler\n * Components can override this method to execute custom logic before invoking the user callback\n */\n protected handleEvent(node: HTMLElement, eventName: string, eventCallback: Function, locals: any, meta?: string) {\n this.eventManager.addEventListener(\n node,\n eventName,\n e => {\n locals.$event = e;\n if (meta === 'delayed') {\n setTimeout(() => eventCallback(), 150);\n } else {\n return eventCallback();\n }\n }\n );\n }\n\n /**\n * parse the event expression and save reference to the function inside eventHandlers map\n * If the component provides a override for an event through @Event decorator invoke that\n * else invoke the resolved function\n *\n * @param {string} eventName\n * @param {string} expr\n */\n protected processEventAttr(eventName: string, expr: string, meta?: string, child?: Child) {\n const fn = $parseEvent(expr);\n const locals = this.context;\n locals.widget = child ? child.widget : this.widget;\n const boundFn = fn.bind(undefined, child ? this.viewParent.viewParent : this.viewParent, locals);\n\n let widget = child ? child.widget : this,\n nativeElement = child ? child.nativeElement : this.nativeElement;\n\n const eventCallback = () => {\n let boundFnVal;\n $invokeWatchers(true);\n try {\n locals.$event = locals.$event || new window.CustomEvent(eventName);\n // If the event is bound directly to the variable then we need to internally handle\n // the promise returned by the variable call.\n boundFnVal = boundFn();\n if (boundFnVal instanceof Promise) {\n boundFnVal.then( response => response, err => err);\n } else {\n return boundFnVal;\n }\n } catch (e) {\n console.error(e);\n }\n };\n if(child && !child.widget.eventHandlers)\n child.widget.eventHandlers = new Map<string, {callback: Function, locals: any}>()\n\n widget.eventHandlers.set(this.getMappedEventName(eventName), {callback: eventCallback, locals});\n // prepend eventName with on and convert it to camelcase.\n // eg, \"click\" ---> onClick\n const onEventName = camelCase(`on-${eventName}`);\n // save the eventCallback in widgetScope.\n\n widget[onEventName] = eventCallback;\n\n // events needs to be setup after viewInit\n this.toBeSetupEventsQueue.push(() => {\n this.handleEvent(nativeElement, this.getMappedEventName(eventName), eventCallback, locals, meta);\n });\n }\n\n /**\n * Process the bound property\n * Register a watch on the bound expression\n */\n protected processBindAttr(propName: string, expr: string, child ?: any) {\n if(!child)\n this.initState.delete(propName);\n let viewParent = child ? child.widget.viewParent.viewParent : this.viewParent,\n context = child ? child.widget.context : this.context,\n widget = child ? child.widget : this.widget,\n isMuted = child ? child.widget.isMuted : this.isMuted,\n widgetProps = child ? child.widget.widgetProps : this.widgetProps,\n widgetId = child ? child.widget.widgetId : this.widgetId;\n this.registerDestroyListener(\n $watch(\n expr,\n viewParent,\n context,\n nv => {\n if(propName.startsWith('base-'))\n widget.updateData(propName, nv);\n widget[propName] = nv\n },\n getWatchIdentifier(widgetId, propName),\n propName === 'datasource',\n widgetProps.get(propName),\n () => isMuted\n )\n );\n }\n\n /**\n * Remove watch on the bound property\n */\n protected removePropertyBinding(propName: string) {\n $unwatch(getWatchIdentifier(this.widgetId, propName));\n }\n\n /**\n * invoke the event callback method\n * @param {string} eventName\n * @param extraLocals\n */\n public invokeEventCallback(eventName: string, extraLocals?: any) {\n const callbackInfo = this.eventHandlers.get(eventName);\n if (callbackInfo) {\n const fn = callbackInfo.callback;\n const locals = callbackInfo.locals || {};\n\n if (fn) {\n return fn(Object.assign(locals, extraLocals));\n }\n }\n }\n /**\n * Process the attribute\n * If the attribute is an event expression, generate a functional representation of the expression\n * and keep in eventHandlers\n * If the attribute is a bound expression, register a watch on the expression\n */\n protected processAttr(attrName: string, attrValue: string, child?: Child) {\n // console.log(\"====attrName=====\", attrName, \"=====typeof attrname=====\", typeof attrName, \"-----attrValue----\", attrValue);\n const {0: propName, 1: type, 2: meta, length} = attrName.split('.');\n if (type === 'bind') {\n // if the show property is bound, set the initial value to false\n if (propName === 'show') {\n this.nativeElement.hidden = true;\n }\n this.processBindAttr(propName, attrValue, child);\n } else if (type === 'event' && !this.nativeElement.hasAttribute('customwidgetcontainer')) {\n this.processEventAttr(propName, attrValue, meta, child);\n } else if (length === 1) {\n // remove class and name attributes. Component will set them on the proper node\n if (attrName === 'class') {\n removeClass(this.nativeElement, attrValue);\n } else if (attrName === 'tabindex' || attrName === 'name') {\n removeAttr(this.nativeElement, attrName);\n }\n\n this.initState.set(propName, attrValue);\n } else {\n // custom attributes provided on elDef;\n }\n }\n\n /**\n * This is required as the native element attributes are case insensitive(camelcase) like customExpressions becomes customexpression\n * and our logic to check like these changes will fail. Before IVY changes, angular maintains a separate object with these attributes\n * as it is like in the camelcase. With IVY all those are gone. So need to maintain a separate list with the camelcasing of attributes\n * @private\n * _tNode.attrs attributes are stored in array(even index: key, odd index: value)\n */\n protected getAttributes() {\n let _tNodeAttrs = (this.inj as any)._tNode.attrs, actualAttrs = Array.from(this.nativeElement.attributes).map(attr => attr.name);\n if(_tNodeAttrs === null) {\n return actualAttrs.sort();\n }\n forEach(_tNodeAttrs, (attr, i: any) => {\n if (typeof attr === 'number') {\n return false;\n }\n if(typeof attr === 'string' && i % 2 == 0) {\n let lowerCaseAttr = attr.toLowerCase();\n if (actualAttrs.includes(lowerCaseAttr)) {\n let index = actualAttrs.indexOf(lowerCaseAttr)\n actualAttrs[index] = attr;\n }\n }\n });\n\n /*\n Sorting attributes as properties like placeholder is not working when it is bound.\n placeholder and placeholder.bind two properties are coming in Array.\n When array is not sorted, initially placeholder.bind value is set then placeholder default value is updated.\n If array is sorted, placeholder.bind value will be set finally.\n This is caused because of the way we are storing attribute names in watcher registry map\n */\n return actualAttrs.sort();\n }\n\n /**\n * Process the attributes\n */\n private processAttrs() {\n map(this.getAttributes(), (attrName: string) => {\n let attrValue = this.nativeElement.attributes[attrName].value\n this.$attrs.set(attrName, attrValue);\n this.processAttr(attrName, attrValue);\n });\n }\n\n /**\n * Update the initState with the default property values and the values provided in the markup\n * Process the attributes\n * Register the widget\n */\n protected initWidget() {\n this.initState = new Map<string, any>();\n\n // get the widget properties\n const widgetProps: Map<string, any> = getWidgetPropsByType(this.widgetSubType);\n widgetProps.forEach((v, k) => {\n if (isDefined(v.value)) {\n this.initState.set(k, v.value);\n }\n });\n\n this.widgetProps = widgetProps;\n\n this.processAttrs();\n\n this.registerWidget(this.initState.get('name'));\n }\n\n /**\n * Update the default properties and the properties provided in the markup in component\n * Invoking this method will result in invocation of propertyChange handlers on the component for the first time\n */\n protected setInitProps() {\n if (this.initState.get('name')) {\n this.widget.name = this.initState.get('name');\n }\n this.initState.forEach((v, k) => {\n // name is already set, ignore name\n // if the key is part of to be ignored attributes list do not set it on the component instance\n if ((this.widgetProps.get(k) || isStyle(k)) && k !== 'name') {\n this.widget[k] = v;\n }\n });\n this.initState.clear();\n this.initState = undefined;\n\n this.readyState.next(null);\n this.readyState.complete();\n }\n\n /**\n * Returns true, if a listener registered for the given event on this widget markup.\n * @param eventName\n * @returns {boolean}\n */\n protected hasEventCallback(eventName): boolean {\n return this.eventHandlers.has(eventName);\n }\n\n /**\n * Sets the focus on the widget\n */\n protected focus(): void {\n /**\n * Check for the nodes having focus-target attribute inside the element\n * If found, focus the first node (eg, date widget)\n * else, focus the element (eg, text widget)\n */\n let $target = this.$element[0].querySelector('[focus-target]');\n if (!$target) {\n $target = this.$element[0];\n }\n $target.focus();\n }\n\n // Defining the execute method on BaseComponent. If dataset is binded to widgets ouptut then datasource.execute will be defined\n protected execute(operation, options): any {\n\n }\n\n public mute() {\n this.isMuted = true;\n }\n\n public unmute() {\n this.isMuted = false;\n }\n\n private customInjectorMap: any = {};\n\n /**\n * After the Angular 17 upgrade, Angular is no longer sending ngTemplateContext to components in ng-template.\n * Wavemaker widgets inside ng-template require context to evaluate bind expressions.\n * So we're creating an injectionToken that returns the context as a value.\n * We are passing the injectionToken to the ngTemplateOutletInjector.\n * This injects the context into each widget in the ng-template.\n * In the widget component constructor we are getting the injectionToken using dependency injection.\n * If injectionToken is present, we extend the component context with the value of injectionToken.\n * @param contextKey\n * @param context\n * @returns injector\n */\n createCustomInjector(contextKey: string, context: any) {\n if(this.customInjectorMap[contextKey]) {\n return this.customInjectorMap[contextKey].injector;\n }\n const injector = Injector.create({\n providers: [{ provide: 'EXPLICIT_CONTEXT', useFactory: () => context }]\n });\n this.customInjectorMap[contextKey] = { context, injector };\n return injector;\n }\n\n /**\n * After the host page is attached from cache, this function is called.\n */\n public ngOnAttach() {\n this.isAttached = true;\n }\n\n /**\n * Before the host page is detached from dom and stored in cache, this function is called.\n */\n public ngOnDetach() {\n this.isAttached = false;\n }\n\n /**\n * nativeElement will be available by this time\n * if the delayInit is false, properties meta will be available by this time\n * Invoke the setInitProps if the delayInit is false\n */\n ngOnInit() {\n if (!this.delayedInit) {\n this.setInitProps();\n }\n }\n\n /**\n * Register the events\n */\n ngAfterViewInit() {\n if (this.toBeSetupEventsQueue.length) {\n for (const fn of this.toBeSetupEventsQueue) {\n fn();\n }\n }\n this.toBeSetupEventsQueue.length = 0;\n this.isAttached = true;\n }\n\n ngAfterContentInit() {}\n\n ngOnDestroy() {\n this.isDestroyed = true;\n this.widget = Object.create(null);\n this.styleChange.complete();\n this.propertyChange.complete();\n this.destroy.complete();\n this.isAttached = false;\n }\n}\n","import { BaseComponent } from './base.component';\nimport { Injectable } from '@angular/core';\n\n@Injectable()\nexport abstract class StylableComponent extends BaseComponent {\n backgroundattachment: string;\n backgroundcolor: string;\n backgroundgradient: string;\n backgroundimage: string;\n backgroundposition: string;\n backgroundrepeat: string;\n backgroundsize: string;\n bordercolor: string;\n borderradius: string;\n borderstyle: string;\n borderwidth: string;\n borderbottomwidth: string;\n borderleftwidth: string;\n borderrightwidth: string;\n bordertopwidth: string;\n color: string;\n cursor: string;\n display: string;\n fontsize: string;\n fontfamily: string;\n fontstyle: string;\n fontunit: string;\n fontvariant: string;\n fontweight: string;\n height: string;\n horizontalalign: string;\n lineheight: string;\n margin: string;\n marginbottom: string;\n marginleft: string;\n marginright: string;\n margintop: string;\n opacity: string;\n overflow: string;\n padding: string;\n paddingbottom: string;\n paddingleft: string;\n paddingright: string;\n paddingtop: string;\n picturesource: string;\n textalign: string;\n textdecoration: string;\n verticalalign: string;\n visibility: string;\n whitespace: string;\n width: string;\n wordbreak: string;\n zindex: string;\n}\n","import { Directive, Inject, Self } from '@angular/core';\n\nimport { IRedrawableComponent, WidgetRef } from '../../framework/types';\n\n@Directive({\n selector: '[redrawable]'\n})\nexport class RedrawableDirective implements IRedrawableComponent {\n redraw: Function;\n constructor(@Self() @Inject(WidgetRef) widget) {\n this.redraw = () => {\n const tabEl = widget.$element.closest(\"[wmtabpane]\");\n const accordionEl = widget.$element.closest('[wmaccordionpane]').find('.panel-heading');\n if ((tabEl.length && !tabEl.hasClass('active')) || (accordionEl.length && !accordionEl.hasClass('active'))) {\n return;\n }\n return widget.redraw && widget.redraw();\n }\n }\n}\n","import {ContentChildren, Directive, Inject, Injector, Optional} from '@angular/core';\nimport { StylableComponent } from \"./stylable.component\";\nimport { RedrawableDirective } from \"../redraw/redrawable.directive\";\nimport { IWidgetConfig } from '../../framework/types';\nimport {includes, pickBy} from \"lodash-es\";\n\n@Directive()\nexport abstract class BaseContainerComponent extends StylableComponent {\n // reference to the components which needs a redraw(eg, grid, chart) when the show of this component changes\n @ContentChildren(RedrawableDirective, { descendants: true }) reDrawableComponents;\n public content;\n public Widgets;\n\n constructor(inj: Injector, WIDGET_CONFIG: IWidgetConfig, explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n }\n\n private updateRedrawableComponents(widgets) {\n pickBy(widgets, widget => {\n // check for redrawable widget and whether it is already exist in reDrawableComponents query list or not\n if (widget && widget.nativeElement && widget.nativeElement.hasAttribute('redrawable') && !includes(this.reDrawableComponents._results, widget)) {\n this.reDrawableComponents._results.push(widget);\n }\n if (widget && widget.Widgets) {\n this.updateRedrawableComponents(widget.Widgets);\n }\n });\n }\n\n private redrawChildren() {\n // If container is bound to partial content, manually updating reDrawableComponents query list.\n if (this.content && this.Widgets) {\n this.updateRedrawableComponents(this.Widgets);\n }\n setTimeout(() => {\n if (this.reDrawableComponents) {\n this.reDrawableComponents.forEach(c => c.redraw());\n }\n }, 100);\n }\n\n onPropertyChange(key: string, nv: any, ov?: any) {\n super.onPropertyChange(key, nv, ov);\n if (key === 'show') {\n if (nv) {\n this.redrawChildren();\n }\n }\n }\n}\n","import {Directive, Inject, Injector, Optional} from '@angular/core';\n\nimport {addClass} from '@wm/core';\n\nimport { APPLY_STYLES_TYPE, styler } from '../../framework/styler';\nimport { IWidgetConfig } from '../../framework/types';\nimport { registerProps } from './container.props';\nimport { provideAsWidgetRef } from '../../../utils/widget-utils';\nimport {BaseContainerComponent} from \"../base/base-container.component\";\n\nconst DEFAULT_CLS = 'app-container';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-container',\n hostClass: DEFAULT_CLS\n};\n\n@Directive({\n selector: '[wmContainer]',\n providers: [\n provideAsWidgetRef(ContainerDirective)\n ]\n})\nexport class ContainerDirective extends BaseContainerComponent {\n static initializeProps = registerProps();\n\n constructor(inj: Injector, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext?: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n\n addClass(this.nativeElement, DEFAULT_CLS);\n styler(this.nativeElement, this, APPLY_STYLES_TYPE.CONTAINER);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n\nimport { transformFileURI } from '@wm/core';\n\nimport { getImageUrl } from '../utils/widget-utils';\n\n@Pipe({\n name: 'image'\n})\nexport class ImagePipe implements PipeTransform {\n transform(url: string, encode?: boolean, defaultImageUrl?: string) {\n return transformFileURI(getImageUrl(url, encode, defaultImageUrl));\n }\n}\n","import { PROP_ANY, PROP_BOOLEAN, PROP_STRING, register } from '../../framework/widget-props';\n\nexport const registerProps = () => {\n register(\n 'wm-item-template',\n new Map(\n [\n ['content', PROP_STRING]\n ]\n )\n );\n};\n","/**\n * This directive is used to set custom template partial for an item and maintains separate scope for each item.\n * This takes two inputs\n * 1) template partial name as wmItemTemplate\n * 2) item object as userComponentParams\n * Example: Providing a custom template for the search/autocomplete widget (customized UI in the dropdown for each item)\n * Add this directive to the li tag and provide item object and partial name like below. And also provide partialContainer and partial-container-target to render the partial.\n * <li #liElements *ngFor=\"let match of matches\" [wmItemTemplate]=\"content\" [userComponentParams]=\"match.item\" partialContainer>\n * <a partial-container-target></a>\n * </li>\n */\n\nimport {Directive, ElementRef, Inject, Injector, Input, Optional, ViewContainerRef} from '@angular/core';\nimport { NgForOfContext } from '@angular/common';\n\nimport {App} from '@wm/core';\n\nimport { provideAsWidgetRef } from '../../../utils/widget-utils';\nimport { registerProps } from './item-template.props';\nimport { StylableComponent } from '../base/stylable.component';\n\nconst WIDGET_CONFIG = {widgetType: 'wm-item-template'};\n\n@Directive({\n selector: '[wmItemTemplate]',\n exportAs: 'itemTemplateRef',\n providers: [\n provideAsWidgetRef(ItemTemplateDirective)\n ]\n})\nexport class ItemTemplateDirective extends StylableComponent {\n static initializeProps = registerProps();\n public context;\n public content;\n public partialParams;\n public nativeElement: HTMLElement;\n public viewContainerRef: ViewContainerRef;\n get $index() {\n return this.context.index;\n }\n\n @Input() userComponentParams;\n\n @Input() set wmItemTemplate(value) {\n this.widget.content = value;\n }\n\n constructor(inj: Injector, elRef: ElementRef, private app: App, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n this.nativeElement = elRef.nativeElement;\n // this.context = (<NgForOfContext<ItemTemplateDirective>>(<any>inj).view.context);\n this.context = (this.inj as any)._lView[8];\n }\n ngOnInit() {\n super.ngOnInit();\n this.partialParams.item = this.userComponentParams.dataObject;\n }\n}\n","import { PROP_BOOLEAN, register } from '../../framework/widget-props';\n\nexport const registerProps = () => {\n register(\n 'wm-repeat-template',\n new Map(\n [\n ['show', PROP_BOOLEAN]\n ]\n )\n );\n};\n","import {Directive, Inject, Injector, Optional} from '@angular/core';\nimport { StylableComponent } from '../base/stylable.component';\nimport { registerProps } from './repeat-template.props';\nimport { styler } from '../../framework/styler';\nimport { IWidgetConfig } from '../../framework/types';\n\nconst DEFAULT_CLS = 'app-repeat-item';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-repeat-template',\n hostClass: DEFAULT_CLS\n};\n\n@Directive({\n selector: '[wmRepeatTemplate]',\n exportAs: 'repeatItemRef'\n})\nexport class RepeatTemplateDirective extends StylableComponent {\n static initializeProps = registerProps();\n\n constructor(inj: Injector, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n styler(this.nativeElement, this);\n }\n}\n","import {\n Directive,\n Inject,\n inject,\n Injector,\n Input,\n OnDestroy,\n Optional,\n TemplateRef,\n ViewContainerRef\n} from '@angular/core';\n\nimport {$watch, App, findParent} from '@wm/core';\nimport {extend} from \"lodash-es\";\n\n@Directive({\n selector: '[lazyLoad]'\n})\nexport class LazyLoadDirective implements OnDestroy {\n private readonly viewParent: any;\n private readonly context = {};\n private embeddedView;\n private unSubscribeFn: Function;\n\n constructor(\n inj: Injector,\n private templateRef: TemplateRef<any>,\n private viewContainer: ViewContainerRef,\n @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any = {}\n ) {\n let viewParentApp = inj ? inj.get(App) : inject(App);\n let lView = (inj as any)._lView;\n this.viewParent = findParent(lView, viewParentApp)\n //this.context = (inj as any).view.context;\n extend(this.context, (inj as any)._lView[8], explicitContext);\n }\n\n @Input()\n set lazyLoad(expr) {\n this.unSubscribeFn = $watch(\n expr,\n this.viewParent,\n this.context,\n (val) => {\n if (!this.embeddedView && val) {\n this.embeddedView = this.viewContainer.createEmbeddedView(this.templateRef, this.context);\n this.unSubscribeFn();\n }\n }\n );\n }\n\n ngOnDestroy() {\n this.unSubscribeFn();\n }\n}\n","import { PROP_BOOLEAN, PROP_STRING, register } from '../../framework/widget-props';\n\nexport const registerProps = () => {\n register(\n 'wm-message',\n new Map(\n [\n ['animation', PROP_STRING],\n ['caption', {value: 'Message', ...PROP_STRING}],\n ['class', PROP_STRING],\n ['hideclose', {value: false, ...PROP_BOOLEAN}],\n ['name', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}],\n ['type', {value: 'success', ...PROP_STRING}],\n ]\n )\n );\n};\n","import {Component, Inject, Injector, Optional} from '@angular/core';\n\nimport {switchClass} from '@wm/core';\n\nimport { styler } from '../../framework/styler';\nimport { IWidgetConfig } from '../../framework/types';\nimport { StylableComponent } from '../base/stylable.component';\nimport { registerProps } from './message.props';\nimport { provideAsWidgetRef } from '../../../utils/widget-utils';\n\nconst DEFAULT_CLS = 'alert app-message';\nconst WIDGET_CONFIG: IWidgetConfig = {widgetType: 'wm-message', hostClass: DEFAULT_CLS};\n\n@Component({\n selector: '[wmMessage]',\n templateUrl: './message.component.html',\n providers: [\n provideAsWidgetRef(MessageComponent)\n ],\n exportAs: 'wmMessage'\n})\nexport class MessageComponent extends StylableComponent {\n static initializeProps = registerProps();\n messageClass = '';\n messageIconClass = '';\n type = '';\n caption: string;\n public hideclose: any;\n\n constructor(inj: Injector, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n styler(this.nativeElement, this);\n }\n\n public showMessage(caption?: string, type?: string) {\n if (caption) {\n this.caption = caption;\n }\n if (type) {\n this.setWidgetProperty('type', type);\n }\n this.setWidgetProperty('show', true);\n }\n\n public hideMessage() {\n this.setWidgetProperty('show', false);\n }\n\n public dismiss($event) {\n this.hideMessage();\n this.invokeEventCallback('close', {$event});\n }\n\n private onMessageTypeChange(nv: string) {\n let msgCls, msgIconCls;\n switch (nv) {\n case 'success':\n msgCls = 'alert-success';\n msgIconCls = 'wm-sl-l sl-check';\n break;\n case 'error':\n msgCls = 'alert-danger';\n msgIconCls = 'wi wi-cancel';\n break;\n case 'warn': /*To support old projects with type as \"warn\"*/\n case 'warning':\n msgCls = 'alert-warning';\n msgIconCls = 'wm-sl-l sl-alarm-bell';\n break;\n case 'info':\n msgCls = 'alert-info';\n msgIconCls = 'wi wi-info';\n break;\n case 'loading':\n msgCls = 'alert-info alert-loading';\n msgIconCls = 'fa fa-spinner fa-spin';\n break;\n }\n switchClass(this.nativeElement, msgCls, this.messageClass);\n this.messageClass = msgCls;\n this.messageIconClass = msgIconCls;\n }\n\n onPropertyChange(key, nv, ov?) {\n if (key === 'type') {\n this.onMessageTypeChange(nv);\n } else {\n super.onPropertyChange(key, nv, ov);\n }\n }\n}\n","<i aria-hidden=\"true\" [title]=\"type + 'Alert'\" class=\"icon {{type}} {{messageIconClass}}\"></i>\n<span [innerHtml]=\"caption\"></span>\n<button title=\"Close\" type=\"button\" class=\"btn-transparent close\" [hidden]=\"hideclose\" (click)=\"dismiss($event)\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</span>\n</button>\n","import { PROP_STRING, register } from '../../framework/widget-props';\n\nexport const registerProps = () => {\n register(\n 'wm-partial',\n new Map(\n [\n ['name', PROP_STRING]\n ]\n )\n );\n};\n","import {Directive, Inject, Injector, OnDestroy, Optional} from '@angular/core';\n\nimport {Viewport, ViewportEvent} from '@wm/core';\nimport { StylableComponent } from '../base/stylable.component';\nimport { registerProps } from './partial.props';\nimport { provideAsWidgetRef } from '../../../utils/widget-utils';\nimport {assign} from \"lodash-es\";\n\nconst DEFAULT_CLS = 'app-partial clearfix';\nconst WIDGET_CONFIG = {widgetType: 'wm-partial', hostClass: DEFAULT_CLS};\n\n@Directive({\n selector: '[wmPartial]',\n providers: [\n provideAsWidgetRef(PartialDirective)\n ]\n})\nexport class PartialDirective extends StylableComponent implements OnDestroy {\n static initializeProps = registerProps();\n constructor(inj: Injector, private viewport: Viewport, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n\n this.registerDestroyListener(this.viewport.subscribe(ViewportEvent.RESIZE, data => this.callback('resize', data)));\n this.registerDestroyListener(this.viewport.subscribe(ViewportEvent.ORIENTATION_CHANGE, data => this.callback('orientationchange', data)));\n }\n\n private callback(eventName, locals?: object) {\n locals = assign({widget: this}, locals);\n this.invokeEventCallback(eventName, locals);\n }\n\n public ngOnAttach() {\n this.callback('attach');\n }\n\n public ngOnDetach() {\n this.callback('detach');\n }\n\n public ngOnDestroy() {\n this.callback('destroy');\n super.ngOnDestroy();\n }\n\n}\n","import { Attribute, Directive, Inject, Self, Input, OnInit } from '@angular/core';\n\nimport { Subject } from 'rxjs';\n\nimport { $watch } from '@wm/core';\n\nimport { WidgetRef } from '../../framework/types';\nimport {get} from \"lodash-es\";\n\n@Directive({\n selector: '[partialContainer]',\n})\nexport class PartialParamHandlerDirective {\n constructor (@Self() @Inject(WidgetRef) private widgetRef) {\n this.widgetRef.partialParams = {};\n this.widgetRef.pageParams = this.widgetRef.partialParams;\n this.widgetRef.params$ = new Subject();\n }\n\n registerParams(name: string, value: string, bindExpr: string, type: string) {\n this.widgetRef.partialParams[name] = value;\n if (!value && bindExpr) {\n this.widgetRef.registerDestroyListener(\n //[Todo-CSP]: expr fn should be generated be default\n $watch(bindExpr, this.widgetRef.getViewParent(), get(this.widgetRef, 'context'), nv => {\n this.widgetRef.partialParams[name] = nv;\n\n // notify the partial container of the param changes\n this.widgetRef.params$.next();\n })\n );\n } else {\n this.widgetRef.params$.next();\n }\n\n }\n}\n\n@Directive({\n selector: '[wmParam]',\n})\nexport class PartialParamDirective implements OnInit {\n\n @Input() name: string;\n @Input() value: any;\n\n constructor(\n @Attribute('value.bind') public bindValue,\n @Attribute('type') public type,\n private partialParamsProvider: PartialParamHandlerDirective\n ) {\n }\n\n ngOnInit() {\n this.partialParamsProvider.registerParams(this.name, this.value, this.bindValue, this.type);\n }\n}\n","import { Attribute, ComponentFactoryResolver, Directive, ElementRef, Inject, Injector, Self, ViewContainerRef } from '@angular/core';\n\nimport { debounceTime, filter } from 'rxjs/operators';\n\nimport { App, $invokeWatchers, noop, ComponentType, PartialRefProvider } from '@wm/core';\n\nimport { WidgetRef } from \"../../framework/types\";\nimport {debounce} from \"lodash-es\";\n\n@Directive({\n selector: '[partialContainer]'\n})\nexport class PartialContainerDirective {\n\n private contentInitialized = false;\n private $target;\n\n get name() {\n return this.componentInstance.name;\n }\n\n async _renderPartial(nv) {\n // destroy the existing partial\n this.vcRef.clear();\n // when the container-target is inside the component template, it can be queried after viewInit of the component.\n $invokeWatchers(true);\n // for partials with popovers and page dialogs which are inside a prefab, prefab name needs to be computed and appended\n const prefab = $(this.elRef.nativeElement).closest('.app-prefab');\n let prefabName;\n if (prefab.length) {\n prefabName = prefab.attr('prefabname');\n } else if (this.componentInstance.viewParent) {\n prefabName = this.componentInstance.viewParent.prefabName;\n }\n\n const componentFactory = await this.partialRefProvider.getComponentFactoryRef(nv, ComponentType.PARTIAL, {prefab: prefabName});\n if (componentFactory) {\n const instanceRef = this.vcRef.createComponent(componentFactory, 0, this.inj);\n if (instanceRef && instanceRef['instance'] && prefabName) {\n // @ts-ignore\n instanceRef['instance'].prefabName = prefabName;\n }\n if (!this.$target) {\n this.$target = this.elRef.nativeElement.querySelector('[partial-container-target]') || this.elRef.nativeElement;\n }\n\n this.$target.innerHTML = '';\n this.$target.appendChild(instanceRef.location.nativeElement);\n this.contentInitialized = true;\n setTimeout(() => this.onLoadSuccess(), 200);\n }\n }\n\n renderPartial = debounce(this._renderPartial, 200);\n\n onLoadSuccess() {\n this.componentInstance.invokeEventCallback('load');\n\n this.app.notify('partialLoaded');\n }\n\n constructor(\n @Self() @Inject(WidgetRef) public componentInstance,\n public vcRef: ViewContainerRef,\n public elRef: ElementRef,\n public inj: Injector,\n private app: App,\n @Attribute('content') _content: string,\n private resolver: ComponentFactoryResolver,\n private partialRefProvider: PartialRefProvider\n ) {\n\n componentInstance.registerPropertyChangeListener((key: string, nv: any, ov?: any) => {\n if (key === 'content') {\n if (componentInstance.$lazyLoad) {\n componentInstance.$lazyLoad = () => {\n this.renderPartial(nv);\n componentInstance.$lazyLoad = noop;\n };\n } else {\n this.renderPartial(nv);\n }\n }\n });\n\n const subscription = componentInstance.params$\n .pipe(\n filter(() => this.contentInitialized),\n debounceTime(200)\n )\n .subscribe(() => this.renderPartial(componentInstance.content));\n // reload the partial content on partial param change\n componentInstance.registerDestroyListener(() => subscription.unsubscribe());\n }\n}\n","import { Attribute, ComponentFactoryResolver, Directive, ElementRef, Inject, Injector, Self, ViewContainerRef } from '@angular/core';\nimport { App, $invokeWatchers, noop, ComponentType, CustomWidgetRefProvider } from '@wm/core';\nimport { WidgetRef } from \"../../framework/types\";\n\n\ndeclare const _;\n\n@Directive({\n selector: '[customWidgetContainer][widgetname]'\n})\nexport class CustomWidgetContainerDirective {\n\n constructor(\n @Self() @Inject(WidgetRef) public componentInstance,\n public vcRef: ViewContainerRef,\n public elRef: ElementRef,\n public inj: Injector,\n private app: App,\n @Attribute('widgetname') widgetname: string,\n private customWidgetRefProvider: CustomWidgetRefProvider\n ) {\n const widgetnames = this.componentInstance.widgetname;\n this.customWidgetRefProvider.getComponentFactoryRef(widgetname, ComponentType.WIDGET).then((componentFactory) => {\n if (componentFactory) {\n const instanceRef = this.vcRef.createComponent(componentFactory, 0, this.inj);\n this.elRef.nativeElement.appendChild(instanceRef.location.nativeElement);\n }\n });\n }\n}","import {Directive, Inject, Injector, Input, OnDestroy, Optional, TemplateRef, ViewContainerRef} from '@angular/core';\nimport {isLargeTabletLandscape, isLargeTabletPortrait} from '@wm/core';\nimport {extend} from \"lodash-es\";\n\n@Directive({\n selector: '[wmShowInDevice]'\n})\nexport class ShowInDeviceDirective implements OnDestroy {\n private readonly context = {};\n private devices;\n private embeddedView;\n constructor(\n private viewContainerRef: ViewContainerRef,\n inj: Injector,\n private templateRef: TemplateRef<any>,\n @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any\n ) {\n extend(this.context, (inj as any)._lView[8], explicitContext);\n\n window.addEventListener('resize', this.onResize.bind(this));\n }\n @Input() set wmShowInDevice(devices) {\n this.devices = devices.split(',');\n this.onResize();\n }\n /*\n This function handles the rendering of widgets based on the configured showindevice property\n for the widget.\n 1. For Large Screen, create the view only when min-width is 1200px(except when the viewport is an Ipad Pro 13 inch(Landscape))\n 2. For Laptop/Tablet Landscape, create the view only when either min-width is 992px and max-width is 1199px(except when the viewport is an Ipad Pro 13 inch(Portrait)), or its an Ipad Pro 13 inch(Landscape))\n 3. For Tablet Portrait, create the view only when either min-width is 768px and max-width is 991px, or its an Ipad Pro 13 inch(Portrait))\n 4. For Mobile, create the view only when max-width is 767px.\n 5. For all, always render the view.\n */\n private onResize($event?) {\n\n const lgWidth = getComputedStyle(document.documentElement).getPropertyValue('--screen-lg') || '1200px';\n const mdWidth = getComputedStyle(document.documentElement).getPropertyValue('--screen-md') || '992px';\n const smWidth = getComputedStyle(document.documentElement).getPropertyValue('--screen-sm') || '768px';\n const lgTabLandScapeWidth = getComputedStyle(document.documentElement).getPropertyValue('--screen-lg-tab-landscape') || '1366px';\n const lgTabPortraitWidth = getComputedStyle(document.documentElement).getPropertyValue('--screen-lg-tab-portrait') || '1024px';\n const lgWidthMin = parseFloat(lgWidth)-1;\n const lgUnit = lgWidthMin + \"px\";\n const mdWidthMin = parseFloat(mdWidth)-1;\n const mdUnit = mdWidthMin + \"px\";\n const smWidthMin = parseFloat(smWidth)-1;\n const smUnit = smWidthMin + \"px\";\n if (\n (this.devices.indexOf('lg') > -1 && window.matchMedia(\"(min-width: \"+lgWidth+\")\").matches && !isLargeTabletLandscape(lgTabLandScapeWidth, lgTabPortraitWidth))\n || (this.devices.indexOf('md') > -1 && (isLargeTabletLandscape(lgTabLandScapeWidth, lgTabPortraitWidth) || (window.matchMedia(\"(min-width: \"+mdWidth+\") and (max-width: \"+lgUnit +\")\").matches && !isLargeTabletPortrait(lgTabLandScapeWidth, lgTabPortraitWidth))))\n || (this.devices.indexOf('sm') > -1 && (window.matchMedia(\"(min-width: \"+smWidth+\") and (max-width: \"+mdUnit+\")\").matches || isLargeTabletPortrait(lgTabLandScapeWidth, lgTabPortraitWidth)))\n || (this.devices.indexOf('xs') > -1 && window.matchMedia(\"(max-width: \"+smUnit+\")\").matches)\n || (this.devices.indexOf('all') > -1)) {\n if (!this.embeddedView) {\n this.embeddedView = this.viewContainerRef.createEmbeddedView(this.templateRef, this.context);\n }\n } else {\n this.viewContainerRef.clear();\n this.embeddedView = '';\n }\n\n }\n\n ngOnDestroy() {\n window.removeEventListener('resize', this.onResize);\n }\n}\n","import {Directive, DoCheck, ElementRef, Injector, Input, OnDestroy, OnInit} from '@angular/core';\n\nimport { App, debounce, isKitkatDevice, isMobileApp } from '@wm/core';\nimport {forEach, includes} from \"lodash-es\";\n\ndeclare const $;\ndeclare const IScroll;\n\n@Directive({\n selector: '[wmSmoothscroll]'\n})\nexport class SmoothScrollDirective implements OnInit, DoCheck, OnDestroy {\n\n private readonly _$el;\n private _isEnabled = false;\n private _smoothScrollInstance;\n private _lastScrollY = -1;\n private _waitRefreshTill = -1;\n private app: App;\n private pendingIscrolls: any = [];\n private cancelSubscription: any;\n\n constructor(inj: Injector, elRef: ElementRef, app: App) {\n this._$el = $(elRef.nativeElement);\n this.app = app;\n }\n\n public ngOnInit() {\n this.cancelSubscription = this.app.subscribe('no-iscroll', el => {\n this.pendingIscrolls.push(el);\n });\n }\n\n public ngDoCheck() {\n if (this._isEnabled) {\n if (!this._smoothScrollInstance) {\n this._smoothScrollInstance = this.applySmoothScroll();\n } else {\n this.refreshIScroll();\n }\n } else if (this._smoothScrollInstance && this._smoothScrollInstance.destroy) {\n this._smoothScrollInstance.destroy();\n }\n }\n\n public ngOnDestroy() {\n if (this._smoothScrollInstance && this._smoothScrollInstance.destroy) {\n this._smoothScrollInstance.destroy();\n }\n if (this.cancelSubscription) {\n this.cancelSubscription();\n }\n }\n\n @Input()\n set wmSmoothscroll(val: any) {\n this._isEnabled = (val === true || val === 'true');\n if (this._isEnabled) {\n if (!this._smoothScrollInstance) {\n this._smoothScrollInstance = this.applySmoothScroll();\n }\n } else {\n this.ngOnDestroy();\n }\n }\n\n private applySmoothScroll($events?: any[], activeEl?: any) {\n if (!isMobileApp() || isKitkatDevice()) {\n return null;\n }\n // Set the fadeScrollbars to true only when content is scrollable inside the smoothscroll-container\n const scrollOptions = {\n scrollbars: true,\n preventDefault: false,\n momentum: true,\n bounce: false,\n mouseWheel: true, // for preview in browser support\n disablePointer: true, // disable the pointer events as it causes lag in scrolling (jerky).\n disableTouch: false, // false to be usable with touch devices\n disableMouse: false // false to be usable with a mouse (desktop)\n },\n el = this._$el[0];\n\n if (!el.children.length) {\n return null;\n }\n\n this._$el.addClass('smoothscroll-wrapper');\n /* WMS-17904\n document.scrollIntoView overrides default iScroll scroll,\n so the fix is done to ensure, the scroll action from 'scrollIntoView'\n is captured & executed through iScroll APIs\n */\n el.onscroll = function(e) {\n if (e.target.iscroll && e.target.scrollTop) {\n e.target.iscroll.scrollTo(\n e.target.iscroll.x,\n e.target.iscroll.y - e.target.scrollTop\n );\n e.target.scrollTop = 0;\n }\n };\n if (activeEl && activeEl.tagName === 'INPUT') {\n activeEl.focus();\n }\n\n // Add fadeScrollbars options only when smoothscroll container is included, which means content is scrollable.\n if ($events) {\n scrollOptions['fadeScrollbars'] = true;\n }\n\n let iScroll = new IScroll(el, scrollOptions);\n\n if ($events) {\n // map all events on previous iscroll to the newly created iscroll.\n forEach($events, (listeners, key) => {\n forEach(listeners, l => {\n iScroll.on(key, l);\n });\n });\n const scope = this;\n iScroll.on('scrollStart', function () {\n this._scrolling = true;\n //will notify the components which want to subscribe upon scrolling.\n if (isMobileApp()) {\n scope.app.notify('iscroll-start',{});\n }\n });\n iScroll.on('scrollEnd', function () {\n this._scrolling = false;\n });\n iScroll.refresh();\n }\n\n this.app.notify('iscroll-start',{});\n\n // refresh the indicators.\n iScroll.indicatorRefresh = () => {\n const indicators = this._$el[0].iscroll.indicators;\n let i;\n if (indicators.length) {\n for (i = 0; i < indicators.length; i++) {\n indicators[i].refresh();\n }\n }\n };\n\n this._$el[0].iscroll = iScroll;\n forEach(this.pendingIscrolls, (_el, index) => {\n if (_el.isSameNode(this._$el[0])) {\n this.app.notify('iscroll-update', {el: _el});\n this.pendingIscrolls.splice(index, 1);\n return;\n }\n });\n this.app.notify('iscroll-update', {});\n\n return {\n iScroll: iScroll,\n destroy: function () {\n iScroll.destroy();\n $(iScroll.scroller).css({\n 'transition-timing-function': '',\n 'transition-duration': '',\n 'transform': ''\n });\n\n iScroll = null;\n delete el.iscroll;\n }\n };\n }\n\n /*\n * When element has scroll (i.e. scrollHeight > clientHeight), a div with smoothscroll-container class will be added.\n * new iScroll will be initialised on the element after the div addition, by removing the existing iscroll on the element.\n * This div will have no height, so the elements inside this div will inherit this height, i.e. no height,\n * Scenario: tabs with 100% height, as it covers the pageContent with no scroll, this div will not be added.\n * TODO: Scenario: tabs with 100% height and add others widgets after/before, as it has scroll, this div will be added.\n * But tabs having 100% height will not be honoured as div is having no height.\n */\n private refreshIScroll() {\n const iScroll = this._smoothScrollInstance.iScroll;\n const waitTime = 500;\n if (iScroll._scrolling || this._waitRefreshTill > Date.now()) {\n return;\n }\n // Check for scrollable content and if smoothscroll-container div is already added.\n if (iScroll.wrapper\n && !includes(iScroll.wrapper.children[0].classList, 'smoothscroll-container')\n && iScroll.wrapper.scrollHeight > iScroll.wrapper.clientHeight) {\n\n const cloneEvents = iScroll._events;\n const prevActiveEl = document.activeElement;\n\n // Adds the smoothscroll container div wrapper only when element has scrollable content.\n $(iScroll.wrapper.children).wrapAll('<div class=\"smoothscroll-container\"></div>');\n this._smoothScrollInstance.destroy();\n\n // create new iscroll instance on the element\n this._smoothScrollInstance = this.applySmoothScroll(cloneEvents, prevActiveEl);\n }\n if (this._lastScrollY !== this._$el[0].iscroll.maxScrollY) {\n refreshIscrolls(this._smoothScrollInstance.iScroll);\n this._lastScrollY = this._$el[0].iscroll.maxScrollY;\n } else {\n this._smoothScrollInstance.iScroll.refresh();\n }\n this._waitRefreshTill = Date.now() + waitTime;\n }\n}\n\n/**\n * Refreshes the given iScorll or all iScrolls in the page.\n * @param iScroll\n */\nconst refreshIscrolls = function(iScroll?: any) {\n const scrollContainer = !iScroll && $('.smoothscroll-container');\n\n // Fix for issue: keyboard hides the input on focus.\n // On input focus or window resize, keypad in device has to adjust.\n let bScrollIntoView = iScroll && iScroll.wrapper && iScroll.wrapper.contains(document.activeElement);\n if (bScrollIntoView && document.activeElement.tagName === 'INPUT' && ($(document.activeElement).offset().top + document.activeElement.clientHeight) > window.innerHeight * 0.9) {\n document.activeElement.scrollIntoView({behavior: 'auto', block: 'end', inline: 'end'});\n }\n\n if (iScroll) {\n // refresh specify iscroll on change.\n if (iScroll.indicatorRefresh) {\n iScroll.indicatorRefresh();\n }\n if (iScroll.refresh) {\n iScroll.refresh();\n }\n } else if (scrollContainer.length) {\n // refresh all the iscrolls in pagecontent.\n scrollContainer.parent().each( (i, el: any) => {\n el.iscroll.indicatorRefresh();\n el.iscroll.refresh();\n });\n }\n};\n\n// on window resize, recalculate the iscroll position and refresh scrollers.\nwindow.addEventListener('resize', debounce(refreshIscrolls, 200));\n","import { Directive, ElementRef, Input } from '@angular/core';\n\n@Directive({\n selector: '[textContent]'\n})\nexport class TextContentDirective {\n @Input()\n set textContent(nv) {\n let v = nv;\n\n if (nv === undefined || nv === null) {\n v = '';\n }\n this.elRef.nativeElement.textContent = v;\n }\n\n constructor(private elRef: ElementRef) {}\n}","\nimport { CustomPipeManager } from '@wm/core';\nimport {isFunction} from \"lodash-es\";\n\nexport class WmPipe {\n protected pipeRef;\n protected isCustomPipe;\n constructor(private pipeName, protected customPipeManager: CustomPipeManager) {\n this.pipeRef = this.customPipeManager ? this.customPipeManager.getCustomPipe(pipeName) : null;\n this.isCustomPipe = this.pipeRef && isFunction(this.pipeRef.formatter);\n }\n\n customFormatter(data, args) {\n try {\n return this.pipeRef.formatter(...args);\n } catch (error) {\n return data;\n }\n }\n}\n","import { Inject, Pipe, PipeTransform } from '@angular/core';\nimport { DatePipe, DecimalPipe } from '@angular/common';\nimport { CURRENCY_INFO, isDefined, App, CustomPipeManager, AbstractI18nService, hasOffsetStr } from '@wm/core';\nimport { WmPipe } from \"./wm-pipe\";\nimport {filter, includes, isDate, isFunction, isObject, isUndefined, startsWith} from \"lodash-es\";\n\ndeclare const moment;\n\nconst getEpochValue = data => {\n let epoch;\n // For data in form of string number ('123'), convert to number (123). And don't parse date objects.\n if (!isDate(data) && !isNaN(data)) {\n data = parseInt(data, 10);\n }\n // get the timestamp value. If data is time string, append date string to the time value\n epoch = moment(data).valueOf() || moment(new Date().toDateString() + ' ' + data).valueOf();\n return epoch;\n};\n\n@Pipe({\n name: 'trailingZeroDecimalPipe'\n})\nexport class TrailingZeroDecimalPipe implements PipeTransform {\n transform(value: any, selectedLocale: string, numberfilter: string, localefilter: any, trailingzero: boolean, decimalValue: string, skipTrailingZeroCheck?: boolean, formattedLocale?): any {\n numberfilter = trailingzero && !skipTrailingZeroCheck ? `1.${decimalValue.length}-16`: numberfilter;\n const locale = formattedLocale ? formattedLocale['number'] : undefined;\n return this.decimalPipe.transform(value, numberfilter, localefilter || locale || selectedLocale);\n }\n\n constructor(private decimalPipe: DecimalPipe) { }\n\n}\n\n@Pipe({\n name: 'toDate'\n})\nexport class ToDatePipe extends WmPipe implements PipeTransform {\n // This method calls the custom formatter fn after applying the exisitng date pattern\n returnFn(data, args) {\n if (this.isCustomPipe) {\n if (args) {\n args[0] = data;\n }\n return this.customFormatter(data, args);\n }\n return data;\n }\n transform(data: any, format: any, timezone?, compInstance?) {\n let timestamp;\n // 'null' is to be treated as a special case, If user wants to enter null value, empty string will be passed to the backend\n if (data === 'null' || data === '') {\n return this.returnFn('', arguments);\n }\n if (!isDefined(data)) {\n return this.returnFn('',arguments);\n }\n timestamp = getEpochValue(data);\n if (timestamp) {\n if (format === 'timestamp') {\n return this.returnFn(timestamp, arguments);\n }\n if (format === 'UTC') {\n return this.returnFn(new Date(timestamp).toISOString(), arguments);\n }\n let formattedVal;\n const timeZone = this.i18nService ? this.i18nService.getTimezone(compInstance) : timezone;\n if (timeZone && (data === timestamp || hasOffsetStr(data))) {\n formattedVal = moment(timestamp).tz(timeZone).format(format.replaceAll('y', 'Y').replaceAll('d', 'D').replace('a', 'A'));\n } else {\n formattedVal = this.datePipe.transform(timestamp, format);\n }\n return this.returnFn(formattedVal, arguments);\n }\n return this.returnFn('', arguments);\n }\n\n constructor(private datePipe: DatePipe, private i18nService: AbstractI18nService, protected customPipeManager: CustomPipeManager) {\n super('toDate', customPipeManager);\n }\n}\n\n@Pipe({\n name: 'toNumber'\n})\nexport class ToNumberPipe implements PipeTransform {\n transform(data, fracSize) {\n if (fracSize && !String(fracSize).match(/^(\\d+)?\\.((\\d+)(-(\\d+))?)?$/)) {\n fracSize = '1.' + fracSize + '-' + fracSize;\n }\n if (!isNaN(+data)) {\n const locale = this.i18nService && this.i18nService.getwidgetLocale() ? this.i18nService.getwidgetLocale() : undefined;\n const formattedLocale = locale ? locale['number'] : null;\n return this.decimalPipe.transform(data, fracSize, formattedLocale);\n }\n }\n constructor(private decimalPipe: DecimalPipe, @Inject(AbstractI18nService) private i18nService: AbstractI18nService) {\n }\n}\n\n@Pipe({\n name: 'toCurrency'\n})\nexport class ToCurrencyPipe implements PipeTransform {\n transform(data, currencySymbol, fracSize) {\n const _currencySymbol = (CURRENCY_INFO[currencySymbol] || {}).symbol || currencySymbol || '';\n let _val = new ToNumberPipe(this.decimalPipe, this.i18nService).transform(data, fracSize);\n const isNegativeNumber = startsWith(_val, '-');\n if (isNegativeNumber) {\n _val = _val.replace('-','');\n }\n return _val ? isNegativeNumber ? '-'+ _currencySymbol +_val :_currencySymbol + _val : '';\n }\n\n constructor(private decimalPipe: DecimalPipe, @Inject(AbstractI18nService) private i18nService: AbstractI18nService) {\n }\n}\n\n@Pipe({\n name: 'prefix'\n})\nexport class PrefixPipe implements PipeTransform {\n transform(data, padding) {\n return (isUndefined(data) || data === null || data === '') ? data : ((padding || '') + data);\n }\n}\n\n@Pipe({\n name: 'suffix'\n})\nexport class SuffixPipe implements PipeTransform {\n transform(data, padding) {\n return (isUndefined(data) || data === null || data === '') ? data : (data + (padding || ''));\n }\n}\n\n\n/**\n * Custom pipe: It is work as interceptor between the user custom pipe function and angular pipe\n */\n@Pipe({\n name: 'custom'\n})\nexport class CustomPipe implements PipeTransform {\n constructor(private custmeUserPipe: CustomPipeManager) {\n\n }\n transform(data, pipename) {\n let argumentArr = [];\n for(let i =2 ; i<arguments.length; i++ ){\n argumentArr.push(arguments[i]);\n }\n\n let pipeRef = this.custmeUserPipe.getCustomPipe(pipename);\n if (!pipeRef || !isFunction(pipeRef.formatter)) {\n console.warn('formatter is not defined, please check the custom pipes documentation');\n return data;\n }\n\n try{\n return pipeRef.formatter(data, ...argumentArr);\n } catch(error){\n console.error('Pipe name: '+pipename, error);\n return data;\n }\n }\n}\n\n@Pipe({\n name: 'timeFromNow'\n})\nexport class TimeFromNowPipe implements PipeTransform {\n transform(data) {\n let timestamp;\n if (!isDefined(data)) {\n return undefined;\n }\n timestamp = getEpochValue(data);\n return timestamp ? moment(timestamp).fromNow() : undefined;\n }\n}\n\n@Pipe({\n name: 'numberToString'\n})\nexport class NumberToStringPipe extends ToNumberPipe implements PipeTransform { }\n\n@Pipe({\n name: 'stringToNumber'\n})\nexport class StringToNumberPipe implements PipeTransform {\n transform(data) {\n return Number(data) || undefined;\n }\n}\n\n@Pipe({\n name: 'filter'\n})\nexport class FilterPipe implements PipeTransform {\n transform(data: any[], field: any, value: any) {\n if (!data) {\n return [];\n }\n // If object is passed as first paramter\n if (isObject(field)) {\n return filter(data, field);\n }\n // If key value pair is provided\n return filter(data, item => {\n return includes(item[field], value);\n });\n }\n}\n\n@Pipe({\n name: 'filesize'\n})\nexport class FileSizePipe implements PipeTransform {\n transform(bytes: number, precision: number) {\n const units = [\n 'bytes',\n 'KB',\n 'MB',\n 'GB',\n 'TB',\n 'PB'\n ];\n\n /*Todo[shubham]\n if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) {\n return isMobile() ? '' : '?';\n }*/\n let unit = 0;\n while (bytes >= 1024) {\n bytes /= 1024;\n unit++;\n }\n return bytes.toFixed(+precision) + ' ' + units[unit];\n }\n}\n\n@Pipe({\n name: 'fileIconClass'\n})\nexport class FileIconClassPipe implements PipeTransform {\n transform(fileExtension: any) {\n const fileClassMapping = {\n 'zip' : 'fa-file-zip-o',\n 'pdf' : 'fa-file-pdf-o',\n 'rar' : 'fa-file-archive-o',\n 'txt' : 'fa-file-text-o',\n 'ppt' : 'fa-file-powerpoint-o',\n 'pot' : 'fa-file-powerpoint-o',\n 'pps' : 'fa-file-powerpoint-o',\n 'pptx' : 'fa-file-powerpoint-o',\n 'potx' : 'fa-file-powerpoint-o',\n 'ppsx' : 'fa-file-powerpoint-o',\n 'mpg' : 'fa-file-movie-o',\n 'mp4' : 'fa-file-movie-o',\n 'mov' : 'fa-file-movie-o',\n 'avi' : 'fa-file-movie-o',\n 'mp3' : 'fa-file-audio-o',\n 'docx' : 'fa-file-word-o',\n 'js' : 'fa-file-code-o',\n 'md' : 'fa-file-code-o',\n 'html' : 'fa-file-code-o',\n 'css' : 'fa-file-code-o',\n 'xlsx' : 'fa-file-excel-o',\n 'png' : 'fa-file-image-o',\n 'jpg' : 'fa-file-image-o',\n 'jpeg' : 'fa-file-image-o',\n 'file' : 'fa-file-o',\n 'default' : 'fa-file-o'\n };\n\n return 'fa ' + (fileClassMapping[fileExtension] || 'fa-file-o');\n }\n}\n\n@Pipe({\n name: 'stateClass'\n})\nexport class StateClassPipe implements PipeTransform {\n transform(state) {\n const stateClassMap = {\n 'success' : 'wi wi-done text-success',\n 'error' : 'wi wi-error text-danger'\n };\n return stateClassMap[state.toLowerCase()];\n }\n}\n\n@Pipe({\n name: 'fileExtensionFromMime'\n})\nexport class FileExtensionFromMimePipe implements PipeTransform {\n transform(mimeType: any) {\n const typeMapping = {\n 'audio/aac': '.aac',\n 'application/x-abiword': '.abw',\n 'application/vnd.android.package-archive': '.apk',\n 'video/x-msvideo': '.avi',\n 'application/vnd.amazon.ebook': '.azw',\n 'application/octet-stream': '.bin',\n 'image/bmp': '.bmp',\n 'application/x-bzip': '.bz',\n 'application/x-bzip2': '.bz2',\n 'application/x-csh': '.csh',\n 'text/css': '.css',\n 'text/csv': '.csv',\n 'application/msword': '.doc',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': '.docx',\n 'application/vnd.ms-fontobject': '.eot',\n 'application/epub+zip': '.epub',\n 'application/ecmascript': '.es',\n 'image/gif': '.gif',\n 'text/html': '.html',\n 'image/x-icon': '.ico',\n 'text/calendar': '.ics',\n 'application/java-archive': '.jar',\n 'image/jpeg': ['.jpeg', '.jpg'],\n 'application/javascript': '.js',\n 'application/json': '.json',\n 'audio/midi': '.mid',\n 'audio/x-midi': '.midi',\n 'video/mpeg': '.mpeg',\n 'application/vnd.apple.installer+xml': 'mpkg',\n 'application/vnd.oasis.opendocument.presentation': '.odp',\n 'application/vnd.oasis.opendocument.spreadsheet': '.ods',\n 'application/vnd.oasis.opendocument.text': '.odt',\n 'audio/ogg': '.oga',\n 'video/ogg': '.ogv',\n 'application/ogg': '.ogx',\n 'font/otf': '.otf',\n 'image/png': '.png',\n 'application/pdf': '.pdf',\n 'application/vnd.ms-powerpoint': '.ppt',\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation': '.pptx',\n 'application/x-rar-compressed': '.rar',\n 'application/rtf': '.rtf',\n 'application/x-sh': '.sh',\n 'image/svg+xml': '.svg',\n 'application/x-shockwave-flash': '.swf',\n 'application/x-tar': '.tar',\n 'image/tiff': '.tiff',\n 'application/typescript': '.ts',\n 'font/ttf': '.ttf',\n 'text/plain': '.txt',\n 'application/vnd.visio': '.vsd',\n 'audio/wav': '.wav',\n 'audio/webm': '.weba',\n 'video/webm': '.webm',\n 'image/webp': '.webp',\n 'font/woff': '.woff',\n 'font/woff2': '.woff2',\n 'application/xhtml+xml': '.xhtml',\n 'application/vnd.ms-excel': '.xls',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': '.xlsx',\n 'application/xml': '.xml',\n 'application/vnd.mozilla.xul+xml': '.xul',\n 'application/zip': '.zip',\n 'video/3gpp': '.3gp',\n 'audio/3gpp': '.3gp',\n 'video/3gpp2': '.3g2',\n 'audio/3gpp2': '.3g2',\n 'application/x-7z-compressed': '.7z'\n };\n\n return typeMapping[mimeType];\n }\n}\n\n\n","import { Pipe, PipeTransform, SecurityContext } from '@angular/core';\nimport {DomSanitizer, SafeHtml, SafeResourceUrl, SafeScript, SafeStyle, SafeUrl} from '@angular/platform-browser';\n\n@Pipe({\n name: 'trustAs'\n})\nexport class TrustAsPipe implements PipeTransform {\n\n constructor(private domSanitizer: DomSanitizer) {}\n\n transform(content: string, context: string | SecurityContext) {\n if (content === null || content === undefined) {\n return '';\n }\n switch (context) {\n case 'html':\n case SecurityContext.HTML:\n return this.domSanitizer.bypassSecurityTrustHtml(content);\n case 'style':\n case SecurityContext.STYLE:\n return this.domSanitizer.bypassSecurityTrustStyle(content);\n case 'script':\n case SecurityContext.SCRIPT:\n return this.domSanitizer.bypassSecurityTrustScript(content);\n case 'url':\n case SecurityContext.URL:\n return this.domSanitizer.bypassSecurityTrustUrl(content);\n case 'resource':\n case SecurityContext.RESOURCE_URL:\n return this.domSanitizer.bypassSecurityTrustResourceUrl(content);\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport {isMobile, isMobileApp} from '@wm/core';\nimport {forEach} from \"lodash-es\";\n\nconst openedDialogs = [];\n/*We need closedDialogs array because onHidden event is asynchronous,\nand if the user uses script and calls dialog1.close() and then dialog2.close() then\nwe cannot be sure if both the dialogs onClose callback will be called or not.*/\nconst closeDialogsArray = [];\n\n\n@Injectable()\nexport class DialogServiceImpl {\n\n /**\n * map which contains the references to all dialogs by name\n * @type {Map<any, any>}\n * Ex Map[[dialogName, [[dialogScope, dialogRef]]]]\n */\n private dialogRefsCollection = new Map<any, any>();\n private appConfirmDialog = '_app-confirm-dialog';\n\n constructor() {}\n\n /**\n * Register dialog by name and scope\n * @param {string} name\n * @param {BaseDialog} dialogRef\n * @param {scope}\n */\n public register(name: string, dialogRef: any, scope: any) {\n if (!name) {\n return;\n }\n if (this.dialogRefsCollection.get(name)) {\n this.dialogRefsCollection.get(name).set(scope, dialogRef);\n } else {\n this.dialogRefsCollection.set(name, new Map([[scope, dialogRef]]));\n }\n }\n\n public getDialogRefsCollection() {\n return this.dialogRefsCollection;\n }\n\n /**\n * De Register dialog by name and scope\n * @param name\n * @param dialogRef\n * @param scope\n */\n public deRegister(name: string, scope: any) {\n if (!name) {\n return;\n }\n if (this.dialogRefsCollection.get(name)) {\n this.dialogRefsCollection.get(name).delete(scope);\n }\n }\n\n private getDialogRef(name: string, scope?: any) {\n const dialogRefMap = this.dialogRefsCollection.get(name);\n let dialogRef;\n\n if (scope) {\n dialogRef = dialogRefMap.get(scope);\n if (!dialogRef) {\n // Check if the scope is App level scope\n // else throw a console error\n if (!scope.pageName && !scope.partialName && !scope.prefabName) {\n dialogRefMap.forEach((dRef, dialogScope) => {\n // Check if the collection of dialogs have a \"common\" partial scope\n // If yes use that else through a console error\n if (dialogScope && dialogScope.partialName === 'Common') {\n dialogRef = dRef;\n } else {\n console.error('No dialog with the name \"' + name + '\" found in the App scope.');\n }\n });\n } else {\n console.error('No dialog with the name \"' + name + '\" found in the given scope.');\n }\n }\n } else {\n if (dialogRefMap.size === 1) {\n dialogRef = dialogRefMap.entries().next().value[1];\n } else {\n console.error('There are multiple instances of this dialog name. Please provide the Page/Partial/App instance in which the dialog exists.');\n }\n }\n return dialogRef;\n }\n\n /**\n * Opens the dialog with the given name\n * @param {string} name\n */\n public open(name: string, scope?: any, initState?: any) {\n const dialogRef = this.getDialogRef(name, scope);\n if (!dialogRef) {\n return;\n }\n\n dialogRef.open(initState);\n }\n\n /**\n * closes the dialog with the given name\n * @param {string} name\n */\n public close(name: string, scope?: any, callBackFn?:any) {\n const dialogRef = this.getDialogRef(name, scope);\n if (!dialogRef) {\n return;\n }\n // For notification action variable dialogs onok callback event should be called after closing the dialog.\n // So passing it as callback function\n dialogRef.closeCallBackFn = callBackFn;\n dialogRef.close();\n }\n\n /**\n * closes all the opened dialogs\n */\n closeAllDialogs() {\n forEach(openedDialogs.reverse(), (dialog) => {\n dialog.close();\n });\n }\n\n public showAppConfirmDialog(initState?: any) {\n this.open(this.getAppConfirmDialog(), undefined, initState);\n }\n\n public closeAppConfirmDialog() {\n this.close(this.getAppConfirmDialog());\n }\n\n public getAppConfirmDialog() {\n return this.appConfirmDialog;\n }\n\n public setAppConfirmDialog(dialogName: string) {\n this.appConfirmDialog = dialogName;\n }\n\n public addToOpenedDialogs(ref) {\n openedDialogs.push(ref);\n }\n\n public getLastOpenedDialog() {\n return openedDialogs[openedDialogs.length - 1];\n }\n\n public removeFromOpenedDialogs(ref) {\n if (openedDialogs.indexOf(ref) !== -1) {\n openedDialogs.splice(openedDialogs.indexOf(ref), 1);\n }\n if (openedDialogs.length === 0 && (isMobile() || isMobileApp())) {\n //Fix for [WMS-23948]: remove aria-hidden attribute only after all dialogs are closed\n const parentSelector = $('body > app-root')[0];\n parentSelector.removeAttribute('aria-hidden');\n }\n }\n\n public getOpenedDialogs() {\n return openedDialogs;\n }\n\n public addToClosedDialogs(ref) {\n closeDialogsArray.push(ref);\n }\n\n public removeFromClosedDialogs(ref) {\n if (closeDialogsArray.indexOf(ref) !== -1) {\n closeDialogsArray.splice(closeDialogsArray.indexOf(ref), 1);\n }\n }\n\n public getDialogRefFromClosedDialogs() {\n return closeDialogsArray[closeDialogsArray.length - 1];\n }\n}\n","import {Pipe, PipeTransform, SecurityContext} from \"@angular/core\";\nimport {DomSanitizer, SafeValue} from \"@angular/platform-browser\";\n\n@Pipe({\n name: 'sanitize'\n})\nexport class SanitizePipe implements PipeTransform {\n constructor(private domSanitizer: DomSanitizer) {\n }\n\n transform(content: string | SafeValue, context: string | SecurityContext): string {\n if (content === null || content === undefined) {\n return '';\n }\n switch (context) {\n case 'html':\n case SecurityContext.HTML:\n return this.domSanitizer.sanitize(SecurityContext.HTML, content);\n case 'style':\n case SecurityContext.STYLE:\n return this.domSanitizer.sanitize(SecurityContext.STYLE, content);\n case 'script':\n case SecurityContext.SCRIPT:\n return this.domSanitizer.sanitize(SecurityContext.SCRIPT, content);\n case 'url':\n case SecurityContext.URL:\n return this.domSanitizer.sanitize(SecurityContext.URL, content);\n case 'resource':\n case SecurityContext.RESOURCE_URL:\n return this.domSanitizer.sanitize(SecurityContext.RESOURCE_URL, content);\n case 'none':\n case SecurityContext.NONE:\n return this.domSanitizer.sanitize(SecurityContext.NONE, content);\n }\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { CommonModule, Location } from '@angular/common';\n\nimport { AbstractDialogService } from '@wm/core';\nimport { SecurityModule } from '@wm/security';\n\nimport { ContainerDirective } from './widgets/common/container/container.directive';\nimport { ImagePipe } from './pipes/image.pipe';\nimport { ItemTemplateDirective } from \"./widgets/common/item-template/item-template.directive\";\nimport { RepeatTemplateDirective } from \"./widgets/common/repeat-template/repeat-template.directive\";\nimport { LazyLoadDirective } from './widgets/common/lazy-load/lazy-load.directive';\nimport { MessageComponent } from './widgets/common/message/message.component';\nimport { PartialDirective } from './widgets/common/partial/partial.directive';\nimport {\n PartialParamDirective,\n PartialParamHandlerDirective\n} from './widgets/common/partial-param/partial-param.directive';\nimport { PartialContainerDirective} from \"./widgets/common/base/partial-container.directive\";\nimport { CustomWidgetContainerDirective} from \"./widgets/common/base/custom-widget-container.directive\";\nimport { RedrawableDirective } from './widgets/common/redraw/redrawable.directive';\nimport { ShowInDeviceDirective } from './directives/show-in-device.directive';\nimport { SmoothScrollDirective } from './widgets/common/smooth-scroll/smooth-scroll.directive';\nimport { TextContentDirective } from './widgets/common/base/text-content.directive';\nimport {\n FileExtensionFromMimePipe,\n FileIconClassPipe,\n FileSizePipe,\n FilterPipe,\n NumberToStringPipe,\n PrefixPipe,\n StateClassPipe,\n StringToNumberPipe,\n SuffixPipe,\n TimeFromNowPipe,\n ToCurrencyPipe,\n ToDatePipe,\n ToNumberPipe,\n CustomPipe,\n TrailingZeroDecimalPipe\n} from './pipes/custom-pipes';\nimport { TrustAsPipe } from './pipes/trust-as.pipe';\nimport { DialogServiceImpl } from './widgets/common/dialog/dialog.service';\nimport { SanitizePipe } from \"./pipes/sanitize.pipe\";\n\nconst wmComponents = [\n ContainerDirective,\n ItemTemplateDirective,\n RepeatTemplateDirective,\n LazyLoadDirective,\n MessageComponent,\n PartialDirective,\n PartialParamHandlerDirective,\n PartialParamDirective,\n PartialContainerDirective,\n CustomWidgetContainerDirective,\n RedrawableDirective,\n ShowInDeviceDirective,\n SmoothScrollDirective,\n TextContentDirective\n];\n\nconst PIPES = [\n ToDatePipe,\n FileIconClassPipe,\n FileExtensionFromMimePipe,\n FilterPipe,\n FileSizePipe,\n ToNumberPipe,\n ToCurrencyPipe,\n PrefixPipe,\n SuffixPipe,\n TimeFromNowPipe,\n NumberToStringPipe,\n StateClassPipe,\n StringToNumberPipe,\n TrailingZeroDecimalPipe,\n TrustAsPipe,\n ImagePipe,\n CustomPipe,\n SanitizePipe\n];\n\n@NgModule({\n imports: [\n CommonModule,\n SecurityModule\n ],\n declarations: [...wmComponents, ...PIPES],\n exports: [...wmComponents, ...PIPES]\n})\nexport class WmComponentsModule {\n\n static forRoot(): ModuleWithProviders<WmComponentsModule> {\n return {\n ngModule: WmComponentsModule,\n providers: [\n ToDatePipe,\n FilterPipe,\n TrailingZeroDecimalPipe,\n TrustAsPipe,\n ImagePipe,\n CustomPipe,\n SanitizePipe,\n Location,\n {provide: AbstractDialogService, useClass: DialogServiceImpl}\n ]\n };\n }\n}\n","import { DataSource, debounce, processFilterExpBindNode } from '@wm/core';\nimport { FormWidgetType, isDefined, MatchMode } from '@wm/core';\n\nimport { isDataSetWidget } from './widget-utils';\nimport {\n each,\n filter,\n forEach, get, head,\n includes,\n intersection,\n isArray, isEmpty, isFunction,\n isNull,\n isObject,\n isString,\n isUndefined, keys, replace,\n split\n} from \"lodash-es\";\n\nconst noop = () => { };\n\nexport enum Live_Operations {\n INSERT = 'insert',\n UPDATE = 'update',\n DELETE = 'delete',\n READ = 'read'\n}\n\nexport const ALLFIELDS = 'All Fields';\n\nexport const LIVE_CONSTANTS = {\n 'EMPTY_KEY': 'EMPTY_NULL_FILTER',\n 'EMPTY_VALUE': 'No Value',\n 'LABEL_KEY': 'key',\n 'LABEL_VALUE': 'value',\n 'NULL_EMPTY': ['null', 'empty'],\n 'NULL': 'null',\n 'EMPTY': 'empty'\n};\n\n// Returns true if widget is autocomplete or chips\nexport function isSearchWidgetType(widget) {\n return includes([FormWidgetType.AUTOCOMPLETE, FormWidgetType.TYPEAHEAD, FormWidgetType.CHIPS], widget);\n}\n\nfunction onSuccess(response, res, rej) {\n if (response.error) {\n rej(response);\n } else {\n res(response);\n }\n}\n\nexport function performDataOperation(dataSource, requestData, options): Promise<any> {\n return new Promise((res, rej) => {\n if (dataSource.execute(DataSource.Operation.SUPPORTS_CRUD)) {\n let fn;\n const operationType = options.operationType;\n switch (operationType) {\n case Live_Operations.UPDATE:\n fn = DataSource.Operation.UPDATE_RECORD;\n break;\n case Live_Operations.INSERT:\n fn = DataSource.Operation.INSERT_RECORD;\n break;\n case Live_Operations.DELETE:\n fn = DataSource.Operation.DELETE_RECORD;\n break;\n }\n dataSource.execute(fn, requestData).then(response => onSuccess(response, res, rej), rej);\n } else if (dataSource.execute(DataSource.Operation.IS_API_AWARE)) {\n if(dataSource.category === \"wm.CrudVariable\") {\n const operation = options.operationType === 'insert' ? 'create' : (options.operationType === 'delete' ? 'delete' : 'update');\n dataSource.execute(DataSource.Operation.INVOKE, {\n 'skipNotification': true,\n 'operation': operation,\n 'inputFields': requestData\n }).then(res, rej);\n } else {\n dataSource.execute(DataSource.Operation.SET_INPUT, requestData);\n dataSource.execute(DataSource.Operation.INVOKE, {\n 'skipNotification': true\n }).then(res, rej);\n }\n } else {\n res(requestData);\n }\n });\n}\n\nexport function refreshDataSource(dataSource, options): Promise<any> {\n return new Promise((res, rej) => {\n if (!dataSource) {\n rej();\n return;\n }\n dataSource.execute(DataSource.Operation.LIST_RECORDS, {\n 'filterFields': options.filterFields || {},\n 'orderBy': options.orderBy,\n 'page': options.page || 1,\n 'logicalOp' : options.condition || ''\n }).then(res, rej);\n });\n}\n\n/**\n * @ngdoc function\n * @name wm.widgets.live.fetchRelatedFieldData\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * This function fetches the data for the related field in live form/ grid\n *\n * @param {object} columnDef field definition\n * @param {string} relatedField related field name\n * @param {string} datafield Datafield to be set on widget\n * @param {string} widget Type of the widget\n * @param {object} elScope element scope\n * @param {object} parentScope live form// grid scope\n */\nexport function fetchRelatedFieldData(dataSource, formField, options) {\n let primaryKeys;\n let displayField;\n const relatedField = options.relatedField;\n const datafield = options.datafield;\n\n if (!dataSource) {\n return;\n }\n primaryKeys = dataSource.execute(DataSource.Operation.GET_RELATED_PRIMARY_KEYS, relatedField);\n formField.datafield = datafield;\n formField._primaryKey = isEmpty(primaryKeys) ? undefined : primaryKeys[0];\n formField.compareby = primaryKeys && primaryKeys.join(',');\n\n displayField = datafield === ALLFIELDS ? undefined : datafield;\n formField.displayfield = displayField = (formField.displayfield || displayField || formField._primaryKey);\n\n if (isSearchWidgetType(formField[options.widget])) {\n formField.dataoptions = { 'relatedField': relatedField, 'filterExpr': formField.filterexpressions ? formField.filterexpressions : {} };\n formField.datasource = dataSource;\n formField.searchkey = formField.searchkey || displayField;\n formField.displaylabel = formField.displayfield = (formField.displaylabel || displayField);\n if (formField.showPendingSpinner) {\n formField.showPendingSpinner = false;\n }\n } else {\n interpolateBindExpressions(formField.viewParent, formField.filterexpressions, (filterexpressions) => {\n formField.filterexpressions = filterexpressions;\n dataSource.execute(DataSource.Operation.GET_RELATED_TABLE_DATA, {\n relatedField,\n pagesize: formField.limit,\n orderBy: formField.orderby ? replace(formField.orderby, /:/g, ' ') : '',\n filterFields: {},\n filterExpr: formField.filterexpressions ? formField.filterexpressions : {}\n }).then(response => {\n formField.dataset = response.data;\n formField.displayfield = formField.displayfield || head(keys(get(response, '[0]')));\n if (formField.showPendingSpinner) {\n formField.showPendingSpinner = false;\n }\n }, noop);\n });\n }\n}\n\n/**\n * used to interpolate the bind expression for keys in the query builder\n * @param context where we find the variable obj\n * @param filterexpressions - obj containing all the rule objs\n * @param callbackFn - function to be called with the new replaced values if any in the filterexpressions object\n */\nexport const interpolateBindExpressions = (context, filterexpressions, callbackFn) => {\n const debouncedFn = debounce(() => {\n if (isFunction(callbackFn)) {\n callbackFn(filterexpressions);\n }\n }, 300);\n\n /**\n * calling the debounced function first for the case where if there is any filterexpression without the bindedvariables.\n * without this it will never be called. processFilterExpBindNode will be called only for the binded variable expressions.\n */\n debouncedFn();\n const filterExpressions = filterexpressions ? (isObject(filterexpressions) ? filterexpressions : JSON.parse(filterexpressions)) : {};\n const destroyFn = context.registerDestroyListener ? context.registerDestroyListener.bind(context) : noop;\n const filterSubscription = processFilterExpBindNode(context, filterExpressions).subscribe((response: any) => {\n filterexpressions = JSON.stringify(response.filterExpressions);\n debouncedFn();\n });\n destroyFn(() => filterSubscription.unsubscribe());\n};\n/**\n * @ngdoc function\n * @name wm.widgets.live.LiveWidgetUtils#getDistinctFieldProperties\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * Returns the properties required for dataset widgets\n *\n * @param {object} dataSource variable source for the widget\n * @param {object} formField definition of the column/ field\n *\n */\nexport const getDistinctFieldProperties = (dataSource, formField) => {\n const props: any = {};\n let fieldColumn;\n if (formField['is-related']) {\n props.tableName = formField['lookup-type'];\n fieldColumn = formField['lookup-field'];\n props.distinctField = fieldColumn;\n props.aliasColumn = fieldColumn.replace('.', '$'); // For related fields, In response . is replaced by $\n props.filterExpr = formField.filterexpressions ? (isObject(formField.filterexpressions) ? formField.filterexpressions : JSON.parse(formField.filterexpressions)) : {};\n } else {\n props.tableName = dataSource.execute(DataSource.Operation.GET_ENTITY_NAME);\n fieldColumn = formField.field || formField.key;\n props.distinctField = fieldColumn;\n props.aliasColumn = fieldColumn;\n }\n return props;\n};\n\n/**\n * @ngdoc function\n * @name wm.widgets.live.LiveWidgetUtils#getDistinctValues\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * Returns the distinct values for a field\n *\n * @param {object} formField definition of the column/ field\n * @param {string} widget widget property on the field\n * @param {object} variable variable for the widget\n * @param {function} callBack Function to be executed after fetching results\n *\n */\nexport function getDistinctValues(dataSource, formField, widget) {\n let props;\n\n return new Promise((res, rej) => {\n if (isDataSetWidget(formField[widget]) && (!formField.isDataSetBound || widget === 'filterwidget')) {\n props = getDistinctFieldProperties(dataSource, formField);\n dataSource.execute(DataSource.Operation.GET_DISTINCT_DATA_BY_FIELDS, {\n fields: props.distinctField,\n entityName: props.tableName,\n pagesize: formField.limit,\n filterExpr: formField.filterexpressions ? JSON.parse(formField.filterexpressions) : {}\n }).then(response => {\n res({ 'field': formField, 'data': response.data, 'aliasColumn': props.aliasColumn });\n }, rej);\n }\n });\n}\n\n// Set the data field properties on dataset widgets\nfunction setDataFields(formField, options?) {\n // For search widget, set search key and display label\n if (isSearchWidgetType(formField[options.widget])) {\n formField.datafield = options.aliasColumn || LIVE_CONSTANTS.LABEL_KEY;\n formField.searchkey = options.distinctField || LIVE_CONSTANTS.LABEL_KEY;\n formField.displaylabel = formField.displayfield = (options.aliasColumn || LIVE_CONSTANTS.LABEL_VALUE);\n return;\n }\n formField.datafield = LIVE_CONSTANTS.LABEL_KEY;\n formField.displayfield = LIVE_CONSTANTS.LABEL_VALUE;\n}\n\n/**\n * @ngdoc function\n * @name wm.widgets.live.LiveWidgetUtils#setFieldDataSet\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * Function to set the dataSet on the fields\n *\n * @param {object} formField definition of the column/ field\n * @param {object} data data returned from the server\n * @param {string} aliasColumn column field name\n * @param {string} widget widget property on the field\n * @param {boolean} isEnableEmptyFilter is null or empty values allowed on filter\n *\n */\nfunction setFieldDataSet(formField, data, options?) {\n const emptySupportWidgets = [FormWidgetType.SELECT, FormWidgetType.RADIOSET];\n const emptyOption = {};\n const dataSet = [];\n if (options.isEnableEmptyFilter && includes(emptySupportWidgets, formField[options.widget]) &&\n !formField['is-range'] && !formField.multiple) {\n // If empty option is selected, push an empty object in to dataSet\n emptyOption[LIVE_CONSTANTS.LABEL_KEY] = LIVE_CONSTANTS.EMPTY_KEY;\n emptyOption[LIVE_CONSTANTS.LABEL_VALUE] = options.EMPTY_VALUE || LIVE_CONSTANTS.EMPTY_VALUE;\n dataSet.push(emptyOption);\n }\n each(data, key => {\n const value = key[options.aliasColumn];\n const option = {};\n if (value !== null && value !== '') {\n option[LIVE_CONSTANTS.LABEL_KEY] = value;\n option[LIVE_CONSTANTS.LABEL_VALUE] = value;\n dataSet.push(option);\n }\n });\n setDataFields(formField, options);\n formField.dataset = dataSet;\n}\n\n/**\n * @ngdoc function\n * @name wm.widgets.live.LiveWidgetUtils#fetchDistinctValues\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * Function to fetch the distinct values for a field\n *\n * @param {object} scope scope of the widget\n * @param {object} formFields definitions of the column/ field\n * @param {string} widget widget property on the field\n * @param {boolean} isEnableEmptyFilter is null or empty values allowed on filter\n *\n */\nexport function fetchDistinctValues(dataSource, formFields, options) {\n if (isEmpty(formFields)) {\n return;\n }\n formFields.forEach(formField => {\n getDistinctValuesForField(dataSource, formField, options);\n });\n}\n\n/**\n * @ngdoc function\n * @name wm.widgets.live.LiveWidgetUtils#getDistinctValuesForField\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * Function to fetch the distinct values for a field\n *\n * @param {object} scope scope of the widget\n * @param {object} formFields definitions of the column/ field\n * @param {string} widget widget property on the field\n * @param {boolean} isEnableEmptyFilter is null or empty values allowed on filter\n *\n */\nexport function getDistinctValuesForField(dataSource, formField, options?) {\n if (!dataSource || !formField || formField.isDataSetBound) {\n return;\n }\n if (isSearchWidgetType(formField[options.widget])) {\n const dataoptions = getDistinctFieldProperties(dataSource, formField);\n formField.dataoptions = dataoptions;\n setDataFields(formField, Object.assign(options || {}, dataoptions));\n formField.datasource = dataSource;\n } else {\n interpolateBindExpressions(formField.viewParent, formField.filterexpressions, (filterexpressions) => {\n formField.filterexpressions = filterexpressions;\n getDistinctValues(dataSource, formField, options.widget).then((res: any) => {\n setFieldDataSet(res.field, res.data, {\n aliasColumn: res.aliasColumn,\n widget: options.widget,\n isEnableEmptyFilter: getEnableEmptyFilter(options.enableemptyfilter),\n EMPTY_VALUE: options.EMPTY_VALUE\n });\n });\n });\n }\n}\n\nfunction isDefinedAndNotEmpty(val) {\n return isDefined(val) && val !== '' && val !== null;\n}\n\n/**\n * @ngdoc function\n * @name wm.widgets.live.getRangeFieldValue\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * Function to get the field value for range\n *\n * @param {string} minValue min value selected\n * @param {string} maxValue max value selected\n */\nexport function getRangeFieldValue(minValue, maxValue) {\n let fieldValue;\n if (isDefinedAndNotEmpty(minValue) && isDefinedAndNotEmpty(maxValue)) {\n fieldValue = [minValue, maxValue];\n } else if (isDefinedAndNotEmpty(minValue)) {\n fieldValue = minValue;\n } else if (isDefinedAndNotEmpty(maxValue)) {\n fieldValue = maxValue;\n }\n return fieldValue;\n}\n/**\n * @ngdoc function\n * @name wm.widgets.live.getRangeMatchMode\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * Function to get the match mode for range\n *\n * @param {string} minValue min value selected\n * @param {string} maxValue max value selected\n */\nexport function getRangeMatchMode(minValue, maxValue) {\n let matchMode;\n // If two values exists, then it is between. Otherwise, greater or lesser\n if (isDefinedAndNotEmpty(minValue) && isDefinedAndNotEmpty(maxValue)) {\n matchMode = MatchMode.BETWEEN;\n } else if (isDefinedAndNotEmpty(minValue)) {\n matchMode = MatchMode.GREATER;\n } else if (isDefinedAndNotEmpty(maxValue)) {\n matchMode = MatchMode.LESSER;\n }\n return matchMode;\n}\n/**\n * @ngdoc function\n * @name wm.widgets.live.getEnableEmptyFilter\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * This function checks if enable filter options is set on live filter\n *\n * @param {object} enableemptyfilter empty filter options\n */\nexport function getEnableEmptyFilter(enableemptyfilter) {\n return enableemptyfilter && intersection(enableemptyfilter.split(','), LIVE_CONSTANTS.NULL_EMPTY).length > 0;\n}\n/**\n * @ngdoc function\n * @name wm.widgets.live.getEmptyMatchMode\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * Function to get the match mode based on the filter selected\n *\n * @param {object} enableemptyfilter empty filter options\n */\nexport function getEmptyMatchMode(enableemptyfilter) {\n let matchMode;\n const emptyFilterOptions = split(enableemptyfilter, ',');\n if (intersection(emptyFilterOptions, LIVE_CONSTANTS.NULL_EMPTY).length === 2) {\n matchMode = MatchMode.NULLOREMPTY;\n } else if (includes(emptyFilterOptions, LIVE_CONSTANTS.NULL)) {\n matchMode = MatchMode.NULL;\n } else if (includes(emptyFilterOptions, LIVE_CONSTANTS.EMPTY)) {\n matchMode = MatchMode.EMPTY;\n }\n return matchMode;\n}\n\n/**\n * converts the data passed to array.\n * -> Array: [1,2,3] - [1,2,3]\n * -> String: a,b,c - ['a','b','c']\n * -> object: {a:1} - [{a:1}]\n * -> null - []\n * -> undefined - []\n * @param data\n * @returns {Array<any>}\n */\nexport const createArrayFrom = (data): Array<any> => {\n\n if (isUndefined(data) || isNull(data)) {\n return [];\n }\n\n if (isString(data)) {\n data = data.split(',').map(Function.prototype.call, String.prototype.trim);\n }\n\n if (!isArray(data)) {\n data = [data];\n }\n\n return data;\n};\n\n/**\n * @ngdoc function\n * @name wm.widgets.live.applyFilterOnField\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * Function to get the updated values when filter on field is changed\n *\n * @param {object} $scope scope of the filter field/form field\n * @param {object} filterDef filter/form definition of the field\n * @param {boolean} isFirst boolean value to check if this method is called on load\n */\nexport function applyFilterOnField(dataSource, filterDef, formFields, newVal, options: any = {}) {\n const fieldName = filterDef.field || filterDef.key;\n const filterOnFields = filter(formFields, {'filter-on': fieldName});\n\n newVal = filterDef['is-range'] ? getRangeFieldValue(filterDef.minValue, filterDef.maxValue) : (isDefined(newVal) ? newVal : filterDef.value);\n if (!dataSource || (options.isFirst && (isUndefined(newVal) || newVal === ''))) {\n return;\n }\n // Loop over the fields for which the current field is filter on field\n forEach(filterOnFields, filterField => {\n const filterKey = filterField.field || filterField.key;\n const lookUpField = filterDef['lookup-field'] || filterDef._primaryKey;\n const filterWidget = filterField['edit-widget-type'] || filterField.widgettype;\n let filterFields = {};\n let filterOn = filterField['filter-on'];\n let filterVal;\n let fieldColumn;\n let matchMode;\n if (!isDataSetWidget(filterWidget) || filterField.isDataSetBound || filterOn === filterKey) {\n return;\n }\n // For related fields, add lookupfield for query generation\n if (filterDef && filterDef['is-related']) {\n filterOn += '.' + lookUpField;\n }\n if (isDefined(newVal)) {\n if (filterDef['is-range']) {\n matchMode = getRangeMatchMode(filterDef.minValue, filterDef.maxValue);\n } else if (getEnableEmptyFilter(options.enableemptyfilter) && newVal === LIVE_CONSTANTS.EMPTY_KEY) {\n matchMode = getEmptyMatchMode(options.enableemptyfilter);\n } else {\n matchMode = MatchMode.EQUALS;\n }\n filterVal = (isObject(newVal) && !isArray(newVal)) ? newVal[lookUpField] : newVal;\n filterFields[filterOn] = {\n 'value': filterVal,\n 'matchMode': matchMode\n };\n } else {\n filterFields = {};\n }\n fieldColumn = filterKey;\n\n if (isSearchWidgetType(filterWidget) && filterField.dataoptions) {\n filterField.dataoptions.filterFields = filterFields;\n } else {\n dataSource.execute(DataSource.Operation.GET_DISTINCT_DATA_BY_FIELDS, {\n 'fields': fieldColumn,\n 'filterFields': filterFields,\n 'pagesize': filterField.limit\n }).then(response => {\n setFieldDataSet(filterField, response.data, {\n aliasColumn: fieldColumn,\n widget: options.widget || 'widgettype',\n isEnableEmptyFilter: getEnableEmptyFilter(options.enableemptyfilter),\n EMPTY_VALUE: options.EMPTY_VALUE\n });\n }, noop);\n }\n });\n}\n\n// Transform data as required by data table\nexport function transformData(dataObject, variableName) {\n let newObj,\n tempArr,\n keys,\n oldKeys,\n numKeys,\n newObject,\n tempObj;\n\n // data sanity testing\n dataObject = dataObject || [];\n // if the dataObject is not an array make it an array\n if (!isArray(dataObject)) {\n // if the data returned is of type string, make it an object inside an array\n if (isString(dataObject)) {\n keys = variableName.substring(variableName.indexOf('.') + 1, variableName.length).split('.');\n oldKeys = [];\n numKeys = keys.length;\n newObject = {};\n tempObj = newObject;\n\n // loop over the keys to form appropriate data object required for grid\n keys.forEach((key, index) => {\n // loop over old keys to create new object at the iterative level\n oldKeys.forEach(oldKey => {\n tempObj = newObject[oldKey];\n });\n tempObj[key] = index === numKeys - 1 ? dataObject : {};\n oldKeys.push(key);\n });\n\n // change the string data to the new dataObject formed\n dataObject = newObject;\n }\n dataObject = [dataObject];\n } else {\n /*if the dataObject is an array and each value is a string, then lite-transform the string to an object\n * lite-transform: just checking if the first value is string and then transforming the object, instead of traversing through the whole array\n * */\n if (isString(dataObject[0])) {\n tempArr = [];\n forEach(dataObject, str => {\n newObj = {};\n newObj[variableName.split('.').join('-')] = str;\n tempArr.push(newObj);\n });\n dataObject = tempArr;\n }\n }\n return dataObject;\n}\n","import { $parseEvent, getClonedObject, getFormattedDate, isDefined, isEqualWithFields } from '@wm/core';\n\nimport { getEvaluatedData, getObjValueByKey } from './widget-utils';\n\nimport { ALLFIELDS } from './data-utils';\nimport { ToDatePipe } from '../pipes/custom-pipes';\nimport {\n cloneDeep,\n filter,\n forEach, get, groupBy, includes,\n isArray, isEqual,\n isNull,\n isObject,\n isString,\n isUndefined, keys,\n orderBy as _orderBy, sortBy,\n split, toLower,\n trim, uniqBy, uniqWith, values\n} from \"lodash-es\";\n\ndeclare const $;\ndeclare const moment;\n\nconst momentLocale = moment.localeData();\nconst momentCalendarOptions = getClonedObject(momentLocale._calendar);\nconst momentCalendarDayOptions = momentLocale._calendarDay || {\n lastDay: '[Yesterday]',\n lastWeek: '[Last] dddd',\n nextDay: '[Tomorrow]',\n nextWeek: 'dddd',\n sameDay: '[Today]',\n sameElse: 'L'\n };\nconst GROUP_BY_OPTIONS = {\n ALPHABET: 'alphabet',\n WORD: 'word',\n OTHERS: 'Others'\n };\nconst TIME_ROLLUP_OPTIONS = {\n HOUR: 'hour',\n DAY: 'day',\n WEEK: 'week',\n MONTH: 'month',\n YEAR: 'year'\n };\nconst ROLLUP_PATTERNS = {\n DAY: 'yyyy-MM-dd',\n WEEK: 'w \\'Week\\', yyyy',\n MONTH: 'MMM, yyyy',\n YEAR: 'YYYY',\n HOUR: 'hh:mm a'\n };\n\n/**\n * function to get the ordered dataset based on the given orderby\n */\nexport const getOrderedDataset = (dataSet: any, orderBy: string, innerItem?) => {\n if (!orderBy) {\n return cloneDeep(dataSet);\n }\n\n // The order by only works when the dataset contains list of objects.\n const items = orderBy.split(','),\n fields = [],\n directions = [];\n items.forEach(obj => {\n const item = obj.split(':');\n fields.push(innerItem ? innerItem + '.' + item[0] : item[0]);\n directions.push(item[1]);\n });\n return _orderBy(dataSet, fields, directions);\n};\n\n/**\n * Returns an array of object, each object contain the DataSetItem whose key, value, label are extracted from object keys.\n */\nexport const transformDataWithKeys = (dataSet: any) => {\n const data: DataSetItem[] = [];\n // if the dataset is instance of object (not an array) or the first item in the dataset array is an object,\n // then we extract the keys from the object and prepare the dataset items.\n if (isObject(dataSet[0]) || (isObject(dataSet) && !(dataSet instanceof Array))) {\n // getting keys of the object\n const objectKeys = Object.keys(dataSet[0] || dataSet);\n forEach(objectKeys, (objKey, index) => {\n data.push({\n key: objKey,\n label: objKey,\n value: objKey,\n index: index + 1\n });\n });\n }\n\n return data;\n};\n\n// Converts any type of data to array.\nexport const extractDataAsArray = data => {\n\n if (isUndefined(data) || isNull(data) || trim(data) === '') {\n return [];\n }\n\n if (isString(data)) {\n data = split(data, ',').map(str => str.trim());\n }\n\n if (!isArray(data)) {\n data = [data];\n }\n\n return data;\n};\n\n// This function return always an object containing dataset details.\nexport const convertDataToObject = dataResult => {\n if (isString(dataResult)) {\n dataResult = split(dataResult, ',').map(str => str.trim());\n }\n\n return dataResult;\n};\n\n// This function used to check the search type widget\nconst isSeachWidget = (widgetType) => {\n return widgetType === 'wm-search';\n};\n\n// This function is used to set the groupby field for search/autocomplete\nconst setGroupbyKey = (scope, context, dataSetItem, innerItem) => {\n if (scope && isSeachWidget(scope.widgetType)) {\n if (scope.groupby) {\n if (includes(scope.groupby, '(')) {\n //[Todo-CSP]: can generate expr fn in page based on groupby property on widget\n const groupDataByUserDefinedFn = $parseEvent(scope.groupby);\n (dataSetItem as any).groupby = groupDataByUserDefinedFn(context, {'row': dataSetItem.dataObject || dataSetItem});\n } else {\n (dataSetItem as any).groupby = groupDataByField(scope.groupby, scope.match, innerItem, scope.dateformat, scope.datePipe, scope.appDefaults, dataSetItem);\n }\n } else {\n (dataSetItem as any).groupby = '';\n }\n }\n};\n\n/**\n * The first step in datasetItems creation is data transformation:\n *\n * The dataset can contain one of the following formats and each of them to be converted to the given format;\n *\n * 1) The comma separated string..eg: A,B,C => [{ key: 'A', value: 'A'}, { key: 'B', value: 'B'}, { key: 'C', value: 'C'}]\n * 2) The array of values eg: [1,2,3] => [{ key: 1, value: 1}, { key: 2, value: 2}, { key: 3, value: 3}]\n * 3) an object eg: {name: 'A', age: 20} => [ {key: 'name', value: 'A'}, {key: 'age', value: 20}]\n * 4) an array of objects...eg: [ {name: 'A', age: 20}, {name: 'B', age: 20}] ==> returns [{key: _DATAFIELD_, value: _DISPLAYFIELD, label: _DISPLAYVALUE}]\n */\nexport const transformFormData = (context: any, dataSet: any, myDataField?: string, displayOptions?, startIndex?: number, scope?: any): Array<DataSetItem> => {\n const data = [];\n if (!dataSet) {\n return;\n }\n dataSet = convertDataToObject(dataSet);\n\n // startIndex is the index of the next new item.\n if (isUndefined(startIndex)) {\n startIndex = 1;\n }\n\n if (isString(dataSet)) {\n dataSet = dataSet.split(',').map(str => str.trim());\n dataSet.forEach((option, index) => {\n const dataSetItem = {key: option, value: option, label: (isDefined(option) && option !== null) ? option.toString() : '', index: startIndex + index};\n setGroupbyKey(scope, context, dataSetItem, 'value');\n data.push(dataSetItem);\n });\n } else if (isArray(dataSet) && !isObject(dataSet[0])) { // array of primitive values only\n dataSet.forEach((option, index) => {\n const dataSetItem = {key: option, value: option, label: (isDefined(option) && option !== null) ? option.toString() : '', index: startIndex + index};\n setGroupbyKey(scope, context, dataSetItem, 'value');\n data.push(dataSetItem);\n });\n } else if (!(dataSet instanceof Array) && isObject(dataSet)) {\n const i = 0;\n forEach(dataSet, (value, key) => {\n // @ts-ignore\n const dataSetItem = {key: trim(key), value: key, label: (isDefined(value) && value !== null) ? value.toString() : '',\n index: startIndex,\n dataObject: dataSet\n };\n setGroupbyKey(scope, context, dataSetItem, 'value');\n data.push(dataSetItem);\n });\n } else {\n if (!myDataField) { // consider the datafield as 'ALLFIELDS' when datafield is not given.\n myDataField = ALLFIELDS;\n }\n dataSet.forEach((option, index) => {\n const key = myDataField === ALLFIELDS ? startIndex + index : getObjValueByKey(option, myDataField);\n // Omit all the items whose datafield (key) is null or undefined.\n if (!isUndefined(key) && !isNull(key)) {\n const label = getEvaluatedData(option, {\n field: displayOptions.displayField,\n expression: displayOptions.displayExpr,\n bindExpression: displayOptions.bindDisplayExpr\n }, context);\n const dataSetItem = {\n key: key,\n label: (isDefined(label) && label !== null) ? label.toString() : '',\n value: myDataField === ALLFIELDS ? option : key,\n dataObject: option, // represents the object when datafield is ALLFIELDS. This is used as innerItem while grouping the datasetItems.\n index: startIndex + index\n };\n if (displayOptions.displayImgSrc || displayOptions.bindDisplayImgSrc) {\n (dataSetItem as any).imgSrc = getEvaluatedData(option, {\n expression: displayOptions.displayImgSrc,\n bindExpression: displayOptions.bindDisplayImgSrc\n }, context);\n }\n setGroupbyKey(scope, context, dataSetItem, 'dataObject');\n\n data.push(dataSetItem);\n }\n });\n }\n return data;\n};\n\n/**\n * Private method to get the unique objects by the data field\n */\nexport const getUniqObjsByDataField = (data: Array<DataSetItem>, dataField: string, displayField: string, allowEmptyFields?: boolean) => {\n let uniqData;\n const isAllFields = dataField === ALLFIELDS;\n\n uniqData = isAllFields ? uniqWith(data, isEqual) : uniqBy(data, 'key');\n\n if (!displayField || allowEmptyFields) {\n return uniqData;\n }\n\n // return objects having non empty datafield and display field values.\n return filter(uniqData, (obj) => {\n if (isAllFields) {\n return trim(obj.label);\n }\n return trim(obj.key) && trim(obj.label);\n });\n};\n\n/**\n * This function sets the selectedItem by comparing the field values, where fields are passed by \"compareby\" property.\n * works only for datafield with ALL_FIELDS\n * @param datasetItems list of dataset items.\n * @param compareWithDataObj represents the datavalue (object) whose properties are to be checked against each property of datasetItem.\n * @param compareByField specifies the property names on which datasetItem has to be compared against datavalue object.\n */\nexport const setItemByCompare = (datasetItems: Array<DataSetItem>, compareWithDataObj: Object, compareByField: string) => {\n // compare the fields based on fields given to compareby property.\n forEach(datasetItems, opt => {\n if (isEqualWithFields(opt.value, compareWithDataObj, compareByField)) {\n opt.selected = true;\n return false;\n }\n });\n};\n\n/**\n * This method returns sorted data based to groupkey.\n * Returns a array of objects, each object containing key which is groupKey and data is the sorted data which is sorted by groupby field in the data.\n *\n * @param groupedLiData, grouped data object with key as the groupKey and its value as the array of objects grouped under the groupKey.\n * @param groupBy, string groupby property\n * @returns {any[]}\n */\nconst getSortedGroupedData = (groupedLiData: Object, groupBy: string, orderby: string) => {\n const _groupedData = [];\n forEach(keys(groupedLiData), (groupkey, index) => {\n const liData = getOrderedDataset(groupedLiData[groupkey], orderby, 'dataObject');\n _groupedData.push({\n key: groupkey,\n data: sortBy(liData, data => {\n data._groupIndex = index + 1;\n return get(data, groupBy) || get(data.dataObject, groupBy);\n })\n });\n });\n return _groupedData;\n};\n\n/**\n * This method gets the groupedData using groupby property and match and returns the sorted array of objects.\n *\n * @param compRef represents the component's reference i.e. \"this\" value.\n * @param data represents the dataset i.e array of objects.\n * @param groupby, string groupby property\n * @param match, string match property\n * @param orderby, string orderby property\n * @param dateformat, string dateFormat property\n * @param innerItem, represents the innerItem on which groupby has to be applied. Incase of datasetItems, 'dataObject' contains the full object. Here innerItem is dataObject.\n * @returns {any[]} groupedData, array of objects, each object having key and data.\n */\nexport const groupData = (compRef: any, data: Array<Object | DataSetItem>, groupby: string, match: string, orderby: string, dateformat: string, datePipe: ToDatePipe, innerItem?: string, AppDefaults?: any) => {\n let groupedLiData = {};\n if (includes(groupby, '(')) {\n //[Todo-CSP]: can generate expr fn in page based on groupby property on widget\n const groupDataByUserDefinedFn = $parseEvent(groupby);\n groupedLiData = groupBy(data, val => {\n // @ts-ignore\n return groupDataByUserDefinedFn(compRef.viewParent, {'row': val.dataObject || val});\n });\n } else {\n groupedLiData = getGroupedData(data, groupby, match, orderby, dateformat, datePipe, innerItem, AppDefaults);\n }\n\n return getSortedGroupedData(groupedLiData, groupby, orderby);\n};\n\n/**\n * This method prepares the grouped data.\n *\n * @param fieldDefs array of objects i.e. dataset\n * @param groupby string groupby\n * @param match string match\n * @param orderby string orderby\n * @param dateFormat string date format\n * @param innerItem, item to look for in the passed data\n */\nconst getGroupedData = (fieldDefs: Array<Object | DataSetItem>, groupby: string, match: string, orderby: string, dateFormat: string, datePipe: ToDatePipe, innerItem?: string, AppDefaults?: any) => {\n // For day, set the relevant moment calendar options\n if (match === TIME_ROLLUP_OPTIONS.DAY) {\n momentLocale._calendar = momentCalendarDayOptions;\n }\n\n // handling case-in-sensitive scenario\n // ordering the data based on groupby field. If there is innerItem then apply orderby using the innerItem's containing the groupby field.\n fieldDefs = _orderBy(fieldDefs, fieldDef => {\n const groupKey = get(innerItem ? fieldDef[innerItem] : fieldDef, groupby);\n if (groupKey) {\n return toLower(groupKey);\n }\n });\n\n // extract the grouped data based on the field obtained from 'groupDataByField'.\n const groupedLiData = groupBy(fieldDefs, groupDataByField.bind(undefined, groupby, match, innerItem, dateFormat, datePipe, AppDefaults));\n\n momentLocale._calendar = momentCalendarOptions; // Reset to default moment calendar options\n\n return groupedLiData;\n};\n\n// Format the date with given date format\nexport const filterDate = (value: string | number, format: string, defaultFormat: string, datePipe: ToDatePipe) => {\n if (format === 'timestamp') { // For timestamp format, return the epoch value\n return value;\n }\n\n return getFormattedDate(datePipe, value, format || defaultFormat);\n};\n\n\n/**\n * This method returns the groupkey based on the rollup (match) passed\n *\n * @param concatStr, string containing groupby field value\n * @param rollUp string containing the match property.\n * @param dateformat string containing the date format to display the date.\n */\nconst getTimeRolledUpString = (concatStr: string, rollUp: string, dateformat: string, datePipe?: ToDatePipe, AppDefaults?: any) => {\n let groupByKey,\n strMoment = moment(concatStr),\n dateFormat = dateformat;\n\n const currMoment = moment(),\n getSameElseFormat = function () { // Set the sameElse option of moment calendar to user defined pattern\n return '[' + filterDate(this.valueOf(), dateFormat, ROLLUP_PATTERNS.DAY, datePipe) + ']';\n };\n\n switch (rollUp) {\n case TIME_ROLLUP_OPTIONS.HOUR:\n dateFormat = dateFormat || AppDefaults.timeFormat;\n\n // If date is invalid, check if data is in form of hh:mm a\n if (!strMoment.isValid()) {\n strMoment = moment(new Date().toDateString() + ' ' + concatStr);\n\n if (strMoment.isValid()) {\n // As only time is present, roll up at the hour level with given time format\n momentLocale._calendar.sameDay = function () {\n return '[' + filterDate(this.valueOf(), dateFormat, ROLLUP_PATTERNS.HOUR, datePipe) + ']';\n };\n }\n }\n // round off to nearest last hour\n strMoment = strMoment.startOf('hour');\n momentLocale._calendar.sameElse = getSameElseFormat;\n groupByKey = strMoment.calendar(currMoment);\n break;\n case TIME_ROLLUP_OPTIONS.WEEK:\n groupByKey = filterDate(strMoment.valueOf(), dateFormat, ROLLUP_PATTERNS.WEEK, datePipe);\n break;\n case TIME_ROLLUP_OPTIONS.MONTH:\n groupByKey = filterDate(strMoment.valueOf(), dateFormat, ROLLUP_PATTERNS.MONTH, datePipe);\n break;\n case TIME_ROLLUP_OPTIONS.YEAR:\n groupByKey = strMoment.format(ROLLUP_PATTERNS.YEAR);\n break;\n case TIME_ROLLUP_OPTIONS.DAY:\n dateFormat = dateFormat || AppDefaults.dateFormat;\n strMoment = strMoment.startOf('day'); // round off to current day\n momentLocale._calendar.sameElse = getSameElseFormat;\n groupByKey = strMoment.calendar(currMoment);\n break;\n }\n // If invalid date is returned, Categorize it as Others.\n if (groupByKey === 'Invalid date') {\n return GROUP_BY_OPTIONS.OTHERS;\n }\n return groupByKey;\n};\n\n\n// groups the fields based on the groupby value.\nconst groupDataByField = (groupby: string, match: string, innerItem: string, dateFormat: string, datePipe: ToDatePipe, AppDefaults: any, liData: Object) => {\n // get the groupby field value from the liData or innerItem in the liData.\n let concatStr = get(innerItem ? liData[innerItem] : liData, groupby);\n\n // by default set the undefined groupKey as 'others'\n if (isUndefined(concatStr) || isNull(concatStr) || concatStr.toString().trim() === '') {\n return GROUP_BY_OPTIONS.OTHERS;\n }\n\n // if match prop is alphabetic ,get the starting alphabet of the word as key.\n if (match === GROUP_BY_OPTIONS.ALPHABET) {\n concatStr = concatStr.substr(0, 1);\n }\n\n // if match contains the time options then get the concatStr using 'getTimeRolledUpString'\n if (includes(values(TIME_ROLLUP_OPTIONS), match)) {\n concatStr = getTimeRolledUpString(concatStr, match, dateFormat, datePipe, AppDefaults);\n }\n\n return concatStr;\n};\n\n/**\n * This method toggles all the list items inside the each list group.\n * @param el, component reference on which groupby is applied.\n */\nexport const toggleAllHeaders = (el: any) => {\n const groups = $(el.nativeElement).find('.item-group');\n\n groups.find('.group-list-item').toggle();\n\n // toggle the collapse icon on list header.\n const groupIcons = groups.find('li.list-group-header .app-icon');\n\n if (groupIcons) {\n forEach(groupIcons, (icon) => {\n const $icon = $(icon);\n if ($icon.hasClass('wi-chevron-down')) {\n $icon.removeClass('wi-chevron-down').addClass('wi-chevron-up');\n } else {\n $icon.removeClass('wi-chevron-up').addClass('wi-chevron-down');\n }\n });\n }\n};\n\n/**\n * On list header click, toggle the list items in this group.\n * and also toggle the header icon.\n * @param $event\n */\nexport const handleHeaderClick = ($event: Event) => {\n const selectedGroup = $($event.target as any).closest('.item-group'),\n selectedAppIcon = selectedGroup.find('li.list-group-header .app-icon');\n\n if (selectedAppIcon.hasClass('wi-chevron-down')) {\n selectedAppIcon.removeClass('wi-chevron-down').addClass('wi-chevron-up');\n } else {\n selectedAppIcon.removeClass('wi-chevron-up').addClass('wi-chevron-down');\n }\n\n selectedGroup.find('.group-list-item').toggle();\n};\n\n/**\n * configures reordering the items.\n * @param $el element to be sortable\n * @param options object containing the sortable options.\n * @param startCb callback on drag start on the element.\n * @param updateCb callback triggerred when sorting is stopped and the DOM position has changed.\n * @param sortCb callback triggerred during the sorting of an element.\n */\nexport const configureDnD = ($el: any, options: object, startCb: Function, updateCb: Function, sortCb?: Function) => {\n const sortOptions = Object.assign({\n containment: $el,\n delay: 100,\n opacity: 0.8,\n helper: 'clone',\n zIndex: 1050,\n tolerance: 'pointer',\n start: startCb,\n update: updateCb,\n sort: sortCb\n }, options);\n\n $el.sortable(sortOptions);\n};\n\n// Todo: convert to Class\ninterface DataSetProps {\n datafield: string;\n displayfield?: string;\n displayexpression?: string;\n usekeys?: boolean;\n orderby?: string;\n}\n\n/**\n * key represents the datafield value\n * label represents display value or expression value\n * value displayValue for primitives and data object for allFields\n * dataObject represent the object from the dataset when datafield is ALLFIELDS. This is used as innerItem while grouping the datasetItems.\n * imgSrc picture source\n * selected represents boolean to notify selected item.\n */\nexport class DataSetItem {\n key: any;\n label: any;\n value: any;\n dataObject?: Object;\n index?: number;\n imgSrc?: string;\n selected?: boolean;\n}\n","import { isNumberType, FormWidgetType, DataType, isMobileApp, isAndroid } from '@wm/core';\nimport {forEach, get, includes, split} from \"lodash-es\";\n\nconst VIEW_MODE_OPTIONS = {\n DEFAULT : 'default',\n LABEL : 'label'\n};\n\nexport const EDIT_MODE = {\n QUICK_EDIT : 'quickedit',\n INLINE : 'inline',\n FORM : 'form',\n DIALOG : 'dialog'\n};\n\n// Method to set the header config of the data table\nexport const setHeaderConfig = (headerConfig, config, field, index?: number): void => {\n forEach(headerConfig, cols => {\n if (get(cols, 'isGroup')) {\n if (cols.field === field) {\n cols.columns[index] = config;\n } else {\n setHeaderConfig(cols.columns, config, field, index);\n }\n }\n });\n};\n\nexport const setHeaderConfigForTable = (headerConfig: any, config: any, fieldName: string, index?: number): void => {\n if (fieldName) {\n setHeaderConfig(headerConfig, config, fieldName, index);\n } else {\n headerConfig[index] = config;\n }\n};\n\nexport const getRowOperationsColumn = (): any => {\n return {\n 'field' : 'rowOperations',\n 'type' : 'custom',\n 'displayName' : 'Actions',\n 'width' : '120px',\n 'readonly' : true,\n 'sortable' : false,\n 'searchable' : false,\n 'resizable' : false,\n 'selectable' : false,\n 'show' : true,\n 'operations' : [],\n 'opConfig' : {},\n 'pcDisplay' : true,\n 'mobileDisplay' : true,\n 'tabletDisplay' : true,\n 'include' : true,\n 'isRowOperation': true\n };\n};\n\n/**\n * Returns caption and widget bootstrap classes for the field\n */\nexport const getFieldLayoutConfig = (captionWidth, captionPosition, os): any => {\n let captionCls = '',\n widgetCls = '';\n\n captionPosition = captionPosition || 'top';\n\n if (captionPosition === 'top' || captionPosition === 'floating') {\n if ((os && os === 'android') || !isMobileApp() || isAndroid()) { // Is android or not a mobile application\n captionCls = widgetCls = 'col-xs-12';\n } else if (isMobileApp()) { // Is a mobile application and not android\n captionCls = 'col-xs-4';\n widgetCls = 'col-xs-8';\n }\n } else if (captionWidth) {\n // handling itemsperrow containing string of classes\n forEach(split(captionWidth, ' '), function (cls) {\n const keys = split(cls, '-'),\n tier = keys[0];\n let _captionWidth,\n widgetWidth;\n _captionWidth = parseInt(keys[1], 10);\n widgetWidth = 12 - _captionWidth;\n widgetWidth = widgetWidth <= 0 ? 12 : widgetWidth;\n captionCls += ' ' + 'col-' + tier + '-' + _captionWidth;\n widgetCls += ' ' + 'col-' + tier + '-' + widgetWidth;\n });\n }\n return {\n 'captionCls' : captionCls,\n 'widgetCls' : widgetCls\n };\n};\n\nexport const getDefaultViewModeWidget = widget => {\n if (includes(['checkbox', 'toggle', 'rating'], widget)) {\n return VIEW_MODE_OPTIONS.DEFAULT;\n }\n return VIEW_MODE_OPTIONS.LABEL;\n};\n\nconst parseBooleanValue = value => {\n if (value === 'true') {\n return true;\n }\n if (value === 'false') {\n return false;\n }\n if (/^\\d+$/.test(value)) { // Check if the value is a string of number type like '123'\n return +value;\n }\n return value;\n};\n\nexport const parseValueByType = (value, type, widget, trailingzero?) => {\n if (widget) {\n if (widget === FormWidgetType.NUMBER || widget === FormWidgetType.SLIDER || widget === FormWidgetType.CURRENCY) {\n return isNaN(Number(value)) ? null : trailingzero ? value : Number(value);\n }\n if (widget === FormWidgetType.CHECKBOX || widget === FormWidgetType.TOGGLE) {\n return parseBooleanValue(value);\n }\n return value;\n }\n if (isNumberType(type)) {\n return isNaN(Number(value)) ? null : Number(value);\n }\n if (type === DataType.BOOLEAN) {\n return parseBooleanValue(value);\n }\n return value;\n};\n\nconst fieldTypeWidgetTypeMap = {\n 'integer' : ['number', 'text', 'select', 'checkboxset', 'radioset', 'rating', 'slider', 'currency', 'autocomplete', 'chips'],\n 'big_integer': ['number', 'text', 'select', 'checkboxset', 'radioset', 'rating', 'slider', 'currency', 'autocomplete', 'chips'],\n 'short' : ['number', 'text', 'select', 'checkboxset', 'radioset', 'slider', 'currency', 'autocomplete', 'chips'],\n 'float' : ['number', 'text', 'select', 'checkboxset', 'radioset', 'slider', 'currency', 'autocomplete', 'chips'],\n 'big_decimal': ['number', 'text', 'select', 'checkboxset', 'radioset', 'slider', 'currency', 'autocomplete', 'chips'],\n 'number' : ['number', 'text', 'select', 'checkboxset', 'radioset', 'slider', 'currency', 'autocomplete', 'chips'],\n 'double' : ['number', 'text', 'select', 'checkboxset', 'radioset', 'slider', 'currency', 'autocomplete', 'chips'],\n 'long' : ['number', 'text', 'select', 'checkboxset', 'radioset', 'rating', 'slider', 'currency', 'autocomplete', 'chips'],\n 'byte' : ['number', 'text', 'select', 'checkboxset', 'radioset', 'slider', 'currency', 'autocomplete', 'chips'],\n 'string' : ['text', 'number', 'textarea', 'password', 'richtext', 'select', 'checkboxset', 'radioset', 'date', 'time', 'timestamp', 'switch', 'currency', 'autocomplete', 'chips', 'colorpicker'],\n 'character' : ['text', 'number', 'textarea', 'password', 'richtext', 'select', 'checkboxset', 'radioset', 'switch', 'currency', 'autocomplete', 'chips'],\n 'text' : ['text', 'number', 'textarea', 'password', 'richtext', 'select', 'checkboxset', 'radioset', 'date', 'time', 'timestamp', 'switch', 'currency', 'autocomplete', 'chips', 'colorpicker'],\n 'date' : ['date', 'text', 'number', 'select', 'checkboxset', 'radioset', 'autocomplete', 'chips'],\n 'time' : ['time', 'text', 'number', 'select', 'checkboxset', 'radioset', 'autocomplete', 'chips'],\n 'timestamp' : ['timestamp', 'text', 'number', 'select', 'checkboxset', 'radioset', 'autocomplete', 'chips'],\n 'datetime' : ['datetime', 'text', 'select', 'checkboxset', 'radioset', 'autocomplete', 'chips'],\n 'boolean' : ['checkbox', 'radioset', 'toggle', 'select'],\n 'list' : ['select', 'radioset', 'checkboxset', 'switch', 'autocomplete', 'chips'],\n 'clob' : ['text', 'textarea', 'richtext'],\n 'blob' : ['upload'],\n 'file' : ['upload'],\n 'custom' : ['text', 'number', 'textarea', 'password', 'checkbox', 'toggle', 'slider', 'richtext', 'currency', 'switch',\n 'select', 'checkboxset', 'radioset', 'date', 'time', 'timestamp', 'rating', 'datetime', 'autocomplete', 'chips', 'colorpicker']\n};\n\n// Get widgets applicable to the given type\nexport const getFieldTypeWidgetTypesMap = () => {\n return fieldTypeWidgetTypeMap;\n};\n\n// Get filter widget applicable to the given type\nexport const getDataTableFilterWidget = type => {\n let widget = fieldTypeWidgetTypeMap[type] && fieldTypeWidgetTypeMap[type][0];\n if (type === DataType.BOOLEAN) {\n widget = FormWidgetType.SELECT;\n }\n if (includes([FormWidgetType.TEXT, FormWidgetType.NUMBER, FormWidgetType.SELECT, FormWidgetType.AUTOCOMPLETE,\n FormWidgetType.DATE, FormWidgetType.TIME, FormWidgetType.DATETIME], widget)) {\n return widget;\n }\n return FormWidgetType.TEXT;\n};\n\n/**\n * @ngdoc function\n * @name wm.widgets.live.getEditModeWidget\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * This function returns the default widget for grid\n *\n * @param {object} colDef field definition\n */\nexport const getEditModeWidget = colDef => {\n if (colDef['related-entity-name'] && colDef['primary-key']) {\n return FormWidgetType.SELECT;\n }\n return (fieldTypeWidgetTypeMap[colDef.type] && fieldTypeWidgetTypeMap[colDef.type][0]) || FormWidgetType.TEXT;\n};\n\n/**\n * @ngdoc function\n * @name wm.widgets.live.LiveWidgetUtils#getDefaultValue\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * return the formatted default value\n *\n * @param {string} value value to be formatted\n * @param {string} type column type of the value\n */\nexport const getDefaultValue = (value, type, widget) => {\n if (widget) {\n if (widget === FormWidgetType.NUMBER || widget === FormWidgetType.SLIDER || widget === FormWidgetType.CURRENCY) {\n return isNaN(Number(value)) ? null : Number(value);\n }\n if (widget === FormWidgetType.CHECKBOX || widget === FormWidgetType.TOGGLE) {\n return parseBooleanValue(value);\n }\n return value;\n }\n if (isNumberType(type)) {\n return isNaN(Number(value)) ? null : Number(value);\n }\n if (type === DataType.BOOLEAN) {\n return parseBooleanValue(value);\n }\n return value;\n};\n","import {Inject, Injector, Optional} from '@angular/core';\n\nimport { Subject } from 'rxjs';\n\nimport {$appDigest, findValueOf, isObject, isDefined, validateAccessRoles} from '@wm/core';\nimport { SecurityService } from '@wm/security';\n\nimport { createArrayFrom } from '../../../utils/data-utils';\nimport { getEvaluatedData } from '../../../utils/widget-utils';\nimport { getOrderedDataset } from '../../../utils/form-utils';\nimport { StylableComponent } from './stylable.component';\nimport {debounce, first, get, isUndefined, omitBy, startsWith} from \"lodash-es\";\n\nconst getValidLink = (link) => {\n const routRegex = /^(\\/|#\\/|#)(?!\\W).*/;\n if (link) {\n if (routRegex.test(link)) {\n link = first(link.match(/[\\w]+.*/g)) || '';\n return `#/${link}`;\n }\n if (startsWith(link, 'www.')) {\n return `//${link}`;\n }\n return link;\n }\n};\n\nexport class DatasetAwareNavComponent extends StylableComponent {\n\n public nodes: Array<NavNode> = [];\n public dataset: any;\n public itemicon: string;\n public itemlabel: string;\n public itemlink: string;\n public itemtarget: string;\n public itembadge: string;\n public itemchildren: string;\n public itemaction: string;\n public itemclass: string;\n public itemid: string;\n public isactive: string;\n public userrole: string;\n public orderby: string;\n public datafield: string;\n public displayfield: string;\n\n private _itemFieldMap;\n private binditemlabel: string | null;\n private binditemicon: string | null;\n private binditemaction: string | null;\n private binditembadge: string | null;\n private binditemchildren: string | null;\n private binditemlink: string | null;\n private binditemtarget: string | null;\n private binduserrole: string | null;\n private bindisactive: string | null;\n private securityService: any;\n\n protected binditemid: string | null;\n protected nodes$ = new Subject();\n\n constructor(inj: Injector, WIDGET_CONFIG, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n this.securityService = this.inj.get(SecurityService);\n this.binditemlabel = this.nativeElement.getAttribute('itemlabel.bind');\n this.binditemicon = this.nativeElement.getAttribute('itemicon.bind');\n this.binditemaction = this.nativeElement.getAttribute('itemaction.bind');\n this.binditembadge = this.nativeElement.getAttribute('itembadge.bind');\n this.binditemchildren = this.nativeElement.getAttribute('itemchildren.bind');\n this.binditemid = this.nativeElement.getAttribute('itemid.bind');\n this.binditemlink = this.nativeElement.getAttribute('itemlink.bind');\n this.binditemtarget = this.nativeElement.getAttribute('itemtarget.bind');\n this.binduserrole = this.nativeElement.getAttribute('userrole.bind');\n this.bindisactive = this.nativeElement.getAttribute('isactive.bind');\n }\n\n /**\n * constructs individual node for the widget model.\n * @param fields\n * @param node\n */\n private getNode(fields, node): NavNode {\n const context = this.viewParent.pageScope || this.viewParent;\n const children = getEvaluatedData(node, {\n field: this.itemchildren,\n bindExpression: this.binditemchildren\n }, context) || get(node, fields.childrenField);\n const navNode = {\n action: getEvaluatedData(node, {\n field: this.itemaction,\n bindExpression: this.binditemaction\n }, context) || get(node, fields.actionField),\n badge: getEvaluatedData(node, {\n field: this.itembadge,\n bindExpression: this.binditembadge\n }, context) || get(node, fields.badgeField),\n children: Array.isArray(children) ? this.getNodes(children) : [],\n class: get(node, fields.classField),\n disabled: node.disabled,\n icon: getEvaluatedData(node, {\n field: this.itemicon,\n bindExpression: this.binditemicon\n }, context) || get(node, fields.iconField),\n id: getEvaluatedData(node, {\n field: this.itemid,\n bindExpression: this.binditemid\n }, context) || get(node, fields.idField),\n label: getEvaluatedData(node, {\n field: this.itemlabel,\n bindExpression: this.binditemlabel\n }, context) || get(node, fields.labelField),\n link: getValidLink(getEvaluatedData(node, {\n field: this.itemlink,\n bindExpression: this.binditemlink\n }, context) || get(node, fields.linkField)),\n target: getValidLink(getEvaluatedData(node, {\n field: this.itemtarget,\n bindExpression: this.binditemtarget\n }, context) || get(node, fields.targetField)),\n role: getEvaluatedData(node, {field: this.userrole, bindExpression: this.binduserrole}, context),\n isactive: getEvaluatedData(node, {field: this.isactive, bindExpression: this.bindisactive}, context),\n // older projects have display field & data field property for menu.\n value: this.datafield ? (this.datafield === 'All Fields' ? node : findValueOf(node, this.datafield)) : node\n };\n // @ts-ignore\n return omitBy(navNode, isUndefined);\n }\n\n resetItemFieldMap() {\n this._itemFieldMap = null;\n }\n\n getItemFieldsMap() {\n if (!this._itemFieldMap) {\n this._itemFieldMap = {\n idField: this.itemid || 'itemid',\n iconField: this.itemicon || 'icon',\n labelField: this.itemlabel || 'label',\n linkField: this.itemlink || 'link',\n targetField: this.itemtarget || 'target',\n badgeField: this.itembadge || 'badge',\n childrenField: this.itemchildren || 'children',\n classField: this.itemclass || 'class',\n actionField: this.itemaction || 'action',\n isactiveField: this.isactive || 'isactive'\n };\n }\n return this._itemFieldMap;\n }\n\n /**\n * returns array for the value passed as nv.\n * nv: 'a,b' => [{label:a, value:a}, {label:b, value:b}]\n * nv: [1,2] => [{label:1, value:1}, {label:2, value:2}]\n * nv: [{obj}, {obj}] => [{obj}, {obj}]\n * @param nv\n */\n private prepareNodeDataSet(nv) {\n nv = createArrayFrom(nv);\n return nv.map((val) => {\n if (!isObject(val)) {\n return {\n label: val,\n value: val\n };\n }\n return val;\n });\n }\n\n /**\n * constructs dataset form the nav elements.\n */\n private getNodes(nv = this.dataset || {}): Array<NavNode> {\n let nodes: Array<any> = getOrderedDataset(this.prepareNodeDataSet(nv), this.orderby) || [];\n\n if (nodes.length) {\n const userRole = this.userrole;\n const nodeFields = this.getItemFieldsMap();\n\n nodes = nodes.reduce((result, node) => {\n if (validateAccessRoles(node[userRole], this.securityService.loggedInUser)) {\n result.push(this.getNode(nodeFields, node));\n }\n return result;\n }, []);\n }\n return nodes;\n }\n\n // enable the inherited class to extend this method.\n protected resetNodes() {\n this.resetItemFieldMap();\n this.nodes = this.getNodes();\n $appDigest();\n // notify the node listeners\n this.nodes$.next(null);\n }\n\n // debounce function for reset nodes functions.\n private _resetNodes = debounce(this.resetNodes, 50);\n\n onPropertyChange(key, nv, ov) {\n switch (key) {\n case 'dataset':\n case 'itemicon':\n case 'itemlabel':\n case 'itemlink':\n case 'itemtarget':\n case 'itemclass':\n case 'itemchildren':\n case 'isactive':\n case 'orderby':\n // calls resetnodes method after 50ms. any calls within 50ms will be ignored.\n this._resetNodes();\n break;\n }\n super.onPropertyChange(key, nv, ov);\n }\n}\n\nexport interface NavNode {\n label: string;\n action?: any;\n badge?: string;\n children?: Array<NavNode>;\n class?: string;\n disabled?: boolean;\n icon?: string;\n id?: string;\n link?: string;\n role?: string;\n value?: any;\n}\n","import {Validators} from '@angular/forms';\n\nimport {$unwatch, $watch, FormWidgetType, VALIDATOR} from '@wm/core';\nimport {\n cloneDeep,\n concat,\n extend,\n filter,\n find,\n forEach,\n get,\n isEmpty,\n isFunction,\n keys as _keys,\n toUpper\n} from \"lodash-es\";\n\nconst DEFAULT_VALIDATOR = {\n pattern: 'regexp',\n max: 'maxvalue',\n min: 'minvalue',\n required: 'required',\n maxlength: 'maxchars',\n mindate: 'mindate',\n maxdate: 'maxdate',\n excludedates: 'excludedates',\n excludedays: 'excludedays',\n invalidNumber:'invalidNumber'\n};\n\nexport class BaseFieldValidations {\n private hasValidators;\n\n // Instance of the directive table-column, form-field..\n private instance;\n // Inline form widget\n public formwidget;\n // Widget type\n private widgettype;\n // From control\n private widgetControl;\n // Parent widget context Table, Form..\n private widgetContext;\n // Optional table column type quickedit newrow/ inline edit\n private tableFieldType;\n\n private defaultValidatorMessages: any;\n private _syncValidators: any;\n private _asyncValidatorFn: any;\n\n constructor(instance, formwidget, widgettype, widgetControl, widgetContext, tableFieldType?){\n this.instance = instance;\n this.formwidget = formwidget;\n this.widgettype = widgettype;\n this.widgetControl = widgetControl;\n this.widgetContext = widgetContext;\n\n this.defaultValidatorMessages = [];\n if (tableFieldType) {\n this.tableFieldType = tableFieldType;\n }\n }\n\n // this method returns the collection of supported default validators\n private getDefaultValidators() {\n const _validator = [];\n if (this.instance.required && this.instance.show !== false) {\n // For checkbox/toggle widget, required validation should consider true value only\n if (this.widgettype === FormWidgetType.CHECKBOX || this.widgettype === FormWidgetType.TOGGLE) {\n _validator.push(Validators.requiredTrue);\n } else {\n _validator.push(Validators.required);\n }\n }\n if (this.instance.maxchars) {\n _validator.push(Validators.maxLength(this.instance.maxchars));\n }\n if (this.instance.minvalue) {\n _validator.push(Validators.min(this.instance.minvalue));\n }\n if (this.instance.maxvalue && this.widgettype !== FormWidgetType.RATING) {\n _validator.push(Validators.max(this.instance.maxvalue));\n }\n if (this.instance.regexp) {\n _validator.push(Validators.pattern(this.instance.regexp));\n }\n if (this.formwidget && isFunction(this.formwidget.validate)) {\n _validator.push(this.formwidget.validate.bind(this.formwidget));\n }\n return _validator;\n }\n\n // On change of any validation property, set the angular form validators\n setUpValidators(customValidator?) {\n if (this.hasValidators) {\n return;\n }\n this.instance._validators = this.getDefaultValidators();\n\n if (customValidator) {\n this.instance._validators.push(customValidator);\n }\n\n if (this.widgetContext.ngform) {\n this.widgetControl.setValidators(this.instance._validators);\n const opt = {};\n // updating the value only when prevData is not equal to current value. and also initially when instance.value is empty or null for some widgets like date, checkboxset\n // emitEvent flag will prevent from emitting the valueChanges when value is equal to the prevDatavalue.\n if (this.formwidget && (this.instance.value === this.formwidget.prevDatavalue || this.isNullOrEmptyOrFalsy(this.instance.value))) {\n opt['emitEvent'] = false;\n }\n this.widgetControl.updateValueAndValidity(opt);\n }\n }\n\n getPromiseList(validators) {\n const arr = [];\n forEach(validators, (fn, index) => {\n let promise = fn;\n if (fn instanceof Function && fn.bind) {\n promise = fn(this.widgetControl, this.widgetContext);\n }\n if (promise instanceof Promise) {\n arr.push(promise);\n }\n });\n return arr;\n }\n\n // this method sets the asyncValidation on the form field. Assigns validationmessages from the returned response\n setAsyncValidators(validators) {\n this._asyncValidatorFn = () => {\n return () => {\n return Promise.all(this.getPromiseList(validators)).then(() => {\n this.instance.validationmessage = '';\n return null;\n }, err => {\n // if err obj has validationMessage key, then set validationMessage using this value\n // else return the value of the first key in the err object as validation message.\n if (err.hasOwnProperty('errorMessage')) {\n this.instance.validationmessage = get(err, 'errorMessage');\n } else {\n const keys = _keys(err);\n this.instance.validationmessage = (err[keys[0]]).toString();\n }\n return err;\n }).then(response => {\n // form control status is not changed from pending. This is an angular issue refer https://github.com/angular/angular/issues/13200\n const checkForStatusChange = () => {\n setTimeout(() => {\n if (this.widgetControl.status === 'PENDING') {\n checkForStatusChange();\n } else {\n this.instance.onStatusChange(this.widgetControl.status, this.tableFieldType);\n }\n }, 100);\n };\n checkForStatusChange();\n return response;\n });\n };\n };\n\n this.widgetControl.setAsyncValidators([this._asyncValidatorFn()]);\n if(this.widgetContext.ngform.touched){\n const opt = {};\n // updating the value only when prevData is not equal to current value. and also initially when instance.value is empty or null for some widgets like date, checkboxset\n // emitEvent flag will prevent from emitting the valueChanges when value is equal to the prevDatavalue.\n if (this.formwidget && (this.instance.value === this.formwidget.prevDatavalue || this.isNullOrEmptyOrFalsy(this.instance.value))) {\n opt['emitEvent'] = false;\n }\n this.widgetControl.updateValueAndValidity(opt);\n }\n }\n\n isDefaultValidator(type) {\n return get(VALIDATOR, toUpper(type));\n }\n\n // default validator is bound to a function then watch for value changes\n // otherwise set the value of default validator directly\n setDefaultValidator(key, value) {\n if (value && value instanceof Function) {\n // passing formfield and form as arguments to the default validator function\n this.watchDefaultValidatorExpr(value.bind(undefined, this.widgetControl, this.widgetContext), key);\n } else {\n this.instance.widget[key] = value;\n this.instance[key] = value;\n }\n }\n\n // sets the default validation on the form field\n setValidators(validators) {\n let _cloneValidators = cloneDeep(validators);\n this.hasValidators = true;\n this._syncValidators = [];\n forEach(_cloneValidators, (obj, index) => {\n // custom validation is bound to function.\n if (obj && obj instanceof Function) {\n // passing formfield and form as arguments to the obj (i.e. validator function)\n _cloneValidators[index] = obj.bind(undefined, this.widgetControl, this.widgetContext);\n this._syncValidators.push(_cloneValidators[index]);\n } else {\n // checks for default validator like required, maxchars etc.\n const key = get(obj, 'type');\n this.defaultValidatorMessages[key] = get(obj, 'errorMessage');\n if (this.isDefaultValidator(key)) {\n const value = get(obj, 'validator');\n this.setDefaultValidator(key, value);\n _cloneValidators[index] = '';\n }\n }\n });\n\n // _syncValidators contains all the custom validations on the form field. will not include default validators.\n this._syncValidators = filter(_cloneValidators, val => {\n if (val) {\n return val;\n }\n });\n this.applyDefaultValidators();\n }\n\n observeOn(fields, context) {\n forEach(fields, field => {\n const formfield = find(this.widgetContext[context], {'key': field});\n if (formfield) {\n if (!formfield.notifyForFields) {\n formfield.notifyForFields = [];\n }\n formfield.notifyForFields.push(this.instance);\n }\n });\n }\n\n validate() {\n this.applyDefaultValidators();\n if (this._asyncValidatorFn) {\n const opt = {};\n // updating the value only when prevData is not equal to current value. and also initially when instance.value is empty or null for some widgets like date, checkboxset\n // emitEvent flag will prevent from emitting the valueChanges when value is equal to the prevDatavalue.\n if (this.formwidget && (this.instance.value === this.formwidget.prevDatavalue || this.isNullOrEmptyOrFalsy(this.instance.value))) {\n opt['emitEvent'] = false;\n }\n this.widgetControl.setAsyncValidators([this._asyncValidatorFn()]);\n this.widgetControl.updateValueAndValidity(opt);\n }\n // show the validation erros show when form is touched and not on load. This just highlights the field that is subscribed for changes.\n if (this.widgetContext.ngform.touched) {\n this.widgetControl.markAsTouched();\n }\n }\n\n // watches for changes in the bound function for default validators.\n watchDefaultValidatorExpr(fn, key) {\n const watchName = `${this.instance.widgetId}_` + key + '_formField';\n $unwatch(watchName);\n //[Todo-CSP]: Need clarity generate this expr fn if form is present in the page\n this.instance.registerDestroyListener($watch('boundFn(fn)', extend(this.instance, this.instance.viewParent), {fn}, (nv, ov) => {\n this.instance.widget[key] = nv;\n this.applyDefaultValidators();\n }, watchName));\n }\n isNullOrEmptyOrFalsy(value) {\n return isEmpty(value);\n }\n\n // invokes both custom sync validations and default validations.\n applyDefaultValidators() {\n const validators = this.getDefaultValidators();\n const opt = {};\n // updating the value only when prevData is not equal to current value. and also initially when instance.value is empty or null for some widgets like date, checkboxset\n // emitEvent flag will prevent from emitting the valueChanges when value is equal to the prevDatavalue.\n if (this.formwidget && (this.instance.value === this.formwidget.prevDatavalue || this.isNullOrEmptyOrFalsy(this.instance.value))) {\n opt['emitEvent'] = false;\n }\n this.widgetControl.setValidators(concat(this._syncValidators || [], validators));\n this.widgetControl.updateValueAndValidity(opt);\n this.setCustomValidationMessage();\n }\n\n setCustomValidationMessage() {\n const fieldErrors = this.widgetControl && this.widgetControl.errors;\n\n if (!fieldErrors) {\n return;\n }\n if (fieldErrors.hasOwnProperty('errorMessage')) {\n this.instance.validationmessage = get(fieldErrors, 'errorMessage');\n } else {\n const keys = _keys(fieldErrors);\n const key = keys[0];\n const validationMsgKey = get(DEFAULT_VALIDATOR, key) || this.formwidget.validateType;\n if (validationMsgKey) {\n const msg = get(this.defaultValidatorMessages, validationMsgKey) || this.instance.validationmessage;\n if (msg && msg instanceof Function) {\n // passing formfield and form as arguments to the errorMessage function.\n this.instance.validationmessage = msg(this.widgetControl, this.widgetContext);\n } else {\n this.instance.validationmessage = msg;\n }\n } else {\n // fallback when there is no validationmessage for fields other than default validators.\n this.instance.validationmessage = '';\n }\n }\n }\n}\n","import { SwipeAnimation } from '@swipey';\n\nimport { App, isIos, setCSS } from '@wm/core';\n\ndeclare const $;\n\nexport class PullToRefresh extends SwipeAnimation {\n private infoContainer: JQuery<HTMLElement>;\n private runAnimation: boolean;\n private count = 0;\n private spinner: Spinner;\n public cancelSubscription: Function;\n private animationInProgress: boolean;\n\n constructor(private $el: JQuery<HTMLElement>, private app: App, private onPullToRefresh: () => void) {\n super();\n const template = '<div class=\"refresh-container\"></div>';\n this.$el.prepend(template);\n this.infoContainer = this.$el.find('.refresh-container');\n\n if (isIos()) {\n this.infoContainer.addClass('ios-refresh-container');\n }\n\n this.init(this.$el);\n }\n\n public threshold() {\n return 10;\n }\n\n public direction() {\n return $.fn.swipey.DIRECTIONS.VERTICAL;\n }\n\n private subscribe() {\n // Subscribing for variable updates, wait till the response and stop the animation.\n this.cancelSubscription = this.app.subscribe('toggle-variable-state', (data) => {\n // data.active is true means the variable update has just started whereas false means update has ended.\n if (data.active && this.animationInProgress) {\n this.count++;\n this.wait();\n } else if (this.count > 0) {\n this.count--;\n }\n // call stop animation only when animation has started.\n if (!this.count && this.animationInProgress) {\n this.stopAnimation();\n }\n });\n }\n\n public bounds($event, $d) {\n const pageIscroll = (this.$el[0] as any).iscroll;\n // If scroll position is not at the top of the page then do not trigger the animation.\n if ($d < 0 || (pageIscroll && !isNaN(pageIscroll.y) && pageIscroll.y !== 0)) {\n return {\n lower: undefined,\n upper: undefined\n };\n }\n if (!this.spinner) {\n this.spinner = isIos() ? new IOSSpinner(this.infoContainer) : new AndroidSpinner(this.infoContainer);\n this.subscribe();\n }\n\n return {\n lower: 0,\n center: 0,\n upper: isIos() ? 0 : 150,\n strict: !isIos()\n };\n }\n\n public context(): Object {\n this.infoContainer.show();\n if (isIos()) {\n this.infoContainer.addClass('entry');\n }\n return {\n spin: $d => {\n this.spinner.setRotation($d * 2);\n }\n };\n }\n\n public animation() {\n if (isIos()) {\n return {\n css: {\n transform: 'translate3d(0, ${{$D + $d}}px, 0)',\n spin: '${{spin($d)}}'\n }\n };\n }\n return {\n target: this.infoContainer,\n css: {\n transform: 'translate3d(0, ${{$D + $d}}px, 0)',\n spin: '${{spin($d)}}',\n opacity: '${{min(($D + $d) / 100, 1)}}'\n }\n };\n }\n\n // Start the spinner animation and invokes the pulltorefresh event. Stops the animation after the wait time.\n public onAnimation() {\n this.animationInProgress = true;\n this.spinner.start();\n if (this.onPullToRefresh) {\n this.onPullToRefresh();\n }\n\n setTimeout(() => {\n // if listenToAnimation is set, then wait for stopAnimation to be invoked. Otherwise call stopAnimation manually.\n if (this.runAnimation) {\n return;\n }\n this.stopAnimation();\n });\n }\n\n public stopAnimation() {\n setTimeout(() => {\n this.runAnimation = false;\n this.animationInProgress = false;\n this.spinner.stop();\n this.infoContainer.hide();\n setCSS(this.infoContainer[0], 'transform', 'none');\n if (!isIos()) {\n setCSS(this.infoContainer[0], 'opacity', 0);\n }\n this.infoContainer.removeClass('entry');\n }, 800);\n }\n\n public wait() {\n this.runAnimation = true;\n }\n}\n\n// Interface for Spinner\ninterface Spinner {\n start();\n stop();\n setRotation(d: number);\n}\n\n// Android Spinner implementation\nclass AndroidSpinner implements Spinner {\n private options: Object;\n private initialized: any;\n private cx: number;\n private cy: number;\n private r: number;\n private path: any;\n private intervalId;\n private container: any;\n\n constructor(private $el: JQuery<HTMLElement>, options?: any) {\n this.options = options || {};\n }\n\n\n private polarToCartesian(centerX: number, centerY: number, radius: number, angleInDegrees: number): any {\n const angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;\n return {\n x: centerX + (radius * Math.cos(angleInRadians)),\n y: centerY + (radius * Math.sin(angleInRadians))\n };\n }\n\n private describeArc(x: number, y: number, radius: number, startAngle: number, endAngle: number): string {\n\n const start = this.polarToCartesian(x, y, radius, endAngle);\n const end = this.polarToCartesian(x, y, radius, startAngle);\n\n const arcSweep = endAngle - startAngle <= 180 ? '0' : '1';\n\n return [\n 'M', start.x, start.y,\n 'A', radius, radius, 0, arcSweep, 0, end.x, end.y,\n 'L', end.x, end.y\n ].join(' ');\n }\n\n public init(): void {\n if (this.initialized) {\n return;\n }\n // append the svg to the element on which spinner has to be shown.\n const androidTemplate = $('<svg><path id=\"arc1\"/></svg>');\n const container = $('<div class=\"android-spinner\"></div>');\n container.append(androidTemplate);\n this.$el.append(container);\n this.cx = container.outerWidth() / 2;\n this.cy = container.outerHeight() / 2;\n this.r = this.cx * 0.6;\n this.path = container.find('path');\n this.initialized = true;\n this.container = container;\n }\n\n // sets rotation to the path\n public setRotation(deg) {\n this.init();\n this.path.attr('d', this.describeArc(this.cx, this.cy, this.r, 0, deg));\n }\n\n // animate the path to rotate continuously with some interval\n public start() {\n this.init();\n const self = this,\n totalTime = (this.options as any).time || 1800,\n degreesToTraverse = 10;\n let i = 0;\n this.container.addClass('spin');\n this.intervalId = setInterval(() => {\n let deg;\n i = i + degreesToTraverse;\n if (i > 720) {\n deg = i = 0;\n } else if (i > 360) {\n deg = 720 - i;\n } else {\n deg = i;\n }\n self.path.attr('d', this.describeArc(self.cx, self.cy, self.r, 0, deg));\n }, (totalTime * degreesToTraverse / 360));\n }\n\n // Removes the animation by clearing the intervals\n public stop() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n this.intervalId = 0;\n }\n this.container.removeClass('spin');\n }\n}\n\n// iOS spinner implementation\nclass IOSSpinner implements Spinner {\n private svg: any;\n private intervalId: any;\n\n constructor(private $el) {}\n\n // create the iOS spinner using svg\n private init() {\n if (this.svg) {\n return;\n }\n const container = $('<div class=\"ios-spinner\"><svg></svg></div>');\n const svg = container.find('svg');\n this.$el.append(container);\n const d = container.width();\n for (let i = 0; i < 12; i++) {\n svg[0].innerHTML += `<line y1=\"${0.15 * d}\" y2=\"${0.3 * d}\"\n transform=\"translate(${0.5 * d}, ${0.5 * d}) rotate(${i * 30})\">\n </line>`;\n }\n container.append(svg);\n this.svg = svg;\n }\n\n // Sets the svg to rotate depending on \"d\" value\n public setRotation(d: number): void {\n this.init();\n this.svg.css('transform', `rotateZ( ${Math.round(d / 30) * 30}deg)`);\n }\n\n // Triggers the rotation with some interval\n public start() {\n this.init();\n let i = 0;\n this.intervalId = setInterval(() => {\n i += 10;\n this.setRotation(i);\n }, 20);\n }\n\n // Removes the animation by clearing the intervals\n public stop() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n this.intervalId = 0;\n }\n }\n}\n","import { isMobile, setCSS } from '@wm/core';\n\ndeclare const $;\n\nenum CLASS_NAME {\n LEFT_PANEL = 'page-left-panel',\n RIGHT_PANEL = 'page-right-panel',\n SWIPE_ELEM = 'page-left-panel-icon',\n CONTENT = 'app-content-column',\n HEADER = 'page-header',\n SEARCH = 'app-search'\n}\n\n/**\n * method returns jquery class selector for given roleName\n * @param roleName\n * @returns {string}\n */\nconst roleSelector = (roleName: string) => `[data-role='${roleName}']`;\nconst pageSelector = roleSelector(\"pageContainer\");\n/*setup touch event handler*/\nconst bindTapEvtHandler = (selector, handler) => {\n /*\n * In Iphone safari browser, tap event of HammerJs is breaking\n * functionalities of other controls like input[type=\"range\"].\n * So, replaced the hammer Js handler with click event handler.\n */\n if (typeof (selector) === 'string') {\n selector = document.querySelector(selector);\n }\n if (!selector) {\n return;\n }\n // Add js event listeners as the event handlers has to be invoked in angular zone.\n selector.removeEventListener('click', handler);\n selector.addEventListener('click', handler);\n};\n\n/**\n * hide the mobile toolbar actions\n */\nconst hidePageContainers = (leftNavEle: HTMLElement, searchEle?: HTMLElement) => {\n if (isMobile()) {\n if (leftNavEle) {\n try {\n (leftNavEle as any).widget.collapse();\n } catch (e) {\n //\n }\n }\n if (searchEle) {\n setCSS(searchEle, 'display', 'none');\n }\n }\n};\n\n/**\n * binds the touch event for content\n */\nconst bindContentEvents = (leftNavEle: HTMLElement, pageContainer: HTMLElement, searchContainer: any, isTablet = false) => {\n if (!isTablet) {\n // touch content to hide nav pane and left panel\n bindTapEvtHandler(pageContainer, hidePageContainers.bind(this, leftNavEle, searchContainer));\n }\n};\n\nconst bindLeftPanelEvents = (leftNavEle: HTMLElement, searchEle: HTMLElement) => {\n // tap left to show/hide left panel\n bindTapEvtHandler(roleSelector(CLASS_NAME.SWIPE_ELEM), () => {\n if (leftNavEle) {\n (leftNavEle as any).widget.toggle();\n\n // Hide search container when left panel is open\n if (leftNavEle.classList.contains('visible')) {\n if (searchEle) {\n setCSS(searchEle, 'display', 'none');\n }\n }\n }\n });\n};\n\n/**\n * binds the touch event for content\n */\nconst bindRightPanelEvents = (rightNavEle: HTMLElement) => {\n bindTapEvtHandler(rightNavEle, hidePageContainers);\n};\n\n\n/**\n * toggles the search container\n */\nconst toggleSearchContainer = (searchEle: HTMLElement, leftNavEle: HTMLElement) => {\n if ($(searchEle).css('display') === 'none') {\n hidePageContainers(leftNavEle);\n setCSS(searchEle, 'display', 'inline-table');\n } else {\n hidePageContainers(leftNavEle, searchEle);\n }\n};\n\n/**\n * Bind event with Search icon in header\n */\nconst bindSearchIconEvent = (searchElements, leftNavEle: HTMLElement) => {\n\n $(searchElements).each((index, ele: HTMLElement) => {\n const searchEle = $('<a class=\"app-header-action\"><i class=\"wi wi-search\"></i></a>') as JQuery<HTMLElement>;\n $(ele).before(searchEle);\n // Tap icon to show/hide search box\n bindTapEvtHandler(searchEle, () => toggleSearchContainer(ele, leftNavEle));\n });\n\n};\n\nexport const updateDeviceView = (element: HTMLElement, isTablet = false) => {\n\n const leftNavEle = element.querySelector(roleSelector(CLASS_NAME.LEFT_PANEL)) as HTMLElement;\n const rightNavEle = element.querySelector(roleSelector(CLASS_NAME.RIGHT_PANEL)) as HTMLElement;\n const headerEle = element.querySelector(roleSelector(CLASS_NAME.HEADER)) as HTMLElement;\n const searchEle = headerEle && headerEle.querySelector(`.${CLASS_NAME.SEARCH}`) as HTMLElement;\n const pageEle = element.querySelector(`.${CLASS_NAME.CONTENT}`) as HTMLElement;\n\n bindContentEvents(leftNavEle, pageEle, searchEle, isTablet);\n\n if (leftNavEle) {\n bindLeftPanelEvents(leftNavEle, searchEle);\n } else {\n // remove the icon\n $(headerEle).find(roleSelector(CLASS_NAME.SWIPE_ELEM)).remove();\n }\n\n if (rightNavEle) {\n bindRightPanelEvents(rightNavEle);\n }\n\n if (searchEle) {\n bindSearchIconEvent(searchEle, leftNavEle);\n }\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["register","registerProps","isObject","DEFAULT_CLS","WIDGET_CONFIG","noop","debounce","i1","i2","filter","orderBy","_orderBy","keys","_keys","this"],"mappings":";;;;;;;;;;;;;;;;;MAIa,YAAY,GAAG,IAAI,cAAc,CAAgB,cAAc,EAAE;MAexD,SAAS,CAAA;AAAG,CAAA;MAEZ,SAAS,CAAA;AAE9B,CAAA;MAEY,OAAO,GAAG,IAAI,cAAc,CAAC,4BAA4B;;ACNtE,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,cAAc,CAAC,MAAM,EAAE,cAAc,CAAC,WAAW,EAAE,cAAc,CAAC,QAAQ;IACvG,cAAc,CAAC,MAAM,EAAE,cAAc,CAAC,YAAY,EAAE,cAAc,CAAC,KAAK,EAAE,cAAc,CAAC,SAAS,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;AAChI;;;;AAIG;AACH,MAAM,cAAc,GAAG,CAAC,IAAY,KAAI;IACpC,IAAI,OAAO,GAAG,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,oBAAoB,CAAC;IAEjG,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;AAEjD,IAAA,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC9B,QAAA,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;AACb,QAAA,IAAI,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAEnB;;;;;AAKG;QACH,IAAI,EAAE,K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,GAAG,KAAK,KAAI;AAExE,IAAA,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,UAAU,CAAC,UAAU,CAAC,CAAgB,CAAC;AAC7F,IAAA,MAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,UAAU,CAAC,WAAW,CAAC,CAAgB,CAAC;AAC/F,IAAA,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,UAAU,CAAC,MAAM,CAAC,CAAgB,CAAC;AACxF,IAAA,MAAM,SAAS,GAAI,SAAS,IAAI,SAAS,CAAC,aAAa,CAAC,CAAA,CAAA,EAAI,UAAU,CAAC,MAAM,CAAA,CAAE,CAAgB,CAAC;AAChG,IAAA,MAAM,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,CAAI,CAAA,EAAA,UAAU,CAAC,OAAO,CAAE,CAAA,CAAgB,CAAC;IAE/E,iBAAiB,CAAC,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IAE5D,IAAI,UAAU,EAAE;AACZ,QAAA,mBAAmB,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;KAC9C;SAAM;;AAEH,QAAA,CAAC,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;KACnE;IAED,IAAI,WAAW,EAAE;QACb,oBAAoB,CAAC,WAAW,CAAC,CAAC;KACrC;IAED,IAAI,SAAS,EAAE;AACX,QAAA,mBAAmB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;KAC9C;AACL;;AC5IA;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../projects/components/base/src/widgets/framework/types.ts","../../../../projects/components/base/src/utils/widget-utils.ts","../../../../projects/components/base/src/widgets/framework/styler.ts","../../../../projects/components/base/src/widgets/framework/widget-props.ts","../../../../projects/components/base/src/widgets/common/container/container.props.ts","../../../../projects/components/base/src/widgets/framework/widget-registry.ts","../../../../projects/components/base/src/widgets/framework/widget-id-generator.ts","../../../../projects/components/base/src/widgets/framework/constants.ts","../../../../projects/components/base/src/widgets/framework/property-change-handler.ts","../../../../projects/components/base/src/widgets/framework/widget-proxy-provider.ts","../../../../projects/components/base/src/widgets/common/base/base.component.ts","../../../../projects/components/base/src/widgets/common/base/stylable.component.ts","../../../../projects/components/base/src/widgets/common/redraw/redrawable.directive.ts","../../../../projects/components/base/src/widgets/common/base/base-container.component.ts","../../../../projects/components/base/src/widgets/common/container/container.directive.ts","../../../../projects/components/base/src/pipes/image.pipe.ts","../../../../projects/components/base/src/widgets/common/item-template/item-template.props.ts","../../../../projects/components/base/src/widgets/common/item-template/item-template.directive.ts","../../../../projects/components/base/src/widgets/common/repeat-template/repeat-template.props.ts","../../../../projects/components/base/src/widgets/common/repeat-template/repeat-template.directive.ts","../../../../projects/components/base/src/widgets/common/lazy-load/lazy-load.directive.ts","../../../../projects/components/base/src/widgets/common/message/message.props.ts","../../../../projects/components/base/src/widgets/common/message/message.component.ts","../../../../projects/components/base/src/widgets/common/message/message.component.html","../../../../projects/components/base/src/widgets/common/partial/partial.props.ts","../../../../projects/components/base/src/widgets/common/partial/partial.directive.ts","../../../../projects/components/base/src/widgets/common/partial-param/partial-param.directive.ts","../../../../projects/components/base/src/widgets/common/base/partial-container.directive.ts","../../../../projects/components/base/src/widgets/common/base/custom-widget-container.directive.ts","../../../../projects/components/base/src/directives/show-in-device.directive.ts","../../../../projects/components/base/src/widgets/common/smooth-scroll/smooth-scroll.directive.ts","../../../../projects/components/base/src/widgets/common/base/text-content.directive.ts","../../../../projects/components/base/src/pipes/wm-pipe.ts","../../../../projects/components/base/src/pipes/custom-pipes.ts","../../../../projects/components/base/src/pipes/trust-as.pipe.ts","../../../../projects/components/base/src/widgets/common/dialog/dialog.service.ts","../../../../projects/components/base/src/pipes/sanitize.pipe.ts","../../../../projects/components/base/src/components.module.ts","../../../../projects/components/base/src/utils/data-utils.ts","../../../../projects/components/base/src/utils/form-utils.ts","../../../../projects/components/base/src/utils/live-utils.ts","../../../../projects/components/base/src/widgets/common/base/dataset-aware-nav.component.ts","../../../../projects/components/base/src/widgets/common/base/base-field-validations.ts","../../../../projects/components/base/src/widgets/common/pull-to-refresh/pull-to-refresh.ts","../../../../projects/components/base/src/widgets/framework/deviceview.ts","../../../../projects/components/base/src/index.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nimport { BaseComponent } from '../common/base/base.component';\n\nexport const WidgetConfig = new InjectionToken<IWidgetConfig>('WidgetConfig');\n\nexport interface IWidgetConfig {\n widgetType: string;\n widgetSubType?: string;\n hostClass?: string;\n displayType?: string;\n}\n\nexport interface IRedrawableComponent {\n redraw: Function;\n}\n\nexport type ChangeListener = (key: string, nv: any, ov?: any) => void;\n\nexport abstract class WidgetRef {}\n\nexport abstract class DialogRef<T extends BaseComponent> {\n bsModal: any;\n}\n\nexport const Context = new InjectionToken('Context Provider Reference');\n\nexport interface IDialog {\n open: (initState?: any) => void;\n close: () => void;\n}\n","import {forwardRef} from '@angular/core';\n\nimport {\n $parseExpr,\n checkIsCustomPipeExpression,\n deHyphenate,\n encodeUrl,\n FormWidgetType,\n getClonedObject,\n initCaps,\n isValidWebURL,\n prettifyLabel,\n stringStartsWith\n} from '@wm/core';\nimport {DialogRef, WidgetRef} from '../widgets/framework/types';\nimport {createFocusTrap} from '@wavemaker/focus-trap';\nimport {NavNode} from \"../widgets/common/base/dataset-aware-nav.component\";\nimport {assignWith, forEach, get, includes, isArray, isNull, isObject, isString, join, split, union} from \"lodash-es\";\n\nconst DATASET_WIDGETS = new Set([FormWidgetType.SELECT, FormWidgetType.CHECKBOXSET, FormWidgetType.RADIOSET,\n FormWidgetType.SWITCH, FormWidgetType.AUTOCOMPLETE, FormWidgetType.CHIPS, FormWidgetType.TYPEAHEAD, FormWidgetType.RATING]);\n/**\n * Returns the parsed, updated bound expression\n * if the expression is $[data[$i][firstName]] + '--' + $[lastName] + '--' + $['@ID@']\n * returns __1.firstName + '--' + lastName + '--' + __1['@ID@']\n */\nconst getUpdatedExpr = (expr: string) => {\n let updated = '', ch, next, i, j, matchCh, matchCount, isQuotedStr, subStr, isQuotedStrEvaluated;\n\n expr = expr.replace(/\\$\\[data\\[\\$i\\]/g, '$[__1');\n\n for (i = 0; i < expr.length; i++) {\n ch = expr[i];\n next = expr[i + 1];\n\n /**\n * if the expression starts with $[, check the next(ch) character,\n * if ch is a quote(', \") change the expr to __[\n * if ch is a whiteSpace, remove it\n * else remove $[\n */\n if (ch === '$' && next === '[') {\n matchCount = 1;\n isQuotedStrEvaluated = false;\n isQuotedStr = false;\n\n for (j = i + 2; j < expr.length; j++) {\n\n matchCh = expr[j];\n\n if (matchCh === ' ') {\n continue;\n }\n\n if (!isQuotedStrEvaluated) {\n isQuotedStr = expr[j] === '\"' || expr[j] === '\\'';\n isQuotedStrEvaluated = true;\n }\n\n if (matchCh === '[') {\n matchCount++;\n } else if (matchCh === ']') {\n matchCount--;\n }\n\n if (!matchCount) {\n subStr = expr.substring(i + 2, j);\n if (isQuotedStr) {\n updated += '__1[' + subStr + ']';\n } else {\n updated += subStr;\n }\n\n break;\n }\n }\n i = j;\n } else {\n updated += ch;\n }\n }\n\n return updated;\n};\n\n/**\n * Returns the value for the provided key in the object\n */\nexport const getObjValueByKey = (obj: any, strKey: string) => {\n /* check for the key-string */\n if (strKey) {\n let val;\n /* convert indexes to properties, so as to work for even 'key1[0].child1'*/\n strKey.replace(/\\[(\\w+)\\]/g, '.$1').split('.').forEach(key => {\n // If obj is null, then assign val to null.\n val = (val && val[key]) || (isNull(obj) ? obj : obj[key]);\n });\n return val;\n }\n return obj;\n};\n\n/**\n * returns the display field data for any dataset widgets\n * Based on the bind display expression or display expression or display name,\n * data is extracted and formatted from the passed option object\n * If there is field is specified, field value is obtained from the dataObj.\n * If expression is given, evaluates the expression value.\n * else check for bindExpression, extract the value from the dataObj\n */\nexport const getEvaluatedData = (dataObj: any, options: any, context?: any) => {\n let expressionValue;\n const field = options.field,\n expr = options.expression,\n bindExpr = options.bindExpression;\n\n // if key is bound expression\n if (bindExpr) {\n // remove 'bind:' prefix from the boundExpressionName\n expressionValue = bindExpr.replace('bind:', '');\n\n // For bind expression passing the last argument that the object of dataset item.\n // Note: For parse expression we are sending dataObj with the propery name \"__1\", we used the same propery to send the last argument as dataset item\n if(checkIsCustomPipeExpression(expressionValue)){\n expressionValue = expressionValue+': __1';\n }\n // parse the expressionValue for replacing all the expressions with values in the object\n expressionValue = getUpdatedExpr(expressionValue);\n } else {\n expressionValue = expr ? expr : field;\n }\n\n // Handling field name with special charecters\n // Ex: field = \"f name\"\n if (!bindExpr && !expr) {\n return get(dataObj, field);\n }\n\n return $parseExpr(expressionValue)(context, Object.assign({}, dataObj, {__1: dataObj}));\n};\n\nexport const isActiveNavItem = (link, routeName) => {\n if (!link || !routeName) {\n return false;\n }\n routeName = routeName.indexOf('?') === -1 ? routeName : routeName.substring(0, routeName.indexOf('?'));\n link = link.indexOf('?') === -1 ? link : link.substring(0, link.indexOf('?'));\n const routeRegex = new RegExp('^(#\\/|#)' + routeName + '$');\n return routeRegex.test(link);\n};\n\n/**\n* returns true if the menu has link to the current page.\n* @param nodes\n* @param routeUrl\n*/\nexport const hasLinkToCurrentPage = (nodes: Array<NavNode>, routeUrl) => {\n return nodes.some(node => {\n if (isActiveNavItem(node.link, routeUrl)) {\n return true;\n }\n if (node.children) {\n return hasLinkToCurrentPage(node.children, routeUrl);\n }\n });\n}\n\n/**\n * Returns the orderBy Expression based on the 'sort 'option in pageable object\n * returned by backend\n * @param pageableObj\n * @returns {string}\n */\nexport const getOrderByExpr = pageableObj => {\n pageableObj = pageableObj || [];\n const expressions = [],\n KEY_VAL_SEPARATOR = ' ',\n FIELD_SEPARATOR = ',';\n forEach(pageableObj, obj => {\n if (obj.direction) {\n expressions.push(obj.property + KEY_VAL_SEPARATOR + obj.direction.toLowerCase());\n }\n });\n\n return join(expressions, FIELD_SEPARATOR);\n};\n\nexport const isDataSetWidget = widget => {\n return DATASET_WIDGETS.has(widget);\n};\n\n/*This function returns the url to the image after checking the validity of url*/\nexport const getImageUrl = (urlString, shouldEncode?, defaultUrl?) => {\n /*In studio mode before setting picturesource, check if the studioController is loaded and new picturesource is in 'styles/images/' path or not.\n * When page is refreshed, loader.gif will be loaded first and it will be in 'style/images/'.\n * Prepend 'services/projects/' + $rootScope.project.id + '/web/resources/images/imagelists/' if the image url is just image name in the project root,\n * and if the url pointing to resources/images/ then 'services/projects/' + $rootScope.project.id + '/web/'*/\n if (isValidWebURL(urlString)) {\n return urlString;\n }\n\n // If no value is provided for picturesource assign pictureplaceholder or default-image\n if (!urlString) {\n urlString = defaultUrl || 'resources/images/imagelists/default-image.png';\n }\n\n urlString = shouldEncode ? encodeUrl(urlString) : urlString;\n\n // if the resource to be loaded is inside a prefab\n if (stringStartsWith(urlString, 'services/prefabs')) {\n return urlString;\n }\n\n return urlString;\n};\n\n/*This method returns the url to the backgroundImage*/\nexport const getBackGroundImageUrl = (urlString) => {\n if (urlString === '' || urlString === 'none') {\n return urlString;\n }\n return 'url(' + getImageUrl(urlString) + ')';\n};\n\nexport function provideAs(reference: any, key: any, multi?: boolean) {\n return {\n provide: key,\n useExisting: forwardRef(() => reference),\n multi: multi\n };\n}\n\nexport function provideAsWidgetRef(reference: any) {\n return provideAs(reference, WidgetRef);\n}\n\nexport function provideAsDialogRef(reference: any) {\n return provideAs(reference, DialogRef);\n}\n\nexport const NAVIGATION_TYPE = {\n ADVANCED: 'Advanced',\n BASIC: 'Basic',\n CLASSIC: 'Classic',\n INLINE: 'Inline',\n NONE: 'None',\n ONDEMAND: 'On-Demand',\n PAGER: 'Pager',\n SCROLL: 'Scroll'\n};\n\nexport const INPUTMODE = {\n FINANCIAL: 'financial',\n NATURAL: 'natural'\n};\n\nexport const AUTOCLOSE_TYPE = {\n OUTSIDECLICK: 'outsideClick',\n ALWAYS: 'always',\n DISABLED: 'disabled'\n}\n\nexport const unsupportedStatePersistenceTypes = ['On-Demand', 'Scroll'];\n\nexport const getWatchIdentifier = (...args) => args.join('_');\n\nconst typesMap = {\n number: ['number', 'integer', 'big_integer', 'short', 'float', 'big_decimal', 'double', 'long', 'byte'],\n string: ['string', 'text'],\n character: ['character'],\n date: ['date', 'time', 'timestamp', 'datetime']\n};\nconst modes = {\n number: ['exact', 'notequals', 'lessthan', 'lessthanequal', 'greaterthan', 'greaterthanequal', 'null', 'isnotnull'],\n string: ['anywhereignorecase', 'anywhere', 'startignorecase', 'start', 'endignorecase', 'end', 'exactignorecase', 'exact', 'notequalsignorecase', 'notequals', 'null', 'isnotnull', 'empty', 'isnotempty', 'nullorempty'],\n character: ['exactignorecase', 'exact', 'notequalsignorecase', 'notequals', 'null', 'isnotnull', 'empty', 'isnotempty', 'nullorempty'],\n date: ['exact', 'lessthan', 'lessthanequal', 'greaterthan', 'greaterthanequal', 'null', 'notequals', 'isnotnull']\n};\nconst matchModeTypesMap = {\n boolean: ['exact', 'null', 'isnotnull'],\n clob: [],\n blob: []\n};\nexport const getMatchModeTypesMap = (multiMode?) => {\n if (multiMode) {\n modes.number.push('in', 'notin', 'between');\n modes.date.push('between');\n modes.string.push('in', 'notin');\n modes.character.push('in', 'notin');\n }\n\n forEach(typesMap, (types, primType) => {\n forEach(types, type => {\n matchModeTypesMap[type] = modes[primType];\n });\n });\n // this is used in filter criteria when the user types the column name manually and where we dont know the type of the column\n matchModeTypesMap['default'] = union(modes['number'], modes['string'], modes['character'], modes['date'], modes['date']);\n return matchModeTypesMap;\n};\n\nexport const getMatchModeMsgs = (appLocale) => {\n return {\n start : appLocale.LABEL_STARTS_WITH,\n startignorecase : appLocale.LABEL_STARTS_WITH_IGNORECASE,\n end : appLocale.LABEL_ENDS_WITH,\n endignorecase : appLocale.LABEL_ENDS_WITH_IGNORECASE,\n anywhere : appLocale.LABEL_CONTAINS,\n anywhereignorecase: appLocale.LABEL_CONTAINS_IGNORECASE,\n exact : appLocale.LABEL_IS_EQUAL_TO,\n exactignorecase : appLocale.LABEL_IS_EQUAL_TO_IGNORECASE,\n notequals : appLocale.LABEL_IS_NOT_EQUAL_TO,\n notequalsignorecase: appLocale.LABEL_IS_NOT_EQUAL_TO_IGNORECASE,\n lessthan : appLocale.LABEL_LESS_THAN,\n lessthanequal : appLocale.LABEL_LESS_THAN_OR_EQUALS_TO,\n greaterthan : appLocale.LABEL_GREATER_THAN,\n greaterthanequal : appLocale.LABEL_GREATER_THAN_OR_EQUALS_TO,\n null : appLocale.LABEL_IS_NULL,\n isnotnull : appLocale.LABEL_IS_NOT_NULL,\n empty : appLocale.LABEL_IS_EMPTY,\n isnotempty : appLocale.LABEL_IS_NOT_EMPTY,\n nullorempty : appLocale.LABEL_IS_NULL_OR_EMPTY,\n in : appLocale.LABEL_IN,\n notin : appLocale.LABEL_NOT_IN,\n between : appLocale.LABEL_BETWEEN\n };\n};\n\n// Returns array of classes that are evaluated true for given object or array\nconst getClassesArray = classVal => {\n let classes = [];\n\n if (isArray(classVal)) {\n classVal.forEach(v => {\n classes = classes.concat(getClassesArray(v));\n });\n return classes;\n }\n if (isObject(classVal)) {\n forEach(classVal, (val, key) => {\n if (val) {\n classes = classes.concat(key.split(' '));\n }\n });\n return classes;\n }\n};\n\nexport const getConditionalClasses = (nv, ov?) => {\n let toAdd;\n let toRemove;\n // if the conditional class property has already toAdd and toRemove arrays then take that otherwise build those arrays\n const classToAdd = nv.toAdd || nv;\n const classToRemove = nv.toRemove || ov;\n if (isObject(nv)) {\n toAdd = isArray(classToAdd) ? classToAdd : getClassesArray(classToAdd || []);\n toRemove = classToRemove ? (isArray(classToRemove) ? classToRemove : getClassesArray(classToRemove)) : [];\n } else {\n toAdd = classToAdd ? [classToAdd] : [];\n toRemove = classToRemove ? [classToRemove] : [];\n }\n return {toAdd, toRemove};\n};\n\n/*helper function for prepareFieldDefs*/\nconst pushFieldDef = (dataObject, columnDefObj, namePrefix, options) => {\n /*loop over the fields in the dataObject to process them*/\n let modifiedTitle,\n relatedTable,\n relatedField,\n relatedInfo,\n fieldName,\n isRelated;\n if (!options) {\n options = {};\n }\n forEach(dataObject, (value, title) => {\n if (includes(title, '.')) {\n relatedInfo = split(title, '.');\n relatedTable = relatedInfo[0];\n relatedField = relatedInfo[1];\n isRelated = true;\n }\n if (options.noModifyTitle) {\n modifiedTitle = title;\n } else {\n if (isString(title)) {\n modifiedTitle = prettifyLabel(title);\n modifiedTitle = deHyphenate(modifiedTitle);\n modifiedTitle = namePrefix ? initCaps(namePrefix) + ' ' + modifiedTitle : modifiedTitle;\n } else {\n modifiedTitle = title;\n }\n }\n title = namePrefix ? namePrefix + '.' + title : title;\n if (isRelated) {\n // For related columns, shorten the title to last two words\n fieldName = split(modifiedTitle, ' ');\n fieldName = fieldName.length > 1 ? fieldName[fieldName.length - 2] + ' ' + fieldName[fieldName.length - 1] : fieldName[0];\n } else {\n fieldName = modifiedTitle;\n }\n const defObj = options.setBindingField ? {'displayName': fieldName, 'field': title, 'relatedTable': relatedTable, 'relatedField': relatedField || modifiedTitle}\n : {'displayName': fieldName, 'relatedTable': relatedTable, 'relatedField': relatedField || modifiedTitle};\n /*if field is a leaf node, push it in the columnDefs*/\n if (!isObject(value) || (isArray(value) && !value[0])) {\n /*if the column counter has reached upperBound return*/\n if (options.upperBound && options.columnCount === options.upperBound) {\n return;\n }\n columnDefObj.terminals.push(defObj);\n /*increment the column counter*/\n options.columnCount += 1;\n } else {\n /*else field is an object, process it recursively*/\n /* if parent node to be included, include it */\n if (options.columnCount !== options.upperBound) {\n columnDefObj.objects.push(defObj);\n }\n\n /* if field is an array node, process its first child */\n if (isArray(value) && value[0]) {\n pushFieldDef(value[0], columnDefObj, title + '[0]', options);\n } else {\n pushFieldDef(value, columnDefObj, title, options);\n }\n }\n });\n};\n\nconst getMetaDataFromData = (data) => {\n let dataObject;\n if (isArray(data)) {\n if (isObject(data[0])) {\n dataObject = getClonedObject(data[0]);\n /*Loop over the object to find out any null values. If any null values are present in the first row, check and assign the values from other row.\n * As column generation is dependent on data, for related fields if first row value is null, columns are not generated.\n * To prevent this, check the data in other rows and generate the columns. New keys from others rows are also added*/\n forEach(data, (row, index) => {\n if ((index + 1) >= 10) { // Limit the data search to first 10 records\n return false;\n }\n assignWith(dataObject, row, (objValue, srcValue) => {\n return (objValue === null || objValue === undefined) ? srcValue : objValue;\n });\n });\n } else {\n dataObject = data[0];\n }\n } else {\n dataObject = data;\n }\n return dataObject;\n};\n\nexport const prepareFieldDefs = (data, options?) => {\n let dataObject;\n const columnDef = {\n 'objects' : [],\n 'terminals' : []\n };\n /*if no data provided, initialize default column definitions*/\n if (!data) {\n data = [];\n }\n if (!options) {\n options = {};\n }\n options.setBindingField = true;\n options.columnCount = 0;\n dataObject = getMetaDataFromData(data);\n /*first of the many data objects from grid data*/\n pushFieldDef(dataObject, columnDef, '', options);\n if (!options || (options && !options.filter)) {\n return columnDef.terminals;\n }\n switch (options.filter) {\n case 'all':\n return columnDef;\n case 'objects':\n return columnDef.objects;\n case 'terminals':\n return columnDef.terminals;\n }\n return columnDef;\n};\n\n\n/**\n * To get container target element to append the list for search and datepicker panel when field present in dialog\n */\nexport const getContainerTargetClass = (element) => {\n return '.wm-app';\n\n // Below code is not working when we have nested dialogs.\n // Nested dialogs case we will have multiple '.modal-content' classes on DOM due to that container positions is not working as expected.\n // Below code to fix the issue ==> WMS-18751\n // As regression we got ==> WMS-19835\n\n // if (element.closest('.modal-dialog')) {\n // return '.modal-content';\n // } else {\n // return 'body';\n // }\n\n}\n\n/**\n * To extract the Variable Name from a Widget's binddatasource attribute\n */\nexport const extractDataSourceName = (bindDataSource) => {\n if (!bindDataSource) {\n return;\n }\n let dataSourceName;\n const parts = bindDataSource.split('.');\n if (parts.length > 1 && parts[0] === 'Variables') {\n dataSourceName = parts[1];\n }\n return dataSourceName;\n}\n\nexport const setFocusTrap = (container, allowOutsideClick, setReturnFocusElement?) => {\n return createFocusTrap(container, {\n onActivate: () => container.classList.add('is-active'),\n onDeactivate: () => container.classList.remove('is-active'),\n allowOutsideClick: allowOutsideClick,\n setReturnFocus: setReturnFocusElement,\n });\n}\n\n/**\n * Gets keyboard focusable elements within a specified element\n * @param element {HTMLElement}\n * @returns {Array}\n */\nexport const getKeyboardFocusableElements = (element: HTMLElement) => {\n const elementNodeList = element.querySelectorAll('a, button, input, textarea, select, details, iframe, embed, object, summary dialog, audio[controls], video[controls], [contenteditable]');\n const elements = Array.from(elementNodeList);\n return elements.filter(el => {\n return (!el.hasAttribute('disabled') && !el.hasAttribute('hidden')\n && (!el.hasAttribute('tabindex') || (el.hasAttribute('tabindex') && !el.getAttribute(\"tabindex\").startsWith('-'))));\n });\n}\n","import { setCSS } from '@wm/core';\n\nimport { getBackGroundImageUrl } from '../../utils/widget-utils';\nimport { StylableComponent } from '../common/base/stylable.component';\n\nexport enum APPLY_STYLES_TYPE {\n CONTAINER,\n SCROLLABLE_CONTAINER,\n INNER_SHELL,\n SHELL\n}\n\nexport const propNameCSSKeyMap = {\n 'backgroundattachment': 'backgroundAttachment',\n 'backgroundcolor': 'backgroundColor',\n 'backgroundgradient': 'backgroundGradient',\n 'backgroundimage': 'backgroundImage',\n 'backgroundposition': 'backgroundPosition',\n 'backgroundrepeat': 'backgroundRepeat',\n 'backgroundsize': 'backgroundSize',\n 'bordercolor': 'borderColor',\n 'borderradius': 'borderRadius',\n 'borderstyle': 'borderStyle',\n 'borderwidth': 'borderWidth',\n 'borderbottomwidth': 'borderBottomWidth',\n 'borderleftwidth': 'borderLeftWidth',\n 'borderrightwidth': 'borderRightWidth',\n 'bordertopwidth': 'borderTopWidth',\n 'color': 'color',\n 'cursor': 'cursor',\n 'display': 'display',\n 'fontsize': 'fontSize',\n 'fontfamily': 'fontFamily',\n 'fontstyle': 'fontStyle',\n 'fontunit': 'fontunit',\n 'fontvariant': 'fontVariant',\n 'fontweight': 'fontWeight',\n 'height': 'height',\n 'horizontalalign': 'textAlign',\n 'lineheight': 'lineHeight',\n 'margin': 'margin',\n 'marginbottom': 'marginBottom',\n 'marginleft': 'marginLeft',\n 'marginright': 'marginRight',\n 'margintop': 'marginTop',\n 'opacity': 'opacity',\n 'overflow': 'overflow',\n 'padding': 'padding',\n 'paddingbottom': 'paddingBottom',\n 'paddingleft': 'paddingLeft',\n 'paddingright': 'paddingRight',\n 'paddingtop': 'paddingTop',\n 'picturesource': 'backgroundImage',\n 'textalign': 'textAlign',\n 'textdecoration': 'textDecoration',\n 'verticalalign': 'verticalAlign',\n 'visibility': 'visibility',\n 'whitespace': 'whiteSpace',\n 'width': 'width',\n 'wordbreak': 'wordbreak',\n 'zindex': 'zIndex'\n};\n\nexport const isStyle = key => !!propNameCSSKeyMap[key];\n\nconst MAP_SHELL_TYPE_IGNORE_LIST = {\n height: true,\n overflow: true,\n padding: true,\n paddingbottom: true,\n paddingleft: true,\n paddingright: true,\n paddingtop: true\n};\n\nconst MAP_CONTAINER_TYPE_IGNORE_LIST = {\n textalign: true\n};\n\nconst MAP_SCROLLABLE_CONTAINER_TYPE_IGNORE_LIST = {\n textalign: true,\n width: true\n};\n\n\nexport function styler($node: HTMLElement, component: StylableComponent, type?: APPLY_STYLES_TYPE, skipList?: Array<string>) {\n // apply init styles;\n const skipListMap = Object.create(null);\n if (skipList) {\n skipList.forEach(k => skipListMap[k] = true);\n }\n\n component.registerStyleChangeListener((key, nv) => {\n\n if (skipListMap[key]) {\n return;\n }\n\n // if the type is `shell` and the key is in the SHELL_TYPE_IGNORE_LIST, return\n if (type === APPLY_STYLES_TYPE.SHELL && MAP_SHELL_TYPE_IGNORE_LIST[key]) {\n return;\n }\n\n // if the type is `inner-shell` and the key is NOT in the SHELL_TYPE_IGNORE_LIST, return\n if (type === APPLY_STYLES_TYPE.INNER_SHELL) {\n if (!MAP_SHELL_TYPE_IGNORE_LIST[key]) {\n return;\n }\n if (key === 'height') {\n setCSS($node, 'overflow', nv ? 'auto' : '');\n }\n }\n\n // if the type is `container` and the key is in the CONTAINER_TYPE_IGNORE_LIST, return\n if (type === APPLY_STYLES_TYPE.CONTAINER && MAP_CONTAINER_TYPE_IGNORE_LIST[key]) {\n return;\n }\n\n if (type === APPLY_STYLES_TYPE.SCROLLABLE_CONTAINER) {\n if (MAP_SCROLLABLE_CONTAINER_TYPE_IGNORE_LIST[key]) {\n return;\n }\n\n if (key === 'height') {\n setCSS($node, 'overflow', nv ? 'auto' : '');\n }\n }\n\n if (key === 'fontsize' || key === 'fontunit') {\n setCSS($node, 'fontSize', component.fontsize === '' ? '' : component.fontsize + (component.fontunit || 'px'));\n } else if (key === 'backgroundimage') {\n setCSS($node, 'backgroundImage', component.picturesource || getBackGroundImageUrl(nv));\n } else if (propNameCSSKeyMap[key]) {\n setCSS($node, propNameCSSKeyMap[key], nv);\n }\n });\n}\n","import { FormWidgetType } from '@wm/core';\n\ndeclare const window;\nconst formFieldPrefix = 'wm-form-field-';\n// map of widgetSubType vs WidgetProps\nconst widgetProps = (() => {\n const props = new Map<string, Map<string, any>>();\n for (const key in FormWidgetType) {\n props.set(formFieldPrefix + FormWidgetType[key], new Map<string, any>());\n }\n return props;\n})();\n\n// returns the widgetPropsMap associated with the given identifier\nexport const getWidgetPropsByType = (identifier: string): Map<string, any> => widgetProps.get(identifier);\n\n// register the widgetProps with the given identifier\nexport const register = (identifier: string, props: Map<string, any>) => {\n widgetProps.set(identifier, props);\n window.WM_LOADED_COMPONENTS = [...window.WM_LOADED_COMPONENTS || [], identifier ];\n};\n\nexport const registerFormWidget = (identifier: string, props: Map<string, any>) => {\n const widgetName = formFieldPrefix + identifier;\n const existingProps = widgetProps.get(widgetName);\n if (existingProps) {\n props.forEach((v: any, k) => existingProps.set(k, v));\n }\n};\n\nexport enum PROP_TYPE {\n BOOLEAN = 1,\n NUMBER,\n STRING\n}\n\nexport const PROP_STRING: any = {type: PROP_TYPE.STRING};\nexport const PROP_NUMBER: any = {type: PROP_TYPE.NUMBER};\nexport const PROP_BOOLEAN: any = {type: PROP_TYPE.BOOLEAN};\nexport const PROP_ANY: any = {arrayType: true};\n","import { PROP_ANY, PROP_BOOLEAN, PROP_STRING, register } from '../../framework/widget-props';\n\nexport const registerProps = () => {\n register(\n 'wm-container',\n new Map(\n [\n ['animation', PROP_STRING],\n ['class', PROP_STRING],\n ['conditionalclass', PROP_ANY],\n ['conditionalstyle', PROP_ANY],\n ['content', PROP_STRING],\n ['name', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}]\n ]\n )\n );\n};\n","import { isDefined } from '@wm/core';\n\n/**\n * Widget Registry\n */\nconst registryById = new Map<string, any>();\n\n/**\n * returns the widget by the given widgetId\n */\nexport const getById = (widgetId: string) => registryById.get(widgetId);\n\n\n/**\n * Registers the Widget with the given id and name\n * Makes the Widget available with the viewParent\n * returns unRegister method\n */\nexport const register = (widget: any, viewParent: any, widgetId: string, name?: string): () => void => {\n let registered = false;\n registryById.set(widgetId, widget);\n if (name) {\n if (isDefined(viewParent.Widgets)) {\n registered = true;\n viewParent.Widgets[name] = widget;\n }\n }\n\n // Unregister method.\n return () => {\n registryById.delete(widgetId);\n if (registered) {\n viewParent.Widgets[name] = undefined;\n }\n };\n};\n\n/**\n * Deregisters the oldname in widgets registry and sets new name\n */\nexport const renameWidget = (viewParent: any, widget: any, nv: string, ov?: string) => {\n if (!isDefined(viewParent.Widgets)) {\n return;\n }\n if (ov) {\n viewParent.Widgets[ov] = undefined;\n }\n if (nv) {\n viewParent.Widgets[nv] = widget;\n }\n};\n","import { IDGenerator } from '@wm/core';\n\nexport const widgetIdGenerator = new IDGenerator('widget-id');\n","\nexport const EVENTS_MAP = new Map<string, string>([\n // ['enterkeypress', 'keypress.enter']\n ['tap', 'click']\n]);\n\n\n// TODO: Implement touch events for the mobile\n\nexport const DISPLAY_TYPE = {\n BLOCK: 'block',\n INLINE_BLOCK: 'inline-block',\n INLINE: 'inline'\n};\n\n// set of boolean attrs\nconst BOOLEAN_ATTRS = new Set([\n 'readonly', 'autofocus', 'disabled', 'startchecked', 'multiple',\n 'selected', 'required', 'controls', 'autoplay', 'loop', 'muted', 'show'\n]);\n\n/**\n * Returns true if the provided key is a boolean attribute\n * @param {string} key\n * @returns {boolean}\n */\nexport const isBooleanAttr = (key: string): boolean => BOOLEAN_ATTRS.has(key);\n\nconst DIMENSION_PROPS = new Set([\n 'width',\n 'height',\n 'iconheight',\n 'iconwidth',\n 'popoverwidth',\n 'popoverheight',\n 'imagewidth',\n 'imageheight'\n]);\n\nexport const isDimensionProp = (key: string): boolean => DIMENSION_PROPS.has(key);\n\nexport const DEBOUNCE_TIMES = {\n PAGINATION_DEBOUNCE_TIME : 250\n};\n","import { $appDigest, $unwatch, isChangeFromWatch, isObject, resetChangeFromWatch, toBoolean, toDimension } from '@wm/core';\n\nimport { BaseComponent } from '../common/base/base.component';\nimport { getWidgetPropsByType, PROP_TYPE } from './widget-props';\nimport { isStyle } from './styler';\nimport { getConditionalClasses, getWatchIdentifier } from '../../utils/widget-utils';\nimport { isBooleanAttr, isDimensionProp } from './constants';\nimport {startsWith} from \"lodash-es\";\n\n/**\n * Returns the parsed value based on the provided type\n * if the type is PROP_TYPE.NUMBER returns a number/NaN\n * if the type is PROP_BOOLEAN returns true/false\n * else returns the same value without any type conversion\n *\n * @param {string} key\n * @param value\n * @param {PROP_TYPE} type\n * @returns {any}\n */\nconst parseValue = (key: string, value: any, type: PROP_TYPE): any => {\n if (type === PROP_TYPE.BOOLEAN) {\n return toBoolean(value, isBooleanAttr(key) && key);\n }\n\n if (type === PROP_TYPE.NUMBER) {\n return +value;\n }\n\n return value;\n};\n\n\n/**\n * Whenever a property on a component changes through a proxy this method will be triggered\n * If the new value is not from a watch, the existing watch on that particular property will be removed\n * This method invokes the defaultPropertyChange handler where the common widget properties like name, class are handled\n * Notifies the component about the style/property change\n */\nexport const globalPropertyChangeHandler = (component: BaseComponent, key: string, nv: any) => {\n const widgetId = component.widgetId;\n const ov = component[key];\n\n // if the change is not from the bound watch, remove the existing watch\n if (!isChangeFromWatch()) {\n $unwatch(getWatchIdentifier(widgetId, key));\n }\n\n resetChangeFromWatch();\n\n const widgetProps = getWidgetPropsByType(component.getWidgetSubType());\n const propInfo = widgetProps ? widgetProps.get(key) : undefined;\n if (propInfo) {\n const type = propInfo.type;\n if (type) {\n nv = parseValue(key, nv, type);\n }\n }\n\n // Set the value in the component and trigger appDigest when there is a change in the value\n if (nv !== ov || isObject(nv) || isObject(ov)) {\n\n if (isDimensionProp(key)) {\n nv = toDimension(nv);\n } else if (startsWith(nv, 'resources/')) {\n const ref: any = component;\n if (ref._parentPrefab_ === undefined) {\n ref._parentPrefab_ = component.$element.parent().closest('[prefabname][prefabname!=\"__self__\"]').attr('prefabname') || '';\n }\n if (ref._parentPrefab_) {\n nv = `./app/prefabs/${ref._parentPrefab_}/${nv}`;\n } else if(propInfo && nv != propInfo.value) {\n nv = './' + nv;\n }\n }\n\n component[key] = nv;\n\n if (isStyle(key)) {\n component.notifyStyleChange(key, nv, ov);\n } else {\n\n if (key === 'conditionalclass') {\n nv = getConditionalClasses(nv, ov);\n }\n\n if (propInfo) {\n component.notifyPropertyChange(key, nv, ov);\n }\n }\n\n $appDigest();\n }\n};\n","/**\n * Proxy Provider - Creates a JS proxy for the given object\n */\nimport { propNameCSSKeyMap } from './styler';\nimport { globalPropertyChangeHandler } from './property-change-handler';\nimport { BaseComponent } from '../common/base/base.component';\nimport {isFunction, startsWith} from \"lodash-es\";\n\n/**\n * proxy handler for the components\n */\nexport const proxyHandler = {\n set: (target: BaseComponent, key: string, value: any): boolean => {\n globalPropertyChangeHandler(target, key, value);\n return true;\n },\n get: (target: BaseComponent, key: string): any => {\n const v = target[key];\n if (isFunction(v)) { // bind the proper context for the methods\n return v.bind(target);\n }\n return v;\n }\n};\n\nconst $RAF = window.requestAnimationFrame;\nconst $RAFQueue = [];\n\nconst invokeLater = fn => {\n if (!$RAFQueue.length) {\n $RAF(() => {\n $RAFQueue.forEach(f => f());\n $RAFQueue.length = 0;\n });\n }\n $RAFQueue.push(fn);\n};\n\nexport class WidgetProxyProvider {\n public static create(instance: BaseComponent, widgetSubType: string, propsByWidgetSubType: Map<string, any>) {\n // If the native Proxy is supported\n if ((window as any).Proxy) {\n return new Proxy(instance, proxyHandler);\n } else {\n\n // If the native Proxy is not supported, IE11\n const widget = Object.create(instance);\n\n // bind proper context for the methods\n invokeLater(() => {\n for (const key in instance) {\n if (isFunction(instance[key]) && key !== 'constructor' && key !== 'super' && !startsWith(key, 'ng')) {\n instance[key] = instance[key].bind(instance);\n }\n }\n });\n\n // define setters and getters for styles\n Object.keys(propNameCSSKeyMap)\n .forEach(key => {\n Object.defineProperty(widget, key, {\n get: () => instance[key],\n set: nv => globalPropertyChangeHandler(instance, key, nv)\n });\n });\n\n // define the setters and getters for Props\n if (propsByWidgetSubType) {\n propsByWidgetSubType\n .forEach((value, key) => {\n Object.defineProperty(widget, key, {\n get: () => instance[key],\n set: nv => globalPropertyChangeHandler(instance, key, nv)\n });\n });\n }\n\n return widget;\n }\n }\n}\n","import {\n AfterContentInit,\n AfterViewInit,\n ElementRef,\n Inject,\n inject,\n Injectable,\n Injector,\n OnDestroy,\n OnInit,\n Optional,\n ViewContainerRef\n} from '@angular/core';\nimport {EventManager} from '@angular/platform-browser';\n\nimport {ReplaySubject, Subject} from 'rxjs';\n\nimport {\n $invokeWatchers,\n $parseEvent,\n $unwatch,\n $watch,\n addClass,\n App,\n findParent,\n isDefined,\n isMobileApp,\n removeAttr,\n removeClass,\n setAttr,\n setCSS,\n setCSSFromObj,\n switchClass\n} from '@wm/core';\n\nimport {getWidgetPropsByType} from '../../framework/widget-props';\nimport {isStyle} from '../../framework/styler';\nimport {register, renameWidget} from '../../framework/widget-registry';\nimport {ChangeListener, Context, IWidgetConfig, WidgetConfig} from '../../framework/types';\nimport {widgetIdGenerator} from '../../framework/widget-id-generator';\nimport {DISPLAY_TYPE, EVENTS_MAP} from '../../framework/constants';\nimport {WidgetProxyProvider} from '../../framework/widget-proxy-provider';\nimport {getWatchIdentifier} from '../../../utils/widget-utils';\nimport {camelCase, extend, forEach, isArray, isObject, join, last, map} from \"lodash-es\";\n\ndeclare const $;\n\n// Gets list of classes to add and remove and applies on the $el\nconst updateClasses = (toAdd, toRemove, el) => {\n if (toRemove && toRemove.length) {\n removeClass(el, join(toRemove, ' '));\n }\n if (toAdd && toAdd.length) {\n addClass(el, join(toAdd, ' '));\n }\n};\n\n// To add and remove styles on the $el\nconst updateStyles = (nv, ov, el) => {\n if (ov && isObject(ov)) {\n const keys = Object.keys(ov || {});\n keys.forEach(function(key) {\n setCSS(el, key, '');\n });\n }\n if (nv && isObject(nv)) {\n setCSSFromObj(el, nv);\n }\n\n};\n\ninterface Child {\n widget: any,\n nativeElement: any\n}\n\n@Injectable()\nexport abstract class BaseComponent implements OnDestroy, OnInit, AfterViewInit, AfterContentInit {\n\n /**\n * unique identifier for the widget\n */\n public readonly widgetId: any;\n\n public isDestroyed: boolean;\n\n public isAttached = false;\n\n /**\n * jQuery nativeElement reference of the component root\n */\n public get $element() {\n return $(this.nativeElement);\n }\n\n /**\n * DOM node reference of the component root\n */\n public readonly nativeElement: HTMLElement;\n\n /**\n * Type of the component\n */\n protected readonly widgetType: string;\n\n /**\n * Most of the cases it is same as widgetType\n * for specific widgets like charts widgetType can be wm-chart where as the subtype can be wm-bar-chart\n */\n protected readonly widgetSubType: string;\n\n /**\n * Proxy for the component instance.\n */\n protected widget: any;\n\n /**\n * View parent component\n * eg, Page, Partial, Prefab\n */\n protected readonly viewParent: any;\n\n /**\n * EventManger to add/remove events\n */\n protected readonly eventManager: EventManager;\n\n /**\n * App Locale\n */\n public readonly appLocale: any;\n\n /**\n * Style change subject and observable\n */\n private readonly styleChange = new ReplaySubject();\n\n /**\n * Property change subject and observable\n */\n private readonly propertyChange = new Subject();\n\n /**\n * On Ready State change subject and observable\n */\n private readonly readyState = new Subject();\n\n /**\n * Component destroy subject and observable\n */\n private readonly destroy = new Subject();\n\n /**\n * Map of event handler callbacks\n */\n private eventHandlers = new Map<string, {callback: Function, locals: any}>();\n\n /**\n * context of the widget\n * when the widget is preset inside a repeater this context will have the repeater related properties\n */\n public context: any;\n\n /**\n * Initial state of the widget.\n * Will be undefined once the initial properties are set on to the component\n */\n private initState: Map<string, any>;\n\n /**\n * Internal flag to determine whether to wait for the widget initialization or not\n * If the initPromise is provided in the construction wait till the promise is resolved\n * If the initPromise is not provided proceed with the initialization, which is the default behavior.\n */\n private readonly delayedInit: boolean;\n\n /**\n * Display type of the component. eg, block(Default), inline-block, inline etc\n */\n private readonly displayType: string;\n\n /**\n * Holds the event registration functions.\n * these functions needs to be executed after onViewInit\n */\n private toBeSetupEventsQueue: Array<Function> = [];\n\n public __cloneable__ = false;\n\n public widgetProps: Map<string, any>;\n\n private $attrs = new Map<string, string>();\n\n private isMuted = false;\n\n public viewContainerRef: ViewContainerRef;\n public viewParentApp: App;\n /**\n * To avoid re-rendering of widget, passing unique id as contextKey to createCustomInjector\n * (for List, Dynamic Tabs, Accordion, Nav, Carousel)\n */\n public trackId: string;\n\n customWidgetSubType: string;\n\n protected constructor(\n protected inj: Injector,\n @Inject(WidgetConfig) config: IWidgetConfig,\n @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext?: any,\n initPromise?: Promise<any> // Promise on which the initialization has to wait\n ) {\n const elementRef = inj.get(ElementRef);\n this.nativeElement = elementRef.nativeElement;\n //making the code compatible in both the JIT and AOT modes\n this.viewParentApp = inj ? inj.get(App) : inject(App);\n this.widgetType = config.widgetType;\n this.widgetSubType = config.widgetSubType || config.widgetType;\n this.viewContainerRef = inj.get(ViewContainerRef);\n // this.viewParent = (inj as any).view.component;\n // this.viewParent = (this.viewContainerRef as any).parentInjector._lView[8];\n // this.viewParent = _viewParent || (this.viewContainerRef as any).parentInjector._lView[8];\n // https://github.com/angular/angular/blob/main/packages/core/src/render3/interfaces/view.ts\n\n let lView = (this.inj as any)._lView;\n this.viewParent = findParent(lView, this.viewParentApp);\n //console.log(\"---*************--context--*************---\", lView[8]);\n this.context = (this.inj as any)._lView[8];\n\n this.displayType = config.displayType || DISPLAY_TYPE.BLOCK;\n // this.context = (inj as any).view.context;\n // this.context = (this.viewContainerRef as any)._hostLView.debug.context;\n // let hasImplicitContext = (this.viewContainerRef as any)._hostLView.find(t => t && !!t.$implicit);\n // when $implicit is not available, this object contains some ngFor context or listitem context of the widget then\n // we use the direct parent for example: nav component is the parent for anchor => anchor gets viewParent as Nav\n // In other case, where we have implicitContext there we can make use of page/app level context hence viewParent.viewParent to get page level context\n /*if (hasImplicitContext && this.viewParent.viewParent) {\n if (this.viewParent.widgetType !== 'wm-card' && this.viewParent.widgetType !== 'wm-iframedialog'\n && this.viewParent.widgetType !== 'wm-partialdialog') {\n this.viewParent = this.viewParent.viewParent;\n }\n }\n if (!hasImplicitContext || (!this.viewParent.widgetType)) {\n this.context = (this.viewContainerRef as any)._hostLView.find(t => t && !!t.$implicit);\n } else {\n this.context = (this.viewContainerRef as any).parentInjector._lView[8];\n }*/\n\n /*if(_viewParent && !hasImplicitContext) {\n this.context = (this.viewContainerRef as any)._hostLView[8];\n } else {\n this.context = hasImplicitContext;\n }*/\n // if (['wm-list', 'wm-nav'].includes(this.viewParent.widgetType) || ['wm-carousel-template', 'wm-card'].includes(this.widgetType)) {\n // this.context = (this.viewContainerRef as any)._hostLView.debug.context;\n // } else {\n // this.context = (this.viewContainerRef as any).parentInjector._lView[8];\n // }\n this.widget = this.createProxy();\n this.eventManager = inj.get(EventManager);\n (this.nativeElement as any).widget = this.widget;\n\n this.appLocale = inj.get(App).appLocale || {};\n\n this.initContext();\n\n if (config.hostClass) {\n addClass(this.nativeElement, config.hostClass);\n }\n\n this.widgetId = this.generateWidgetId();\n this.trackId = this.generateWidgetId();\n setAttr(this.nativeElement, 'widget-id', this.widgetId, true);\n\n // register default property change handler and style change handler\n this.registerStyleChangeListener(this.onStyleChange, this);\n this.registerPropertyChangeListener(this.onPropertyChange, this);\n\n // if the initPromise is provided, wait till the promise is resolved to proceed with the widget initialization\n if (!initPromise) {\n this.initWidget();\n } else {\n this.delayedInit = true;\n initPromise.then((resolveFn) => {\n let formFieldCW = this.widgetSubType === 'wm-form-field-custom-widget',\n cw = this.widgetSubType.startsWith('wm-custom-');\n if( formFieldCW || cw ) {\n this.customWidgetSubType = formFieldCW ? 'wm-form-field-' + last(this[\"formWidget\"].config.widgetType.split('-')) : this[\"config\"].widgetType;\n }\n\n this.initWidget();\n this.setInitProps();\n resolveFn && resolveFn()\n });\n }\n if(explicitContext) {\n extend(this.context, explicitContext);\n }\n }\n\n public getNativeElement(): HTMLElement {\n return this.nativeElement;\n }\n\n public getWidgetType(): string {\n return this.widgetType;\n }\n\n public getWidgetSubType(): string {\n return this.widgetSubType;\n }\n\n public getWidget(): any {\n return this.widget;\n }\n\n public setProperty(propName, propValue) {\n this.widget[propName] = propValue;\n }\n\n public getViewParent(): any {\n return this.viewParent;\n }\n\n public notifyStyleChange(key: string, nv: any, ov: any) {\n this.styleChange.next({key, nv, ov});\n }\n\n public notifyPropertyChange(key: string, nv: any, ov: any) {\n this.propertyChange.next({key, nv, ov});\n }\n\n public registerStyleChangeListener(fn: ChangeListener, ctx?: any) {\n if (ctx) {\n fn = fn.bind(ctx);\n }\n this.styleChange.subscribe(({key, nv, ov}) => fn(key, nv, ov));\n }\n\n public registerReadyStateListener(fn: Function, ctx?: any) {\n if (ctx) {\n fn = fn.bind(ctx);\n }\n if (this.readyState.isStopped) {\n fn();\n return;\n }\n this.readyState.subscribe(() => fn());\n }\n\n public registerPropertyChangeListener(fn: ChangeListener, ctx?: any) {\n if (ctx) {\n fn = fn.bind(ctx);\n }\n this.propertyChange.subscribe(({key, nv, ov}) => fn(key, nv, ov));\n }\n\n public registerDestroyListener(fn: Function, ctx?: any) {\n if (ctx) {\n fn = fn.bind(ctx);\n }\n this.destroy.subscribe(() => {}, () => {}, () => fn());\n }\n\n public getDisplayType(): string {\n return this.displayType;\n }\n\n protected createProxy(): any {\n return WidgetProxyProvider.create(this, this.widgetSubType, getWidgetPropsByType(this.widgetSubType));\n }\n\n protected initContext() {\n // const context = (this.inj as any).view.context;\n const context = this.context || {};\n\n const parentContexts = this.inj.get(Context, {});\n\n // assign the context property accordingly\n if (this.viewParent !== context) {\n this.context = context;\n } else {\n this.context = {};\n }\n\n if (parentContexts) {\n let parentContextObj = {};\n if (isArray(parentContexts)) {\n forEach(parentContexts, (contextObj) => {\n Object.assign(parentContextObj, contextObj);\n });\n } else {\n parentContextObj = parentContexts;\n }\n this.context = Object.assign({}, parentContextObj, this.context);\n }\n }\n\n /**\n * set the value on the proxy object ie, widget\n * setting the property on the proxy will invoke the change listeners\n * @param {string} key\n * @param value\n */\n public setWidgetProperty(key: string, value: any) {\n this.widget[key] = value;\n }\n\n public getAttr(attrName: string): string {\n return this.$attrs.get(attrName);\n }\n\n /**\n * returns app instance\n * @returns {App}\n */\n public getAppInstance() {\n return this.inj.get(App);\n }\n\n /**\n * Generates a unique id\n * Default pattern is `widget-id-${id}`\n * Components can override this method to generate a different id eg, bar-chart-1\n */\n protected generateWidgetId(): string {\n return widgetIdGenerator.nextUid();\n }\n\n /**\n * Handles the common functionality across the components\n * eg,\n * 1. value of the class property will be applied on the host element\n * 2. based on the value of show property component is shown/hidden\n *\n * @param {string} key\n * @param nv\n * @param ov\n */\n protected onPropertyChange(key: string, nv: any, ov?: any) {\n if (key === 'show') {\n this.nativeElement.hidden = !nv;\n } else if (key === 'hint') {\n if (!isMobileApp()) {\n setAttr(this.nativeElement, 'title', nv);\n }\n } else if (key === 'class') {\n switchClass(this.nativeElement, nv, ov);\n let result = nv.match(/(\\W|^)(h([0-6]))(?=\\s|$)/);\n if (result) {\n setAttr(this.nativeElement, 'role', 'heading');\n setAttr(this.nativeElement, 'aria-level', result[3]);\n }\n } else if (key === 'name' || key === 'tabindex') {\n setAttr(this.nativeElement, key, nv);\n if (key === 'name' && nv) {\n renameWidget(this.viewParent, this.widget, nv, ov);\n }\n } else if (key === 'conditionalclass') {\n // update classes if old and nv value are different\n updateClasses(nv.toAdd, nv.toRemove, this.nativeElement);\n } else if (key === 'autoplay') {\n const tagName = this.widgetType === 'wm-audio' ? 'audio' : 'video';\n // Trigger media(audio/video) element load method after changing autoplay property\n this.nativeElement.querySelector(tagName).load();\n } else if (key === 'conditionalstyle') {\n // update styles if old and nv value are different\n updateStyles(nv, ov, this.nativeElement);\n } else if (key === 'animation') {\n // update styles if old and nv value are different\n addClass(this.nativeElement, \"animated \" + nv);\n } else if (key === 'disabled') {\n // WMS-19321: In IE, widget is in disabled state when disabled=\"false\" attribute is present\n (nv === true) ? setAttr(this.nativeElement, 'disabled', 'true', true) : removeAttr(this.nativeElement, 'disabled', true);\n }\n }\n\n /**\n * Default style change handler\n */\n protected onStyleChange(k: string, nv: any, ov?: any) {}\n\n /**\n * Register the widget with the widgetRegistry\n */\n protected registerWidget(widgetName: string) {\n this.registerDestroyListener(register(this.widget, this.viewParent, this.widgetId, widgetName));\n }\n\n /**\n * override the\n */\n protected getMappedEventName(eventName) {\n return EVENTS_MAP.get(eventName) || eventName;\n }\n\n /**\n * invoke the event handler\n * Components can override this method to execute custom logic before invoking the user callback\n */\n protected handleEvent(node: HTMLElement, eventName: string, eventCallback: Function, locals: any, meta?: string) {\n this.eventManager.addEventListener(\n node,\n eventName,\n e => {\n locals.$event = e;\n if (meta === 'delayed') {\n setTimeout(() => eventCallback(), 150);\n } else {\n return eventCallback();\n }\n }\n );\n }\n\n /**\n * parse the event expression and save reference to the function inside eventHandlers map\n * If the component provides a override for an event through @Event decorator invoke that\n * else invoke the resolved function\n *\n * @param {string} eventName\n * @param {string} expr\n */\n protected processEventAttr(eventName: string, expr: string, meta?: string, child?: Child) {\n const fn = $parseEvent(expr);\n const locals = this.context;\n locals.widget = child ? child.widget : this.widget;\n const boundFn = fn.bind(undefined, child ? this.viewParent.viewParent : this.viewParent, locals);\n\n let widget = child ? child.widget : this,\n nativeElement = child ? child.nativeElement : this.nativeElement;\n\n const eventCallback = () => {\n let boundFnVal;\n $invokeWatchers(true);\n try {\n locals.$event = locals.$event || new window.CustomEvent(eventName);\n // If the event is bound directly to the variable then we need to internally handle\n // the promise returned by the variable call.\n boundFnVal = boundFn();\n if (boundFnVal instanceof Promise) {\n boundFnVal.then( response => response, err => err);\n } else {\n return boundFnVal;\n }\n } catch (e) {\n console.error(e);\n }\n };\n if(child && !child.widget.eventHandlers)\n child.widget.eventHandlers = new Map<string, {callback: Function, locals: any}>()\n\n widget.eventHandlers.set(this.getMappedEventName(eventName), {callback: eventCallback, locals});\n // prepend eventName with on and convert it to camelcase.\n // eg, \"click\" ---> onClick\n const onEventName = camelCase(`on-${eventName}`);\n // save the eventCallback in widgetScope.\n\n widget[onEventName] = eventCallback;\n\n // events needs to be setup after viewInit\n this.toBeSetupEventsQueue.push(() => {\n this.handleEvent(nativeElement, this.getMappedEventName(eventName), eventCallback, locals, meta);\n });\n }\n\n /**\n * Process the bound property\n * Register a watch on the bound expression\n */\n protected processBindAttr(propName: string, expr: string, child ?: any) {\n if(!child)\n this.initState.delete(propName);\n let viewParent = child ? child.widget.viewParent.viewParent : this.viewParent,\n context = child ? child.widget.context : this.context,\n widget = child ? child.widget : this.widget,\n isMuted = child ? child.widget.isMuted : this.isMuted,\n widgetProps = child ? child.widget.widgetProps : this.widgetProps,\n widgetId = child ? child.widget.widgetId : this.widgetId;\n this.registerDestroyListener(\n $watch(\n expr,\n viewParent,\n context,\n nv => {\n if(propName.startsWith('base-') && widget.updateData)\n widget.updateData(propName, nv);\n widget[propName] = nv\n },\n getWatchIdentifier(widgetId, propName),\n propName === 'datasource',\n widgetProps.get(propName),\n () => isMuted\n )\n );\n }\n\n /**\n * Remove watch on the bound property\n */\n protected removePropertyBinding(propName: string) {\n $unwatch(getWatchIdentifier(this.widgetId, propName));\n }\n\n /**\n * invoke the event callback method\n * @param {string} eventName\n * @param extraLocals\n */\n public invokeEventCallback(eventName: string, extraLocals?: any) {\n const callbackInfo = this.eventHandlers.get(eventName);\n if (callbackInfo) {\n const fn = callbackInfo.callback;\n const locals = callbackInfo.locals || {};\n\n if (fn) {\n return fn(Object.assign(locals, extraLocals));\n }\n }\n }\n /**\n * Process the attribute\n * If the attribute is an event expression, generate a functional representation of the expression\n * and keep in eventHandlers\n * If the attribute is a bound expression, register a watch on the expression\n */\n protected processAttr(attrName: string, attrValue: string, child?: Child) {\n // console.log(\"====attrName=====\", attrName, \"=====typeof attrname=====\", typeof attrName, \"-----attrValue----\", attrValue);\n const {0: propName, 1: type, 2: meta, length} = attrName.split('.');\n if (type === 'bind') {\n // if the show property is bound, set the initial value to false\n if (propName === 'show' && !this.widgetSubType.startsWith('wm-custom-')) {\n this.nativeElement.hidden = true;\n }\n this.processBindAttr(propName, attrValue, child);\n } else if (type === 'event' && !this.nativeElement.hasAttribute('customwidgetcontainer')) {\n this.processEventAttr(propName, attrValue, meta, child);\n } else if (length === 1) {\n // remove class and name attributes. Component will set them on the proper node\n if (attrName === 'class') {\n removeClass(this.nativeElement, attrValue);\n } else if (attrName === 'tabindex' || attrName === 'name') {\n removeAttr(this.nativeElement, attrName);\n }\n\n this.initState.set(propName, attrValue);\n } else {\n // custom attributes provided on elDef;\n }\n }\n\n /**\n * This is required as the native element attributes are case insensitive(camelcase) like customExpressions becomes customexpression\n * and our logic to check like these changes will fail. Before IVY changes, angular maintains a separate object with these attributes\n * as it is like in the camelcase. With IVY all those are gone. So need to maintain a separate list with the camelcasing of attributes\n * @private\n * _tNode.attrs attributes are stored in array(even index: key, odd index: value)\n */\n protected getAttributes() {\n let _tNodeAttrs = (this.inj as any)._tNode.attrs, actualAttrs = Array.from(this.nativeElement.attributes).map(attr => attr.name);\n if(_tNodeAttrs === null) {\n return actualAttrs.sort();\n }\n forEach(_tNodeAttrs, (attr, i: any) => {\n if (typeof attr === 'number') {\n return false;\n }\n if(typeof attr === 'string' && i % 2 == 0) {\n let lowerCaseAttr = attr.toLowerCase();\n if (actualAttrs.includes(lowerCaseAttr)) {\n let index = actualAttrs.indexOf(lowerCaseAttr)\n actualAttrs[index] = attr;\n }\n }\n });\n\n /*\n Sorting attributes as properties like placeholder is not working when it is bound.\n placeholder and placeholder.bind two properties are coming in Array.\n When array is not sorted, initially placeholder.bind value is set then placeholder default value is updated.\n If array is sorted, placeholder.bind value will be set finally.\n This is caused because of the way we are storing attribute names in watcher registry map\n */\n return actualAttrs.sort();\n }\n\n /**\n * Process the attributes\n */\n private processAttrs() {\n map(this.getAttributes(), (attrName: string) => {\n let attrValue = this.nativeElement.attributes[attrName].value\n this.$attrs.set(attrName, attrValue);\n this.processAttr(attrName, attrValue);\n });\n }\n\n /**\n * Update the initState with the default property values and the values provided in the markup\n * Process the attributes\n * Register the widget\n */\n protected initWidget() {\n this.initState = new Map<string, any>();\n\n // get the widget properties\n const widgetProps: Map<string, any> = getWidgetPropsByType(this.widgetSubType);\n if(this.customWidgetSubType) {\n const customWidgetProps: Map<string, any> = getWidgetPropsByType(this.customWidgetSubType);\n customWidgetProps.forEach((v, k) => {\n widgetProps.set(k, v);\n });\n }\n widgetProps.forEach((v, k) => {\n if (isDefined(v.value)) {\n this.initState.set(k, v.value);\n }\n });\n\n this.widgetProps = widgetProps;\n\n this.processAttrs();\n\n this.registerWidget(this.initState.get('name'));\n }\n\n /**\n * Update the default properties and the properties provided in the markup in component\n * Invoking this method will result in invocation of propertyChange handlers on the component for the first time\n */\n protected setInitProps() {\n if (this.initState.get('name')) {\n this.widget.name = this.initState.get('name');\n }\n this.initState.forEach((v, k) => {\n // name is already set, ignore name\n // if the key is part of to be ignored attributes list do not set it on the component instance\n if ((this.widgetProps.get(k) || isStyle(k)) && k !== 'name') {\n this.widget[k] = v;\n }\n });\n this.initState.clear();\n this.initState = undefined;\n\n this.readyState.next(null);\n this.readyState.complete();\n }\n\n /**\n * Returns true, if a listener registered for the given event on this widget markup.\n * @param eventName\n * @returns {boolean}\n */\n protected hasEventCallback(eventName): boolean {\n return this.eventHandlers.has(eventName);\n }\n\n /**\n * Sets the focus on the widget\n */\n protected focus(): void {\n /**\n * Check for the nodes having focus-target attribute inside the element\n * If found, focus the first node (eg, date widget)\n * else, focus the element (eg, text widget)\n */\n let $target = this.$element[0].querySelector('[focus-target]');\n if (!$target) {\n $target = this.$element[0];\n }\n $target.focus();\n }\n\n // Defining the execute method on BaseComponent. If dataset is binded to widgets ouptut then datasource.execute will be defined\n protected execute(operation, options): any {\n\n }\n\n public mute() {\n this.isMuted = true;\n }\n\n public unmute() {\n this.isMuted = false;\n }\n\n private customInjectorMap: any = {};\n\n /**\n * After the Angular 17 upgrade, Angular is no longer sending ngTemplateContext to components in ng-template.\n * Wavemaker widgets inside ng-template require context to evaluate bind expressions.\n * So we're creating an injectionToken that returns the context as a value.\n * We are passing the injectionToken to the ngTemplateOutletInjector.\n * This injects the context into each widget in the ng-template.\n * In the widget component constructor we are getting the injectionToken using dependency injection.\n * If injectionToken is present, we extend the component context with the value of injectionToken.\n * @param contextKey\n * @param context\n * @returns injector\n */\n createCustomInjector(contextKey: string, context: any) {\n if(this.customInjectorMap[contextKey]) {\n return this.customInjectorMap[contextKey].injector;\n }\n const injector = Injector.create({\n providers: [{ provide: 'EXPLICIT_CONTEXT', useFactory: () => context }]\n });\n this.customInjectorMap[contextKey] = { context, injector };\n return injector;\n }\n\n /**\n * After the host page is attached from cache, this function is called.\n */\n public ngOnAttach() {\n this.isAttached = true;\n }\n\n /**\n * Before the host page is detached from dom and stored in cache, this function is called.\n */\n public ngOnDetach() {\n this.isAttached = false;\n }\n\n /**\n * nativeElement will be available by this time\n * if the delayInit is false, properties meta will be available by this time\n * Invoke the setInitProps if the delayInit is false\n */\n ngOnInit() {\n if (!this.delayedInit) {\n this.setInitProps();\n }\n }\n\n /**\n * Register the events\n */\n ngAfterViewInit() {\n if (this.toBeSetupEventsQueue.length) {\n for (const fn of this.toBeSetupEventsQueue) {\n fn();\n }\n }\n this.toBeSetupEventsQueue.length = 0;\n this.isAttached = true;\n }\n\n ngAfterContentInit() {}\n\n ngOnDestroy() {\n this.isDestroyed = true;\n this.widget = Object.create(null);\n this.styleChange.complete();\n this.propertyChange.complete();\n this.destroy.complete();\n this.isAttached = false;\n }\n}\n","import { BaseComponent } from './base.component';\nimport { Injectable } from '@angular/core';\n\n@Injectable()\nexport abstract class StylableComponent extends BaseComponent {\n backgroundattachment: string;\n backgroundcolor: string;\n backgroundgradient: string;\n backgroundimage: string;\n backgroundposition: string;\n backgroundrepeat: string;\n backgroundsize: string;\n bordercolor: string;\n borderradius: string;\n borderstyle: string;\n borderwidth: string;\n borderbottomwidth: string;\n borderleftwidth: string;\n borderrightwidth: string;\n bordertopwidth: string;\n color: string;\n cursor: string;\n display: string;\n fontsize: string;\n fontfamily: string;\n fontstyle: string;\n fontunit: string;\n fontvariant: string;\n fontweight: string;\n height: string;\n horizontalalign: string;\n lineheight: string;\n margin: string;\n marginbottom: string;\n marginleft: string;\n marginright: string;\n margintop: string;\n opacity: string;\n overflow: string;\n padding: string;\n paddingbottom: string;\n paddingleft: string;\n paddingright: string;\n paddingtop: string;\n picturesource: string;\n textalign: string;\n textdecoration: string;\n verticalalign: string;\n visibility: string;\n whitespace: string;\n width: string;\n wordbreak: string;\n zindex: string;\n}\n","import { Directive, Inject, Self } from '@angular/core';\n\nimport { IRedrawableComponent, WidgetRef } from '../../framework/types';\n\n@Directive({\n selector: '[redrawable]'\n})\nexport class RedrawableDirective implements IRedrawableComponent {\n redraw: Function;\n constructor(@Self() @Inject(WidgetRef) widget) {\n this.redraw = () => {\n const tabEl = widget.$element.closest(\"[wmtabpane]\");\n const accordionEl = widget.$element.closest('[wmaccordionpane]').find('.panel-heading');\n if ((tabEl.length && !tabEl.hasClass('active')) || (accordionEl.length && !accordionEl.hasClass('active'))) {\n return;\n }\n return widget.redraw && widget.redraw();\n }\n }\n}\n","import {ContentChildren, Directive, Inject, Injector, Optional} from '@angular/core';\nimport { StylableComponent } from \"./stylable.component\";\nimport { RedrawableDirective } from \"../redraw/redrawable.directive\";\nimport { IWidgetConfig } from '../../framework/types';\nimport {includes, pickBy} from \"lodash-es\";\n\n@Directive()\nexport abstract class BaseContainerComponent extends StylableComponent {\n // reference to the components which needs a redraw(eg, grid, chart) when the show of this component changes\n @ContentChildren(RedrawableDirective, { descendants: true }) reDrawableComponents;\n public content;\n public Widgets;\n\n constructor(inj: Injector, WIDGET_CONFIG: IWidgetConfig, explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n }\n\n private updateRedrawableComponents(widgets) {\n pickBy(widgets, widget => {\n // check for redrawable widget and whether it is already exist in reDrawableComponents query list or not\n if (widget && widget.nativeElement && widget.nativeElement.hasAttribute('redrawable') && !includes(this.reDrawableComponents._results, widget)) {\n this.reDrawableComponents._results.push(widget);\n }\n if (widget && widget.Widgets) {\n this.updateRedrawableComponents(widget.Widgets);\n }\n });\n }\n\n private redrawChildren() {\n // If container is bound to partial content, manually updating reDrawableComponents query list.\n if (this.content && this.Widgets) {\n this.updateRedrawableComponents(this.Widgets);\n }\n setTimeout(() => {\n if (this.reDrawableComponents) {\n this.reDrawableComponents.forEach(c => c.redraw());\n }\n }, 100);\n }\n\n onPropertyChange(key: string, nv: any, ov?: any) {\n super.onPropertyChange(key, nv, ov);\n if (key === 'show') {\n if (nv) {\n this.redrawChildren();\n }\n }\n }\n}\n","import {Directive, Inject, Injector, Optional} from '@angular/core';\n\nimport {addClass} from '@wm/core';\n\nimport { APPLY_STYLES_TYPE, styler } from '../../framework/styler';\nimport { IWidgetConfig } from '../../framework/types';\nimport { registerProps } from './container.props';\nimport { provideAsWidgetRef } from '../../../utils/widget-utils';\nimport {BaseContainerComponent} from \"../base/base-container.component\";\n\nconst DEFAULT_CLS = 'app-container';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-container',\n hostClass: DEFAULT_CLS\n};\n\n@Directive({\n selector: '[wmContainer]',\n providers: [\n provideAsWidgetRef(ContainerDirective)\n ]\n})\nexport class ContainerDirective extends BaseContainerComponent {\n static initializeProps = registerProps();\n\n constructor(inj: Injector, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext?: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n\n addClass(this.nativeElement, DEFAULT_CLS);\n styler(this.nativeElement, this, APPLY_STYLES_TYPE.CONTAINER);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n\nimport { transformFileURI } from '@wm/core';\n\nimport { getImageUrl } from '../utils/widget-utils';\n\n@Pipe({\n name: 'image'\n})\nexport class ImagePipe implements PipeTransform {\n transform(url: string, encode?: boolean, defaultImageUrl?: string) {\n return transformFileURI(getImageUrl(url, encode, defaultImageUrl));\n }\n}\n","import { PROP_ANY, PROP_BOOLEAN, PROP_STRING, register } from '../../framework/widget-props';\n\nexport const registerProps = () => {\n register(\n 'wm-item-template',\n new Map(\n [\n ['content', PROP_STRING]\n ]\n )\n );\n};\n","/**\n * This directive is used to set custom template partial for an item and maintains separate scope for each item.\n * This takes two inputs\n * 1) template partial name as wmItemTemplate\n * 2) item object as userComponentParams\n * Example: Providing a custom template for the search/autocomplete widget (customized UI in the dropdown for each item)\n * Add this directive to the li tag and provide item object and partial name like below. And also provide partialContainer and partial-container-target to render the partial.\n * <li #liElements *ngFor=\"let match of matches\" [wmItemTemplate]=\"content\" [userComponentParams]=\"match.item\" partialContainer>\n * <a partial-container-target></a>\n * </li>\n */\n\nimport {Directive, ElementRef, Inject, Injector, Input, Optional, ViewContainerRef} from '@angular/core';\nimport { NgForOfContext } from '@angular/common';\n\nimport {App} from '@wm/core';\n\nimport { provideAsWidgetRef } from '../../../utils/widget-utils';\nimport { registerProps } from './item-template.props';\nimport { StylableComponent } from '../base/stylable.component';\n\nconst WIDGET_CONFIG = {widgetType: 'wm-item-template'};\n\n@Directive({\n selector: '[wmItemTemplate]',\n exportAs: 'itemTemplateRef',\n providers: [\n provideAsWidgetRef(ItemTemplateDirective)\n ]\n})\nexport class ItemTemplateDirective extends StylableComponent {\n static initializeProps = registerProps();\n public context;\n public content;\n public partialParams;\n public nativeElement: HTMLElement;\n public viewContainerRef: ViewContainerRef;\n get $index() {\n return this.context.index;\n }\n\n @Input() userComponentParams;\n\n @Input() set wmItemTemplate(value) {\n this.widget.content = value;\n }\n\n constructor(inj: Injector, elRef: ElementRef, private app: App, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n this.nativeElement = elRef.nativeElement;\n // this.context = (<NgForOfContext<ItemTemplateDirective>>(<any>inj).view.context);\n this.context = (this.inj as any)._lView[8];\n }\n ngOnInit() {\n super.ngOnInit();\n this.partialParams.item = this.userComponentParams.dataObject;\n }\n}\n","import { PROP_BOOLEAN, register } from '../../framework/widget-props';\n\nexport const registerProps = () => {\n register(\n 'wm-repeat-template',\n new Map(\n [\n ['show', PROP_BOOLEAN]\n ]\n )\n );\n};\n","import {Directive, Inject, Injector, Optional} from '@angular/core';\nimport { StylableComponent } from '../base/stylable.component';\nimport { registerProps } from './repeat-template.props';\nimport { styler } from '../../framework/styler';\nimport { IWidgetConfig } from '../../framework/types';\n\nconst DEFAULT_CLS = 'app-repeat-item';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-repeat-template',\n hostClass: DEFAULT_CLS\n};\n\n@Directive({\n selector: '[wmRepeatTemplate]',\n exportAs: 'repeatItemRef'\n})\nexport class RepeatTemplateDirective extends StylableComponent {\n static initializeProps = registerProps();\n\n constructor(inj: Injector, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n styler(this.nativeElement, this);\n }\n}\n","import {\n Directive,\n Inject,\n inject,\n Injector,\n Input,\n OnDestroy,\n Optional,\n TemplateRef,\n ViewContainerRef\n} from '@angular/core';\n\nimport {$watch, App, findParent} from '@wm/core';\nimport {extend} from \"lodash-es\";\n\n@Directive({\n selector: '[lazyLoad]'\n})\nexport class LazyLoadDirective implements OnDestroy {\n private readonly viewParent: any;\n private readonly context = {};\n private embeddedView;\n private unSubscribeFn: Function;\n\n constructor(\n inj: Injector,\n private templateRef: TemplateRef<any>,\n private viewContainer: ViewContainerRef,\n @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any = {}\n ) {\n let viewParentApp = inj ? inj.get(App) : inject(App);\n let lView = (inj as any)._lView;\n this.viewParent = findParent(lView, viewParentApp)\n //this.context = (inj as any).view.context;\n extend(this.context, (inj as any)._lView[8], explicitContext);\n }\n\n @Input()\n set lazyLoad(expr) {\n this.unSubscribeFn = $watch(\n expr,\n this.viewParent,\n this.context,\n (val) => {\n if (!this.embeddedView && val) {\n this.embeddedView = this.viewContainer.createEmbeddedView(this.templateRef, this.context);\n this.unSubscribeFn();\n }\n }\n );\n }\n\n ngOnDestroy() {\n this.unSubscribeFn();\n }\n}\n","import { PROP_BOOLEAN, PROP_STRING, register } from '../../framework/widget-props';\n\nexport const registerProps = () => {\n register(\n 'wm-message',\n new Map(\n [\n ['animation', PROP_STRING],\n ['caption', {value: 'Message', ...PROP_STRING}],\n ['class', PROP_STRING],\n ['hideclose', {value: false, ...PROP_BOOLEAN}],\n ['name', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}],\n ['type', {value: 'success', ...PROP_STRING}],\n ]\n )\n );\n};\n","import {Component, Inject, Injector, Optional} from '@angular/core';\n\nimport {switchClass} from '@wm/core';\n\nimport { styler } from '../../framework/styler';\nimport { IWidgetConfig } from '../../framework/types';\nimport { StylableComponent } from '../base/stylable.component';\nimport { registerProps } from './message.props';\nimport { provideAsWidgetRef } from '../../../utils/widget-utils';\n\nconst DEFAULT_CLS = 'alert app-message';\nconst WIDGET_CONFIG: IWidgetConfig = {widgetType: 'wm-message', hostClass: DEFAULT_CLS};\n\n@Component({\n selector: '[wmMessage]',\n templateUrl: './message.component.html',\n providers: [\n provideAsWidgetRef(MessageComponent)\n ],\n exportAs: 'wmMessage'\n})\nexport class MessageComponent extends StylableComponent {\n static initializeProps = registerProps();\n messageClass = '';\n messageIconClass = '';\n type = '';\n caption: string;\n public hideclose: any;\n\n constructor(inj: Injector, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n styler(this.nativeElement, this);\n }\n\n public showMessage(caption?: string, type?: string) {\n if (caption) {\n this.caption = caption;\n }\n if (type) {\n this.setWidgetProperty('type', type);\n }\n this.setWidgetProperty('show', true);\n }\n\n public hideMessage() {\n this.setWidgetProperty('show', false);\n }\n\n public dismiss($event) {\n this.hideMessage();\n this.invokeEventCallback('close', {$event});\n }\n\n private onMessageTypeChange(nv: string) {\n let msgCls, msgIconCls;\n switch (nv) {\n case 'success':\n msgCls = 'alert-success';\n msgIconCls = 'wm-sl-l sl-check';\n break;\n case 'error':\n msgCls = 'alert-danger';\n msgIconCls = 'wi wi-cancel';\n break;\n case 'warn': /*To support old projects with type as \"warn\"*/\n case 'warning':\n msgCls = 'alert-warning';\n msgIconCls = 'wm-sl-l sl-alarm-bell';\n break;\n case 'info':\n msgCls = 'alert-info';\n msgIconCls = 'wi wi-info';\n break;\n case 'loading':\n msgCls = 'alert-info alert-loading';\n msgIconCls = 'fa fa-spinner fa-spin';\n break;\n }\n switchClass(this.nativeElement, msgCls, this.messageClass);\n this.messageClass = msgCls;\n this.messageIconClass = msgIconCls;\n }\n\n onPropertyChange(key, nv, ov?) {\n if (key === 'type') {\n this.onMessageTypeChange(nv);\n } else {\n super.onPropertyChange(key, nv, ov);\n }\n }\n}\n","<i aria-hidden=\"true\" [title]=\"type + 'Alert'\" class=\"icon {{type}} {{messageIconClass}}\"></i>\n<span [innerHtml]=\"caption\"></span>\n<button title=\"Close\" type=\"button\" class=\"btn-transparent close\" [hidden]=\"hideclose\" (click)=\"dismiss($event)\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</span>\n</button>\n","import { PROP_STRING, register } from '../../framework/widget-props';\n\nexport const registerProps = () => {\n register(\n 'wm-partial',\n new Map(\n [\n ['name', PROP_STRING]\n ]\n )\n );\n};\n","import {Directive, Inject, Injector, OnDestroy, Optional} from '@angular/core';\n\nimport {Viewport, ViewportEvent} from '@wm/core';\nimport { StylableComponent } from '../base/stylable.component';\nimport { registerProps } from './partial.props';\nimport { provideAsWidgetRef } from '../../../utils/widget-utils';\nimport {assign} from \"lodash-es\";\n\nconst DEFAULT_CLS = 'app-partial clearfix';\nconst WIDGET_CONFIG = {widgetType: 'wm-partial', hostClass: DEFAULT_CLS};\n\n@Directive({\n selector: '[wmPartial]',\n providers: [\n provideAsWidgetRef(PartialDirective)\n ]\n})\nexport class PartialDirective extends StylableComponent implements OnDestroy {\n static initializeProps = registerProps();\n constructor(inj: Injector, private viewport: Viewport, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n\n this.registerDestroyListener(this.viewport.subscribe(ViewportEvent.RESIZE, data => this.callback('resize', data)));\n this.registerDestroyListener(this.viewport.subscribe(ViewportEvent.ORIENTATION_CHANGE, data => this.callback('orientationchange', data)));\n }\n\n private callback(eventName, locals?: object) {\n locals = assign({widget: this}, locals);\n this.invokeEventCallback(eventName, locals);\n }\n\n public ngOnAttach() {\n this.callback('attach');\n }\n\n public ngOnDetach() {\n this.callback('detach');\n }\n\n public ngOnDestroy() {\n this.callback('destroy');\n super.ngOnDestroy();\n }\n\n}\n","import { Attribute, Directive, Inject, Self, Input, OnInit } from '@angular/core';\n\nimport { Subject } from 'rxjs';\n\nimport { $watch } from '@wm/core';\n\nimport { WidgetRef } from '../../framework/types';\nimport {get} from \"lodash-es\";\n\n@Directive({\n selector: '[partialContainer]',\n})\nexport class PartialParamHandlerDirective {\n constructor (@Self() @Inject(WidgetRef) private widgetRef) {\n this.widgetRef.partialParams = {};\n this.widgetRef.pageParams = this.widgetRef.partialParams;\n this.widgetRef.params$ = new Subject();\n }\n\n registerParams(name: string, value: string, bindExpr: string, type: string) {\n this.widgetRef.partialParams[name] = value;\n if (!value && bindExpr) {\n this.widgetRef.registerDestroyListener(\n //[Todo-CSP]: expr fn should be generated be default\n $watch(bindExpr, this.widgetRef.getViewParent(), get(this.widgetRef, 'context'), nv => {\n this.widgetRef.partialParams[name] = nv;\n\n // notify the partial container of the param changes\n this.widgetRef.params$.next();\n })\n );\n } else {\n this.widgetRef.params$.next();\n }\n\n }\n}\n\n@Directive({\n selector: '[wmParam]',\n})\nexport class PartialParamDirective implements OnInit {\n\n @Input() name: string;\n @Input() value: any;\n\n constructor(\n @Attribute('value.bind') public bindValue,\n @Attribute('type') public type,\n private partialParamsProvider: PartialParamHandlerDirective\n ) {\n }\n\n ngOnInit() {\n this.partialParamsProvider.registerParams(this.name, this.value, this.bindValue, this.type);\n }\n}\n","import { Attribute, ComponentFactoryResolver, Directive, ElementRef, Inject, Injector, Self, ViewContainerRef } from '@angular/core';\n\nimport { debounceTime, filter } from 'rxjs/operators';\n\nimport { App, $invokeWatchers, noop, ComponentType, PartialRefProvider } from '@wm/core';\n\nimport { WidgetRef } from \"../../framework/types\";\nimport {debounce} from \"lodash-es\";\n\n@Directive({\n selector: '[partialContainer]'\n})\nexport class PartialContainerDirective {\n\n private contentInitialized = false;\n private $target;\n\n get name() {\n return this.componentInstance.name;\n }\n\n async _renderPartial(nv) {\n // destroy the existing partial\n this.vcRef.clear();\n // when the container-target is inside the component template, it can be queried after viewInit of the component.\n $invokeWatchers(true);\n // for partials with popovers and page dialogs which are inside a prefab, prefab name needs to be computed and appended\n const prefab = $(this.elRef.nativeElement).closest('.app-prefab');\n let prefabName;\n if (prefab.length) {\n prefabName = prefab.attr('prefabname');\n } else if (this.componentInstance.viewParent) {\n prefabName = this.componentInstance.viewParent.prefabName;\n }\n\n const componentFactory = await this.partialRefProvider.getComponentFactoryRef(nv, ComponentType.PARTIAL, {prefab: prefabName});\n if (componentFactory) {\n const instanceRef = this.vcRef.createComponent(componentFactory, 0, this.inj);\n if (instanceRef && instanceRef['instance'] && prefabName) {\n // @ts-ignore\n instanceRef['instance'].prefabName = prefabName;\n }\n if (!this.$target) {\n this.$target = this.elRef.nativeElement.querySelector('[partial-container-target]') || this.elRef.nativeElement;\n }\n\n this.$target.innerHTML = '';\n this.$target.appendChild(instanceRef.location.nativeElement);\n this.contentInitialized = true;\n setTimeout(() => this.onLoadSuccess(), 200);\n }\n }\n\n renderPartial = debounce(this._renderPartial, 200);\n\n onLoadSuccess() {\n this.componentInstance.invokeEventCallback('load');\n\n this.app.notify('partialLoaded');\n }\n\n constructor(\n @Self() @Inject(WidgetRef) public componentInstance,\n public vcRef: ViewContainerRef,\n public elRef: ElementRef,\n public inj: Injector,\n private app: App,\n @Attribute('content') _content: string,\n private resolver: ComponentFactoryResolver,\n private partialRefProvider: PartialRefProvider\n ) {\n\n componentInstance.registerPropertyChangeListener((key: string, nv: any, ov?: any) => {\n if (key === 'content') {\n if (componentInstance.$lazyLoad) {\n componentInstance.$lazyLoad = () => {\n this.renderPartial(nv);\n componentInstance.$lazyLoad = noop;\n };\n } else {\n this.renderPartial(nv);\n }\n }\n });\n\n const subscription = componentInstance.params$\n .pipe(\n filter(() => this.contentInitialized),\n debounceTime(200)\n )\n .subscribe(() => this.renderPartial(componentInstance.content));\n // reload the partial content on partial param change\n componentInstance.registerDestroyListener(() => subscription.unsubscribe());\n }\n}\n","import { Attribute, ComponentFactoryResolver, Directive, ElementRef, Inject, Injector, Self, ViewContainerRef } from '@angular/core';\nimport { App, $invokeWatchers, noop, ComponentType, CustomWidgetRefProvider } from '@wm/core';\nimport { WidgetRef } from \"../../framework/types\";\n\n\ndeclare const _;\n\n@Directive({\n selector: '[customWidgetContainer][widgetname]'\n})\nexport class CustomWidgetContainerDirective {\n\n constructor(\n @Self() @Inject(WidgetRef) public componentInstance,\n public vcRef: ViewContainerRef,\n public elRef: ElementRef,\n public inj: Injector,\n private app: App,\n @Attribute('widgetname') widgetname: string,\n private customWidgetRefProvider: CustomWidgetRefProvider\n ) {\n const widgetnames = this.componentInstance.widgetname;\n this.customWidgetRefProvider.getComponentFactoryRef(widgetname, ComponentType.WIDGET).then((componentFactory) => {\n if (componentFactory) {\n const instanceRef = this.vcRef.createComponent(componentFactory, 0, this.inj);\n this.elRef.nativeElement.appendChild(instanceRef.location.nativeElement);\n }\n });\n }\n}","import {Directive, Inject, Injector, Input, OnDestroy, Optional, TemplateRef, ViewContainerRef} from '@angular/core';\nimport {isLargeTabletLandscape, isLargeTabletPortrait} from '@wm/core';\nimport {extend} from \"lodash-es\";\n\n@Directive({\n selector: '[wmShowInDevice]'\n})\nexport class ShowInDeviceDirective implements OnDestroy {\n private readonly context = {};\n private devices;\n private embeddedView;\n constructor(\n private viewContainerRef: ViewContainerRef,\n inj: Injector,\n private templateRef: TemplateRef<any>,\n @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any\n ) {\n extend(this.context, (inj as any)._lView[8], explicitContext);\n\n window.addEventListener('resize', this.onResize.bind(this));\n }\n @Input() set wmShowInDevice(devices) {\n this.devices = devices.split(',');\n this.onResize();\n }\n /*\n This function handles the rendering of widgets based on the configured showindevice property\n for the widget.\n 1. For Large Screen, create the view only when min-width is 1200px(except when the viewport is an Ipad Pro 13 inch(Landscape))\n 2. For Laptop/Tablet Landscape, create the view only when either min-width is 992px and max-width is 1199px(except when the viewport is an Ipad Pro 13 inch(Portrait)), or its an Ipad Pro 13 inch(Landscape))\n 3. For Tablet Portrait, create the view only when either min-width is 768px and max-width is 991px, or its an Ipad Pro 13 inch(Portrait))\n 4. For Mobile, create the view only when max-width is 767px.\n 5. For all, always render the view.\n */\n private onResize($event?) {\n\n const lgWidth = getComputedStyle(document.documentElement).getPropertyValue('--screen-lg') || '1200px';\n const mdWidth = getComputedStyle(document.documentElement).getPropertyValue('--screen-md') || '992px';\n const smWidth = getComputedStyle(document.documentElement).getPropertyValue('--screen-sm') || '768px';\n const lgTabLandScapeWidth = getComputedStyle(document.documentElement).getPropertyValue('--screen-lg-tab-landscape') || '1366px';\n const lgTabPortraitWidth = getComputedStyle(document.documentElement).getPropertyValue('--screen-lg-tab-portrait') || '1024px';\n const lgWidthMin = parseFloat(lgWidth)-1;\n const lgUnit = lgWidthMin + \"px\";\n const mdWidthMin = parseFloat(mdWidth)-1;\n const mdUnit = mdWidthMin + \"px\";\n const smWidthMin = parseFloat(smWidth)-1;\n const smUnit = smWidthMin + \"px\";\n if (\n (this.devices.indexOf('lg') > -1 && window.matchMedia(\"(min-width: \"+lgWidth+\")\").matches && !isLargeTabletLandscape(lgTabLandScapeWidth, lgTabPortraitWidth))\n || (this.devices.indexOf('md') > -1 && (isLargeTabletLandscape(lgTabLandScapeWidth, lgTabPortraitWidth) || (window.matchMedia(\"(min-width: \"+mdWidth+\") and (max-width: \"+lgUnit +\")\").matches && !isLargeTabletPortrait(lgTabLandScapeWidth, lgTabPortraitWidth))))\n || (this.devices.indexOf('sm') > -1 && (window.matchMedia(\"(min-width: \"+smWidth+\") and (max-width: \"+mdUnit+\")\").matches || isLargeTabletPortrait(lgTabLandScapeWidth, lgTabPortraitWidth)))\n || (this.devices.indexOf('xs') > -1 && window.matchMedia(\"(max-width: \"+smUnit+\")\").matches)\n || (this.devices.indexOf('all') > -1)) {\n if (!this.embeddedView) {\n this.embeddedView = this.viewContainerRef.createEmbeddedView(this.templateRef, this.context);\n }\n } else {\n this.viewContainerRef.clear();\n this.embeddedView = '';\n }\n\n }\n\n ngOnDestroy() {\n window.removeEventListener('resize', this.onResize);\n }\n}\n","import {Directive, DoCheck, ElementRef, Injector, Input, OnDestroy, OnInit} from '@angular/core';\n\nimport { App, debounce, isKitkatDevice, isMobileApp } from '@wm/core';\nimport {forEach, includes} from \"lodash-es\";\n\ndeclare const $;\ndeclare const IScroll;\n\n@Directive({\n selector: '[wmSmoothscroll]'\n})\nexport class SmoothScrollDirective implements OnInit, DoCheck, OnDestroy {\n\n private readonly _$el;\n private _isEnabled = false;\n private _smoothScrollInstance;\n private _lastScrollY = -1;\n private _waitRefreshTill = -1;\n private app: App;\n private pendingIscrolls: any = [];\n private cancelSubscription: any;\n\n constructor(inj: Injector, elRef: ElementRef, app: App) {\n this._$el = $(elRef.nativeElement);\n this.app = app;\n }\n\n public ngOnInit() {\n this.cancelSubscription = this.app.subscribe('no-iscroll', el => {\n this.pendingIscrolls.push(el);\n });\n }\n\n public ngDoCheck() {\n if (this._isEnabled) {\n if (!this._smoothScrollInstance) {\n this._smoothScrollInstance = this.applySmoothScroll();\n } else {\n this.refreshIScroll();\n }\n } else if (this._smoothScrollInstance && this._smoothScrollInstance.destroy) {\n this._smoothScrollInstance.destroy();\n }\n }\n\n public ngOnDestroy() {\n if (this._smoothScrollInstance && this._smoothScrollInstance.destroy) {\n this._smoothScrollInstance.destroy();\n }\n if (this.cancelSubscription) {\n this.cancelSubscription();\n }\n }\n\n @Input()\n set wmSmoothscroll(val: any) {\n this._isEnabled = (val === true || val === 'true');\n if (this._isEnabled) {\n if (!this._smoothScrollInstance) {\n this._smoothScrollInstance = this.applySmoothScroll();\n }\n } else {\n this.ngOnDestroy();\n }\n }\n\n private applySmoothScroll($events?: any[], activeEl?: any) {\n if (!isMobileApp() || isKitkatDevice()) {\n return null;\n }\n // Set the fadeScrollbars to true only when content is scrollable inside the smoothscroll-container\n const scrollOptions = {\n scrollbars: true,\n preventDefault: false,\n momentum: true,\n bounce: false,\n mouseWheel: true, // for preview in browser support\n disablePointer: true, // disable the pointer events as it causes lag in scrolling (jerky).\n disableTouch: false, // false to be usable with touch devices\n disableMouse: false // false to be usable with a mouse (desktop)\n },\n el = this._$el[0];\n\n if (!el.children.length) {\n return null;\n }\n\n this._$el.addClass('smoothscroll-wrapper');\n /* WMS-17904\n document.scrollIntoView overrides default iScroll scroll,\n so the fix is done to ensure, the scroll action from 'scrollIntoView'\n is captured & executed through iScroll APIs\n */\n el.onscroll = function(e) {\n if (e.target.iscroll && e.target.scrollTop) {\n e.target.iscroll.scrollTo(\n e.target.iscroll.x,\n e.target.iscroll.y - e.target.scrollTop\n );\n e.target.scrollTop = 0;\n }\n };\n if (activeEl && activeEl.tagName === 'INPUT') {\n activeEl.focus();\n }\n\n // Add fadeScrollbars options only when smoothscroll container is included, which means content is scrollable.\n if ($events) {\n scrollOptions['fadeScrollbars'] = true;\n }\n\n let iScroll = new IScroll(el, scrollOptions);\n\n if ($events) {\n // map all events on previous iscroll to the newly created iscroll.\n forEach($events, (listeners, key) => {\n forEach(listeners, l => {\n iScroll.on(key, l);\n });\n });\n const scope = this;\n iScroll.on('scrollStart', function () {\n this._scrolling = true;\n //will notify the components which want to subscribe upon scrolling.\n if (isMobileApp()) {\n scope.app.notify('iscroll-start',{});\n }\n });\n iScroll.on('scrollEnd', function () {\n this._scrolling = false;\n });\n iScroll.refresh();\n }\n\n this.app.notify('iscroll-start',{});\n\n // refresh the indicators.\n iScroll.indicatorRefresh = () => {\n const indicators = this._$el[0].iscroll.indicators;\n let i;\n if (indicators.length) {\n for (i = 0; i < indicators.length; i++) {\n indicators[i].refresh();\n }\n }\n };\n\n this._$el[0].iscroll = iScroll;\n forEach(this.pendingIscrolls, (_el, index) => {\n if (_el.isSameNode(this._$el[0])) {\n this.app.notify('iscroll-update', {el: _el});\n this.pendingIscrolls.splice(index, 1);\n return;\n }\n });\n this.app.notify('iscroll-update', {});\n\n return {\n iScroll: iScroll,\n destroy: function () {\n iScroll.destroy();\n $(iScroll.scroller).css({\n 'transition-timing-function': '',\n 'transition-duration': '',\n 'transform': ''\n });\n\n iScroll = null;\n delete el.iscroll;\n }\n };\n }\n\n /*\n * When element has scroll (i.e. scrollHeight > clientHeight), a div with smoothscroll-container class will be added.\n * new iScroll will be initialised on the element after the div addition, by removing the existing iscroll on the element.\n * This div will have no height, so the elements inside this div will inherit this height, i.e. no height,\n * Scenario: tabs with 100% height, as it covers the pageContent with no scroll, this div will not be added.\n * TODO: Scenario: tabs with 100% height and add others widgets after/before, as it has scroll, this div will be added.\n * But tabs having 100% height will not be honoured as div is having no height.\n */\n private refreshIScroll() {\n const iScroll = this._smoothScrollInstance.iScroll;\n const waitTime = 500;\n if (iScroll._scrolling || this._waitRefreshTill > Date.now()) {\n return;\n }\n // Check for scrollable content and if smoothscroll-container div is already added.\n if (iScroll.wrapper\n && !includes(iScroll.wrapper.children[0].classList, 'smoothscroll-container')\n && iScroll.wrapper.scrollHeight > iScroll.wrapper.clientHeight) {\n\n const cloneEvents = iScroll._events;\n const prevActiveEl = document.activeElement;\n\n // Adds the smoothscroll container div wrapper only when element has scrollable content.\n $(iScroll.wrapper.children).wrapAll('<div class=\"smoothscroll-container\"></div>');\n this._smoothScrollInstance.destroy();\n\n // create new iscroll instance on the element\n this._smoothScrollInstance = this.applySmoothScroll(cloneEvents, prevActiveEl);\n }\n if (this._lastScrollY !== this._$el[0].iscroll.maxScrollY) {\n refreshIscrolls(this._smoothScrollInstance.iScroll);\n this._lastScrollY = this._$el[0].iscroll.maxScrollY;\n } else {\n this._smoothScrollInstance.iScroll.refresh();\n }\n this._waitRefreshTill = Date.now() + waitTime;\n }\n}\n\n/**\n * Refreshes the given iScorll or all iScrolls in the page.\n * @param iScroll\n */\nconst refreshIscrolls = function(iScroll?: any) {\n const scrollContainer = !iScroll && $('.smoothscroll-container');\n\n // Fix for issue: keyboard hides the input on focus.\n // On input focus or window resize, keypad in device has to adjust.\n let bScrollIntoView = iScroll && iScroll.wrapper && iScroll.wrapper.contains(document.activeElement);\n if (bScrollIntoView && document.activeElement.tagName === 'INPUT' && ($(document.activeElement).offset().top + document.activeElement.clientHeight) > window.innerHeight * 0.9) {\n document.activeElement.scrollIntoView({behavior: 'auto', block: 'end', inline: 'end'});\n }\n\n if (iScroll) {\n // refresh specify iscroll on change.\n if (iScroll.indicatorRefresh) {\n iScroll.indicatorRefresh();\n }\n if (iScroll.refresh) {\n iScroll.refresh();\n }\n } else if (scrollContainer.length) {\n // refresh all the iscrolls in pagecontent.\n scrollContainer.parent().each( (i, el: any) => {\n el.iscroll.indicatorRefresh();\n el.iscroll.refresh();\n });\n }\n};\n\n// on window resize, recalculate the iscroll position and refresh scrollers.\nwindow.addEventListener('resize', debounce(refreshIscrolls, 200));\n","import { Directive, ElementRef, Input } from '@angular/core';\n\n@Directive({\n selector: '[textContent]'\n})\nexport class TextContentDirective {\n @Input()\n set textContent(nv) {\n let v = nv;\n\n if (nv === undefined || nv === null) {\n v = '';\n }\n this.elRef.nativeElement.textContent = v;\n }\n\n constructor(private elRef: ElementRef) {}\n}","\nimport { CustomPipeManager } from '@wm/core';\nimport {isFunction} from \"lodash-es\";\n\nexport class WmPipe {\n protected pipeRef;\n protected isCustomPipe;\n constructor(private pipeName, protected customPipeManager: CustomPipeManager) {\n this.pipeRef = this.customPipeManager ? this.customPipeManager.getCustomPipe(pipeName) : null;\n this.isCustomPipe = this.pipeRef && isFunction(this.pipeRef.formatter);\n }\n\n customFormatter(data, args) {\n try {\n return this.pipeRef.formatter(...args);\n } catch (error) {\n return data;\n }\n }\n}\n","import { Inject, Pipe, PipeTransform } from '@angular/core';\nimport { DatePipe, DecimalPipe } from '@angular/common';\nimport { CURRENCY_INFO, isDefined, App, CustomPipeManager, AbstractI18nService, hasOffsetStr } from '@wm/core';\nimport { WmPipe } from \"./wm-pipe\";\nimport {filter, includes, isDate, isFunction, isObject, isUndefined, startsWith} from \"lodash-es\";\n\ndeclare const moment;\n\nconst getEpochValue = data => {\n let epoch;\n // For data in form of string number ('123'), convert to number (123). And don't parse date objects.\n if (!isDate(data) && !isNaN(data)) {\n data = parseInt(data, 10);\n }\n // get the timestamp value. If data is time string, append date string to the time value\n epoch = moment(data).valueOf() || moment(new Date().toDateString() + ' ' + data).valueOf();\n return epoch;\n};\n\n@Pipe({\n name: 'trailingZeroDecimalPipe'\n})\nexport class TrailingZeroDecimalPipe implements PipeTransform {\n transform(value: any, selectedLocale: string, numberfilter: string, localefilter: any, trailingzero: boolean, decimalValue: string, skipTrailingZeroCheck?: boolean, formattedLocale?): any {\n numberfilter = trailingzero && !skipTrailingZeroCheck ? `1.${decimalValue.length}-16`: numberfilter;\n const locale = formattedLocale ? formattedLocale['number'] : undefined;\n return this.decimalPipe.transform(value, numberfilter, localefilter || locale || selectedLocale);\n }\n\n constructor(private decimalPipe: DecimalPipe) { }\n\n}\n\n@Pipe({\n name: 'toDate'\n})\nexport class ToDatePipe extends WmPipe implements PipeTransform {\n // This method calls the custom formatter fn after applying the exisitng date pattern\n returnFn(data, args) {\n if (this.isCustomPipe) {\n if (args) {\n args[0] = data;\n }\n return this.customFormatter(data, args);\n }\n return data;\n }\n transform(data: any, format: any, timezone?, compInstance?) {\n let timestamp;\n // 'null' is to be treated as a special case, If user wants to enter null value, empty string will be passed to the backend\n if (data === 'null' || data === '') {\n return this.returnFn('', arguments);\n }\n if (!isDefined(data)) {\n return this.returnFn('',arguments);\n }\n timestamp = getEpochValue(data);\n if (timestamp) {\n if (format === 'timestamp') {\n return this.returnFn(timestamp, arguments);\n }\n if (format === 'UTC') {\n return this.returnFn(new Date(timestamp).toISOString(), arguments);\n }\n let formattedVal;\n const timeZone = this.i18nService ? this.i18nService.getTimezone(compInstance) : timezone;\n if (timeZone && (data === timestamp || hasOffsetStr(data))) {\n formattedVal = moment(timestamp).tz(timeZone).format(format.replaceAll('y', 'Y').replaceAll('d', 'D').replace('a', 'A'));\n } else {\n formattedVal = this.datePipe.transform(timestamp, format);\n }\n return this.returnFn(formattedVal, arguments);\n }\n return this.returnFn('', arguments);\n }\n\n constructor(private datePipe: DatePipe, private i18nService: AbstractI18nService, protected customPipeManager: CustomPipeManager) {\n super('toDate', customPipeManager);\n }\n}\n\n@Pipe({\n name: 'toNumber'\n})\nexport class ToNumberPipe implements PipeTransform {\n transform(data, fracSize) {\n if (fracSize && !String(fracSize).match(/^(\\d+)?\\.((\\d+)(-(\\d+))?)?$/)) {\n fracSize = '1.' + fracSize + '-' + fracSize;\n }\n if (!isNaN(+data)) {\n const locale = this.i18nService && this.i18nService.getwidgetLocale() ? this.i18nService.getwidgetLocale() : undefined;\n const formattedLocale = locale ? locale['number'] : null;\n return this.decimalPipe.transform(data, fracSize, formattedLocale);\n }\n }\n constructor(private decimalPipe: DecimalPipe, @Inject(AbstractI18nService) private i18nService: AbstractI18nService) {\n }\n}\n\n@Pipe({\n name: 'toCurrency'\n})\nexport class ToCurrencyPipe implements PipeTransform {\n transform(data, currencySymbol, fracSize) {\n const _currencySymbol = (CURRENCY_INFO[currencySymbol] || {}).symbol || currencySymbol || '';\n let _val = new ToNumberPipe(this.decimalPipe, this.i18nService).transform(data, fracSize);\n const isNegativeNumber = startsWith(_val, '-');\n if (isNegativeNumber) {\n _val = _val.replace('-','');\n }\n return _val ? isNegativeNumber ? '-'+ _currencySymbol +_val :_currencySymbol + _val : '';\n }\n\n constructor(private decimalPipe: DecimalPipe, @Inject(AbstractI18nService) private i18nService: AbstractI18nService) {\n }\n}\n\n@Pipe({\n name: 'prefix'\n})\nexport class PrefixPipe implements PipeTransform {\n transform(data, padding) {\n return (isUndefined(data) || data === null || data === '') ? data : ((padding || '') + data);\n }\n}\n\n@Pipe({\n name: 'suffix'\n})\nexport class SuffixPipe implements PipeTransform {\n transform(data, padding) {\n return (isUndefined(data) || data === null || data === '') ? data : (data + (padding || ''));\n }\n}\n\n\n/**\n * Custom pipe: It is work as interceptor between the user custom pipe function and angular pipe\n */\n@Pipe({\n name: 'custom'\n})\nexport class CustomPipe implements PipeTransform {\n constructor(private custmeUserPipe: CustomPipeManager) {\n\n }\n transform(data, pipename) {\n let argumentArr = [];\n for(let i =2 ; i<arguments.length; i++ ){\n argumentArr.push(arguments[i]);\n }\n\n let pipeRef = this.custmeUserPipe.getCustomPipe(pipename);\n if (!pipeRef || !isFunction(pipeRef.formatter)) {\n console.warn('formatter is not defined, please check the custom pipes documentation');\n return data;\n }\n\n try{\n return pipeRef.formatter(data, ...argumentArr);\n } catch(error){\n console.error('Pipe name: '+pipename, error);\n return data;\n }\n }\n}\n\n@Pipe({\n name: 'timeFromNow'\n})\nexport class TimeFromNowPipe implements PipeTransform {\n transform(data) {\n let timestamp;\n if (!isDefined(data)) {\n return undefined;\n }\n timestamp = getEpochValue(data);\n return timestamp ? moment(timestamp).fromNow() : undefined;\n }\n}\n\n@Pipe({\n name: 'numberToString'\n})\nexport class NumberToStringPipe extends ToNumberPipe implements PipeTransform { }\n\n@Pipe({\n name: 'stringToNumber'\n})\nexport class StringToNumberPipe implements PipeTransform {\n transform(data) {\n return Number(data) || undefined;\n }\n}\n\n@Pipe({\n name: 'filter'\n})\nexport class FilterPipe implements PipeTransform {\n transform(data: any[], field: any, value: any) {\n if (!data) {\n return [];\n }\n // If object is passed as first paramter\n if (isObject(field)) {\n return filter(data, field);\n }\n // If key value pair is provided\n return filter(data, item => {\n return includes(item[field], value);\n });\n }\n}\n\n@Pipe({\n name: 'filesize'\n})\nexport class FileSizePipe implements PipeTransform {\n transform(bytes: number, precision: number) {\n const units = [\n 'bytes',\n 'KB',\n 'MB',\n 'GB',\n 'TB',\n 'PB'\n ];\n\n /*Todo[shubham]\n if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) {\n return isMobile() ? '' : '?';\n }*/\n let unit = 0;\n while (bytes >= 1024) {\n bytes /= 1024;\n unit++;\n }\n return bytes.toFixed(+precision) + ' ' + units[unit];\n }\n}\n\n@Pipe({\n name: 'fileIconClass'\n})\nexport class FileIconClassPipe implements PipeTransform {\n transform(fileExtension: any) {\n const fileClassMapping = {\n 'zip' : 'fa-file-zip-o',\n 'pdf' : 'fa-file-pdf-o',\n 'rar' : 'fa-file-archive-o',\n 'txt' : 'fa-file-text-o',\n 'ppt' : 'fa-file-powerpoint-o',\n 'pot' : 'fa-file-powerpoint-o',\n 'pps' : 'fa-file-powerpoint-o',\n 'pptx' : 'fa-file-powerpoint-o',\n 'potx' : 'fa-file-powerpoint-o',\n 'ppsx' : 'fa-file-powerpoint-o',\n 'mpg' : 'fa-file-movie-o',\n 'mp4' : 'fa-file-movie-o',\n 'mov' : 'fa-file-movie-o',\n 'avi' : 'fa-file-movie-o',\n 'mp3' : 'fa-file-audio-o',\n 'docx' : 'fa-file-word-o',\n 'js' : 'fa-file-code-o',\n 'md' : 'fa-file-code-o',\n 'html' : 'fa-file-code-o',\n 'css' : 'fa-file-code-o',\n 'xlsx' : 'fa-file-excel-o',\n 'png' : 'fa-file-image-o',\n 'jpg' : 'fa-file-image-o',\n 'jpeg' : 'fa-file-image-o',\n 'file' : 'fa-file-o',\n 'default' : 'fa-file-o'\n };\n\n return 'fa ' + (fileClassMapping[fileExtension] || 'fa-file-o');\n }\n}\n\n@Pipe({\n name: 'stateClass'\n})\nexport class StateClassPipe implements PipeTransform {\n transform(state) {\n const stateClassMap = {\n 'success' : 'wi wi-done text-success',\n 'error' : 'wi wi-error text-danger'\n };\n return stateClassMap[state.toLowerCase()];\n }\n}\n\n@Pipe({\n name: 'fileExtensionFromMime'\n})\nexport class FileExtensionFromMimePipe implements PipeTransform {\n transform(mimeType: any) {\n const typeMapping = {\n 'audio/aac': '.aac',\n 'application/x-abiword': '.abw',\n 'application/vnd.android.package-archive': '.apk',\n 'video/x-msvideo': '.avi',\n 'application/vnd.amazon.ebook': '.azw',\n 'application/octet-stream': '.bin',\n 'image/bmp': '.bmp',\n 'application/x-bzip': '.bz',\n 'application/x-bzip2': '.bz2',\n 'application/x-csh': '.csh',\n 'text/css': '.css',\n 'text/csv': '.csv',\n 'application/msword': '.doc',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': '.docx',\n 'application/vnd.ms-fontobject': '.eot',\n 'application/epub+zip': '.epub',\n 'application/ecmascript': '.es',\n 'image/gif': '.gif',\n 'text/html': '.html',\n 'image/x-icon': '.ico',\n 'text/calendar': '.ics',\n 'application/java-archive': '.jar',\n 'image/jpeg': ['.jpeg', '.jpg'],\n 'application/javascript': '.js',\n 'application/json': '.json',\n 'audio/midi': '.mid',\n 'audio/x-midi': '.midi',\n 'video/mpeg': '.mpeg',\n 'application/vnd.apple.installer+xml': 'mpkg',\n 'application/vnd.oasis.opendocument.presentation': '.odp',\n 'application/vnd.oasis.opendocument.spreadsheet': '.ods',\n 'application/vnd.oasis.opendocument.text': '.odt',\n 'audio/ogg': '.oga',\n 'video/ogg': '.ogv',\n 'application/ogg': '.ogx',\n 'font/otf': '.otf',\n 'image/png': '.png',\n 'application/pdf': '.pdf',\n 'application/vnd.ms-powerpoint': '.ppt',\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation': '.pptx',\n 'application/x-rar-compressed': '.rar',\n 'application/rtf': '.rtf',\n 'application/x-sh': '.sh',\n 'image/svg+xml': '.svg',\n 'application/x-shockwave-flash': '.swf',\n 'application/x-tar': '.tar',\n 'image/tiff': '.tiff',\n 'application/typescript': '.ts',\n 'font/ttf': '.ttf',\n 'text/plain': '.txt',\n 'application/vnd.visio': '.vsd',\n 'audio/wav': '.wav',\n 'audio/webm': '.weba',\n 'video/webm': '.webm',\n 'image/webp': '.webp',\n 'font/woff': '.woff',\n 'font/woff2': '.woff2',\n 'application/xhtml+xml': '.xhtml',\n 'application/vnd.ms-excel': '.xls',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': '.xlsx',\n 'application/xml': '.xml',\n 'application/vnd.mozilla.xul+xml': '.xul',\n 'application/zip': '.zip',\n 'video/3gpp': '.3gp',\n 'audio/3gpp': '.3gp',\n 'video/3gpp2': '.3g2',\n 'audio/3gpp2': '.3g2',\n 'application/x-7z-compressed': '.7z'\n };\n\n return typeMapping[mimeType];\n }\n}\n\n\n","import { Pipe, PipeTransform, SecurityContext } from '@angular/core';\nimport {DomSanitizer, SafeHtml, SafeResourceUrl, SafeScript, SafeStyle, SafeUrl} from '@angular/platform-browser';\n\n@Pipe({\n name: 'trustAs'\n})\nexport class TrustAsPipe implements PipeTransform {\n\n constructor(private domSanitizer: DomSanitizer) {}\n\n transform(content: string, context: string | SecurityContext) {\n if (content === null || content === undefined) {\n return '';\n }\n switch (context) {\n case 'html':\n case SecurityContext.HTML:\n return this.domSanitizer.bypassSecurityTrustHtml(content);\n case 'style':\n case SecurityContext.STYLE:\n return this.domSanitizer.bypassSecurityTrustStyle(content);\n case 'script':\n case SecurityContext.SCRIPT:\n return this.domSanitizer.bypassSecurityTrustScript(content);\n case 'url':\n case SecurityContext.URL:\n return this.domSanitizer.bypassSecurityTrustUrl(content);\n case 'resource':\n case SecurityContext.RESOURCE_URL:\n return this.domSanitizer.bypassSecurityTrustResourceUrl(content);\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport {isMobile, isMobileApp} from '@wm/core';\nimport {forEach} from \"lodash-es\";\n\nconst openedDialogs = [];\n/*We need closedDialogs array because onHidden event is asynchronous,\nand if the user uses script and calls dialog1.close() and then dialog2.close() then\nwe cannot be sure if both the dialogs onClose callback will be called or not.*/\nconst closeDialogsArray = [];\n\n\n@Injectable()\nexport class DialogServiceImpl {\n\n /**\n * map which contains the references to all dialogs by name\n * @type {Map<any, any>}\n * Ex Map[[dialogName, [[dialogScope, dialogRef]]]]\n */\n private dialogRefsCollection = new Map<any, any>();\n private appConfirmDialog = '_app-confirm-dialog';\n\n constructor() {}\n\n /**\n * Register dialog by name and scope\n * @param {string} name\n * @param {BaseDialog} dialogRef\n * @param {scope}\n */\n public register(name: string, dialogRef: any, scope: any) {\n if (!name) {\n return;\n }\n if (this.dialogRefsCollection.get(name)) {\n this.dialogRefsCollection.get(name).set(scope, dialogRef);\n } else {\n this.dialogRefsCollection.set(name, new Map([[scope, dialogRef]]));\n }\n }\n\n public getDialogRefsCollection() {\n return this.dialogRefsCollection;\n }\n\n /**\n * De Register dialog by name and scope\n * @param name\n * @param dialogRef\n * @param scope\n */\n public deRegister(name: string, scope: any) {\n if (!name) {\n return;\n }\n if (this.dialogRefsCollection.get(name)) {\n this.dialogRefsCollection.get(name).delete(scope);\n }\n }\n\n private getDialogRef(name: string, scope?: any) {\n const dialogRefMap = this.dialogRefsCollection.get(name);\n let dialogRef;\n\n if (scope) {\n dialogRef = dialogRefMap.get(scope);\n if (!dialogRef) {\n // Check if the scope is App level scope\n // else throw a console error\n if (!scope.pageName && !scope.partialName && !scope.prefabName) {\n dialogRefMap.forEach((dRef, dialogScope) => {\n // Check if the collection of dialogs have a \"common\" partial scope\n // If yes use that else through a console error\n if (dialogScope && dialogScope.partialName === 'Common') {\n dialogRef = dRef;\n } else {\n console.error('No dialog with the name \"' + name + '\" found in the App scope.');\n }\n });\n } else {\n console.error('No dialog with the name \"' + name + '\" found in the given scope.');\n }\n }\n } else {\n if (dialogRefMap.size === 1) {\n dialogRef = dialogRefMap.entries().next().value[1];\n } else {\n console.error('There are multiple instances of this dialog name. Please provide the Page/Partial/App instance in which the dialog exists.');\n }\n }\n return dialogRef;\n }\n\n /**\n * Opens the dialog with the given name\n * @param {string} name\n */\n public open(name: string, scope?: any, initState?: any) {\n const dialogRef = this.getDialogRef(name, scope);\n if (!dialogRef) {\n return;\n }\n\n dialogRef.open(initState);\n }\n\n /**\n * closes the dialog with the given name\n * @param {string} name\n */\n public close(name: string, scope?: any, callBackFn?:any) {\n const dialogRef = this.getDialogRef(name, scope);\n if (!dialogRef) {\n return;\n }\n // For notification action variable dialogs onok callback event should be called after closing the dialog.\n // So passing it as callback function\n dialogRef.closeCallBackFn = callBackFn;\n dialogRef.close();\n }\n\n /**\n * closes all the opened dialogs\n */\n closeAllDialogs() {\n forEach(openedDialogs.reverse(), (dialog) => {\n dialog.close();\n });\n }\n\n public showAppConfirmDialog(initState?: any) {\n this.open(this.getAppConfirmDialog(), undefined, initState);\n }\n\n public closeAppConfirmDialog() {\n this.close(this.getAppConfirmDialog());\n }\n\n public getAppConfirmDialog() {\n return this.appConfirmDialog;\n }\n\n public setAppConfirmDialog(dialogName: string) {\n this.appConfirmDialog = dialogName;\n }\n\n public addToOpenedDialogs(ref) {\n openedDialogs.push(ref);\n }\n\n public getLastOpenedDialog() {\n return openedDialogs[openedDialogs.length - 1];\n }\n\n public removeFromOpenedDialogs(ref) {\n if (openedDialogs.indexOf(ref) !== -1) {\n openedDialogs.splice(openedDialogs.indexOf(ref), 1);\n }\n if (openedDialogs.length === 0 && (isMobile() || isMobileApp())) {\n //Fix for [WMS-23948]: remove aria-hidden attribute only after all dialogs are closed\n const parentSelector = $('body > app-root')[0];\n parentSelector.removeAttribute('aria-hidden');\n }\n }\n\n public getOpenedDialogs() {\n return openedDialogs;\n }\n\n public addToClosedDialogs(ref) {\n closeDialogsArray.push(ref);\n }\n\n public removeFromClosedDialogs(ref) {\n if (closeDialogsArray.indexOf(ref) !== -1) {\n closeDialogsArray.splice(closeDialogsArray.indexOf(ref), 1);\n }\n }\n\n public getDialogRefFromClosedDialogs() {\n return closeDialogsArray[closeDialogsArray.length - 1];\n }\n}\n","import {Pipe, PipeTransform, SecurityContext} from \"@angular/core\";\nimport {DomSanitizer, SafeValue} from \"@angular/platform-browser\";\n\n@Pipe({\n name: 'sanitize'\n})\nexport class SanitizePipe implements PipeTransform {\n constructor(private domSanitizer: DomSanitizer) {\n }\n\n transform(content: string | SafeValue, context: string | SecurityContext): string {\n if (content === null || content === undefined) {\n return '';\n }\n switch (context) {\n case 'html':\n case SecurityContext.HTML:\n return this.domSanitizer.sanitize(SecurityContext.HTML, content);\n case 'style':\n case SecurityContext.STYLE:\n return this.domSanitizer.sanitize(SecurityContext.STYLE, content);\n case 'script':\n case SecurityContext.SCRIPT:\n return this.domSanitizer.sanitize(SecurityContext.SCRIPT, content);\n case 'url':\n case SecurityContext.URL:\n return this.domSanitizer.sanitize(SecurityContext.URL, content);\n case 'resource':\n case SecurityContext.RESOURCE_URL:\n return this.domSanitizer.sanitize(SecurityContext.RESOURCE_URL, content);\n case 'none':\n case SecurityContext.NONE:\n return this.domSanitizer.sanitize(SecurityContext.NONE, content);\n }\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { CommonModule, Location } from '@angular/common';\n\nimport { AbstractDialogService } from '@wm/core';\nimport { SecurityModule } from '@wm/security';\n\nimport { ContainerDirective } from './widgets/common/container/container.directive';\nimport { ImagePipe } from './pipes/image.pipe';\nimport { ItemTemplateDirective } from \"./widgets/common/item-template/item-template.directive\";\nimport { RepeatTemplateDirective } from \"./widgets/common/repeat-template/repeat-template.directive\";\nimport { LazyLoadDirective } from './widgets/common/lazy-load/lazy-load.directive';\nimport { MessageComponent } from './widgets/common/message/message.component';\nimport { PartialDirective } from './widgets/common/partial/partial.directive';\nimport {\n PartialParamDirective,\n PartialParamHandlerDirective\n} from './widgets/common/partial-param/partial-param.directive';\nimport { PartialContainerDirective} from \"./widgets/common/base/partial-container.directive\";\nimport { CustomWidgetContainerDirective} from \"./widgets/common/base/custom-widget-container.directive\";\nimport { RedrawableDirective } from './widgets/common/redraw/redrawable.directive';\nimport { ShowInDeviceDirective } from './directives/show-in-device.directive';\nimport { SmoothScrollDirective } from './widgets/common/smooth-scroll/smooth-scroll.directive';\nimport { TextContentDirective } from './widgets/common/base/text-content.directive';\nimport {\n FileExtensionFromMimePipe,\n FileIconClassPipe,\n FileSizePipe,\n FilterPipe,\n NumberToStringPipe,\n PrefixPipe,\n StateClassPipe,\n StringToNumberPipe,\n SuffixPipe,\n TimeFromNowPipe,\n ToCurrencyPipe,\n ToDatePipe,\n ToNumberPipe,\n CustomPipe,\n TrailingZeroDecimalPipe\n} from './pipes/custom-pipes';\nimport { TrustAsPipe } from './pipes/trust-as.pipe';\nimport { DialogServiceImpl } from './widgets/common/dialog/dialog.service';\nimport { SanitizePipe } from \"./pipes/sanitize.pipe\";\n\nconst wmComponents = [\n ContainerDirective,\n ItemTemplateDirective,\n RepeatTemplateDirective,\n LazyLoadDirective,\n MessageComponent,\n PartialDirective,\n PartialParamHandlerDirective,\n PartialParamDirective,\n PartialContainerDirective,\n CustomWidgetContainerDirective,\n RedrawableDirective,\n ShowInDeviceDirective,\n SmoothScrollDirective,\n TextContentDirective\n];\n\nconst PIPES = [\n ToDatePipe,\n FileIconClassPipe,\n FileExtensionFromMimePipe,\n FilterPipe,\n FileSizePipe,\n ToNumberPipe,\n ToCurrencyPipe,\n PrefixPipe,\n SuffixPipe,\n TimeFromNowPipe,\n NumberToStringPipe,\n StateClassPipe,\n StringToNumberPipe,\n TrailingZeroDecimalPipe,\n TrustAsPipe,\n ImagePipe,\n CustomPipe,\n SanitizePipe\n];\n\n@NgModule({\n imports: [\n CommonModule,\n SecurityModule\n ],\n declarations: [...wmComponents, ...PIPES],\n exports: [...wmComponents, ...PIPES]\n})\nexport class WmComponentsModule {\n\n static forRoot(): ModuleWithProviders<WmComponentsModule> {\n return {\n ngModule: WmComponentsModule,\n providers: [\n ToDatePipe,\n FilterPipe,\n TrailingZeroDecimalPipe,\n TrustAsPipe,\n ImagePipe,\n CustomPipe,\n SanitizePipe,\n Location,\n {provide: AbstractDialogService, useClass: DialogServiceImpl}\n ]\n };\n }\n}\n","import { DataSource, debounce, processFilterExpBindNode } from '@wm/core';\nimport { FormWidgetType, isDefined, MatchMode } from '@wm/core';\n\nimport { isDataSetWidget } from './widget-utils';\nimport {\n each,\n filter,\n forEach, get, head,\n includes,\n intersection,\n isArray, isEmpty, isFunction,\n isNull,\n isObject,\n isString,\n isUndefined, keys, replace,\n split\n} from \"lodash-es\";\n\nconst noop = () => { };\n\nexport enum Live_Operations {\n INSERT = 'insert',\n UPDATE = 'update',\n DELETE = 'delete',\n READ = 'read'\n}\n\nexport const ALLFIELDS = 'All Fields';\n\nexport const LIVE_CONSTANTS = {\n 'EMPTY_KEY': 'EMPTY_NULL_FILTER',\n 'EMPTY_VALUE': 'No Value',\n 'LABEL_KEY': 'key',\n 'LABEL_VALUE': 'value',\n 'NULL_EMPTY': ['null', 'empty'],\n 'NULL': 'null',\n 'EMPTY': 'empty'\n};\n\n// Returns true if widget is autocomplete or chips\nexport function isSearchWidgetType(widget) {\n return includes([FormWidgetType.AUTOCOMPLETE, FormWidgetType.TYPEAHEAD, FormWidgetType.CHIPS], widget);\n}\n\nfunction onSuccess(response, res, rej) {\n if (response.error) {\n rej(response);\n } else {\n res(response);\n }\n}\n\nexport function performDataOperation(dataSource, requestData, options): Promise<any> {\n return new Promise((res, rej) => {\n if (dataSource.execute(DataSource.Operation.SUPPORTS_CRUD)) {\n let fn;\n const operationType = options.operationType;\n switch (operationType) {\n case Live_Operations.UPDATE:\n fn = DataSource.Operation.UPDATE_RECORD;\n break;\n case Live_Operations.INSERT:\n fn = DataSource.Operation.INSERT_RECORD;\n break;\n case Live_Operations.DELETE:\n fn = DataSource.Operation.DELETE_RECORD;\n break;\n }\n dataSource.execute(fn, requestData).then(response => onSuccess(response, res, rej), rej);\n } else if (dataSource.execute(DataSource.Operation.IS_API_AWARE)) {\n if(dataSource.category === \"wm.CrudVariable\") {\n const operation = options.operationType === 'insert' ? 'create' : (options.operationType === 'delete' ? 'delete' : 'update');\n dataSource.execute(DataSource.Operation.INVOKE, {\n 'skipNotification': true,\n 'operation': operation,\n 'inputFields': requestData\n }).then(res, rej);\n } else {\n dataSource.execute(DataSource.Operation.SET_INPUT, requestData);\n dataSource.execute(DataSource.Operation.INVOKE, {\n 'skipNotification': true\n }).then(res, rej);\n }\n } else {\n res(requestData);\n }\n });\n}\n\nexport function refreshDataSource(dataSource, options): Promise<any> {\n return new Promise((res, rej) => {\n if (!dataSource) {\n rej();\n return;\n }\n dataSource.execute(DataSource.Operation.LIST_RECORDS, {\n 'filterFields': options.filterFields || {},\n 'orderBy': options.orderBy,\n 'page': options.page || 1,\n 'logicalOp' : options.condition || ''\n }).then(res, rej);\n });\n}\n\n/**\n * @ngdoc function\n * @name wm.widgets.live.fetchRelatedFieldData\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * This function fetches the data for the related field in live form/ grid\n *\n * @param {object} columnDef field definition\n * @param {string} relatedField related field name\n * @param {string} datafield Datafield to be set on widget\n * @param {string} widget Type of the widget\n * @param {object} elScope element scope\n * @param {object} parentScope live form// grid scope\n */\nexport function fetchRelatedFieldData(dataSource, formField, options) {\n let primaryKeys;\n let displayField;\n const relatedField = options.relatedField;\n const datafield = options.datafield;\n\n if (!dataSource) {\n return;\n }\n primaryKeys = dataSource.execute(DataSource.Operation.GET_RELATED_PRIMARY_KEYS, relatedField);\n formField.datafield = datafield;\n formField._primaryKey = isEmpty(primaryKeys) ? undefined : primaryKeys[0];\n formField.compareby = primaryKeys && primaryKeys.join(',');\n\n displayField = datafield === ALLFIELDS ? undefined : datafield;\n formField.displayfield = displayField = (formField.displayfield || displayField || formField._primaryKey);\n\n if (isSearchWidgetType(formField[options.widget])) {\n formField.dataoptions = { 'relatedField': relatedField, 'filterExpr': formField.filterexpressions ? formField.filterexpressions : {} };\n formField.datasource = dataSource;\n formField.searchkey = formField.searchkey || displayField;\n formField.displaylabel = formField.displayfield = (formField.displaylabel || displayField);\n if (formField.showPendingSpinner) {\n formField.showPendingSpinner = false;\n }\n } else {\n interpolateBindExpressions(formField.viewParent, formField.filterexpressions, (filterexpressions) => {\n formField.filterexpressions = filterexpressions;\n dataSource.execute(DataSource.Operation.GET_RELATED_TABLE_DATA, {\n relatedField,\n pagesize: formField.limit,\n orderBy: formField.orderby ? replace(formField.orderby, /:/g, ' ') : '',\n filterFields: {},\n filterExpr: formField.filterexpressions ? formField.filterexpressions : {}\n }).then(response => {\n formField.dataset = response.data;\n formField.displayfield = formField.displayfield || head(keys(get(response, '[0]')));\n if (formField.showPendingSpinner) {\n formField.showPendingSpinner = false;\n }\n }, noop);\n });\n }\n}\n\n/**\n * used to interpolate the bind expression for keys in the query builder\n * @param context where we find the variable obj\n * @param filterexpressions - obj containing all the rule objs\n * @param callbackFn - function to be called with the new replaced values if any in the filterexpressions object\n */\nexport const interpolateBindExpressions = (context, filterexpressions, callbackFn) => {\n const debouncedFn = debounce(() => {\n if (isFunction(callbackFn)) {\n callbackFn(filterexpressions);\n }\n }, 300);\n\n /**\n * calling the debounced function first for the case where if there is any filterexpression without the bindedvariables.\n * without this it will never be called. processFilterExpBindNode will be called only for the binded variable expressions.\n */\n debouncedFn();\n const filterExpressions = filterexpressions ? (isObject(filterexpressions) ? filterexpressions : JSON.parse(filterexpressions)) : {};\n const destroyFn = context.registerDestroyListener ? context.registerDestroyListener.bind(context) : noop;\n const filterSubscription = processFilterExpBindNode(context, filterExpressions).subscribe((response: any) => {\n filterexpressions = JSON.stringify(response.filterExpressions);\n debouncedFn();\n });\n destroyFn(() => filterSubscription.unsubscribe());\n};\n/**\n * @ngdoc function\n * @name wm.widgets.live.LiveWidgetUtils#getDistinctFieldProperties\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * Returns the properties required for dataset widgets\n *\n * @param {object} dataSource variable source for the widget\n * @param {object} formField definition of the column/ field\n *\n */\nexport const getDistinctFieldProperties = (dataSource, formField) => {\n const props: any = {};\n let fieldColumn;\n if (formField['is-related']) {\n props.tableName = formField['lookup-type'];\n fieldColumn = formField['lookup-field'];\n props.distinctField = fieldColumn;\n props.aliasColumn = fieldColumn.replace('.', '$'); // For related fields, In response . is replaced by $\n props.filterExpr = formField.filterexpressions ? (isObject(formField.filterexpressions) ? formField.filterexpressions : JSON.parse(formField.filterexpressions)) : {};\n } else {\n props.tableName = dataSource.execute(DataSource.Operation.GET_ENTITY_NAME);\n fieldColumn = formField.field || formField.key;\n props.distinctField = fieldColumn;\n props.aliasColumn = fieldColumn;\n }\n return props;\n};\n\n/**\n * @ngdoc function\n * @name wm.widgets.live.LiveWidgetUtils#getDistinctValues\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * Returns the distinct values for a field\n *\n * @param {object} formField definition of the column/ field\n * @param {string} widget widget property on the field\n * @param {object} variable variable for the widget\n * @param {function} callBack Function to be executed after fetching results\n *\n */\nexport function getDistinctValues(dataSource, formField, widget) {\n let props;\n\n return new Promise((res, rej) => {\n if (isDataSetWidget(formField[widget]) && (!formField.isDataSetBound || widget === 'filterwidget')) {\n props = getDistinctFieldProperties(dataSource, formField);\n dataSource.execute(DataSource.Operation.GET_DISTINCT_DATA_BY_FIELDS, {\n fields: props.distinctField,\n entityName: props.tableName,\n pagesize: formField.limit,\n filterExpr: formField.filterexpressions ? JSON.parse(formField.filterexpressions) : {}\n }).then(response => {\n res({ 'field': formField, 'data': response.data, 'aliasColumn': props.aliasColumn });\n }, rej);\n }\n });\n}\n\n// Set the data field properties on dataset widgets\nfunction setDataFields(formField, options?) {\n // For search widget, set search key and display label\n if (isSearchWidgetType(formField[options.widget])) {\n formField.datafield = options.aliasColumn || LIVE_CONSTANTS.LABEL_KEY;\n formField.searchkey = options.distinctField || LIVE_CONSTANTS.LABEL_KEY;\n formField.displaylabel = formField.displayfield = (options.aliasColumn || LIVE_CONSTANTS.LABEL_VALUE);\n return;\n }\n formField.datafield = LIVE_CONSTANTS.LABEL_KEY;\n formField.displayfield = LIVE_CONSTANTS.LABEL_VALUE;\n}\n\n/**\n * @ngdoc function\n * @name wm.widgets.live.LiveWidgetUtils#setFieldDataSet\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * Function to set the dataSet on the fields\n *\n * @param {object} formField definition of the column/ field\n * @param {object} data data returned from the server\n * @param {string} aliasColumn column field name\n * @param {string} widget widget property on the field\n * @param {boolean} isEnableEmptyFilter is null or empty values allowed on filter\n *\n */\nfunction setFieldDataSet(formField, data, options?) {\n const emptySupportWidgets = [FormWidgetType.SELECT, FormWidgetType.RADIOSET];\n const emptyOption = {};\n const dataSet = [];\n if (options.isEnableEmptyFilter && includes(emptySupportWidgets, formField[options.widget]) &&\n !formField['is-range'] && !formField.multiple) {\n // If empty option is selected, push an empty object in to dataSet\n emptyOption[LIVE_CONSTANTS.LABEL_KEY] = LIVE_CONSTANTS.EMPTY_KEY;\n emptyOption[LIVE_CONSTANTS.LABEL_VALUE] = options.EMPTY_VALUE || LIVE_CONSTANTS.EMPTY_VALUE;\n dataSet.push(emptyOption);\n }\n each(data, key => {\n const value = key[options.aliasColumn];\n const option = {};\n if (value !== null && value !== '') {\n option[LIVE_CONSTANTS.LABEL_KEY] = value;\n option[LIVE_CONSTANTS.LABEL_VALUE] = value;\n dataSet.push(option);\n }\n });\n setDataFields(formField, options);\n formField.dataset = dataSet;\n}\n\n/**\n * @ngdoc function\n * @name wm.widgets.live.LiveWidgetUtils#fetchDistinctValues\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * Function to fetch the distinct values for a field\n *\n * @param {object} scope scope of the widget\n * @param {object} formFields definitions of the column/ field\n * @param {string} widget widget property on the field\n * @param {boolean} isEnableEmptyFilter is null or empty values allowed on filter\n *\n */\nexport function fetchDistinctValues(dataSource, formFields, options) {\n if (isEmpty(formFields)) {\n return;\n }\n formFields.forEach(formField => {\n getDistinctValuesForField(dataSource, formField, options);\n });\n}\n\n/**\n * @ngdoc function\n * @name wm.widgets.live.LiveWidgetUtils#getDistinctValuesForField\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * Function to fetch the distinct values for a field\n *\n * @param {object} scope scope of the widget\n * @param {object} formFields definitions of the column/ field\n * @param {string} widget widget property on the field\n * @param {boolean} isEnableEmptyFilter is null or empty values allowed on filter\n *\n */\nexport function getDistinctValuesForField(dataSource, formField, options?) {\n if (!dataSource || !formField || formField.isDataSetBound) {\n return;\n }\n if (isSearchWidgetType(formField[options.widget])) {\n const dataoptions = getDistinctFieldProperties(dataSource, formField);\n formField.dataoptions = dataoptions;\n setDataFields(formField, Object.assign(options || {}, dataoptions));\n formField.datasource = dataSource;\n } else {\n interpolateBindExpressions(formField.viewParent, formField.filterexpressions, (filterexpressions) => {\n formField.filterexpressions = filterexpressions;\n getDistinctValues(dataSource, formField, options.widget).then((res: any) => {\n setFieldDataSet(res.field, res.data, {\n aliasColumn: res.aliasColumn,\n widget: options.widget,\n isEnableEmptyFilter: getEnableEmptyFilter(options.enableemptyfilter),\n EMPTY_VALUE: options.EMPTY_VALUE\n });\n });\n });\n }\n}\n\nfunction isDefinedAndNotEmpty(val) {\n return isDefined(val) && val !== '' && val !== null;\n}\n\n/**\n * @ngdoc function\n * @name wm.widgets.live.getRangeFieldValue\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * Function to get the field value for range\n *\n * @param {string} minValue min value selected\n * @param {string} maxValue max value selected\n */\nexport function getRangeFieldValue(minValue, maxValue) {\n let fieldValue;\n if (isDefinedAndNotEmpty(minValue) && isDefinedAndNotEmpty(maxValue)) {\n fieldValue = [minValue, maxValue];\n } else if (isDefinedAndNotEmpty(minValue)) {\n fieldValue = minValue;\n } else if (isDefinedAndNotEmpty(maxValue)) {\n fieldValue = maxValue;\n }\n return fieldValue;\n}\n/**\n * @ngdoc function\n * @name wm.widgets.live.getRangeMatchMode\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * Function to get the match mode for range\n *\n * @param {string} minValue min value selected\n * @param {string} maxValue max value selected\n */\nexport function getRangeMatchMode(minValue, maxValue) {\n let matchMode;\n // If two values exists, then it is between. Otherwise, greater or lesser\n if (isDefinedAndNotEmpty(minValue) && isDefinedAndNotEmpty(maxValue)) {\n matchMode = MatchMode.BETWEEN;\n } else if (isDefinedAndNotEmpty(minValue)) {\n matchMode = MatchMode.GREATER;\n } else if (isDefinedAndNotEmpty(maxValue)) {\n matchMode = MatchMode.LESSER;\n }\n return matchMode;\n}\n/**\n * @ngdoc function\n * @name wm.widgets.live.getEnableEmptyFilter\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * This function checks if enable filter options is set on live filter\n *\n * @param {object} enableemptyfilter empty filter options\n */\nexport function getEnableEmptyFilter(enableemptyfilter) {\n return enableemptyfilter && intersection(enableemptyfilter.split(','), LIVE_CONSTANTS.NULL_EMPTY).length > 0;\n}\n/**\n * @ngdoc function\n * @name wm.widgets.live.getEmptyMatchMode\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * Function to get the match mode based on the filter selected\n *\n * @param {object} enableemptyfilter empty filter options\n */\nexport function getEmptyMatchMode(enableemptyfilter) {\n let matchMode;\n const emptyFilterOptions = split(enableemptyfilter, ',');\n if (intersection(emptyFilterOptions, LIVE_CONSTANTS.NULL_EMPTY).length === 2) {\n matchMode = MatchMode.NULLOREMPTY;\n } else if (includes(emptyFilterOptions, LIVE_CONSTANTS.NULL)) {\n matchMode = MatchMode.NULL;\n } else if (includes(emptyFilterOptions, LIVE_CONSTANTS.EMPTY)) {\n matchMode = MatchMode.EMPTY;\n }\n return matchMode;\n}\n\n/**\n * converts the data passed to array.\n * -> Array: [1,2,3] - [1,2,3]\n * -> String: a,b,c - ['a','b','c']\n * -> object: {a:1} - [{a:1}]\n * -> null - []\n * -> undefined - []\n * @param data\n * @returns {Array<any>}\n */\nexport const createArrayFrom = (data): Array<any> => {\n\n if (isUndefined(data) || isNull(data)) {\n return [];\n }\n\n if (isString(data)) {\n data = data.split(',').map(Function.prototype.call, String.prototype.trim);\n }\n\n if (!isArray(data)) {\n data = [data];\n }\n\n return data;\n};\n\n/**\n * @ngdoc function\n * @name wm.widgets.live.applyFilterOnField\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * Function to get the updated values when filter on field is changed\n *\n * @param {object} $scope scope of the filter field/form field\n * @param {object} filterDef filter/form definition of the field\n * @param {boolean} isFirst boolean value to check if this method is called on load\n */\nexport function applyFilterOnField(dataSource, filterDef, formFields, newVal, options: any = {}) {\n const fieldName = filterDef.field || filterDef.key;\n const filterOnFields = filter(formFields, {'filter-on': fieldName});\n\n newVal = filterDef['is-range'] ? getRangeFieldValue(filterDef.minValue, filterDef.maxValue) : (isDefined(newVal) ? newVal : filterDef.value);\n if (!dataSource || (options.isFirst && (isUndefined(newVal) || newVal === ''))) {\n return;\n }\n // Loop over the fields for which the current field is filter on field\n forEach(filterOnFields, filterField => {\n const filterKey = filterField.field || filterField.key;\n const lookUpField = filterDef['lookup-field'] || filterDef._primaryKey;\n const filterWidget = filterField['edit-widget-type'] || filterField.widgettype;\n let filterFields = {};\n let filterOn = filterField['filter-on'];\n let filterVal;\n let fieldColumn;\n let matchMode;\n if (!isDataSetWidget(filterWidget) || filterField.isDataSetBound || filterOn === filterKey) {\n return;\n }\n // For related fields, add lookupfield for query generation\n if (filterDef && filterDef['is-related']) {\n filterOn += '.' + lookUpField;\n }\n if (isDefined(newVal)) {\n if (filterDef['is-range']) {\n matchMode = getRangeMatchMode(filterDef.minValue, filterDef.maxValue);\n } else if (getEnableEmptyFilter(options.enableemptyfilter) && newVal === LIVE_CONSTANTS.EMPTY_KEY) {\n matchMode = getEmptyMatchMode(options.enableemptyfilter);\n } else {\n matchMode = MatchMode.EQUALS;\n }\n filterVal = (isObject(newVal) && !isArray(newVal)) ? newVal[lookUpField] : newVal;\n filterFields[filterOn] = {\n 'value': filterVal,\n 'matchMode': matchMode\n };\n } else {\n filterFields = {};\n }\n fieldColumn = filterKey;\n\n if (isSearchWidgetType(filterWidget) && filterField.dataoptions) {\n filterField.dataoptions.filterFields = filterFields;\n } else {\n dataSource.execute(DataSource.Operation.GET_DISTINCT_DATA_BY_FIELDS, {\n 'fields': fieldColumn,\n 'filterFields': filterFields,\n 'pagesize': filterField.limit\n }).then(response => {\n setFieldDataSet(filterField, response.data, {\n aliasColumn: fieldColumn,\n widget: options.widget || 'widgettype',\n isEnableEmptyFilter: getEnableEmptyFilter(options.enableemptyfilter),\n EMPTY_VALUE: options.EMPTY_VALUE\n });\n }, noop);\n }\n });\n}\n\n// Transform data as required by data table\nexport function transformData(dataObject, variableName) {\n let newObj,\n tempArr,\n keys,\n oldKeys,\n numKeys,\n newObject,\n tempObj;\n\n // data sanity testing\n dataObject = dataObject || [];\n // if the dataObject is not an array make it an array\n if (!isArray(dataObject)) {\n // if the data returned is of type string, make it an object inside an array\n if (isString(dataObject)) {\n keys = variableName.substring(variableName.indexOf('.') + 1, variableName.length).split('.');\n oldKeys = [];\n numKeys = keys.length;\n newObject = {};\n tempObj = newObject;\n\n // loop over the keys to form appropriate data object required for grid\n keys.forEach((key, index) => {\n // loop over old keys to create new object at the iterative level\n oldKeys.forEach(oldKey => {\n tempObj = newObject[oldKey];\n });\n tempObj[key] = index === numKeys - 1 ? dataObject : {};\n oldKeys.push(key);\n });\n\n // change the string data to the new dataObject formed\n dataObject = newObject;\n }\n dataObject = [dataObject];\n } else {\n /*if the dataObject is an array and each value is a string, then lite-transform the string to an object\n * lite-transform: just checking if the first value is string and then transforming the object, instead of traversing through the whole array\n * */\n if (isString(dataObject[0])) {\n tempArr = [];\n forEach(dataObject, str => {\n newObj = {};\n newObj[variableName.split('.').join('-')] = str;\n tempArr.push(newObj);\n });\n dataObject = tempArr;\n }\n }\n return dataObject;\n}\n","import { $parseEvent, getClonedObject, getFormattedDate, isDefined, isEqualWithFields } from '@wm/core';\n\nimport { getEvaluatedData, getObjValueByKey } from './widget-utils';\n\nimport { ALLFIELDS } from './data-utils';\nimport { ToDatePipe } from '../pipes/custom-pipes';\nimport {\n cloneDeep,\n filter,\n forEach, get, groupBy, includes,\n isArray, isEqual,\n isNull,\n isObject,\n isString,\n isUndefined, keys,\n orderBy as _orderBy, sortBy,\n split, toLower,\n trim, uniqBy, uniqWith, values\n} from \"lodash-es\";\n\ndeclare const $;\ndeclare const moment;\n\nconst momentLocale = moment.localeData();\nconst momentCalendarOptions = getClonedObject(momentLocale._calendar);\nconst momentCalendarDayOptions = momentLocale._calendarDay || {\n lastDay: '[Yesterday]',\n lastWeek: '[Last] dddd',\n nextDay: '[Tomorrow]',\n nextWeek: 'dddd',\n sameDay: '[Today]',\n sameElse: 'L'\n };\nconst GROUP_BY_OPTIONS = {\n ALPHABET: 'alphabet',\n WORD: 'word',\n OTHERS: 'Others'\n };\nconst TIME_ROLLUP_OPTIONS = {\n HOUR: 'hour',\n DAY: 'day',\n WEEK: 'week',\n MONTH: 'month',\n YEAR: 'year'\n };\nconst ROLLUP_PATTERNS = {\n DAY: 'yyyy-MM-dd',\n WEEK: 'w \\'Week\\', yyyy',\n MONTH: 'MMM, yyyy',\n YEAR: 'YYYY',\n HOUR: 'hh:mm a'\n };\n\n/**\n * function to get the ordered dataset based on the given orderby\n */\nexport const getOrderedDataset = (dataSet: any, orderBy: string, innerItem?) => {\n if (!orderBy) {\n return cloneDeep(dataSet);\n }\n\n // The order by only works when the dataset contains list of objects.\n const items = orderBy.split(','),\n fields = [],\n directions = [];\n items.forEach(obj => {\n const item = obj.split(':');\n fields.push(innerItem ? innerItem + '.' + item[0] : item[0]);\n directions.push(item[1]);\n });\n return _orderBy(dataSet, fields, directions);\n};\n\n/**\n * Returns an array of object, each object contain the DataSetItem whose key, value, label are extracted from object keys.\n */\nexport const transformDataWithKeys = (dataSet: any) => {\n const data: DataSetItem[] = [];\n // if the dataset is instance of object (not an array) or the first item in the dataset array is an object,\n // then we extract the keys from the object and prepare the dataset items.\n if (isObject(dataSet[0]) || (isObject(dataSet) && !(dataSet instanceof Array))) {\n // getting keys of the object\n const objectKeys = Object.keys(dataSet[0] || dataSet);\n forEach(objectKeys, (objKey, index) => {\n data.push({\n key: objKey,\n label: objKey,\n value: objKey,\n index: index + 1\n });\n });\n }\n\n return data;\n};\n\n// Converts any type of data to array.\nexport const extractDataAsArray = data => {\n\n if (isUndefined(data) || isNull(data) || trim(data) === '') {\n return [];\n }\n\n if (isString(data)) {\n data = split(data, ',').map(str => str.trim());\n }\n\n if (!isArray(data)) {\n data = [data];\n }\n\n return data;\n};\n\n// This function return always an object containing dataset details.\nexport const convertDataToObject = dataResult => {\n if (isString(dataResult)) {\n dataResult = split(dataResult, ',').map(str => str.trim());\n }\n\n return dataResult;\n};\n\n// This function used to check the search type widget\nconst isSeachWidget = (widgetType) => {\n return widgetType === 'wm-search';\n};\n\n// This function is used to set the groupby field for search/autocomplete\nconst setGroupbyKey = (scope, context, dataSetItem, innerItem) => {\n if (scope && isSeachWidget(scope.widgetType)) {\n if (scope.groupby) {\n if (includes(scope.groupby, '(')) {\n //[Todo-CSP]: can generate expr fn in page based on groupby property on widget\n const groupDataByUserDefinedFn = $parseEvent(scope.groupby);\n (dataSetItem as any).groupby = groupDataByUserDefinedFn(context, {'row': dataSetItem.dataObject || dataSetItem});\n } else {\n (dataSetItem as any).groupby = groupDataByField(scope.groupby, scope.match, innerItem, scope.dateformat, scope.datePipe, scope.appDefaults, dataSetItem);\n }\n } else {\n (dataSetItem as any).groupby = '';\n }\n }\n};\n\n/**\n * The first step in datasetItems creation is data transformation:\n *\n * The dataset can contain one of the following formats and each of them to be converted to the given format;\n *\n * 1) The comma separated string..eg: A,B,C => [{ key: 'A', value: 'A'}, { key: 'B', value: 'B'}, { key: 'C', value: 'C'}]\n * 2) The array of values eg: [1,2,3] => [{ key: 1, value: 1}, { key: 2, value: 2}, { key: 3, value: 3}]\n * 3) an object eg: {name: 'A', age: 20} => [ {key: 'name', value: 'A'}, {key: 'age', value: 20}]\n * 4) an array of objects...eg: [ {name: 'A', age: 20}, {name: 'B', age: 20}] ==> returns [{key: _DATAFIELD_, value: _DISPLAYFIELD, label: _DISPLAYVALUE}]\n */\nexport const transformFormData = (context: any, dataSet: any, myDataField?: string, displayOptions?, startIndex?: number, scope?: any): Array<DataSetItem> => {\n const data = [];\n if (!dataSet) {\n return;\n }\n dataSet = convertDataToObject(dataSet);\n\n // startIndex is the index of the next new item.\n if (isUndefined(startIndex)) {\n startIndex = 1;\n }\n\n if (isString(dataSet)) {\n dataSet = dataSet.split(',').map(str => str.trim());\n dataSet.forEach((option, index) => {\n const dataSetItem = {key: option, value: option, label: (isDefined(option) && option !== null) ? option.toString() : '', index: startIndex + index};\n setGroupbyKey(scope, context, dataSetItem, 'value');\n data.push(dataSetItem);\n });\n } else if (isArray(dataSet) && !isObject(dataSet[0])) { // array of primitive values only\n dataSet.forEach((option, index) => {\n const dataSetItem = {key: option, value: option, label: (isDefined(option) && option !== null) ? option.toString() : '', index: startIndex + index};\n setGroupbyKey(scope, context, dataSetItem, 'value');\n data.push(dataSetItem);\n });\n } else if (!(dataSet instanceof Array) && isObject(dataSet)) {\n const i = 0;\n forEach(dataSet, (value, key) => {\n // @ts-ignore\n const dataSetItem = {key: trim(key), value: key, label: (isDefined(value) && value !== null) ? value.toString() : '',\n index: startIndex,\n dataObject: dataSet\n };\n setGroupbyKey(scope, context, dataSetItem, 'value');\n data.push(dataSetItem);\n });\n } else {\n if (!myDataField) { // consider the datafield as 'ALLFIELDS' when datafield is not given.\n myDataField = ALLFIELDS;\n }\n dataSet.forEach((option, index) => {\n const key = myDataField === ALLFIELDS ? startIndex + index : getObjValueByKey(option, myDataField);\n // Omit all the items whose datafield (key) is null or undefined.\n if (!isUndefined(key) && !isNull(key)) {\n const label = getEvaluatedData(option, {\n field: displayOptions.displayField,\n expression: displayOptions.displayExpr,\n bindExpression: displayOptions.bindDisplayExpr\n }, context);\n const dataSetItem = {\n key: key,\n label: (isDefined(label) && label !== null) ? label.toString() : '',\n value: myDataField === ALLFIELDS ? option : key,\n dataObject: option, // represents the object when datafield is ALLFIELDS. This is used as innerItem while grouping the datasetItems.\n index: startIndex + index\n };\n if (displayOptions.displayImgSrc || displayOptions.bindDisplayImgSrc) {\n (dataSetItem as any).imgSrc = getEvaluatedData(option, {\n expression: displayOptions.displayImgSrc,\n bindExpression: displayOptions.bindDisplayImgSrc\n }, context);\n }\n setGroupbyKey(scope, context, dataSetItem, 'dataObject');\n\n data.push(dataSetItem);\n }\n });\n }\n return data;\n};\n\n/**\n * Private method to get the unique objects by the data field\n */\nexport const getUniqObjsByDataField = (data: Array<DataSetItem>, dataField: string, displayField: string, allowEmptyFields?: boolean) => {\n let uniqData;\n const isAllFields = dataField === ALLFIELDS;\n\n uniqData = isAllFields ? uniqWith(data, isEqual) : uniqBy(data, 'key');\n\n if (!displayField || allowEmptyFields) {\n return uniqData;\n }\n\n // return objects having non empty datafield and display field values.\n return filter(uniqData, (obj) => {\n if (isAllFields) {\n return trim(obj.label);\n }\n return trim(obj.key) && trim(obj.label);\n });\n};\n\n/**\n * This function sets the selectedItem by comparing the field values, where fields are passed by \"compareby\" property.\n * works only for datafield with ALL_FIELDS\n * @param datasetItems list of dataset items.\n * @param compareWithDataObj represents the datavalue (object) whose properties are to be checked against each property of datasetItem.\n * @param compareByField specifies the property names on which datasetItem has to be compared against datavalue object.\n */\nexport const setItemByCompare = (datasetItems: Array<DataSetItem>, compareWithDataObj: Object, compareByField: string) => {\n // compare the fields based on fields given to compareby property.\n forEach(datasetItems, opt => {\n if (isEqualWithFields(opt.value, compareWithDataObj, compareByField)) {\n opt.selected = true;\n return false;\n }\n });\n};\n\n/**\n * This method returns sorted data based to groupkey.\n * Returns a array of objects, each object containing key which is groupKey and data is the sorted data which is sorted by groupby field in the data.\n *\n * @param groupedLiData, grouped data object with key as the groupKey and its value as the array of objects grouped under the groupKey.\n * @param groupBy, string groupby property\n * @returns {any[]}\n */\nconst getSortedGroupedData = (groupedLiData: Object, groupBy: string, orderby: string) => {\n const _groupedData = [];\n forEach(keys(groupedLiData), (groupkey, index) => {\n const liData = getOrderedDataset(groupedLiData[groupkey], orderby, 'dataObject');\n _groupedData.push({\n key: groupkey,\n data: sortBy(liData, data => {\n data._groupIndex = index + 1;\n return get(data, groupBy) || get(data.dataObject, groupBy);\n })\n });\n });\n return _groupedData;\n};\n\n/**\n * This method gets the groupedData using groupby property and match and returns the sorted array of objects.\n *\n * @param compRef represents the component's reference i.e. \"this\" value.\n * @param data represents the dataset i.e array of objects.\n * @param groupby, string groupby property\n * @param match, string match property\n * @param orderby, string orderby property\n * @param dateformat, string dateFormat property\n * @param innerItem, represents the innerItem on which groupby has to be applied. Incase of datasetItems, 'dataObject' contains the full object. Here innerItem is dataObject.\n * @returns {any[]} groupedData, array of objects, each object having key and data.\n */\nexport const groupData = (compRef: any, data: Array<Object | DataSetItem>, groupby: string, match: string, orderby: string, dateformat: string, datePipe: ToDatePipe, innerItem?: string, AppDefaults?: any) => {\n let groupedLiData = {};\n if (includes(groupby, '(')) {\n //[Todo-CSP]: can generate expr fn in page based on groupby property on widget\n const groupDataByUserDefinedFn = $parseEvent(groupby);\n groupedLiData = groupBy(data, val => {\n // @ts-ignore\n return groupDataByUserDefinedFn(compRef.viewParent, {'row': val.dataObject || val});\n });\n } else {\n groupedLiData = getGroupedData(data, groupby, match, orderby, dateformat, datePipe, innerItem, AppDefaults);\n }\n\n return getSortedGroupedData(groupedLiData, groupby, orderby);\n};\n\n/**\n * This method prepares the grouped data.\n *\n * @param fieldDefs array of objects i.e. dataset\n * @param groupby string groupby\n * @param match string match\n * @param orderby string orderby\n * @param dateFormat string date format\n * @param innerItem, item to look for in the passed data\n */\nconst getGroupedData = (fieldDefs: Array<Object | DataSetItem>, groupby: string, match: string, orderby: string, dateFormat: string, datePipe: ToDatePipe, innerItem?: string, AppDefaults?: any) => {\n // For day, set the relevant moment calendar options\n if (match === TIME_ROLLUP_OPTIONS.DAY) {\n momentLocale._calendar = momentCalendarDayOptions;\n }\n\n // handling case-in-sensitive scenario\n // ordering the data based on groupby field. If there is innerItem then apply orderby using the innerItem's containing the groupby field.\n fieldDefs = _orderBy(fieldDefs, fieldDef => {\n const groupKey = get(innerItem ? fieldDef[innerItem] : fieldDef, groupby);\n if (groupKey) {\n return toLower(groupKey);\n }\n });\n\n // extract the grouped data based on the field obtained from 'groupDataByField'.\n const groupedLiData = groupBy(fieldDefs, groupDataByField.bind(undefined, groupby, match, innerItem, dateFormat, datePipe, AppDefaults));\n\n momentLocale._calendar = momentCalendarOptions; // Reset to default moment calendar options\n\n return groupedLiData;\n};\n\n// Format the date with given date format\nexport const filterDate = (value: string | number, format: string, defaultFormat: string, datePipe: ToDatePipe) => {\n if (format === 'timestamp') { // For timestamp format, return the epoch value\n return value;\n }\n\n return getFormattedDate(datePipe, value, format || defaultFormat);\n};\n\n\n/**\n * This method returns the groupkey based on the rollup (match) passed\n *\n * @param concatStr, string containing groupby field value\n * @param rollUp string containing the match property.\n * @param dateformat string containing the date format to display the date.\n */\nconst getTimeRolledUpString = (concatStr: string, rollUp: string, dateformat: string, datePipe?: ToDatePipe, AppDefaults?: any) => {\n let groupByKey,\n strMoment = moment(concatStr),\n dateFormat = dateformat;\n\n const currMoment = moment(),\n getSameElseFormat = function () { // Set the sameElse option of moment calendar to user defined pattern\n return '[' + filterDate(this.valueOf(), dateFormat, ROLLUP_PATTERNS.DAY, datePipe) + ']';\n };\n\n switch (rollUp) {\n case TIME_ROLLUP_OPTIONS.HOUR:\n dateFormat = dateFormat || AppDefaults.timeFormat;\n\n // If date is invalid, check if data is in form of hh:mm a\n if (!strMoment.isValid()) {\n strMoment = moment(new Date().toDateString() + ' ' + concatStr);\n\n if (strMoment.isValid()) {\n // As only time is present, roll up at the hour level with given time format\n momentLocale._calendar.sameDay = function () {\n return '[' + filterDate(this.valueOf(), dateFormat, ROLLUP_PATTERNS.HOUR, datePipe) + ']';\n };\n }\n }\n // round off to nearest last hour\n strMoment = strMoment.startOf('hour');\n momentLocale._calendar.sameElse = getSameElseFormat;\n groupByKey = strMoment.calendar(currMoment);\n break;\n case TIME_ROLLUP_OPTIONS.WEEK:\n groupByKey = filterDate(strMoment.valueOf(), dateFormat, ROLLUP_PATTERNS.WEEK, datePipe);\n break;\n case TIME_ROLLUP_OPTIONS.MONTH:\n groupByKey = filterDate(strMoment.valueOf(), dateFormat, ROLLUP_PATTERNS.MONTH, datePipe);\n break;\n case TIME_ROLLUP_OPTIONS.YEAR:\n groupByKey = strMoment.format(ROLLUP_PATTERNS.YEAR);\n break;\n case TIME_ROLLUP_OPTIONS.DAY:\n dateFormat = dateFormat || AppDefaults.dateFormat;\n strMoment = strMoment.startOf('day'); // round off to current day\n momentLocale._calendar.sameElse = getSameElseFormat;\n groupByKey = strMoment.calendar(currMoment);\n break;\n }\n // If invalid date is returned, Categorize it as Others.\n if (groupByKey === 'Invalid date') {\n return GROUP_BY_OPTIONS.OTHERS;\n }\n return groupByKey;\n};\n\n\n// groups the fields based on the groupby value.\nconst groupDataByField = (groupby: string, match: string, innerItem: string, dateFormat: string, datePipe: ToDatePipe, AppDefaults: any, liData: Object) => {\n // get the groupby field value from the liData or innerItem in the liData.\n let concatStr = get(innerItem ? liData[innerItem] : liData, groupby);\n\n // by default set the undefined groupKey as 'others'\n if (isUndefined(concatStr) || isNull(concatStr) || concatStr.toString().trim() === '') {\n return GROUP_BY_OPTIONS.OTHERS;\n }\n\n // if match prop is alphabetic ,get the starting alphabet of the word as key.\n if (match === GROUP_BY_OPTIONS.ALPHABET) {\n concatStr = concatStr.substr(0, 1);\n }\n\n // if match contains the time options then get the concatStr using 'getTimeRolledUpString'\n if (includes(values(TIME_ROLLUP_OPTIONS), match)) {\n concatStr = getTimeRolledUpString(concatStr, match, dateFormat, datePipe, AppDefaults);\n }\n\n return concatStr;\n};\n\n/**\n * This method toggles all the list items inside the each list group.\n * @param el, component reference on which groupby is applied.\n */\nexport const toggleAllHeaders = (el: any) => {\n const groups = $(el.nativeElement).find('.item-group');\n\n groups.find('.group-list-item').toggle();\n\n // toggle the collapse icon on list header.\n const groupIcons = groups.find('li.list-group-header .app-icon');\n\n if (groupIcons) {\n forEach(groupIcons, (icon) => {\n const $icon = $(icon);\n if ($icon.hasClass('wi-chevron-down')) {\n $icon.removeClass('wi-chevron-down').addClass('wi-chevron-up');\n } else {\n $icon.removeClass('wi-chevron-up').addClass('wi-chevron-down');\n }\n });\n }\n};\n\n/**\n * On list header click, toggle the list items in this group.\n * and also toggle the header icon.\n * @param $event\n */\nexport const handleHeaderClick = ($event: Event) => {\n const selectedGroup = $($event.target as any).closest('.item-group'),\n selectedAppIcon = selectedGroup.find('li.list-group-header .app-icon');\n\n if (selectedAppIcon.hasClass('wi-chevron-down')) {\n selectedAppIcon.removeClass('wi-chevron-down').addClass('wi-chevron-up');\n } else {\n selectedAppIcon.removeClass('wi-chevron-up').addClass('wi-chevron-down');\n }\n\n selectedGroup.find('.group-list-item').toggle();\n};\n\n/**\n * configures reordering the items.\n * @param $el element to be sortable\n * @param options object containing the sortable options.\n * @param startCb callback on drag start on the element.\n * @param updateCb callback triggerred when sorting is stopped and the DOM position has changed.\n * @param sortCb callback triggerred during the sorting of an element.\n */\nexport const configureDnD = ($el: any, options: object, startCb: Function, updateCb: Function, sortCb?: Function) => {\n const sortOptions = Object.assign({\n containment: $el,\n delay: 100,\n opacity: 0.8,\n helper: 'clone',\n zIndex: 1050,\n tolerance: 'pointer',\n start: startCb,\n update: updateCb,\n sort: sortCb\n }, options);\n\n $el.sortable(sortOptions);\n};\n\n// Todo: convert to Class\ninterface DataSetProps {\n datafield: string;\n displayfield?: string;\n displayexpression?: string;\n usekeys?: boolean;\n orderby?: string;\n}\n\n/**\n * key represents the datafield value\n * label represents display value or expression value\n * value displayValue for primitives and data object for allFields\n * dataObject represent the object from the dataset when datafield is ALLFIELDS. This is used as innerItem while grouping the datasetItems.\n * imgSrc picture source\n * selected represents boolean to notify selected item.\n */\nexport class DataSetItem {\n key: any;\n label: any;\n value: any;\n dataObject?: Object;\n index?: number;\n imgSrc?: string;\n selected?: boolean;\n}\n","import { isNumberType, FormWidgetType, DataType, isMobileApp, isAndroid } from '@wm/core';\nimport {forEach, get, includes, split} from \"lodash-es\";\n\nconst VIEW_MODE_OPTIONS = {\n DEFAULT : 'default',\n LABEL : 'label'\n};\n\nexport const EDIT_MODE = {\n QUICK_EDIT : 'quickedit',\n INLINE : 'inline',\n FORM : 'form',\n DIALOG : 'dialog'\n};\n\n// Method to set the header config of the data table\nexport const setHeaderConfig = (headerConfig, config, field, index?: number): void => {\n forEach(headerConfig, cols => {\n if (get(cols, 'isGroup')) {\n if (cols.field === field) {\n cols.columns[index] = config;\n } else {\n setHeaderConfig(cols.columns, config, field, index);\n }\n }\n });\n};\n\nexport const setHeaderConfigForTable = (headerConfig: any, config: any, fieldName: string, index?: number): void => {\n if (fieldName) {\n setHeaderConfig(headerConfig, config, fieldName, index);\n } else {\n headerConfig[index] = config;\n }\n};\n\nexport const getRowOperationsColumn = (): any => {\n return {\n 'field' : 'rowOperations',\n 'type' : 'custom',\n 'displayName' : 'Actions',\n 'width' : '120px',\n 'readonly' : true,\n 'sortable' : false,\n 'searchable' : false,\n 'resizable' : false,\n 'selectable' : false,\n 'show' : true,\n 'operations' : [],\n 'opConfig' : {},\n 'pcDisplay' : true,\n 'mobileDisplay' : true,\n 'tabletDisplay' : true,\n 'include' : true,\n 'isRowOperation': true\n };\n};\n\n/**\n * Returns caption and widget bootstrap classes for the field\n */\nexport const getFieldLayoutConfig = (captionWidth, captionPosition, os): any => {\n let captionCls = '',\n widgetCls = '';\n\n captionPosition = captionPosition || 'top';\n\n if (captionPosition === 'top' || captionPosition === 'floating') {\n if ((os && os === 'android') || !isMobileApp() || isAndroid()) { // Is android or not a mobile application\n captionCls = widgetCls = 'col-xs-12';\n } else if (isMobileApp()) { // Is a mobile application and not android\n captionCls = 'col-xs-4';\n widgetCls = 'col-xs-8';\n }\n } else if (captionWidth) {\n // handling itemsperrow containing string of classes\n forEach(split(captionWidth, ' '), function (cls) {\n const keys = split(cls, '-'),\n tier = keys[0];\n let _captionWidth,\n widgetWidth;\n _captionWidth = parseInt(keys[1], 10);\n widgetWidth = 12 - _captionWidth;\n widgetWidth = widgetWidth <= 0 ? 12 : widgetWidth;\n captionCls += ' ' + 'col-' + tier + '-' + _captionWidth;\n widgetCls += ' ' + 'col-' + tier + '-' + widgetWidth;\n });\n }\n return {\n 'captionCls' : captionCls,\n 'widgetCls' : widgetCls\n };\n};\n\nexport const getDefaultViewModeWidget = widget => {\n if (includes(['checkbox', 'toggle', 'rating'], widget)) {\n return VIEW_MODE_OPTIONS.DEFAULT;\n }\n return VIEW_MODE_OPTIONS.LABEL;\n};\n\nconst parseBooleanValue = value => {\n if (value === 'true') {\n return true;\n }\n if (value === 'false') {\n return false;\n }\n if (/^\\d+$/.test(value)) { // Check if the value is a string of number type like '123'\n return +value;\n }\n return value;\n};\n\nexport const parseValueByType = (value, type, widget, trailingzero?) => {\n if (widget) {\n if (widget === FormWidgetType.NUMBER || widget === FormWidgetType.SLIDER || widget === FormWidgetType.CURRENCY) {\n return isNaN(Number(value)) ? null : trailingzero ? value : Number(value);\n }\n if (widget === FormWidgetType.CHECKBOX || widget === FormWidgetType.TOGGLE) {\n return parseBooleanValue(value);\n }\n return value;\n }\n if (isNumberType(type)) {\n return isNaN(Number(value)) ? null : Number(value);\n }\n if (type === DataType.BOOLEAN) {\n return parseBooleanValue(value);\n }\n return value;\n};\n\nconst fieldTypeWidgetTypeMap = {\n 'integer' : ['number', 'text', 'select', 'checkboxset', 'radioset', 'rating', 'slider', 'currency', 'autocomplete', 'chips'],\n 'big_integer': ['number', 'text', 'select', 'checkboxset', 'radioset', 'rating', 'slider', 'currency', 'autocomplete', 'chips'],\n 'short' : ['number', 'text', 'select', 'checkboxset', 'radioset', 'slider', 'currency', 'autocomplete', 'chips'],\n 'float' : ['number', 'text', 'select', 'checkboxset', 'radioset', 'slider', 'currency', 'autocomplete', 'chips'],\n 'big_decimal': ['number', 'text', 'select', 'checkboxset', 'radioset', 'slider', 'currency', 'autocomplete', 'chips'],\n 'number' : ['number', 'text', 'select', 'checkboxset', 'radioset', 'slider', 'currency', 'autocomplete', 'chips'],\n 'double' : ['number', 'text', 'select', 'checkboxset', 'radioset', 'slider', 'currency', 'autocomplete', 'chips'],\n 'long' : ['number', 'text', 'select', 'checkboxset', 'radioset', 'rating', 'slider', 'currency', 'autocomplete', 'chips'],\n 'byte' : ['number', 'text', 'select', 'checkboxset', 'radioset', 'slider', 'currency', 'autocomplete', 'chips'],\n 'string' : ['text', 'number', 'textarea', 'password', 'richtext', 'select', 'checkboxset', 'radioset', 'date', 'time', 'timestamp', 'switch', 'currency', 'autocomplete', 'chips', 'colorpicker'],\n 'character' : ['text', 'number', 'textarea', 'password', 'richtext', 'select', 'checkboxset', 'radioset', 'switch', 'currency', 'autocomplete', 'chips'],\n 'text' : ['text', 'number', 'textarea', 'password', 'richtext', 'select', 'checkboxset', 'radioset', 'date', 'time', 'timestamp', 'switch', 'currency', 'autocomplete', 'chips', 'colorpicker'],\n 'date' : ['date', 'text', 'number', 'select', 'checkboxset', 'radioset', 'autocomplete', 'chips'],\n 'time' : ['time', 'text', 'number', 'select', 'checkboxset', 'radioset', 'autocomplete', 'chips'],\n 'timestamp' : ['timestamp', 'text', 'number', 'select', 'checkboxset', 'radioset', 'autocomplete', 'chips'],\n 'datetime' : ['datetime', 'text', 'select', 'checkboxset', 'radioset', 'autocomplete', 'chips'],\n 'boolean' : ['checkbox', 'radioset', 'toggle', 'select'],\n 'list' : ['select', 'radioset', 'checkboxset', 'switch', 'autocomplete', 'chips'],\n 'clob' : ['text', 'textarea', 'richtext'],\n 'blob' : ['upload'],\n 'file' : ['upload'],\n 'custom' : ['text', 'number', 'textarea', 'password', 'checkbox', 'toggle', 'slider', 'richtext', 'currency', 'switch',\n 'select', 'checkboxset', 'radioset', 'date', 'time', 'timestamp', 'rating', 'datetime', 'autocomplete', 'chips', 'colorpicker']\n};\n\n// Get widgets applicable to the given type\nexport const getFieldTypeWidgetTypesMap = () => {\n return fieldTypeWidgetTypeMap;\n};\n\n// Get filter widget applicable to the given type\nexport const getDataTableFilterWidget = type => {\n let widget = fieldTypeWidgetTypeMap[type] && fieldTypeWidgetTypeMap[type][0];\n if (type === DataType.BOOLEAN) {\n widget = FormWidgetType.SELECT;\n }\n if (includes([FormWidgetType.TEXT, FormWidgetType.NUMBER, FormWidgetType.SELECT, FormWidgetType.AUTOCOMPLETE,\n FormWidgetType.DATE, FormWidgetType.TIME, FormWidgetType.DATETIME], widget)) {\n return widget;\n }\n return FormWidgetType.TEXT;\n};\n\n/**\n * @ngdoc function\n * @name wm.widgets.live.getEditModeWidget\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * This function returns the default widget for grid\n *\n * @param {object} colDef field definition\n */\nexport const getEditModeWidget = colDef => {\n if (colDef['related-entity-name'] && colDef['primary-key']) {\n return FormWidgetType.SELECT;\n }\n return (fieldTypeWidgetTypeMap[colDef.type] && fieldTypeWidgetTypeMap[colDef.type][0]) || FormWidgetType.TEXT;\n};\n\n/**\n * @ngdoc function\n * @name wm.widgets.live.LiveWidgetUtils#getDefaultValue\n * @methodOf wm.widgets.live.LiveWidgetUtils\n * @function\n *\n * @description\n * return the formatted default value\n *\n * @param {string} value value to be formatted\n * @param {string} type column type of the value\n */\nexport const getDefaultValue = (value, type, widget) => {\n if (widget) {\n if (widget === FormWidgetType.NUMBER || widget === FormWidgetType.SLIDER || widget === FormWidgetType.CURRENCY) {\n return isNaN(Number(value)) ? null : Number(value);\n }\n if (widget === FormWidgetType.CHECKBOX || widget === FormWidgetType.TOGGLE) {\n return parseBooleanValue(value);\n }\n return value;\n }\n if (isNumberType(type)) {\n return isNaN(Number(value)) ? null : Number(value);\n }\n if (type === DataType.BOOLEAN) {\n return parseBooleanValue(value);\n }\n return value;\n};\n","import {Inject, Injector, Optional} from '@angular/core';\n\nimport { Subject } from 'rxjs';\n\nimport {$appDigest, findValueOf, isObject, isDefined, validateAccessRoles} from '@wm/core';\nimport { SecurityService } from '@wm/security';\n\nimport { createArrayFrom } from '../../../utils/data-utils';\nimport { getEvaluatedData } from '../../../utils/widget-utils';\nimport { getOrderedDataset } from '../../../utils/form-utils';\nimport { StylableComponent } from './stylable.component';\nimport {debounce, first, get, isUndefined, omitBy, startsWith} from \"lodash-es\";\n\nconst getValidLink = (link) => {\n const routRegex = /^(\\/|#\\/|#)(?!\\W).*/;\n if (link) {\n if (routRegex.test(link)) {\n link = first(link.match(/[\\w]+.*/g)) || '';\n return `#/${link}`;\n }\n if (startsWith(link, 'www.')) {\n return `//${link}`;\n }\n return link;\n }\n};\n\nexport class DatasetAwareNavComponent extends StylableComponent {\n\n public nodes: Array<NavNode> = [];\n public dataset: any;\n public itemicon: string;\n public itemlabel: string;\n public itemlink: string;\n public itemtarget: string;\n public itembadge: string;\n public itemchildren: string;\n public itemaction: string;\n public itemclass: string;\n public itemid: string;\n public isactive: string;\n public userrole: string;\n public orderby: string;\n public datafield: string;\n public displayfield: string;\n\n private _itemFieldMap;\n private binditemlabel: string | null;\n private binditemicon: string | null;\n private binditemaction: string | null;\n private binditembadge: string | null;\n private binditemchildren: string | null;\n private binditemlink: string | null;\n private binditemtarget: string | null;\n private binduserrole: string | null;\n private bindisactive: string | null;\n private securityService: any;\n\n protected binditemid: string | null;\n protected nodes$ = new Subject();\n\n constructor(inj: Injector, WIDGET_CONFIG, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n this.securityService = this.inj.get(SecurityService);\n this.binditemlabel = this.nativeElement.getAttribute('itemlabel.bind');\n this.binditemicon = this.nativeElement.getAttribute('itemicon.bind');\n this.binditemaction = this.nativeElement.getAttribute('itemaction.bind');\n this.binditembadge = this.nativeElement.getAttribute('itembadge.bind');\n this.binditemchildren = this.nativeElement.getAttribute('itemchildren.bind');\n this.binditemid = this.nativeElement.getAttribute('itemid.bind');\n this.binditemlink = this.nativeElement.getAttribute('itemlink.bind');\n this.binditemtarget = this.nativeElement.getAttribute('itemtarget.bind');\n this.binduserrole = this.nativeElement.getAttribute('userrole.bind');\n this.bindisactive = this.nativeElement.getAttribute('isactive.bind');\n }\n\n /**\n * constructs individual node for the widget model.\n * @param fields\n * @param node\n */\n private getNode(fields, node): NavNode {\n const context = this.viewParent.pageScope || this.viewParent;\n const children = getEvaluatedData(node, {\n field: this.itemchildren,\n bindExpression: this.binditemchildren\n }, context) || get(node, fields.childrenField);\n const navNode = {\n action: getEvaluatedData(node, {\n field: this.itemaction,\n bindExpression: this.binditemaction\n }, context) || get(node, fields.actionField),\n badge: getEvaluatedData(node, {\n field: this.itembadge,\n bindExpression: this.binditembadge\n }, context) || get(node, fields.badgeField),\n children: Array.isArray(children) ? this.getNodes(children) : [],\n class: get(node, fields.classField),\n disabled: node.disabled,\n icon: getEvaluatedData(node, {\n field: this.itemicon,\n bindExpression: this.binditemicon\n }, context) || get(node, fields.iconField),\n id: getEvaluatedData(node, {\n field: this.itemid,\n bindExpression: this.binditemid\n }, context) || get(node, fields.idField),\n label: getEvaluatedData(node, {\n field: this.itemlabel,\n bindExpression: this.binditemlabel\n }, context) || get(node, fields.labelField),\n link: getValidLink(getEvaluatedData(node, {\n field: this.itemlink,\n bindExpression: this.binditemlink\n }, context) || get(node, fields.linkField)),\n target: getValidLink(getEvaluatedData(node, {\n field: this.itemtarget,\n bindExpression: this.binditemtarget\n }, context) || get(node, fields.targetField)),\n role: getEvaluatedData(node, {field: this.userrole, bindExpression: this.binduserrole}, context),\n isactive: getEvaluatedData(node, {field: this.isactive, bindExpression: this.bindisactive}, context),\n // older projects have display field & data field property for menu.\n value: this.datafield ? (this.datafield === 'All Fields' ? node : findValueOf(node, this.datafield)) : node\n };\n // @ts-ignore\n return omitBy(navNode, isUndefined);\n }\n\n resetItemFieldMap() {\n this._itemFieldMap = null;\n }\n\n getItemFieldsMap() {\n if (!this._itemFieldMap) {\n this._itemFieldMap = {\n idField: this.itemid || 'itemid',\n iconField: this.itemicon || 'icon',\n labelField: this.itemlabel || 'label',\n linkField: this.itemlink || 'link',\n targetField: this.itemtarget || 'target',\n badgeField: this.itembadge || 'badge',\n childrenField: this.itemchildren || 'children',\n classField: this.itemclass || 'class',\n actionField: this.itemaction || 'action',\n isactiveField: this.isactive || 'isactive'\n };\n }\n return this._itemFieldMap;\n }\n\n /**\n * returns array for the value passed as nv.\n * nv: 'a,b' => [{label:a, value:a}, {label:b, value:b}]\n * nv: [1,2] => [{label:1, value:1}, {label:2, value:2}]\n * nv: [{obj}, {obj}] => [{obj}, {obj}]\n * @param nv\n */\n private prepareNodeDataSet(nv) {\n nv = createArrayFrom(nv);\n return nv.map((val) => {\n if (!isObject(val)) {\n return {\n label: val,\n value: val\n };\n }\n return val;\n });\n }\n\n /**\n * constructs dataset form the nav elements.\n */\n private getNodes(nv = this.dataset || {}): Array<NavNode> {\n let nodes: Array<any> = getOrderedDataset(this.prepareNodeDataSet(nv), this.orderby) || [];\n\n if (nodes.length) {\n const userRole = this.userrole;\n const nodeFields = this.getItemFieldsMap();\n\n nodes = nodes.reduce((result, node) => {\n if (validateAccessRoles(node[userRole], this.securityService.loggedInUser)) {\n result.push(this.getNode(nodeFields, node));\n }\n return result;\n }, []);\n }\n return nodes;\n }\n\n // enable the inherited class to extend this method.\n protected resetNodes() {\n this.resetItemFieldMap();\n this.nodes = this.getNodes();\n $appDigest();\n // notify the node listeners\n this.nodes$.next(null);\n }\n\n // debounce function for reset nodes functions.\n private _resetNodes = debounce(this.resetNodes, 50);\n\n onPropertyChange(key, nv, ov) {\n switch (key) {\n case 'dataset':\n case 'itemicon':\n case 'itemlabel':\n case 'itemlink':\n case 'itemtarget':\n case 'itemclass':\n case 'itemchildren':\n case 'isactive':\n case 'orderby':\n // calls resetnodes method after 50ms. any calls within 50ms will be ignored.\n this._resetNodes();\n break;\n }\n super.onPropertyChange(key, nv, ov);\n }\n}\n\nexport interface NavNode {\n label: string;\n action?: any;\n badge?: string;\n children?: Array<NavNode>;\n class?: string;\n disabled?: boolean;\n icon?: string;\n id?: string;\n link?: string;\n role?: string;\n value?: any;\n}\n","import {Validators} from '@angular/forms';\n\nimport {$unwatch, $watch, FormWidgetType, VALIDATOR} from '@wm/core';\nimport {\n cloneDeep,\n concat,\n extend,\n filter,\n find,\n forEach,\n get,\n isEmpty,\n isFunction,\n keys as _keys,\n toUpper\n} from \"lodash-es\";\n\nconst DEFAULT_VALIDATOR = {\n pattern: 'regexp',\n max: 'maxvalue',\n min: 'minvalue',\n required: 'required',\n maxlength: 'maxchars',\n mindate: 'mindate',\n maxdate: 'maxdate',\n excludedates: 'excludedates',\n excludedays: 'excludedays',\n invalidNumber:'invalidNumber'\n};\n\nexport class BaseFieldValidations {\n private hasValidators;\n\n // Instance of the directive table-column, form-field..\n private instance;\n // Inline form widget\n public formwidget;\n // Widget type\n private widgettype;\n // From control\n private widgetControl;\n // Parent widget context Table, Form..\n private widgetContext;\n // Optional table column type quickedit newrow/ inline edit\n private tableFieldType;\n\n private defaultValidatorMessages: any;\n private _syncValidators: any;\n private _asyncValidatorFn: any;\n\n constructor(instance, formwidget, widgettype, widgetControl, widgetContext, tableFieldType?){\n this.instance = instance;\n this.formwidget = formwidget;\n this.widgettype = widgettype;\n this.widgetControl = widgetControl;\n this.widgetContext = widgetContext;\n\n this.defaultValidatorMessages = [];\n if (tableFieldType) {\n this.tableFieldType = tableFieldType;\n }\n }\n\n // this method returns the collection of supported default validators\n private getDefaultValidators() {\n const _validator = [];\n if (this.instance.required && this.instance.show !== false) {\n // For checkbox/toggle widget, required validation should consider true value only\n if (this.widgettype === FormWidgetType.CHECKBOX || this.widgettype === FormWidgetType.TOGGLE) {\n _validator.push(Validators.requiredTrue);\n } else {\n _validator.push(Validators.required);\n }\n }\n if (this.instance.maxchars) {\n _validator.push(Validators.maxLength(this.instance.maxchars));\n }\n if (this.instance.minvalue) {\n _validator.push(Validators.min(this.instance.minvalue));\n }\n if (this.instance.maxvalue && this.widgettype !== FormWidgetType.RATING) {\n _validator.push(Validators.max(this.instance.maxvalue));\n }\n if (this.instance.regexp) {\n _validator.push(Validators.pattern(this.instance.regexp));\n }\n if (this.formwidget && isFunction(this.formwidget.validate)) {\n _validator.push(this.formwidget.validate.bind(this.formwidget));\n }\n return _validator;\n }\n\n // On change of any validation property, set the angular form validators\n setUpValidators(customValidator?) {\n if (this.hasValidators) {\n return;\n }\n this.instance._validators = this.getDefaultValidators();\n\n if (customValidator) {\n this.instance._validators.push(customValidator);\n }\n\n if (this.widgetContext.ngform) {\n this.widgetControl.setValidators(this.instance._validators);\n const opt = {};\n // updating the value only when prevData is not equal to current value. and also initially when instance.value is empty or null for some widgets like date, checkboxset\n // emitEvent flag will prevent from emitting the valueChanges when value is equal to the prevDatavalue.\n if (this.formwidget && (this.instance.value === this.formwidget.prevDatavalue || this.isNullOrEmptyOrFalsy(this.instance.value))) {\n opt['emitEvent'] = false;\n }\n this.widgetControl.updateValueAndValidity(opt);\n }\n }\n\n getPromiseList(validators) {\n const arr = [];\n forEach(validators, (fn, index) => {\n let promise = fn;\n if (fn instanceof Function && fn.bind) {\n promise = fn(this.widgetControl, this.widgetContext);\n }\n if (promise instanceof Promise) {\n arr.push(promise);\n }\n });\n return arr;\n }\n\n // this method sets the asyncValidation on the form field. Assigns validationmessages from the returned response\n setAsyncValidators(validators) {\n this._asyncValidatorFn = () => {\n return () => {\n return Promise.all(this.getPromiseList(validators)).then(() => {\n this.instance.validationmessage = '';\n return null;\n }, err => {\n // if err obj has validationMessage key, then set validationMessage using this value\n // else return the value of the first key in the err object as validation message.\n if (err.hasOwnProperty('errorMessage')) {\n this.instance.validationmessage = get(err, 'errorMessage');\n } else {\n const keys = _keys(err);\n this.instance.validationmessage = (err[keys[0]]).toString();\n }\n return err;\n }).then(response => {\n // form control status is not changed from pending. This is an angular issue refer https://github.com/angular/angular/issues/13200\n const checkForStatusChange = () => {\n setTimeout(() => {\n if (this.widgetControl.status === 'PENDING') {\n checkForStatusChange();\n } else {\n this.instance.onStatusChange(this.widgetControl.status, this.tableFieldType);\n }\n }, 100);\n };\n checkForStatusChange();\n return response;\n });\n };\n };\n\n this.widgetControl.setAsyncValidators([this._asyncValidatorFn()]);\n if(this.widgetContext.ngform.touched){\n const opt = {};\n // updating the value only when prevData is not equal to current value. and also initially when instance.value is empty or null for some widgets like date, checkboxset\n // emitEvent flag will prevent from emitting the valueChanges when value is equal to the prevDatavalue.\n if (this.formwidget && (this.instance.value === this.formwidget.prevDatavalue || this.isNullOrEmptyOrFalsy(this.instance.value))) {\n opt['emitEvent'] = false;\n }\n this.widgetControl.updateValueAndValidity(opt);\n }\n }\n\n isDefaultValidator(type) {\n return get(VALIDATOR, toUpper(type));\n }\n\n // default validator is bound to a function then watch for value changes\n // otherwise set the value of default validator directly\n setDefaultValidator(key, value) {\n if (value && value instanceof Function) {\n // passing formfield and form as arguments to the default validator function\n this.watchDefaultValidatorExpr(value.bind(undefined, this.widgetControl, this.widgetContext), key);\n } else {\n this.instance.widget[key] = value;\n this.instance[key] = value;\n }\n }\n\n // sets the default validation on the form field\n setValidators(validators) {\n let _cloneValidators = cloneDeep(validators);\n this.hasValidators = true;\n this._syncValidators = [];\n forEach(_cloneValidators, (obj, index) => {\n // custom validation is bound to function.\n if (obj && obj instanceof Function) {\n // passing formfield and form as arguments to the obj (i.e. validator function)\n _cloneValidators[index] = obj.bind(undefined, this.widgetControl, this.widgetContext);\n this._syncValidators.push(_cloneValidators[index]);\n } else {\n // checks for default validator like required, maxchars etc.\n const key = get(obj, 'type');\n this.defaultValidatorMessages[key] = get(obj, 'errorMessage');\n if (this.isDefaultValidator(key)) {\n const value = get(obj, 'validator');\n this.setDefaultValidator(key, value);\n _cloneValidators[index] = '';\n }\n }\n });\n\n // _syncValidators contains all the custom validations on the form field. will not include default validators.\n this._syncValidators = filter(_cloneValidators, val => {\n if (val) {\n return val;\n }\n });\n this.applyDefaultValidators();\n }\n\n observeOn(fields, context) {\n forEach(fields, field => {\n const formfield = find(this.widgetContext[context], {'key': field});\n if (formfield) {\n if (!formfield.notifyForFields) {\n formfield.notifyForFields = [];\n }\n formfield.notifyForFields.push(this.instance);\n }\n });\n }\n\n validate() {\n this.applyDefaultValidators();\n if (this._asyncValidatorFn) {\n const opt = {};\n // updating the value only when prevData is not equal to current value. and also initially when instance.value is empty or null for some widgets like date, checkboxset\n // emitEvent flag will prevent from emitting the valueChanges when value is equal to the prevDatavalue.\n if (this.formwidget && (this.instance.value === this.formwidget.prevDatavalue || this.isNullOrEmptyOrFalsy(this.instance.value))) {\n opt['emitEvent'] = false;\n }\n this.widgetControl.setAsyncValidators([this._asyncValidatorFn()]);\n this.widgetControl.updateValueAndValidity(opt);\n }\n // show the validation erros show when form is touched and not on load. This just highlights the field that is subscribed for changes.\n if (this.widgetContext.ngform.touched) {\n this.widgetControl.markAsTouched();\n }\n }\n\n // watches for changes in the bound function for default validators.\n watchDefaultValidatorExpr(fn, key) {\n const watchName = `${this.instance.widgetId}_` + key + '_formField';\n $unwatch(watchName);\n //[Todo-CSP]: Need clarity generate this expr fn if form is present in the page\n this.instance.registerDestroyListener($watch('boundFn(fn)', extend(this.instance, this.instance.viewParent), {fn}, (nv, ov) => {\n this.instance.widget[key] = nv;\n this.applyDefaultValidators();\n }, watchName));\n }\n isNullOrEmptyOrFalsy(value) {\n return isEmpty(value);\n }\n\n // invokes both custom sync validations and default validations.\n applyDefaultValidators() {\n const validators = this.getDefaultValidators();\n const opt = {};\n // updating the value only when prevData is not equal to current value. and also initially when instance.value is empty or null for some widgets like date, checkboxset\n // emitEvent flag will prevent from emitting the valueChanges when value is equal to the prevDatavalue.\n if (this.formwidget && (this.instance.value === this.formwidget.prevDatavalue || this.isNullOrEmptyOrFalsy(this.instance.value))) {\n opt['emitEvent'] = false;\n }\n this.widgetControl.setValidators(concat(this._syncValidators || [], validators));\n this.widgetControl.updateValueAndValidity(opt);\n this.setCustomValidationMessage();\n }\n\n setCustomValidationMessage() {\n const fieldErrors = this.widgetControl && this.widgetControl.errors;\n\n if (!fieldErrors) {\n return;\n }\n if (fieldErrors.hasOwnProperty('errorMessage')) {\n this.instance.validationmessage = get(fieldErrors, 'errorMessage');\n } else {\n const keys = _keys(fieldErrors);\n const key = keys[0];\n const validationMsgKey = get(DEFAULT_VALIDATOR, key) || this.formwidget.validateType;\n if (validationMsgKey) {\n const msg = get(this.defaultValidatorMessages, validationMsgKey) || this.instance.validationmessage;\n if (msg && msg instanceof Function) {\n // passing formfield and form as arguments to the errorMessage function.\n this.instance.validationmessage = msg(this.widgetControl, this.widgetContext);\n } else {\n this.instance.validationmessage = msg;\n }\n } else {\n // fallback when there is no validationmessage for fields other than default validators.\n this.instance.validationmessage = '';\n }\n }\n }\n}\n","import { SwipeAnimation } from '@swipey';\n\nimport { App, isIos, setCSS } from '@wm/core';\n\ndeclare const $;\n\nexport class PullToRefresh extends SwipeAnimation {\n private infoContainer: JQuery<HTMLElement>;\n private runAnimation: boolean;\n private count = 0;\n private spinner: Spinner;\n public cancelSubscription: Function;\n private animationInProgress: boolean;\n\n constructor(private $el: JQuery<HTMLElement>, private app: App, private onPullToRefresh: () => void) {\n super();\n const template = '<div class=\"refresh-container\"></div>';\n this.$el.prepend(template);\n this.infoContainer = this.$el.find('.refresh-container');\n\n if (isIos()) {\n this.infoContainer.addClass('ios-refresh-container');\n }\n\n this.init(this.$el);\n }\n\n public threshold() {\n return 10;\n }\n\n public direction() {\n return $.fn.swipey.DIRECTIONS.VERTICAL;\n }\n\n private subscribe() {\n // Subscribing for variable updates, wait till the response and stop the animation.\n this.cancelSubscription = this.app.subscribe('toggle-variable-state', (data) => {\n // data.active is true means the variable update has just started whereas false means update has ended.\n if (data.active && this.animationInProgress) {\n this.count++;\n this.wait();\n } else if (this.count > 0) {\n this.count--;\n }\n // call stop animation only when animation has started.\n if (!this.count && this.animationInProgress) {\n this.stopAnimation();\n }\n });\n }\n\n public bounds($event, $d) {\n const pageIscroll = (this.$el[0] as any).iscroll;\n // If scroll position is not at the top of the page then do not trigger the animation.\n if ($d < 0 || (pageIscroll && !isNaN(pageIscroll.y) && pageIscroll.y !== 0)) {\n return {\n lower: undefined,\n upper: undefined\n };\n }\n if (!this.spinner) {\n this.spinner = isIos() ? new IOSSpinner(this.infoContainer) : new AndroidSpinner(this.infoContainer);\n this.subscribe();\n }\n\n return {\n lower: 0,\n center: 0,\n upper: isIos() ? 0 : 150,\n strict: !isIos()\n };\n }\n\n public context(): Object {\n this.infoContainer.show();\n if (isIos()) {\n this.infoContainer.addClass('entry');\n }\n return {\n spin: $d => {\n this.spinner.setRotation($d * 2);\n }\n };\n }\n\n public animation() {\n if (isIos()) {\n return {\n css: {\n transform: 'translate3d(0, ${{$D + $d}}px, 0)',\n spin: '${{spin($d)}}'\n }\n };\n }\n return {\n target: this.infoContainer,\n css: {\n transform: 'translate3d(0, ${{$D + $d}}px, 0)',\n spin: '${{spin($d)}}',\n opacity: '${{min(($D + $d) / 100, 1)}}'\n }\n };\n }\n\n // Start the spinner animation and invokes the pulltorefresh event. Stops the animation after the wait time.\n public onAnimation() {\n this.animationInProgress = true;\n this.spinner.start();\n if (this.onPullToRefresh) {\n this.onPullToRefresh();\n }\n\n setTimeout(() => {\n // if listenToAnimation is set, then wait for stopAnimation to be invoked. Otherwise call stopAnimation manually.\n if (this.runAnimation) {\n return;\n }\n this.stopAnimation();\n });\n }\n\n public stopAnimation() {\n setTimeout(() => {\n this.runAnimation = false;\n this.animationInProgress = false;\n this.spinner.stop();\n this.infoContainer.hide();\n setCSS(this.infoContainer[0], 'transform', 'none');\n if (!isIos()) {\n setCSS(this.infoContainer[0], 'opacity', 0);\n }\n this.infoContainer.removeClass('entry');\n }, 800);\n }\n\n public wait() {\n this.runAnimation = true;\n }\n}\n\n// Interface for Spinner\ninterface Spinner {\n start();\n stop();\n setRotation(d: number);\n}\n\n// Android Spinner implementation\nclass AndroidSpinner implements Spinner {\n private options: Object;\n private initialized: any;\n private cx: number;\n private cy: number;\n private r: number;\n private path: any;\n private intervalId;\n private container: any;\n\n constructor(private $el: JQuery<HTMLElement>, options?: any) {\n this.options = options || {};\n }\n\n\n private polarToCartesian(centerX: number, centerY: number, radius: number, angleInDegrees: number): any {\n const angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;\n return {\n x: centerX + (radius * Math.cos(angleInRadians)),\n y: centerY + (radius * Math.sin(angleInRadians))\n };\n }\n\n private describeArc(x: number, y: number, radius: number, startAngle: number, endAngle: number): string {\n\n const start = this.polarToCartesian(x, y, radius, endAngle);\n const end = this.polarToCartesian(x, y, radius, startAngle);\n\n const arcSweep = endAngle - startAngle <= 180 ? '0' : '1';\n\n return [\n 'M', start.x, start.y,\n 'A', radius, radius, 0, arcSweep, 0, end.x, end.y,\n 'L', end.x, end.y\n ].join(' ');\n }\n\n public init(): void {\n if (this.initialized) {\n return;\n }\n // append the svg to the element on which spinner has to be shown.\n const androidTemplate = $('<svg><path id=\"arc1\"/></svg>');\n const container = $('<div class=\"android-spinner\"></div>');\n container.append(androidTemplate);\n this.$el.append(container);\n this.cx = container.outerWidth() / 2;\n this.cy = container.outerHeight() / 2;\n this.r = this.cx * 0.6;\n this.path = container.find('path');\n this.initialized = true;\n this.container = container;\n }\n\n // sets rotation to the path\n public setRotation(deg) {\n this.init();\n this.path.attr('d', this.describeArc(this.cx, this.cy, this.r, 0, deg));\n }\n\n // animate the path to rotate continuously with some interval\n public start() {\n this.init();\n const self = this,\n totalTime = (this.options as any).time || 1800,\n degreesToTraverse = 10;\n let i = 0;\n this.container.addClass('spin');\n this.intervalId = setInterval(() => {\n let deg;\n i = i + degreesToTraverse;\n if (i > 720) {\n deg = i = 0;\n } else if (i > 360) {\n deg = 720 - i;\n } else {\n deg = i;\n }\n self.path.attr('d', this.describeArc(self.cx, self.cy, self.r, 0, deg));\n }, (totalTime * degreesToTraverse / 360));\n }\n\n // Removes the animation by clearing the intervals\n public stop() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n this.intervalId = 0;\n }\n this.container.removeClass('spin');\n }\n}\n\n// iOS spinner implementation\nclass IOSSpinner implements Spinner {\n private svg: any;\n private intervalId: any;\n\n constructor(private $el) {}\n\n // create the iOS spinner using svg\n private init() {\n if (this.svg) {\n return;\n }\n const container = $('<div class=\"ios-spinner\"><svg></svg></div>');\n const svg = container.find('svg');\n this.$el.append(container);\n const d = container.width();\n for (let i = 0; i < 12; i++) {\n svg[0].innerHTML += `<line y1=\"${0.15 * d}\" y2=\"${0.3 * d}\"\n transform=\"translate(${0.5 * d}, ${0.5 * d}) rotate(${i * 30})\">\n </line>`;\n }\n container.append(svg);\n this.svg = svg;\n }\n\n // Sets the svg to rotate depending on \"d\" value\n public setRotation(d: number): void {\n this.init();\n this.svg.css('transform', `rotateZ( ${Math.round(d / 30) * 30}deg)`);\n }\n\n // Triggers the rotation with some interval\n public start() {\n this.init();\n let i = 0;\n this.intervalId = setInterval(() => {\n i += 10;\n this.setRotation(i);\n }, 20);\n }\n\n // Removes the animation by clearing the intervals\n public stop() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n this.intervalId = 0;\n }\n }\n}\n","import { isMobile, setCSS } from '@wm/core';\n\ndeclare const $;\n\nenum CLASS_NAME {\n LEFT_PANEL = 'page-left-panel',\n RIGHT_PANEL = 'page-right-panel',\n SWIPE_ELEM = 'page-left-panel-icon',\n CONTENT = 'app-content-column',\n HEADER = 'page-header',\n SEARCH = 'app-search'\n}\n\n/**\n * method returns jquery class selector for given roleName\n * @param roleName\n * @returns {string}\n */\nconst roleSelector = (roleName: string) => `[data-role='${roleName}']`;\nconst pageSelector = roleSelector(\"pageContainer\");\n/*setup touch event handler*/\nconst bindTapEvtHandler = (selector, handler) => {\n /*\n * In Iphone safari browser, tap event of HammerJs is breaking\n * functionalities of other controls like input[type=\"range\"].\n * So, replaced the hammer Js handler with click event handler.\n */\n if (typeof (selector) === 'string') {\n selector = document.querySelector(selector);\n }\n if (!selector) {\n return;\n }\n // Add js event listeners as the event handlers has to be invoked in angular zone.\n selector.removeEventListener('click', handler);\n selector.addEventListener('click', handler);\n};\n\n/**\n * hide the mobile toolbar actions\n */\nconst hidePageContainers = (leftNavEle: HTMLElement, searchEle?: HTMLElement) => {\n if (isMobile()) {\n if (leftNavEle) {\n try {\n (leftNavEle as any).widget.collapse();\n } catch (e) {\n //\n }\n }\n if (searchEle) {\n setCSS(searchEle, 'display', 'none');\n }\n }\n};\n\n/**\n * binds the touch event for content\n */\nconst bindContentEvents = (leftNavEle: HTMLElement, pageContainer: HTMLElement, searchContainer: any, isTablet = false) => {\n if (!isTablet) {\n // touch content to hide nav pane and left panel\n bindTapEvtHandler(pageContainer, hidePageContainers.bind(this, leftNavEle, searchContainer));\n }\n};\n\nconst bindLeftPanelEvents = (leftNavEle: HTMLElement, searchEle: HTMLElement) => {\n // tap left to show/hide left panel\n bindTapEvtHandler(roleSelector(CLASS_NAME.SWIPE_ELEM), () => {\n if (leftNavEle) {\n (leftNavEle as any).widget.toggle();\n\n // Hide search container when left panel is open\n if (leftNavEle.classList.contains('visible')) {\n if (searchEle) {\n setCSS(searchEle, 'display', 'none');\n }\n }\n }\n });\n};\n\n/**\n * binds the touch event for content\n */\nconst bindRightPanelEvents = (rightNavEle: HTMLElement) => {\n bindTapEvtHandler(rightNavEle, hidePageContainers);\n};\n\n\n/**\n * toggles the search container\n */\nconst toggleSearchContainer = (searchEle: HTMLElement, leftNavEle: HTMLElement) => {\n if ($(searchEle).css('display') === 'none') {\n hidePageContainers(leftNavEle);\n setCSS(searchEle, 'display', 'inline-table');\n } else {\n hidePageContainers(leftNavEle, searchEle);\n }\n};\n\n/**\n * Bind event with Search icon in header\n */\nconst bindSearchIconEvent = (searchElements, leftNavEle: HTMLElement) => {\n\n $(searchElements).each((index, ele: HTMLElement) => {\n const searchEle = $('<a class=\"app-header-action\"><i class=\"wi wi-search\"></i></a>') as JQuery<HTMLElement>;\n $(ele).before(searchEle);\n // Tap icon to show/hide search box\n bindTapEvtHandler(searchEle, () => toggleSearchContainer(ele, leftNavEle));\n });\n\n};\n\nexport const updateDeviceView = (element: HTMLElement, isTablet = false) => {\n\n const leftNavEle = element.querySelector(roleSelector(CLASS_NAME.LEFT_PANEL)) as HTMLElement;\n const rightNavEle = element.querySelector(roleSelector(CLASS_NAME.RIGHT_PANEL)) as HTMLElement;\n const headerEle = element.querySelector(roleSelector(CLASS_NAME.HEADER)) as HTMLElement;\n const searchEle = headerEle && headerEle.querySelector(`.${CLASS_NAME.SEARCH}`) as HTMLElement;\n const pageEle = element.querySelector(`.${CLASS_NAME.CONTENT}`) as HTMLElement;\n\n bindContentEvents(leftNavEle, pageEle, searchEle, isTablet);\n\n if (leftNavEle) {\n bindLeftPanelEvents(leftNavEle, searchEle);\n } else {\n // remove the icon\n $(headerEle).find(roleSelector(CLASS_NAME.SWIPE_ELEM)).remove();\n }\n\n if (rightNavEle) {\n bindRightPanelEvents(rightNavEle);\n }\n\n if (searchEle) {\n bindSearchIconEvent(searchEle, leftNavEle);\n }\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["register","registerProps","isObject","DEFAULT_CLS","WIDGET_CONFIG","noop","debounce","i1","i2","filter","orderBy","_orderBy","keys","_keys","this"],"mappings":";;;;;;;;;;;;;;;;;MAIa,YAAY,GAAG,IAAI,cAAc,CAAgB,cAAc,EAAE;MAexD,SAAS,CAAA;AAAG,CAAA;MAEZ,SAAS,CAAA;AAE9B,CAAA;MAEY,OAAO,GAAG,IAAI,cAAc,CAAC,4BAA4B;;ACNtE,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,cAAc,CAAC,MAAM,EAAE,cAAc,CAAC,WAAW,EAAE,cAAc,CAAC,QAAQ;IACvG,cAAc,CAAC,MAAM,EAAE,cAAc,CAAC,YAAY,EAAE,cAAc,CAAC,KAAK,EAAE,cAAc,CAAC,SAAS,EA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