Commit Graph

36 Commits

Author SHA1 Message Date
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
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
Mads Rasmussen
39ecc9fd32 Feature: Data Type Copy Action (#653)
* add copy data source

* add copy repo

* add copy logic to mock db

* add copy request interceptor

* add data type copy server data source

* add copy method to data type repo

* add data type copy entity action

* show copied notification

* update hasChildren flag

* use correct icon

* note

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2023-04-20 13:21:08 +00:00
Mads Rasmussen
7aaf208dc5 add logic to move data type 2023-04-18 21:14:31 +02:00
Mads Rasmussen
431cef5c44 data and error are optional 2023-04-18 13:31:07 +02:00
Mads Rasmussen
36607d9e1e rename methods to legacy to prevent naming clash 2023-04-18 13:30:54 +02:00
Mads Rasmussen
ba9676d92a temp updates to follow store interface 2023-04-17 17:12:26 +02:00
Mads Rasmussen
459df80680 add item repository 2023-04-17 16:18:55 +02:00
Mads Rasmussen
586a73bfd2 add item data source 2023-04-17 16:18:28 +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
Niels Lyngsø
debc94481c more changes 2023-04-04 14:03: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
Mads Rasmussen
424beea16e Feature: Create data type folders (1. round) (#630)
* update data type handlers

* call correct method on repo

* introduce base menu item element

* wip register create and delete entity actions for data types

* stop event

* add folder request interceptor

* remove todo

* create interface for folder data source

* create interface for folder repository

* open create dialog in data type create action

* wip create folder modal

* add token

* clean up data type repo

* add has children prop

* add create folder modal

* add folder to temp data

* update import

* implement delete folder action

* add method to update folder

* update detail data source interface to follow backend models

* lint fixes

* move import fixes

* make generic folder modal

* add correct request model

* add put interceptor

* fix import

* update data type notification headline
2023-03-31 13:41:14 +02:00
Mads Rasmussen
5291d64924 add interface for tree-item-context 2023-03-27 11:31:48 +02:00
Mads Rasmussen
af19b30feb default to any 2023-03-24 15:00:17 +01:00
Mads Rasmussen
eeef6fcf8c move data source interfaces into folder 2023-03-24 14:48:52 +01:00
Mads Rasmussen
6202ba9b68 rename data source file 2023-03-24 14:45:35 +01:00
Mads Rasmussen
54465d2c4a remove repository from data source + prefix with Umb 2023-03-24 14:41:17 +01:00
Mads Rasmussen
960a43f330 rename file 2023-03-24 14:17:05 +01:00
Mads Rasmussen
b7fb9511f1 remove repository from data source name + prefix with Umb 2023-03-24 14:15:51 +01:00
Mads Rasmussen
1eb15880d0 make tree data source interface generic 2023-03-24 14:04:20 +01:00
Mads Rasmussen
6ee46fcc6f update types in tree repository interface 2023-03-24 10:10:55 +01:00
Mads Rasmussen
0dcbd7b5e7 make tree data source a generic 2023-03-24 09:37:11 +01:00
Mads Rasmussen
3029b3d5f0 move data source response interface to the repository module 2023-03-21 13:45:35 +01: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
e7961af9d3 fixes model changes 2023-03-16 18:02:40 +10:00
Jacob Overgaard
b45768e9d6 add rollup.config.ts to model libs 2023-03-13 16:42:54 +01:00
Mads Rasmussen
1f35c4457a Feature: Languages repository (#527)
* wip migrate languages to repositories

* load language and subscribe to draft data

* add methods to update data

* rename file + use methods on context

* add crud methods to repo

* use new workspace action

* clean up

* register delete language entity action + language repository

* add dropdown element to supply styles to the uui popover element

* import dropdown element

* use requestItems in delete action instead of treeItems

* add method to language repo to request items

* add todo

* render entity actions in language table

* clean up table header

* add await to save action

* remove detail from method names

* let save action save or create

* remove save and delete from template workspace

* add isNew to workspace interface

* add isNew to template workspace

* clean up

* fix type errors

* add isNew to workspaces

* add isNew

* remove todo

* remove space

* abstract culture selection into its own component

* add correct event types

* don't show undefined in input

* fix wrong repository alias

* fix import order

* wip language picker

* add language picker modal layout

* handle fallback language change event

* set value for fallback language on language picker input

* remove unused

* add app language select

* don't set width on dropdown

* make scroll container full height

* adjust padding and add border

* temp move sidebar headings + set fixed height on language toggle

* set fixed body header height

* only show scroll bars if sidebar content is scrollable

* align height

* create full scaffold

* align handlers with end points

* align server data source with end points

* add todo

* remove culture warning

* set the culture to readonly on saved languages

* prevent having no default language + show message if changing the default language

* clean up + add caret

* add hover state

* set active state on active language

* make workspace isNew an observable

* update workspace contexts

* fix typescript errors
2023-02-23 21:01:04 +13: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
Mads Rasmussen
10728b6c81 move type fixes 2023-02-10 12:04:50 +01:00
Mads Rasmussen
666a3ccebd fixing types 2023-02-10 12:00:26 +01:00
Niels Lyngsø
95f4dded99 fixed document detail data source 2023-02-06 16:18:16 +01:00
Niels Lyngsø
3cf70a1b3c request asObservable() 2023-02-03 15:34:32 +01:00
Mads Rasmussen
be5d9f053e rename delete to trash + fix modal titles 2023-02-02 20:44:59 +01:00
Niels Lyngsø
6d58821245 refactor document to repository 2023-02-02 14:59:20 +01:00
Niels Lyngsø
8012e02c2d further implementation 2023-02-02 13:20:28 +01:00