@posiwise/utils 0.0.68 → 0.0.70

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.
@@ -1 +1 @@
1
- {"version":3,"file":"posiwise-utils.mjs","sources":["../../../../libs/utils/src/lib/quill-helper.ts","../../../../libs/utils/src/lib/decorators.ts","../../../../libs/utils/src/lib/routing.helper.ts","../../../../libs/utils/src/posiwise-utils.ts"],"sourcesContent":["import Quill from 'quill';\nimport ImageResize from 'quill-image-resize';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst BlockEmbed = Quill.import('formats/image') as any;\n\nclass NoDragImage extends BlockEmbed {\n static create(value) {\n const node = super.create();\n node.setAttribute('src', value.url);\n node.setAttribute('alt', value.alt || '');\n node.setAttribute('class', 'no-drag-image');\n node.setAttribute('draggable', 'false');\n if (value.align) {\n switch (value.align) {\n case 'left':\n node.style.float = 'left';\n node.style.marginRight = '1em';\n break;\n case 'right':\n node.style.float = 'right';\n node.style.marginLeft = '1em';\n break;\n case 'center':\n node.style.display = 'block';\n node.style.marginLeft = 'auto';\n node.style.marginRight = 'auto';\n break;\n default:\n node.style.float = 'none';\n }\n }\n\n return node;\n }\n\n static value(node) {\n return {\n url: node.getAttribute('src'),\n alt: node.getAttribute('alt'),\n align: node.style.float || 'center'\n };\n }\n}\n\nclass NoDragDrop {\n constructor(quill, _options) {\n quill.root.addEventListener('drop', this.handleDrop.bind(this, quill));\n quill.root.addEventListener('dragover', this.preventDefault);\n }\n\n preventDefault(e) {\n e.preventDefault();\n e.stopPropagation();\n }\n\n handleDrop(quill, e) {\n this.preventDefault(e);\n\n // Create a MutationObserver to detect inserted images\n const observer = new MutationObserver(mutations => {\n this.removeInsertedImages(quill, mutations);\n });\n\n // Start observing for added nodes\n observer.observe(quill.root, { childList: true, subtree: true });\n\n // Stop observing after a short delay\n setTimeout(() => {\n observer.disconnect();\n }, 1000); // Adjust the timeout as needed\n }\n\n removeInsertedImages(quill, mutations) {\n mutations.forEach(mutation => {\n mutation.addedNodes.forEach(node => {\n if (node instanceof HTMLImageElement) {\n node.remove();\n } else if (node.nodeType === Node.ELEMENT_NODE) {\n node.querySelectorAll('img').forEach(img => img.remove());\n }\n });\n });\n }\n}\n\nNoDragImage['blotName'] = 'no-drag-image';\nNoDragImage['tagName'] = 'img';\nQuill.register(NoDragImage);\nQuill.register('modules/noDragDrop', NoDragDrop);\nQuill.register('modules/imageResize', ImageResize);\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst BlockEmbedVideo = Quill.import('blots/block/embed') as any;\nclass NoDragVideo extends BlockEmbedVideo {\n static create(value) {\n const node = document.createElement('iframe');\n node.setAttribute('src', value.url);\n node.setAttribute('frameborder', '0');\n node.setAttribute('allowfullscreen', 'true');\n node.setAttribute('width', value.width || '100%'); // Default width\n node.setAttribute('height', value.height || '200px'); // Default height\n node.setAttribute('class', 'no-drag-media');\n node.setAttribute('contenteditable', 'false'); // Prevent content from being editable\n\n // Create a container for both video/iframe and buttons\n const container = document.createElement('div');\n container.setAttribute('class', 'media-container');\n container.style.position = 'relative';\n container.style.width = '100%';\n container.style.height = 'auto';\n container.appendChild(node); // Append video/iframe to the container\n\n // Append align buttons if not already present\n if (!container.querySelector('.media-align-buttons')) {\n const alignButtons = this.createAlignButtons(container);\n alignButtons.setAttribute('contenteditable', 'false'); // Prevent buttons from being editable\n container.appendChild(alignButtons);\n }\n\n // Append resize buttons if not already present\n if (!container.querySelector('.media-resize-buttons')) {\n const resizeButtons = this.createResizeButtons(container);\n resizeButtons.setAttribute('contenteditable', 'false'); // Prevent buttons from being editable\n container.appendChild(resizeButtons);\n }\n\n container.setAttribute('contenteditable', 'false'); // Prevent the entire container from being editable\n\n return container;\n }\n\n static createAlignButtons(container) {\n const buttonContainer = document.createElement('div');\n buttonContainer.setAttribute('class', 'media-align-buttons');\n buttonContainer.style.position = 'absolute';\n buttonContainer.style.top = '0';\n buttonContainer.style.right = '0';\n buttonContainer.style.display = 'flex';\n buttonContainer.setAttribute('contenteditable', 'false'); // Prevent buttons from being editable\n\n const leftButton = this.createButton('Left', () => {\n container.style.textAlign = 'left';\n container.setAttribute('data-align', 'left'); // Save alignment\n });\n\n const centerButton = this.createButton('Center', () => {\n container.style.textAlign = 'center';\n container.setAttribute('data-align', 'center'); // Save alignment\n });\n\n const rightButton = this.createButton('Right', () => {\n container.style.textAlign = 'right';\n container.setAttribute('data-align', 'right'); // Save alignment\n });\n\n buttonContainer.appendChild(leftButton);\n buttonContainer.appendChild(centerButton);\n buttonContainer.appendChild(rightButton);\n\n return buttonContainer;\n }\n\n static createResizeButtons(container) {\n const buttonContainer = document.createElement('div');\n buttonContainer.setAttribute('class', 'media-resize-buttons');\n buttonContainer.style.position = 'absolute';\n buttonContainer.style.bottom = '5px'; // Adjust position above the bottom edge\n buttonContainer.style.right = '5px';\n buttonContainer.style.display = 'flex';\n buttonContainer.setAttribute('contenteditable', 'false'); // Prevent buttons from being editable\n\n const updateWidthAndHeight = (mediaElement, width, height) => {\n mediaElement.style.width = width;\n mediaElement.style.height = height;\n container.setAttribute('data-width', width); // Save width\n container.setAttribute('data-height', height); // Save height\n };\n\n const increaseWidthButton = this.createButton('Increase Width', () => {\n const mediaElement = container.querySelector('.no-drag-media');\n const currentWidth = parseInt(mediaElement.style.width || '100%');\n updateWidthAndHeight(mediaElement, `${currentWidth + 20}px`, mediaElement.style.height);\n });\n\n const decreaseWidthButton = this.createButton('Decrease Width', () => {\n const mediaElement = container.querySelector('.no-drag-media');\n const currentWidth = parseInt(mediaElement.style.width || '100%');\n updateWidthAndHeight(\n mediaElement,\n `${Math.max(100, currentWidth - 20)}px`,\n mediaElement.style.height\n );\n });\n\n const increaseHeightButton = this.createButton('Increase Height', () => {\n const mediaElement = container.querySelector('.no-drag-media');\n const currentHeight = parseInt(mediaElement.style.height || '200px'); // Default height\n updateWidthAndHeight(mediaElement, mediaElement.style.width, `${currentHeight + 20}px`);\n });\n\n const decreaseHeightButton = this.createButton('Decrease Height', () => {\n const mediaElement = container.querySelector('.no-drag-media');\n const currentHeight = parseInt(mediaElement.style.height || '200px'); // Default height\n updateWidthAndHeight(\n mediaElement,\n mediaElement.style.width,\n `${Math.max(100, currentHeight - 20)}px`\n );\n });\n\n buttonContainer.appendChild(increaseWidthButton);\n buttonContainer.appendChild(decreaseWidthButton);\n buttonContainer.appendChild(increaseHeightButton);\n buttonContainer.appendChild(decreaseHeightButton);\n\n return buttonContainer;\n }\n\n static createButton(label, onClick) {\n const button = document.createElement('button');\n button.innerHTML = label;\n button.style.margin = '0 5px';\n button.style.cursor = 'pointer';\n\n // Prevent Quill from treating this as part of the content\n button.setAttribute('contenteditable', 'false');\n button.style.pointerEvents = 'auto'; // Allow button clicks but don't let Quill interact with them\n\n button.onclick = event => {\n event.preventDefault(); // Prevent default action\n event.stopPropagation(); // Prevent the event from bubbling up and being interpreted by Quill\n onClick(); // Execute the button's action\n };\n\n return button;\n }\n\n static value(container) {\n const iframe = container.querySelector('iframe');\n return {\n url: iframe?.getAttribute('src'),\n width: container.getAttribute('data-width') || iframe?.getAttribute('width'),\n height: container.getAttribute('data-height') || iframe?.getAttribute('height'),\n align: container.getAttribute('data-align') || 'center' // Default to center if no alignment\n };\n }\n}\n\nNoDragVideo['blotName'] = 'no-drag-video';\nNoDragVideo['tagName'] = 'div'; // TagName is set to div to hold buttons\nQuill.register(NoDragVideo);\n\nexport class QuillHelper {\n static init() {\n Quill.register('modules/imageResize', ImageResize);\n Quill.register('modules/noDragDrop', NoDragDrop);\n Quill.register(NoDragImage);\n Quill.register(NoDragVideo);\n }\n\n static getEditorConfig(additionalToolbarConfig = []) {\n const defaultToolbarConfig = [\n ['bold', 'italic', 'underline', 'strike'], // toggled buttons\n ['blockquote', 'code-block'],\n [{ header: 1 }, { header: 2 }], // custom button values\n [{ list: 'ordered' }, { list: 'bullet' }],\n [{ script: 'sub' }, { script: 'super' }], // superscript/subscript\n [{ indent: '-1' }, { indent: '+1' }], // outdent/indent\n [{ direction: 'rtl' }], // text direction\n [{ header: [1, 2, 3, 4, 5, 6, false] }],\n [{ color: [] }, { background: [] }], // dropdown with defaults from theme\n [{ align: [] }],\n ['link', 'image', 'video'],\n ['clean'], // remove formatting button\n ['table'], // table button\n [\n 'insertRowAbove',\n 'insertRowBelow',\n 'insertColumnRight',\n 'insertColumnLeft',\n 'deleteRow',\n 'deleteColumn',\n 'deleteTable'\n ]\n ];\n\n const mergedToolbarConfig = [...defaultToolbarConfig, ...additionalToolbarConfig];\n\n return {\n toolbar: {\n container: mergedToolbarConfig,\n handlers: {\n image: function () {\n const range = this.quill.getSelection();\n const value = prompt('Enter image URL:');\n if (value) {\n this.quill.insertEmbed(range.index, 'no-drag-image', { url: value });\n this.quill.insertText(range.index + 1, '\\n', Quill.sources.USER);\n }\n },\n video: function () {\n const range = this.quill.getSelection();\n let value = prompt('Enter video URL:');\n if (value?.includes('youtube.com/watch?v=')) {\n const videoId = value.split('v=')[1];\n value = `https://www.youtube.com/embed/${videoId}`;\n } else if (value?.includes('youtu.be/')) {\n const videoId = value.split('.be/')[1];\n value = `https://www.youtube.com/embed/${videoId}`;\n }\n if (value) {\n this.quill.insertEmbed(range.index, 'no-drag-video', {\n url: value,\n isEdit: true,\n width: '560px',\n height: '315px'\n });\n this.quill.insertText(range.index + 1, '\\n', Quill.sources.USER);\n }\n }\n }\n },\n imageResize: {\n displaySize: true\n },\n noDragDrop: true\n };\n }\n}\n","import { AbstractControl, UntypedFormGroup } from '@angular/forms';\n\nimport 'reflect-metadata';\n\nfunction checkFormValidation(form: UntypedFormGroup): boolean {\n if (!form.valid) {\n form.markAllAsTouched();\n return false;\n }\n return true;\n}\n\nexport function ValidateForm(formName: string): MethodDecorator {\n return function (\n _target: object,\n _methodName: string | symbol,\n descriptor: PropertyDescriptor\n ) {\n const originalMethod = descriptor.value;\n\n descriptor.value = function (this: string, ...args: string[]) {\n const formGroup: UntypedFormGroup = this[formName];\n\n if (checkFormValidation(formGroup)) {\n originalMethod.apply(this, args);\n }\n };\n\n return descriptor;\n };\n}\n\nexport function MatchPassword(abstractControl: AbstractControl) {\n const password = abstractControl.get('password').value;\n const confirmPassword = abstractControl.get('confirmPassword').value;\n if (password !== confirmPassword) {\n abstractControl.get('confirmPassword').setErrors({ MatchPassword: true });\n } else {\n return null;\n }\n}\n","import { ActivatedRoute, Router } from '@angular/router';\n\nexport function appendQueryParam(router: Router, activatedRoute: ActivatedRoute, queryParams) {\n router.navigate([], {\n relativeTo: activatedRoute,\n queryParams\n });\n}\n\nexport function clearQueryParams(router: Router, activatedRoute: ActivatedRoute) {\n router.navigate([], {\n relativeTo: activatedRoute,\n queryParams: {}\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAGA;AACA,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,eAAe,CAAQ;AAEvD,MAAM,WAAY,SAAQ,UAAU,CAAA;IAChC,OAAO,MAAM,CAAC,KAAK,EAAA;AACf,QAAA,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,EAAE;QAC3B,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC;QACnC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,IAAI,EAAE,CAAC;AACzC,QAAA,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,eAAe,CAAC;AAC3C,QAAA,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,OAAO,CAAC;AACvC,QAAA,IAAI,KAAK,CAAC,KAAK,EAAE;AACb,YAAA,QAAQ,KAAK,CAAC,KAAK;AACf,gBAAA,KAAK,MAAM;AACP,oBAAA,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM;AACzB,oBAAA,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,KAAK;oBAC9B;AACJ,gBAAA,KAAK,OAAO;AACR,oBAAA,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,OAAO;AAC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B,KAAC;AACL;AAEM,SAAU,aAAa,CAAC,eAAgC,EAAA;IAC1D,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,KAAK;IACtD,MAAM,eAAe,GAAG,eAAe,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,KAAK;AACpE,IAAA,IAAI,QAAQ,KAAK,eAAe,EAAE;AAC9B,QAAA,eAAe,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,SAAS,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;;SACtE;AACH,QAAA,OAAO,IAAI;;AAEnB;;SCtCgB,gBAAgB,CAAC,MAAc,EAAE,cAA8B,EAAE,WAAW,EAAA;AACxF,IAAA,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE;AAChB,QAAA,UAAU,EAAE,cAAc;QAC1B;AACH,KAAA,CAAC;AACN;AAEgB,SAAA,gBAAgB,CAAC,MAAc,EAAE,cAA8B,EAAA;AAC3E,IAAA,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE;AAChB,QAAA,UAAU,EAAE,cAAc;AAC1B,QAAA,WAAW,EAAE;AAChB,KAAA,CAAC;AACN;;ACdA;;AAEG;;;;"}
1
+ {"version":3,"file":"posiwise-utils.mjs","sources":["../../../../libs/utils/src/lib/quill-helper.ts","../../../../libs/utils/src/lib/decorators.ts","../../../../libs/utils/src/lib/routing.helper.ts","../../../../libs/utils/src/posiwise-utils.ts"],"sourcesContent":["import Quill from 'quill';\nimport ImageResize from 'quill-image-resize';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst BlockEmbed = Quill.import('formats/image') as any;\n\nclass NoDragImage extends BlockEmbed {\n static create(value) {\n const node = super.create();\n node.setAttribute('src', value.url);\n node.setAttribute('alt', value.alt || '');\n node.setAttribute('class', 'no-drag-image');\n node.setAttribute('draggable', 'false');\n if (value.align) {\n switch (value.align) {\n case 'left':\n node.style.float = 'left';\n node.style.marginRight = '1em';\n break;\n case 'right':\n node.style.float = 'right';\n node.style.marginLeft = '1em';\n break;\n case 'center':\n node.style.display = 'block';\n node.style.marginLeft = 'auto';\n node.style.marginRight = 'auto';\n break;\n default:\n node.style.float = 'none';\n }\n }\n\n return node;\n }\n\n static value(node) {\n return {\n url: node.getAttribute('src'),\n alt: node.getAttribute('alt'),\n align: node.style.float || 'center'\n };\n }\n}\n\nclass NoDragDrop {\n constructor(quill, _options) {\n quill.root.addEventListener('drop', this.handleDrop.bind(this, quill));\n quill.root.addEventListener('dragover', this.preventDefault);\n }\n\n preventDefault(e) {\n e.preventDefault();\n e.stopPropagation();\n }\n\n handleDrop(quill, e) {\n this.preventDefault(e);\n\n // Create a MutationObserver to detect inserted images\n const observer = new MutationObserver(mutations => {\n this.removeInsertedImages(quill, mutations);\n });\n\n // Start observing for added nodes\n observer.observe(quill.root, { childList: true, subtree: true });\n\n // Stop observing after a short delay\n setTimeout(() => {\n observer.disconnect();\n }, 1000); // Adjust the timeout as needed\n }\n\n removeInsertedImages(quill, mutations) {\n mutations.forEach(mutation => {\n mutation.addedNodes.forEach(node => {\n if (node instanceof HTMLImageElement) {\n node.remove();\n } else if (node.nodeType === Node.ELEMENT_NODE) {\n node.querySelectorAll('img').forEach(img => img.remove());\n }\n });\n });\n }\n}\n\nNoDragImage['blotName'] = 'no-drag-image';\nNoDragImage['tagName'] = 'img';\nQuill.register(NoDragImage);\nQuill.register('modules/noDragDrop', NoDragDrop);\nQuill.register('modules/imageResize', ImageResize);\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst BlockEmbedVideo = Quill.import('blots/block/embed') as any;\nclass NoDragVideo extends BlockEmbedVideo {\n static create(value) {\n const node = document.createElement('iframe');\n node.setAttribute('src', value.url);\n node.setAttribute('frameborder', '0');\n node.setAttribute('allowfullscreen', 'true');\n node.setAttribute('width', value.width || '100%'); // Default width\n node.setAttribute('height', value.height || '200px'); // Default height\n node.setAttribute('class', 'no-drag-media');\n node.setAttribute('contenteditable', 'false'); // Prevent content from being editable\n\n // Create a container for both video/iframe and buttons\n const container = document.createElement('div');\n container.setAttribute('class', 'media-container');\n container.style.position = 'relative';\n container.style.width = '100%';\n container.style.height = 'auto';\n container.appendChild(node); // Append video/iframe to the container\n\n // Append align buttons if not already present\n if (!container.querySelector('.media-align-buttons')) {\n const alignButtons = this.createAlignButtons(container);\n alignButtons.setAttribute('contenteditable', 'false'); // Prevent buttons from being editable\n container.appendChild(alignButtons);\n }\n\n // Append resize buttons if not already present\n if (!container.querySelector('.media-resize-buttons')) {\n const resizeButtons = this.createResizeButtons(container);\n resizeButtons.setAttribute('contenteditable', 'false'); // Prevent buttons from being editable\n container.appendChild(resizeButtons);\n }\n\n container.setAttribute('contenteditable', 'false'); // Prevent the entire container from being editable\n\n return container;\n }\n\n static createAlignButtons(container) {\n const buttonContainer = document.createElement('div');\n buttonContainer.setAttribute('class', 'media-align-buttons');\n buttonContainer.style.position = 'absolute';\n buttonContainer.style.top = '0';\n buttonContainer.style.right = '0';\n buttonContainer.style.display = 'flex';\n buttonContainer.setAttribute('contenteditable', 'false'); // Prevent buttons from being editable\n\n const leftButton = this.createButton('Left', () => {\n container.style.textAlign = 'left';\n container.setAttribute('data-align', 'left'); // Save alignment\n });\n\n const centerButton = this.createButton('Center', () => {\n container.style.textAlign = 'center';\n container.setAttribute('data-align', 'center'); // Save alignment\n });\n\n const rightButton = this.createButton('Right', () => {\n container.style.textAlign = 'right';\n container.setAttribute('data-align', 'right'); // Save alignment\n });\n\n buttonContainer.appendChild(leftButton);\n buttonContainer.appendChild(centerButton);\n buttonContainer.appendChild(rightButton);\n\n return buttonContainer;\n }\n\n static createResizeButtons(container) {\n const buttonContainer = document.createElement('div');\n buttonContainer.setAttribute('class', 'media-resize-buttons');\n buttonContainer.style.position = 'absolute';\n buttonContainer.style.bottom = '5px'; // Adjust position above the bottom edge\n buttonContainer.style.right = '5px';\n buttonContainer.style.display = 'flex';\n buttonContainer.setAttribute('contenteditable', 'false'); // Prevent buttons from being editable\n\n const updateWidthAndHeight = (mediaElement, width, height) => {\n mediaElement.style.width = width;\n mediaElement.style.height = height;\n container.setAttribute('data-width', width); // Save width\n container.setAttribute('data-height', height); // Save height\n };\n\n const increaseWidthButton = this.createButton('Increase Width', () => {\n const mediaElement = container.querySelector('.no-drag-media');\n const currentWidth = parseInt(mediaElement.style.width || '100%');\n updateWidthAndHeight(mediaElement, `${currentWidth + 20}px`, mediaElement.style.height);\n });\n\n const decreaseWidthButton = this.createButton('Decrease Width', () => {\n const mediaElement = container.querySelector('.no-drag-media');\n const currentWidth = parseInt(mediaElement.style.width || '100%');\n updateWidthAndHeight(\n mediaElement,\n `${Math.max(100, currentWidth - 20)}px`,\n mediaElement.style.height\n );\n });\n\n const increaseHeightButton = this.createButton('Increase Height', () => {\n const mediaElement = container.querySelector('.no-drag-media');\n const currentHeight = parseInt(mediaElement.style.height || '200px'); // Default height\n updateWidthAndHeight(mediaElement, mediaElement.style.width, `${currentHeight + 20}px`);\n });\n\n const decreaseHeightButton = this.createButton('Decrease Height', () => {\n const mediaElement = container.querySelector('.no-drag-media');\n const currentHeight = parseInt(mediaElement.style.height || '200px'); // Default height\n updateWidthAndHeight(\n mediaElement,\n mediaElement.style.width,\n `${Math.max(100, currentHeight - 20)}px`\n );\n });\n\n buttonContainer.appendChild(increaseWidthButton);\n buttonContainer.appendChild(decreaseWidthButton);\n buttonContainer.appendChild(increaseHeightButton);\n buttonContainer.appendChild(decreaseHeightButton);\n\n return buttonContainer;\n }\n\n static createButton(label, onClick) {\n const button = document.createElement('button');\n button.innerHTML = label;\n button.style.margin = '0 5px';\n button.style.cursor = 'pointer';\n\n // Prevent Quill from treating this as part of the content\n button.setAttribute('contenteditable', 'false');\n button.style.pointerEvents = 'auto'; // Allow button clicks but don't let Quill interact with them\n\n button.onclick = event => {\n event.preventDefault(); // Prevent default action\n event.stopPropagation(); // Prevent the event from bubbling up and being interpreted by Quill\n onClick(); // Execute the button's action\n };\n\n return button;\n }\n\n static value(container) {\n const iframe = container.querySelector('iframe');\n return {\n url: iframe?.getAttribute('src'),\n width: container.getAttribute('data-width') || iframe?.getAttribute('width'),\n height: container.getAttribute('data-height') || iframe?.getAttribute('height'),\n align: container.getAttribute('data-align') || 'center' // Default to center if no alignment\n };\n }\n}\n\nNoDragVideo['blotName'] = 'no-drag-video';\nNoDragVideo['tagName'] = 'div'; // TagName is set to div to hold buttons\nQuill.register(NoDragVideo);\n\nexport class QuillHelper {\n static init() {\n Quill.register('modules/imageResize', ImageResize);\n Quill.register('modules/noDragDrop', NoDragDrop);\n Quill.register(NoDragImage);\n Quill.register(NoDragVideo);\n }\n\n static getEditorConfig(additionalToolbarConfig = []) {\n const defaultToolbarConfig = [\n ['bold', 'italic', 'underline', 'strike'], // toggled buttons\n ['blockquote', 'code-block'],\n [{ header: 1 }, { header: 2 }], // custom button values\n [{ list: 'ordered' }, { list: 'bullet' }],\n [{ script: 'sub' }, { script: 'super' }], // superscript/subscript\n [{ indent: '-1' }, { indent: '+1' }], // outdent/indent\n [{ direction: 'rtl' }], // text direction\n [{ header: [1, 2, 3, 4, 5, 6, false] }],\n [{ color: [] }, { background: [] }], // dropdown with defaults from theme\n [{ align: [] }],\n ['link', 'image', 'video'],\n ['clean'], // remove formatting button\n ['table'], // table button\n [\n 'insertRowAbove',\n 'insertRowBelow',\n 'insertColumnRight',\n 'insertColumnLeft',\n 'deleteRow',\n 'deleteColumn',\n 'deleteTable'\n ]\n ];\n\n const mergedToolbarConfig = [...defaultToolbarConfig, ...additionalToolbarConfig];\n\n return {\n toolbar: {\n container: mergedToolbarConfig,\n handlers: {\n image: function () {\n const range = this.quill.getSelection();\n const value = prompt('Enter image URL:');\n if (value) {\n this.quill.insertEmbed(range.index, 'no-drag-image', { url: value });\n this.quill.insertText(range.index + 1, '\\n', Quill.sources.USER);\n }\n },\n video: function () {\n const range = this.quill.getSelection();\n let value = prompt('Enter video URL:');\n if (value?.includes('youtube.com/watch?v=')) {\n const videoId = value.split('v=')[1];\n value = `https://www.youtube.com/embed/${videoId}`;\n } else if (value?.includes('youtu.be/')) {\n const videoId = value.split('.be/')[1];\n value = `https://www.youtube.com/embed/${videoId}`;\n }\n if (value) {\n this.quill.insertEmbed(range.index, 'no-drag-video', {\n url: value,\n isEdit: true,\n width: '560px',\n height: '315px'\n });\n this.quill.insertText(range.index + 1, '\\n', Quill.sources.USER);\n }\n }\n }\n },\n imageResize: {\n displaySize: true\n },\n noDragDrop: true\n };\n }\n}\n","import { AbstractControl, UntypedFormGroup } from '@angular/forms';\n\nimport 'reflect-metadata';\n\nfunction checkFormValidation(form: UntypedFormGroup): boolean {\n if (!form.valid) {\n form.markAllAsTouched();\n return false;\n }\n return true;\n}\n\nexport function ValidateForm(formName: string): MethodDecorator {\n return function (\n _target: object,\n _methodName: string | symbol,\n descriptor: PropertyDescriptor\n ) {\n const originalMethod = descriptor.value;\n\n descriptor.value = function (this: string, ...args: string[]) {\n const formGroup: UntypedFormGroup = this[formName];\n\n if (checkFormValidation(formGroup)) {\n originalMethod.apply(this, args);\n }\n };\n\n return descriptor;\n };\n}\n\nexport function MatchPassword(abstractControl: AbstractControl) {\n const password = abstractControl.get('password').value;\n const confirmPassword = abstractControl.get('confirmPassword').value;\n if (password !== confirmPassword) {\n abstractControl.get('confirmPassword').setErrors({ MatchPassword: true });\n } else {\n return null;\n }\n}\n","import { ActivatedRoute, Router } from '@angular/router';\n\nexport function appendQueryParam(router: Router, activatedRoute: ActivatedRoute, queryParams) {\n router.navigate([], {\n relativeTo: activatedRoute,\n queryParams\n });\n}\n\nexport function clearQueryParams(router: Router, activatedRoute: ActivatedRoute) {\n router.navigate([], {\n relativeTo: activatedRoute,\n queryParams: {}\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAGA;AACA,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,eAAe,CAAQ,CAAC;AAExD,MAAM,WAAY,SAAQ,UAAU,CAAA;IAChC,OAAO,MAAM,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 -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@posiwise/utils",
3
- "version": "0.0.68",
3
+ "version": "0.0.70",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "17.3.11",
6
6
  "@angular/core": "17.3.11",
7
7
  "@angular/forms": "17.3.11",
8
- "quill": "^2.0.0",
8
+ "quill": "^2.0.2",
9
9
  "quill-image-resize": "^3.0.9"
10
10
  },
11
11
  "dependencies": {