@looker/extension-utils 0.1.26 → 0.1.27-alpha.1725

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sagas.js","names":["_typedReduxSaga","require","_utils","_slice","getLocalStorageConfig","configKey","EmptyConfig","base_url","looker_url","data","localStorage","getItem","result","JSON","parse","initSaga","action","initSuccessAction","setFailureAction","OAuthFormActions","call","payload","put","error","message","setUrlSaga","updateValidationMessages","setUrlActionSuccess","url","validateUrl","value","Error","concat","elementName","name","newMessage","type","clearConfigSaga","clearConfigActionSuccess","updateMessageBarAction","setHasConfig","isAuthenticated","removeItem","intent","text","verifyConfigSaga","apiServerUrl","select","storeState","formState","OAuthFormSlice","verifyConfigActionFailure","verifyConfigActionSuccess","clearMessageBarAction","versionsUrl","versions","getVersions","web_server_url","saveConfigSaga","saveConfigActionSuccess","client_id","redirect_uri","api_server_url","setItem","stringify","saga","initAction","setUrlAction","clearConfigAction","verifyConfigAction","saveConfigAction","takeEvery"],"sources":["../../../../../src/OAuthForm/src/state/sagas.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { PayloadAction } from '@reduxjs/toolkit'\nimport { takeEvery, put, call, select } from 'typed-redux-saga'\nimport type { ConfigValues } from '../utils'\nimport { getVersions, validateUrl } from '../utils'\nimport type {\n ClearConfigActionPayload,\n SetUrlActionPayload,\n OAuthFormState,\n SaveConfigPayload,\n} from './slice'\nimport { OAuthFormSlice, OAuthFormActions } from './slice'\n\n/**\n * get saved configData from localStorage key\n * @param configKey key that config will be saved under in local storage\n * @returns\n */\nconst getLocalStorageConfig = (configKey: string): ConfigValues => {\n const EmptyConfig = {\n base_url: '',\n looker_url: '',\n }\n const data = localStorage.getItem(configKey)\n const result = data ? JSON.parse(data) : EmptyConfig\n\n return result\n}\n\n/**\n * checks for saved configData in localStorage\n */\nfunction* initSaga(action: PayloadAction<string>) {\n const { initSuccessAction, setFailureAction } = OAuthFormActions\n try {\n const result = yield* call(getLocalStorageConfig, action.payload)\n yield* put(initSuccessAction(result))\n } catch (error: any) {\n yield* put(setFailureAction(error.message))\n }\n}\n\n/**\n * updates the new url and adds or removes form validation message\n * @param action containing name and value of form element changed\n */\nfunction* setUrlSaga(action: PayloadAction<SetUrlActionPayload>) {\n const { updateValidationMessages, setUrlActionSuccess } = OAuthFormActions\n try {\n const url = validateUrl(action.payload.value)\n if (!url) throw new Error(`${action.payload.value} is not a valid url`)\n\n // clear the error message if one was there\n yield* put(\n updateValidationMessages({\n elementName: action.payload.name,\n newMessage: null,\n })\n )\n } catch (error: any) {\n yield* put(\n updateValidationMessages({\n elementName: action.payload.name,\n newMessage: {\n message: error.message,\n type: 'error',\n },\n })\n )\n } finally {\n // update the form element\n const url = validateUrl(action.payload.value)\n yield* put(setUrlActionSuccess(url || action.payload.value))\n }\n}\n\n/**\n * clears form, removes local storage config key and triggers callback function\n * @param action containing the localstorage key to clear, a callback function, and if the user is already authenticated\n */\nfunction* clearConfigSaga(action: PayloadAction<ClearConfigActionPayload>) {\n const { clearConfigActionSuccess, setFailureAction, updateMessageBarAction } =\n OAuthFormActions\n try {\n const { configKey, setHasConfig, isAuthenticated } = action.payload\n localStorage.removeItem(configKey)\n if (setHasConfig) setHasConfig(false)\n if (isAuthenticated) {\n yield* put(\n updateMessageBarAction({\n intent: 'warn',\n text: 'Please reload the browser page to log out',\n })\n )\n }\n yield* put(clearConfigActionSuccess())\n } catch (error: any) {\n yield* put(setFailureAction(error.message))\n }\n}\n\n/**\n * verify button clicked, verifies apiServerUrl and populates OAuth server URL if valid\n */\nfunction* verifyConfigSaga() {\n const apiServerUrl = yield* select((storeState) => {\n const formState: OAuthFormState = storeState[OAuthFormSlice.name]\n return formState.apiServerUrl\n })\n const {\n verifyConfigActionFailure,\n verifyConfigActionSuccess,\n clearMessageBarAction,\n } = OAuthFormActions\n\n try {\n yield* put(clearMessageBarAction())\n const versionsUrl = `${apiServerUrl}/versions`\n\n const versions = yield* call(getVersions, versionsUrl)\n if (!versions) throw new Error()\n\n yield* put(verifyConfigActionSuccess(versions.web_server_url))\n } catch (error: any) {\n yield* put(verifyConfigActionFailure(error.message))\n }\n}\n\n/**\n * save button clicked, verify api server url and if valid save config data to localstorage\n * @param action containing configKey, callback function, client_id and redirect_uri\n */\nfunction* saveConfigSaga(action: PayloadAction<SaveConfigPayload>) {\n const apiServerUrl = yield* select((storeState) => {\n const formState: OAuthFormState = storeState[OAuthFormSlice.name]\n return formState.apiServerUrl\n })\n const {\n verifyConfigActionFailure,\n clearMessageBarAction,\n saveConfigActionSuccess,\n } = OAuthFormActions\n const { configKey, setHasConfig, client_id, redirect_uri } = action.payload\n\n try {\n yield* put(clearMessageBarAction())\n const versionsUrl = `${apiServerUrl}/versions`\n\n const versions = yield* call(getVersions, versionsUrl)\n if (!versions) throw new Error()\n\n const data = {\n base_url: versions.api_server_url,\n looker_url: versions.web_server_url,\n client_id,\n redirect_uri,\n }\n localStorage.setItem(configKey, JSON.stringify(data))\n if (setHasConfig) setHasConfig(true)\n\n yield* put(\n saveConfigActionSuccess({\n base_url: versions.api_server_url,\n looker_url: versions.web_server_url,\n })\n )\n } catch (error: any) {\n yield* put(verifyConfigActionFailure(error.message))\n }\n}\n\nexport function* saga() {\n const {\n initAction,\n setUrlAction,\n clearConfigAction,\n verifyConfigAction,\n saveConfigAction,\n } = OAuthFormActions\n yield* takeEvery(initAction, initSaga)\n yield* takeEvery(setUrlAction, setUrlSaga)\n yield* takeEvery(clearConfigAction, clearConfigSaga)\n yield* takeEvery(verifyConfigAction, verifyConfigSaga)\n yield* takeEvery(saveConfigAction, saveConfigSaga)\n}\n"],"mappings":";;;;;;AA0BA,IAAAA,eAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAOA,IAAAE,MAAA,GAAAF,OAAA;AAOA,IAAMG,qBAAqB,GAAIC,SAAiB,IAAmB;EACjE,IAAMC,WAAW,GAAG;IAClBC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACD,IAAMC,IAAI,GAAGC,YAAY,CAACC,OAAO,CAACN,SAAS,CAAC;EAC5C,IAAMO,MAAM,GAAGH,IAAI,GAAGI,IAAI,CAACC,KAAK,CAACL,IAAI,CAAC,GAAGH,WAAW;EAEpD,OAAOM,MAAM;AACf,CAAC;AAKD,UAAUG,QAAQA,CAACC,MAA6B,EAAE;EAChD,IAAM;IAAEC,iBAAiB;IAAEC;EAAiB,CAAC,GAAGC,uBAAgB;EAChE,IAAI;IACF,IAAMP,MAAM,GAAG,OAAO,IAAAQ,oBAAI,EAAChB,qBAAqB,EAAEY,MAAM,CAACK,OAAO,CAAC;IACjE,OAAO,IAAAC,mBAAG,EAACL,iBAAiB,CAACL,MAAM,CAAC,CAAC;EACvC,CAAC,CAAC,OAAOW,KAAU,EAAE;IACnB,OAAO,IAAAD,mBAAG,EAACJ,gBAAgB,CAACK,KAAK,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CAAC,GAAGnD,uBAAgB;EACpB,OAAO,IAAAoD,yBAAS,EAACL,UAAU,EAAEnD,QAAQ,CAAC;EACtC,OAAO,IAAAwD,yBAAS,EAACJ,YAAY,EAAE1C,UAAU,CAAC;EAC1C,OAAO,IAAA8C,yBAAS,EAACH,iBAAiB,EAAE/B,eAAe,CAAC;EACpD,OAAO,IAAAkC,yBAAS,EAACF,kBAAkB,EAAExB,gBAAgB,CAAC;EACtD,OAAO,IAAA0B,yBAAS,EAACD,gBAAgB,EAAEZ,cAAc,CAAC;AACpD"}
@@ -3,9 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useOAuthFormState = exports.useOAuthFormActions = exports.oAuthFormActions = exports.defaultOAuthFormState = exports.SLICE_NAME = exports.OAuthFormSlice = void 0;
6
+ exports.useOAuthFormState = exports.useOAuthFormActions = exports.defaultOAuthFormState = exports.SLICE_NAME = exports.OAuthFormSlice = exports.OAuthFormActions = void 0;
7
7
  var _redux = require("@looker/redux");
8
8
  var _toolkit = require("@reduxjs/toolkit");
9
+ var _omit = _interopRequireDefault(require("lodash/omit"));
10
+ var _sagas = require("./sagas");
11
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
12
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
10
13
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
11
14
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -32,52 +35,82 @@ var OAuthFormSlice = (0, _toolkit.createSlice)({
32
35
  name: SLICE_NAME,
33
36
  initialState: defaultOAuthFormState,
34
37
  reducers: {
35
- clearFormAction(_state) {
38
+ initAction(_state, _action) {},
39
+ initSuccessAction(state, action) {
40
+ state.apiServerUrl = action.payload.base_url;
41
+ state.webUrl = action.payload.looker_url;
42
+ },
43
+ setUrlAction(_state, _action) {},
44
+ setUrlActionSuccess(state, action) {
45
+ state.apiServerUrl = action.payload;
46
+ state.webUrl = '';
47
+ },
48
+ updateValidationMessages(state, action) {
49
+ var newValidationMessages = state.validationMessages;
50
+ if (action.payload.newMessage !== null) {
51
+ newValidationMessages[action.payload.elementName] = action.payload.newMessage;
52
+ } else {
53
+ newValidationMessages = (0, _omit.default)(newValidationMessages, action.payload.elementName);
54
+ }
55
+ state.validationMessages = newValidationMessages;
56
+ },
57
+ clearConfigAction(_state, _action) {},
58
+ clearConfigActionSuccess() {
36
59
  return _objectSpread({}, defaultOAuthFormState);
37
60
  },
38
- saveNewConfigAction(state, action) {
39
- state.savedConfig = {
40
- base_url: action.payload.base_url,
41
- looker_url: action.payload.looker_url
42
- };
61
+ verifyConfigAction(state) {
62
+ state.fetchedUrl = "".concat(state.apiServerUrl, "/versions");
63
+ },
64
+ verifyConfigActionSuccess(state, action) {
43
65
  state.messageBar = {
44
66
  intent: 'positive',
45
- text: "Saved ".concat(action.payload.looker_url, " as OAuth server")
67
+ text: "Configuration is valid"
46
68
  };
69
+ state.webUrl = action.payload;
47
70
  },
48
- setApiServerUrlAction(state, action) {
49
- state.apiServerUrl = action.payload;
50
- },
51
- setFetchedUrlAction(state, action) {
52
- state.fetchedUrl = action.payload;
71
+ verifyConfigActionFailure(state, action) {
72
+ state.messageBar = {
73
+ intent: 'critical',
74
+ text: action.payload
75
+ };
76
+ state.webUrl = '';
53
77
  },
54
- setWebUrlAction(state, action) {
55
- state.webUrl = action.payload;
78
+ saveConfigAction(_state, _action) {},
79
+ saveConfigActionSuccess(state, action) {
80
+ var {
81
+ base_url,
82
+ looker_url
83
+ } = action.payload;
84
+ state.savedConfig = {
85
+ base_url,
86
+ looker_url
87
+ };
88
+ state.messageBar = {
89
+ intent: 'positive',
90
+ text: "Saved ".concat(looker_url, " as OAuth server")
91
+ };
56
92
  },
57
- updateApiServerUrlAction(state, action) {
58
- state.apiServerUrl = action.payload.apiServerUrl;
59
- state.webUrl = action.payload.webUrl;
60
- state.validationMessages = action.payload.validationMessages;
93
+ clearMessageBarAction(state) {
94
+ state.messageBar.text = '';
61
95
  },
62
96
  updateMessageBarAction(state, action) {
63
97
  state.messageBar = action.payload;
64
98
  },
65
- verifyErrorAction(state, action) {
99
+ setFailureAction(state, action) {
66
100
  state.messageBar = {
67
101
  intent: 'critical',
68
102
  text: action.payload
69
103
  };
70
- state.webUrl = '';
71
104
  }
72
105
  }
73
106
  });
74
107
  exports.OAuthFormSlice = OAuthFormSlice;
75
- var oAuthFormActions = OAuthFormSlice.actions;
76
- exports.oAuthFormActions = oAuthFormActions;
108
+ var OAuthFormActions = OAuthFormSlice.actions;
109
+ exports.OAuthFormActions = OAuthFormActions;
77
110
  var {
78
111
  useActions: useOAuthFormActions,
79
112
  useStoreState: useOAuthFormState
80
- } = (0, _redux.createSliceHooks)(OAuthFormSlice);
113
+ } = (0, _redux.createSliceHooks)(OAuthFormSlice, _sagas.saga);
81
114
  exports.useOAuthFormState = useOAuthFormState;
82
115
  exports.useOAuthFormActions = useOAuthFormActions;
83
116
  //# sourceMappingURL=slice.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"slice.js","names":["_redux","require","_toolkit","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","SLICE_NAME","exports","defaultOAuthFormState","apiServerUrl","fetchedUrl","webUrl","messageBar","text","intent","validationMessages","savedConfig","base_url","looker_url","OAuthFormSlice","createSlice","name","initialState","reducers","clearFormAction","_state","saveNewConfigAction","state","action","payload","concat","setApiServerUrlAction","setFetchedUrlAction","setWebUrlAction","updateApiServerUrlAction","updateMessageBarAction","verifyErrorAction","oAuthFormActions","actions","useActions","useOAuthFormActions","useStoreState","useOAuthFormState","createSliceHooks"],"sources":["../../../../../src/OAuthForm/src/state/slice.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { createSliceHooks } from '@looker/redux'\nimport { createSlice } from '@reduxjs/toolkit'\nimport type { PayloadAction } from '@reduxjs/toolkit'\nimport type { MessageBarIntent, ValidationMessages } from '@looker/components'\nimport type { ConfigValues } from '../utils'\n\nexport const SLICE_NAME = 'OAuthForm'\nexport interface MessageBarData {\n intent: MessageBarIntent\n text: string\n}\n\nexport interface OAuthFormState {\n apiServerUrl: string\n fetchedUrl: string\n webUrl: string\n messageBar: MessageBarData\n validationMessages: ValidationMessages\n savedConfig: ConfigValues\n}\n\nexport const defaultOAuthFormState: OAuthFormState = {\n apiServerUrl: '',\n fetchedUrl: '',\n webUrl: '',\n messageBar: {\n text: '',\n intent: 'positive',\n } as MessageBarData,\n validationMessages: {} as ValidationMessages,\n savedConfig: { base_url: '', looker_url: '' },\n}\n\ninterface HandleUrlChangePayload {\n apiServerUrl: string\n webUrl: string\n validationMessages: ValidationMessages\n}\n\ninterface ConfigPayload {\n base_url: string\n looker_url: string\n client_id: string\n redirect_uri: string\n}\n\nexport const OAuthFormSlice = createSlice({\n name: SLICE_NAME,\n initialState: defaultOAuthFormState,\n reducers: {\n clearFormAction(_state) {\n return { ...defaultOAuthFormState }\n },\n saveNewConfigAction(state, action: PayloadAction<ConfigPayload>) {\n state.savedConfig = {\n base_url: action.payload.base_url,\n looker_url: action.payload.looker_url,\n }\n state.messageBar = {\n intent: 'positive',\n text: `Saved ${action.payload.looker_url} as OAuth server`,\n }\n },\n setApiServerUrlAction(state, action: PayloadAction<string>) {\n state.apiServerUrl = action.payload\n },\n setFetchedUrlAction(state, action: PayloadAction<string>) {\n state.fetchedUrl = action.payload\n },\n setWebUrlAction(state, action: PayloadAction<string>) {\n state.webUrl = action.payload\n },\n updateApiServerUrlAction(\n state,\n action: PayloadAction<HandleUrlChangePayload>\n ) {\n state.apiServerUrl = action.payload.apiServerUrl\n state.webUrl = action.payload.webUrl\n state.validationMessages = action.payload.validationMessages\n },\n updateMessageBarAction(state, action: PayloadAction<MessageBarData>) {\n state.messageBar = action.payload\n },\n verifyErrorAction(state, action: PayloadAction<string>) {\n state.messageBar = { intent: 'critical', text: action.payload }\n state.webUrl = ''\n },\n },\n})\n\nexport const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AAE,UAAU;QAAED,IAAI,EAAEe,MAAM,CAACC;MAAQ,CAAC;MAC/DF,KAAK,CAAChB,MAAM,GAAG,EAAE;IACnB;EACF;AACF,CAAC,CAAC;AAAAJ,OAAA,CAAAY,cAAA,GAAAA,cAAA;AAEK,IAAMkB,gBAAgB,GAAGlB,cAAc,CAACmB,OAAO;AAAA/B,OAAA,CAAA8B,gBAAA,GAAAA,gBAAA;AAC/C,IAAM;EACXE,UAAU,EAAEC,mBAAmB;EAC/BC,aAAa,EAAEC;AACjB,CAAC,GAAG,IAAAC,uBAAgB,EAACxB,cAAc,CAAC;AAAAZ,OAAA,CAAAmC,iBAAA,GAAAA,iBAAA;AAAAnC,OAAA,CAAAiC,mBAAA,GAAAA,mBAAA"}
1
+ {"version":3,"file":"slice.js","names":["_redux","require","_toolkit","_omit","_interopRequireDefault","_sagas","obj","__esModule","default","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","SLICE_NAME","exports","defaultOAuthFormState","apiServerUrl","fetchedUrl","webUrl","messageBar","text","intent","validationMessages","savedConfig","base_url","looker_url","OAuthFormSlice","createSlice","name","initialState","reducers","initAction","_state","_action","initSuccessAction","state","action","payload","setUrlAction","setUrlActionSuccess","updateValidationMessages","newValidationMessages","newMessage","elementName","omit","clearConfigAction","clearConfigActionSuccess","verifyConfigAction","concat","verifyConfigActionSuccess","verifyConfigActionFailure","saveConfigAction","saveConfigActionSuccess","clearMessageBarAction","updateMessageBarAction","setFailureAction","OAuthFormActions","actions","useActions","useOAuthFormActions","useStoreState","useOAuthFormState","createSliceHooks","saga"],"sources":["../../../../../src/OAuthForm/src/state/slice.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { Dispatch } from 'react'\nimport { createSliceHooks } from '@looker/redux'\nimport { createSlice } from '@reduxjs/toolkit'\nimport type { PayloadAction } from '@reduxjs/toolkit'\nimport type {\n MessageBarIntent,\n ValidationMessageProps,\n ValidationMessages,\n} from '@looker/components'\nimport omit from 'lodash/omit'\nimport type { ConfigValues } from '../utils'\nimport { saga } from './sagas'\n\nexport const SLICE_NAME = 'OAuthForm'\nexport interface MessageBarData {\n intent: MessageBarIntent\n text: string\n}\n\nexport interface OAuthFormState {\n apiServerUrl: string\n fetchedUrl: string\n webUrl: string\n messageBar: MessageBarData\n validationMessages: ValidationMessages\n savedConfig: ConfigValues\n}\n\nexport const defaultOAuthFormState: OAuthFormState = {\n apiServerUrl: '',\n fetchedUrl: '',\n webUrl: '',\n messageBar: {\n text: '',\n intent: 'positive',\n },\n validationMessages: {},\n savedConfig: { base_url: '', looker_url: '' },\n}\n\nexport interface ClearConfigActionPayload {\n configKey: string\n setHasConfig?: Dispatch<boolean>\n isAuthenticated: boolean\n}\n\nexport interface SetUrlActionPayload {\n name: string\n value: string\n}\n\ninterface UpdateValidationMessagesPayload {\n elementName: string\n newMessage: ValidationMessageProps | null\n}\n\nexport interface SaveConfigPayload {\n configKey: string\n setHasConfig?: Dispatch<boolean>\n client_id: string\n redirect_uri: string\n}\n\nexport interface SaveConfigSuccessPayload {\n base_url: string\n looker_url: string\n}\n\nexport const OAuthFormSlice = createSlice({\n name: SLICE_NAME,\n initialState: defaultOAuthFormState,\n reducers: {\n initAction(_state, _action: PayloadAction<string>) {\n // noop\n },\n initSuccessAction(state, action: PayloadAction<ConfigValues>) {\n state.apiServerUrl = action.payload.base_url\n state.webUrl = action.payload.looker_url\n },\n setUrlAction(_state, _action: PayloadAction<SetUrlActionPayload>) {\n // noop\n },\n setUrlActionSuccess(state, action: PayloadAction<string>) {\n state.apiServerUrl = action.payload\n state.webUrl = ''\n },\n updateValidationMessages(\n state,\n action: PayloadAction<UpdateValidationMessagesPayload>\n ) {\n let newValidationMessages = state.validationMessages\n\n if (action.payload.newMessage !== null) {\n newValidationMessages[action.payload.elementName] =\n action.payload.newMessage\n } else {\n newValidationMessages = omit(\n newValidationMessages,\n action.payload.elementName\n )\n }\n state.validationMessages = newValidationMessages\n },\n clearConfigAction(\n _state,\n _action: PayloadAction<ClearConfigActionPayload>\n ) {\n // noop\n },\n clearConfigActionSuccess() {\n return { ...defaultOAuthFormState }\n },\n verifyConfigAction(state) {\n state.fetchedUrl = `${state.apiServerUrl}/versions`\n },\n verifyConfigActionSuccess(state, action: PayloadAction<string>) {\n state.messageBar = {\n intent: 'positive',\n text: `Configuration is valid`,\n }\n state.webUrl = action.payload\n },\n verifyConfigActionFailure(state, action: PayloadAction<string>) {\n state.messageBar = { intent: 'critical', text: action.payload }\n state.webUrl = ''\n },\n saveConfigAction(_state, _action: PayloadAction<SaveConfigPayload>) {\n // noop\n },\n saveConfigActionSuccess(\n state,\n action: PayloadAction<SaveConfigSuccessPayload>\n ) {\n const { base_url, looker_url } = action.payload\n state.savedConfig = {\n base_url,\n looker_url,\n }\n state.messageBar = {\n intent: 'positive',\n text: `Saved ${looker_url} as OAuth server`,\n }\n },\n clearMessageBarAction(state) {\n state.messageBar.text = ''\n },\n updateMessageBarAction(state, action: PayloadAction<MessageBarData>) {\n state.messageBar = action.payload\n },\n setFailureAction(state, action: PayloadAction<string>) {\n state.messageBar = { intent: 'critical', text: action.payload }\n },\n },\n})\n\nexport const OAuthFormActions = OAuthFormSlice.actions\nexport const {\n useActions: useOAuthFormActions,\n useStoreState: useOAuthFormState,\n} = createSliceHooks(OAuthFormSlice, saga)\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAOA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,MAAA,GAAAJ,OAAA;AAA8B,SAAAG,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAJ,MAAA,GAAAC,cAAA,KAAAI,OAAA,GAAAA,OAAA,CAAAC,MAAA,WAAAC,GAAA,WAAAJ,MAAA,CAAAK,wBAAA,CAAAR,MAAA,EAAAO,GAAA,EAAAE,UAAA,OAAAP,IAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,IAAA,EAAAG,OAAA,YAAAH,IAAA;AAAA,SAAAU,cAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,WAAAF,SAAA,CAAAD,CAAA,IAAAC,SAAA,CAAAD,CAAA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K,EAAE;MAC3BA,KAAK,CAAChB,UAAU,CAACC,IAAI,GAAG,EAAE;IAC5B,CAAC;IACDkC,sBAAsBA,CAACnB,KAAK,EAAEC,MAAqC,EAAE;MACnED,KAAK,CAAChB,UAAU,GAAGiB,MAAM,CAACC,OAAO;IACnC,CAAC;IACDkB,gBAAgBA,CAACpB,KAAK,EAAEC,MAA6B,EAAE;MACrDD,KAAK,CAAChB,UAAU,GAAG;QAAEE,MAAM,EAAE,UAAU;QAAED,IAAI,EAAEgB,MAAM,CAACC;MAAQ,CAAC;IACjE;EACF;AACF,CAAC,CAAC;AAAAvB,OAAA,CAAAY,cAAA,GAAAA,cAAA;AAEK,IAAM8B,gBAAgB,GAAG9B,cAAc,CAAC+B,OAAO;AAAA3C,OAAA,CAAA0C,gBAAA,GAAAA,gBAAA;AAC/C,IAAM;EACXE,UAAU,EAAEC,mBAAmB;EAC/BC,aAAa,EAAEC;AACjB,CAAC,GAAG,IAAAC,uBAAgB,EAACpC,cAAc,EAAEqC,WAAI,CAAC;AAAAjD,OAAA,CAAA+C,iBAAA,GAAAA,iBAAA;AAAA/C,OAAA,CAAA6C,mBAAA,GAAAA,mBAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@looker/extension-utils",
3
- "version": "0.1.26",
3
+ "version": "0.1.27-alpha.1725+86cd168a",
4
4
  "description": "Looker Extension Utilities",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/esm/index.js",
@@ -27,8 +27,8 @@
27
27
  "dependencies": {
28
28
  "@looker/code-editor": "^0.1.29",
29
29
  "@looker/components": "^4.1.1",
30
- "@looker/extension-sdk": "^23.10.0",
31
- "@looker/extension-sdk-react": "^23.10.0",
30
+ "@looker/extension-sdk": "^23.10.1-alpha.1725+86cd168a",
31
+ "@looker/extension-sdk-react": "^23.10.1-alpha.1725+86cd168a",
32
32
  "@looker/redux": "^0.0.1",
33
33
  "@looker/sdk": "^23.10.0",
34
34
  "@looker/sdk-rtl": "^21.6.1",
@@ -36,19 +36,22 @@
36
36
  "@styled-icons/material": "^10.47.0",
37
37
  "react": "^16.14.0",
38
38
  "react-redux": "^7.2.3",
39
- "react-router-dom": "^5.3.4"
39
+ "react-router-dom": "^5.3.4",
40
+ "typed-redux-saga": "^1.5.0"
40
41
  },
41
42
  "devDependencies": {
42
43
  "@looker/components-test-utils": "^1.5.26",
43
44
  "@testing-library/react": "^12.1.5",
44
45
  "@testing-library/user-event": "^14.4.3",
46
+ "@types/lodash": "^4.14.195",
45
47
  "@types/react-router": "^5.1.20",
46
48
  "@types/react-router-dom": "^5.3.3",
47
49
  "@types/redux": "^3.6.0",
50
+ "@types/redux-saga-tester": "^1.0.4",
48
51
  "@types/styled-components": "^5.1.26",
49
52
  "webpack-bundle-analyzer": "^4.2.0",
50
53
  "webpack-cli": "^4.6.0",
51
54
  "webpack-merge": "^5.7.3"
52
55
  },
53
- "gitHead": "03f443d0eedb8cd7b06f6e501bd4f28a37db5069"
56
+ "gitHead": "86cd168a8f14d00d1699c85416a4e3639635e0cc"
54
57
  }