UNPKG

passbolt-styleguide

Version:

Passbolt styleguide contains common styling assets used by the different sites, plugin, etc.

121 lines (117 loc) โ€ข 4.28 kB
import MockPort from "../../../test/mock/MockPort"; import UserSettings from "../../../../shared/lib/Settings/UserSettings"; import userSettingsFixture from "../../../test/fixture/Settings/userSettings"; import SiteSettings from "../../../../shared/lib/Settings/SiteSettings"; import siteSettingsFixture from "../../../test/fixture/Settings/siteSettings"; import ResourceTypesSettings from "../../../../shared/lib/Settings/ResourceTypesSettings"; import resourceTypesFixture from "../../../test/fixture/ResourceTypes/resourceTypes"; /** * Returns the default app context for the unit test * @param appContext An existing app context * @returns {any} */ export function defaultAppContext(appContext) { const port = new MockPort(); const userSettings = new UserSettings(userSettingsFixture); const siteSettings = new SiteSettings(siteSettingsFixture); const resourceTypesSettings = new ResourceTypesSettings(siteSettings, resourceTypesFixture); const defaultAppContext = { userSettings, siteSettings, resourceTypesSettings, port, setContext: function(newContext) { // In this scope this reference the object context. Object.assign(this, newContext); }, }; return Object.assign(defaultAppContext, appContext || {}); } /** * Default props * @returns {{resource: {id: string, name: string}}} */ export function defaultProps() { return { resourcePasswordGeneratorContext: { settings: { "default_generator": "passphrase", "generators": [ { "name": "Password", "type": "password", "default_options": { "length": 18, "look_alike": true, "min_length": 8, "max_length": 128, }, "masks": [ { "name": "upper", "label": "A-Z", "characters": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", }, { "name": "lower", "label": "a-z", "characters": "abcdefghijklmnopqrstuvwxyz", }, { "name": "digit", "label": "0-9", "characters": "0123456789", "required": true, }, { "name": "parenthesis", "label": "{ [ ( | ) ] ] }", "characters": "([|])", }, { "name": "special_char1", "label": "# $ % & @ ^ ~", "characters": "#$%&@^~" }, { "name": "special_char2", "label": ". , : ;", "characters": ".,:;" }, { "name": "special_char5", "label": "< * + ! ? =", "characters": "<*+!?=" }, { "name": "emoji", "label": "๐Ÿ˜˜", "characters": "๐Ÿ˜€๐Ÿ˜ƒ๐Ÿ˜„๐Ÿ˜๐Ÿ˜†๐Ÿ˜…๐Ÿ˜‚๐Ÿคฃ๐Ÿฅฒโ˜บ๏ธ๐Ÿ˜Š๐Ÿ˜‡๐Ÿ™‚๐Ÿ™ƒ๐Ÿ˜‰๐Ÿ˜Œ๐Ÿ˜๐Ÿฅฐ๐Ÿ˜˜๐Ÿ˜—๐Ÿ˜™๐Ÿ˜š๐Ÿ˜‹๐Ÿ˜›๐Ÿ˜๐Ÿ˜œ๐Ÿคช๐Ÿคจ๐Ÿง๐Ÿค“๐Ÿ˜Ž๐Ÿฅธ๐Ÿคฉ๐Ÿฅณ๐Ÿ˜๐Ÿ˜’๐Ÿ˜ž๐Ÿ˜”๐Ÿ˜Ÿ๐Ÿ˜•๐Ÿ™โ˜น๏ธ๐Ÿ˜ฃ๐Ÿ˜–๐Ÿ˜ซ๐Ÿ˜ฉ๐Ÿฅบ๐Ÿ˜ข๐Ÿ˜ญ๐Ÿ˜ค๐Ÿ˜ ๐Ÿ˜ก๐Ÿคฌ๐Ÿคฏ๐Ÿ˜ณ๐Ÿฅต๐Ÿฅถ๐Ÿ˜ฑ๐Ÿ˜จ๐Ÿ˜ฐ๐Ÿ˜ฅ๐Ÿ˜“๐Ÿค—๐Ÿค”๐Ÿคญ๐Ÿคซ๐Ÿคฅ๐Ÿ˜ถ๐Ÿ˜๐Ÿ˜‘๐Ÿ˜ฌ๐Ÿ™„๐Ÿ˜ฏ๐Ÿ˜ฆ๐Ÿ˜ง๐Ÿ˜ฎ๐Ÿ˜ฒ๐Ÿฅฑ๐Ÿ˜ด๐Ÿคค๐Ÿ˜ช๐Ÿ˜ต๐Ÿค๐Ÿฅด๐Ÿคข๐Ÿคฎ๐Ÿคง๐Ÿ˜ท๐Ÿค’๐Ÿค•๐Ÿค‘๐Ÿค ๐Ÿ˜ˆ๐Ÿ‘ฟ๐Ÿ‘น๐Ÿ‘บ๐Ÿคก๐Ÿ’ฉ๐Ÿ‘ป๐Ÿ’€โ˜ ๏ธ๐Ÿ‘ฝ๐Ÿ‘พ๐Ÿค–๐ŸŽƒ๐Ÿ˜บ๐Ÿ˜ธ๐Ÿ˜น๐Ÿ˜ป๐Ÿ˜ผ๐Ÿ˜ฝ๐Ÿ™€๐Ÿ˜ฟ๐Ÿ˜พ" }, { "name": "ascii", "label": "ascii", "characters": "%&ยกยขยฃยคยฅยฆยงยจยฉยชยซยฌยฎยฏยฐยฑยฒยณยตยถยทยธยนยบยปยผยฝยพยฟร€ร รƒร„ร…ร†ร‡รˆร‰รŠร‹รŒรรŽรรร‘ร’ร“ร”ร•ร–ร—ร˜ร™รšร›รœรรžรŸร รกรขรฃรครฅรฆรงรจรฉรชรซรฌรญรฎรฏรฐรฑรฒรณรดรตรถรทรธรนรบรปรผรฝรพรฟล’ล“ล ลกลธฦ’โ€”โ€žโ€ โ€กโ€ขโ€ฆโ€ฐโ‚ฌโ„ข" } ], }, { "name": "Passphrase", "type": "passphrase", "default_options": { "word_count": 8, "word_case": "lowercase", "min_word": 4, "max_word": 40, "separator": " " }, } ] } }, onClose: () => {}, dialogContext: { open: () => {}, } }; }