{"version":3,"sources":["Themes/Default/Content/ts/Shared/BootstrapAlerts/AlertValidation/alert-validation.ts"],"names":[],"mappings":";;;IAWA;QAKI,yBAAY,MAAwB;YAEhC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;YAG1B,IAAI,CAAC,eAAe,EAAE,CAAC;QAC3B,CAAC;QAEO,yCAAe,GAAvB;YAAA,iBAIC;YAHG,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC,YAAY,CAAC;gBACpC,OAAO,KAAI,CAAC,KAAK,CAAC,UAAU,IAAI,KAAI,CAAC,KAAK,CAAC,UAAU,EAAE,IAAI,CAAC,KAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;YACrF,CAAC,CAAC,CAAC;QACP,CAAC;QAAA,CAAC;QACN,sBAAC;IAAD,CAlBA,AAkBC,IAAA;;IAED,IAAM,aAAa,GAAG,kBAAkB,CAAC;IACzC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACxC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,aAAa,EAAE;QAClC,SAAS,EAAE,eAAe;QAC1B,QAAQ,EAAE,EAAE,OAAO,EAAE,iFAA0E,aAAa,UAAO,EAAE;KACxH,CAAC,CAAC;IACH,IAAM,iCAAiC,GAAG,wBAAwB,CAAC;IACnE,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,iCAAiC,CAAC,CAAC;IAC5D,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,iCAAiC,EAAE;QACtD,SAAS,EAAE,eAAe;QAC1B,QAAQ,EAAE,EAAE,OAAO,EAAE,iFAA0E,iCAAiC,UAAO,EAAE;KAC5I,CAAC,CAAC","file":"alert-validation.js","sourcesContent":["import * as ko from \"knockout\";\r\nimport * as _ from \"underscore\";\r\n\r\n// Helpers\r\nimport \"knockout.validation\";\r\nimport \"knockoutCustomBindings\";\r\n\r\nexport interface IAlertValidation {\r\n Value: KnockoutObservable | KnockoutObservableArray; // Required Property\r\n}\r\n\r\nexport default class AlertValidation {\r\n value: KnockoutObservable | KnockoutObservableArray;\r\n\r\n displayContainer: KnockoutComputed;\r\n\r\n constructor(params: IAlertValidation) {\r\n // Provided Component Properties\r\n this.value = params.Value;\r\n\r\n // Initialisation Methods\r\n this.computedMethods();\r\n }\r\n\r\n private computedMethods(): void {\r\n this.displayContainer = ko.pureComputed(() => {\r\n return this.value.isModified && this.value.isModified() && !this.value.isValid();\r\n });\r\n };\r\n}\r\n\r\nconst componentName = \"alert-validation\";\r\nko.components.unregister(componentName);\r\nko.components.register(componentName, {\r\n viewModel: AlertValidation,\r\n template: { require: `text!/Themes/Default/Content/ts/Shared/BootstrapAlerts/AlertValidation/${componentName}.html` }\r\n});\r\nconst basicAlertValidationComponentName = \"basic-alert-validation\";\r\nko.components.unregister(basicAlertValidationComponentName);\r\nko.components.register(basicAlertValidationComponentName, {\r\n viewModel: AlertValidation,\r\n template: { require: `text!/Themes/Default/Content/ts/Shared/BootstrapAlerts/AlertValidation/${basicAlertValidationComponentName}.html` }\r\n});"]}