package.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":["pureDayjs","advancedFormat","customParseFormat","duration","isSameOrAfter","isSameOrBefore","isToday","localeData","localizedFormat","minMax","quarterOfYear","relativeTime","timezone","updateLocale","utc","weekday","weekOfYear","initializeDayjs","skipTimezone","arguments","length","undefined","extend"],"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,OAAOA,SAAS,MAAM,OAAO;AAC7B,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAAOC,iBAAiB,MAAM,gCAAgC;AAC9D,OAAOC,QAAQ,MAAM,uBAAuB;AAC5C,OAAOC,aAAa,MAAM,4BAA4B;AACtD,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAAOC,OAAO,MAAM,sBAAsB;AAC1C,OAAOC,UAAU,MAAM,yBAAyB;AAChD,OAAOC,eAAe,MAAM,8BAA8B;AAC1D,OAAOC,MAAM,MAAM,qBAAqB;AACxC,OAAOC,aAAa,MAAM,4BAA4B;AACtD,OAAOC,YAAY,MAAM,2BAA2B;AACpD,OAAOC,QAAQ,MAAM,uBAAuB;AAC5C,OAAOC,YAAY,MAAM,2BAA2B;AACpD,OAAOC,GAAG,MAAM,kBAAkB;AAClC,OAAOC,OAAO,MAAM,sBAAsB;AAC1C,OAAOC,UAAU,MAAM,yBAAyB;;AAEhD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,CAAA,EAA6B;EAAA,IAAzBC,YAAY,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAC3CnB,SAAS,CAACsB,MAAM,CAACrB,cAAc,CAAC;EAChCD,SAAS,CAACsB,MAAM,CAACpB,iBAAi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