@sparted/shared-library 1.2.0 → 1.2.2
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/business/picture-spot/index.d.ts +37 -0
- package/business/types/campaign.d.ts +12 -0
- package/{dist/business → business}/types/content.d.ts +7 -8
- package/business/types/content.js.map +1 -0
- package/{src/business/types/index.ts → business/types/index.d.ts} +5 -5
- package/package.json +1 -1
- package/.circleci/config.yml +0 -40
- package/.eslintignore +0 -1
- package/.eslintrc.json +0 -25
- package/.gitignore +0 -37
- package/.idea/.gitignore +0 -8
- package/.idea/codeStyles/Project.xml +0 -35
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/jsLinters/eslint.xml +0 -6
- package/.idea/misc.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/shared-library.iml +0 -11
- package/.idea/vcs.xml +0 -6
- package/.idea/workspace.xml +0 -108
- package/.prettierrc.json +0 -6
- package/CHANGELOG.md +0 -130
- package/README.md +0 -26
- package/dist/business/picture-spot/index.d.ts +0 -2
- package/dist/business/types/content.js.map +0 -1
- package/dist/business/types/index.d.ts +0 -4
- package/dist/package.json +0 -66
- package/global.d.ts +0 -2
- package/rollup.config.ts +0 -19
- package/src/array/__tests__/array-to-map.test.ts +0 -50
- package/src/array/__tests__/get-values-from-keys.test.ts +0 -14
- package/src/array/__tests__/inner-join.test.ts +0 -55
- package/src/array/__tests__/left-outter-join.test.ts +0 -55
- package/src/array/array-to-map.ts +0 -32
- package/src/array/get-values-from-keys.ts +0 -3
- package/src/array/index.ts +0 -4
- package/src/array/inner-join.ts +0 -10
- package/src/array/left-outter-join.ts +0 -10
- package/src/business/picture-spot/index.ts +0 -3
- package/src/business/types/campaign.ts +0 -14
- package/src/business/types/content.ts +0 -155
- package/src/business/types/media.ts +0 -18
- package/src/business/types/multilingual.ts +0 -46
- package/src/business/types/thematic.ts +0 -10
- package/src/cdn/__tests__/cdn.factory.test.ts +0 -150
- package/src/cdn/__tests__/utils.test.ts +0 -528
- package/src/cdn/cdn.factory.ts +0 -70
- package/src/cdn/index.ts +0 -2
- package/src/cdn/types/cdn-factory.type.ts +0 -49
- package/src/cdn/types/index.ts +0 -1
- package/src/cdn/utils/extract-info-from-url.util.ts +0 -25
- package/src/cdn/utils/get-cdn-from-s3-url.util.ts +0 -20
- package/src/cdn/utils/get-cdn-url.util.ts +0 -31
- package/src/cdn/utils/twicpics-transformations.util.ts +0 -9
- package/src/color/__tests__/get-contrast-color.test.ts +0 -22
- package/src/color/get-contrast-color.ts +0 -18
- package/src/color/index.ts +0 -1
- package/src/formatting/__tests__/format-number.test.ts +0 -11
- package/src/formatting/format-number.ts +0 -14
- package/src/formatting/index.ts +0 -1
- package/src/fp/__tests__/run-while.test.ts +0 -29
- package/src/fp/index.ts +0 -1
- package/src/fp/run-while.ts +0 -54
- package/src/http/__tests__/build-search-params.test.ts +0 -17
- package/src/http/__tests__/encode-search-object.test.ts +0 -34
- package/src/http/__tests__/fetch-with-timeout.test.ts +0 -50
- package/src/http/build-search-params.ts +0 -18
- package/src/http/encode-search-object.ts +0 -39
- package/src/http/fetch-with-timeout.ts +0 -24
- package/src/http/index.ts +0 -3
- package/src/index.ts +0 -15
- package/src/linked-list/__tests__/apply-diff-linked-list.test.ts +0 -103
- package/src/linked-list/__tests__/create-linked-list.test.ts +0 -204
- package/src/linked-list/__tests__/find-linked-list.test.ts +0 -40
- package/src/linked-list/__tests__/get-linked-list.test.ts +0 -28
- package/src/linked-list/__tests__/insert-linked-list.test.ts +0 -186
- package/src/linked-list/__tests__/linked-list-utils.test.ts +0 -252
- package/src/linked-list/__tests__/reduce-linked-list.test.ts +0 -31
- package/src/linked-list/__tests__/remove-linked-list.test.ts +0 -129
- package/src/linked-list/__tests__/update-linked-list.test.ts +0 -53
- package/src/linked-list/__tests__/while-linked-list.test.ts +0 -58
- package/src/linked-list/apply-diff-linked-list.ts +0 -35
- package/src/linked-list/create-linked-list.ts +0 -79
- package/src/linked-list/find-linked-list.ts +0 -26
- package/src/linked-list/get-linked-list.ts +0 -9
- package/src/linked-list/index.ts +0 -2
- package/src/linked-list/insert-linked-list.ts +0 -50
- package/src/linked-list/linked-list-utils.ts +0 -143
- package/src/linked-list/reduce-linked-list.ts +0 -18
- package/src/linked-list/remove-linked-list.ts +0 -36
- package/src/linked-list/type.ts +0 -38
- package/src/linked-list/update-linked-list.ts +0 -30
- package/src/linked-list/while-linked-list.ts +0 -33
- package/src/math/__tests__/clamp-number.test.ts +0 -30
- package/src/math/__tests__/interpolate.test.ts +0 -28
- package/src/math/__tests__/median.test.ts +0 -27
- package/src/math/__tests__/number-range.test.ts +0 -59
- package/src/math/__tests__/random-number.test.ts +0 -11
- package/src/math/clamp-number.ts +0 -8
- package/src/math/index.ts +0 -5
- package/src/math/interpolate.ts +0 -18
- package/src/math/median.ts +0 -21
- package/src/math/number-range.ts +0 -16
- package/src/math/random-number.ts +0 -10
- package/src/object/__tests__/merge-deep.test.ts +0 -56
- package/src/object/__tests__/strip-properties-from-object.test.ts +0 -65
- package/src/object/index.ts +0 -2
- package/src/object/merge-deep.ts +0 -26
- package/src/object/strip-properties-from-object.ts +0 -26
- package/src/parsing/__tests__/parse-boolean.test.ts +0 -15
- package/src/parsing/__tests__/parse-enum.test.ts +0 -19
- package/src/parsing/__tests__/parse-number.test.ts +0 -20
- package/src/parsing/index.ts +0 -3
- package/src/parsing/parse-boolean.ts +0 -10
- package/src/parsing/parse-enum.ts +0 -16
- package/src/parsing/parse-number.ts +0 -12
- package/src/predicates/__tests__/is-function.test.ts +0 -11
- package/src/predicates/__tests__/is-null.test.ts +0 -11
- package/src/predicates/__tests__/is-object.test.ts +0 -11
- package/src/predicates/__tests__/is-primitive.test.ts +0 -42
- package/src/predicates/__tests__/is-undefined.test.ts +0 -11
- package/src/predicates/__tests__/is-uuid.test.ts +0 -13
- package/src/predicates/index.ts +0 -5
- package/src/predicates/is-function.ts +0 -3
- package/src/predicates/is-null.ts +0 -1
- package/src/predicates/is-object.ts +0 -3
- package/src/predicates/is-primitive.ts +0 -19
- package/src/predicates/is-undefined.ts +0 -3
- package/src/predicates/is-uuid.ts +0 -3
- package/src/promise/__tests__/delay.test.ts +0 -13
- package/src/promise/__tests__/execute-or-resolve-default.test.ts +0 -25
- package/src/promise/__tests__/execute-with-delay.test.ts +0 -24
- package/src/promise/delay.ts +0 -3
- package/src/promise/execute-or-resolve-default.ts +0 -14
- package/src/promise/execute-with-delay.ts +0 -6
- package/src/promise/index.ts +0 -3
- package/src/string/__tests__/is-string-length-within-range.test.ts +0 -23
- package/src/string/__tests__/replace-in-template.test.ts +0 -52
- package/src/string/index.ts +0 -2
- package/src/string/is-string-length-within-range.ts +0 -10
- package/src/string/replace-in-template.ts +0 -45
- package/src/time/__tests__/convert.test.ts +0 -14
- package/src/time/__tests__/format-minutes.test.ts +0 -10
- package/src/time/__tests__/get-time-diff-as-string.test.ts +0 -128
- package/src/time/constants.ts +0 -4
- package/src/time/convert.ts +0 -5
- package/src/time/format-minutes.ts +0 -9
- package/src/time/get-time-diff-as-string.ts +0 -196
- package/src/time/index.ts +0 -4
- package/src/types/function.ts +0 -1
- package/src/types/general.ts +0 -15
- package/src/types/index.ts +0 -4
- package/src/types/object.ts +0 -33
- package/src/types/search.ts +0 -29
- package/tsconfig.json +0 -25
- package/yarn-error.log +0 -4133
- package/yarn.lock +0 -4045
- /package/{dist/_virtual → _virtual}/_tslib.js +0 -0
- /package/{dist/_virtual → _virtual}/_tslib.js.map +0 -0
- /package/{dist/array → array}/array-to-map.d.ts +0 -0
- /package/{dist/array → array}/array-to-map.js +0 -0
- /package/{dist/array → array}/array-to-map.js.map +0 -0
- /package/{dist/array → array}/get-values-from-keys.d.ts +0 -0
- /package/{dist/array → array}/get-values-from-keys.js +0 -0
- /package/{dist/array → array}/get-values-from-keys.js.map +0 -0
- /package/{dist/array → array}/index.d.ts +0 -0
- /package/{dist/array → array}/index.js +0 -0
- /package/{dist/array → array}/index.js.map +0 -0
- /package/{dist/array → array}/inner-join.d.ts +0 -0
- /package/{dist/array → array}/inner-join.js +0 -0
- /package/{dist/array → array}/inner-join.js.map +0 -0
- /package/{dist/array → array}/left-outter-join.d.ts +0 -0
- /package/{dist/array → array}/left-outter-join.js +0 -0
- /package/{dist/array → array}/left-outter-join.js.map +0 -0
- /package/{dist/business → business}/picture-spot/index.js +0 -0
- /package/{dist/business → business}/picture-spot/index.js.map +0 -0
- /package/{dist/business → business}/types/content.js +0 -0
- /package/{dist/business → business}/types/index.js +0 -0
- /package/{dist/business → business}/types/index.js.map +0 -0
- /package/{dist/business → business}/types/media.d.ts +0 -0
- /package/{dist/business → business}/types/multilingual.d.ts +0 -0
- /package/{dist/business → business}/types/multilingual.js +0 -0
- /package/{dist/business → business}/types/multilingual.js.map +0 -0
- /package/{dist/business → business}/types/thematic.d.ts +0 -0
- /package/{dist/cdn → cdn}/cdn.factory.d.ts +0 -0
- /package/{dist/cdn → cdn}/cdn.factory.js +0 -0
- /package/{dist/cdn → cdn}/cdn.factory.js.map +0 -0
- /package/{dist/cdn → cdn}/index.d.ts +0 -0
- /package/{dist/cdn → cdn}/index.js +0 -0
- /package/{dist/cdn → cdn}/index.js.map +0 -0
- /package/{dist/cdn → cdn}/types/cdn-factory.type.d.ts +0 -0
- /package/{dist/cdn → cdn}/types/index.d.ts +0 -0
- /package/{dist/cdn → cdn}/types/index.js +0 -0
- /package/{dist/cdn → cdn}/types/index.js.map +0 -0
- /package/{dist/cdn → cdn}/utils/extract-info-from-url.util.d.ts +0 -0
- /package/{dist/cdn → cdn}/utils/extract-info-from-url.util.js +0 -0
- /package/{dist/cdn → cdn}/utils/extract-info-from-url.util.js.map +0 -0
- /package/{dist/cdn → cdn}/utils/get-cdn-from-s3-url.util.d.ts +0 -0
- /package/{dist/cdn → cdn}/utils/get-cdn-from-s3-url.util.js +0 -0
- /package/{dist/cdn → cdn}/utils/get-cdn-from-s3-url.util.js.map +0 -0
- /package/{dist/cdn → cdn}/utils/get-cdn-url.util.d.ts +0 -0
- /package/{dist/cdn → cdn}/utils/get-cdn-url.util.js +0 -0
- /package/{dist/cdn → cdn}/utils/get-cdn-url.util.js.map +0 -0
- /package/{dist/cdn → cdn}/utils/twicpics-transformations.util.d.ts +0 -0
- /package/{dist/cdn → cdn}/utils/twicpics-transformations.util.js +0 -0
- /package/{dist/cdn → cdn}/utils/twicpics-transformations.util.js.map +0 -0
- /package/{dist/color → color}/get-contrast-color.d.ts +0 -0
- /package/{dist/color → color}/get-contrast-color.js +0 -0
- /package/{dist/color → color}/get-contrast-color.js.map +0 -0
- /package/{dist/color → color}/index.d.ts +0 -0
- /package/{dist/color → color}/index.js +0 -0
- /package/{dist/color → color}/index.js.map +0 -0
- /package/{dist/formatting → formatting}/format-number.d.ts +0 -0
- /package/{dist/formatting → formatting}/format-number.js +0 -0
- /package/{dist/formatting → formatting}/format-number.js.map +0 -0
- /package/{dist/formatting → formatting}/index.d.ts +0 -0
- /package/{dist/formatting → formatting}/index.js +0 -0
- /package/{dist/formatting → formatting}/index.js.map +0 -0
- /package/{dist/fp → fp}/index.d.ts +0 -0
- /package/{dist/fp → fp}/index.js +0 -0
- /package/{dist/fp → fp}/index.js.map +0 -0
- /package/{dist/fp → fp}/run-while.d.ts +0 -0
- /package/{dist/fp → fp}/run-while.js +0 -0
- /package/{dist/fp → fp}/run-while.js.map +0 -0
- /package/{dist/http → http}/build-search-params.d.ts +0 -0
- /package/{dist/http → http}/build-search-params.js +0 -0
- /package/{dist/http → http}/build-search-params.js.map +0 -0
- /package/{dist/http → http}/encode-search-object.d.ts +0 -0
- /package/{dist/http → http}/encode-search-object.js +0 -0
- /package/{dist/http → http}/encode-search-object.js.map +0 -0
- /package/{dist/http → http}/fetch-with-timeout.d.ts +0 -0
- /package/{dist/http → http}/fetch-with-timeout.js +0 -0
- /package/{dist/http → http}/fetch-with-timeout.js.map +0 -0
- /package/{dist/http → http}/index.d.ts +0 -0
- /package/{dist/http → http}/index.js +0 -0
- /package/{dist/http → http}/index.js.map +0 -0
- /package/{dist/index.d.ts → index.d.ts} +0 -0
- /package/{dist/index.js → index.js} +0 -0
- /package/{dist/index.js.map → index.js.map} +0 -0
- /package/{dist/linked-list → linked-list}/apply-diff-linked-list.d.ts +0 -0
- /package/{dist/linked-list → linked-list}/apply-diff-linked-list.js +0 -0
- /package/{dist/linked-list → linked-list}/apply-diff-linked-list.js.map +0 -0
- /package/{dist/linked-list → linked-list}/create-linked-list.d.ts +0 -0
- /package/{dist/linked-list → linked-list}/create-linked-list.js +0 -0
- /package/{dist/linked-list → linked-list}/create-linked-list.js.map +0 -0
- /package/{dist/linked-list → linked-list}/find-linked-list.d.ts +0 -0
- /package/{dist/linked-list → linked-list}/find-linked-list.js +0 -0
- /package/{dist/linked-list → linked-list}/find-linked-list.js.map +0 -0
- /package/{dist/linked-list → linked-list}/get-linked-list.d.ts +0 -0
- /package/{dist/linked-list → linked-list}/get-linked-list.js +0 -0
- /package/{dist/linked-list → linked-list}/get-linked-list.js.map +0 -0
- /package/{dist/linked-list → linked-list}/index.d.ts +0 -0
- /package/{dist/linked-list → linked-list}/index.js +0 -0
- /package/{dist/linked-list → linked-list}/index.js.map +0 -0
- /package/{dist/linked-list → linked-list}/insert-linked-list.d.ts +0 -0
- /package/{dist/linked-list → linked-list}/insert-linked-list.js +0 -0
- /package/{dist/linked-list → linked-list}/insert-linked-list.js.map +0 -0
- /package/{dist/linked-list → linked-list}/linked-list-utils.d.ts +0 -0
- /package/{dist/linked-list → linked-list}/linked-list-utils.js +0 -0
- /package/{dist/linked-list → linked-list}/linked-list-utils.js.map +0 -0
- /package/{dist/linked-list → linked-list}/reduce-linked-list.d.ts +0 -0
- /package/{dist/linked-list → linked-list}/reduce-linked-list.js +0 -0
- /package/{dist/linked-list → linked-list}/reduce-linked-list.js.map +0 -0
- /package/{dist/linked-list → linked-list}/remove-linked-list.d.ts +0 -0
- /package/{dist/linked-list → linked-list}/remove-linked-list.js +0 -0
- /package/{dist/linked-list → linked-list}/remove-linked-list.js.map +0 -0
- /package/{dist/linked-list → linked-list}/type.d.ts +0 -0
- /package/{dist/linked-list → linked-list}/update-linked-list.d.ts +0 -0
- /package/{dist/linked-list → linked-list}/update-linked-list.js +0 -0
- /package/{dist/linked-list → linked-list}/update-linked-list.js.map +0 -0
- /package/{dist/linked-list → linked-list}/while-linked-list.d.ts +0 -0
- /package/{dist/linked-list → linked-list}/while-linked-list.js +0 -0
- /package/{dist/linked-list → linked-list}/while-linked-list.js.map +0 -0
- /package/{dist/math → math}/clamp-number.d.ts +0 -0
- /package/{dist/math → math}/clamp-number.js +0 -0
- /package/{dist/math → math}/clamp-number.js.map +0 -0
- /package/{dist/math → math}/index.d.ts +0 -0
- /package/{dist/math → math}/index.js +0 -0
- /package/{dist/math → math}/index.js.map +0 -0
- /package/{dist/math → math}/interpolate.d.ts +0 -0
- /package/{dist/math → math}/interpolate.js +0 -0
- /package/{dist/math → math}/interpolate.js.map +0 -0
- /package/{dist/math → math}/median.d.ts +0 -0
- /package/{dist/math → math}/median.js +0 -0
- /package/{dist/math → math}/median.js.map +0 -0
- /package/{dist/math → math}/number-range.d.ts +0 -0
- /package/{dist/math → math}/number-range.js +0 -0
- /package/{dist/math → math}/number-range.js.map +0 -0
- /package/{dist/math → math}/random-number.d.ts +0 -0
- /package/{dist/math → math}/random-number.js +0 -0
- /package/{dist/math → math}/random-number.js.map +0 -0
- /package/{dist/object → object}/index.d.ts +0 -0
- /package/{dist/object → object}/index.js +0 -0
- /package/{dist/object → object}/index.js.map +0 -0
- /package/{dist/object → object}/merge-deep.d.ts +0 -0
- /package/{dist/object → object}/merge-deep.js +0 -0
- /package/{dist/object → object}/merge-deep.js.map +0 -0
- /package/{dist/object → object}/strip-properties-from-object.d.ts +0 -0
- /package/{dist/object → object}/strip-properties-from-object.js +0 -0
- /package/{dist/object → object}/strip-properties-from-object.js.map +0 -0
- /package/{dist/parsing → parsing}/index.d.ts +0 -0
- /package/{dist/parsing → parsing}/index.js +0 -0
- /package/{dist/parsing → parsing}/index.js.map +0 -0
- /package/{dist/parsing → parsing}/parse-boolean.d.ts +0 -0
- /package/{dist/parsing → parsing}/parse-boolean.js +0 -0
- /package/{dist/parsing → parsing}/parse-boolean.js.map +0 -0
- /package/{dist/parsing → parsing}/parse-enum.d.ts +0 -0
- /package/{dist/parsing → parsing}/parse-enum.js +0 -0
- /package/{dist/parsing → parsing}/parse-enum.js.map +0 -0
- /package/{dist/parsing → parsing}/parse-number.d.ts +0 -0
- /package/{dist/parsing → parsing}/parse-number.js +0 -0
- /package/{dist/parsing → parsing}/parse-number.js.map +0 -0
- /package/{dist/predicates → predicates}/index.d.ts +0 -0
- /package/{dist/predicates → predicates}/index.js +0 -0
- /package/{dist/predicates → predicates}/index.js.map +0 -0
- /package/{dist/predicates → predicates}/is-function.d.ts +0 -0
- /package/{dist/predicates → predicates}/is-function.js +0 -0
- /package/{dist/predicates → predicates}/is-function.js.map +0 -0
- /package/{dist/predicates → predicates}/is-null.d.ts +0 -0
- /package/{dist/predicates → predicates}/is-null.js +0 -0
- /package/{dist/predicates → predicates}/is-null.js.map +0 -0
- /package/{dist/predicates → predicates}/is-object.d.ts +0 -0
- /package/{dist/predicates → predicates}/is-object.js +0 -0
- /package/{dist/predicates → predicates}/is-object.js.map +0 -0
- /package/{dist/predicates → predicates}/is-primitive.d.ts +0 -0
- /package/{dist/predicates → predicates}/is-primitive.js +0 -0
- /package/{dist/predicates → predicates}/is-primitive.js.map +0 -0
- /package/{dist/predicates → predicates}/is-undefined.d.ts +0 -0
- /package/{dist/predicates → predicates}/is-undefined.js +0 -0
- /package/{dist/predicates → predicates}/is-undefined.js.map +0 -0
- /package/{dist/predicates → predicates}/is-uuid.d.ts +0 -0
- /package/{dist/promise → promise}/delay.d.ts +0 -0
- /package/{dist/promise → promise}/delay.js +0 -0
- /package/{dist/promise → promise}/delay.js.map +0 -0
- /package/{dist/promise → promise}/execute-or-resolve-default.d.ts +0 -0
- /package/{dist/promise → promise}/execute-or-resolve-default.js +0 -0
- /package/{dist/promise → promise}/execute-or-resolve-default.js.map +0 -0
- /package/{dist/promise → promise}/execute-with-delay.d.ts +0 -0
- /package/{dist/promise → promise}/execute-with-delay.js +0 -0
- /package/{dist/promise → promise}/execute-with-delay.js.map +0 -0
- /package/{dist/promise → promise}/index.d.ts +0 -0
- /package/{dist/promise → promise}/index.js +0 -0
- /package/{dist/promise → promise}/index.js.map +0 -0
- /package/{dist/string → string}/index.d.ts +0 -0
- /package/{dist/string → string}/index.js +0 -0
- /package/{dist/string → string}/index.js.map +0 -0
- /package/{dist/string → string}/is-string-length-within-range.d.ts +0 -0
- /package/{dist/string → string}/is-string-length-within-range.js +0 -0
- /package/{dist/string → string}/is-string-length-within-range.js.map +0 -0
- /package/{dist/string → string}/replace-in-template.d.ts +0 -0
- /package/{dist/string → string}/replace-in-template.js +0 -0
- /package/{dist/string → string}/replace-in-template.js.map +0 -0
- /package/{dist/time → time}/constants.d.ts +0 -0
- /package/{dist/time → time}/constants.js +0 -0
- /package/{dist/time → time}/constants.js.map +0 -0
- /package/{dist/time → time}/convert.d.ts +0 -0
- /package/{dist/time → time}/convert.js +0 -0
- /package/{dist/time → time}/convert.js.map +0 -0
- /package/{dist/time → time}/format-minutes.d.ts +0 -0
- /package/{dist/time → time}/format-minutes.js +0 -0
- /package/{dist/time → time}/format-minutes.js.map +0 -0
- /package/{dist/time → time}/get-time-diff-as-string.d.ts +0 -0
- /package/{dist/time → time}/get-time-diff-as-string.js +0 -0
- /package/{dist/time → time}/get-time-diff-as-string.js.map +0 -0
- /package/{dist/time → time}/index.d.ts +0 -0
- /package/{dist/time → time}/index.js +0 -0
- /package/{dist/time → time}/index.js.map +0 -0
- /package/{dist/types → types}/function.d.ts +0 -0
- /package/{dist/types → types}/general.d.ts +0 -0
- /package/{dist/types → types}/index.d.ts +0 -0
- /package/{dist/types → types}/index.js +0 -0
- /package/{dist/types → types}/index.js.map +0 -0
- /package/{dist/types → types}/object.d.ts +0 -0
- /package/{dist/types → types}/search.d.ts +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { PictureSpot } from '../types';
|
|
2
|
+
export declare const getQuestions: (content: PictureSpot) => Partial<{
|
|
3
|
+
sk: string;
|
|
4
|
+
sl: string;
|
|
5
|
+
ar: string;
|
|
6
|
+
lt: string;
|
|
7
|
+
"en-US": string;
|
|
8
|
+
"fr-FR": string;
|
|
9
|
+
"es-ES": string;
|
|
10
|
+
"it-IT": string;
|
|
11
|
+
"de-DE": string;
|
|
12
|
+
"ru-RU": string;
|
|
13
|
+
"nl-NL": string;
|
|
14
|
+
"pt-BR": string;
|
|
15
|
+
"zh-CN": string;
|
|
16
|
+
"he-IL": string;
|
|
17
|
+
"cs-CZ": string;
|
|
18
|
+
"ko-KR": string;
|
|
19
|
+
"ja-JP": string;
|
|
20
|
+
"zh-TW": string;
|
|
21
|
+
"bg-BG": string;
|
|
22
|
+
"hr-HR": string;
|
|
23
|
+
"da-DK": string;
|
|
24
|
+
"fi-FI": string;
|
|
25
|
+
"el-GR": string;
|
|
26
|
+
"hu-HU": string;
|
|
27
|
+
"nb-NO": string;
|
|
28
|
+
"pl-PL": string;
|
|
29
|
+
"pt-PT": string;
|
|
30
|
+
"ro-RO": string;
|
|
31
|
+
"sv-SE": string;
|
|
32
|
+
"tr-TR": string;
|
|
33
|
+
"et-EE": string;
|
|
34
|
+
"id-ID": string;
|
|
35
|
+
"lv-LV": string;
|
|
36
|
+
"th-TH": string;
|
|
37
|
+
}>[] | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Image } from './media';
|
|
2
|
+
import { MultilingualLabel } from './multilingual';
|
|
3
|
+
export type CampaignInformations = {
|
|
4
|
+
coverImage: Image;
|
|
5
|
+
name: MultilingualLabel;
|
|
6
|
+
description: MultilingualLabel;
|
|
7
|
+
disclaimer?: MultilingualLabel;
|
|
8
|
+
};
|
|
9
|
+
export type Campaign = {
|
|
10
|
+
id: number;
|
|
11
|
+
informations: CampaignInformations;
|
|
12
|
+
};
|
|
@@ -79,17 +79,16 @@ export declare const GAME_TYPE: Record<string, GameType>;
|
|
|
79
79
|
export type ContentStatuses = Partial<{
|
|
80
80
|
[languageCode in LanguageCode]: 'draft' | 'validated' | 'waiting-translation' | 'waiting-validation';
|
|
81
81
|
}>;
|
|
82
|
+
export type ContentMetadata = {
|
|
83
|
+
identifier: string;
|
|
84
|
+
coverImage?: Image;
|
|
85
|
+
name: MultilingualLabel;
|
|
86
|
+
thematic: Thematic;
|
|
87
|
+
};
|
|
82
88
|
export type Content = {
|
|
83
89
|
archived: boolean;
|
|
84
90
|
id: number;
|
|
85
|
-
metadata:
|
|
86
|
-
coverImage: Image;
|
|
87
|
-
identifier?: string;
|
|
88
|
-
name: MultilingualLabel;
|
|
89
|
-
thematic: Thematic;
|
|
90
|
-
explanation?: string;
|
|
91
|
-
knowMore?: string;
|
|
92
|
-
};
|
|
91
|
+
metadata: ContentMetadata;
|
|
93
92
|
statuses: ContentStatuses;
|
|
94
93
|
game?: Game;
|
|
95
94
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content.js","sources":["../../../src/business/types/content.ts"],"sourcesContent":["import { DeepPartial } from 'ts-essentials';\n\nimport { LanguageCode, MultilingualLabel } from './multilingual';\nimport { Image, Media } from './media';\nimport { Thematic } from './thematic';\n\nexport type ErrorText = {\n type: 'error-text';\n gameMedia?: Media;\n explanationMedia?: Media;\n explanation?: MultilingualLabel;\n wrongText?: MultilingualLabel;\n correctText?: MultilingualLabel;\n};\n\nexport type MultipleChoiceQuestion = {\n type: 'mcq';\n gameMedia?: Media;\n question?: MultilingualLabel;\n explanation?: MultilingualLabel;\n explanationMedia?: Media;\n multiselect?: boolean;\n choices?: {\n correct: boolean;\n text: MultilingualLabel;\n }[];\n};\n\nexport type NoInteraction = {\n type: 'no-interaction';\n firstMedia?: Media;\n secondMedia?: Media;\n title?: MultilingualLabel;\n text?: MultilingualLabel;\n};\n\nexport type OpenQuestion = {\n type: 'open-question';\n gameMedia?: Media;\n question?: MultilingualLabel;\n answer?: MultilingualLabel;\n explanation?: MultilingualLabel;\n explanationMedia?: Media;\n levenshteinDistance?: number;\n};\n\nexport type OrderingCards = {\n type: 'ordering-cards';\n explanation?: MultilingualLabel;\n question?: MultilingualLabel;\n topLabel?: MultilingualLabel;\n bottomLabel?: MultilingualLabel;\n cards: MultilingualLabel[];\n};\n\nexport type PictureSpot = {\n type: 'picture-spot';\n image?: Image;\n explanation?: MultilingualLabel;\n items?: {\n x: number;\n y: number;\n r: number;\n question: MultilingualLabel;\n description: MultilingualLabel;\n }[];\n};\n\nexport type SwipingCardPosition = 'left' | 'right' | 'top' | 'bottom';\n\nexport type SwipingCards = {\n type: 'swiping-cards';\n explanation?: MultilingualLabel;\n question?: MultilingualLabel;\n zones?: {\n position: SwipingCardPosition;\n text: MultilingualLabel;\n }[];\n cards?: {\n image?: Image;\n text?: MultilingualLabel;\n answer: SwipingCardPosition;\n }[];\n};\n\nexport type Game =\n | ErrorText\n | MultipleChoiceQuestion\n | NoInteraction\n | OpenQuestion\n | OrderingCards\n | PictureSpot\n | SwipingCards;\n\nexport type GameType =\n | 'error-text'\n | 'mcq'\n | 'open-question'\n | 'no-interaction'\n | 'picture-spot'\n | 'swiping-cards'\n | 'ordering-cards';\n\nexport const GAME_TYPE: Record<string, GameType> = {\n MCQ: 'mcq',\n ERROR_TEXT: 'error-text',\n OPEN_QUESTION: 'open-question',\n NO_INTERACTION: 'no-interaction',\n PICTURE_SPOT: 'picture-spot',\n ORDERING_CARDS: 'ordering-cards',\n SWIPING_CARDS: 'swiping-cards',\n};\n\nexport type ContentStatuses = Partial<{\n [languageCode in LanguageCode]: 'draft' | 'validated' | 'waiting-translation' | 'waiting-validation';\n}>;\n\nexport type ContentMetadata = {\n identifier: string;\n coverImage?: Image;\n name: MultilingualLabel;\n thematic: Thematic;\n};\n\nexport type Content = {\n archived: boolean;\n id: number;\n metadata: ContentMetadata;\n statuses: ContentStatuses;\n game?: Game;\n};\n\nexport const isGameMultipleChoiceQuestion = (game: Game): game is MultipleChoiceQuestion => game.type === GAME_TYPE.MCQ;\nexport const isGameErrorText = (game: Game): game is ErrorText => game.type === GAME_TYPE.ERROR_TEXT;\nexport const isGameOpenQuestion = (game: Game): game is OpenQuestion => game.type === GAME_TYPE.OPEN_QUESTION;\nexport const isGameNoInteraction = (game: Game): game is NoInteraction => game.type === GAME_TYPE.NO_INTERACTION;\nexport const isGamePictureSpot = (game: Game): game is PictureSpot => game.type === GAME_TYPE.PICTURE_SPOT;\nexport const isGameOrderingCards = (game: Game): game is OrderingCards => game.type === GAME_TYPE.ORDERING_CARDS;\nexport const isGameSwipingCards = (game: Game): game is SwipingCards => game.type === GAME_TYPE.SWIPING_CARDS;\n\nexport const isPartialGameMultipleChoiceQuestion = (\n game: DeepPartial<Game>,\n): game is DeepPartial<MultipleChoiceQuestion> => game.type === GAME_TYPE.MCQ;\nexport const isPartialGameErrorText = (game: DeepPartial<Game>): game is DeepPartial<ErrorText> =>\n game.type === GAME_TYPE.ERROR_TEXT;\nexport const isPartialGameOpenQuestion = (game: DeepPartial<Game>): game is DeepPartial<OpenQuestion> =>\n game.type === GAME_TYPE.OPEN_QUESTION;\nexport const isPartialGameNoInteraction = (game: DeepPartial<Game>): game is DeepPartial<NoInteraction> =>\n game.type === GAME_TYPE.NO_INTERACTION;\nexport const isPartialGamePictureSpot = (game: DeepPartial<Game>): game is DeepPartial<PictureSpot> =>\n game.type === GAME_TYPE.PICTURE_SPOT;\nexport const isPartialGameOrderingCards = (game: DeepPartial<Game>): game is DeepPartial<OrderingCards> =>\n game.type === GAME_TYPE.ORDERING_CARDS;\nexport const isPartialGameSwipingCards = (game: DeepPartial<Game>): game is DeepPartial<SwipingCards> =>\n game.type === GAME_TYPE.SWIPING_CARDS;\n"],"names":[],"mappings":";;;;AAuGa,MAAA,SAAS,GAA6B;AACjD,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,UAAU,EAAE,YAAY;AACxB,IAAA,aAAa,EAAE,eAAe;AAC9B,IAAA,cAAc,EAAE,gBAAgB;AAChC,IAAA,YAAY,EAAE,cAAc;AAC5B,IAAA,cAAc,EAAE,gBAAgB;AAChC,IAAA,aAAa,EAAE,eAAe;EAC9B;AAqBW,MAAA,4BAA4B,GAAG,CAAC,IAAU,KAAqC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI;AAC3G,MAAA,eAAe,GAAG,CAAC,IAAU,KAAwB,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,WAAW;AACxF,MAAA,kBAAkB,GAAG,CAAC,IAAU,KAA2B,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,cAAc;AACjG,MAAA,mBAAmB,GAAG,CAAC,IAAU,KAA4B,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,eAAe;AACpG,MAAA,iBAAiB,GAAG,CAAC,IAAU,KAA0B,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,aAAa;AAC9F,MAAA,mBAAmB,GAAG,CAAC,IAAU,KAA4B,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,eAAe;AACpG,MAAA,kBAAkB,GAAG,CAAC,IAAU,KAA2B,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,cAAc;AAEjG,MAAA,mCAAmC,GAAG,CACjD,IAAuB,KACyB,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI;AACjE,MAAA,sBAAsB,GAAG,CAAC,IAAuB,KAC5D,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,WAAW;AACxB,MAAA,yBAAyB,GAAG,CAAC,IAAuB,KAC/D,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,cAAc;AAC3B,MAAA,0BAA0B,GAAG,CAAC,IAAuB,KAChE,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,eAAe;AAC5B,MAAA,wBAAwB,GAAG,CAAC,IAAuB,KAC9D,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,aAAa;AAC1B,MAAA,0BAA0B,GAAG,CAAC,IAAuB,KAChE,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,eAAe;AAC5B,MAAA,yBAAyB,GAAG,CAAC,IAAuB,KAC/D,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './content';
|
|
2
|
-
export * from './media';
|
|
3
|
-
export * from './thematic';
|
|
4
|
-
export * from './multilingual';
|
|
5
|
-
export * from './campaign';
|
|
1
|
+
export * from './content';
|
|
2
|
+
export * from './media';
|
|
3
|
+
export * from './thematic';
|
|
4
|
+
export * from './multilingual';
|
|
5
|
+
export * from './campaign';
|
package/package.json
CHANGED
package/.circleci/config.yml
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Javascript Node CircleCI 2.0 configuration file
|
|
2
|
-
#
|
|
3
|
-
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
|
|
4
|
-
#
|
|
5
|
-
version: 2.1
|
|
6
|
-
jobs:
|
|
7
|
-
test:
|
|
8
|
-
docker:
|
|
9
|
-
- image: cimg/node:18.10.0
|
|
10
|
-
|
|
11
|
-
steps:
|
|
12
|
-
- checkout
|
|
13
|
-
|
|
14
|
-
- run:
|
|
15
|
-
name: Set npm token
|
|
16
|
-
command: 'echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc'
|
|
17
|
-
|
|
18
|
-
- run:
|
|
19
|
-
name: Install node modules
|
|
20
|
-
command: yarn
|
|
21
|
-
|
|
22
|
-
- run:
|
|
23
|
-
name: Check lint
|
|
24
|
-
command: yarn lint
|
|
25
|
-
|
|
26
|
-
- run:
|
|
27
|
-
name: Run tests
|
|
28
|
-
# Limit resources as the default parameters overload the CPU of the machine and makes tests hang
|
|
29
|
-
command: yarn test --maxWorkers=50%
|
|
30
|
-
|
|
31
|
-
- run:
|
|
32
|
-
name: Build
|
|
33
|
-
command: yarn build
|
|
34
|
-
|
|
35
|
-
workflows:
|
|
36
|
-
version: 2
|
|
37
|
-
|
|
38
|
-
autodeploy:
|
|
39
|
-
jobs:
|
|
40
|
-
- test
|
package/.eslintignore
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
dist/
|
package/.eslintrc.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"es2021": true,
|
|
4
|
-
"node": true
|
|
5
|
-
},
|
|
6
|
-
"plugins": [
|
|
7
|
-
"@typescript-eslint",
|
|
8
|
-
"prettier",
|
|
9
|
-
"import"
|
|
10
|
-
],
|
|
11
|
-
"extends": [
|
|
12
|
-
"eslint:recommended",
|
|
13
|
-
"plugin:@typescript-eslint/recommended",
|
|
14
|
-
"plugin:import/recommended",
|
|
15
|
-
"plugin:import/typescript",
|
|
16
|
-
"prettier"
|
|
17
|
-
],
|
|
18
|
-
"parser": "@typescript-eslint/parser",
|
|
19
|
-
"rules": {
|
|
20
|
-
"prettier/prettier": "warn",
|
|
21
|
-
"@typescript-eslint/no-explicit-any": "warn",
|
|
22
|
-
"@typescript-eslint/ban-types": "warn",
|
|
23
|
-
"@typescript-eslint/ban-ts-comment": "warn"
|
|
24
|
-
}
|
|
25
|
-
}
|
package/.gitignore
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
*.dat
|
|
2
|
-
*.iml
|
|
3
|
-
*.log
|
|
4
|
-
*.out
|
|
5
|
-
*.pid
|
|
6
|
-
*.seed
|
|
7
|
-
*.sublime-*
|
|
8
|
-
*.swo
|
|
9
|
-
*.swp
|
|
10
|
-
*.tgz
|
|
11
|
-
*.xml
|
|
12
|
-
.tmp
|
|
13
|
-
.env
|
|
14
|
-
doc/*.json
|
|
15
|
-
|
|
16
|
-
# Mac Related files
|
|
17
|
-
.DS_Store
|
|
18
|
-
|
|
19
|
-
# IDE Related Files
|
|
20
|
-
.idea
|
|
21
|
-
.project
|
|
22
|
-
|
|
23
|
-
# eslint
|
|
24
|
-
.eslintcache
|
|
25
|
-
|
|
26
|
-
# jest
|
|
27
|
-
jest-stare
|
|
28
|
-
|
|
29
|
-
# JS Related files
|
|
30
|
-
bower_components
|
|
31
|
-
npm-debug.log
|
|
32
|
-
node_modules
|
|
33
|
-
nestjs/node_modules
|
|
34
|
-
.npmrc
|
|
35
|
-
|
|
36
|
-
# Build
|
|
37
|
-
dist
|
package/.idea/.gitignore
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
<component name="ProjectCodeStyleConfiguration">
|
|
2
|
-
<code_scheme name="Project" version="173">
|
|
3
|
-
<JSCodeStyleSettings version="0">
|
|
4
|
-
<option name="VAR_DECLARATION_WRAP" value="2" />
|
|
5
|
-
<option name="OBJECT_LITERAL_WRAP" value="2" />
|
|
6
|
-
</JSCodeStyleSettings>
|
|
7
|
-
<TypeScriptCodeStyleSettings version="0">
|
|
8
|
-
<option name="VAR_DECLARATION_WRAP" value="2" />
|
|
9
|
-
<option name="OBJECT_LITERAL_WRAP" value="2" />
|
|
10
|
-
</TypeScriptCodeStyleSettings>
|
|
11
|
-
<codeStyleSettings language="JavaScript">
|
|
12
|
-
<option name="BLOCK_COMMENT_ADD_SPACE" value="true" />
|
|
13
|
-
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
|
|
14
|
-
<option name="METHOD_CALL_CHAIN_WRAP" value="2" />
|
|
15
|
-
<option name="IF_BRACE_FORCE" value="1" />
|
|
16
|
-
<option name="DOWHILE_BRACE_FORCE" value="1" />
|
|
17
|
-
<option name="WHILE_BRACE_FORCE" value="1" />
|
|
18
|
-
<option name="FOR_BRACE_FORCE" value="1" />
|
|
19
|
-
</codeStyleSettings>
|
|
20
|
-
<codeStyleSettings language="TypeScript">
|
|
21
|
-
<option name="BLOCK_COMMENT_ADD_SPACE" value="true" />
|
|
22
|
-
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
|
|
23
|
-
<option name="METHOD_CALL_CHAIN_WRAP" value="2" />
|
|
24
|
-
<option name="IF_BRACE_FORCE" value="1" />
|
|
25
|
-
<option name="DOWHILE_BRACE_FORCE" value="1" />
|
|
26
|
-
<option name="WHILE_BRACE_FORCE" value="1" />
|
|
27
|
-
<option name="FOR_BRACE_FORCE" value="1" />
|
|
28
|
-
<indentOptions>
|
|
29
|
-
<option name="INDENT_SIZE" value="2" />
|
|
30
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
31
|
-
<option name="TAB_SIZE" value="2" />
|
|
32
|
-
</indentOptions>
|
|
33
|
-
</codeStyleSettings>
|
|
34
|
-
</code_scheme>
|
|
35
|
-
</component>
|
package/.idea/misc.xml
DELETED
package/.idea/modules.xml
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ProjectModuleManager">
|
|
4
|
-
<modules>
|
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/shared-library.iml" filepath="$PROJECT_DIR$/.idea/shared-library.iml" />
|
|
6
|
-
</modules>
|
|
7
|
-
</component>
|
|
8
|
-
</project>
|
package/.idea/shared-library.iml
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="JAVA_MODULE" version="4">
|
|
3
|
-
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
-
<exclude-output />
|
|
5
|
-
<content url="file://$MODULE_DIR$">
|
|
6
|
-
<excludeFolder url="file://$MODULE_DIR$/dist" />
|
|
7
|
-
</content>
|
|
8
|
-
<orderEntry type="inheritedJdk" />
|
|
9
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
10
|
-
</component>
|
|
11
|
-
</module>
|
package/.idea/vcs.xml
DELETED
package/.idea/workspace.xml
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="AutoImportSettings">
|
|
4
|
-
<option name="autoReloadType" value="SELECTIVE" />
|
|
5
|
-
</component>
|
|
6
|
-
<component name="ChangeListManager">
|
|
7
|
-
<list default="true" id="9c51afc7-3a2a-462c-a7b1-b3e0ca474b0c" name="Changes" comment="" />
|
|
8
|
-
<option name="SHOW_DIALOG" value="false" />
|
|
9
|
-
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
10
|
-
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
11
|
-
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
12
|
-
</component>
|
|
13
|
-
<component name="Git.Settings">
|
|
14
|
-
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
|
15
|
-
</component>
|
|
16
|
-
<component name="GoLibraries">
|
|
17
|
-
<option name="indexEntireGoPath" value="true" />
|
|
18
|
-
</component>
|
|
19
|
-
<component name="MarkdownSettingsMigration">
|
|
20
|
-
<option name="stateVersion" value="1" />
|
|
21
|
-
</component>
|
|
22
|
-
<component name="ProjectId" id="2LBBaAUnkGvlewEioyoXgDTb3Rx" />
|
|
23
|
-
<component name="ProjectLevelVcsManager">
|
|
24
|
-
<ConfirmationsSetting value="2" id="Add" />
|
|
25
|
-
</component>
|
|
26
|
-
<component name="ProjectViewState">
|
|
27
|
-
<option name="autoscrollFromSource" value="true" />
|
|
28
|
-
<option name="hideEmptyMiddlePackages" value="true" />
|
|
29
|
-
<option name="showLibraryContents" value="true" />
|
|
30
|
-
</component>
|
|
31
|
-
<component name="PropertiesComponent">{
|
|
32
|
-
"keyToString": {
|
|
33
|
-
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
|
34
|
-
"RunOnceActivity.ShowReadmeOnStart": "true",
|
|
35
|
-
"RunOnceActivity.go.formatter.settings.were.checked": "true",
|
|
36
|
-
"RunOnceActivity.go.migrated.go.modules.settings": "true",
|
|
37
|
-
"WebServerToolWindowFactoryState": "false",
|
|
38
|
-
"dart.analysis.tool.window.visible": "false",
|
|
39
|
-
"git-widget-placeholder": "master",
|
|
40
|
-
"go.import.settings.migrated": "true",
|
|
41
|
-
"last_opened_file_path": "/Users/cchampou/dev/shared-library",
|
|
42
|
-
"node.js.detected.package.eslint": "true",
|
|
43
|
-
"node.js.detected.package.standard": "true",
|
|
44
|
-
"node.js.detected.package.tslint": "true",
|
|
45
|
-
"node.js.selected.package.eslint": "(autodetect)",
|
|
46
|
-
"node.js.selected.package.standard": "",
|
|
47
|
-
"node.js.selected.package.tslint": "(autodetect)",
|
|
48
|
-
"nodejs_package_manager_path": "yarn",
|
|
49
|
-
"settings.editor.selected.configurable": "settings.javascript.linters.eslint",
|
|
50
|
-
"show.migrate.to.gradle.popup": "false",
|
|
51
|
-
"ts.external.directory.path": "/Users/cchampou/dev/shared-library/node_modules/typescript/lib",
|
|
52
|
-
"vue.rearranger.settings.migration": "true"
|
|
53
|
-
}
|
|
54
|
-
}</component>
|
|
55
|
-
<component name="RecentsManager">
|
|
56
|
-
<key name="MoveFile.RECENT_KEYS">
|
|
57
|
-
<recent name="$PROJECT_DIR$/src/business/types" />
|
|
58
|
-
<recent name="$PROJECT_DIR$/src/types/business" />
|
|
59
|
-
<recent name="$PROJECT_DIR$/src/business" />
|
|
60
|
-
<recent name="$PROJECT_DIR$/src/types" />
|
|
61
|
-
</key>
|
|
62
|
-
</component>
|
|
63
|
-
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
|
64
|
-
<component name="TaskManager">
|
|
65
|
-
<task active="true" id="Default" summary="Default task">
|
|
66
|
-
<changelist id="9c51afc7-3a2a-462c-a7b1-b3e0ca474b0c" name="Changes" comment="" />
|
|
67
|
-
<created>1675334656680</created>
|
|
68
|
-
<option name="number" value="Default" />
|
|
69
|
-
<option name="presentableId" value="Default" />
|
|
70
|
-
<updated>1675334656680</updated>
|
|
71
|
-
<workItem from="1675334657881" duration="9370000" />
|
|
72
|
-
<workItem from="1675413502042" duration="3448000" />
|
|
73
|
-
<workItem from="1675777811478" duration="2023000" />
|
|
74
|
-
<workItem from="1676048809145" duration="1369000" />
|
|
75
|
-
<workItem from="1676285644197" duration="9643000" />
|
|
76
|
-
<workItem from="1676390431531" duration="720000" />
|
|
77
|
-
<workItem from="1677080847564" duration="1233000" />
|
|
78
|
-
<workItem from="1679044878990" duration="2004000" />
|
|
79
|
-
<workItem from="1689058230559" duration="5032000" />
|
|
80
|
-
<workItem from="1692285159365" duration="2040000" />
|
|
81
|
-
<workItem from="1692345932803" duration="2572000" />
|
|
82
|
-
<workItem from="1692883384801" duration="809000" />
|
|
83
|
-
<workItem from="1704897952885" duration="6308000" />
|
|
84
|
-
<workItem from="1704980905659" duration="3963000" />
|
|
85
|
-
<workItem from="1705481044854" duration="2558000" />
|
|
86
|
-
<workItem from="1706005322333" duration="2222000" />
|
|
87
|
-
<workItem from="1706026800654" duration="819000" />
|
|
88
|
-
<workItem from="1706094026619" duration="442000" />
|
|
89
|
-
<workItem from="1706107680964" duration="290000" />
|
|
90
|
-
<workItem from="1706632221330" duration="2165000" />
|
|
91
|
-
<workItem from="1706773691160" duration="3871000" />
|
|
92
|
-
<workItem from="1707832197097" duration="500000" />
|
|
93
|
-
<workItem from="1709718260290" duration="1103000" />
|
|
94
|
-
</task>
|
|
95
|
-
<servers />
|
|
96
|
-
</component>
|
|
97
|
-
<component name="TypeScriptGeneratedFilesManager">
|
|
98
|
-
<option name="version" value="3" />
|
|
99
|
-
</component>
|
|
100
|
-
<component name="VgoProject">
|
|
101
|
-
<integration-enabled>false</integration-enabled>
|
|
102
|
-
<settings-migrated>true</settings-migrated>
|
|
103
|
-
</component>
|
|
104
|
-
<component name="XSLT-Support.FileAssociations.UIState">
|
|
105
|
-
<expand />
|
|
106
|
-
<select />
|
|
107
|
-
</component>
|
|
108
|
-
</project>
|
package/.prettierrc.json
DELETED
package/CHANGELOG.md
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
## 1.2.0
|
|
2
|
-
- Add campaign type
|
|
3
|
-
|
|
4
|
-
## 1.1.8
|
|
5
|
-
- Add swiping cards direction type
|
|
6
|
-
|
|
7
|
-
## 1.1.7
|
|
8
|
-
- Change default quality in cdn
|
|
9
|
-
|
|
10
|
-
## 1.1.6
|
|
11
|
-
- Add Partial Gameplay typeguards
|
|
12
|
-
|
|
13
|
-
## 1.1.5
|
|
14
|
-
- Add isLanguageCode typeguard
|
|
15
|
-
|
|
16
|
-
## 1.1.4
|
|
17
|
-
- Fix: bad publication
|
|
18
|
-
|
|
19
|
-
## 1.1.3
|
|
20
|
-
- Fix multilingual type adding partial
|
|
21
|
-
|
|
22
|
-
## 1.1.2
|
|
23
|
-
- Add Gameplay type guards
|
|
24
|
-
|
|
25
|
-
## 1.1.1
|
|
26
|
-
- Fix publication issue
|
|
27
|
-
|
|
28
|
-
## 1.1.0
|
|
29
|
-
- Add business entities types
|
|
30
|
-
|
|
31
|
-
## 1.0.29
|
|
32
|
-
- Add `getContrastColor` function
|
|
33
|
-
|
|
34
|
-
## 1.0.28
|
|
35
|
-
- Fix `twicpicsTransformationQueries` function to have integer values
|
|
36
|
-
|
|
37
|
-
## 1.0.27
|
|
38
|
-
- Add `isStringLengthWithinRange` function
|
|
39
|
-
|
|
40
|
-
## 1.0.26
|
|
41
|
-
- Add `innerJoin` to `index.ts`
|
|
42
|
-
|
|
43
|
-
## 1.0.25
|
|
44
|
-
- Add `innerJoin` function for arrays
|
|
45
|
-
- Modify `leftOutterJoin` function implementation
|
|
46
|
-
|
|
47
|
-
## 1.0.24
|
|
48
|
-
- Add `leftOutterJoin` function for arrays
|
|
49
|
-
|
|
50
|
-
## 1.0.23
|
|
51
|
-
- Add ability to define constructor params in `ClassType`
|
|
52
|
-
|
|
53
|
-
## 1.0.22
|
|
54
|
-
- Fix `stripPropertiesFromObject` issue with null values
|
|
55
|
-
|
|
56
|
-
## 1.0.21
|
|
57
|
-
- Fix exports from `object` directory
|
|
58
|
-
|
|
59
|
-
## 1.0.20
|
|
60
|
-
- Add `stripPropertiesFromObject` function
|
|
61
|
-
|
|
62
|
-
## 1.0.19
|
|
63
|
-
- Fix export `median` function
|
|
64
|
-
|
|
65
|
-
## 1.0.18
|
|
66
|
-
- Add math `median` function
|
|
67
|
-
|
|
68
|
-
## 1.0.17
|
|
69
|
-
- Handle device pixel ratio (DPR) in Twicpics transformations
|
|
70
|
-
|
|
71
|
-
## 1.0.16
|
|
72
|
-
- Set twicpics image quality to 90
|
|
73
|
-
|
|
74
|
-
## 1.0.15
|
|
75
|
-
- Handle only width or only height in twicpics transformations
|
|
76
|
-
|
|
77
|
-
## 1.0.14
|
|
78
|
-
- Fix: bad tarball published
|
|
79
|
-
|
|
80
|
-
## 1.0.13
|
|
81
|
-
- Add output format query param
|
|
82
|
-
|
|
83
|
-
## 1.0.12
|
|
84
|
-
- Add cache version query param
|
|
85
|
-
|
|
86
|
-
## 1.0.11
|
|
87
|
-
- Add valueOf type
|
|
88
|
-
|
|
89
|
-
## 1.0.10
|
|
90
|
-
|
|
91
|
-
## 1.0.9
|
|
92
|
-
- Add option to remove image compression
|
|
93
|
-
|
|
94
|
-
## 1.0.8
|
|
95
|
-
- Fix crash when passing undefined to extractInfoFromUrl function
|
|
96
|
-
|
|
97
|
-
## 1.0.7
|
|
98
|
-
- Fix Twicpics resizing
|
|
99
|
-
|
|
100
|
-
## 1.0.6
|
|
101
|
-
- Add current map to `dataModifier` function on `arrayToMap`
|
|
102
|
-
|
|
103
|
-
## 1.0.5
|
|
104
|
-
- CDN abstraction for Imgix and Twicpics
|
|
105
|
-
|
|
106
|
-
## 1.0.0
|
|
107
|
-
- Breaking change: rename date folder into time
|
|
108
|
-
- Export convertion functions from time
|
|
109
|
-
|
|
110
|
-
## 0.0.18
|
|
111
|
-
- Change update behavior to fully replace updated items
|
|
112
|
-
|
|
113
|
-
## 0.0.17
|
|
114
|
-
- Remove error thrown when not every items have been visisted
|
|
115
|
-
|
|
116
|
-
## 0.0.16
|
|
117
|
-
- Fix an issue when initializing an empty linked list
|
|
118
|
-
|
|
119
|
-
## 0.0.15
|
|
120
|
-
- Rollback target version, change output format
|
|
121
|
-
|
|
122
|
-
## 0.0.14
|
|
123
|
-
- Bump target version in tsconfig
|
|
124
|
-
|
|
125
|
-
## 0.0.13
|
|
126
|
-
- Bring most utilities from the back-office, mobile-app and nest to this package (#32q6ude)
|
|
127
|
-
|
|
128
|
-
## 0.0.1
|
|
129
|
-
- Library initialisation (#2ykhvcg)
|
|
130
|
-
- Fix files taken as packaged
|
package/README.md
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# Shared-library
|
|
2
|
-
|
|
3
|
-
Regroup low levels utils to share across Sparted's projects. Nothing should be platform specific and it should ideally not depend on any external library.
|
|
4
|
-
|
|
5
|
-
# Publishing
|
|
6
|
-
|
|
7
|
-
Since we want to be able to do the following sub imports when using the library:
|
|
8
|
-
|
|
9
|
-
```ts
|
|
10
|
-
import { function1, function2 } from '@sparted/shared-library/array';
|
|
11
|
-
import { function3, function4 } from '@sparted/shared-library/strings';
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
While also being able to import everything from the root.
|
|
15
|
-
|
|
16
|
-
We'll need to do some rollup/npm trickery to keep everything tree-shakable and intuitive.
|
|
17
|
-
|
|
18
|
-
To do so, we copy the package.json inside the generated dist folder when building the library. Then we run `npm publish` from inside the dist folder.
|
|
19
|
-
|
|
20
|
-
What this do, is take everything inside the dist folder and publish as its standalone package. This enables us to import directly from `@sparted/shared-library/array` without adding `dist` since `dist/array` becomes a root folder. If we do not do this and instead run `npm publish` in the root directory, the package would keep the folder structure and we would need to add `dist` in imports. eg: `@sparted/shared-library/dist/array`.
|
|
21
|
-
|
|
22
|
-
## How to publish
|
|
23
|
-
|
|
24
|
-
1. Update the `package.json` version
|
|
25
|
-
2. Run `yarn build-and-publish` (this command assumes the `package.json` version was not already published)
|
|
26
|
-
3. The new version should be commited and pushed
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content.js","sources":["../../../src/business/types/content.ts"],"sourcesContent":["import { DeepPartial } from 'ts-essentials';\n\nimport { LanguageCode, MultilingualLabel } from './multilingual';\nimport { Image, Media } from './media';\nimport { Thematic } from './thematic';\n\nexport type ErrorText = {\n type: 'error-text';\n gameMedia?: Media;\n explanationMedia?: Media;\n explanation?: MultilingualLabel;\n wrongText?: MultilingualLabel;\n correctText?: MultilingualLabel;\n};\n\nexport type MultipleChoiceQuestion = {\n type: 'mcq';\n gameMedia?: Media;\n question?: MultilingualLabel;\n explanation?: MultilingualLabel;\n explanationMedia?: Media;\n multiselect?: boolean;\n choices?: {\n correct: boolean;\n text: MultilingualLabel;\n }[];\n};\n\nexport type NoInteraction = {\n type: 'no-interaction';\n firstMedia?: Media;\n secondMedia?: Media;\n title?: MultilingualLabel;\n text?: MultilingualLabel;\n};\n\nexport type OpenQuestion = {\n type: 'open-question';\n gameMedia?: Media;\n question?: MultilingualLabel;\n answer?: MultilingualLabel;\n explanation?: MultilingualLabel;\n explanationMedia?: Media;\n levenshteinDistance?: number;\n};\n\nexport type OrderingCards = {\n type: 'ordering-cards';\n explanation?: MultilingualLabel;\n question?: MultilingualLabel;\n topLabel?: MultilingualLabel;\n bottomLabel?: MultilingualLabel;\n cards: MultilingualLabel[];\n};\n\nexport type PictureSpot = {\n type: 'picture-spot';\n image?: Image;\n explanation?: MultilingualLabel;\n items?: {\n x: number;\n y: number;\n r: number;\n question: MultilingualLabel;\n description: MultilingualLabel;\n }[];\n};\n\nexport type SwipingCardPosition = 'left' | 'right' | 'top' | 'bottom';\n\nexport type SwipingCards = {\n type: 'swiping-cards';\n explanation?: MultilingualLabel;\n question?: MultilingualLabel;\n zones?: {\n position: SwipingCardPosition;\n text: MultilingualLabel;\n }[];\n cards?: {\n image?: Image;\n text?: MultilingualLabel;\n answer: SwipingCardPosition;\n }[];\n};\n\nexport type Game =\n | ErrorText\n | MultipleChoiceQuestion\n | NoInteraction\n | OpenQuestion\n | OrderingCards\n | PictureSpot\n | SwipingCards;\n\nexport type GameType =\n | 'error-text'\n | 'mcq'\n | 'open-question'\n | 'no-interaction'\n | 'picture-spot'\n | 'swiping-cards'\n | 'ordering-cards';\n\nexport const GAME_TYPE: Record<string, GameType> = {\n MCQ: 'mcq',\n ERROR_TEXT: 'error-text',\n OPEN_QUESTION: 'open-question',\n NO_INTERACTION: 'no-interaction',\n PICTURE_SPOT: 'picture-spot',\n ORDERING_CARDS: 'ordering-cards',\n SWIPING_CARDS: 'swiping-cards',\n};\n\nexport type ContentStatuses = Partial<{\n [languageCode in LanguageCode]: 'draft' | 'validated' | 'waiting-translation' | 'waiting-validation';\n}>;\n\nexport type Content = {\n archived: boolean;\n id: number;\n metadata: {\n coverImage: Image;\n identifier?: string;\n name: MultilingualLabel;\n thematic: Thematic;\n explanation?: string;\n knowMore?: string;\n };\n statuses: ContentStatuses;\n game?: Game;\n};\n\nexport const isGameMultipleChoiceQuestion = (game: Game): game is MultipleChoiceQuestion => game.type === GAME_TYPE.MCQ;\nexport const isGameErrorText = (game: Game): game is ErrorText => game.type === GAME_TYPE.ERROR_TEXT;\nexport const isGameOpenQuestion = (game: Game): game is OpenQuestion => game.type === GAME_TYPE.OPEN_QUESTION;\nexport const isGameNoInteraction = (game: Game): game is NoInteraction => game.type === GAME_TYPE.NO_INTERACTION;\nexport const isGamePictureSpot = (game: Game): game is PictureSpot => game.type === GAME_TYPE.PICTURE_SPOT;\nexport const isGameOrderingCards = (game: Game): game is OrderingCards => game.type === GAME_TYPE.ORDERING_CARDS;\nexport const isGameSwipingCards = (game: Game): game is SwipingCards => game.type === GAME_TYPE.SWIPING_CARDS;\n\nexport const isPartialGameMultipleChoiceQuestion = (\n game: DeepPartial<Game>,\n): game is DeepPartial<MultipleChoiceQuestion> => game.type === GAME_TYPE.MCQ;\nexport const isPartialGameErrorText = (game: DeepPartial<Game>): game is DeepPartial<ErrorText> =>\n game.type === GAME_TYPE.ERROR_TEXT;\nexport const isPartialGameOpenQuestion = (game: DeepPartial<Game>): game is DeepPartial<OpenQuestion> =>\n game.type === GAME_TYPE.OPEN_QUESTION;\nexport const isPartialGameNoInteraction = (game: DeepPartial<Game>): game is DeepPartial<NoInteraction> =>\n game.type === GAME_TYPE.NO_INTERACTION;\nexport const isPartialGamePictureSpot = (game: DeepPartial<Game>): game is DeepPartial<PictureSpot> =>\n game.type === GAME_TYPE.PICTURE_SPOT;\nexport const isPartialGameOrderingCards = (game: DeepPartial<Game>): game is DeepPartial<OrderingCards> =>\n game.type === GAME_TYPE.ORDERING_CARDS;\nexport const isPartialGameSwipingCards = (game: DeepPartial<Game>): game is DeepPartial<SwipingCards> =>\n game.type === GAME_TYPE.SWIPING_CARDS;\n"],"names":[],"mappings":";;;;AAuGa,MAAA,SAAS,GAA6B;AACjD,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,UAAU,EAAE,YAAY;AACxB,IAAA,aAAa,EAAE,eAAe;AAC9B,IAAA,cAAc,EAAE,gBAAgB;AAChC,IAAA,YAAY,EAAE,cAAc;AAC5B,IAAA,cAAc,EAAE,gBAAgB;AAChC,IAAA,aAAa,EAAE,eAAe;EAC9B;AAqBW,MAAA,4BAA4B,GAAG,CAAC,IAAU,KAAqC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI;AAC3G,MAAA,eAAe,GAAG,CAAC,IAAU,KAAwB,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,WAAW;AACxF,MAAA,kBAAkB,GAAG,CAAC,IAAU,KAA2B,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,cAAc;AACjG,MAAA,mBAAmB,GAAG,CAAC,IAAU,KAA4B,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,eAAe;AACpG,MAAA,iBAAiB,GAAG,CAAC,IAAU,KAA0B,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,aAAa;AAC9F,MAAA,mBAAmB,GAAG,CAAC,IAAU,KAA4B,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,eAAe;AACpG,MAAA,kBAAkB,GAAG,CAAC,IAAU,KAA2B,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,cAAc;AAEjG,MAAA,mCAAmC,GAAG,CACjD,IAAuB,KACyB,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI;AACjE,MAAA,sBAAsB,GAAG,CAAC,IAAuB,KAC5D,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,WAAW;AACxB,MAAA,yBAAyB,GAAG,CAAC,IAAuB,KAC/D,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,cAAc;AAC3B,MAAA,0BAA0B,GAAG,CAAC,IAAuB,KAChE,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,eAAe;AAC5B,MAAA,wBAAwB,GAAG,CAAC,IAAuB,KAC9D,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,aAAa;AAC1B,MAAA,0BAA0B,GAAG,CAAC,IAAuB,KAChE,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,eAAe;AAC5B,MAAA,yBAAyB,GAAG,CAAC,IAAuB,KAC/D,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC;;;;;;;;;;;;;;;;;;"}
|