@aws-amplify/ui-react 1.2.26 → 1.2.54-legacy-ui.10
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/CHANGELOG.md +224 -0
- package/dist/0.js.map +1 -1
- package/dist/1.js +656 -2000
- package/dist/1.js.map +1 -1
- package/dist/10.js +23 -681
- package/dist/10.js.map +1 -1
- package/dist/11.js +1157 -20
- package/dist/11.js.map +1 -1
- package/dist/12.js +61 -1087
- package/dist/12.js.map +1 -1
- package/dist/13.js +1146 -64
- package/dist/13.js.map +1 -1
- package/dist/14.js +34 -1163
- package/dist/14.js.map +1 -1
- package/dist/15.js +17 -37
- package/dist/15.js.map +1 -1
- package/dist/16.js +109 -13
- package/dist/16.js.map +1 -1
- package/dist/17.js +32 -67
- package/dist/17.js.map +1 -1
- package/dist/18.js +236 -46
- package/dist/18.js.map +1 -1
- package/dist/19.js +35 -224
- package/dist/19.js.map +1 -1
- package/dist/2.js +2190 -159
- package/dist/2.js.map +1 -1
- package/dist/20.js +28 -48
- package/dist/20.js.map +1 -1
- package/dist/21.js +46 -25
- package/dist/21.js.map +1 -1
- package/dist/22.js +22 -25
- package/dist/22.js.map +1 -1
- package/dist/23.js +254 -25
- package/dist/23.js.map +1 -1
- package/dist/24.js +62 -230
- package/dist/24.js.map +1 -1
- package/dist/25.js +28 -62
- package/dist/25.js.map +1 -1
- package/dist/26.js +349 -30
- package/dist/26.js.map +1 -1
- package/dist/27.js +24 -352
- package/dist/27.js.map +1 -1
- package/dist/28.js +25 -22
- package/dist/28.js.map +1 -1
- package/dist/29.js +483 -26
- package/dist/29.js.map +1 -1
- package/dist/3.js +2710 -1818
- package/dist/3.js.map +1 -1
- package/dist/30.js +1 -502
- package/dist/30.js.map +1 -1
- package/dist/31.js +1 -1
- package/dist/31.js.map +1 -1
- package/dist/32.js +12 -1
- package/dist/32.js.map +1 -1
- package/dist/4.js +361 -3669
- package/dist/4.js.map +1 -1
- package/dist/5.js +48 -242
- package/dist/5.js.map +1 -1
- package/dist/6.js +118 -74
- package/dist/6.js.map +1 -1
- package/dist/7.js +55 -99
- package/dist/7.js.map +1 -1
- package/dist/8.js +98 -46
- package/dist/8.js.map +1 -1
- package/dist/9.js +474 -412
- package/dist/9.js.map +1 -1
- package/dist/@aws-amplify/ui-react.js +50 -44
- package/dist/@aws-amplify/ui-react.js.map +1 -1
- package/dist/aws-amplify-react.min.js +2 -2
- package/dist/aws-amplify-react.min.js.map +1 -1
- package/dist/polyfills-core-js.js +5 -11
- package/dist/polyfills-core-js.js.map +1 -1
- package/dist/polyfills-css-shim.js.map +1 -1
- package/dist/polyfills-dom.js.map +1 -1
- package/package.json +3 -3
- package/dist/33.js +0 -13
- package/dist/33.js.map +0 -1
package/dist/14.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./node_modules/@aws-amplify/ui-components/dist/esm-es5/amplify-chatbot.entry.js"],"names":["__awaiter","value","resolve","P","step","generator","reject","result","adopt","_arguments","__generator","_","label","sent","t","trys","ops","next","verb","g","Symbol","f","y","op","done","body","__spreadArrays","s","i","il","arguments","r","Array","k","a","j","jl","RECORDER_EXPORT_MIME_TYPE","DEFAULT_EXPORT_SAMPLE_RATE","FFT_SIZE","FFT_MAX_DECIBELS","FFT_MIN_DECIBELS","FFT_SMOOTHING_TIME_CONSTANT","mergeBuffers","offset","bufferArray","downsampleBuffer","exportSampleRate","sampleRateRatio","recordSampleRate","newLength","Math","buffer","offsetResult","offsetBuffer","nextOffsetBuffer","accum","count","floatTo16BitPCM","byteOffset","input","output","writeString","string","view","encodeWAV","audioSize","samples","fmtSize","dataSize","totalByteSize","exportBuffer","mergedBuffers","downsampledBuffer","encodedWav","audioBlob","type","logger","AudioRecorder","_this","_a","browserOrNode","window","audio","Promise","err_1","sourceNode","processorNode","stream","audioProcessingEvent","analyserNode","onSilence","visualizer","context","err_2","Date","myBlob","fileReader","successCallback","res","errorCallback","rej","analyser","bufferLength","dataArray","amplitude","time","curr_value_time","newtime","elapsedTime","blob","visualize","canvas","width","height","canvasCtx","draw","color","getComputedStyle","document","sliceWidth","x","requestAnimationFrame","amplifyChatbotCss","ChatState","MessageFrom","ChatErrorType","AmplifyChatbot","registerInstance","Translations","messageList","h","message","from","client","createEvent","class_1","Interactions","silenceThreshold","onComplete","data","err","event","target","errorType","text","response","err_3","interactionsMessage","content","options","messageType","err_4","dialogState","error","visualization","cancelButton","handleButtonClick","variant","icon","inputPlaceholder","textInput","placeholder","I18n","description","handleInputChange","disabled","textEnabled","micButton","Initial","sendButton","handleClose","name","onSubmit","Object","get","getElement","enumerable","configurable"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAIA,SAAS,GAAI,SAAI,IAAI,SAAI,CAAb,SAAC,IAA2B,6CAA6C;AACrF,wBAAsB;AAAE,WAAOC,KAAK,YAALA,YAA6B,MAAM,mBAAmB;AAAEC,aAAO,CAAPA,KAAO,CAAPA;AAA/D,KAAoC,CAApC;AAAoF;;AAC5G,SAAO,KAAKC,CAAC,KAAKA,CAAC,GAAZ,OAAM,CAAN,EAAyB,2BAA2B;AACvD,8BAA0B;AAAE,UAAI;AAAEC,YAAI,CAACC,SAAS,CAATA,KAALD,KAAKC,CAAD,CAAJD;AAAN,QAAqC,UAAU;AAAEE,cAAM,CAANA,CAAM,CAANA;AAAY;AAAE;;AAC3F,6BAAyB;AAAE,UAAI;AAAEF,YAAI,CAACC,SAAS,CAATA,OAAS,CAATA,CAALD,KAAKC,CAAD,CAAJD;AAAN,QAAyC,UAAU;AAAEE,cAAM,CAANA,CAAM,CAANA;AAAY;AAAE;;AAC9F,0BAAsB;AAAEC,YAAM,CAANA,OAAcL,OAAO,CAACK,MAAM,CAA5BA,KAAqB,CAArBA,GAAsCC,KAAK,CAACD,MAAM,CAAZC,KAAK,CAALA,iBAAtCD,QAAsCC,CAAtCD;AAAsF;;AAC9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t(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nimport { r as registerInstance, h, c as createEvent, H as Host, g as getElement } from './index-83f2275b.js';\nimport { Logger, browserOrNode, I18n } from '@aws-amplify/core';\nimport '@aws-amplify/auth';\nimport { T as Translations } from './Translations-108d469f.js';\nimport { c as NO_INTERACTIONS_MODULE_FOUND } from './constants-c8ecaa24.js';\nimport { Interactions } from '@aws-amplify/interactions';\n// AudioRecorder settings\nvar RECORDER_EXPORT_MIME_TYPE = 'application/octet-stream';\nvar DEFAULT_EXPORT_SAMPLE_RATE = 16000;\nvar FFT_SIZE = 2048; // window size in samples for Fast Fourier Transform (FFT)\nvar FFT_MAX_DECIBELS = -10; // maximum power value in the scaling range for the FFT analysis data\nvar FFT_MIN_DECIBELS = -90; // minimum power value in the scaling range for the FFT analysis data\nvar FFT_SMOOTHING_TIME_CONSTANT = 0.85; // averaging constant with the last analysis frame\n/**\n * Merges multiple buffers into one.\n */\nvar mergeBuffers = function (bufferArray, recLength) {\n var result = new Float32Array(recLength);\n var offset = 0;\n for (var i = 0; i < bufferArray.length; i++) {\n result.set(bufferArray[i], offset);\n offset += bufferArray[i].length;\n }\n return result;\n};\n/**\n * Downsamples audio to desired export sample rate.\n */\nvar downsampleBuffer = function (buffer, recordSampleRate, exportSampleRate) {\n if (exportSampleRate === recordSampleRate) {\n return buffer;\n }\n var sampleRateRatio = recordSampleRate / exportSampleRate;\n var newLength = Math.round(buffer.length / sampleRateRatio);\n var result = new Float32Array(newLength);\n var offsetResult = 0;\n var offsetBuffer = 0;\n while (offsetResult < result.length) {\n var nextOffsetBuffer = Math.round((offsetResult + 1) * sampleRateRatio);\n var accum = 0, count = 0;\n for (var i = offsetBuffer; i < nextOffsetBuffer && i < buffer.length; i++) {\n accum += buffer[i];\n count++;\n }\n result[offsetResult] = accum / count;\n offsetResult++;\n offsetBuffer = nextOffsetBuffer;\n }\n return result;\n};\n/**\n * converts raw audio values to 16 bit pcm.\n */\nvar floatTo16BitPCM = function (output, offset, input) {\n var byteOffset = offset;\n for (var i = 0; i < input.length; i++, byteOffset += 2) {\n var s = Math.max(-1, Math.min(1, input[i]));\n output.setInt16(byteOffset, s < 0 ? s * 0x8000 : s * 0x7fff, true);\n }\n};\n/**\n * Write given strings in big-endian order.\n */\nvar writeString = function (view, offset, string) {\n for (var i = 0; i < string.length; i++) {\n view.setUint8(offset + i, string.charCodeAt(i));\n }\n};\n/**\n * Encodes raw pcm audio into a wav file.\n */\nvar encodeWAV = function (samples, exportSampleRate) {\n /**\n * WAV file consists of three parts: RIFF header, WAVE subchunk, and data subchunk. We precompute the size of them.\n */\n var audioSize = samples.length * 2; // We use 16-bit samples, so we have (2 * sampleLength) bytes.\n var fmtSize = 24; // Byte size of the fmt subchunk: 24 bytes that the audio information that we'll set below.\n var dataSize = 8 + audioSize; // Byte size of the data subchunk: raw sound data plus 8 bytes for the subchunk descriptions.\n var totalByteSize = 12 + fmtSize + dataSize; // Byte size of the whole file, including the chunk header / descriptor.\n // create DataView object to write byte values into\n var buffer = new ArrayBuffer(totalByteSize); // buffer to write the chunk values in.\n var view = new DataView(buffer);\n /**\n * Start writing the .wav file. We write top to bottom, so byte offset (first numeric argument) increases strictly.\n */\n // RIFF header\n writeString(view, 0, 'RIFF'); // At offset 0, write the letters \"RIFF\"\n view.setUint32(4, fmtSize + dataSize, true); // At offset 4, write the size of fmt and data chunk size combined.\n writeString(view, 8, 'WAVE'); // At offset 8, write the format type \"WAVE\"\n // fmt subchunk\n writeString(view, 12, 'fmt '); //chunkdId 'fmt '\n view.setUint32(16, fmtSize - 8, true); // fmt subchunk size below this value. We set 8 bytes already, so subtract 8 bytes from fmtSize.\n view.setUint16(20, 1, true); // Audio format code, which is 1 for PCM.\n view.setUint16(22, 1, true); // Number of audio channels. We use mono, ie 1.\n view.setUint32(24, exportSampleRate, true); // Sample rate of the audio file.\n view.setUint32(28, exportSampleRate * 2, true); // Data rate, or # of data bytes per second. Since each sample is 2 bytes, this is 2 * sampleRate.\n view.setUint16(32, 2, true); // block align, # of bytes per sample including all channels, ie. 2 bytes.\n view.setUint16(34, 16, true); // bits per sample, ie. 16 bits\n // data subchunk\n writeString(view, 36, 'data'); // write the chunkId 'data'\n view.setUint32(40, audioSize, true); // Audio byte size\n floatTo16BitPCM(view, 44, samples); // raw pcm values then go here.\n return view;\n};\n/**\n * Given arrays of raw pcm audio, downsamples the audio to desired sample rate and encodes it to a wav audio file.\n *\n * @param recBuffer {Float32Array[]} - 2d float array containing the recorded raw audio\n * @param recLength {number} - total length of recorded audio\n * @param recordSampleRate {number} - sample rate of the recorded audio\n * @param exportSampleRate {number} - desired sample rate of the exported file\n */\nvar exportBuffer = function (recBuffer, recLength, recordSampleRate, exportSampleRate) {\n var mergedBuffers = mergeBuffers(recBuffer, recLength);\n var downsampledBuffer = downsampleBuffer(mergedBuffers, recordSampleRate, exportSampleRate);\n var encodedWav = encodeWAV(downsampledBuffer, exportSampleRate);\n var audioBlob = new Blob([encodedWav], {\n type: RECORDER_EXPORT_MIME_TYPE,\n });\n return audioBlob;\n};\nvar logger = new Logger('AudioRecorder');\nvar AudioRecorder = /** @class */ (function () {\n function AudioRecorder(options) {\n // input mic stream is stored in a buffer\n this.streamBuffer = [];\n this.streamBufferLength = 0;\n this.recording = false;\n this.options = options;\n }\n /**\n * This must be called first to enable audio context and request microphone access.\n * Once access granted, it connects all the necessary audio nodes to the context so that it can begin recording or playing.\n */\n AudioRecorder.prototype.init = function () {\n return __awaiter(this, void 0, void 0, function () {\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!browserOrNode().isBrowser) return [3 /*break*/, 2];\n window.AudioContext =\n window.AudioContext || window.webkitAudioContext;\n this.audioContext = new AudioContext();\n return [4 /*yield*/, navigator.mediaDevices\n .getUserMedia({ audio: true })\n .then(function (stream) {\n _this.audioSupported = true;\n _this.setupAudioNodes(stream);\n })\n .catch(function () {\n _this.audioSupported = false;\n return Promise.reject('Audio is not supported');\n })];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n this.audioSupported = false;\n return [2 /*return*/, Promise.reject('Audio is not supported')];\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Setup audio nodes after successful `init`.\n */\n AudioRecorder.prototype.setupAudioNodes = function (stream) {\n return __awaiter(this, void 0, void 0, function () {\n var err_1, sourceNode, processorNode, analyserNode;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.audioContext.resume()];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n err_1 = _a.sent();\n logger.error(err_1);\n return [3 /*break*/, 3];\n case 3:\n sourceNode = this.audioContext.createMediaStreamSource(stream);\n processorNode = this.audioContext.createScriptProcessor(4096, 1, 1);\n processorNode.onaudioprocess = function (audioProcessingEvent) {\n if (!_this.recording)\n return;\n var stream = audioProcessingEvent.inputBuffer.getChannelData(0);\n _this.streamBuffer.push(new Float32Array(stream)); // set to a copy of the stream\n _this.streamBufferLength += stream.length;\n _this.analyse();\n };\n analyserNode = this.audioContext.createAnalyser();\n analyserNode.minDecibels = FFT_MIN_DECIBELS;\n analyserNode.maxDecibels = FFT_MAX_DECIBELS;\n analyserNode.smoothingTimeConstant = FFT_SMOOTHING_TIME_CONSTANT;\n sourceNode.connect(analyserNode);\n analyserNode.connect(processorNode);\n processorNode.connect(sourceNode.context.destination);\n this.analyserNode = analyserNode;\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Start recording audio and listen for silence.\n *\n * @param onSilence {SilenceHandler} - called whenever silence is detected\n * @param visualizer {Visualizer} - called with audio data on each audio process to be used for visualization.\n */\n AudioRecorder.prototype.startRecording = function (onSilence, visualizer) {\n return __awaiter(this, void 0, void 0, function () {\n var context, err_2;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (this.recording || !this.audioSupported)\n return [2 /*return*/];\n this.onSilence = onSilence || function () { };\n this.visualizer = visualizer || function () { };\n context = this.audioContext;\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, context.resume()];\n case 2:\n _a.sent();\n return [3 /*break*/, 4];\n case 3:\n err_2 = _a.sent();\n logger.error(err_2);\n return [3 /*break*/, 4];\n case 4:\n this.start = Date.now();\n this.recording = true;\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Pause recording\n */\n AudioRecorder.prototype.stopRecording = function () {\n if (!this.audioSupported)\n return;\n this.recording = false;\n };\n /**\n * Pause recording and clear audio buffer\n */\n AudioRecorder.prototype.clear = function () {\n this.stopRecording();\n this.streamBufferLength = 0;\n this.streamBuffer = [];\n };\n /**\n * Plays given audioStream with audioContext\n *\n * @param buffer {Uint8Array} - audioStream to be played\n */\n AudioRecorder.prototype.play = function (buffer) {\n var _this = this;\n if (!buffer || !this.audioSupported)\n return;\n var myBlob = new Blob([buffer]);\n return new Promise(function (res, rej) {\n var fileReader = new FileReader();\n fileReader.onload = function () {\n if (_this.playbackSource)\n _this.playbackSource.disconnect(); // disconnect previous playback source\n _this.playbackSource = _this.audioContext.createBufferSource();\n var successCallback = function (buf) {\n _this.playbackSource.buffer = buf;\n _this.playbackSource.connect(_this.audioContext.destination);\n _this.playbackSource.onended = function () {\n return res();\n };\n _this.playbackSource.start(0);\n };\n var errorCallback = function (err) {\n return rej(err);\n };\n _this.audioContext.decodeAudioData(fileReader.result, successCallback, errorCallback);\n };\n fileReader.onerror = function () { return rej(); };\n fileReader.readAsArrayBuffer(myBlob);\n });\n };\n /**\n * Stops playing audio if there's a playback source connected.\n */\n AudioRecorder.prototype.stop = function () {\n if (this.playbackSource) {\n this.playbackSource.stop();\n }\n };\n /**\n * Called after each audioProcess. Check for silence and give fft time domain data to visualizer.\n */\n AudioRecorder.prototype.analyse = function () {\n if (!this.audioSupported)\n return;\n var analyser = this.analyserNode;\n analyser.fftSize = FFT_SIZE;\n var bufferLength = analyser.fftSize;\n var dataArray = new Uint8Array(bufferLength);\n var amplitude = this.options.amplitude;\n var time = this.options.time;\n analyser.getByteTimeDomainData(dataArray);\n this.visualizer(dataArray, bufferLength);\n for (var i = 0; i < bufferLength; i++) {\n // Normalize between -1 and 1.\n var curr_value_time = dataArray[i] / 128 - 1.0;\n if (curr_value_time > amplitude || curr_value_time < -1 * amplitude) {\n this.start = Date.now();\n }\n }\n var newtime = Date.now();\n var elapsedTime = newtime - this.start;\n if (elapsedTime > time) {\n this.onSilence();\n }\n };\n /**\n * Encodes recorded buffer to a wav file and exports it to a blob.\n *\n * @param exportSampleRate {number} - desired sample rate of the exported buffer\n */\n AudioRecorder.prototype.exportWAV = function (exportSampleRate) {\n if (exportSampleRate === void 0) { exportSampleRate = DEFAULT_EXPORT_SAMPLE_RATE; }\n return __awaiter(this, void 0, void 0, function () {\n var recordSampleRate, blob;\n return __generator(this, function (_a) {\n if (!this.audioSupported)\n return [2 /*return*/];\n recordSampleRate = this.audioContext.sampleRate;\n blob = exportBuffer(this.streamBuffer, this.streamBufferLength, recordSampleRate, exportSampleRate);\n this.clear();\n return [2 /*return*/, blob];\n });\n });\n };\n return AudioRecorder;\n}());\nvar visualize = function (dataArray, bufferLength, canvas) {\n if (!canvas)\n return;\n if (!browserOrNode().isBrowser)\n throw new Error('Visualization is not supported on non-browsers.');\n var _a = canvas.getBoundingClientRect(), width = _a.width, height = _a.height;\n // need to update the default canvas width and height\n canvas.width = width;\n canvas.height = height;\n var canvasCtx = canvas.getContext('2d');\n canvasCtx.fillStyle = 'white';\n canvasCtx.clearRect(0, 0, width, height);\n var draw = function () {\n canvasCtx.fillRect(0, 0, width, height);\n canvasCtx.lineWidth = 1;\n var color = getComputedStyle(document.documentElement).getPropertyValue('--amplify-primary-color');\n canvasCtx.strokeStyle = !color || color === '' ? '#ff9900' : color; // TODO: try separate css variable\n canvasCtx.beginPath();\n var sliceWidth = (width * 1.0) / bufferLength;\n var x = 0;\n for (var i = 0; i < bufferLength || i % 3 === 0; i++) {\n var value = dataArray[i] / 128.0;\n var y = (value * height) / 2;\n if (i === 0) {\n canvasCtx.moveTo(x, y);\n }\n else {\n canvasCtx.lineTo(x, y);\n }\n x += sliceWidth;\n }\n canvasCtx.lineTo(canvas.width, canvas.height / 2);\n canvasCtx.stroke();\n };\n // Register our draw function with requestAnimationFrame.\n requestAnimationFrame(draw);\n};\nvar amplifyChatbotCss = \".bot .dot{background-color:var(--bot-dot-color)}.user .dot{background-color:var(--user-dot-color)}.dot-flashing{width:2.625rem}.dot-flashing .dot{display:inline-block;width:0.625rem;height:0.625rem;border-radius:10rem;opacity:0.65}.dot-flashing .left{-webkit-animation:dot-flashing 1s infinite alternate;animation:dot-flashing 1s infinite alternate;-webkit-animation-delay:0s;animation-delay:0s}.dot-flashing .middle{margin-left:0.375rem;margin-right:0.375rem;-webkit-animation:dot-flashing 1s infinite linear alternate;animation:dot-flashing 1s infinite linear alternate;-webkit-animation-delay:0.5s;animation-delay:0.5s}.dot-flashing .right{-webkit-animation:dot-flashing 1s infinite alternate;animation:dot-flashing 1s infinite alternate;-webkit-animation-delay:1s;animation-delay:1s}@-webkit-keyframes dot-flashing{0%{opacity:0.65}50%,100%{opacity:0.1}}@keyframes dot-flashing{0%{opacity:0.65}50%,100%{opacity:0.1}}:host{--width:28.75rem;--height:37.5rem;--header-color:var(--amplify-secondary-color);--header-size:var(--amplify-text-lg);--bot-background-color:rgb(230, 230, 230);--bot-text-color:black;--bot-dot-color:var(--bot-text-color);--user-background-color:var(--amplify-blue);--user-text-color:var(--amplify-white);--user-dot-color:var(--user-text-color)}.amplify-chatbot{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column;background-color:var(--background-color);border-radius:0.375rem;-webkit-box-shadow:0.0625rem 0rem 0.25rem 0 rgba(0, 0, 0, 0.15);box-shadow:0.0625rem 0rem 0.25rem 0 rgba(0, 0, 0, 0.15);-webkit-box-sizing:border-box;box-sizing:border-box;font-family:var(--amplify-font-family);margin-bottom:1rem;width:100%;height:var(--height);max-width:var(--width)}@media (min-width: 672px){.amplify-chatbot{width:var(--width)}}.header{padding:1.25rem 0.375rem 1.25rem 0.375rem;color:var(--header-color);font-size:var(--header-size);font-weight:bold;text-align:center;word-wrap:break-word}.body{border-top:0.0625rem solid rgba(0, 0, 0, 0.05);padding:1.5rem 1rem 0 1rem;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-direction:column;flex-direction:column;overflow:auto}.bubble{max-width:100%;padding:0.8em 1.4em;text-align:left;word-wrap:break-word;margin-bottom:0.625rem}.bot{margin-right:auto;background-color:var(--bot-background-color);color:var(--bot-text-color);border-radius:1.5rem 1.5rem 1.5rem 0}.user{margin-left:auto;background-color:var(--user-background-color);color:var(--user-text-color);border-radius:1.5rem 1.5rem 0 1.5rem}.footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top:0.062rem solid rgba(0, 0, 0, 0.05);padding-right:0.625rem;min-height:3.125rem}.footer amplify-input{--border:none;--margin:0;-ms-flex-positive:1;flex-grow:1}canvas{margin-left:0.625rem;margin-right:0.625rem;-ms-flex-positive:1;flex-grow:1;height:3.125rem}.icon-button{--icon-height:1.25rem;--icon-fill:var(--amplify-primary-color);--padding:0.625rem;--width:auto}\";\n// enum for possible bot states\nvar ChatState;\n(function (ChatState) {\n ChatState[ChatState[\"Initial\"] = 0] = \"Initial\";\n ChatState[ChatState[\"Listening\"] = 1] = \"Listening\";\n ChatState[ChatState[\"SendingText\"] = 2] = \"SendingText\";\n ChatState[ChatState[\"SendingVoice\"] = 3] = \"SendingVoice\";\n ChatState[ChatState[\"Error\"] = 4] = \"Error\";\n})(ChatState || (ChatState = {}));\n// Message types\nvar MessageFrom;\n(function (MessageFrom) {\n MessageFrom[\"Bot\"] = \"bot\";\n MessageFrom[\"User\"] = \"user\";\n})(MessageFrom || (MessageFrom = {}));\n// Error types\nvar ChatErrorType;\n(function (ChatErrorType) {\n ChatErrorType[ChatErrorType[\"Recoverable\"] = 0] = \"Recoverable\";\n ChatErrorType[ChatErrorType[\"Unrecoverable\"] = 1] = \"Unrecoverable\";\n})(ChatErrorType || (ChatErrorType = {}));\nvar AmplifyChatbot = /** @class */ (function () {\n function class_1(hostRef) {\n var _this = this;\n registerInstance(this, hostRef);\n /** Clear messages when conversation finishes */\n this.clearOnComplete = false;\n /** Continue listening to users after they send the message */\n this.conversationModeOn = false;\n /** Text placed in the top header */\n this.botTitle = Translations.CHATBOT_TITLE;\n /** Whether voice chat is enabled */\n this.voiceEnabled = false;\n /** Whether text chat is enabled */\n this.textEnabled = true;\n /** Amount of silence (in ms) to wait for */\n this.silenceTime = 1500;\n /** Noise threshold between -1 and 1. Anything below is considered a silence. */\n this.silenceThreshold = 0.2;\n /** Messages in current session */\n this.messages = [];\n /** Text input box value */\n this.text = '';\n /** Current app state */\n this.chatState = ChatState.Initial;\n /**\n * Rendering methods\n */\n this.messageJSX = function (messages) {\n var messageList = messages.map(function (message) { return (h(\"div\", { class: \"bubble \" + message.from }, message.content)); });\n if (_this.chatState === ChatState.SendingText ||\n _this.chatState === ChatState.SendingVoice) {\n // if waiting for voice message, show animation on user side because app is waiting for transcript. Else put it on bot side.\n var client = _this.chatState === ChatState.SendingText\n ? MessageFrom.Bot\n : MessageFrom.User;\n messageList.push(h(\"div\", { class: \"bubble \" + client }, h(\"div\", { class: \"dot-flashing \" + client }, h(\"span\", { class: \"dot left\" }), h(\"span\", { class: \"dot middle\" }), h(\"span\", { class: \"dot right\" }))));\n }\n return messageList;\n };\n this.chatCompleted = createEvent(this, \"chatCompleted\", 7);\n }\n // Occurs when user presses enter in input box\n class_1.prototype.submitHandler = function (_event) {\n this.sendTextMessage();\n };\n /**\n * Lifecycle functions\n */\n class_1.prototype.componentWillLoad = function () {\n if (!Interactions || typeof Interactions.onComplete !== 'function') {\n throw new Error(NO_INTERACTIONS_MODULE_FOUND);\n }\n this.validateProps();\n };\n class_1.prototype.componentDidRender = function () {\n // scroll to the bottom if necessary\n var body = this.element.shadowRoot.querySelector('.body');\n body.scrollTop = body.scrollHeight;\n };\n class_1.prototype.validateProps = function () {\n var _this = this;\n if (!this.voiceEnabled && !this.textEnabled) {\n this.setError(Translations.CHAT_DISABLED_ERROR, ChatErrorType.Unrecoverable);\n return;\n }\n else if (!this.botName) {\n this.setError(Translations.NO_BOT_NAME_ERROR, ChatErrorType.Unrecoverable);\n return;\n }\n if (this.welcomeMessage)\n this.appendToChat(this.welcomeMessage, MessageFrom.Bot);\n // Initialize AudioRecorder if voice is enabled\n if (this.voiceEnabled) {\n this.audioRecorder = new AudioRecorder({\n time: this.silenceTime,\n amplitude: this.silenceThreshold,\n });\n this.audioRecorder.init().catch(function (err) {\n _this.setError(err, ChatErrorType.Recoverable);\n });\n }\n // Callback function to be called after chat is completed\n var onComplete = function (err, data) {\n _this.chatCompleted.emit({\n data: data,\n err: err,\n });\n if (_this.clearOnComplete) {\n _this.reset();\n }\n else {\n _this.chatState = ChatState.Initial;\n }\n };\n try {\n Interactions.onComplete(this.botName, onComplete);\n }\n catch (err) {\n this.setError(err, ChatErrorType.Unrecoverable);\n }\n };\n /**\n * Handlers\n */\n class_1.prototype.handleSubmit = function (event) {\n event.preventDefault();\n this.sendTextMessage();\n };\n class_1.prototype.handleMicButton = function () {\n var _this = this;\n if (this.chatState !== ChatState.Initial)\n return;\n this.audioRecorder.stop();\n this.chatState = ChatState.Listening;\n this.audioRecorder.startRecording(function () { return _this.handleSilence(); }, function (data, length) { return _this.visualizer(data, length); });\n };\n class_1.prototype.handleSilence = function () {\n var _this = this;\n this.chatState = ChatState.SendingVoice;\n this.audioRecorder.stopRecording();\n this.audioRecorder.exportWAV().then(function (blob) {\n _this.sendVoiceMessage(blob);\n });\n };\n class_1.prototype.handleTextChange = function (event) {\n var target = event.target;\n this.text = target.value;\n };\n class_1.prototype.handleCancelButton = function () {\n this.audioRecorder.clear();\n this.chatState = ChatState.Initial;\n };\n class_1.prototype.handleToastClose = function (errorType) {\n this.error = undefined; // clear error\n // if error is recoverable, reset the app state to initial\n if (errorType === ChatErrorType.Recoverable) {\n this.chatState = ChatState.Initial;\n }\n };\n /**\n * Visualization\n */\n class_1.prototype.visualizer = function (dataArray, bufferLength) {\n var canvas = this.element.shadowRoot.querySelector('canvas');\n visualize(dataArray, bufferLength, canvas);\n };\n /**\n * Interactions helpers\n */\n class_1.prototype.sendTextMessage = function () {\n return __awaiter(this, void 0, void 0, function () {\n var text, response, err_3;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (this.text.length === 0 || this.chatState !== ChatState.Initial)\n return [2 /*return*/];\n text = this.text;\n this.text = '';\n this.appendToChat(text, MessageFrom.User);\n this.chatState = ChatState.SendingText;\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, Interactions.send(this.botName, text)];\n case 2:\n response = _a.sent();\n return [3 /*break*/, 4];\n case 3:\n err_3 = _a.sent();\n this.setError(err_3, ChatErrorType.Recoverable);\n return [2 /*return*/];\n case 4:\n if (response.message) {\n this.appendToChat(response.message, MessageFrom.Bot);\n }\n this.chatState = ChatState.Initial;\n return [2 /*return*/];\n }\n });\n });\n };\n class_1.prototype.sendVoiceMessage = function (audioInput) {\n return __awaiter(this, void 0, void 0, function () {\n var interactionsMessage, response, err_4, dialogState;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n interactionsMessage = {\n content: audioInput,\n options: {\n messageType: 'voice',\n },\n };\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, Interactions.send(this.botName, interactionsMessage)];\n case 2:\n response = _a.sent();\n return [3 /*break*/, 4];\n case 3:\n err_4 = _a.sent();\n this.setError(err_4, ChatErrorType.Recoverable);\n return [2 /*return*/];\n case 4:\n this.chatState = ChatState.Initial;\n dialogState = response.dialogState;\n if (response.inputTranscript)\n this.appendToChat(response.inputTranscript, MessageFrom.User);\n this.appendToChat(response.message, MessageFrom.Bot);\n return [4 /*yield*/, this.audioRecorder\n .play(response.audioStream)\n .then(function () {\n // if conversationMode is on, chat is incomplete, and mic button isn't pressed yet, resume listening.\n if (_this.conversationModeOn &&\n dialogState !== 'Fulfilled' &&\n dialogState !== 'Failed' &&\n _this.chatState === ChatState.Initial) {\n _this.handleMicButton();\n }\n })\n .catch(function (err) { return _this.setError(err, ChatErrorType.Recoverable); })];\n case 5:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n class_1.prototype.appendToChat = function (content, from) {\n this.messages = __spreadArrays(this.messages, [\n {\n content: content,\n from: from,\n },\n ]);\n };\n /**\n * State control methods\n */\n class_1.prototype.setError = function (error, errorType) {\n var message = typeof error === 'string' ? error : error.message;\n this.chatState = ChatState.Error;\n this.error = { message: message, errorType: errorType };\n };\n class_1.prototype.reset = function () {\n this.chatState = ChatState.Initial;\n this.text = '';\n this.error = undefined;\n this.messages = [];\n if (this.welcomeMessage)\n this.appendToChat(this.welcomeMessage, MessageFrom.Bot);\n this.audioRecorder && this.audioRecorder.clear();\n };\n class_1.prototype.listeningFooterJSX = function () {\n var _this = this;\n var visualization = h(\"canvas\", { height: \"50\" });\n var cancelButton = (h(\"amplify-button\", { \"data-test\": \"chatbot-cancel-button\", handleButtonClick: function () { return _this.handleCancelButton(); }, class: \"icon-button\", variant: \"icon\", icon: \"ban\" }));\n return [visualization, cancelButton];\n };\n class_1.prototype.footerJSX = function () {\n var _this = this;\n if (this.chatState === ChatState.Listening)\n return this.listeningFooterJSX();\n var inputPlaceholder = this.textEnabled\n ? Translations.TEXT_INPUT_PLACEHOLDER\n : Translations.VOICE_INPUT_PLACEHOLDER;\n var textInput = (h(\"amplify-input\", { placeholder: I18n.get(inputPlaceholder), description: \"text\", handleInputChange: function (evt) { return _this.handleTextChange(evt); }, value: this.text, disabled: this.chatState === ChatState.Error || !this.textEnabled }));\n var micButton = this.voiceEnabled && (h(\"amplify-button\", { \"data-test\": \"chatbot-mic-button\", handleButtonClick: function () { return _this.handleMicButton(); }, class: \"icon-button\", variant: \"icon\", icon: \"microphone\", disabled: this.chatState === ChatState.Error ||\n this.chatState !== ChatState.Initial }));\n var sendButton = this.textEnabled && (h(\"amplify-button\", { \"data-test\": \"chatbot-send-button\", class: \"icon-button\", variant: \"icon\", icon: \"send\", handleButtonClick: function () { return _this.sendTextMessage(); }, disabled: this.chatState === ChatState.Error ||\n this.chatState !== ChatState.Initial }));\n return [textInput, micButton, sendButton];\n };\n class_1.prototype.errorToast = function () {\n var _this = this;\n if (!this.error)\n return;\n var _a = this.error, message = _a.message, errorType = _a.errorType;\n return (h(\"amplify-toast\", { message: I18n.get(message), handleClose: function () { return _this.handleToastClose(errorType); } }));\n };\n class_1.prototype.render = function () {\n var _this = this;\n return (h(Host, null, h(\"div\", { class: \"amplify-chatbot\" }, h(\"slot\", { name: \"header\" }, h(\"div\", { class: \"header\", \"data-test\": \"chatbot-header\" }, I18n.get(this.botTitle))), h(\"div\", { class: \"body\", \"data-test\": \"chatbot-body\" }, this.messageJSX(this.messages)), h(\"form\", { onSubmit: function (e) { return _this.handleSubmit(e); } }, h(\"div\", { class: \"footer\", \"data-test\": \"chatbot-footer\" }, this.footerJSX())), this.errorToast())));\n };\n Object.defineProperty(class_1.prototype, \"element\", {\n get: function () { return getElement(this); },\n enumerable: false,\n configurable: true\n });\n return class_1;\n}());\nAmplifyChatbot.style = amplifyChatbotCss;\nexport { AmplifyChatbot as amplify_chatbot };\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///./node_modules/@aws-amplify/ui-components/dist/esm-es5/amplify-checkbox.entry.js"],"names":["amplifyCheckboxCss","AmplifyCheckbox","hostRef","_this","registerInstance","checked","disabled","onClick","prototype","componentWillLoad","console","warn","render","h","type","name","value","id","fieldId","htmlFor","label","style"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AACA,IAAIA,kBAAkB,GAAG,sNAAzB;;AACA,IAAIC,eAAe;AAAG;AAAe,YAAY;EAC7C,SAASA,eAAT,CAAyBC,OAAzB,EAAkC;IAC9B,IAAIC,KAAK,GAAG,IAAZ;;IACAC,4DAAgB,CAAC,IAAD,EAAOF,OAAP,CAAhBE;IACA;;IACA,KAAKC,OAAL,GAAe,KAAf;IACA;;IACA,KAAKC,QAAL,GAAgB,KAAhB;;IACA,KAAKC,OAAL,GAAe,YAAY;MACvBJ,KAAK,CAACE,OAANF,GAAgB,CAACA,KAAK,CAACE,OAAvBF;IADJ;EAGH;;EACDF,eAAe,CAACO,SAAhBP,CAA0BQ,iBAA1BR,GAA8C,YAAY;IACtDS,OAAO,CAACC,IAARD,CAAa,kMAAbA;EADJ;;EAGAT,eAAe,CAACO,SAAhBP,CAA0BW,MAA1BX,GAAmC,YAAY;IAC3C,OAAQY,4DAAC,CAAC,MAAD,EAAS;MAAE,SAAO;IAAT,CAAT,EAAgCA,4DAAC,CAAC,OAAD,EAAU;MAAEN,OAAO,EAAE,KAAKA,OAAhB;MAAyBO,IAAI,EAAE,UAA/B;MAA2CC,IAAI,EAAE,KAAKA,IAAtD;MAA4DC,KAAK,EAAE,KAAKA,KAAxE;MAA+EC,EAAE,EAAE,KAAKC,OAAxF;MAAiGb,OAAO,EAAE,KAAKA,OAA/G;MAAwHC,QAAQ,EAAE,KAAKA;IAAvI,CAAV,CAAjC,EAA+LO,4DAAC,CAAC,eAAD,EAAkB;MAAEM,OAAO,EAAE,KAAKD;IAAhB,CAAlB,EAA6C,KAAKE,KAAlD,CAAhM,CAAT;EADJ;;EAGA,OAAOnB,eAAP;AAlBiC,GAArC;;AAoBAA,eAAe,CAACoB,KAAhBpB,GAAwBD,kBAAxBC","file":"14.js","sourcesContent":["import { r as registerInstance, h } from './index-83f2275b.js';\nvar amplifyCheckboxCss = \":host{--font-family:var(--amplify-font-family)}.checkbox{margin-bottom:22px;display:block;width:100%;padding:16px;font-size:var(--amplify-text-sm);font-family:var(--font-family)}.checkbox input{margin-right:12px}\";\nvar AmplifyCheckbox = /** @class */ (function () {\n function AmplifyCheckbox(hostRef) {\n var _this = this;\n registerInstance(this, hostRef);\n /** If `true`, the checkbox is selected. */\n this.checked = false;\n /** If `true`, the checkbox is disabled */\n this.disabled = false;\n this.onClick = function () {\n _this.checked = !_this.checked;\n };\n }\n AmplifyCheckbox.prototype.componentWillLoad = function () {\n console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');\n };\n AmplifyCheckbox.prototype.render = function () {\n return (h(\"span\", { class: \"checkbox\" }, h(\"input\", { onClick: this.onClick, type: \"checkbox\", name: this.name, value: this.value, id: this.fieldId, checked: this.checked, disabled: this.disabled }), h(\"amplify-label\", { htmlFor: this.fieldId }, this.label)));\n };\n return AmplifyCheckbox;\n}());\nAmplifyCheckbox.style = amplifyCheckboxCss;\nexport { AmplifyCheckbox as amplify_checkbox };\n"],"sourceRoot":""}
|
package/dist/15.js
CHANGED
|
@@ -1,58 +1,38 @@
|
|
|
1
1
|
(this["webpackJsonpaws_amplify_react"] = this["webpackJsonpaws_amplify_react"] || []).push([[15],{
|
|
2
2
|
|
|
3
|
-
/***/ "../amplify-ui-components/dist/esm-es5/amplify-
|
|
4
|
-
|
|
5
|
-
!*** ../amplify-ui-components/dist/esm-es5/amplify-
|
|
6
|
-
|
|
7
|
-
/*! exports provided:
|
|
3
|
+
/***/ "../amplify-ui-components/dist/esm-es5/amplify-container.entry.js":
|
|
4
|
+
/*!************************************************************************!*\
|
|
5
|
+
!*** ../amplify-ui-components/dist/esm-es5/amplify-container.entry.js ***!
|
|
6
|
+
\************************************************************************/
|
|
7
|
+
/*! exports provided: amplify_container */
|
|
8
8
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
9
9
|
|
|
10
10
|
"use strict";
|
|
11
11
|
__webpack_require__.r(__webpack_exports__);
|
|
12
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
12
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_container", function() { return AmplifyContainer; });
|
|
13
13
|
/* harmony import */ var _index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-83f2275b.js */ "../amplify-ui-components/dist/esm-es5/index-83f2275b.js");
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var amplifyContainerCss = "amplify-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:100vh}";
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var AmplifyContainer =
|
|
18
18
|
/** @class */
|
|
19
19
|
function () {
|
|
20
|
-
function
|
|
21
|
-
var _this = this;
|
|
22
|
-
|
|
20
|
+
function AmplifyContainer(hostRef) {
|
|
23
21
|
Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
|
24
|
-
/** If `true`, the checkbox is selected. */
|
|
25
|
-
|
|
26
|
-
this.checked = false;
|
|
27
|
-
/** If `true`, the checkbox is disabled */
|
|
28
|
-
|
|
29
|
-
this.disabled = false;
|
|
30
|
-
|
|
31
|
-
this.onClick = function () {
|
|
32
|
-
_this.checked = !_this.checked;
|
|
33
|
-
};
|
|
34
22
|
}
|
|
35
23
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
name: this.name,
|
|
43
|
-
value: this.value,
|
|
44
|
-
id: this.fieldId,
|
|
45
|
-
checked: this.checked,
|
|
46
|
-
disabled: this.disabled
|
|
47
|
-
}), Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-label", {
|
|
48
|
-
htmlFor: this.fieldId
|
|
49
|
-
}, this.label));
|
|
24
|
+
AmplifyContainer.prototype.componentWillLoad = function () {
|
|
25
|
+
console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
AmplifyContainer.prototype.render = function () {
|
|
29
|
+
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["H"], null, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
|
|
50
30
|
};
|
|
51
31
|
|
|
52
|
-
return
|
|
32
|
+
return AmplifyContainer;
|
|
53
33
|
}();
|
|
54
34
|
|
|
55
|
-
|
|
35
|
+
AmplifyContainer.style = amplifyContainerCss;
|
|
56
36
|
|
|
57
37
|
|
|
58
38
|
/***/ })
|
package/dist/15.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./node_modules/@aws-amplify/ui-components/dist/esm-es5/amplify-
|
|
1
|
+
{"version":3,"sources":["webpack:///./node_modules/@aws-amplify/ui-components/dist/esm-es5/amplify-container.entry.js"],"names":["amplifyContainerCss","AmplifyContainer","hostRef","registerInstance","prototype","componentWillLoad","console","warn","render","h","Host","style"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AACA,IAAIA,mBAAmB,GAAG,uJAA1B;;AACA,IAAIC,gBAAgB;AAAG;AAAe,YAAY;EAC9C,SAASA,gBAAT,CAA0BC,OAA1B,EAAmC;IAC/BC,4DAAgB,CAAC,IAAD,EAAOD,OAAP,CAAhBC;EACH;;EACDF,gBAAgB,CAACG,SAAjBH,CAA2BI,iBAA3BJ,GAA+C,YAAY;IACvDK,OAAO,CAACC,IAARD,CAAa,kMAAbA;EADJ;;EAGAL,gBAAgB,CAACG,SAAjBH,CAA2BO,MAA3BP,GAAoC,YAAY;IAC5C,OAAQQ,4DAAC,CAACC,oDAAD,EAAO,IAAP,EAAaD,4DAAC,CAAC,MAAD,EAAS,IAAT,CAAd,CAAT;EADJ;;EAGA,OAAOR,gBAAP;AAVkC,GAAtC;;AAYAA,gBAAgB,CAACU,KAAjBV,GAAyBD,mBAAzBC","file":"15.js","sourcesContent":["import { r as registerInstance, h, H as Host } from './index-83f2275b.js';\nvar amplifyContainerCss = \"amplify-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:100vh}\";\nvar AmplifyContainer = /** @class */ (function () {\n function AmplifyContainer(hostRef) {\n registerInstance(this, hostRef);\n }\n AmplifyContainer.prototype.componentWillLoad = function () {\n console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');\n };\n AmplifyContainer.prototype.render = function () {\n return (h(Host, null, h(\"slot\", null)));\n };\n return AmplifyContainer;\n}());\nAmplifyContainer.style = amplifyContainerCss;\nexport { AmplifyContainer as amplify_container };\n"],"sourceRoot":""}
|
package/dist/16.js
CHANGED
|
@@ -1,34 +1,130 @@
|
|
|
1
1
|
(this["webpackJsonpaws_amplify_react"] = this["webpackJsonpaws_amplify_react"] || []).push([[16],{
|
|
2
2
|
|
|
3
|
-
/***/ "../amplify-ui-components/dist/esm-es5/amplify-
|
|
4
|
-
|
|
5
|
-
!*** ../amplify-ui-components/dist/esm-es5/amplify-
|
|
6
|
-
|
|
7
|
-
/*! exports provided:
|
|
3
|
+
/***/ "../amplify-ui-components/dist/esm-es5/amplify-federated-buttons_2.entry.js":
|
|
4
|
+
/*!**********************************************************************************!*\
|
|
5
|
+
!*** ../amplify-ui-components/dist/esm-es5/amplify-federated-buttons_2.entry.js ***!
|
|
6
|
+
\**********************************************************************************/
|
|
7
|
+
/*! exports provided: amplify_federated_buttons, amplify_strike */
|
|
8
8
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
9
9
|
|
|
10
10
|
"use strict";
|
|
11
11
|
__webpack_require__.r(__webpack_exports__);
|
|
12
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
12
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_federated_buttons", function() { return AmplifyFederatedButtons; });
|
|
13
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_strike", function() { return AmplifyStrike; });
|
|
13
14
|
/* harmony import */ var _index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-83f2275b.js */ "../amplify-ui-components/dist/esm-es5/index-83f2275b.js");
|
|
15
|
+
/* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
|
|
16
|
+
/* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
17
|
+
/* harmony import */ var _auth_types_78df304e_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./auth-types-78df304e.js */ "../amplify-ui-components/dist/esm-es5/auth-types-78df304e.js");
|
|
18
|
+
/* harmony import */ var _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @aws-amplify/auth */ "@aws-amplify/auth");
|
|
19
|
+
/* harmony import */ var _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3__);
|
|
20
|
+
/* harmony import */ var _Translations_108d469f_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Translations-108d469f.js */ "../amplify-ui-components/dist/esm-es5/Translations-108d469f.js");
|
|
21
|
+
/* harmony import */ var _constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constants-c8ecaa24.js */ "../amplify-ui-components/dist/esm-es5/constants-c8ecaa24.js");
|
|
22
|
+
/* harmony import */ var _helpers_14fcb50c_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helpers-14fcb50c.js */ "../amplify-ui-components/dist/esm-es5/helpers-14fcb50c.js");
|
|
14
23
|
|
|
15
|
-
var amplifyContainerCss = "amplify-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:100vh}";
|
|
16
24
|
|
|
17
|
-
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
var AmplifyFederatedButtons =
|
|
18
32
|
/** @class */
|
|
19
33
|
function () {
|
|
20
|
-
function
|
|
34
|
+
function AmplifyFederatedButtons(hostRef) {
|
|
21
35
|
Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
|
36
|
+
/** The current authentication state. */
|
|
37
|
+
|
|
38
|
+
this.authState = _auth_types_78df304e_js__WEBPACK_IMPORTED_MODULE_2__["A"].SignIn;
|
|
39
|
+
/** Federated credentials & configuration. */
|
|
40
|
+
|
|
41
|
+
this.federated = {};
|
|
42
|
+
/** Auth state change handler for this component
|
|
43
|
+
* e.g. SignIn -> 'Create Account' link -> SignUp
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
this.handleAuthStateChange = _helpers_14fcb50c_js__WEBPACK_IMPORTED_MODULE_6__["d"];
|
|
22
47
|
}
|
|
23
48
|
|
|
24
|
-
|
|
25
|
-
|
|
49
|
+
AmplifyFederatedButtons.prototype.componentWillLoad = function () {
|
|
50
|
+
console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');
|
|
51
|
+
|
|
52
|
+
if (!_aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3__["Auth"] || typeof _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3__["Auth"].configure !== 'function') {
|
|
53
|
+
throw new Error(_constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_5__["N"]);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
var _a = _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3__["Auth"].configure().oauth,
|
|
57
|
+
oauth = _a === void 0 ? {} : _a; // backward compatibility
|
|
58
|
+
|
|
59
|
+
if (oauth['domain']) {
|
|
60
|
+
this.federated.oauthConfig = Object.assign(Object.assign({}, this.federated.oauthConfig), oauth);
|
|
61
|
+
} else if (oauth['awsCognito']) {
|
|
62
|
+
this.federated.oauthConfig = Object.assign(Object.assign({}, this.federated.oauthConfig), oauth['awsCognito']);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (oauth['auth0']) {
|
|
66
|
+
this.federated.auth0Config = Object.assign(Object.assign({}, this.federated.auth0Config), oauth['auth0']);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
AmplifyFederatedButtons.prototype.render = function () {
|
|
71
|
+
if (!Object.values(_auth_types_78df304e_js__WEBPACK_IMPORTED_MODULE_2__["A"]).includes(this.authState)) {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["isEmpty"])(this.federated)) {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
var _a = this.federated,
|
|
80
|
+
amazonClientId = _a.amazonClientId,
|
|
81
|
+
auth0Config = _a.auth0Config,
|
|
82
|
+
facebookAppId = _a.facebookAppId,
|
|
83
|
+
googleClientId = _a.googleClientId,
|
|
84
|
+
oauthConfig = _a.oauthConfig;
|
|
85
|
+
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", null, googleClientId && Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", null, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-google-button", {
|
|
86
|
+
clientId: googleClientId,
|
|
87
|
+
handleAuthStateChange: this.handleAuthStateChange
|
|
88
|
+
})), facebookAppId && Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", null, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-facebook-button", {
|
|
89
|
+
appId: facebookAppId,
|
|
90
|
+
handleAuthStateChange: this.handleAuthStateChange
|
|
91
|
+
})), amazonClientId && Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", null, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-amazon-button", {
|
|
92
|
+
clientId: amazonClientId,
|
|
93
|
+
handleAuthStateChange: this.handleAuthStateChange
|
|
94
|
+
})), oauthConfig && Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", null, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-oauth-button", {
|
|
95
|
+
config: oauthConfig
|
|
96
|
+
})), auth0Config && Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", null, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-auth0-button", {
|
|
97
|
+
config: auth0Config,
|
|
98
|
+
handleAuthStateChange: this.handleAuthStateChange
|
|
99
|
+
})));
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
return AmplifyFederatedButtons;
|
|
103
|
+
}();
|
|
104
|
+
|
|
105
|
+
var amplifyStrikeCss = ".sc-amplify-strike-h{--color:var(--amplify-grey);--border-color:var(--amplify-light-grey);--content-background:var(--amplify-white);display:block;width:100%;text-align:center;border-bottom:1px solid var(--border-color);line-height:0.1em;margin:32px 0;color:var(--color)}.strike-content.sc-amplify-strike{background:var(--content-background);padding:0 25px;font-size:var(--amplify-text-sm);font-weight:500}";
|
|
106
|
+
|
|
107
|
+
var AmplifyStrike =
|
|
108
|
+
/** @class */
|
|
109
|
+
function () {
|
|
110
|
+
function AmplifyStrike(hostRef) {
|
|
111
|
+
Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
AmplifyStrike.prototype.componentWillLoad = function () {
|
|
115
|
+
console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
AmplifyStrike.prototype.render = function () {
|
|
119
|
+
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("span", {
|
|
120
|
+
"class": "strike-content"
|
|
121
|
+
}, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
|
|
26
122
|
};
|
|
27
123
|
|
|
28
|
-
return
|
|
124
|
+
return AmplifyStrike;
|
|
29
125
|
}();
|
|
30
126
|
|
|
31
|
-
|
|
127
|
+
AmplifyStrike.style = amplifyStrikeCss;
|
|
32
128
|
|
|
33
129
|
|
|
34
130
|
/***/ })
|
package/dist/16.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./node_modules/@aws-amplify/ui-components/dist/esm-es5/amplify-
|
|
1
|
+
{"version":3,"sources":["webpack:///./node_modules/@aws-amplify/ui-components/dist/esm-es5/amplify-federated-buttons_2.entry.js"],"names":["AmplifyFederatedButtons","hostRef","registerInstance","authState","AuthState","SignIn","federated","handleAuthStateChange","dispatchAuthStateChangeEvent","prototype","componentWillLoad","console","warn","Auth","configure","Error","NO_AUTH_MODULE_FOUND","_a","oauth","oauthConfig","Object","assign","auth0Config","render","values","includes","isEmpty","amazonClientId","facebookAppId","googleClientId","h","clientId","appId","config","amplifyStrikeCss","AmplifyStrike","style"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,IAAIA,uBAAuB;AAAG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,CAAjU,EAA8bY,WAAW,IAAKW,4DAAC,CAAC,KAAD,EAAQ,IAAR,EAAcA,4DAAC,CAAC,sBAAD,EAAyB;MAAEG,MAAM,EAAEd;IAAV,CAAzB,CAAf,CAA/c,EAAmhBG,WAAW,IAAKQ,4DAAC,CAAC,KAAD,EAAQ,IAAR,EAAcA,4DAAC,CAAC,sBAAD,EAAyB;MAAEG,MAAM,EAAEX,WAAV;MAAuBf,qBAAqB,EAAE,KAAKA;IAAnD,CAAzB,CAAf,CAApiB,CAAT;EARJ;;EAUA,OAAOP,uBAAP;AAvCyC,GAA7C;;AAyCA,IAAIkC,gBAAgB,GAAG,uZAAvB;;AACA,IAAIC,aAAa;AAAG;AAAe,YAAY;EAC3C,SAASA,aAAT,CAAuBlC,OAAvB,EAAgC;IAC5BC,4DAAgB,CAAC,IAAD,EAAOD,OAAP,CAAhBC;EACH;;EACDiC,aAAa,CAAC1B,SAAd0B,CAAwBzB,iBAAxByB,GAA4C,YAAY;IACpDxB,OAAO,CAACC,IAARD,CAAa,kMAAbA;EADJ;;EAGAwB,aAAa,CAAC1B,SAAd0B,CAAwBZ,MAAxBY,GAAiC,YAAY;IACzC,OAAQL,4DAAC,CAAC,MAAD,EAAS;MAAE,SAAO;IAAT,CAAT,EAAsCA,4DAAC,CAAC,MAAD,EAAS,IAAT,CAAvC,CAAT;EADJ;;EAGA,OAAOK,aAAP;AAV+B,GAAnC;;AAYAA,aAAa,CAACC,KAAdD,GAAsBD,gBAAtBC","file":"16.js","sourcesContent":["import { r as registerInstance, h } from './index-83f2275b.js';\nimport { isEmpty } from '@aws-amplify/core';\nimport { A as AuthState } from './auth-types-78df304e.js';\nimport { Auth } from '@aws-amplify/auth';\nimport './Translations-108d469f.js';\nimport { N as NO_AUTH_MODULE_FOUND } from './constants-c8ecaa24.js';\nimport { d as dispatchAuthStateChangeEvent } from './helpers-14fcb50c.js';\nvar AmplifyFederatedButtons = /** @class */ (function () {\n function AmplifyFederatedButtons(hostRef) {\n registerInstance(this, hostRef);\n /** The current authentication state. */\n this.authState = AuthState.SignIn;\n /** Federated credentials & configuration. */\n this.federated = {};\n /** Auth state change handler for this component\n * e.g. SignIn -> 'Create Account' link -> SignUp\n */\n this.handleAuthStateChange = dispatchAuthStateChangeEvent;\n }\n AmplifyFederatedButtons.prototype.componentWillLoad = function () {\n console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');\n if (!Auth || typeof Auth.configure !== 'function') {\n throw new Error(NO_AUTH_MODULE_FOUND);\n }\n var _a = Auth.configure().oauth, oauth = _a === void 0 ? {} : _a;\n // backward compatibility\n if (oauth['domain']) {\n this.federated.oauthConfig = Object.assign(Object.assign({}, this.federated.oauthConfig), oauth);\n }\n else if (oauth['awsCognito']) {\n this.federated.oauthConfig = Object.assign(Object.assign({}, this.federated.oauthConfig), oauth['awsCognito']);\n }\n if (oauth['auth0']) {\n this.federated.auth0Config = Object.assign(Object.assign({}, this.federated.auth0Config), oauth['auth0']);\n }\n };\n AmplifyFederatedButtons.prototype.render = function () {\n if (!Object.values(AuthState).includes(this.authState)) {\n return null;\n }\n if (isEmpty(this.federated)) {\n return null;\n }\n var _a = this.federated, amazonClientId = _a.amazonClientId, auth0Config = _a.auth0Config, facebookAppId = _a.facebookAppId, googleClientId = _a.googleClientId, oauthConfig = _a.oauthConfig;\n return (h(\"div\", null, googleClientId && (h(\"div\", null, h(\"amplify-google-button\", { clientId: googleClientId, handleAuthStateChange: this.handleAuthStateChange }))), facebookAppId && (h(\"div\", null, h(\"amplify-facebook-button\", { appId: facebookAppId, handleAuthStateChange: this.handleAuthStateChange }))), amazonClientId && (h(\"div\", null, h(\"amplify-amazon-button\", { clientId: amazonClientId, handleAuthStateChange: this.handleAuthStateChange }))), oauthConfig && (h(\"div\", null, h(\"amplify-oauth-button\", { config: oauthConfig }))), auth0Config && (h(\"div\", null, h(\"amplify-auth0-button\", { config: auth0Config, handleAuthStateChange: this.handleAuthStateChange })))));\n };\n return AmplifyFederatedButtons;\n}());\nvar amplifyStrikeCss = \".sc-amplify-strike-h{--color:var(--amplify-grey);--border-color:var(--amplify-light-grey);--content-background:var(--amplify-white);display:block;width:100%;text-align:center;border-bottom:1px solid var(--border-color);line-height:0.1em;margin:32px 0;color:var(--color)}.strike-content.sc-amplify-strike{background:var(--content-background);padding:0 25px;font-size:var(--amplify-text-sm);font-weight:500}\";\nvar AmplifyStrike = /** @class */ (function () {\n function AmplifyStrike(hostRef) {\n registerInstance(this, hostRef);\n }\n AmplifyStrike.prototype.componentWillLoad = function () {\n console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');\n };\n AmplifyStrike.prototype.render = function () {\n return (h(\"span\", { class: \"strike-content\" }, h(\"slot\", null)));\n };\n return AmplifyStrike;\n}());\nAmplifyStrike.style = amplifyStrikeCss;\nexport { AmplifyFederatedButtons as amplify_federated_buttons, AmplifyStrike as amplify_strike };\n"],"sourceRoot":""}
|
package/dist/17.js
CHANGED
|
@@ -1,37 +1,33 @@
|
|
|
1
1
|
(this["webpackJsonpaws_amplify_react"] = this["webpackJsonpaws_amplify_react"] || []).push([[17],{
|
|
2
2
|
|
|
3
|
-
/***/ "../amplify-ui-components/dist/esm-es5/amplify-federated-
|
|
4
|
-
|
|
5
|
-
!*** ../amplify-ui-components/dist/esm-es5/amplify-federated-
|
|
6
|
-
|
|
7
|
-
/*! exports provided:
|
|
3
|
+
/***/ "../amplify-ui-components/dist/esm-es5/amplify-federated-sign-in.entry.js":
|
|
4
|
+
/*!********************************************************************************!*\
|
|
5
|
+
!*** ../amplify-ui-components/dist/esm-es5/amplify-federated-sign-in.entry.js ***!
|
|
6
|
+
\********************************************************************************/
|
|
7
|
+
/*! exports provided: amplify_federated_sign_in */
|
|
8
8
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
9
9
|
|
|
10
10
|
"use strict";
|
|
11
11
|
__webpack_require__.r(__webpack_exports__);
|
|
12
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
13
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_strike", function() { return AmplifyStrike; });
|
|
12
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_federated_sign_in", function() { return AmplifyFederatedSignIn; });
|
|
14
13
|
/* harmony import */ var _index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-83f2275b.js */ "../amplify-ui-components/dist/esm-es5/index-83f2275b.js");
|
|
15
14
|
/* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
|
|
16
15
|
/* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
17
16
|
/* harmony import */ var _auth_types_78df304e_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./auth-types-78df304e.js */ "../amplify-ui-components/dist/esm-es5/auth-types-78df304e.js");
|
|
18
17
|
/* harmony import */ var _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @aws-amplify/auth */ "@aws-amplify/auth");
|
|
19
18
|
/* harmony import */ var _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3__);
|
|
20
|
-
/* harmony import */ var
|
|
21
|
-
/* harmony import */ var _constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constants-c8ecaa24.js */ "../amplify-ui-components/dist/esm-es5/constants-c8ecaa24.js");
|
|
22
|
-
/* harmony import */ var _helpers_14fcb50c_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helpers-14fcb50c.js */ "../amplify-ui-components/dist/esm-es5/helpers-14fcb50c.js");
|
|
19
|
+
/* harmony import */ var _constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constants-c8ecaa24.js */ "../amplify-ui-components/dist/esm-es5/constants-c8ecaa24.js");
|
|
23
20
|
|
|
24
21
|
|
|
25
22
|
|
|
26
23
|
|
|
27
24
|
|
|
25
|
+
var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('amplify-federated-sign-in');
|
|
28
26
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
var AmplifyFederatedButtons =
|
|
27
|
+
var AmplifyFederatedSignIn =
|
|
32
28
|
/** @class */
|
|
33
29
|
function () {
|
|
34
|
-
function
|
|
30
|
+
function AmplifyFederatedSignIn(hostRef) {
|
|
35
31
|
Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
|
36
32
|
/** The current authentication state. */
|
|
37
33
|
|
|
@@ -39,86 +35,55 @@ function () {
|
|
|
39
35
|
/** Federated credentials & configuration. */
|
|
40
36
|
|
|
41
37
|
this.federated = {};
|
|
42
|
-
/** Auth state change handler for this component
|
|
43
|
-
* e.g. SignIn -> 'Create Account' link -> SignUp
|
|
44
|
-
*/
|
|
45
|
-
|
|
46
|
-
this.handleAuthStateChange = _helpers_14fcb50c_js__WEBPACK_IMPORTED_MODULE_6__["d"];
|
|
47
38
|
}
|
|
48
39
|
|
|
49
|
-
|
|
40
|
+
AmplifyFederatedSignIn.prototype.componentWillLoad = function () {
|
|
41
|
+
console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');
|
|
42
|
+
|
|
50
43
|
if (!_aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3__["Auth"] || typeof _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3__["Auth"].configure !== 'function') {
|
|
51
|
-
throw new Error(
|
|
44
|
+
throw new Error(_constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["N"]);
|
|
52
45
|
}
|
|
53
46
|
|
|
54
47
|
var _a = _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3__["Auth"].configure().oauth,
|
|
55
48
|
oauth = _a === void 0 ? {} : _a; // backward compatibility
|
|
56
49
|
|
|
57
50
|
if (oauth['domain']) {
|
|
58
|
-
this.federated.
|
|
51
|
+
this.federated.oauth_config = Object.assign(Object.assign({}, this.federated.oauth_config), oauth);
|
|
59
52
|
} else if (oauth['awsCognito']) {
|
|
60
|
-
this.federated.
|
|
53
|
+
this.federated.oauth_config = Object.assign(Object.assign({}, this.federated.oauth_config), oauth['awsCognito']);
|
|
61
54
|
}
|
|
62
55
|
|
|
63
56
|
if (oauth['auth0']) {
|
|
64
|
-
this.federated.
|
|
57
|
+
this.federated.auth0 = Object.assign(Object.assign({}, this.federated.auth0), oauth['auth0']);
|
|
65
58
|
}
|
|
66
59
|
};
|
|
67
60
|
|
|
68
|
-
|
|
69
|
-
if (!
|
|
61
|
+
AmplifyFederatedSignIn.prototype.render = function () {
|
|
62
|
+
if (!this.federated) {
|
|
63
|
+
logger.debug('federated prop is empty. show nothing');
|
|
64
|
+
logger.debug('federated={google_client_id: , facebook_app_id: , amazon_client_id}');
|
|
70
65
|
return null;
|
|
71
66
|
}
|
|
72
67
|
|
|
73
|
-
if (Object(
|
|
68
|
+
if (!Object.values(_auth_types_78df304e_js__WEBPACK_IMPORTED_MODULE_2__["A"]).includes(this.authState)) {
|
|
74
69
|
return null;
|
|
75
70
|
}
|
|
76
71
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
})), facebookAppId && Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", null, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-facebook-button", {
|
|
87
|
-
appId: facebookAppId,
|
|
88
|
-
handleAuthStateChange: this.handleAuthStateChange
|
|
89
|
-
})), amazonClientId && Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", null, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-amazon-button", {
|
|
90
|
-
clientId: amazonClientId,
|
|
91
|
-
handleAuthStateChange: this.handleAuthStateChange
|
|
92
|
-
})), oauthConfig && Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", null, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-oauth-button", {
|
|
93
|
-
config: oauthConfig
|
|
94
|
-
})), auth0Config && Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", null, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-auth0-button", {
|
|
95
|
-
config: auth0Config,
|
|
96
|
-
handleAuthStateChange: this.handleAuthStateChange
|
|
72
|
+
logger.debug('federated Config is', this.federated);
|
|
73
|
+
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-form-section", {
|
|
74
|
+
"data-test": "federated-sign-in-section"
|
|
75
|
+
}, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-section", {
|
|
76
|
+
"data-test": "federated-sign-in-body-section"
|
|
77
|
+
}, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-federated-buttons", {
|
|
78
|
+
authState: this.authState,
|
|
79
|
+
"data-test": "federated-sign-in-buttons",
|
|
80
|
+
federated: this.federated
|
|
97
81
|
})));
|
|
98
82
|
};
|
|
99
83
|
|
|
100
|
-
return
|
|
101
|
-
}();
|
|
102
|
-
|
|
103
|
-
var amplifyStrikeCss = ".sc-amplify-strike-h{--color:var(--amplify-grey);--border-color:var(--amplify-light-grey);--content-background:var(--amplify-white);display:block;width:100%;text-align:center;border-bottom:1px solid var(--border-color);line-height:0.1em;margin:32px 0;color:var(--color)}.strike-content.sc-amplify-strike{background:var(--content-background);padding:0 25px;font-size:var(--amplify-text-sm);font-weight:500}";
|
|
104
|
-
|
|
105
|
-
var AmplifyStrike =
|
|
106
|
-
/** @class */
|
|
107
|
-
function () {
|
|
108
|
-
function AmplifyStrike(hostRef) {
|
|
109
|
-
Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
AmplifyStrike.prototype.render = function () {
|
|
113
|
-
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("span", {
|
|
114
|
-
"class": "strike-content"
|
|
115
|
-
}, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
return AmplifyStrike;
|
|
84
|
+
return AmplifyFederatedSignIn;
|
|
119
85
|
}();
|
|
120
86
|
|
|
121
|
-
AmplifyStrike.style = amplifyStrikeCss;
|
|
122
87
|
|
|
123
88
|
|
|
124
89
|
/***/ })
|