package.cjs.initializers.dayjs.js.map Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neeto-commons-frontend Show documentation
Show all versions of neeto-commons-frontend Show documentation
A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.
{"version":3,"file":"dayjs.js","names":["_dayjs","_interopRequireDefault","require","_advancedFormat","_customParseFormat","_duration","_isSameOrAfter","_isSameOrBefore","_isToday","_localeData","_localizedFormat","_minMax","_quarterOfYear","_relativeTime","_timezone","_updateLocale","_utc","_weekday","_weekOfYear","initializeDayjs","skipTimezone","arguments","length","undefined","pureDayjs","extend","advancedFormat","customParseFormat","duration","isSameOrAfter","isSameOrBefore","isToday","localeData","localizedFormat","minMax","quarterOfYear","relativeTime","timezone","updateLocale","utc","weekday","weekOfYear","_default","exports"],"sources":["../../../src/initializers/dayjs.js"],"sourcesContent":["import pureDayjs from \"dayjs\";\nimport advancedFormat from \"dayjs/plugin/advancedFormat\";\nimport customParseFormat from \"dayjs/plugin/customParseFormat\";\nimport duration from \"dayjs/plugin/duration\";\nimport isSameOrAfter from \"dayjs/plugin/isSameOrAfter\";\nimport isSameOrBefore from \"dayjs/plugin/isSameOrBefore\";\nimport isToday from \"dayjs/plugin/isToday\";\nimport localeData from \"dayjs/plugin/localeData\";\nimport localizedFormat from \"dayjs/plugin/localizedFormat\";\nimport minMax from \"dayjs/plugin/minMax\";\nimport quarterOfYear from \"dayjs/plugin/quarterOfYear\";\nimport relativeTime from \"dayjs/plugin/relativeTime\";\nimport timezone from \"dayjs/plugin/timezone\";\nimport updateLocale from \"dayjs/plugin/updateLocale\";\nimport utc from \"dayjs/plugin/utc\";\nimport weekday from \"dayjs/plugin/weekday\";\nimport weekOfYear from \"dayjs/plugin/weekOfYear\";\n\n// const isValidTimezone = timezone => {\n// try {\n// pureDayjs().tz(timezone);\n\n// return true;\n// } catch {\n// return false;\n// }\n// };\n\n// eslint-disable-next-line no-unused-vars\nconst initializeDayjs = (skipTimezone = false) => {\n pureDayjs.extend(advancedFormat);\n pureDayjs.extend(customParseFormat);\n pureDayjs.extend(duration);\n pureDayjs.extend(isSameOrAfter);\n pureDayjs.extend(isSameOrBefore);\n pureDayjs.extend(isToday);\n pureDayjs.extend(localeData);\n pureDayjs.extend(localizedFormat);\n pureDayjs.extend(minMax);\n pureDayjs.extend(quarterOfYear);\n pureDayjs.extend(relativeTime);\n pureDayjs.extend(timezone);\n pureDayjs.extend(updateLocale);\n pureDayjs.extend(utc);\n pureDayjs.extend(weekday);\n pureDayjs.extend(weekOfYear);\n\n // const shouldInitializeTimezone =\n // !skipTimezone &&\n // globalProps?.user?.timeZone &&\n // isValidTimezone(globalProps?.user?.timeZone);\n\n // if (shouldInitializeTimezone) {\n // pureDayjs.tz.setDefault(globalProps?.user?.timeZone);\n // }\n};\n\nexport default initializeDayjs;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,kBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,SAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,cAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,eAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,QAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,WAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,gBAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,OAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,cAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,aAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,SAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,aAAA,GAAAd,sBAAA,CAAAC,OAAA;AACA,IAAAc,IAAA,GAAAf,sBAAA,CAAAC,OAAA;AACA,IAAA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