@getpara/core-components 2.11.0 → 2.13.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/dist/capsule/capsule.esm.js +1 -1
- package/dist/capsule/capsule.esm.js.map +1 -1
- package/dist/capsule/{p-57592d1b.entry.js → p-a0ee9b3e.entry.js} +2 -2
- package/dist/capsule/p-a0ee9b3e.entry.js.map +1 -0
- package/dist/cjs/capsule.cjs.js +1 -1
- package/dist/cjs/cpsl-alert_34.cjs.entry.js +39 -7
- package/dist/cjs/cpsl-alert_34.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/cpsl-input/cpsl-input.js +52 -1
- package/dist/collection/components/cpsl-input/cpsl-input.js.map +1 -1
- package/dist/collection/components/cpsl-select/cpsl-select.js +4 -2
- package/dist/collection/components/cpsl-select/cpsl-select.js.map +1 -1
- package/dist/esm/capsule.js +1 -1
- package/dist/esm/cpsl-alert_34.entry.js +39 -7
- package/dist/esm/cpsl-alert_34.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/scripts/appendLoaderExports.js +1 -0
- package/dist/scripts/appendLoaderExports.js.map +1 -1
- package/dist/scripts/buildAssets.js +1 -0
- package/dist/scripts/buildAssets.js.map +1 -1
- package/dist/types/components/cpsl-input/cpsl-input.d.ts +5 -0
- package/dist/types/components.d.ts +4 -0
- package/package.json +2 -2
- package/dist/capsule/p-57592d1b.entry.js.map +0 -1
- /package/dist/types/Users/{norwood/para-repos → taylorbosch/Documents/GitHub/Capsule}/web-sdk/packages/core-components/.stencil/scripts/appendLoaderExports.d.ts +0 -0
- /package/dist/types/Users/{norwood/para-repos → taylorbosch/Documents/GitHub/Capsule}/web-sdk/packages/core-components/.stencil/scripts/buildAssets.d.ts +0 -0
package/dist/esm/loader.js
CHANGED
|
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["cpsl-hero",[[1,"cpsl-hero",{"height":[2],"hideFadeOut":[4,"hide-fade-out"],"variant":[513],"title":[513],"subtitle":[513],"withDefaultTheme":[4,"with-default-theme"]}]]],["cpsl-modal-v2",[[1,"cpsl-modal-v2",{"enterTransitionDuration":[2,"enter-transition-duration"],"exitTransitionDuration":[2,"exit-transition-duration"],"elevated":[4],"noOverlay":[4,"no-overlay"],"open":[4],"zIndexOverride":[2,"z-index-override"]},null,{"open":["toggleHeight"]}]]],["cpsl-nav-button",[[1,"cpsl-nav-button",{"disabled":[516],"exactMainRouteMatch":[4,"exact-main-route-match"],"exactSubRouteMatch":[4,"exact-sub-route-match"],"route":[1],"subRoutes":[16],"path":[1]}]]],["cpsl-col",[[1,"cpsl-col",{"align":[1],"justify":[1],"gap":[8],"offset":[1],"offsetXs":[1,"offset-xs"],"offsetSm":[1,"offset-sm"],"offsetMd":[1,"offset-md"],"offsetLg":[1,"offset-lg"],"offsetXl":[1,"offset-xl"],"pull":[1],"pullXs":[1,"pull-xs"],"pullSm":[1,"pull-sm"],"pullMd":[1,"pull-md"],"pullLg":[1,"pull-lg"],"pullXl":[1,"pull-xl"],"push":[1],"pushXs":[1,"push-xs"],"pushSm":[1,"push-sm"],"pushMd":[1,"push-md"],"pushLg":[1,"push-lg"],"pushXl":[1,"push-xl"],"size":[1],"sizeXs":[1,"size-xs"],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]},[[9,"resize","onResize"]]]]],["cpsl-grid",[[1,"cpsl-grid",{"fixed":[4]}]]],["cpsl-identicon",[[1,"cpsl-identicon",{"hash":[1],"size":[1],"variant":[1],"arcWidth":[1,"arc-width"]}]]],["cpsl-info-box",[[1,"cpsl-info-box"]]],["cpsl-row",[[1,"cpsl-row",{"col":[4],"align":[1],"justify":[1],"gap":[8]}]]],["cpsl-alert_34",[[1,"cpsl-pagination",{"initialPage":[2,"initial-page"],"totalPages":[2,"total-pages"],"visiblePages":[1026,"visible-pages"],"currentPage":[32]},null,{"currentPage":["watchChange"]}],[1,"cpsl-select",{"anchorElId":[1,"anchor-el-id"],"autoWidth":[4,"auto-width"],"alignCenter":[4,"align-center"],"disabled":[4],"dropdownMaxHeight":[2,"dropdown-max-height"],"errorText":[1,"error-text"],"formatValue":[16],"helperText":[1,"helper-text"],"id":[1],"icon":[1],"label":[1],"multiple":[4],"noIconAnimation":[4,"no-icon-animation"],"placeholder":[1],"required":[4],"selectedValue":[1,"selected-value"],"showFormattedSelectedItem":[4,"show-formatted-selected-item"],"showOptionalLabel":[4,"show-optional-label"],"showSearch":[4,"show-search"],"searchPlaceholder":[1,"search-placeholder"],"selectedItemColor":[1,"selected-item-color"],"selectedItemVariant":[1,"selected-item-variant"],"selectedItemWeight":[1,"selected-item-weight"],"anchorEl":[32],"hasFocus":[32],"popoverOpen":[32],"hasSelectedItem":[32]},[[0,"cpslSelectItemClick","selectItemClickHandler"],[0,"cpslOpen","onPopoverOpen"],[0,"cpslClose","onPopoverClose"]],{"selectedValue":["onValueChange","handleValueChange"]}],[1,"cpsl-file-upload",{"disabled":[516],"errorText":[1,"error-text"],"externalFilename":[1,"external-filename"],"externalSrc":[1,"external-src"],"fileTypes":[16],"helperText":[1,"helper-text"],"label":[1],"required":[4],"showOptionalLabel":[4,"show-optional-label"],"uploadFile":[16],"file":[32],"dragOver":[32],"dragError":[32],"isUploading":[32],"uploadError":[32]}],[1,"cpsl-auth-modal",{"enterTransitionDuration":[2,"enter-transition-duration"],"exitTransitionDuration":[2,"exit-transition-duration"],"noOverlay":[4,"no-overlay"],"open":[4],"zIndexOverride":[2,"z-index-override"],"hasFooter":[32],"isMobile":[32]},null,{"open":["toggleModal"]}],[1,"cpsl-alert",{"icon":[1],"noIcon":[4,"no-icon"],"variant":[1],"filled":[4]}],[1,"cpsl-checkbox",{"checked":[4]}],[1,"cpsl-code-input",{"code":[1025],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"length":[2],"type":[1]},null,{"code":["watchCodeProp"]}],[1,"cpsl-drawer",{"anchor":[1],"anchorPosition":[2,"anchor-position"],"noOverlay":[4,"no-overlay"],"open":[4],"size":[8],"transitionDuration":[2,"transition-duration"],"transitionFunction":[1,"transition-function"],"variant":[1],"zIndexOverride":[2,"z-index-override"],"closedAnchorPosition":[32],"showTransition":[32]}],[1,"cpsl-icon-group",{"expandFrom":[1,"expand-from"],"disabled":[4],"icons":[16],"isHovered":[32]}],[1,"cpsl-slide-button",{"disabled":[4],"endIcon":[1,"end-icon"],"endText":[1,"end-text"],"startIcon":[1,"start-icon"],"startText":[1,"start-text"]}],[1,"cpsl-table",{"hasHorizontalScroll":[32],"hasVerticalScroll":[32]}],[1,"cpsl-tile-button",{"disabled":[516],"src":[1],"icon":[1]}],[1,"cpsl-app-bar",{"height":[2],"position":[1],"zIndexOverride":[2,"z-index-override"]}],[1,"cpsl-avatar",{"alt":[1],"src":[1],"size":[1],"variant":[1]}],[1,"cpsl-divider"],[1,"cpsl-dropdown",{"width":[1],"hasCpslSearch":[4,"has-cpsl-search"],"items":[16],"selectedItem":[1040],"isOpen":[32],"searchQuery":[32],"filteredItems":[32]},[[9,"resize","handleResize"]],{"selectedItem":["handleSelectedItemChange"],"isOpen":["handleOpenChange"]}],[1,"cpsl-nav-button-group"],[1,"cpsl-pill",{"text":[1]}],[1,"cpsl-progress-indicator",{"totalSteps":[2,"total-steps"],"step":[2]}],[1,"cpsl-qr-code",{"url":[1],"imageSrc":[1,"image-src"],"size":[2],"icon":[1]}],[1,"cpsl-radio",{"checked":[4]}],[1,"cpsl-select-item",{"selected":[4],"value":[1]}],[1,"cpsl-switch",{"checked":[4]}],[1,"cpsl-tab",{"selected":[4],"tab":[1]},[[8,"cpslTabsChanged","onTabsChanged"],[8,"cpslTabsInit","onTabsInit"]]],[1,"cpsl-tabs",{"fullWidth":[4,"full-width"],"selectedTab":[1,"selected-tab"],"selectedTabRect":[32],"loaded":[32]},[[8,"cpslTabButtonSizeChange","onTabSizeChange"]],{"fullWidth":["updateSlider"],"selectedTab":["updateTab"]}],[1,"cpsl-button-group",{"selectedId":[1,"selected-id"]},null,{"selectedId":["selectItem"]}],[1,"cpsl-input",{"as":[1],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"noAutoDisable":[4,"no-auto-disable"],"autofocus":[4],"autoselect":[4],"disabled":[4],"contrastText":[4,"contrast-text"],"enterkeyhint":[1],"errorText":[1,"error-text"],"fitContent":[4,"fit-content"],"mask":[1],"isPhone":[4,"is-phone"],"helperText":[1,"helper-text"],"inputmode":[1],"label":[1],"max":[8],"maxlength":[2],"min":[8],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"rows":[2],"showOptionalLabel":[4,"show-optional-label"],"spellcheck":[4],"startIconSrc":[1,"start-icon-src"],"startIcon":[1,"start-icon"],"step":[1],"type":[1],"value":[1025],"hasFocus":[32]},null,{"disabled":["handleDisable"],"mask":["handleSetupMask"],"value":["handleValueChange"]}],[1,"cpsl-popover",{"anchorEl":[16],"anchorOriginHorizontal":[1,"anchor-origin-horizontal"],"anchorOriginVertical":[1,"anchor-origin-vertical"],"autoWidth":[4,"auto-width"],"disabled":[4],"preventBlur":[4,"prevent-blur"],"transformOriginHorizontal":[1,"transform-origin-horizontal"],"transformOriginVertical":[1,"transform-origin-vertical"],"alignCenter":[4,"align-center"],"triggerAction":[1,"trigger-action"],"trigger":[1],"windowPadding":[2,"window-padding"],"open":[32],"hasSetInitialPosition":[32],"positionX":[32],"positionY":[32],"closePopover":[64]},null,{"trigger":["onTriggerChange"],"triggerAction":["onTriggerChange"],"preventBlur":["onTriggerChange"],"anchorOriginHorizontal":["onAnchorChange"],"anchorOriginVertical":["onAnchorChange"],"alignCenter":["onAnchorChange"],"open":["onOpenChange"]}],[1,"cpsl-button",{"as":[1],"disabled":[516],"pending":[4],"fullWidth":[4,"full-width"],"href":[1],"size":[1],"target":[1],"type":[1],"variant":[513],"cursor":[1]}],[1,"cpsl-card"],[1,"cpsl-overlay",{"enterTransitionDuration":[2,"enter-transition-duration"],"exitTransitionDuration":[2,"exit-transition-duration"],"open":[4],"zIndexOverride":[2,"z-index-override"]},null,{"open":["toggleHeight"]}],[1,"cpsl-spinner",{"variant":[1],"size":[2],"barColor":[1,"bar-color"],"barWidth":[2,"bar-width"],"speed":[2]}],[1,"cpsl-text",{"color":[1],"variant":[1],"weight":[1],"align":[1]}],[1,"cpsl-icon",{"src":[1],"size":[1],"invert":[4],"inset":[1],"icon":[1],"radius":[1],"background":[1],"color":[1],"border":[1]}]]]], options);
|
|
8
|
+
return bootstrapLazy([["cpsl-hero",[[1,"cpsl-hero",{"height":[2],"hideFadeOut":[4,"hide-fade-out"],"variant":[513],"title":[513],"subtitle":[513],"withDefaultTheme":[4,"with-default-theme"]}]]],["cpsl-modal-v2",[[1,"cpsl-modal-v2",{"enterTransitionDuration":[2,"enter-transition-duration"],"exitTransitionDuration":[2,"exit-transition-duration"],"elevated":[4],"noOverlay":[4,"no-overlay"],"open":[4],"zIndexOverride":[2,"z-index-override"]},null,{"open":["toggleHeight"]}]]],["cpsl-nav-button",[[1,"cpsl-nav-button",{"disabled":[516],"exactMainRouteMatch":[4,"exact-main-route-match"],"exactSubRouteMatch":[4,"exact-sub-route-match"],"route":[1],"subRoutes":[16],"path":[1]}]]],["cpsl-col",[[1,"cpsl-col",{"align":[1],"justify":[1],"gap":[8],"offset":[1],"offsetXs":[1,"offset-xs"],"offsetSm":[1,"offset-sm"],"offsetMd":[1,"offset-md"],"offsetLg":[1,"offset-lg"],"offsetXl":[1,"offset-xl"],"pull":[1],"pullXs":[1,"pull-xs"],"pullSm":[1,"pull-sm"],"pullMd":[1,"pull-md"],"pullLg":[1,"pull-lg"],"pullXl":[1,"pull-xl"],"push":[1],"pushXs":[1,"push-xs"],"pushSm":[1,"push-sm"],"pushMd":[1,"push-md"],"pushLg":[1,"push-lg"],"pushXl":[1,"push-xl"],"size":[1],"sizeXs":[1,"size-xs"],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]},[[9,"resize","onResize"]]]]],["cpsl-grid",[[1,"cpsl-grid",{"fixed":[4]}]]],["cpsl-identicon",[[1,"cpsl-identicon",{"hash":[1],"size":[1],"variant":[1],"arcWidth":[1,"arc-width"]}]]],["cpsl-info-box",[[1,"cpsl-info-box"]]],["cpsl-row",[[1,"cpsl-row",{"col":[4],"align":[1],"justify":[1],"gap":[8]}]]],["cpsl-alert_34",[[1,"cpsl-pagination",{"initialPage":[2,"initial-page"],"totalPages":[2,"total-pages"],"visiblePages":[1026,"visible-pages"],"currentPage":[32]},null,{"currentPage":["watchChange"]}],[1,"cpsl-select",{"anchorElId":[1,"anchor-el-id"],"autoWidth":[4,"auto-width"],"alignCenter":[4,"align-center"],"disabled":[4],"dropdownMaxHeight":[2,"dropdown-max-height"],"errorText":[1,"error-text"],"formatValue":[16],"helperText":[1,"helper-text"],"id":[1],"icon":[1],"label":[1],"multiple":[4],"noIconAnimation":[4,"no-icon-animation"],"placeholder":[1],"required":[4],"selectedValue":[1,"selected-value"],"showFormattedSelectedItem":[4,"show-formatted-selected-item"],"showOptionalLabel":[4,"show-optional-label"],"showSearch":[4,"show-search"],"searchPlaceholder":[1,"search-placeholder"],"selectedItemColor":[1,"selected-item-color"],"selectedItemVariant":[1,"selected-item-variant"],"selectedItemWeight":[1,"selected-item-weight"],"anchorEl":[32],"hasFocus":[32],"popoverOpen":[32],"hasSelectedItem":[32]},[[0,"cpslSelectItemClick","selectItemClickHandler"],[0,"cpslOpen","onPopoverOpen"],[0,"cpslClose","onPopoverClose"]],{"selectedValue":["onValueChange","handleValueChange"]}],[1,"cpsl-file-upload",{"disabled":[516],"errorText":[1,"error-text"],"externalFilename":[1,"external-filename"],"externalSrc":[1,"external-src"],"fileTypes":[16],"helperText":[1,"helper-text"],"label":[1],"required":[4],"showOptionalLabel":[4,"show-optional-label"],"uploadFile":[16],"file":[32],"dragOver":[32],"dragError":[32],"isUploading":[32],"uploadError":[32]}],[1,"cpsl-auth-modal",{"enterTransitionDuration":[2,"enter-transition-duration"],"exitTransitionDuration":[2,"exit-transition-duration"],"noOverlay":[4,"no-overlay"],"open":[4],"zIndexOverride":[2,"z-index-override"],"hasFooter":[32],"isMobile":[32]},null,{"open":["toggleModal"]}],[1,"cpsl-alert",{"icon":[1],"noIcon":[4,"no-icon"],"variant":[1],"filled":[4]}],[1,"cpsl-checkbox",{"checked":[4]}],[1,"cpsl-code-input",{"code":[1025],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"length":[2],"type":[1]},null,{"code":["watchCodeProp"]}],[1,"cpsl-drawer",{"anchor":[1],"anchorPosition":[2,"anchor-position"],"noOverlay":[4,"no-overlay"],"open":[4],"size":[8],"transitionDuration":[2,"transition-duration"],"transitionFunction":[1,"transition-function"],"variant":[1],"zIndexOverride":[2,"z-index-override"],"closedAnchorPosition":[32],"showTransition":[32]}],[1,"cpsl-icon-group",{"expandFrom":[1,"expand-from"],"disabled":[4],"icons":[16],"isHovered":[32]}],[1,"cpsl-slide-button",{"disabled":[4],"endIcon":[1,"end-icon"],"endText":[1,"end-text"],"startIcon":[1,"start-icon"],"startText":[1,"start-text"]}],[1,"cpsl-table",{"hasHorizontalScroll":[32],"hasVerticalScroll":[32]}],[1,"cpsl-tile-button",{"disabled":[516],"src":[1],"icon":[1]}],[1,"cpsl-app-bar",{"height":[2],"position":[1],"zIndexOverride":[2,"z-index-override"]}],[1,"cpsl-avatar",{"alt":[1],"src":[1],"size":[1],"variant":[1]}],[1,"cpsl-divider"],[1,"cpsl-dropdown",{"width":[1],"hasCpslSearch":[4,"has-cpsl-search"],"items":[16],"selectedItem":[1040],"isOpen":[32],"searchQuery":[32],"filteredItems":[32]},[[9,"resize","handleResize"]],{"selectedItem":["handleSelectedItemChange"],"isOpen":["handleOpenChange"]}],[1,"cpsl-nav-button-group"],[1,"cpsl-pill",{"text":[1]}],[1,"cpsl-progress-indicator",{"totalSteps":[2,"total-steps"],"step":[2]}],[1,"cpsl-qr-code",{"url":[1],"imageSrc":[1,"image-src"],"size":[2],"icon":[1]}],[1,"cpsl-radio",{"checked":[4]}],[1,"cpsl-select-item",{"selected":[4],"value":[1]}],[1,"cpsl-switch",{"checked":[4]}],[1,"cpsl-tab",{"selected":[4],"tab":[1]},[[8,"cpslTabsChanged","onTabsChanged"],[8,"cpslTabsInit","onTabsInit"]]],[1,"cpsl-tabs",{"fullWidth":[4,"full-width"],"selectedTab":[1,"selected-tab"],"selectedTabRect":[32],"loaded":[32]},[[8,"cpslTabButtonSizeChange","onTabSizeChange"]],{"fullWidth":["updateSlider"],"selectedTab":["updateTab"]}],[1,"cpsl-button-group",{"selectedId":[1,"selected-id"]},null,{"selectedId":["selectItem"]}],[1,"cpsl-input",{"as":[1],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"noAutoDisable":[4,"no-auto-disable"],"autofocus":[4],"autoselect":[4],"disabled":[4],"contrastText":[4,"contrast-text"],"enterkeyhint":[1],"errorText":[1,"error-text"],"fitContent":[4,"fit-content"],"mask":[1],"isPhone":[4,"is-phone"],"helperText":[1,"helper-text"],"inputmode":[1],"label":[1],"max":[8],"maxlength":[2],"min":[8],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"rows":[2],"showOptionalLabel":[4,"show-optional-label"],"spellcheck":[4],"startIconSrc":[1,"start-icon-src"],"startIcon":[1,"start-icon"],"step":[1],"type":[1],"value":[1025],"hasFocus":[32],"setFocus":[64]},null,{"disabled":["handleDisable"],"mask":["handleSetupMask"],"value":["handleValueChange"]}],[1,"cpsl-popover",{"anchorEl":[16],"anchorOriginHorizontal":[1,"anchor-origin-horizontal"],"anchorOriginVertical":[1,"anchor-origin-vertical"],"autoWidth":[4,"auto-width"],"disabled":[4],"preventBlur":[4,"prevent-blur"],"transformOriginHorizontal":[1,"transform-origin-horizontal"],"transformOriginVertical":[1,"transform-origin-vertical"],"alignCenter":[4,"align-center"],"triggerAction":[1,"trigger-action"],"trigger":[1],"windowPadding":[2,"window-padding"],"open":[32],"hasSetInitialPosition":[32],"positionX":[32],"positionY":[32],"closePopover":[64]},null,{"trigger":["onTriggerChange"],"triggerAction":["onTriggerChange"],"preventBlur":["onTriggerChange"],"anchorOriginHorizontal":["onAnchorChange"],"anchorOriginVertical":["onAnchorChange"],"alignCenter":["onAnchorChange"],"open":["onOpenChange"]}],[1,"cpsl-button",{"as":[1],"disabled":[516],"pending":[4],"fullWidth":[4,"full-width"],"href":[1],"size":[1],"target":[1],"type":[1],"variant":[513],"cursor":[1]}],[1,"cpsl-card"],[1,"cpsl-overlay",{"enterTransitionDuration":[2,"enter-transition-duration"],"exitTransitionDuration":[2,"exit-transition-duration"],"open":[4],"zIndexOverride":[2,"z-index-override"]},null,{"open":["toggleHeight"]}],[1,"cpsl-spinner",{"variant":[1],"size":[2],"barColor":[1,"bar-color"],"barWidth":[2,"bar-width"],"speed":[2]}],[1,"cpsl-text",{"color":[1],"variant":[1],"weight":[1],"align":[1]}],[1,"cpsl-icon",{"src":[1],"size":[1],"invert":[4],"inset":[1],"icon":[1],"radius":[1],"background":[1],"color":[1],"border":[1]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -17,6 +17,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
17
17
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises -- fire-and-forget: top-level script IIFE
|
|
20
21
|
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
22
|
try {
|
|
22
23
|
const fs = require('fs').promises;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,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AAK,CAAC,iCAAiC,EAAE,KAAK,CAAC,CAAC;QACxD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAA,CAAC,EAAE,CAAC","sourcesContent":["(async () => {\n try {\n const fs = require('fs').promises;\n\n const distIndexPath = './dist/index.js';\n const distTypesPath = './dist/types/index.d.ts';\n const loaderRelativePath = './loader/index.js';\n const loaderTypesRelativePath = '../loader/index.d.ts';\n\n // Statements to append\n const exportStatementJS = `\\nexport * from '${loaderRelativePath}';\\n`;\n const exportStatementTypes = `\\nexport * from '${loaderTypesRelativePath}';\\n`;\n\n // Append to the main JS file\n await fs.appendFile(distIndexPath, exportStatementJS, 'utf8');\n console.warn(`Successfully appended JavaScript exports to ${distIndexPath}`);\n\n // Append to the main types file\n await fs.appendFile(distTypesPath, exportStatementTypes, 'utf8');\n console.warn(`Successfully appended type exports to ${distTypesPath}`);\n\n const loaderRelativePackageJsonPath = './dist/loader/package.json';\n const customPackageJson = {\n name: 'capsule-loader',\n private: true,\n types: './index.d.ts',\n type: 'module',\n main: './index.js',\n };\n\n await fs.writeFile(loaderRelativePackageJsonPath, JSON.stringify(customPackageJson, null, 2));\n console.warn('Custom package.json written to loader directory.');\n } catch (error) {\n console.error('Error appending loader exports:', error);\n process.exit(1);\n }\n})();\n"]}
|
|
1
|
+
{"version":3,"file":"appendLoaderExports.js","sourceRoot":"","sources":["../../scripts/appendLoaderExports.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6GAA6G;AAC7G,CAAC,GAAS,EAAE;IACV,IAAI,CAAC;QACH,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC;QAElC,MAAM,aAAa,GAAG,iBAAiB,CAAC;QACxC,MAAM,aAAa,GAAG,yBAAyB,CAAC;QAChD,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;QAC/C,MAAM,uBAAuB,GAAG,sBAAsB,CAAC;QAEvD,uBAAuB;QACvB,MAAM,iBAAiB,GAAG,oBAAoB,kBAAkB,MAAM,CAAC;QACvE,MAAM,oBAAoB,GAAG,oBAAoB,uBAAuB,MAAM,CAAC;QAE/E,6BAA6B;QAC7B,MAAM,EAAE,CAAC,UAAU,CAAC,aAAa,EAAE,iBAAiB,EAAE,MAAM,CAAC,CAAC;QAC9D,OAAO,CAAC,IAAI,CAAC,+CAA+C,aAAa,EAAE,CAAC,CAAC;QAE7E,gCAAgC;QAChC,MAAM,EAAE,CAAC,UAAU,CAAC,aAAa,EAAE,oBAAoB,EAAE,MAAM,CAAC,CAAC;QACjE,OAAO,CAAC,IAAI,CAAC,yCAAyC,aAAa,EAAE,CAAC,CAAC;QAEvE,MAAM,6BAA6B,GAAG,4BAA4B,CAAC;QACnE,MAAM,iBAAiB,GAAG;YACxB,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,IAAI;YACb,KAAK,EAAE,cAAc;YACrB,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,YAAY;SACnB,CAAC;QAEF,MAAM,EAAE,CAAC,SAAS,CAAC,6BAA6B,EAAE,IAAI,CAAC,SAAS,CAAC,iBAAiB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC9F,OAAO,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAC;IACnE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,iCAAiC,EAAE,KAAK,CAAC,CAAC;QACxD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAA,CAAC,EAAE,CAAC","sourcesContent":["// eslint-disable-next-line @typescript-eslint/no-floating-promises -- fire-and-forget: top-level script IIFE\n(async () => {\n try {\n const fs = require('fs').promises;\n\n const distIndexPath = './dist/index.js';\n const distTypesPath = './dist/types/index.d.ts';\n const loaderRelativePath = './loader/index.js';\n const loaderTypesRelativePath = '../loader/index.d.ts';\n\n // Statements to append\n const exportStatementJS = `\\nexport * from '${loaderRelativePath}';\\n`;\n const exportStatementTypes = `\\nexport * from '${loaderTypesRelativePath}';\\n`;\n\n // Append to the main JS file\n await fs.appendFile(distIndexPath, exportStatementJS, 'utf8');\n console.warn(`Successfully appended JavaScript exports to ${distIndexPath}`);\n\n // Append to the main types file\n await fs.appendFile(distTypesPath, exportStatementTypes, 'utf8');\n console.warn(`Successfully appended type exports to ${distTypesPath}`);\n\n const loaderRelativePackageJsonPath = './dist/loader/package.json';\n const customPackageJson = {\n name: 'capsule-loader',\n private: true,\n types: './index.d.ts',\n type: 'module',\n main: './index.js',\n };\n\n await fs.writeFile(loaderRelativePackageJsonPath, JSON.stringify(customPackageJson, null, 2));\n console.warn('Custom package.json written to loader directory.');\n } catch (error) {\n console.error('Error appending loader exports:', error);\n process.exit(1);\n }\n})();\n"]}
|
|
@@ -84,6 +84,7 @@ const buildImages = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
84
84
|
});
|
|
85
85
|
const main = () => {
|
|
86
86
|
buildIconLibrary();
|
|
87
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises -- fire-and-forget: build script image processing
|
|
87
88
|
buildImages();
|
|
88
89
|
};
|
|
89
90
|
main();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildAssets.js","sourceRoot":"","sources":["../../scripts/buildAssets.ts"],"names":[],"mappings":";;;;;;;;;AAAA,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC;AAE1C,SAAS,WAAW,CAAC,IAAI;IACvB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,YAAY,CAAC,IAAI;IACxB,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;AACnD,CAAC;AAED,SAAS,aAAa,CAAC,IAAI;IACzB,O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W,OAAO,EAAE,CAAC;QAEtD,SAAS,IAAI,KAAK,iBAAiB,WAAW,OAAO,MAAM,CAAC;IAC9D,CAAC;IAED,EAAE,CAAC,SAAS,CAAC,8BAA8B,EAAE,GAAG,SAAS,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE;QAC7E,IAAI,GAAG,EAAE,CAAC;YACR,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACrB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,IAAI,GAAG,GAAG,EAAE;IAChB,gBAAgB,EAAE,CAAC;IACnB,WAAW,EAAE,CAAC;AAChB,CAAC,CAAC;AACF,IAAI,EAAE,CAAC","sourcesContent":["const fs = require('fs');\nconst fsPromises = require('fs').promises;\n\nfunction toCamelCase(text) {\n return text.replace(/-\\w/g, clearAndUpper);\n}\n\nfunction toPascalCase(text) {\n return text.replace(/(^\\w|-\\w)/g, clearAndUpper);\n}\n\nfunction clearAndUpper(text) {\n return text.replace(/-/, '').toUpperCase();\n}\n\nconst buildIconLibrary = () => {\n let files: string[] = fs.readdirSync('./src/assets/icons');\n let flagFiles = fs.readdirSync('./src/assets/icons/flags');\n\n let importString = '';\n let objString = `export const Icons = {`;\n\n for (const fileName of files) {\n if (!fileName.includes('.svg')) {\n continue;\n }\n\n const fileNameNoExt = fileName.split('.')[0];\n\n const camelCaseFileName = toCamelCase(fileNameNoExt);\n const pascalCaseFileName = toPascalCase(fileNameNoExt);\n\n importString += `import ${pascalCaseFileName} from './${fileName}';\\n`;\n objString += `\\n ${camelCaseFileName}: ${pascalCaseFileName},`;\n }\n\n for (const fileName of flagFiles) {\n if (!fileName.includes('.svg')) {\n continue;\n }\n\n const fileNameNoExt = fileName.split('.')[0];\n\n const camelCaseFileName = toCamelCase(fileNameNoExt);\n const pascalCaseFileName = toPascalCase(fileNameNoExt);\n\n importString += `import ${pascalCaseFileName} from './flags/${fileName}';\\n`;\n objString += `\\n ${camelCaseFileName}: ${pascalCaseFileName},`;\n }\n\n const codeStr = `${importString}\\n${objString}\\n};\\n`;\n fs.writeFile('./src/assets/icons/index.ts', codeStr, 'utf8', err => {\n if (err) {\n console.error(err);\n }\n });\n};\n\nconst buildImages = async () => {\n const files: string[] = fs.readdirSync('./src/assets/images');\n\n let objString = 'export const Images = {\\n';\n\n for (let i = 0; i < files.length; i++) {\n const fileName = files[i];\n\n if (!fileName.includes('png') && !fileName.includes('jpg') && !fileName.includes('jpeg')) {\n continue;\n }\n\n const content = await fsPromises.readFile(`./src/assets/images/${fileName}`, { encoding: 'base64' });\n\n const fileNameSplit = fileName.split('.');\n const ext = fileNameSplit[1];\n const fileNameNoExt = fileNameSplit[0];\n\n const camelCaseFileName = toCamelCase(fileNameNoExt);\n\n const dataUrl = `data:image/${ext};base64,${content}`;\n\n objString += ` ${camelCaseFileName}:\\n '${dataUrl}',\\n`;\n }\n\n fs.writeFile('./src/assets/images/index.ts', `${objString}};\\n`, 'utf8', err => {\n if (err) {\n console.error(err);\n }\n });\n};\n\nconst main = () => {\n buildIconLibrary();\n buildImages();\n};\nmain();\n"]}
|
|
1
|
+
{"version":3,"file":"buildAssets.js","sourceRoot":"","sources":["../../scripts/buildAssets.ts"],"names":[],"mappings":";;;;;;;;;AAAA,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC;AAE1C,SAAS,WAAW,CAAC,IAAI;IACvB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,YAAY,CAAC,IAAI;IACxB,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;AACnD,CAAC;AAED,SAAS,aAAa,CAAC,IAAI;IACzB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,WAAW,EAA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AM,CAAC;IAC9D,CAAC;IAED,EAAE,CAAC,SAAS,CAAC,8BAA8B,EAAE,GAAG,SAAS,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE;QAC7E,IAAI,GAAG,EAAE,CAAC;YACR,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACrB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,IAAI,GAAG,GAAG,EAAE;IAChB,gBAAgB,EAAE,CAAC;IACnB,qHAAqH;IACrH,WAAW,EAAE,CAAC;AAChB,CAAC,CAAC;AACF,IAAI,EAAE,CAAC","sourcesContent":["const fs = require('fs');\nconst fsPromises = require('fs').promises;\n\nfunction toCamelCase(text) {\n return text.replace(/-\\w/g, clearAndUpper);\n}\n\nfunction toPascalCase(text) {\n return text.replace(/(^\\w|-\\w)/g, clearAndUpper);\n}\n\nfunction clearAndUpper(text) {\n return text.replace(/-/, '').toUpperCase();\n}\n\nconst buildIconLibrary = () => {\n let files: string[] = fs.readdirSync('./src/assets/icons');\n let flagFiles = fs.readdirSync('./src/assets/icons/flags');\n\n let importString = '';\n let objString = `export const Icons = {`;\n\n for (const fileName of files) {\n if (!fileName.includes('.svg')) {\n continue;\n }\n\n const fileNameNoExt = fileName.split('.')[0];\n\n const camelCaseFileName = toCamelCase(fileNameNoExt);\n const pascalCaseFileName = toPascalCase(fileNameNoExt);\n\n importString += `import ${pascalCaseFileName} from './${fileName}';\\n`;\n objString += `\\n ${camelCaseFileName}: ${pascalCaseFileName},`;\n }\n\n for (const fileName of flagFiles) {\n if (!fileName.includes('.svg')) {\n continue;\n }\n\n const fileNameNoExt = fileName.split('.')[0];\n\n const camelCaseFileName = toCamelCase(fileNameNoExt);\n const pascalCaseFileName = toPascalCase(fileNameNoExt);\n\n importString += `import ${pascalCaseFileName} from './flags/${fileName}';\\n`;\n objString += `\\n ${camelCaseFileName}: ${pascalCaseFileName},`;\n }\n\n const codeStr = `${importString}\\n${objString}\\n};\\n`;\n fs.writeFile('./src/assets/icons/index.ts', codeStr, 'utf8', err => {\n if (err) {\n console.error(err);\n }\n });\n};\n\nconst buildImages = async () => {\n const files: string[] = fs.readdirSync('./src/assets/images');\n\n let objString = 'export const Images = {\\n';\n\n for (let i = 0; i < files.length; i++) {\n const fileName = files[i];\n\n if (!fileName.includes('png') && !fileName.includes('jpg') && !fileName.includes('jpeg')) {\n continue;\n }\n\n const content = await fsPromises.readFile(`./src/assets/images/${fileName}`, { encoding: 'base64' });\n\n const fileNameSplit = fileName.split('.');\n const ext = fileNameSplit[1];\n const fileNameNoExt = fileNameSplit[0];\n\n const camelCaseFileName = toCamelCase(fileNameNoExt);\n\n const dataUrl = `data:image/${ext};base64,${content}`;\n\n objString += ` ${camelCaseFileName}:\\n '${dataUrl}',\\n`;\n }\n\n fs.writeFile('./src/assets/images/index.ts', `${objString}};\\n`, 'utf8', err => {\n if (err) {\n console.error(err);\n }\n });\n};\n\nconst main = () => {\n buildIconLibrary();\n // eslint-disable-next-line @typescript-eslint/no-floating-promises -- fire-and-forget: build script image processing\n buildImages();\n};\nmain();\n"]}
|
|
@@ -221,6 +221,11 @@ export declare class CpslInput {
|
|
|
221
221
|
private onPaste;
|
|
222
222
|
private focusInput;
|
|
223
223
|
private get startEl();
|
|
224
|
+
/**
|
|
225
|
+
* Sets focus on the native `input` or `textarea` in `cpsl-input`. Use this method instead of the global
|
|
226
|
+
* `input.focus()`.
|
|
227
|
+
*/
|
|
228
|
+
setFocus(): Promise<void>;
|
|
224
229
|
private get endEl();
|
|
225
230
|
render(): any;
|
|
226
231
|
}
|
|
@@ -571,6 +571,10 @@ export namespace Components {
|
|
|
571
571
|
* Number of rows for the textarea
|
|
572
572
|
*/
|
|
573
573
|
"rows": number;
|
|
574
|
+
/**
|
|
575
|
+
* Sets focus on the native `input` or `textarea` in `cpsl-input`. Use this method instead of the global `input.focus()`.
|
|
576
|
+
*/
|
|
577
|
+
"setFocus": () => Promise<void>;
|
|
574
578
|
/**
|
|
575
579
|
* If `true`, the label will display an "optional" tag.
|
|
576
580
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/core-components",
|
|
3
3
|
"description": "Capsule Core Components",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.13.0",
|
|
5
5
|
"collection": "dist/collection/collection-manifest.json",
|
|
6
6
|
"collection:main": "dist/collection/index.js",
|
|
7
7
|
"dependencies": {
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
],
|
|
69
69
|
"type": "module",
|
|
70
70
|
"types": "dist/types/index.d.ts",
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "75ac5d1ebe87366c23bb4e485481deb1b593e299"
|
|
72
72
|
}
|