mis-crystal-design-system 2.2.2 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/mis-crystal-design-system-datepicker_v2.umd.js +643 -0
- package/bundles/mis-crystal-design-system-datepicker_v2.umd.js.map +1 -0
- package/bundles/mis-crystal-design-system-datepicker_v2.umd.min.js +16 -0
- package/bundles/mis-crystal-design-system-datepicker_v2.umd.min.js.map +1 -0
- package/bundles/mis-crystal-design-system-dropdown.umd.js +2 -2
- package/bundles/mis-crystal-design-system-dropdown.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-dropdown.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-dropdown.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.js +9 -2
- package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-table.umd.js +4 -3
- package/bundles/mis-crystal-design-system-table.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-table.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-table.umd.min.js.map +1 -1
- package/datepicker_v2/datepicker-constants.d.ts +4 -0
- package/datepicker_v2/datepicker.module.d.ts +2 -0
- package/datepicker_v2/index.d.ts +1 -0
- package/datepicker_v2/mis-crystal-design-system-datepicker_v2.d.ts +7 -0
- package/datepicker_v2/mis-crystal-design-system-datepicker_v2.metadata.json +1 -0
- package/datepicker_v2/models/dp-config.model.d.ts +30 -0
- package/datepicker_v2/package.json +11 -0
- package/datepicker_v2/public_api.d.ts +3 -0
- package/datepicker_v2/tz-datepicker.directive.d.ts +26 -0
- package/datepicker_v2/tz-dp-container/tz-dp-container.component.d.ts +23 -0
- package/datepicker_v2/utils/index.d.ts +2 -0
- package/dropdown/dropdown.component.d.ts +1 -0
- package/dropdown/mis-crystal-design-system-dropdown.metadata.json +1 -1
- package/esm2015/datepicker/sub-components/tooltip/tooltip.config.js +2 -3
- package/esm2015/datepicker_v2/datepicker-constants.js +5 -0
- package/esm2015/datepicker_v2/datepicker.module.js +16 -0
- package/esm2015/datepicker_v2/index.js +2 -0
- package/esm2015/datepicker_v2/mis-crystal-design-system-datepicker_v2.js +7 -0
- package/esm2015/datepicker_v2/models/dp-config.model.js +2 -0
- package/esm2015/datepicker_v2/public_api.js +3 -0
- package/esm2015/datepicker_v2/tz-datepicker.directive.js +107 -0
- package/esm2015/datepicker_v2/tz-dp-container/tz-dp-container.component.js +123 -0
- package/esm2015/datepicker_v2/utils/index.js +45 -0
- package/esm2015/dropdown/dropdown.component.js +3 -3
- package/esm2015/multi-select-dropdown/multi-select-dropdown.component.js +10 -3
- package/esm2015/table/filter/filter.component.js +1 -1
- package/esm2015/table/table.component.js +4 -3
- package/fesm2015/mis-crystal-design-system-datepicker_v2.js +293 -0
- package/fesm2015/mis-crystal-design-system-datepicker_v2.js.map +1 -0
- package/fesm2015/mis-crystal-design-system-dropdown.js +2 -2
- package/fesm2015/mis-crystal-design-system-dropdown.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-multi-select-dropdown.js +9 -2
- package/fesm2015/mis-crystal-design-system-multi-select-dropdown.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-table.js +4 -3
- package/fesm2015/mis-crystal-design-system-table.js.map +1 -1
- package/multi-select-dropdown/mis-crystal-design-system-multi-select-dropdown.metadata.json +1 -1
- package/multi-select-dropdown/multi-select-dropdown.component.d.ts +1 -0
- package/package.json +1 -1
- package/table/mis-crystal-design-system-table.metadata.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mis-crystal-design-system-datepicker_v2.umd.js","sources":["../../../node_modules/tslib/tslib.es6.js","../../../projects/mis-components/datepicker_v2/datepicker-constants.ts","../../../projects/mis-components/datepicker_v2/utils/index.ts","../../../projects/mis-components/datepicker_v2/tz-dp-container/tz-dp-container.component.ts","../../../projects/mis-components/datepicker_v2/tz-datepicker.directive.ts","../../../projects/mis-components/datepicker_v2/datepicker.module.ts","../../../projects/mis-components/datepicker_v2/mis-crystal-design-system-datepicker_v2.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","/** @format */\n\nimport { InjectionToken } from \"@angular/core\";\n\nexport const CONTAINER_DATA = new InjectionToken<{}>('CONTAINER_DATA');\nexport const DATE_FORMAT = \"DD-MM-YYYY\";","import { ICurrentMonth } from \"../models/dp-config.model\";\n\nexport const getMonth = (index: number): ICurrentMonth => {\n let month;\n switch (index) {\n case 0:\n month = 'January'\n break;\n case 1:\n month = 'February'\n break;\n case 2:\n month = 'March'\n break;\n case 3:\n month = 'April'\n break;\n case 4:\n month = 'May'\n break;\n case 5:\n month = 'June'\n break;\n case 6:\n month = 'July'\n break;\n case 7:\n month = 'August'\n break;\n case 8:\n month = 'September'\n break;\n case 9:\n month = 'October'\n break;\n case 10:\n month = 'November'\n break;\n case 11:\n month = 'December'\n break;\n default:\n break;\n }\n return month;\n}","import { Component, Inject, OnInit } from \"@angular/core\";\nimport { CONTAINER_DATA, DATE_FORMAT } from \"../datepicker-constants\";\nimport { ICurrentMonth, ICurrentMonthDates, IDatePickerData, IWeekDay } from \"../models/dp-config.model\";\nimport { parseZone, Moment } from 'moment-timezone';\nimport { getMonth } from \"../utils\";\nimport { ToastService } from 'mis-crystal-design-system/toast'\n\n@Component({\n selector: \"mis-tz-dp\",\n templateUrl: \"./tz-dp-container.component.html\",\n styleUrls: [\"./tz-dp-container.component.scss\"],\n})\nexport class TzDpContainerComponent implements OnInit {\n data: IDatePickerData;\n private parseZoneInstance = (...args) => {\n return parseZone(...args);\n };\n private rawWeekDays: string[] = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']\n weekDays: IWeekDay[] = [];\n currentMonthNumber: number = this.parseZoneInstance().month();\n currentMonth: ICurrentMonth = getMonth(this.currentMonthNumber);\n currentYearNumber: number = this.parseZoneInstance().year();\n currentMonthDates: ICurrentMonthDates[] = [];\n isPreviousMonthDisabled: boolean = false;\n isNextMonthDisabled: boolean = false;\n\n constructor(@Inject(CONTAINER_DATA) data: IDatePickerData, private toast: ToastService) {\n this.data = data;\n if (this.data?.dpConfig?.timezone) {\n this.parseZoneInstance = (...args) => {\n return parseZone(...args).tz(this.data.dpConfig.timezone);\n }\n }\n this.weekDays = this.rawWeekDays.map((day, index) => ({\n label: `${day[0]}${day.slice(1).toLowerCase()}`,\n isCurrentDay: this.parseZoneInstance().day() === index,\n }));\n if (!this.data?.dpConfig?.format) {\n this.data.dpConfig = {\n ...this.data.dpConfig,\n format: DATE_FORMAT,\n };\n }\n }\n\n ngOnInit(): void {\n this.currentDateInstance();\n this.calculateMinMaxDays();\n }\n\n private currentDateInstance(): void {\n const selectedDate = this.parseZoneInstance(this.data.date, this.data.dpConfig.format);\n if (selectedDate.isValid()) {\n this.currentYearNumber = selectedDate.year();\n this.currentMonthNumber = selectedDate.month();\n this.currentMonth = getMonth(this.currentMonthNumber);\n }\n this.currentMonthDates = this.generateDates(this.currentMonthNumber, this.currentYearNumber);\n }\n\n private calculateMinMaxDays() {\n const currentInstance = this.parseZoneInstance().year(this.currentYearNumber).month(this.currentMonthNumber);\n const minDate = this.parseZoneInstance(this.data.dpConfig.minDate, this.data.dpConfig.format);\n if (minDate.isValid()) {\n this.isPreviousMonthDisabled = minDate.isSameOrAfter(currentInstance, 'month');\n }\n const maxDate = this.parseZoneInstance(this.data.dpConfig.maxDate, this.data.dpConfig.format);\n if (maxDate.isValid()) {\n this.isNextMonthDisabled = maxDate.isSameOrBefore(currentInstance, 'month');\n }\n }\n\n navigateMonth(direction: \"NEXT\" | \"PREVIOUS\"): void {\n let thisMonth: Moment = this.parseZoneInstance().year(this.currentYearNumber).month(this.currentMonthNumber);\n if (direction === \"NEXT\") {\n thisMonth = thisMonth.add(1, 'month');\n } else if (direction === \"PREVIOUS\") {\n thisMonth = thisMonth.subtract(1, 'month');\n }\n this.currentMonthNumber = thisMonth.month();\n this.currentMonth = getMonth(this.currentMonthNumber);\n this.currentYearNumber = thisMonth.year();\n this.currentMonthDates = this.generateDates(this.currentMonthNumber, this.currentYearNumber);\n this.calculateMinMaxDays();\n }\n\n private generateDates(month: number, currentYearNumber: number): ICurrentMonthDates[] {\n let dates: ICurrentMonthDates[] = [];\n const thisMonth = this.parseZoneInstance().year(currentYearNumber).month(month);\n for (let startDate = 1; startDate <= thisMonth.endOf('month').date(); startDate++) {\n let isDisabledDay = this.data.datesDisabled.some(d => d === thisMonth.date(startDate).format(this.data.dpConfig.format));\n const minDate = this.parseZoneInstance(this.data.dpConfig.minDate, this.data.dpConfig.format);\n if (!isDisabledDay && minDate.isValid()) {\n isDisabledDay = minDate.isAfter(thisMonth.date(startDate), 'day');\n }\n const maxDate = this.parseZoneInstance(this.data.dpConfig.maxDate, this.data.dpConfig.format);\n if (!isDisabledDay && maxDate.isValid()) {\n isDisabledDay = maxDate.isBefore(thisMonth.date(startDate), 'day');\n }\n dates.push({\n date: startDate,\n weekDay: thisMonth.date(startDate).day(),\n isCurrentDay: thisMonth.date(startDate).isSame(this.parseZoneInstance(), 'day'),\n isSelectedDay: thisMonth.date(startDate).isSame(this.parseZoneInstance(this.data.date, this.data.dpConfig.format), 'day'),\n toastMessage: this.data.messages.find(q => thisMonth.date(startDate).isSame(this.parseZoneInstance(q.date, this.data.dpConfig.format), 'day'))?.message || '',\n isDisabledDay,\n });\n }\n for (let i = dates[0].weekDay; i > 0; i--) {\n dates.unshift({ date: 0, weekDay: i - 1 });\n }\n return dates;\n }\n\n selectDay(day: ICurrentMonthDates) {\n if (day.date <= 0) return;\n if (!day.isDisabledDay) {\n this.data.dateChange(this.parseZoneInstance().year(this.currentYearNumber).month(this.currentMonthNumber).date(day.date).format(this.data.dpConfig.format));\n }\n if (day.toastMessage) {\n this.toast.displayMsg(day.toastMessage, 4000);\n }\n }\n\n}\n","import { ConnectionPositionPair, Overlay, OverlayConfig, OverlayRef } from \"@angular/cdk/overlay\";\nimport { ComponentPortal } from \"@angular/cdk/portal\";\nimport { Directive, ElementRef, EventEmitter, HostListener, Injector, Input, Optional, Output, Self, ViewContainerRef } from \"@angular/core\";\nimport { NgControl } from \"@angular/forms\";\nimport { take } from \"rxjs/operators\";\nimport { CONTAINER_DATA, DATE_FORMAT } from \"./datepicker-constants\";\nimport { IDatePickerConfig, IDatePickerToastText } from \"./models/dp-config.model\";\nimport { TzDpContainerComponent } from './tz-dp-container/tz-dp-container.component';\n\n@Directive({\n selector: \"input[misTzDp]\",\n})\nexport class TzDatepickerDirective {\n @Input() dpConfig: Partial<IDatePickerConfig> = {\n format: DATE_FORMAT,\n minDate: \"\",\n maxDate: \"\"\n };\n // dd-mm-yyyy 01-12-2022\n @Input() set selectedDate(date: string) {\n this.date = date;\n }\n @Input() set datesDisabled(dates: string[]) {\n this.dpDisabledDates = dates;\n }\n @Input() dateMessages: IDatePickerToastText[] = [];\n @Input() positionX: \"start\" | \"end\" = \"start\";\n @Input() positionY: \"top\" | \"bottom\" = \"bottom\";\n private overlayRef: OverlayRef;\n @Output() dateChange = new EventEmitter<string>(true);\n private isOpen = false;\n date: string;\n\n private dpDisabledDates: string[] = [];\n\n constructor(@Self() @Optional() private control: NgControl, private element: ElementRef, private overlay: Overlay, private viewContainerRef: ViewContainerRef) { }\n\n @HostListener(\"click\", [\"$event\"])\n toggleDatePicker() {\n if (this.isOpen) {\n this.close();\n } else {\n this.open();\n }\n }\n\n private open() {\n this.isOpen = true;\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.element)\n .withPositions([\n new ConnectionPositionPair(\n { originX: this.positionX, originY: this.positionY },\n { overlayX: this.positionX, overlayY: this.positionY === \"bottom\" ? \"top\" : \"bottom\" },\n ),\n new ConnectionPositionPair(\n { originX: \"start\", originY: \"bottom\" },\n { overlayX: \"start\", overlayY: \"top\" },\n ),\n new ConnectionPositionPair(\n { originX: \"end\", originY: \"top\" },\n { overlayX: \"end\", overlayY: \"bottom\" },\n ),\n ])\n .withPush(true);\n const config = new OverlayConfig({\n hasBackdrop: true,\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n backdropClass: \"cdk-overlay-transparent-backdrop\",\n });\n this.overlayRef = this.overlay.create(config);\n const tempRef = new ComponentPortal(TzDpContainerComponent, this.viewContainerRef, Injector.create({\n providers: [\n { provide: CONTAINER_DATA, useValue: { messages: this.dateMessages, date: this.date || this.control?.control.value, dpConfig: this.dpConfig, datesDisabled: this.dpDisabledDates, dateChange: this.applyDate.bind(this) } },\n ]\n }));\n this.overlayRef.attach(tempRef);\n this.overlayRef\n .backdropClick()\n .pipe(take(1))\n .subscribe(() => {\n this.close();\n });\n }\n\n applyDate(date: string) {\n this.dateChange.emit(date);\n this.control?.control.patchValue(date);\n this.date = date;\n this.close();\n }\n\n private close() {\n this.isOpen = false;\n this.overlayRef.detach();\n this.overlayRef.dispose();\n }\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { TzDpContainerComponent } from \"./tz-dp-container/tz-dp-container.component\";\nimport { TzDatepickerDirective } from \"./tz-datepicker.directive\";\nimport { ToastModule } from 'mis-crystal-design-system/toast';\n@NgModule({\n declarations: [TzDpContainerComponent, TzDatepickerDirective],\n imports: [CommonModule, ToastModule.forRoot()],\n exports: [TzDpContainerComponent, TzDatepickerDirective],\n entryComponents: [TzDpContainerComponent]\n})\nexport class DatepickerModuleV2 {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {CONTAINER_DATA as ɵc} from './datepicker-constants';\nexport {IDatePickerData as ɵa} from './models/dp-config.model';\nexport {TzDpContainerComponent as ɵb} from './tz-dp-container/tz-dp-container.component';"],"names":["InjectionToken","parseZone","Component","Inject","ToastService","EventEmitter","ConnectionPositionPair","OverlayConfig","ComponentPortal","Injector","take","Directive","NgControl","Self","Optional","ElementRef","Overlay","ViewContainerRef","Input","Output","HostListener","NgModule","CommonModule","ToastModule"],"mappings":";;;;;;IAAA;;;;;;;;;;;;;;IAcA;IAEA,IAAI,aAAa,GAAG,UAAS,CAAC,EAAE,CAAC;QAC7B,aAAa,GAAG,MAAM,CAAC,cAAc;aAChC,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;YAC5E,UAAU,CAAC,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC;gBAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;oBAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACtG,OAAO,aAAa,CAAC,CAAC,E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BACxD,eAAe,EAAE,CAAC,sBAAsB,CAAC;iBAC1C;;;ICVD;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("moment-timezone"),require("mis-crystal-design-system/toast"),require("@angular/cdk/overlay"),require("@angular/cdk/portal"),require("@angular/forms"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("mis-crystal-design-system/datepicker_v2",["exports","@angular/core","@angular/common","moment-timezone","mis-crystal-design-system/toast","@angular/cdk/overlay","@angular/cdk/portal","@angular/forms","rxjs/operators"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self)["mis-crystal-design-system"]=e["mis-crystal-design-system"]||{},e["mis-crystal-design-system"].datepicker_v2={}),e.ng.core,e.ng.common,e.momentTimezone,e["mis-crystal-design-system"].toast,e.ng.cdk.overlay,e.ng.cdk.portal,e.ng.forms,e.rxjs.operators)}(this,(function(e,t,a,n,r,i,o,s,d){"use strict";
|
|
2
|
+
/*! *****************************************************************************
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
+
***************************************************************************** */Object.create;function c(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o}function p(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(c(arguments[t]));return e}Object.create;var l=new t.InjectionToken("CONTAINER_DATA"),h="DD-MM-YYYY",y=function(e){var t;switch(e){case 0:t="January";break;case 1:t="February";break;case 2:t="March";break;case 3:t="April";break;case 4:t="May";break;case 5:t="June";break;case 6:t="July";break;case 7:t="August";break;case 8:t="September";break;case 9:t="October";break;case 10:t="November";break;case 11:t="December"}return t},u=function(){function e(e,t){var a,r,i,o,s=this;this.toast=t,this.parseZoneInstance=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.parseZone.apply(void 0,p(e))},this.rawWeekDays=["SUN","MON","TUE","WED","THU","FRI","SAT"],this.weekDays=[],this.currentMonthNumber=this.parseZoneInstance().month(),this.currentMonth=y(this.currentMonthNumber),this.currentYearNumber=this.parseZoneInstance().year(),this.currentMonthDates=[],this.isPreviousMonthDisabled=!1,this.isNextMonthDisabled=!1,this.data=e,(null===(r=null===(a=this.data)||void 0===a?void 0:a.dpConfig)||void 0===r?void 0:r.timezone)&&(this.parseZoneInstance=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.parseZone.apply(void 0,p(e)).tz(s.data.dpConfig.timezone)}),this.weekDays=this.rawWeekDays.map((function(e,t){return{label:""+e[0]+e.slice(1).toLowerCase(),isCurrentDay:s.parseZoneInstance().day()===t}})),(null===(o=null===(i=this.data)||void 0===i?void 0:i.dpConfig)||void 0===o?void 0:o.format)||(this.data.dpConfig=Object.assign(Object.assign({},this.data.dpConfig),{format:h}))}return e.prototype.ngOnInit=function(){this.currentDateInstance(),this.calculateMinMaxDays()},e.prototype.currentDateInstance=function(){var e=this.parseZoneInstance(this.data.date,this.data.dpConfig.format);e.isValid()&&(this.currentYearNumber=e.year(),this.currentMonthNumber=e.month(),this.currentMonth=y(this.currentMonthNumber)),this.currentMonthDates=this.generateDates(this.currentMonthNumber,this.currentYearNumber)},e.prototype.calculateMinMaxDays=function(){var e=this.parseZoneInstance().year(this.currentYearNumber).month(this.currentMonthNumber),t=this.parseZoneInstance(this.data.dpConfig.minDate,this.data.dpConfig.format);t.isValid()&&(this.isPreviousMonthDisabled=t.isSameOrAfter(e,"month"));var a=this.parseZoneInstance(this.data.dpConfig.maxDate,this.data.dpConfig.format);a.isValid()&&(this.isNextMonthDisabled=a.isSameOrBefore(e,"month"))},e.prototype.navigateMonth=function(e){var t=this.parseZoneInstance().year(this.currentYearNumber).month(this.currentMonthNumber);"NEXT"===e?t=t.add(1,"month"):"PREVIOUS"===e&&(t=t.subtract(1,"month")),this.currentMonthNumber=t.month(),this.currentMonth=y(this.currentMonthNumber),this.currentYearNumber=t.year(),this.currentMonthDates=this.generateDates(this.currentMonthNumber,this.currentYearNumber),this.calculateMinMaxDays()},e.prototype.generateDates=function(e,t){for(var a,n=this,r=[],i=this.parseZoneInstance().year(t).month(e),o=function(e){var t=s.data.datesDisabled.some((function(t){return t===i.date(e).format(n.data.dpConfig.format)})),o=s.parseZoneInstance(s.data.dpConfig.minDate,s.data.dpConfig.format);!t&&o.isValid()&&(t=o.isAfter(i.date(e),"day"));var d=s.parseZoneInstance(s.data.dpConfig.maxDate,s.data.dpConfig.format);!t&&d.isValid()&&(t=d.isBefore(i.date(e),"day")),r.push({date:e,weekDay:i.date(e).day(),isCurrentDay:i.date(e).isSame(s.parseZoneInstance(),"day"),isSelectedDay:i.date(e).isSame(s.parseZoneInstance(s.data.date,s.data.dpConfig.format),"day"),toastMessage:(null===(a=s.data.messages.find((function(t){return i.date(e).isSame(n.parseZoneInstance(t.date,n.data.dpConfig.format),"day")})))||void 0===a?void 0:a.message)||"",isDisabledDay:t})},s=this,d=1;d<=i.endOf("month").date();d++)o(d);for(var c=r[0].weekDay;c>0;c--)r.unshift({date:0,weekDay:c-1});return r},e.prototype.selectDay=function(e){e.date<=0||(e.isDisabledDay||this.data.dateChange(this.parseZoneInstance().year(this.currentYearNumber).month(this.currentMonthNumber).date(e.date).format(this.data.dpConfig.format)),e.toastMessage&&this.toast.displayMsg(e.toastMessage,4e3))},e}();u.decorators=[{type:t.Component,args:[{selector:"mis-tz-dp",template:'<div class="datepicker-container">\n <div class="datepicker-container__header">\n <div\n class="datepicker-container__arrow__icon"\n (click)="!isPreviousMonthDisabled && navigateMonth(\'PREVIOUS\')"\n [ngClass]="{\n \'disabled-month\': isPreviousMonthDisabled\n }"\n >\n <svg\n width="20"\n height="16"\n viewBox="0 0 20 16"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M19.7071 8.70711C20.0976 8.31658 20.0976 7.68342 19.7071 7.29289L13.3431 0.928933C12.9526 0.538409 12.3195 0.538409 11.9289 0.928933C11.5384 1.31946 11.5384 1.95262 11.9289 2.34315L17.5858 8L11.9289 13.6569C11.5384 14.0474 11.5384 14.6805 11.9289 15.0711C12.3195 15.4616 12.9526 15.4616 13.3431 15.0711L19.7071 8.70711ZM-8.74228e-08 9L19 9L19 7L8.74228e-08 7L-8.74228e-08 9Z"\n fill="#181F33"\n ></path>\n </svg>\n </div>\n <span> {{ currentMonth }} {{ currentYearNumber }} </span>\n <div\n class="datepicker-container__arrow__icon"\n (click)="!isNextMonthDisabled && navigateMonth(\'NEXT\')"\n [ngClass]="{\n \'disabled-month\': isNextMonthDisabled\n }"\n >\n <svg\n width="20"\n height="16"\n viewBox="0 0 20 16"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M19.7071 8.70711C20.0976 8.31658 20.0976 7.68342 19.7071 7.29289L13.3431 0.928933C12.9526 0.538409 12.3195 0.538409 11.9289 0.928933C11.5384 1.31946 11.5384 1.95262 11.9289 2.34315L17.5858 8L11.9289 13.6569C11.5384 14.0474 11.5384 14.6805 11.9289 15.0711C12.3195 15.4616 12.9526 15.4616 13.3431 15.0711L19.7071 8.70711ZM-8.74228e-08 9L19 9L19 7L8.74228e-08 7L-8.74228e-08 9Z"\n fill="#181F33"\n ></path>\n </svg>\n </div>\n </div>\n <div class="datepicker-container__body">\n <div class="datepicker-container__weekdays">\n <div\n class="datepicker-container__weekday"\n *ngFor="let weekDay of weekDays"\n >\n <span [ngClass]="{ \'current-day\': weekDay.isCurrentDay }">{{\n weekDay.label\n }}</span>\n </div>\n </div>\n <div class="datepicker-container__days">\n <div\n class="datepicker-container__day"\n [ngClass]="{\n \'selected-day\': day.isSelectedDay,\n \'disabled-day\': day.isDisabledDay,\n \'is-valid-date\': day.date > 0 && !day.isSelectedDay\n }"\n *ngFor="let day of currentMonthDates"\n (click)="selectDay(day)"\n >\n <span\n *ngIf="day.date > 0"\n [ngClass]="{\n \'current-day\': day.isCurrentDay,\n \'selected-day\': day.isSelectedDay,\n \'disabled-day\': day.isDisabledDay\n }"\n >\n {{ day.date }}\n </span>\n </div>\n </div>\n </div>\n</div>\n',styles:[".datepicker-container{background:#fff;border:1px solid #e0e0e0;box-shadow:0 12px 24px rgba(0,0,0,.12),0 4px 8px rgba(0,0,0,.12);border-radius:12px;display:flex;flex-direction:column;padding:16px;font-family:Lato;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.datepicker-container .datepicker-container__header{display:flex;height:32px;justify-content:space-between;align-items:center;width:100%}.datepicker-container .datepicker-container__header span{font-size:16px;font-style:normal;font-weight:700;line-height:24px;letter-spacing:.2px;text-align:center}.datepicker-container .datepicker-container__header .datepicker-container__arrow__icon{height:20px;width:20px;display:flex;align-items:center;justify-content:center;border-radius:4px;padding:4px}.datepicker-container .datepicker-container__header .datepicker-container__arrow__icon.disabled-month{opacity:.5;cursor:not-allowed}.datepicker-container .datepicker-container__header .datepicker-container__arrow__icon:not(.disabled-month):hover{cursor:pointer;background-color:#cbddfb}.datepicker-container .datepicker-container__header .datepicker-container__arrow__icon:first-child{transform:rotate(180deg)}.datepicker-container .datepicker-container__body{height:100%;width:252px}.datepicker-container .datepicker-container__body .datepicker-container__weekdays{width:100%;display:flex;padding-bottom:10px}.datepicker-container .datepicker-container__body .datepicker-container__weekdays .datepicker-container__weekday{width:36px;height:18px;text-align:center}.datepicker-container .datepicker-container__body .datepicker-container__weekdays .datepicker-container__weekday span{font-size:12px;font-style:normal;font-weight:400;line-height:18px;letter-spacing:.2px;text-align:center;color:#6a737d}.datepicker-container .datepicker-container__body .datepicker-container__weekdays .datepicker-container__weekday span.current-day{font-weight:700;letter-spacing:.25px;color:#181f33}.datepicker-container .datepicker-container__body .datepicker-container__days{display:flex;flex-wrap:wrap;gap:2px}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day{width:34px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:4px}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day.selected-day{background-color:#0937b2;cursor:pointer}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day.disabled-day{cursor:default}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day.disabled-day:hover{background-color:transparent}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day.is-valid-date:not(.disabled-day):hover{background-color:#cbddfb;cursor:pointer}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day.is-valid-date:not(.disabled-day):hover span.selected-day{color:#181f33!important}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day span{font-size:14px;font-style:normal;font-weight:400;line-height:20px;letter-spacing:.2px;text-align:center;color:#181f33}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day span.current-day{font-weight:700;letter-spacing:.25px}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day span.selected-day{color:#fff}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day span.disabled-day{color:#6a737d}"]}]}],u.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[l]}]},{type:r.ToastService}]};var f=function(){function e(e,a,n,r){this.control=e,this.element=a,this.overlay=n,this.viewContainerRef=r,this.dpConfig={format:h,minDate:"",maxDate:""},this.dateMessages=[],this.positionX="start",this.positionY="bottom",this.dateChange=new t.EventEmitter(!0),this.isOpen=!1,this.dpDisabledDates=[]}return Object.defineProperty(e.prototype,"selectedDate",{set:function(e){this.date=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"datesDisabled",{set:function(e){this.dpDisabledDates=e},enumerable:!1,configurable:!0}),e.prototype.toggleDatePicker=function(){this.isOpen?this.close():this.open()},e.prototype.open=function(){var e,a=this;this.isOpen=!0;var n=this.overlay.position().flexibleConnectedTo(this.element).withPositions([new i.ConnectionPositionPair({originX:this.positionX,originY:this.positionY},{overlayX:this.positionX,overlayY:"bottom"===this.positionY?"top":"bottom"}),new i.ConnectionPositionPair({originX:"start",originY:"bottom"},{overlayX:"start",overlayY:"top"}),new i.ConnectionPositionPair({originX:"end",originY:"top"},{overlayX:"end",overlayY:"bottom"})]).withPush(!0),r=new i.OverlayConfig({hasBackdrop:!0,positionStrategy:n,scrollStrategy:this.overlay.scrollStrategies.reposition(),backdropClass:"cdk-overlay-transparent-backdrop"});this.overlayRef=this.overlay.create(r);var s=new o.ComponentPortal(u,this.viewContainerRef,t.Injector.create({providers:[{provide:l,useValue:{messages:this.dateMessages,date:this.date||(null===(e=this.control)||void 0===e?void 0:e.control.value),dpConfig:this.dpConfig,datesDisabled:this.dpDisabledDates,dateChange:this.applyDate.bind(this)}}]}));this.overlayRef.attach(s),this.overlayRef.backdropClick().pipe(d.take(1)).subscribe((function(){a.close()}))},e.prototype.applyDate=function(e){var t;this.dateChange.emit(e),null===(t=this.control)||void 0===t||t.control.patchValue(e),this.date=e,this.close()},e.prototype.close=function(){this.isOpen=!1,this.overlayRef.detach(),this.overlayRef.dispose()},e}();f.decorators=[{type:t.Directive,args:[{selector:"input[misTzDp]"}]}],f.ctorParameters=function(){return[{type:s.NgControl,decorators:[{type:t.Self},{type:t.Optional}]},{type:t.ElementRef},{type:i.Overlay},{type:t.ViewContainerRef}]},f.propDecorators={dpConfig:[{type:t.Input}],selectedDate:[{type:t.Input}],datesDisabled:[{type:t.Input}],dateMessages:[{type:t.Input}],positionX:[{type:t.Input}],positionY:[{type:t.Input}],dateChange:[{type:t.Output}],toggleDatePicker:[{type:t.HostListener,args:["click",["$event"]]}]};var g=function(){};g.decorators=[{type:t.NgModule,args:[{declarations:[u,f],imports:[a.CommonModule,r.ToastModule.forRoot()],exports:[u,f],entryComponents:[u]}]}],e.DatepickerModuleV2=g,e.TzDatepickerDirective=f,e.ɵb=u,e.ɵc=l,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
16
|
+
//# sourceMappingURL=mis-crystal-design-system-datepicker_v2.umd.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/tslib/tslib.es6.js","../../../projects/mis-components/datepicker_v2/datepicker-constants.ts","../../../projects/mis-components/datepicker_v2/utils/index.ts","../../../projects/mis-components/datepicker_v2/tz-dp-container/tz-dp-container.component.ts","../../../projects/mis-components/datepicker_v2/tz-datepicker.directive.ts","../../../projects/mis-components/datepicker_v2/datepicker.module.ts"],"names":["Object","create","__read","o","n","m","Symbol","iterator","r","e","i","call","ar","next","done","push","value","error","__spread","arguments","length","concat","CONTAINER_DATA","InjectionToken","DATE_FORMAT","getMonth","index","month","TzDpContainerComponent","data","toast","_this","this","parseZoneInstance","args","_i","parseZone","apply","rawWeekDays","weekDays","currentMonthNumber","currentMonth","currentYearNumber","year","currentMonthDates","isPreviousMonthDisabled","isNextMonthDisabled","_b","_a","dpConfig","timezone","tz","map","day","label","slice","toLowerCase","isCurrentDay","_d","_c","format","assign","prototype","ngOnInit","currentDateInstance","calculateMinMaxDays","selectedDate","date","isValid","generateDates","currentInstance","minDate","isSameOrAfter","maxDate","isSameOrBefore","navigateMonth","direction","thisMonth","add","subtract","dates","startDate","isDisabledDay","this_1","datesDisabled","some","d","isAfter","isBefore","weekDay","isSame","isSelectedDay","toastMessage","messages","find","q","message","endOf","unshift","selectDay","dateChange","displayMsg","Component","selector","template","Inject","ToastService","TzDatepickerDirective","control","element","overlay","viewContainerRef","dateMessages","positionX","positionY","EventEmitter","isOpen","dpDisabledDates","defineProperty","toggleDatePicker","close","open","positionStrategy","position","flexibleConnectedTo","withPositions","ConnectionPositionPair","originX","originY","overlayX","overlayY","withPush","config","OverlayConfig","hasBackdrop","scrollStrategy","scrollStrategies","reposition","backdropClass","overlayRef","tempRef","ComponentPortal","Injector","providers","provide","useValue","applyDate","bind","attach","backdropClick","pipe","take","subscribe","emit","patchValue","detach","dispose","Directive","NgControl","decorators","type","Self","Optional","ElementRef","Overlay","ViewContainerRef","Input","Output","HostListener","NgModule","declarations","imports","CommonModule","ToastModule","forRoot","exports","entryComponents"],"mappings":";;;;;;;;;;;;;;oFA2G6BA,OAAOC,gBAwBpBC,EAAOC,EAAGC,GACtB,IAAIC,EAAsB,mBAAXC,QAAyBH,EAAEG,OAAOC,UACjD,IAAKF,EAAG,OAAOF,EACf,IAAmBK,EAAYC,EAA3BC,EAAIL,EAAEM,KAAKR,GAAOS,EAAK,GAC3B,IACI,WAAc,IAANR,GAAgBA,KAAM,MAAQI,EAAIE,EAAEG,QAAQC,MAAMF,EAAGG,KAAKP,EAAEQ,OAExE,MAAOC,GAASR,EAAI,CAAEQ,MAAOA,WAEzB,IACQT,IAAMA,EAAEM,OAAST,EAAIK,EAAU,SAAIL,EAAEM,KAAKD,WAExC,GAAID,EAAG,MAAMA,EAAEQ,OAE7B,OAAOL,WAIKM,IACZ,IAAK,IAAIN,EAAK,GAAIF,EAAI,EAAGA,EAAIS,UAAUC,OAAQV,IAC3CE,EAAKA,EAAGS,OAAOnB,EAAOiB,UAAUT,KACpC,OAAOE,EAyDcZ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hBnB,EAAIhB,KAAK4E,eAAO,IAAA5D,OAAA,EAAAA,EAAE4D,QAAQ5F,OAAOiC,SAAUjB,KAAKiB,SAAUmC,cAAepD,KAAKqF,gBAAiBjB,WAAYpE,KAAKkH,UAAUC,KAAKnH,YAGtNA,KAAK2G,WAAWS,OAAOR,GACvB5G,KAAK2G,WACFU,gBACAC,KAAKC,EAAAA,KAAK,IACVC,WAAU,WACTzH,EAAKyF,YAIXb,EAAA7C,UAAAoF,UAAA,SAAU/E,SACRnC,KAAKoE,WAAWqD,KAAKtF,GACT,QAAZnB,EAAAhB,KAAK4E,eAAO,IAAA5D,GAAAA,EAAE4D,QAAQ8C,WAAWvF,GACjCnC,KAAKmC,KAAOA,EACZnC,KAAKwF,SAGCb,EAAA7C,UAAA0D,MAAA,WACNxF,KAAKoF,QAAS,EACdpF,KAAK2G,WAAWgB,SAChB3H,KAAK2G,WAAWiB,oCAxFnBC,EAAAA,UAAS3H,KAAA,CAAC,CACTqE,SAAU,8DAPHuD,EAAAA,UAASC,WAAA,CAAA,CAAAC,KAgCHC,EAAAA,MAAI,CAAAD,KAAIE,EAAAA,kBAjCHC,EAAAA,kBAFaC,EAAAA,eAEoEC,EAAAA,sDAWlGC,EAAAA,4BAMAA,EAAAA,6BAGAA,EAAAA,4BAGAA,EAAAA,yBACAA,EAAAA,yBACAA,EAAAA,0BAEAC,EAAAA,iCAQAC,EAAAA,aAAYtI,KAAA,CAAC,QAAS,CAAC,oBC1B1B,iCANCuI,EAAAA,SAAQvI,KAAA,CAAC,CACRwI,aAAc,CAAC9I,EAAwB+E,GACvCgE,QAAS,CAACC,EAAAA,aAAcC,EAAAA,YAAYC,WACpCC,QAAS,CAACnJ,EAAwB+E,GAClCqE,gBAAiB,CAACpJ","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","/** @format */\n\nimport { InjectionToken } from \"@angular/core\";\n\nexport const CONTAINER_DATA = new InjectionToken<{}>('CONTAINER_DATA');\nexport const DATE_FORMAT = \"DD-MM-YYYY\";","import { ICurrentMonth } from \"../models/dp-config.model\";\n\nexport const getMonth = (index: number): ICurrentMonth => {\n let month;\n switch (index) {\n case 0:\n month = 'January'\n break;\n case 1:\n month = 'February'\n break;\n case 2:\n month = 'March'\n break;\n case 3:\n month = 'April'\n break;\n case 4:\n month = 'May'\n break;\n case 5:\n month = 'June'\n break;\n case 6:\n month = 'July'\n break;\n case 7:\n month = 'August'\n break;\n case 8:\n month = 'September'\n break;\n case 9:\n month = 'October'\n break;\n case 10:\n month = 'November'\n break;\n case 11:\n month = 'December'\n break;\n default:\n break;\n }\n return month;\n}","import { Component, Inject, OnInit } from \"@angular/core\";\nimport { CONTAINER_DATA, DATE_FORMAT } from \"../datepicker-constants\";\nimport { ICurrentMonth, ICurrentMonthDates, IDatePickerData, IWeekDay } from \"../models/dp-config.model\";\nimport { parseZone, Moment } from 'moment-timezone';\nimport { getMonth } from \"../utils\";\nimport { ToastService } from 'mis-crystal-design-system/toast'\n\n@Component({\n selector: \"mis-tz-dp\",\n templateUrl: \"./tz-dp-container.component.html\",\n styleUrls: [\"./tz-dp-container.component.scss\"],\n})\nexport class TzDpContainerComponent implements OnInit {\n data: IDatePickerData;\n private parseZoneInstance = (...args) => {\n return parseZone(...args);\n };\n private rawWeekDays: string[] = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']\n weekDays: IWeekDay[] = [];\n currentMonthNumber: number = this.parseZoneInstance().month();\n currentMonth: ICurrentMonth = getMonth(this.currentMonthNumber);\n currentYearNumber: number = this.parseZoneInstance().year();\n currentMonthDates: ICurrentMonthDates[] = [];\n isPreviousMonthDisabled: boolean = false;\n isNextMonthDisabled: boolean = false;\n\n constructor(@Inject(CONTAINER_DATA) data: IDatePickerData, private toast: ToastService) {\n this.data = data;\n if (this.data?.dpConfig?.timezone) {\n this.parseZoneInstance = (...args) => {\n return parseZone(...args).tz(this.data.dpConfig.timezone);\n }\n }\n this.weekDays = this.rawWeekDays.map((day, index) => ({\n label: `${day[0]}${day.slice(1).toLowerCase()}`,\n isCurrentDay: this.parseZoneInstance().day() === index,\n }));\n if (!this.data?.dpConfig?.format) {\n this.data.dpConfig = {\n ...this.data.dpConfig,\n format: DATE_FORMAT,\n };\n }\n }\n\n ngOnInit(): void {\n this.currentDateInstance();\n this.calculateMinMaxDays();\n }\n\n private currentDateInstance(): void {\n const selectedDate = this.parseZoneInstance(this.data.date, this.data.dpConfig.format);\n if (selectedDate.isValid()) {\n this.currentYearNumber = selectedDate.year();\n this.currentMonthNumber = selectedDate.month();\n this.currentMonth = getMonth(this.currentMonthNumber);\n }\n this.currentMonthDates = this.generateDates(this.currentMonthNumber, this.currentYearNumber);\n }\n\n private calculateMinMaxDays() {\n const currentInstance = this.parseZoneInstance().year(this.currentYearNumber).month(this.currentMonthNumber);\n const minDate = this.parseZoneInstance(this.data.dpConfig.minDate, this.data.dpConfig.format);\n if (minDate.isValid()) {\n this.isPreviousMonthDisabled = minDate.isSameOrAfter(currentInstance, 'month');\n }\n const maxDate = this.parseZoneInstance(this.data.dpConfig.maxDate, this.data.dpConfig.format);\n if (maxDate.isValid()) {\n this.isNextMonthDisabled = maxDate.isSameOrBefore(currentInstance, 'month');\n }\n }\n\n navigateMonth(direction: \"NEXT\" | \"PREVIOUS\"): void {\n let thisMonth: Moment = this.parseZoneInstance().year(this.currentYearNumber).month(this.currentMonthNumber);\n if (direction === \"NEXT\") {\n thisMonth = thisMonth.add(1, 'month');\n } else if (direction === \"PREVIOUS\") {\n thisMonth = thisMonth.subtract(1, 'month');\n }\n this.currentMonthNumber = thisMonth.month();\n this.currentMonth = getMonth(this.currentMonthNumber);\n this.currentYearNumber = thisMonth.year();\n this.currentMonthDates = this.generateDates(this.currentMonthNumber, this.currentYearNumber);\n this.calculateMinMaxDays();\n }\n\n private generateDates(month: number, currentYearNumber: number): ICurrentMonthDates[] {\n let dates: ICurrentMonthDates[] = [];\n const thisMonth = this.parseZoneInstance().year(currentYearNumber).month(month);\n for (let startDate = 1; startDate <= thisMonth.endOf('month').date(); startDate++) {\n let isDisabledDay = this.data.datesDisabled.some(d => d === thisMonth.date(startDate).format(this.data.dpConfig.format));\n const minDate = this.parseZoneInstance(this.data.dpConfig.minDate, this.data.dpConfig.format);\n if (!isDisabledDay && minDate.isValid()) {\n isDisabledDay = minDate.isAfter(thisMonth.date(startDate), 'day');\n }\n const maxDate = this.parseZoneInstance(this.data.dpConfig.maxDate, this.data.dpConfig.format);\n if (!isDisabledDay && maxDate.isValid()) {\n isDisabledDay = maxDate.isBefore(thisMonth.date(startDate), 'day');\n }\n dates.push({\n date: startDate,\n weekDay: thisMonth.date(startDate).day(),\n isCurrentDay: thisMonth.date(startDate).isSame(this.parseZoneInstance(), 'day'),\n isSelectedDay: thisMonth.date(startDate).isSame(this.parseZoneInstance(this.data.date, this.data.dpConfig.format), 'day'),\n toastMessage: this.data.messages.find(q => thisMonth.date(startDate).isSame(this.parseZoneInstance(q.date, this.data.dpConfig.format), 'day'))?.message || '',\n isDisabledDay,\n });\n }\n for (let i = dates[0].weekDay; i > 0; i--) {\n dates.unshift({ date: 0, weekDay: i - 1 });\n }\n return dates;\n }\n\n selectDay(day: ICurrentMonthDates) {\n if (day.date <= 0) return;\n if (!day.isDisabledDay) {\n this.data.dateChange(this.parseZoneInstance().year(this.currentYearNumber).month(this.currentMonthNumber).date(day.date).format(this.data.dpConfig.format));\n }\n if (day.toastMessage) {\n this.toast.displayMsg(day.toastMessage, 4000);\n }\n }\n\n}\n","import { ConnectionPositionPair, Overlay, OverlayConfig, OverlayRef } from \"@angular/cdk/overlay\";\nimport { ComponentPortal } from \"@angular/cdk/portal\";\nimport { Directive, ElementRef, EventEmitter, HostListener, Injector, Input, Optional, Output, Self, ViewContainerRef } from \"@angular/core\";\nimport { NgControl } from \"@angular/forms\";\nimport { take } from \"rxjs/operators\";\nimport { CONTAINER_DATA, DATE_FORMAT } from \"./datepicker-constants\";\nimport { IDatePickerConfig, IDatePickerToastText } from \"./models/dp-config.model\";\nimport { TzDpContainerComponent } from './tz-dp-container/tz-dp-container.component';\n\n@Directive({\n selector: \"input[misTzDp]\",\n})\nexport class TzDatepickerDirective {\n @Input() dpConfig: Partial<IDatePickerConfig> = {\n format: DATE_FORMAT,\n minDate: \"\",\n maxDate: \"\"\n };\n // dd-mm-yyyy 01-12-2022\n @Input() set selectedDate(date: string) {\n this.date = date;\n }\n @Input() set datesDisabled(dates: string[]) {\n this.dpDisabledDates = dates;\n }\n @Input() dateMessages: IDatePickerToastText[] = [];\n @Input() positionX: \"start\" | \"end\" = \"start\";\n @Input() positionY: \"top\" | \"bottom\" = \"bottom\";\n private overlayRef: OverlayRef;\n @Output() dateChange = new EventEmitter<string>(true);\n private isOpen = false;\n date: string;\n\n private dpDisabledDates: string[] = [];\n\n constructor(@Self() @Optional() private control: NgControl, private element: ElementRef, private overlay: Overlay, private viewContainerRef: ViewContainerRef) { }\n\n @HostListener(\"click\", [\"$event\"])\n toggleDatePicker() {\n if (this.isOpen) {\n this.close();\n } else {\n this.open();\n }\n }\n\n private open() {\n this.isOpen = true;\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.element)\n .withPositions([\n new ConnectionPositionPair(\n { originX: this.positionX, originY: this.positionY },\n { overlayX: this.positionX, overlayY: this.positionY === \"bottom\" ? \"top\" : \"bottom\" },\n ),\n new ConnectionPositionPair(\n { originX: \"start\", originY: \"bottom\" },\n { overlayX: \"start\", overlayY: \"top\" },\n ),\n new ConnectionPositionPair(\n { originX: \"end\", originY: \"top\" },\n { overlayX: \"end\", overlayY: \"bottom\" },\n ),\n ])\n .withPush(true);\n const config = new OverlayConfig({\n hasBackdrop: true,\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n backdropClass: \"cdk-overlay-transparent-backdrop\",\n });\n this.overlayRef = this.overlay.create(config);\n const tempRef = new ComponentPortal(TzDpContainerComponent, this.viewContainerRef, Injector.create({\n providers: [\n { provide: CONTAINER_DATA, useValue: { messages: this.dateMessages, date: this.date || this.control?.control.value, dpConfig: this.dpConfig, datesDisabled: this.dpDisabledDates, dateChange: this.applyDate.bind(this) } },\n ]\n }));\n this.overlayRef.attach(tempRef);\n this.overlayRef\n .backdropClick()\n .pipe(take(1))\n .subscribe(() => {\n this.close();\n });\n }\n\n applyDate(date: string) {\n this.dateChange.emit(date);\n this.control?.control.patchValue(date);\n this.date = date;\n this.close();\n }\n\n private close() {\n this.isOpen = false;\n this.overlayRef.detach();\n this.overlayRef.dispose();\n }\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { TzDpContainerComponent } from \"./tz-dp-container/tz-dp-container.component\";\nimport { TzDatepickerDirective } from \"./tz-datepicker.directive\";\nimport { ToastModule } from 'mis-crystal-design-system/toast';\n@NgModule({\n declarations: [TzDpContainerComponent, TzDatepickerDirective],\n imports: [CommonModule, ToastModule.forRoot()],\n exports: [TzDpContainerComponent, TzDatepickerDirective],\n entryComponents: [TzDpContainerComponent]\n})\nexport class DatepickerModuleV2 {}\n"]}
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
DropdownComponent.decorators = [
|
|
69
69
|
{ type: core.Component, args: [{
|
|
70
70
|
selector: 'mis-dropdown',
|
|
71
|
-
template: "<div class=\"main-container\"\n [ngStyle]=\"{\n 'height': height.length > 0? height: '',\n 'width': width.length > 0? width: ''\n }\"\n>\n <div class=\"dropdown\" (click)=\"toggleDropdown()\" [ngStyle]=\"{'background': isOpen ? '#E6EBF7': ''}\">\n <div class=\"label\">\n <p class=\"text\">\n {{ selectedItem.label || label }}\n </p>\n </div>\n <svg class=\"handle\" [ngStyle]=\"{ transform: isOpen ? 'rotate(180deg)': 'rotate(0deg)' }\" width=\"20\" height=\"20\"\n viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M13.825 7.15845L10 10.9751L6.175 7.15845L5 8.33345L10 13.3334L15 8.33345L13.825 7.15845Z\" fill=\"#181F33\" />\n </svg>\n </div>\n <div style=\"flex-basis: 0;\"></div>\n <div style=\"width: 100%; position: relative;\">\n <div *ngIf=\"isOpen\" class=\"popup-container\"\n [ngStyle]=\"{\n 'height': dropdownListHeight,\n 'width': dropdownListWidth\n }\"\n [ngClass]=\"{\n 'position-left': dropdownListPosition === 'Left',\n 'position-right': dropdownListPosition === 'Right'\n }\"\n >\n <div *ngIf=\"searchEnabled\" class=\"search-container\">\n <svg *ngIf=\"!isSearchInputFocused\" class=\"search-icon\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M4.21508 11.1456C4.21508 7.3179 7.33722 4.21165 11.1926 4.21165C15.048 4.21165 18.1702 7.3179 18.1702 11.1456C18.1702 12.6931 17.6599 14.1226 16.7972 15.2767L15.3685 16.7013C14.2044 17.5668 12.759 18.0796 11.1926 18.0796C7.33722 18.0796 4.21508 14.9734 4.21508 11.1456ZM15.9421 17.7835C14.6021 18.7329 12.9627 19.2913 11.1926 19.2913C6.66977 19.2913 3 15.6461 3 11.1456C3 6.64512 6.66977 3 11.1926 3C15.7155 3 19.3852 6.64512 19.3852 11.1456C19.3852 12.9371 18.8037 14.5931 17.8184 15.9375L19.8361 17.4048C20.6705 17.912 21.7554 18.6543 20.2454 20.215C18.7353 21.7756 18.0099 20.6663 17.4991 19.8364L15.9421 17.7835Z\"\n fill=\"#6A737D\" />\n </svg>\n <input\n [ngModel]=\"searchInput\"\n [ngStyle]=\"{ paddingLeft: isSearchInputFocused ? '12px' : '45px', border:isSearchInputFocused? '1px solid #0937B2':'1px solid #e0e0e0', paddingRight: isSearchInputFocused ? '45px' : '10px' }\"\n (ngModelChange)=\"searchInputOnChange($event)\"\n [placeholder]=\"isSearchInputFocused ? '' : 'Search Keyword'\"\n (focus)=\"searchInputFocused(true)\"\n class=\"search-input\"\n />\n <svg *ngIf=\"isSearchInputFocused\" class=\"cancel-icon\" (click)=\"searchInputCanceled($event)\" width=\"24\" height=\"24\"\n viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M8.87446 7.32144C8.44588 6.89285 7.751 6.89285 7.32242 7.32144C6.89383 7.75002 6.89383 8.4449 7.32242 8.87349L10.4488 11.9999L7.32357 15.1252C6.89498 15.5538 6.89498 16.2486 7.32357 16.6772C7.75215 17.1058 8.44703 17.1058 8.87561 16.6772L12.0009 13.552L15.1261 16.6772C15.5547 17.1058 16.2496 17.1058 16.6781 16.6772C17.1067 16.2486 17.1067 15.5537 16.6781 15.1251L13.5529 11.9999L16.6793 8.87354C17.1079 8.44496 17.1079 7.75008 16.6793 7.3215C16.2507 6.89291 15.5558 6.89291 15.1273 7.3215L12.0009 10.4479L8.87446 7.32144Z\"\n fill=\"#6A737D\" />\n </svg>\n </div>\n <div class=\"items\">\n <div class=\"item\" (click)=\"selectItem(item)\" *ngFor=\"let item of searchInput ? searchData : data\">\n <div class=\"label\" [ngStyle]=\"{'width': item.icon? '90%': '100%'}\">\n {{ item.label }}\n </div>\n <div class=\"icon-container\" *ngIf=\"item.icon\">\n <img class=\"icon\" [src]=\"item.icon\" alt=\"no img\">\n </div>\n </div>\n <div class=\"noData\" *ngIf=\"(searchInput ? searchData : data).length === 0\">\n {{ searchInput === '' ? noDataMessage : 'No results' }}\n </div>\n </div>\n </div>\n </div>\n</div>\n",
|
|
72
|
-
styles: [".main-container{position:relative;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;height:32px;width:256px;font-family:Lato,sans-serif!important}.main-container .dropdown{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;height:inherit;border:1px solid #e0e0e0;border-radius:6px;background-color:#fff;cursor:pointer;display:flex;justify-content:space-between;align-items:center;width:100%;box-sizing:border-box;padding:0 12px}.main-container .dropdown:hover{background-color:#f5f7fc}.main-container .dropdown .label{box-sizing:border-box;display:flex;justify-content:flex-start;align-items:center;width:calc(100% - 32px)}.main-container .dropdown .label,.main-container .dropdown .label .text{font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.main-container .dropdown .label .text{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.main-container .dropdown .label .count{background-color:#e0e0e0;border-radius:50%;padding:2px 7px;margin:0}.main-container .dropdown .handle{width:24px;height:24px;transition:.3s;position:absolute;right:12px;border-radius:50%;overflow:hidden}.main-container .popup-container{position:absolute;top:4px;width:100%;max-height:340px;padding-bottom:0;border:1px solid #e0e0e0;border-radius:8px;background-color:#fff;box-shadow:0 12px 24px 0 rgba(0,0,0,.12);overflow:scroll;overflow-x:hidden;display:flex;flex-direction:column;justify-content:space-between;z-index:100}.main-container .popup-container::-webkit-scrollbar{width:0;height:0}.main-container .popup-container .search-container{position:relative;box-sizing:border-box;padding:8px}.main-container .popup-container .search-container .search-icon{position:absolute;width:24px;height:24px;top:50%;transform:translateY(-50%);left:18px;z-index:1}.main-container .popup-container .search-container .search-input{height:40px;width:100%;padding:12px;border:1px solid #e0e0e0;box-sizing:border-box;border-radius:8px;outline:none;caret-color:#0937b2;font-style:normal;font-weight:400;font-size:12px;line-height:18px;display:flex;align-items:center;letter-spacing:.2px;color:#181f33}.main-container .popup-container .search-container .cancel-icon{position:absolute;cursor:pointer;width:24px;height:24px;top:50%;transform:translateY(-50%);right:18px;z-index:1}.main-container .popup-container .items{padding:8px 0 8px 8px;overflow-y:scroll;height:100%}.main-container .popup-container .items::-webkit-scrollbar{width:5px;height:0}.main-container .popup-container .items::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:10px}.main-container .popup-container .items .noData{display:flex;justify-content:center;align-items:center;font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.main-container .popup-container .items .item{cursor:pointer;display:flex;justify-content:flex-start;align-items:center;gap:10px;padding:8px 12px;border-radius:6px;height:auto;letter-spacing:.2px;color:#181f33}.main-container .popup-container .items .item:hover{background-color:#f5f7fc}.main-container .popup-container .items .item .label{width:100%;line-height:20px;font-size:14px;font-style:normal;font-weight:400}.main-container .popup-container .items .item .icon-container{width:10%;display:flex;justify-content:flex-end}.main-container .popup-container .items .item .icon-container .icon{width:20px;height:20px}.position-left{right:0}.position-right{left:0}"]
|
|
71
|
+
template: "<div class=\"main-container\"\n [ngStyle]=\"{\n 'height': height.length > 0? height: '',\n 'width': width.length > 0? width: ''\n }\"\n>\n <div class=\"dropdown\" (click)=\"toggleDropdown()\" [ngStyle]=\"{'background': isOpen ? '#E6EBF7': ''}\">\n <div class=\"label\">\n <p class=\"text\">\n {{ selectedItem.label || label }}\n </p>\n </div>\n <svg class=\"handle\" [ngStyle]=\"{ transform: isOpen ? 'rotate(180deg)': 'rotate(0deg)' }\" width=\"20\" height=\"20\"\n viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M13.825 7.15845L10 10.9751L6.175 7.15845L5 8.33345L10 13.3334L15 8.33345L13.825 7.15845Z\" fill=\"#181F33\" />\n </svg>\n </div>\n <div style=\"flex-basis: 0;\"></div>\n <div style=\"width: 100%; position: relative;\">\n <div *ngIf=\"isOpen\" class=\"popup-container\"\n [ngStyle]=\"{\n 'height': dropdownListHeight,\n 'width': dropdownListWidth\n }\"\n [ngClass]=\"{\n 'position-left': dropdownListPosition === 'Left',\n 'position-right': dropdownListPosition === 'Right'\n }\"\n >\n <div *ngIf=\"searchEnabled\" class=\"search-container\">\n <svg *ngIf=\"!isSearchInputFocused\" class=\"search-icon\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M4.21508 11.1456C4.21508 7.3179 7.33722 4.21165 11.1926 4.21165C15.048 4.21165 18.1702 7.3179 18.1702 11.1456C18.1702 12.6931 17.6599 14.1226 16.7972 15.2767L15.3685 16.7013C14.2044 17.5668 12.759 18.0796 11.1926 18.0796C7.33722 18.0796 4.21508 14.9734 4.21508 11.1456ZM15.9421 17.7835C14.6021 18.7329 12.9627 19.2913 11.1926 19.2913C6.66977 19.2913 3 15.6461 3 11.1456C3 6.64512 6.66977 3 11.1926 3C15.7155 3 19.3852 6.64512 19.3852 11.1456C19.3852 12.9371 18.8037 14.5931 17.8184 15.9375L19.8361 17.4048C20.6705 17.912 21.7554 18.6543 20.2454 20.215C18.7353 21.7756 18.0099 20.6663 17.4991 19.8364L15.9421 17.7835Z\"\n fill=\"#6A737D\" />\n </svg>\n <input\n [ngModel]=\"searchInput\"\n [ngStyle]=\"{ paddingLeft: isSearchInputFocused ? '12px' : '45px', border:isSearchInputFocused? '1px solid #0937B2':'1px solid #e0e0e0', paddingRight: isSearchInputFocused ? '45px' : '10px' }\"\n (ngModelChange)=\"searchInputOnChange($event)\"\n [placeholder]=\"isSearchInputFocused ? '' : 'Search Keyword'\"\n (focus)=\"searchInputFocused(true)\"\n class=\"search-input\"\n />\n <svg *ngIf=\"isSearchInputFocused\" class=\"cancel-icon\" (click)=\"searchInputCanceled($event)\" width=\"24\" height=\"24\"\n viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M8.87446 7.32144C8.44588 6.89285 7.751 6.89285 7.32242 7.32144C6.89383 7.75002 6.89383 8.4449 7.32242 8.87349L10.4488 11.9999L7.32357 15.1252C6.89498 15.5538 6.89498 16.2486 7.32357 16.6772C7.75215 17.1058 8.44703 17.1058 8.87561 16.6772L12.0009 13.552L15.1261 16.6772C15.5547 17.1058 16.2496 17.1058 16.6781 16.6772C17.1067 16.2486 17.1067 15.5537 16.6781 15.1251L13.5529 11.9999L16.6793 8.87354C17.1079 8.44496 17.1079 7.75008 16.6793 7.3215C16.2507 6.89291 15.5558 6.89291 15.1273 7.3215L12.0009 10.4479L8.87446 7.32144Z\"\n fill=\"#6A737D\" />\n </svg>\n </div>\n <div class=\"items\">\n <div class=\"item\" [ngClass]=\"{'item-disabled': item.disabled}\" (click)=\"item.disabled ? null : selectItem(item)\" *ngFor=\"let item of searchInput ? searchData : data\">\n <div class=\"label\" [ngStyle]=\"{'width': item.icon? '90%': '100%'}\">\n {{ item.label }}\n </div>\n <div class=\"icon-container\" *ngIf=\"item.icon\">\n <img class=\"icon\" [src]=\"item.icon\" alt=\"no img\">\n </div>\n </div>\n <div class=\"noData\" *ngIf=\"(searchInput ? searchData : data).length === 0\">\n {{ searchInput === '' ? noDataMessage : 'No results' }}\n </div>\n </div>\n </div>\n </div>\n</div>\n",
|
|
72
|
+
styles: [".main-container{position:relative;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;height:32px;width:256px;font-family:Lato,sans-serif!important}.main-container .dropdown{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;height:inherit;border:1px solid #e0e0e0;border-radius:6px;background-color:#fff;cursor:pointer;display:flex;justify-content:space-between;align-items:center;width:100%;box-sizing:border-box;padding:0 12px}.main-container .dropdown:hover{background-color:#f5f7fc}.main-container .dropdown .label{box-sizing:border-box;display:flex;justify-content:flex-start;align-items:center;width:calc(100% - 32px)}.main-container .dropdown .label,.main-container .dropdown .label .text{font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.main-container .dropdown .label .text{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.main-container .dropdown .label .count{background-color:#e0e0e0;border-radius:50%;padding:2px 7px;margin:0}.main-container .dropdown .handle{width:24px;height:24px;transition:.3s;position:absolute;right:12px;border-radius:50%;overflow:hidden}.main-container .popup-container{position:absolute;top:4px;width:100%;max-height:340px;padding-bottom:0;border:1px solid #e0e0e0;border-radius:8px;background-color:#fff;box-shadow:0 12px 24px 0 rgba(0,0,0,.12);overflow:scroll;overflow-x:hidden;display:flex;flex-direction:column;justify-content:space-between;z-index:100}.main-container .popup-container::-webkit-scrollbar{width:0;height:0}.main-container .popup-container .search-container{position:relative;box-sizing:border-box;padding:8px}.main-container .popup-container .search-container .search-icon{position:absolute;width:24px;height:24px;top:50%;transform:translateY(-50%);left:18px;z-index:1}.main-container .popup-container .search-container .search-input{height:40px;width:100%;padding:12px;border:1px solid #e0e0e0;box-sizing:border-box;border-radius:8px;outline:none;caret-color:#0937b2;font-style:normal;font-weight:400;font-size:12px;line-height:18px;display:flex;align-items:center;letter-spacing:.2px;color:#181f33}.main-container .popup-container .search-container .cancel-icon{position:absolute;cursor:pointer;width:24px;height:24px;top:50%;transform:translateY(-50%);right:18px;z-index:1}.main-container .popup-container .items{padding:8px 0 8px 8px;overflow-y:scroll;height:100%}.main-container .popup-container .items::-webkit-scrollbar{width:5px;height:0}.main-container .popup-container .items::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:10px}.main-container .popup-container .items .noData{display:flex;justify-content:center;align-items:center;font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.main-container .popup-container .items .item{cursor:pointer;display:flex;justify-content:flex-start;align-items:center;gap:10px;padding:8px 12px;border-radius:6px;height:auto;letter-spacing:.2px;color:#181f33}.main-container .popup-container .items .item:hover{background-color:#f5f7fc}.main-container .popup-container .items .item .label{width:100%;line-height:20px;font-size:14px;font-style:normal;font-weight:400}.main-container .popup-container .items .item .icon-container{width:10%;display:flex;justify-content:flex-end}.main-container .popup-container .items .item .icon-container .icon{width:20px;height:20px}.main-container .popup-container .items .item-disabled{cursor:not-allowed}.main-container .popup-container .items .item-disabled:hover{background-color:transparent}.main-container .popup-container .items .item-disabled .label{color:#929dab;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.position-left{right:0}.position-right{left:0}"]
|
|
73
73
|
},] }
|
|
74
74
|
];
|
|
75
75
|
DropdownComponent.ctorParameters = function () { return [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mis-crystal-design-system-dropdown.umd.js","sources":["../../../projects/mis-components/dropdown/dropdown.component.ts","../../../projects/mis-components/dropdown/dropdown.module.ts","../../../projects/mis-components/dropdown/mis-crystal-design-system-dropdown.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnInit,\n Output\n} from '@angular/core';\n\n@Component({\n selector: 'mis-dropdown',\n templateUrl: './dropdown.component.html',\n styleUrls: ['./dropdown.component.scss']\n})\nexport class DropdownComponent implements OnInit {\n isOpen = false;\n isSearchInputFocused: boolean = false;\n searchInput: string = '';\n searchData: DropdownItem[] = [];\n\n @Input() data: DropdownItem[] = [];\n @Input() height: string = ''\n @Input() width: string = ''\n @Input() label: string = 'Select';\n\n @Input() dropdownListHeight: string = ''\n @Input() dropdownListWidth: string = ''\n @Input() dropdownListPosition: 'Left' | 'Right' = 'Left'\n\n @Input() searchEnabled: boolean = true;\n @Input() selectedItem: DropdownItem = { value: '', label: '' };\n @Input() noDataMessage: string = 'No Data';\n\n @Output() onChange: EventEmitter<any> = new EventEmitter();\n\n constructor(private eRef: ElementRef) { }\n ngOnInit() { }\n\n @HostListener('document:click', ['$event'])\n clickout(event) {\n const isClickedOutside = !this.eRef.nativeElement.contains(event.target);\n if (isClickedOutside) {\n this.onCancel();\n }\n }\n filterByValue(array: DropdownItem[], string: string) {\n return array.filter(o =>\n o.label.toLowerCase().includes(string.toLowerCase())\n );\n }\n searchInputOnChange(newValue) {\n this.searchInput = newValue;\n if (newValue) {\n this.searchData = this.filterByValue(this.data, newValue);\n } else {\n this.searchData = [];\n this.searchInput = '';\n }\n }\n searchInputFocused(isFocused: boolean) {\n this.isSearchInputFocused = isFocused;\n }\n searchInputCanceled(event) {\n event.stopPropagation();\n this.searchInput = '';\n this.isSearchInputFocused = false;\n }\n toggleDropdown() {\n this.isOpen = !this.isOpen;\n }\n selectItem(item) {\n this.onChange.emit(item);\n this.toggleDropdown();\n }\n onCancel() {\n this.isSearchInputFocused = false;\n this.isOpen = false;\n this.searchInput = '';\n }\n}\nexport interface DropdownItem {\n label: string;\n value: string;\n icon?: string
|
|
1
|
+
{"version":3,"file":"mis-crystal-design-system-dropdown.umd.js","sources":["../../../projects/mis-components/dropdown/dropdown.component.ts","../../../projects/mis-components/dropdown/dropdown.module.ts","../../../projects/mis-components/dropdown/mis-crystal-design-system-dropdown.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnInit,\n Output\n} from '@angular/core';\n\n@Component({\n selector: 'mis-dropdown',\n templateUrl: './dropdown.component.html',\n styleUrls: ['./dropdown.component.scss']\n})\nexport class DropdownComponent implements OnInit {\n isOpen = false;\n isSearchInputFocused: boolean = false;\n searchInput: string = '';\n searchData: DropdownItem[] = [];\n\n @Input() data: DropdownItem[] = [];\n @Input() height: string = ''\n @Input() width: string = ''\n @Input() label: string = 'Select';\n\n @Input() dropdownListHeight: string = ''\n @Input() dropdownListWidth: string = ''\n @Input() dropdownListPosition: 'Left' | 'Right' = 'Left'\n\n @Input() searchEnabled: boolean = true;\n @Input() selectedItem: DropdownItem = { value: '', label: '' };\n @Input() noDataMessage: string = 'No Data';\n\n @Output() onChange: EventEmitter<any> = new EventEmitter();\n\n constructor(private eRef: ElementRef) { }\n ngOnInit() { }\n\n @HostListener('document:click', ['$event'])\n clickout(event) {\n const isClickedOutside = !this.eRef.nativeElement.contains(event.target);\n if (isClickedOutside) {\n this.onCancel();\n }\n }\n filterByValue(array: DropdownItem[], string: string) {\n return array.filter(o =>\n o.label.toLowerCase().includes(string.toLowerCase())\n );\n }\n searchInputOnChange(newValue) {\n this.searchInput = newValue;\n if (newValue) {\n this.searchData = this.filterByValue(this.data, newValue);\n } else {\n this.searchData = [];\n this.searchInput = '';\n }\n }\n searchInputFocused(isFocused: boolean) {\n this.isSearchInputFocused = isFocused;\n }\n searchInputCanceled(event) {\n event.stopPropagation();\n this.searchInput = '';\n this.isSearchInputFocused = false;\n }\n toggleDropdown() {\n this.isOpen = !this.isOpen;\n }\n selectItem(item) {\n this.onChange.emit(item);\n this.toggleDropdown();\n }\n onCancel() {\n this.isSearchInputFocused = false;\n this.isOpen = false;\n this.searchInput = '';\n }\n}\nexport interface DropdownItem {\n label: string;\n value: string;\n icon?: string;\n disabled?: boolean;\n}\n","import { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\nimport { DropdownComponent } from './dropdown.component';\n\n@NgModule({\n declarations: [DropdownComponent],\n imports: [CommonModule, FormsModule],\n exports: [DropdownComponent]\n})\nexport class DropdownModule {\n static forRoot(): ModuleWithProviders<DropdownModule> {\n return { ngModule: DropdownModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["EventEmitter","Component","ElementRef","Input","Output","HostListener","NgModule","CommonModule","FormsModule"],"mappings":";;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AiB,CAAC;oBACjC,OAAO,EAAE,CAACC,mBAAY,EAAEC,iBAAW,CAAC;oBACpC,OAAO,EAAE,CAAC,iBAAiB,CAAC;iBAC/B;;;ICTD;;;;;;;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms")):"function"==typeof define&&define.amd?define("mis-crystal-design-system/dropdown",["exports","@angular/core","@angular/common","@angular/forms"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self)["mis-crystal-design-system"]=e["mis-crystal-design-system"]||{},e["mis-crystal-design-system"].dropdown={}),e.ng.core,e.ng.common,e.ng.forms)}(this,(function(e,n,t,i){"use strict";var o=function(){function e(e){this.eRef=e,this.isOpen=!1,this.isSearchInputFocused=!1,this.searchInput="",this.searchData=[],this.data=[],this.height="",this.width="",this.label="Select",this.dropdownListHeight="",this.dropdownListWidth="",this.dropdownListPosition="Left",this.searchEnabled=!0,this.selectedItem={value:"",label:""},this.noDataMessage="No Data",this.onChange=new n.EventEmitter}return e.prototype.ngOnInit=function(){},e.prototype.clickout=function(e){!this.eRef.nativeElement.contains(e.target)&&this.onCancel()},e.prototype.filterByValue=function(e,n){return e.filter((function(e){return e.label.toLowerCase().includes(n.toLowerCase())}))},e.prototype.searchInputOnChange=function(e){this.searchInput=e,e?this.searchData=this.filterByValue(this.data,e):(this.searchData=[],this.searchInput="")},e.prototype.searchInputFocused=function(e){this.isSearchInputFocused=e},e.prototype.searchInputCanceled=function(e){e.stopPropagation(),this.searchInput="",this.isSearchInputFocused=!1},e.prototype.toggleDropdown=function(){this.isOpen=!this.isOpen},e.prototype.selectItem=function(e){this.onChange.emit(e),this.toggleDropdown()},e.prototype.onCancel=function(){this.isSearchInputFocused=!1,this.isOpen=!1,this.searchInput=""},e}();o.decorators=[{type:n.Component,args:[{selector:"mis-dropdown",template:'<div class="main-container"\n [ngStyle]="{\n \'height\': height.length > 0? height: \'\',\n \'width\': width.length > 0? width: \'\'\n }"\n>\n <div class="dropdown" (click)="toggleDropdown()" [ngStyle]="{\'background\': isOpen ? \'#E6EBF7\': \'\'}">\n <div class="label">\n <p class="text">\n {{ selectedItem.label || label }}\n </p>\n </div>\n <svg class="handle" [ngStyle]="{ transform: isOpen ? \'rotate(180deg)\': \'rotate(0deg)\' }" width="20" height="20"\n viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M13.825 7.15845L10 10.9751L6.175 7.15845L5 8.33345L10 13.3334L15 8.33345L13.825 7.15845Z" fill="#181F33" />\n </svg>\n </div>\n <div style="flex-basis: 0;"></div>\n <div style="width: 100%; position: relative;">\n <div *ngIf="isOpen" class="popup-container"\n [ngStyle]="{\n \'height\': dropdownListHeight,\n \'width\': dropdownListWidth\n }"\n [ngClass]="{\n \'position-left\': dropdownListPosition === \'Left\',\n \'position-right\': dropdownListPosition === \'Right\'\n }"\n >\n <div *ngIf="searchEnabled" class="search-container">\n <svg *ngIf="!isSearchInputFocused" class="search-icon" width="24" height="24" viewBox="0 0 24 24" fill="none"\n xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.21508 11.1456C4.21508 7.3179 7.33722 4.21165 11.1926 4.21165C15.048 4.21165 18.1702 7.3179 18.1702 11.1456C18.1702 12.6931 17.6599 14.1226 16.7972 15.2767L15.3685 16.7013C14.2044 17.5668 12.759 18.0796 11.1926 18.0796C7.33722 18.0796 4.21508 14.9734 4.21508 11.1456ZM15.9421 17.7835C14.6021 18.7329 12.9627 19.2913 11.1926 19.2913C6.66977 19.2913 3 15.6461 3 11.1456C3 6.64512 6.66977 3 11.1926 3C15.7155 3 19.3852 6.64512 19.3852 11.1456C19.3852 12.9371 18.8037 14.5931 17.8184 15.9375L19.8361 17.4048C20.6705 17.912 21.7554 18.6543 20.2454 20.215C18.7353 21.7756 18.0099 20.6663 17.4991 19.8364L15.9421 17.7835Z"\n fill="#6A737D" />\n </svg>\n <input\n [ngModel]="searchInput"\n [ngStyle]="{ paddingLeft: isSearchInputFocused ? \'12px\' : \'45px\', border:isSearchInputFocused? \'1px solid #0937B2\':\'1px solid #e0e0e0\', paddingRight: isSearchInputFocused ? \'45px\' : \'10px\' }"\n (ngModelChange)="searchInputOnChange($event)"\n [placeholder]="isSearchInputFocused ? \'\' : \'Search Keyword\'"\n (focus)="searchInputFocused(true)"\n class="search-input"\n />\n <svg *ngIf="isSearchInputFocused" class="cancel-icon" (click)="searchInputCanceled($event)" width="24" height="24"\n viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M8.87446 7.32144C8.44588 6.89285 7.751 6.89285 7.32242 7.32144C6.89383 7.75002 6.89383 8.4449 7.32242 8.87349L10.4488 11.9999L7.32357 15.1252C6.89498 15.5538 6.89498 16.2486 7.32357 16.6772C7.75215 17.1058 8.44703 17.1058 8.87561 16.6772L12.0009 13.552L15.1261 16.6772C15.5547 17.1058 16.2496 17.1058 16.6781 16.6772C17.1067 16.2486 17.1067 15.5537 16.6781 15.1251L13.5529 11.9999L16.6793 8.87354C17.1079 8.44496 17.1079 7.75008 16.6793 7.3215C16.2507 6.89291 15.5558 6.89291 15.1273 7.3215L12.0009 10.4479L8.87446 7.32144Z"\n fill="#6A737D" />\n </svg>\n </div>\n <div class="items">\n <div class="item" (click)="selectItem(item)" *ngFor="let item of searchInput ? searchData : data">\n <div class="label" [ngStyle]="{\'width\': item.icon? \'90%\': \'100%\'}">\n {{ item.label }}\n </div>\n <div class="icon-container" *ngIf="item.icon">\n <img class="icon" [src]="item.icon" alt="no img">\n </div>\n </div>\n <div class="noData" *ngIf="(searchInput ? searchData : data).length === 0">\n {{ searchInput === \'\' ? noDataMessage : \'No results\' }}\n </div>\n </div>\n </div>\n </div>\n</div>\n',styles:[".main-container{position:relative;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;height:32px;width:256px;font-family:Lato,sans-serif!important}.main-container .dropdown{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;height:inherit;border:1px solid #e0e0e0;border-radius:6px;background-color:#fff;cursor:pointer;display:flex;justify-content:space-between;align-items:center;width:100%;box-sizing:border-box;padding:0 12px}.main-container .dropdown:hover{background-color:#f5f7fc}.main-container .dropdown .label{box-sizing:border-box;display:flex;justify-content:flex-start;align-items:center;width:calc(100% - 32px)}.main-container .dropdown .label,.main-container .dropdown .label .text{font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.main-container .dropdown .label .text{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.main-container .dropdown .label .count{background-color:#e0e0e0;border-radius:50%;padding:2px 7px;margin:0}.main-container .dropdown .handle{width:24px;height:24px;transition:.3s;position:absolute;right:12px;border-radius:50%;overflow:hidden}.main-container .popup-container{position:absolute;top:4px;width:100%;max-height:340px;padding-bottom:0;border:1px solid #e0e0e0;border-radius:8px;background-color:#fff;box-shadow:0 12px 24px 0 rgba(0,0,0,.12);overflow:scroll;overflow-x:hidden;display:flex;flex-direction:column;justify-content:space-between;z-index:100}.main-container .popup-container::-webkit-scrollbar{width:0;height:0}.main-container .popup-container .search-container{position:relative;box-sizing:border-box;padding:8px}.main-container .popup-container .search-container .search-icon{position:absolute;width:24px;height:24px;top:50%;transform:translateY(-50%);left:18px;z-index:1}.main-container .popup-container .search-container .search-input{height:40px;width:100%;padding:12px;border:1px solid #e0e0e0;box-sizing:border-box;border-radius:8px;outline:none;caret-color:#0937b2;font-style:normal;font-weight:400;font-size:12px;line-height:18px;display:flex;align-items:center;letter-spacing:.2px;color:#181f33}.main-container .popup-container .search-container .cancel-icon{position:absolute;cursor:pointer;width:24px;height:24px;top:50%;transform:translateY(-50%);right:18px;z-index:1}.main-container .popup-container .items{padding:8px 0 8px 8px;overflow-y:scroll;height:100%}.main-container .popup-container .items::-webkit-scrollbar{width:5px;height:0}.main-container .popup-container .items::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:10px}.main-container .popup-container .items .noData{display:flex;justify-content:center;align-items:center;font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.main-container .popup-container .items .item{cursor:pointer;display:flex;justify-content:flex-start;align-items:center;gap:10px;padding:8px 12px;border-radius:6px;height:auto;letter-spacing:.2px;color:#181f33}.main-container .popup-container .items .item:hover{background-color:#f5f7fc}.main-container .popup-container .items .item .label{width:100%;line-height:20px;font-size:14px;font-style:normal;font-weight:400}.main-container .popup-container .items .item .icon-container{width:10%;display:flex;justify-content:flex-end}.main-container .popup-container .items .item .icon-container .icon{width:20px;height:20px}.position-left{right:0}.position-right{left:0}"]}]}],o.ctorParameters=function(){return[{type:n.ElementRef}]},o.propDecorators={data:[{type:n.Input}],height:[{type:n.Input}],width:[{type:n.Input}],label:[{type:n.Input}],dropdownListHeight:[{type:n.Input}],dropdownListWidth:[{type:n.Input}],dropdownListPosition:[{type:n.Input}],searchEnabled:[{type:n.Input}],selectedItem:[{type:n.Input}],noDataMessage:[{type:n.Input}],onChange:[{type:n.Output}],clickout:[{type:n.HostListener,args:["document:click",["$event"]]}]};var r=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[]}},e}();r.decorators=[{type:n.NgModule,args:[{declarations:[o],imports:[t.CommonModule,i.FormsModule],exports:[o]}]}],e.DropdownComponent=o,e.DropdownModule=r,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms")):"function"==typeof define&&define.amd?define("mis-crystal-design-system/dropdown",["exports","@angular/core","@angular/common","@angular/forms"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self)["mis-crystal-design-system"]=e["mis-crystal-design-system"]||{},e["mis-crystal-design-system"].dropdown={}),e.ng.core,e.ng.common,e.ng.forms)}(this,(function(e,n,t,i){"use strict";var o=function(){function e(e){this.eRef=e,this.isOpen=!1,this.isSearchInputFocused=!1,this.searchInput="",this.searchData=[],this.data=[],this.height="",this.width="",this.label="Select",this.dropdownListHeight="",this.dropdownListWidth="",this.dropdownListPosition="Left",this.searchEnabled=!0,this.selectedItem={value:"",label:""},this.noDataMessage="No Data",this.onChange=new n.EventEmitter}return e.prototype.ngOnInit=function(){},e.prototype.clickout=function(e){!this.eRef.nativeElement.contains(e.target)&&this.onCancel()},e.prototype.filterByValue=function(e,n){return e.filter((function(e){return e.label.toLowerCase().includes(n.toLowerCase())}))},e.prototype.searchInputOnChange=function(e){this.searchInput=e,e?this.searchData=this.filterByValue(this.data,e):(this.searchData=[],this.searchInput="")},e.prototype.searchInputFocused=function(e){this.isSearchInputFocused=e},e.prototype.searchInputCanceled=function(e){e.stopPropagation(),this.searchInput="",this.isSearchInputFocused=!1},e.prototype.toggleDropdown=function(){this.isOpen=!this.isOpen},e.prototype.selectItem=function(e){this.onChange.emit(e),this.toggleDropdown()},e.prototype.onCancel=function(){this.isSearchInputFocused=!1,this.isOpen=!1,this.searchInput=""},e}();o.decorators=[{type:n.Component,args:[{selector:"mis-dropdown",template:'<div class="main-container"\n [ngStyle]="{\n \'height\': height.length > 0? height: \'\',\n \'width\': width.length > 0? width: \'\'\n }"\n>\n <div class="dropdown" (click)="toggleDropdown()" [ngStyle]="{\'background\': isOpen ? \'#E6EBF7\': \'\'}">\n <div class="label">\n <p class="text">\n {{ selectedItem.label || label }}\n </p>\n </div>\n <svg class="handle" [ngStyle]="{ transform: isOpen ? \'rotate(180deg)\': \'rotate(0deg)\' }" width="20" height="20"\n viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M13.825 7.15845L10 10.9751L6.175 7.15845L5 8.33345L10 13.3334L15 8.33345L13.825 7.15845Z" fill="#181F33" />\n </svg>\n </div>\n <div style="flex-basis: 0;"></div>\n <div style="width: 100%; position: relative;">\n <div *ngIf="isOpen" class="popup-container"\n [ngStyle]="{\n \'height\': dropdownListHeight,\n \'width\': dropdownListWidth\n }"\n [ngClass]="{\n \'position-left\': dropdownListPosition === \'Left\',\n \'position-right\': dropdownListPosition === \'Right\'\n }"\n >\n <div *ngIf="searchEnabled" class="search-container">\n <svg *ngIf="!isSearchInputFocused" class="search-icon" width="24" height="24" viewBox="0 0 24 24" fill="none"\n xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.21508 11.1456C4.21508 7.3179 7.33722 4.21165 11.1926 4.21165C15.048 4.21165 18.1702 7.3179 18.1702 11.1456C18.1702 12.6931 17.6599 14.1226 16.7972 15.2767L15.3685 16.7013C14.2044 17.5668 12.759 18.0796 11.1926 18.0796C7.33722 18.0796 4.21508 14.9734 4.21508 11.1456ZM15.9421 17.7835C14.6021 18.7329 12.9627 19.2913 11.1926 19.2913C6.66977 19.2913 3 15.6461 3 11.1456C3 6.64512 6.66977 3 11.1926 3C15.7155 3 19.3852 6.64512 19.3852 11.1456C19.3852 12.9371 18.8037 14.5931 17.8184 15.9375L19.8361 17.4048C20.6705 17.912 21.7554 18.6543 20.2454 20.215C18.7353 21.7756 18.0099 20.6663 17.4991 19.8364L15.9421 17.7835Z"\n fill="#6A737D" />\n </svg>\n <input\n [ngModel]="searchInput"\n [ngStyle]="{ paddingLeft: isSearchInputFocused ? \'12px\' : \'45px\', border:isSearchInputFocused? \'1px solid #0937B2\':\'1px solid #e0e0e0\', paddingRight: isSearchInputFocused ? \'45px\' : \'10px\' }"\n (ngModelChange)="searchInputOnChange($event)"\n [placeholder]="isSearchInputFocused ? \'\' : \'Search Keyword\'"\n (focus)="searchInputFocused(true)"\n class="search-input"\n />\n <svg *ngIf="isSearchInputFocused" class="cancel-icon" (click)="searchInputCanceled($event)" width="24" height="24"\n viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M8.87446 7.32144C8.44588 6.89285 7.751 6.89285 7.32242 7.32144C6.89383 7.75002 6.89383 8.4449 7.32242 8.87349L10.4488 11.9999L7.32357 15.1252C6.89498 15.5538 6.89498 16.2486 7.32357 16.6772C7.75215 17.1058 8.44703 17.1058 8.87561 16.6772L12.0009 13.552L15.1261 16.6772C15.5547 17.1058 16.2496 17.1058 16.6781 16.6772C17.1067 16.2486 17.1067 15.5537 16.6781 15.1251L13.5529 11.9999L16.6793 8.87354C17.1079 8.44496 17.1079 7.75008 16.6793 7.3215C16.2507 6.89291 15.5558 6.89291 15.1273 7.3215L12.0009 10.4479L8.87446 7.32144Z"\n fill="#6A737D" />\n </svg>\n </div>\n <div class="items">\n <div class="item" [ngClass]="{\'item-disabled\': item.disabled}" (click)="item.disabled ? null : selectItem(item)" *ngFor="let item of searchInput ? searchData : data">\n <div class="label" [ngStyle]="{\'width\': item.icon? \'90%\': \'100%\'}">\n {{ item.label }}\n </div>\n <div class="icon-container" *ngIf="item.icon">\n <img class="icon" [src]="item.icon" alt="no img">\n </div>\n </div>\n <div class="noData" *ngIf="(searchInput ? searchData : data).length === 0">\n {{ searchInput === \'\' ? noDataMessage : \'No results\' }}\n </div>\n </div>\n </div>\n </div>\n</div>\n',styles:[".main-container{position:relative;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;height:32px;width:256px;font-family:Lato,sans-serif!important}.main-container .dropdown{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;height:inherit;border:1px solid #e0e0e0;border-radius:6px;background-color:#fff;cursor:pointer;display:flex;justify-content:space-between;align-items:center;width:100%;box-sizing:border-box;padding:0 12px}.main-container .dropdown:hover{background-color:#f5f7fc}.main-container .dropdown .label{box-sizing:border-box;display:flex;justify-content:flex-start;align-items:center;width:calc(100% - 32px)}.main-container .dropdown .label,.main-container .dropdown .label .text{font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.main-container .dropdown .label .text{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.main-container .dropdown .label .count{background-color:#e0e0e0;border-radius:50%;padding:2px 7px;margin:0}.main-container .dropdown .handle{width:24px;height:24px;transition:.3s;position:absolute;right:12px;border-radius:50%;overflow:hidden}.main-container .popup-container{position:absolute;top:4px;width:100%;max-height:340px;padding-bottom:0;border:1px solid #e0e0e0;border-radius:8px;background-color:#fff;box-shadow:0 12px 24px 0 rgba(0,0,0,.12);overflow:scroll;overflow-x:hidden;display:flex;flex-direction:column;justify-content:space-between;z-index:100}.main-container .popup-container::-webkit-scrollbar{width:0;height:0}.main-container .popup-container .search-container{position:relative;box-sizing:border-box;padding:8px}.main-container .popup-container .search-container .search-icon{position:absolute;width:24px;height:24px;top:50%;transform:translateY(-50%);left:18px;z-index:1}.main-container .popup-container .search-container .search-input{height:40px;width:100%;padding:12px;border:1px solid #e0e0e0;box-sizing:border-box;border-radius:8px;outline:none;caret-color:#0937b2;font-style:normal;font-weight:400;font-size:12px;line-height:18px;display:flex;align-items:center;letter-spacing:.2px;color:#181f33}.main-container .popup-container .search-container .cancel-icon{position:absolute;cursor:pointer;width:24px;height:24px;top:50%;transform:translateY(-50%);right:18px;z-index:1}.main-container .popup-container .items{padding:8px 0 8px 8px;overflow-y:scroll;height:100%}.main-container .popup-container .items::-webkit-scrollbar{width:5px;height:0}.main-container .popup-container .items::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:10px}.main-container .popup-container .items .noData{display:flex;justify-content:center;align-items:center;font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.main-container .popup-container .items .item{cursor:pointer;display:flex;justify-content:flex-start;align-items:center;gap:10px;padding:8px 12px;border-radius:6px;height:auto;letter-spacing:.2px;color:#181f33}.main-container .popup-container .items .item:hover{background-color:#f5f7fc}.main-container .popup-container .items .item .label{width:100%;line-height:20px;font-size:14px;font-style:normal;font-weight:400}.main-container .popup-container .items .item .icon-container{width:10%;display:flex;justify-content:flex-end}.main-container .popup-container .items .item .icon-container .icon{width:20px;height:20px}.main-container .popup-container .items .item-disabled{cursor:not-allowed}.main-container .popup-container .items .item-disabled:hover{background-color:transparent}.main-container .popup-container .items .item-disabled .label{color:#929dab;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.position-left{right:0}.position-right{left:0}"]}]}],o.ctorParameters=function(){return[{type:n.ElementRef}]},o.propDecorators={data:[{type:n.Input}],height:[{type:n.Input}],width:[{type:n.Input}],label:[{type:n.Input}],dropdownListHeight:[{type:n.Input}],dropdownListWidth:[{type:n.Input}],dropdownListPosition:[{type:n.Input}],searchEnabled:[{type:n.Input}],selectedItem:[{type:n.Input}],noDataMessage:[{type:n.Input}],onChange:[{type:n.Output}],clickout:[{type:n.HostListener,args:["document:click",["$event"]]}]};var r=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[]}},e}();r.decorators=[{type:n.NgModule,args:[{declarations:[o],imports:[t.CommonModule,i.FormsModule],exports:[o]}]}],e.DropdownComponent=o,e.DropdownModule=r,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=mis-crystal-design-system-dropdown.umd.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../projects/mis-components/dropdown/dropdown.component.ts","../../../projects/mis-components/dropdown/dropdown.module.ts"],"names":["DropdownComponent","eRef","this","isOpen","isSearchInputFocused","searchInput","searchData","data","height","width","label","dropdownListHeight","dropdownListWidth","dropdownListPosition","searchEnabled","selectedItem","value","noDataMessage","onChange","EventEmitter","prototype","ngOnInit","clickout","event","nativeElement","contains","target","onCancel","filterByValue","array","string","filter","o","toLowerCase","includes","searchInputOnChange","newValue","searchInputFocused","isFocused","searchInputCanceled","stopPropagation","toggleDropdown","selectItem","item","emit","Component","args","selector","template","ElementRef","Input","Output","HostListener","DropdownModule","forRoot","ngModule","providers","NgModule","declarations","imports","CommonModule","FormsModule","exports"],"mappings":"+iBAoCI,SAAAA,EAAoBC,GAAAC,KAAAD,KAAAA,EApBpBC,KAAAC,QAAS,EACTD,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,CACPC,SAAU,eACVC,SAAA,
|
|
1
|
+
{"version":3,"sources":["../../../projects/mis-components/dropdown/dropdown.component.ts","../../../projects/mis-components/dropdown/dropdown.module.ts"],"names":["DropdownComponent","eRef","this","isOpen","isSearchInputFocused","searchInput","searchData","data","height","width","label","dropdownListHeight","dropdownListWidth","dropdownListPosition","searchEnabled","selectedItem","value","noDataMessage","onChange","EventEmitter","prototype","ngOnInit","clickout","event","nativeElement","contains","target","onCancel","filterByValue","array","string","filter","o","toLowerCase","includes","searchInputOnChange","newValue","searchInputFocused","isFocused","searchInputCanceled","stopPropagation","toggleDropdown","selectItem","item","emit","Component","args","selector","template","ElementRef","Input","Output","HostListener","DropdownModule","forRoot","ngModule","providers","NgModule","declarations","imports","CommonModule","FormsModule","exports"],"mappings":"+iBAoCI,SAAAA,EAAoBC,GAAAC,KAAAD,KAAAA,EApBpBC,KAAAC,QAAS,EACTD,KAAAE,sBAAgC,EAChCF,KAAAG,YAAsB,GACtBH,KAAAI,WAA6B,GAEpBJ,KAAAK,KAAuB,GACvBL,KAAAM,OAAiB,GACjBN,KAAAO,MAAgB,GAChBP,KAAAQ,MAAgB,SAEhBR,KAAAS,mBAA6B,GAC7BT,KAAAU,kBAA4B,GAC5BV,KAAAW,qBAAyC,OAEzCX,KAAAY,eAAyB,EACzBZ,KAAAa,aAA6B,CAAEC,MAAO,GAAIN,MAAO,IACjDR,KAAAe,cAAwB,UAEvBf,KAAAgB,SAA8B,IAAIC,EAAAA,oBAG5CnB,EAAAoB,UAAAC,SAAA,aAGArB,EAAAoB,UAAAE,SAAA,SAASC,IACqBrB,KAAKD,KAAKuB,cAAcC,SAASF,EAAMG,SAE7DxB,KAAKyB,YAGb3B,EAAAoB,UAAAQ,cAAA,SAAcC,EAAuBC,GACjC,OAAOD,EAAME,QAAO,SAAAC,GAChB,OAAAA,EAAEtB,MAAMuB,cAAcC,SAASJ,EAAOG,mBAG9CjC,EAAAoB,UAAAe,oBAAA,SAAoBC,GAChBlC,KAAKG,YAAc+B,EACfA,EACAlC,KAAKI,WAAaJ,KAAK0B,cAAc1B,KAAKK,KAAM6B,IAEhDlC,KAAKI,WAAa,GAClBJ,KAAKG,YAAc,KAG3BL,EAAAoB,UAAAiB,mBAAA,SAAmBC,GACfpC,KAAKE,qBAAuBkC,GAEhCtC,EAAAoB,UAAAmB,oBAAA,SAAoBhB,GAChBA,EAAMiB,kBACNtC,KAAKG,YAAc,GACnBH,KAAKE,sBAAuB,GAEhCJ,EAAAoB,UAAAqB,eAAA,WACIvC,KAAKC,QAAUD,KAAKC,QAExBH,EAAAoB,UAAAsB,WAAA,SAAWC,GACPzC,KAAKgB,SAAS0B,KAAKD,GACnBzC,KAAKuC,kBAETzC,EAAAoB,UAAAO,SAAA,WACIzB,KAAKE,sBAAuB,EAC5BF,KAAKC,QAAS,EACdD,KAAKG,YAAc,6BApE1BwC,EAAAA,UAASC,KAAA,CAAC,CACPC,SAAU,eACVC,SAAA,u3QAVAC,EAAAA,4CAmBCC,EAAAA,sBACAA,EAAAA,qBACAA,EAAAA,qBACAA,EAAAA,kCAEAA,EAAAA,iCACAA,EAAAA,oCACAA,EAAAA,6BAEAA,EAAAA,4BACAA,EAAAA,6BACAA,EAAAA,wBAEAC,EAAAA,yBAKAC,EAAAA,aAAYN,KAAA,CAAC,iBAAkB,CAAC,+BC7BrC,SAAAO,YACWA,EAAAC,QAAP,WACI,MAAO,CAAEC,SAAUF,EAAgBG,UAAW,8BAPrDC,EAAAA,SAAQX,KAAA,CAAC,CACNY,aAAc,CAAC1D,GACf2D,QAAS,CAACC,EAAAA,aAAcC,EAAAA,aACxBC,QAAS,CAAC9D","sourcesContent":["import {\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnInit,\n Output\n} from '@angular/core';\n\n@Component({\n selector: 'mis-dropdown',\n templateUrl: './dropdown.component.html',\n styleUrls: ['./dropdown.component.scss']\n})\nexport class DropdownComponent implements OnInit {\n isOpen = false;\n isSearchInputFocused: boolean = false;\n searchInput: string = '';\n searchData: DropdownItem[] = [];\n\n @Input() data: DropdownItem[] = [];\n @Input() height: string = ''\n @Input() width: string = ''\n @Input() label: string = 'Select';\n\n @Input() dropdownListHeight: string = ''\n @Input() dropdownListWidth: string = ''\n @Input() dropdownListPosition: 'Left' | 'Right' = 'Left'\n\n @Input() searchEnabled: boolean = true;\n @Input() selectedItem: DropdownItem = { value: '', label: '' };\n @Input() noDataMessage: string = 'No Data';\n\n @Output() onChange: EventEmitter<any> = new EventEmitter();\n\n constructor(private eRef: ElementRef) { }\n ngOnInit() { }\n\n @HostListener('document:click', ['$event'])\n clickout(event) {\n const isClickedOutside = !this.eRef.nativeElement.contains(event.target);\n if (isClickedOutside) {\n this.onCancel();\n }\n }\n filterByValue(array: DropdownItem[], string: string) {\n return array.filter(o =>\n o.label.toLowerCase().includes(string.toLowerCase())\n );\n }\n searchInputOnChange(newValue) {\n this.searchInput = newValue;\n if (newValue) {\n this.searchData = this.filterByValue(this.data, newValue);\n } else {\n this.searchData = [];\n this.searchInput = '';\n }\n }\n searchInputFocused(isFocused: boolean) {\n this.isSearchInputFocused = isFocused;\n }\n searchInputCanceled(event) {\n event.stopPropagation();\n this.searchInput = '';\n this.isSearchInputFocused = false;\n }\n toggleDropdown() {\n this.isOpen = !this.isOpen;\n }\n selectItem(item) {\n this.onChange.emit(item);\n this.toggleDropdown();\n }\n onCancel() {\n this.isSearchInputFocused = false;\n this.isOpen = false;\n this.searchInput = '';\n }\n}\nexport interface DropdownItem {\n label: string;\n value: string;\n icon?: string;\n disabled?: boolean;\n}\n","import { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\nimport { DropdownComponent } from './dropdown.component';\n\n@NgModule({\n declarations: [DropdownComponent],\n imports: [CommonModule, FormsModule],\n exports: [DropdownComponent]\n})\nexport class DropdownModule {\n static forRoot(): ModuleWithProviders<DropdownModule> {\n return { ngModule: DropdownModule, providers: [] };\n }\n}\n"]}
|
|
@@ -339,6 +339,7 @@
|
|
|
339
339
|
this.searchEnabled = true;
|
|
340
340
|
this.showSelectedCount = false;
|
|
341
341
|
this.noDataMessage = 'No Data';
|
|
342
|
+
this.hideApplyButton = false;
|
|
342
343
|
this.onChange = new core.EventEmitter();
|
|
343
344
|
this.isSearchInputFocused = false;
|
|
344
345
|
}
|
|
@@ -434,6 +435,9 @@
|
|
|
434
435
|
if (this.searchEnabled) {
|
|
435
436
|
this.searchInputOnChange(this.searchInput);
|
|
436
437
|
}
|
|
438
|
+
if (this.hideApplyButton) {
|
|
439
|
+
this.applyFilters();
|
|
440
|
+
}
|
|
437
441
|
};
|
|
438
442
|
MultiSelectDropdownComponent.prototype.applyFilters = function () {
|
|
439
443
|
this.onChange.emit(this.localData
|
|
@@ -444,7 +448,9 @@
|
|
|
444
448
|
var checked = item.checked, data = __rest(item, ["checked"]);
|
|
445
449
|
return data;
|
|
446
450
|
}));
|
|
447
|
-
this.
|
|
451
|
+
if (!this.hideApplyButton) {
|
|
452
|
+
this.onCancel();
|
|
453
|
+
}
|
|
448
454
|
};
|
|
449
455
|
MultiSelectDropdownComponent.prototype.onReset = function () {
|
|
450
456
|
this.isSearchInputFocused = false;
|
|
@@ -471,7 +477,7 @@
|
|
|
471
477
|
MultiSelectDropdownComponent.decorators = [
|
|
472
478
|
{ type: core.Component, args: [{
|
|
473
479
|
selector: 'mis-multi-select-dropdown',
|
|
474
|
-
template: "<div class=\"container\" [ngStyle]=\"{\n 'height': height.length > 0? height: '',\n 'width': width.length > 0? width: ''\n }\"\n>\n <div class=\"dropdown\" (click)=\"toggleDropdown()\" [ngStyle]=\"{'background': isOpen ? '#E6EBF7': ''}\">\n <div class=\"label\">\n <p class=\"text\">{{ label }}</p>\n <p *ngIf=\"showSelectedCount && localSelectedItems?.length > 0\" class=\"count\">\n {{ localSelectedItems?.length }}\n </p>\n </div>\n <svg class=\"handle\" [ngStyle]=\"{ transform: isOpen ? 'rotate(180deg)': 'rotate(0deg)' }\" width=\"20\" height=\"20\"\n viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M13.825 7.15845L10 10.9751L6.175 7.15845L5 8.33345L10 13.3334L15 8.33345L13.825 7.15845Z\" fill=\"#181F33\" />\n </svg>\n </div>\n <div style=\"flex-basis: 0;\"></div>\n <div style=\"width: 100%; position: relative;\">\n <div *ngIf=\"isOpen\" class=\"popup-container\"\n [ngStyle]=\"{\n 'height': dropdownListHeight,\n 'width': dropdownListWidth\n }\"\n [ngClass]=\"{\n 'position-left': dropdownListPosition === 'Left',\n 'position-right': dropdownListPosition === 'Right'\n }\"\n >\n <div *ngIf=\"searchEnabled\" class=\"search-container\">\n <svg *ngIf=\"!isSearchInputFocused\" class=\"search-icon\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M4.21508 11.1456C4.21508 7.3179 7.33722 4.21165 11.1926 4.21165C15.048 4.21165 18.1702 7.3179 18.1702 11.1456C18.1702 12.6931 17.6599 14.1226 16.7972 15.2767L15.3685 16.7013C14.2044 17.5668 12.759 18.0796 11.1926 18.0796C7.33722 18.0796 4.21508 14.9734 4.21508 11.1456ZM15.9421 17.7835C14.6021 18.7329 12.9627 19.2913 11.1926 19.2913C6.66977 19.2913 3 15.6461 3 11.1456C3 6.64512 6.66977 3 11.1926 3C15.7155 3 19.3852 6.64512 19.3852 11.1456C19.3852 12.9371 18.8037 14.5931 17.8184 15.9375L19.8361 17.4048C20.6705 17.912 21.7554 18.6543 20.2454 20.215C18.7353 21.7756 18.0099 20.6663 17.4991 19.8364L15.9421 17.7835Z\"\n fill=\"#6A737D\" />\n </svg>\n <input\n [ngModel]=\"searchInput\"\n [ngStyle]=\"{ paddingLeft: isSearchInputFocused ? '12px' : '45px', border:isSearchInputFocused? '1px solid #0937B2':'1px solid #e0e0e0', paddingRight: isSearchInputFocused ? '45px' : '10px' }\"\n (ngModelChange)=\"searchInputOnChange($event)\"\n [placeholder]=\"isSearchInputFocused ? '' : 'Search Keyword'\"\n (focus)=\"searchInputFocused(true)\"\n class=\"search-input\"\n />\n <svg *ngIf=\"isSearchInputFocused\" class=\"cancel-icon\" (click)=\"searchInputCanceled($event)\" width=\"24\" height=\"24\"\n viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M8.87446 7.32144C8.44588 6.89285 7.751 6.89285 7.32242 7.32144C6.89383 7.75002 6.89383 8.4449 7.32242 8.87349L10.4488 11.9999L7.32357 15.1252C6.89498 15.5538 6.89498 16.2486 7.32357 16.6772C7.75215 17.1058 8.44703 17.1058 8.87561 16.6772L12.0009 13.552L15.1261 16.6772C15.5547 17.1058 16.2496 17.1058 16.6781 16.6772C17.1067 16.2486 17.1067 15.5537 16.6781 15.1251L13.5529 11.9999L16.6793 8.87354C17.1079 8.44496 17.1079 7.75008 16.6793 7.3215C16.2507 6.89291 15.5558 6.89291 15.1273 7.3215L12.0009 10.4479L8.87446 7.32144Z\"\n fill=\"#6A737D\" />\n </svg>\n </div>\n <div class=\"items\">\n <div class=\"item\" (click)=\"toggleSelectedItems($event, item)\" *ngFor=\"let item of searchInput ? searchData : localData\">\n <div class=\"checkbox-container-wrapper\">\n <div class=\"checkbox-container\">\n <mis-checkbox\n [checked]=\"item.checked\"\n ></mis-checkbox>\n </div>\n <p class=\"label\">\n {{ item.label }}\n </p>\n </div>\n <div class=\"icon-container\" *ngIf=\"item.icon\">\n <img class=\"icon\" [src]=\"item.icon\" alt=\"no img\">\n </div>\n </div>\n <div class=\"noData\" *ngIf=\"(searchInput ? searchData : localData).length === 0\">\n {{ searchInput === '' ? noDataMessage : 'No results' }}\n </div>\n </div>\n <div *ngIf=\"localData.length !== 0\" class=\"actions-container\">\n <div style=\"width: calc(50% - 4px)\">\n <mis-button\n [name]=\"'Reset'\"\n [type]=\"'Text'\"\n [width]=\"'100%'\"\n (click)=\"onReset()\"\n ></mis-button>\n </div>\n <div style=\"width: calc(50% - 4px)\">\n <mis-button\n [name]=\"'Apply'\"\n [type]=\"'Solid'\"\n [width]=\"'100%'\"\n (click)=\"applyFilters()\"\n ></mis-button>\n </div>\n </div>\n </div>\n </div>\n\n</div>\n",
|
|
480
|
+
template: "<div class=\"container\" [ngStyle]=\"{\n 'height': height.length > 0? height: '',\n 'width': width.length > 0? width: ''\n }\"\n>\n <div class=\"dropdown\" (click)=\"toggleDropdown()\" [ngStyle]=\"{'background': isOpen ? '#E6EBF7': ''}\">\n <div class=\"label\">\n <p class=\"text\">{{ label }}</p>\n <p *ngIf=\"showSelectedCount && localSelectedItems?.length > 0\" class=\"count\">\n {{ localSelectedItems?.length }}\n </p>\n </div>\n <svg class=\"handle\" [ngStyle]=\"{ transform: isOpen ? 'rotate(180deg)': 'rotate(0deg)' }\" width=\"20\" height=\"20\"\n viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M13.825 7.15845L10 10.9751L6.175 7.15845L5 8.33345L10 13.3334L15 8.33345L13.825 7.15845Z\" fill=\"#181F33\" />\n </svg>\n </div>\n <div style=\"flex-basis: 0;\"></div>\n <div style=\"width: 100%; position: relative;\">\n <div *ngIf=\"isOpen\" class=\"popup-container\"\n [ngStyle]=\"{\n 'height': dropdownListHeight,\n 'width': dropdownListWidth\n }\"\n [ngClass]=\"{\n 'position-left': dropdownListPosition === 'Left',\n 'position-right': dropdownListPosition === 'Right'\n }\"\n >\n <div *ngIf=\"searchEnabled\" class=\"search-container\">\n <svg *ngIf=\"!isSearchInputFocused\" class=\"search-icon\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M4.21508 11.1456C4.21508 7.3179 7.33722 4.21165 11.1926 4.21165C15.048 4.21165 18.1702 7.3179 18.1702 11.1456C18.1702 12.6931 17.6599 14.1226 16.7972 15.2767L15.3685 16.7013C14.2044 17.5668 12.759 18.0796 11.1926 18.0796C7.33722 18.0796 4.21508 14.9734 4.21508 11.1456ZM15.9421 17.7835C14.6021 18.7329 12.9627 19.2913 11.1926 19.2913C6.66977 19.2913 3 15.6461 3 11.1456C3 6.64512 6.66977 3 11.1926 3C15.7155 3 19.3852 6.64512 19.3852 11.1456C19.3852 12.9371 18.8037 14.5931 17.8184 15.9375L19.8361 17.4048C20.6705 17.912 21.7554 18.6543 20.2454 20.215C18.7353 21.7756 18.0099 20.6663 17.4991 19.8364L15.9421 17.7835Z\"\n fill=\"#6A737D\" />\n </svg>\n <input\n [ngModel]=\"searchInput\"\n [ngStyle]=\"{ paddingLeft: isSearchInputFocused ? '12px' : '45px', border:isSearchInputFocused? '1px solid #0937B2':'1px solid #e0e0e0', paddingRight: isSearchInputFocused ? '45px' : '10px' }\"\n (ngModelChange)=\"searchInputOnChange($event)\"\n [placeholder]=\"isSearchInputFocused ? '' : 'Search Keyword'\"\n (focus)=\"searchInputFocused(true)\"\n class=\"search-input\"\n />\n <svg *ngIf=\"isSearchInputFocused\" class=\"cancel-icon\" (click)=\"searchInputCanceled($event)\" width=\"24\" height=\"24\"\n viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M8.87446 7.32144C8.44588 6.89285 7.751 6.89285 7.32242 7.32144C6.89383 7.75002 6.89383 8.4449 7.32242 8.87349L10.4488 11.9999L7.32357 15.1252C6.89498 15.5538 6.89498 16.2486 7.32357 16.6772C7.75215 17.1058 8.44703 17.1058 8.87561 16.6772L12.0009 13.552L15.1261 16.6772C15.5547 17.1058 16.2496 17.1058 16.6781 16.6772C17.1067 16.2486 17.1067 15.5537 16.6781 15.1251L13.5529 11.9999L16.6793 8.87354C17.1079 8.44496 17.1079 7.75008 16.6793 7.3215C16.2507 6.89291 15.5558 6.89291 15.1273 7.3215L12.0009 10.4479L8.87446 7.32144Z\"\n fill=\"#6A737D\" />\n </svg>\n </div>\n <div class=\"items\">\n <div class=\"item\" (click)=\"toggleSelectedItems($event, item)\" *ngFor=\"let item of searchInput ? searchData : localData\">\n <div class=\"checkbox-container-wrapper\">\n <div class=\"checkbox-container\">\n <mis-checkbox\n [checked]=\"item.checked\"\n ></mis-checkbox>\n </div>\n <p class=\"label\">\n {{ item.label }}\n </p>\n </div>\n <div class=\"icon-container\" *ngIf=\"item.icon\">\n <img class=\"icon\" [src]=\"item.icon\" alt=\"no img\">\n </div>\n </div>\n <div class=\"noData\" *ngIf=\"(searchInput ? searchData : localData).length === 0\">\n {{ searchInput === '' ? noDataMessage : 'No results' }}\n </div>\n </div>\n <div *ngIf=\"localData.length !== 0 && !hideApplyButton\" class=\"actions-container\">\n <div style=\"width: calc(50% - 4px)\">\n <mis-button\n [name]=\"'Reset'\"\n [type]=\"'Text'\"\n [width]=\"'100%'\"\n (click)=\"onReset()\"\n ></mis-button>\n </div>\n <div style=\"width: calc(50% - 4px)\">\n <mis-button\n [name]=\"'Apply'\"\n [type]=\"'Solid'\"\n [width]=\"'100%'\"\n (click)=\"applyFilters()\"\n ></mis-button>\n </div>\n </div>\n </div>\n </div>\n\n</div>\n",
|
|
475
481
|
styles: [".container{position:relative;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;height:32px;width:256px;font-family:Lato,sans-serif!important}.container .dropdown{height:inherit;border:1px solid #e0e0e0;border-radius:6px;background-color:#fff;cursor:pointer;display:flex;justify-content:space-between;align-items:center;width:100%;padding:0 12px;overflow:hidden}.container .dropdown:hover{background-color:#f5f7fc}.container .dropdown .label{display:flex;justify-content:flex-start;align-items:center;width:calc(100% - 32px)}.container .dropdown .label,.container .dropdown .label .text{font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.container .dropdown .label .text{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.container .dropdown .label .count{background-color:#e0e0e0;border-radius:50%;padding:2px 7px;margin:0 0 0 8px;font-style:normal;font-weight:400;font-size:14px;line-height:20px;text-align:center;letter-spacing:.2px;color:#181f33}.container .dropdown .handle{width:24px;height:24px;transition:.3s;position:absolute;right:12px;border-radius:50%;overflow:hidden}.container .popup-container{position:absolute;top:4px;width:100%;max-height:340px;padding-bottom:0;border:1px solid #e0e0e0;border-radius:8px;background-color:#fff;box-shadow:0 12px 24px 0 rgba(0,0,0,.12);overflow:scroll;overflow-x:hidden;display:flex;flex-direction:column;justify-content:space-between;z-index:100}.container .popup-container::-webkit-scrollbar{width:0;height:0}.container .popup-container .search-container{position:relative;box-sizing:border-box;padding:8px}.container .popup-container .search-container .search-icon{position:absolute;width:24px;height:24px;top:50%;transform:translateY(-50%);left:18px;z-index:1}.container .popup-container .search-container .search-input{height:40px;width:100%;padding:12px;border:1px solid #e0e0e0;box-sizing:border-box;border-radius:8px;outline:none;caret-color:#0937b2;font-style:normal;font-weight:400;font-size:12px;line-height:18px;display:flex;align-items:center;letter-spacing:.2px;color:#181f33}.container .popup-container .search-container .cancel-icon{position:absolute;cursor:pointer;width:24px;height:24px;top:50%;transform:translateY(-50%);right:18px;z-index:1}.container .popup-container .items{padding:8px 0 8px 8px;overflow-y:scroll;height:100%}.container .popup-container .items::-webkit-scrollbar{width:5px;height:0}.container .popup-container .items::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:10px}.container .popup-container .items .noData{display:flex;justify-content:center;align-items:center;font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.container .popup-container .items .item{cursor:pointer;display:flex;justify-content:flex-start;align-items:center;padding:8px 12px;border-radius:6px;height:auto}.container .popup-container .items .item:hover{background-color:#f5f7fc}.container .popup-container .items .item .checkbox-container-wrapper{display:flex;justify-content:flex-start;align-items:center;width:90%}.container .popup-container .items .item .checkbox-container-wrapper .checkbox-container{display:block;position:relative;cursor:pointer;font-size:22px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.container .popup-container .items .item .checkbox-container-wrapper .checkbox-container input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.container .popup-container .items .item .checkbox-container-wrapper .checkbox-container input:checked~.checkmark:after{display:block}.container .popup-container .items .item .checkbox-container-wrapper .checkbox-container .checkmark{position:absolute;top:-8px;left:0;height:15px;width:15px;border-radius:4px;background-color:#0079f1;border:1px solid #6a737d}.container .popup-container .items .item .checkbox-container-wrapper .checkbox-container .checkmark:after{content:\"\";position:absolute;display:none;left:5px;top:2px;width:3px;height:6px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}.container .popup-container .items .item .checkbox-container-wrapper .label{margin:0 0 0 8px;line-height:20px;font-size:14px;font-style:normal;font-weight:400;letter-spacing:.200000003px}.container .popup-container .items .item .icon-container{width:10%;display:flex;justify-content:flex-end}.container .popup-container .items .item .icon-container .icon{width:20px;height:20px}.container .popup-container .actions-container{display:flex;justify-content:space-between;bottom:0;align-items:center;position:-webkit-sticky;position:sticky;padding:16px;background-color:#fff;border-top:1px solid #e0e0e0}.container .popup-container .actions-container .cancel{cursor:pointer;padding:10px 32px;text-align:center;font-size:16px;line-height:24px;border-radius:8px}.container .popup-container .actions-container .cancel:hover{background:rgba(9,55,178,.04)}.container .popup-container .actions-container .apply{cursor:pointer;padding:10px 32px;text-align:center;color:#fff;font-size:16px;line-height:24px;background:#0937b2;border-radius:8px}.position-left{right:0}.position-right{left:0}"]
|
|
476
482
|
},] }
|
|
477
483
|
];
|
|
@@ -490,6 +496,7 @@
|
|
|
490
496
|
showSelectedCount: [{ type: core.Input }],
|
|
491
497
|
noDataMessage: [{ type: core.Input }],
|
|
492
498
|
selectedItems: [{ type: core.Input }],
|
|
499
|
+
hideApplyButton: [{ type: core.Input }],
|
|
493
500
|
onChange: [{ type: core.Output }],
|
|
494
501
|
clickout: [{ type: core.HostListener, args: ['document:click', ['$event'],] }]
|
|
495
502
|
};
|