Commit Graph

33 Commits

Author SHA1 Message Date
Julia Gru
2a691db889 Chore / Update API types (#680)
* generate api

* fix casing in users
2023-05-01 11:35:04 +02:00
JesmoDev
c9701ace39 Feature: Wire Users backend - Part 1 (#659)
* UsersResource format

* wip update of repo and server

* get user workspace to show

* split up the section folder into the existing user and user group folders

* cleanup

* move stuff around

* collection repository

* added isSelected to the collection context

* cleanup

* user edit workspace kind of works again

* fixed header

* saving kinda works

* add notes

* cleaning up

* clean clean

* fixing build errors

* fixing build errors

* fix

* build errors

* fix import

* comment out wrong import

* remove store alias from collection class

* move input-user files to user folder + temp render in property editor

* align input naming

* delete unused test file

* wip align user picker modal code

* fix buttons in edit workspace

* property update method is now using types

* User edit workspace cleanup

* cleanup

* render info items

* remove methods from current user store

* wire all detail methods with server

* wire up user detail repository

* clean up

* remove debugger

* delete test files

* clean up

* wire up create user modal

* move header to element

* wire up user filter

* use correct type

* use correct type

* typescript temp fixes

* add interface for filter model

* temp typescript fixes

* comment out

* temp typescript fixes

* remove unused

* wip user invite

* fix import

* temp alert

* remove unused

* temp type cast

* fix import

* fix import

* move user utils to user folder

* fix tests

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2023-04-25 15:04:41 +02:00
Jesper Møller Jensen
10ef1c8ee3 generate:api 2023-04-25 18:45:28 +12:00
Jacob Overgaard
5ae631b223 Authentication using OpenID (#654)
* install app auth

* add service to handle auth

* add openid handling to general app

* move props to constructor

* update default api url to https

* add support for adjusting umbracoUrl from outside

* use origin url for redirect if empty from env

* merge origin/main

* merge origin/main

* add redirect uri support

* only check auth on firstUpdated

* merge origin/main

* fix redirect_uri

* listen for auth-success events before anything else

* save current route to restore after login

* set token function for all OpenAPI requests

* include credentials after login

* update openapi-typescript-codegen

* generate new models with bugfixes for CancelablePromise and request

* remove auth-success event

* wait with fetchServiceConfiguration until we actually need to query the server

* revert change where service configuration was delayed

* use LocalStorageBackend to save/restore token state

* improve documentation

* cleanup todos

* improve docs

* update documentation and set everything to private fields

* remove undefined

* add a token to provide server url

* add more docs

* provide the base url of the server through a token

* add more docs

* fix import

* allow to override the backoffice base url through a property

* use private modifier

* duplicate login image

* make generic error element to use as error page

* check for initialisation errors and show error page if necessary

* rename class to UmbAuthFlow

* control the notification manually with runtime status call

* add styling

* add stack to problemdetails

* forward all errors

* support problemdetails rendering

* allow passthrough without a token

* move error logic to function

* add support for BOOT_FAILED and default errors

* rename background img

* remove false character

* check for isMocking to simplify auth flow

* add support for generic ApiErrors

* make sure all errors from api controllers are ApiError or CancelError to be able to fine-tune the handling of them

* remove unused legacy method

* show notifications (for now) after session expiration

* break early on CancelErrors

* revert options argument

* remove login token after a 401 is detected

* catch api errors

* prefix class with Umb

* throw errors instead of using ProblemDetailsModel

* add TODO

* add TODO

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2023-04-24 12:27:25 +02:00
Niels Lyngsø
d65cf550bc initial sorting implementation 2023-04-18 12:55:53 +02:00
Mads Rasmussen
e546f469e8 Feature: Data type creation (#645)
* split data type handlers into multiple files

* return promise

* test register root as same entity as items

* add insert method to entity db

* redirect to new data type when selecting in options modal

* add options to modal name

* Update manifests.ts

* add margin to data type info view

* fix import

* update with models from server

* push new item to tree
2023-04-12 10:04:46 +02:00
Jacob Overgaard
b16b8b7335 Chore/update tree api types (#644)
* update types from v13

* replace endpoint names
2023-04-11 10:32:05 +02:00
Niels Lyngsø
f8b8f2c259 updated models (#639)
* updated models

* potential fix of eslint

* fix eslint rules

* first batch

* dictionary corrections

* batch 2

* batch 3

* tiny correction

* batch 4

* rename key to id internal models

* batch 5

* batch 6

* correct LogLevelCountsReponseModel

* batch 7

* batch 8

* batch 9

* health check data

* _createTableItems

* revert to key for checkbox list

* batch 9
2023-04-04 13:19:19 +02:00
Jacob Overgaard
796533ff11 Refactor libs into @umbraco-cms/backoffice/* (#608)
* merge libs rollup configs to one rollup

* move css from libs to src/core

* run rollup on cms build

* move test-utils to /utils folder

* move css to src/core

* mark @umbraco-cms/backoffice as external when building for CMS

* rename all models to include @umbraco-cms/backoffice in their path to allow us to publish as a single module

* rename all imports to @umbraco-cms/backoffice/*

* rename events to umb-events to avoid rollup error of protected module name(?)

* test that libs can build

* move css to src/core

* move umb-lit-element and modal elements to src/core

* move some modal interfaces back to libs/modal

* move the icon store into src/core since it is very localized to the backoffice

* comment out build:libs for now since Github runs out of memory

* rename to match tsconfig alias

* add package.json to libs

* only make libs for lib folders

* turn off emit for typescript since we are handling types for libs separately

* build libs locally

* add script to move libs to final destination with some transform

* move libs after build

* move package.json to dist folder first (so we can publish from there)

* remove inline comments

* ensure the outputDir exists

* Remove re-export of extensions-registry library from models library

* move to individual files to avoid circular imports

* check if outputDir exists before trying to create it

* write transforms first in dist file and then copy the file to outputDir

* ensure all umbraco types are external

* copy information from main package.json file
2023-03-21 11:41:06 +01:00
Nathan Woulfe
6b86f31c9e regenerate 2023-03-16 16:18:16 +10:00
Jacob Overgaard
8fd2bf910c build declarations for libraries 2023-03-07 15:31:56 +01:00
Jacob Overgaard
62f3c2d6fa Feature/server packages v2 (#574)
* new api models

* use new PackageResource

* do not error out on missing default exports (esmodules auto-execute)

* do not check for js extensions (they might have been registered on the client without a js file)

* prepend the api baseurl to any relataive server JS dependencies

* ignore tsbuildinfo

* create base file for tsconfig

* extend from base config and optimise include/exclude paths

* install rollup plugin to handle json files

* use plugin to bundle json files

* call script for cms builds that builds libs

* add rollup config to utils lib

* add a context token to the extension registry instance itself and provide it through BackofficeElement

* add rollup node resolve

* add node resolve

* only include element mixin in element library

* add error description to module load error

* add types to UmbExtensionRegistry token

* set UmbNotificationService as string in its token to avoid minification

* correct comment

* reverse order of checks

* add host to server extensions and support life-cycle check

* add imports

* use lit rather than lit-html

* correct comment

* add PackageManifestModel

* add import

* run libs build for cms

* revert reorder

* use string name for NotificationContext token

* make alias public readonly of UmbContextToken

* remove TODO

* use UmbContextToken::toString() for all stores

* use string alias for contexts

* move default data so we avoid importing a big lit library just to get default data interface

* add rollup to two extra libraries

* make sure we build uui and lit into our libraries for the few cases we import something

* add lockfile

* add separate options for .js files

* add function to install types of module

* add types output

* remove unused tsconfig-base file for now
2023-03-02 20:29:20 +01:00
Niels Lyngsø
17248aa94b Merge remote-tracking branch 'origin/main' into bugfix/document-router
# Conflicts:
#	src/backoffice/settings/languages/repository/language.repository.ts
#	src/backoffice/shared/components/input-language-picker/input-language-picker.element.ts
2023-03-02 11:54:40 +01:00
Lone Iversen
ce5f2d7182 Feature/installed and created packages (#545)
* multiple selection in modalhandler is ok?

* installed view updates

* created view updates

* workspace for package builder

* package builder

* all pickers in workspace

* use input-picker rather than property editor ui

* installed package view

* ui updates

* packageview

* update handlers

* update package views with migrations

* update backend api

* endpoints

* migration & language picker

* small update

* seperate migrations that doesnt belong to a packag

* rename NotificationContext

* filter out packages that have no name before they go in to the store

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2023-03-02 11:27:06 +01:00
Niels Lyngsø
77cce953c2 formatting 2023-03-01 11:41:11 +01:00
Jacob Overgaard
ad7f4b0833 Merge branch 'main' into feature/server-packages 2023-02-27 10:51:26 +01:00
Jacob Overgaard
6df66a0e72 fetch and store package migrations in store 2023-02-24 15:12:28 +01:00
Jacob Overgaard
e854e636ed new PackageMigrations repository 2023-02-24 15:12:20 +01:00
Niels Lyngsø
ebad04d56a update mock models 2023-02-21 15:26:19 +01:00
Niels Lyngsø
4222b001ec new generated models 2023-02-21 14:53:29 +01:00
Nathan Woulfe
3f0a4c43b5 Translations section - WIP (#390)
* initial poc for translations section

* umb-section-sidebar to top of stack,
only show content-app tabs when more than one exists

* delete old

* add empty translation

* adds tree actions

* save/delete
scaffold stories for dashboard and edit view

* uses generic node-save

* import path

* no border-bottom on last property editor

* add shared component for context menu layout
- set headline
- set footer and action buttons

* use umb-context-menu-layout

* hygiene

* fix icon in data mock

* remove logging

* add generic error logging to UmbDataStoreBase

* switch get to management api

* adds create button, filter input

* update store

* use store instead of directly calling resource
updates to manage changes for uniqueBehaviorSubject

* adds import action

* alert for debugging

* avoid mutating items when getting children
tidy up table generation
pass file rather than formdata

* revert table changes - handled in separate pr

* null check dictionary items

* update to use store context token
alt treatment for section with single dashboard

* fixes after merging - libs, store split

* fix store splits

* update model references

* merge main

* update api/models/services
update transation dashboard to get all languages, to map display names

* prepended input icon needs div rather than directly slotting

* post-merge cleanup, sort dashboard by default then name

* show all languages when editing

* native private, indent children in overview

* updates using true data source rather than mocks

* remove todo

* remove logging

* update with repository pattern

* icon

* cleanup actions - native private, unused imports

* more cleanup

* updates export handling

* update mocks/handlers

* add detail repo

* update setting translation value

* more repo improvements, improve editing

* more repo updates
base tree
entity actions

* fix table column headers

* unuse imports

* entity action for save

* use entity actions

* use setPropertyValue

* use tree store base
2023-02-14 14:25:21 +00:00
Niels Lyngsø
818bcb35bb Feature/document using content api (#513)
* out comment temprorary for development

* initial prep

* comment

* change port number for dev generate api

* generated new apis

* document-type repository

* rename to item

* rename to document

* use ItemType

* not name detail for full models

* correct token

* imports

* correct imports

* use DocumentTypeTreeItem

* mega type adapt commit

* move DataType import

* rename document detail store

* add document

* new mock data

* partialUpdateFrozenArray

* imports

* document context work

* document and document type in context

* data-type stores + data-sources

* byKey document + data-type

* remove type

* comment

* data-type repository

* data-type context adjustments

* data-type data observable

* fix model import

* use ContentTypeCompositionType

* correct mock data

* .

* split treedata / data

* correct mock endpoints

* new models

* update model usage

* correct models

* imports

* correct models

* update model imports

* update models

* update type

* update docuemnt models

* use DocumentModel

* DocumentModel

* import lit/decorators.js

* lint fixes

* remove console.logs

* new up router slot

* set hasChildren to false

* fix hos argument + add todo to revisit this code

* add todo

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2023-02-13 12:33:31 +00:00
Jacob Overgaard
47a5866abf generate new models with the "Model" suffix 2023-02-09 13:37:35 +01:00
Jacob Overgaard
9e2c9c15e0 add new api types 2023-01-27 15:56:32 +01:00
Jacob Overgaard
2e53a4cd8a generate new models 2023-01-25 12:56:29 +01:00
Jacob Overgaard
b4886f7c67 revert package setup (for now) 2023-01-24 08:38:24 +01:00
Jacob Overgaard
c0d30be4f0 Revert "integrate @umbraco-cms/element and @umbraco-cms/context-api due to circular dependencies"
This reverts commit e87439ff5f.
2023-01-24 08:30:18 +01:00
Jacob Overgaard
e87439ff5f integrate @umbraco-cms/element and @umbraco-cms/context-api due to circular dependencies 2023-01-23 16:24:42 +01:00
Jacob Overgaard
095337245e update module of package.json [skip ci] 2023-01-23 15:39:05 +01:00
Jacob Overgaard
4f53ab43ea add package and rollup to libs 2023-01-23 14:36:50 +01:00
Jacob Overgaard
ac9a406eb9 only include dist folder 2023-01-23 13:51:26 +01:00
Jacob Overgaard
0de2f9edde add initial library files to backend-api 2023-01-20 13:46:33 +01:00
Jacob Overgaard
316bfcb83e move backend-api to its own lib folder 2023-01-20 11:35:23 +01:00