@icanbwell/composite 1.1062.3-alpha.0 → 1.1063.1
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/20.index.js +1037 -1038
- package/20.index.js.map +1 -1
- package/{964.index.js → 279.index.js} +2 -2
- package/279.index.js.map +1 -0
- package/897.index.js +19 -0
- package/897.index.js.map +1 -0
- package/index.js +9 -9
- package/index.js.map +1 -1
- package/native.js +1 -1
- package/package.json +3 -3
- package/823.index.js +0 -19
- package/823.index.js.map +0 -1
- package/964.index.js.map +0 -1
package/964.index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://@icanbwell/composite/javascript/node_modules/@icanbwell/ui-toolkit-v2/_virtual/_tslib.js","webpack://@icanbwell/composite/javascript/node_modules/@icanbwell/frontend-telemetry/lib/core/errors/get-error-messsage.js","webpack://@icanbwell/composite/javascript/node_modules/@icanbwell/frontend-telemetry/lib/core/errors/get-error-details.js","webpack://@icanbwell/composite/javascript/node_modules/@icanbwell/ui-toolkit-v2/web-components/error-web-component.js","webpack://@icanbwell/composite/javascript/node_modules/@icanbwell/ui-toolkit-v2/components/DefaultErrorBoundaryFallback.js"],"names":["__classPrivateFieldGet","receiver","state","kind","f","genericMesssage","getErrorMessage","errorCode","getErrorDetails","error","_a","message","_ErrorPageWebComponent_instances","_ErrorPageWebComponent_setValue","_ErrorPageWebComponent_template","ERROR_COMPONENT_TAG_NAME","ErrorPageWebComponent","_b","defaultMessage","template","name","_oldValue","newValue","value","el","DefaultErrorBoundaryFallback","errorDetails","resetError","ref","errorComponent"],"mappings":"0LAeA,SAASA,EAAuBC,EAAUC,EAAOC,EAAMC,EAAG,CACtD,GAAID,IAAS,KAAO,CAACC,EAAG,MAAM,IAAI,UAAU,+CAA+C,EAC3F,GAAI,OAAOF,GAAU,WAAaD,IAAaC,GAAS,CAACE,EAAI,CAACF,EAAM,IAAID,CAAQ,EAAG,MAAM,IAAI,UA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,WAAW,CAC1B,CACF,CACAV,EAAmC,IAAI,QAAWC,EAAkC,SAAyCO,EAAMG,EAAO,CACxI,IAAIb,EACJ,MAAMc,GAAMd,EAAK,KAAK,cAAgB,MAAQA,IAAO,OAAS,OAASA,EAAG,eAAeU,CAAI,EACzFI,IACFA,EAAG,UAAYD,EAEnB,EAAGT,EAAkC,UAA2C,CAC9E,IAAIJ,EAAIO,EACR,IAAIE,GAAYF,GAAMP,EAAK,SAAS,eAAe,6BAA6B,KAAO,MAAQA,IAAO,OAAS,OAASA,EAAG,WAAa,MAAQO,IAAO,OAAS,OAASA,EAAG,UAAU,EAAI,EAC1L,OAAKE,IACHA,EAAW,SAAS,cAAc,SAAS,EAE3CA,EAAS,UAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAoEhBA,CACT,EACK,eAAe,IAAIJ,CAAwB,GAC9C,eAAe,OAAOA,EAA0BC,CAAqB,E,wBCrHvE,MAAMS,EAA+B,CAAC,CACpC,aAAAC,EACA,WAAAC,CACF,IAAM,CACJ,MAAMC,G,EAAM,UAAO,EACnB,O,EAAA,aAAU,IAAM,CACd,MAAMC,EAAiBD,EAAI,QACvBC,IACFA,EAAe,WAAaF,EAEhC,EAAG,CAAC,CAAC,G,EACE,OAAI,wBAAyB,CAClC,QAASD,EAAa,QACtB,IAAKE,CACP,CAAC,CACH,C","file":"964.index.js","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\r\nfunction __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}\n\nexport { __classPrivateFieldGet };\n","// TODO: Come up with a translation strategy. I18next?\nconst genericMesssage = 'Looks like something went wrong when loading this page. Please try refreshing it.';\nconst getErrorMessage = errorCode => {\n // Custom error messages here\n return genericMesssage;\n};\n\nexport { getErrorMessage };\n","import { BwellError } from './bwell-error.js';\nimport { getErrorMessage } from './get-error-messsage.js';\nimport { ErrorCode } from '@icanbwell/types';\n\nfunction getErrorDetails(error) {\n var _a;\n let message = getErrorMessage(ErrorCode.UNKNOWN);\n let errorCode = ErrorCode.UNKNOWN;\n if (error instanceof BwellError) {\n errorCode = (_a = error.errorCode) !== null && _a !== void 0 ? _a : errorCode;\n message = getErrorMessage();\n }\n return {\n message,\n errorCode\n };\n}\n\nexport { getErrorDetails };\n","import { __classPrivateFieldGet } from '../_virtual/_tslib.js';\nimport { getErrorDetails } from '@icanbwell/frontend-telemetry';\nimport { nativeBridge } from '@icanbwell/native-bridge';\n\nvar _ErrorPageWebComponent_instances, _ErrorPageWebComponent_setValue, _ErrorPageWebComponent_template;\nconst ERROR_COMPONENT_TAG_NAME = 'bwell-error-component';\nclass ErrorPageWebComponent extends HTMLElement {\n static get observedAttributes() {\n return ['message'];\n }\n constructor() {\n super();\n _ErrorPageWebComponent_instances.add(this);\n this.attachShadow({\n mode: 'open'\n });\n }\n connectedCallback() {\n var _a, _b;\n const {\n message: defaultMessage\n } = getErrorDetails();\n const template = __classPrivateFieldGet(this, _ErrorPageWebComponent_instances, \"m\", _ErrorPageWebComponent_template).call(this);\n this.shadowRoot.appendChild(template);\n __classPrivateFieldGet(this, _ErrorPageWebComponent_instances, \"m\", _ErrorPageWebComponent_setValue).call(this, 'message', this.getAttribute('message') || defaultMessage);\n (_b = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.getElementById('refresh')) === null || _b === void 0 ? void 0 : _b.addEventListener('click', () => {\n this.resetError();\n });\n }\n attributeChangedCallback(name, _oldValue, newValue) {\n __classPrivateFieldGet(this, _ErrorPageWebComponent_instances, \"m\", _ErrorPageWebComponent_setValue).call(this, name, newValue);\n }\n resetError() {\n // default behavior that can be overridden\n nativeBridge.reloadView();\n }\n}\n_ErrorPageWebComponent_instances = new WeakSet(), _ErrorPageWebComponent_setValue = function _ErrorPageWebComponent_setValue(name, value) {\n var _a;\n const el = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.getElementById(name);\n if (el) {\n el.innerHTML = value;\n }\n}, _ErrorPageWebComponent_template = function _ErrorPageWebComponent_template() {\n var _a, _b;\n let template = (_b = (_a = document.getElementById('bwell-custom-error-template')) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.cloneNode(true);\n if (!template) {\n template = document.createElement('article');\n // TODO: Do an accessibility review. Does body present any challenges?\n template.innerHTML = `\n <style>\n :host {\n --background: #FFFFFF;\n --messageTextColor: #6F6F6F;\n }\n article {\n background: var(--background);\n font-family: regular,sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n letter-spacing: 0px;\n line-height: 20px;\n margin: auto;\n max-width: 340px;\n text-align: center;\n }\n h3 {\n color: #2E3586;\n font-size: 28px;\n font-style: normal;\n font-weight: 400;\n line-height: 34px;\n }\n p {\n color: var(--messageTextColor);\n }\n button {\n background: #2E3586;\n border-radius: 5px;\n height: 55px;\n width: 200px;\n border: none;\n cursor: pointer;\n }\n button>span {\n color: #FFFFFF;\n font-size: 18px;\n font-style: normal;\n font-weight: 700;\n line-height: 22px;\n }\n </style>\n <header>\n <svg width=\"100\" height=\"100\" viewBox=\"0 0 100 100\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_645_19)\">\n <path d=\"M98.1598 74.7658L62.8319 11.0741C60.1952 6.38657 55.3902 3.51562 50 3.51562C44.6099 3.51562 39.8049 6.38657 37.1681 11.0741L1.84023 74.7658C-0.679762 79.3358 -0.621016 84.7855 2.07445 89.2967C4.71117 93.8087 9.45742 96.5042 14.6721 96.5042H85.3279C90.5426 96.5042 95.2889 93.8087 97.9256 89.2967C100.621 84.7855 100.68 79.3358 98.1598 74.7658Z\" fill=\"#FDBF00\"/>\n <path d=\"M97.9255 89.2967C95.2888 93.8087 90.5433 96.5042 85.3279 96.5042H50V3.51562C55.3902 3.51562 60.1952 6.38657 62.8319 11.0741L98.1598 74.7658C100.68 79.3358 100.621 84.7855 97.9255 89.2967Z\" fill=\"#FF9F00\"/>\n <path d=\"M41.2109 20.3325V64.2778H58.7891V20.3325H41.2109Z\" fill=\"#5A5A5A\"/>\n <path d=\"M50 70.137C45.1363 70.137 41.2109 74.0623 41.2109 78.926C41.2109 83.789 45.1363 87.7151 50 87.7151C54.8637 87.7151 58.7891 83.789 58.7891 78.926C58.7891 74.0623 54.8637 70.137 50 70.137Z\" fill=\"#5A5A5A\"/>\n <path d=\"M58.7891 78.926C58.7891 83.789 54.8637 87.7151 50 87.7151V70.137C54.8637 70.137 58.7891 74.0623 58.7891 78.926Z\" fill=\"#444444\"/>\n <path d=\"M50 20.3323H58.7891V64.2776H50V20.3323Z\" fill=\"#444444\"/>\n </g>\n <defs>\n <clipPath id=\"clip0_645_19\">\n <rect width=\"100\" height=\"100\" fill=\"white\"/>\n </clipPath>\n </defs>\n </svg>\n </header>\n <h3>Oops!</h3>\n <p id=\"message\">Looks like something went wrong when loading this page. Please try refreshing it.</p>\n <button id=\"refresh\">\n <span>Refresh</span>\n </button>\n `;\n }\n return template;\n};\nif (!customElements.get(ERROR_COMPONENT_TAG_NAME)) {\n customElements.define(ERROR_COMPONENT_TAG_NAME, ErrorPageWebComponent);\n}\n\nexport { ERROR_COMPONENT_TAG_NAME, ErrorPageWebComponent };\n","import { jsx } from 'react/jsx-runtime';\nimport { useRef, useEffect } from 'react';\n\nconst DefaultErrorBoundaryFallback = ({\n errorDetails,\n resetError\n}) => {\n const ref = useRef();\n useEffect(() => {\n const errorComponent = ref.current;\n if (errorComponent) {\n errorComponent.resetError = resetError;\n }\n }, []);\n return jsx(\"bwell-error-component\", {\n message: errorDetails.message,\n ref: ref\n });\n};\n\nexport { DefaultErrorBoundaryFallback };\n"],"sourceRoot":""}
|