spiderly 0.0.8 → 19.0.1
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/eslint.config.js +32 -0
- package/ng-package.json +10 -0
- package/package.json +55 -65
- package/src/lib/components/auth/login/login.component.html +25 -0
- package/src/lib/components/auth/login/login.component.ts +77 -0
- package/src/lib/components/auth/partials/auth.component.html +29 -0
- package/src/lib/components/auth/partials/auth.component.ts +60 -0
- package/src/lib/components/auth/partials/login-verification.component.html +2 -0
- package/src/lib/components/auth/partials/login-verification.component.ts +41 -0
- package/src/lib/components/auth/partials/registration-verification.component.html +1 -0
- package/src/lib/components/auth/partials/registration-verification.component.ts +41 -0
- package/src/lib/components/auth/partials/verification-wrapper.component.html +39 -0
- package/src/lib/components/auth/partials/verification-wrapper.component.ts +68 -0
- package/src/lib/components/auth/registration/registration.component.html +31 -0
- package/src/lib/components/auth/registration/registration.component.ts +77 -0
- package/src/lib/components/base-details/role-base-details.component.html +33 -0
- package/src/lib/components/base-details/role-base-details.component.ts +194 -0
- package/src/lib/components/base-form/base-form copy.ts +356 -0
- package/src/lib/components/card-skeleton/card-skeleton.component.html +8 -0
- package/src/lib/components/card-skeleton/card-skeleton.component.ts +21 -0
- package/src/lib/components/footer/app.footer.component.ts +17 -0
- package/src/lib/components/footer/footer.component.html +3 -0
- package/src/lib/components/footer/footer.component.ts +17 -0
- package/src/lib/components/index-card/index-card.component.html +15 -0
- package/src/lib/components/index-card/index-card.component.ts +48 -0
- package/src/lib/components/info-card/info-card.component.html +18 -0
- package/src/lib/components/info-card/info-card.component.ts +29 -0
- package/src/lib/components/layout/layout-base.component.ts +140 -0
- package/src/lib/components/layout/sidebar/menuitem.component.html +40 -0
- package/src/lib/components/layout/sidebar/menuitem.component.ts +179 -0
- package/src/lib/components/layout/sidebar/sidebar-menu.component.html +6 -0
- package/src/lib/components/layout/sidebar/sidebar-menu.component.ts +44 -0
- package/src/lib/components/layout/sidebar/sidebar-menu.service.ts +22 -0
- package/src/lib/components/layout/sidebar/sidebar.component.html +1 -0
- package/src/lib/components/layout/sidebar/sidebar.component.ts +20 -0
- package/src/lib/components/layout/topbar/topbar.component.html +64 -0
- package/src/lib/components/layout/topbar/topbar.component.ts +137 -0
- package/src/lib/components/not-found/not-found.component.html +27 -0
- package/src/lib/components/not-found/not-found.component.ts +22 -0
- package/src/lib/components/required/required.component.html +1 -0
- package/src/lib/components/required/required.component.ts +13 -0
- package/src/lib/components/spiderly-buttons/google-button/google-button.component.html +5 -0
- package/src/lib/components/spiderly-buttons/google-button/google-button.component.ts +53 -0
- package/src/lib/components/spiderly-buttons/return-button/return-button.component.html +3 -0
- package/src/lib/components/spiderly-buttons/return-button/return-button.component.ts +35 -0
- package/src/lib/components/spiderly-buttons/spiderly-button/spiderly-button.component.html +14 -0
- package/src/lib/components/spiderly-buttons/spiderly-button/spiderly-button.component.ts +27 -0
- package/src/lib/components/spiderly-buttons/spiderly-button-base/spiderly-button-base.ts +61 -0
- package/src/lib/components/spiderly-buttons/spiderly-split-button/spiderly-split-button.component.html +15 -0
- package/src/lib/components/spiderly-buttons/spiderly-split-button/spiderly-split-button.component.ts +24 -0
- package/src/lib/components/spiderly-data-table/spiderly-data-table.component.html +93 -0
- package/{styles → src/lib}/components/spiderly-data-table/spiderly-data-table.component.scss +15 -0
- package/src/lib/components/spiderly-data-table/spiderly-data-table.component.ts +614 -0
- package/src/lib/components/spiderly-delete-dialog/spiderly-delete-confirmation.component.html +17 -0
- package/src/lib/components/spiderly-delete-dialog/spiderly-delete-confirmation.component.ts +39 -0
- package/src/lib/components/spiderly-form-control/spiderly-form-control.ts +60 -0
- package/src/lib/components/spiderly-panels/panel-body/panel-body.component.html +8 -0
- package/src/lib/components/spiderly-panels/panel-body/panel-body.component.ts +16 -0
- package/src/lib/components/spiderly-panels/panel-footer/panel-footer.component.html +8 -0
- package/{styles → src/lib}/components/spiderly-panels/panel-footer/panel-footer.component.scss +3 -3
- package/src/lib/components/spiderly-panels/panel-footer/panel-footer.component.ts +15 -0
- package/src/lib/components/spiderly-panels/panel-header/panel-header.component.html +25 -0
- package/src/lib/components/spiderly-panels/panel-header/panel-header.component.ts +69 -0
- package/src/lib/components/spiderly-panels/spiderly-card/spiderly-card.component.html +7 -0
- package/src/lib/components/spiderly-panels/spiderly-card/spiderly-card.component.ts +17 -0
- package/src/lib/components/spiderly-panels/spiderly-panel/spiderly-panel.component.html +40 -0
- package/src/lib/components/spiderly-panels/spiderly-panel/spiderly-panel.component.scss +11 -0
- package/src/lib/components/spiderly-panels/spiderly-panel/spiderly-panel.component.ts +42 -0
- package/src/lib/components/spiderly-panels/spiderly-panels.module.ts +32 -0
- package/src/lib/controls/base-autocomplete-control.ts +17 -0
- package/src/lib/controls/base-control.ts +60 -0
- package/src/lib/controls/base-dropdown-control.ts +37 -0
- package/src/lib/controls/spiderly-autocomplete/spiderly-autocomplete.component.html +36 -0
- package/src/lib/controls/spiderly-autocomplete/spiderly-autocomplete.component.ts +56 -0
- package/src/lib/controls/spiderly-calendar/spiderly-calendar.component.html +21 -0
- package/src/lib/controls/spiderly-calendar/spiderly-calendar.component.ts +37 -0
- package/src/lib/controls/spiderly-checkbox/spiderly-checkbox.component.html +16 -0
- package/src/lib/controls/spiderly-checkbox/spiderly-checkbox.component.ts +38 -0
- package/src/lib/controls/spiderly-colorpick/spiderly-colorpick.component.html +33 -0
- package/src/lib/controls/spiderly-colorpick/spiderly-colorpick.component.ts +40 -0
- package/src/lib/controls/spiderly-controls.module.ts +61 -0
- package/src/lib/controls/spiderly-dropdown/spiderly-dropdown.component.html +27 -0
- package/src/lib/controls/spiderly-dropdown/spiderly-dropdown.component.ts +39 -0
- package/src/lib/controls/spiderly-editor/spiderly-editor.component.html +22 -0
- package/src/lib/controls/spiderly-editor/spiderly-editor.component.ts +58 -0
- package/src/lib/controls/spiderly-file/spiderly-file.component.html +54 -0
- package/src/lib/controls/spiderly-file/spiderly-file.component.ts +123 -0
- package/src/lib/controls/spiderly-multiautocomplete/spiderly-multiautocomplete.component.html +30 -0
- package/src/lib/controls/spiderly-multiautocomplete/spiderly-multiautocomplete.component.ts +38 -0
- package/src/lib/controls/spiderly-multiselect/spiderly-multiselect.component.html +23 -0
- package/src/lib/controls/spiderly-multiselect/spiderly-multiselect.component.ts +32 -0
- package/src/lib/controls/spiderly-number/spiderly-number.component.html +19 -0
- package/src/lib/controls/spiderly-number/spiderly-number.component.ts +37 -0
- package/src/lib/controls/spiderly-password/spiderly-password.component.html +17 -0
- package/src/lib/controls/spiderly-password/spiderly-password.component.ts +34 -0
- package/src/lib/controls/spiderly-textarea/spiderly-textarea.component.html +18 -0
- package/src/lib/controls/spiderly-textarea/spiderly-textarea.component.ts +32 -0
- package/src/lib/controls/spiderly-textbox/spiderly-textbox.component.html +23 -0
- package/src/lib/controls/spiderly-textbox/spiderly-textbox.component.ts +41 -0
- package/src/lib/entities/base-entity.ts +25 -0
- package/src/lib/entities/codebook.ts +23 -0
- package/src/lib/entities/init-company-auth-dialog-details.ts +22 -0
- package/src/lib/entities/init-top-bar-data.ts +35 -0
- package/src/lib/entities/is-authorized-for-save-event.ts +22 -0
- package/src/lib/entities/last-menu-icon-index-clicked.ts +18 -0
- package/src/lib/entities/lazy-load-selected-ids-result.ts +22 -0
- package/{lib/entities/menuchangeevent.d.ts → src/lib/entities/menuchangeevent.ts} +4 -4
- package/src/lib/entities/mime-type.ts +15 -0
- package/src/lib/entities/namebook.ts +22 -0
- package/src/lib/entities/primeng-option.ts +23 -0
- package/src/lib/entities/readonly-object.ts +1 -0
- package/src/lib/entities/security-entities.ts +548 -0
- package/src/lib/entities/simple-save-result.ts +19 -0
- package/src/lib/entities/spiderly-button.ts +30 -0
- package/{lib/entities/table-filter-context.d.ts → src/lib/entities/table-filter-context.ts} +6 -5
- package/src/lib/entities/table-filter-sort-meta.ts +5 -0
- package/{lib/entities/table-filter.d.ts → src/lib/entities/table-filter.ts} +48 -23
- package/src/lib/entities/table-response.ts +5 -0
- package/src/lib/enums/security-enums.ts +28 -0
- package/src/lib/enums/verification-type-codes.ts +5 -0
- package/src/lib/guards/auth.guard.ts +39 -0
- package/src/lib/guards/not-auth.guard.ts +32 -0
- package/src/lib/handlers/spiderly-error-handler.ts +32 -0
- package/src/lib/handlers/spiderly-transloco-fallback-strategy.ts +25 -0
- package/src/lib/interceptors/http-loading.interceptor.ts +21 -0
- package/src/lib/interceptors/json-parser.interceptor.ts +44 -0
- package/src/lib/interceptors/jwt.interceptor.ts +18 -0
- package/src/lib/interceptors/unauthorized.interceptor.ts +77 -0
- package/src/lib/modules/core.module.ts +22 -0
- package/src/lib/modules/primeng.module.ts +122 -0
- package/src/lib/modules/spiderly-transloco.module.ts +50 -0
- package/src/lib/services/api.service.security.ts +120 -0
- package/src/lib/services/app-initializer.ts +9 -0
- package/src/lib/services/app-layout-base.service.ts +184 -0
- package/src/lib/services/auth-base.service.ts +271 -0
- package/src/lib/services/base-form.service.ts +178 -0
- package/src/lib/services/config-base.service.ts +36 -0
- package/src/lib/services/helper-functions.ts +288 -0
- package/src/lib/services/spiderly-message.service.ts +66 -0
- package/src/lib/services/spiderly-transloco-loader.ts +15 -0
- package/src/lib/services/translate-labels-abstract.service.ts +13 -0
- package/src/lib/services/validator-abstract.service.ts +63 -0
- package/{styles → src/lib}/styles/layout/_config.scss +2 -2
- package/{styles → src/lib}/styles/layout/_content.scss +2 -0
- package/{styles → src/lib}/styles/layout/_footer.scss +2 -0
- package/{styles → src/lib}/styles/layout/_main.scss +6 -3
- package/{styles → src/lib}/styles/layout/_menu.scss +10 -7
- package/{styles → src/lib}/styles/layout/_mixins.scss +2 -2
- package/{styles → src/lib}/styles/layout/_preloading.scss +1 -1
- package/{styles → src/lib}/styles/layout/_responsive.scss +2 -0
- package/{styles → src/lib}/styles/layout/_spiderly-controls.scss +2 -0
- package/{styles → src/lib}/styles/layout/_topbar.scss +16 -11
- package/{styles → src/lib}/styles/layout/_typography.scss +1 -1
- package/{styles → src/lib}/styles/layout/_utils.scss +1 -1
- package/{styles → src/lib}/styles/layout/_variables.scss +59 -53
- package/src/lib/styles/layout/layout.scss +13 -0
- package/{styles → src/lib}/styles/shared.scss +70 -42
- package/src/lib/styles/styles.scss +3 -0
- package/{public-api.d.ts → src/public-api.ts} +103 -90
- package/tsconfig.lib.json +17 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +14 -0
- package/esm2022/lib/components/auth/auth.module.mjs +0 -65
- package/esm2022/lib/components/auth/login/login.component.mjs +0 -60
- package/esm2022/lib/components/auth/partials/auth.component.mjs +0 -53
- package/esm2022/lib/components/auth/partials/login-verification.component.mjs +0 -39
- package/esm2022/lib/components/auth/partials/registration-verification.component.mjs +0 -37
- package/esm2022/lib/components/auth/partials/verification-wrapper.component.mjs +0 -74
- package/esm2022/lib/components/auth/registration/registration.component.mjs +0 -59
- package/esm2022/lib/components/base-details/role-base-details.component.mjs +0 -171
- package/esm2022/lib/components/base-form/base-form copy.mjs +0 -247
- package/esm2022/lib/components/card-skeleton/card-skeleton.component.mjs +0 -25
- package/esm2022/lib/components/footer/footer.component.mjs +0 -16
- package/esm2022/lib/components/index-card/index-card.component.mjs +0 -57
- package/esm2022/lib/components/info-card/info-card.component.mjs +0 -29
- package/esm2022/lib/components/layout/layout-base.component.mjs +0 -121
- package/esm2022/lib/components/layout/sidebar/menuitem.component.mjs +0 -161
- package/esm2022/lib/components/layout/sidebar/sidebar-menu.component.mjs +0 -34
- package/esm2022/lib/components/layout/sidebar/sidebar-menu.service.mjs +0 -26
- package/esm2022/lib/components/layout/sidebar/sidebar.component.mjs +0 -21
- package/esm2022/lib/components/layout/topbar/topbar.component.mjs +0 -115
- package/esm2022/lib/components/not-found/not-found.component.mjs +0 -20
- package/esm2022/lib/components/required/required.component.mjs +0 -12
- package/esm2022/lib/components/spiderly-buttons/google-button/google-button.component.mjs +0 -43
- package/esm2022/lib/components/spiderly-buttons/return-button/return-button.component.mjs +0 -37
- package/esm2022/lib/components/spiderly-buttons/spiderly-button/spiderly-button.component.mjs +0 -20
- package/esm2022/lib/components/spiderly-buttons/spiderly-button-base/spiderly-button-base.mjs +0 -68
- package/esm2022/lib/components/spiderly-buttons/spiderly-split-button/spiderly-split-button.component.mjs +0 -22
- package/esm2022/lib/components/spiderly-data-table/spiderly-data-table.component.mjs +0 -501
- package/esm2022/lib/components/spiderly-delete-dialog/spiderly-delete-confirmation.component.mjs +0 -42
- package/esm2022/lib/components/spiderly-form-control/spiderly-form-control.mjs +0 -36
- package/esm2022/lib/components/spiderly-panels/panel-body/panel-body.component.mjs +0 -19
- package/esm2022/lib/components/spiderly-panels/panel-footer/panel-footer.component.mjs +0 -14
- package/esm2022/lib/components/spiderly-panels/panel-header/panel-header.component.mjs +0 -49
- package/esm2022/lib/components/spiderly-panels/spiderly-card/spiderly-card.component.mjs +0 -20
- package/esm2022/lib/components/spiderly-panels/spiderly-panel/spiderly-panel.component.mjs +0 -63
- package/esm2022/lib/components/spiderly-panels/spiderly-panels.module.mjs +0 -49
- package/esm2022/lib/controls/base-autocomplete-control.mjs +0 -18
- package/esm2022/lib/controls/base-control.mjs +0 -62
- package/esm2022/lib/controls/base-dropdown-control.mjs +0 -37
- package/esm2022/lib/controls/spiderly-autocomplete/spiderly-autocomplete.component.mjs +0 -60
- package/esm2022/lib/controls/spiderly-calendar/spiderly-calendar.component.mjs +0 -39
- package/esm2022/lib/controls/spiderly-checkbox/spiderly-checkbox.component.mjs +0 -45
- package/esm2022/lib/controls/spiderly-colorpick/spiderly-colorpick.component.mjs +0 -40
- package/esm2022/lib/controls/spiderly-controls.module.mjs +0 -112
- package/esm2022/lib/controls/spiderly-dropdown/spiderly-dropdown.component.mjs +0 -40
- package/esm2022/lib/controls/spiderly-editor/spiderly-editor.component.mjs +0 -59
- package/esm2022/lib/controls/spiderly-file/spiderly-file.component.mjs +0 -106
- package/esm2022/lib/controls/spiderly-multiautocomplete/spiderly-multiautocomplete.component.mjs +0 -38
- package/esm2022/lib/controls/spiderly-multiselect/spiderly-multiselect.component.mjs +0 -34
- package/esm2022/lib/controls/spiderly-number/spiderly-number.component.mjs +0 -44
- package/esm2022/lib/controls/spiderly-password/spiderly-password.component.mjs +0 -37
- package/esm2022/lib/controls/spiderly-textarea/spiderly-textarea.component.mjs +0 -34
- package/esm2022/lib/controls/spiderly-textbox/spiderly-textbox.component.mjs +0 -45
- package/esm2022/lib/entities/base-entity.mjs +0 -18
- package/esm2022/lib/entities/codebook.mjs +0 -10
- package/esm2022/lib/entities/init-company-auth-dialog-details.mjs +0 -9
- package/esm2022/lib/entities/init-top-bar-data.mjs +0 -12
- package/esm2022/lib/entities/is-authorized-for-save-event.mjs +0 -9
- package/esm2022/lib/entities/last-menu-icon-index-clicked.mjs +0 -8
- package/esm2022/lib/entities/lazy-load-selected-ids-result.mjs +0 -11
- package/esm2022/lib/entities/menuchangeevent.mjs +0 -3
- package/esm2022/lib/entities/mime-type.mjs +0 -15
- package/esm2022/lib/entities/namebook.mjs +0 -9
- package/esm2022/lib/entities/primeng-option.mjs +0 -9
- package/esm2022/lib/entities/security-entities.mjs +0 -169
- package/esm2022/lib/entities/simple-save-result.mjs +0 -9
- package/esm2022/lib/entities/spiderly-button.mjs +0 -11
- package/esm2022/lib/entities/table-filter-context.mjs +0 -3
- package/esm2022/lib/entities/table-filter-sort-meta.mjs +0 -3
- package/esm2022/lib/entities/table-filter.mjs +0 -15
- package/esm2022/lib/entities/table-response.mjs +0 -3
- package/esm2022/lib/enums/security-enums.mjs +0 -26
- package/esm2022/lib/enums/verification-type-codes.mjs +0 -6
- package/esm2022/lib/guards/auth.guard.mjs +0 -40
- package/esm2022/lib/guards/not-auth.guard.mjs +0 -32
- package/esm2022/lib/handlers/spiderly-error-handler.mjs +0 -30
- package/esm2022/lib/handlers/spiderly-transloco-fallback-strategy.mjs +0 -24
- package/esm2022/lib/interceptors/http-loading.interceptor.mjs +0 -27
- package/esm2022/lib/interceptors/json-parser.interceptor.mjs +0 -47
- package/esm2022/lib/interceptors/jwt.interceptor.mjs +0 -27
- package/esm2022/lib/interceptors/unauthorized.interceptor.mjs +0 -64
- package/esm2022/lib/modules/core.module.mjs +0 -140
- package/esm2022/lib/modules/primeng.module.mjs +0 -278
- package/esm2022/lib/modules/spiderly-transloco.module.mjs +0 -44
- package/esm2022/lib/services/api.service.security.mjs +0 -86
- package/esm2022/lib/services/app-initializer.mjs +0 -6
- package/esm2022/lib/services/app-layout-base.service.mjs +0 -132
- package/esm2022/lib/services/auth-base.service.mjs +0 -220
- package/esm2022/lib/services/base-form.service.mjs +0 -124
- package/esm2022/lib/services/config-base.service.mjs +0 -33
- package/esm2022/lib/services/helper-functions.mjs +0 -229
- package/esm2022/lib/services/spiderly-message.service.mjs +0 -64
- package/esm2022/lib/services/spiderly-transloco-loader.mjs +0 -20
- package/esm2022/lib/services/translate-labels-abstract.service.mjs +0 -15
- package/esm2022/lib/services/validator-abstract.service.mjs +0 -51
- package/esm2022/public-api.mjs +0 -94
- package/esm2022/spiderly.mjs +0 -5
- package/fesm2022/spiderly.mjs +0 -4807
- package/fesm2022/spiderly.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/components/auth/auth.module.d.ts +0 -17
- package/lib/components/auth/login/login.component.d.ts +0 -35
- package/lib/components/auth/partials/auth.component.d.ts +0 -21
- package/lib/components/auth/partials/login-verification.component.d.ts +0 -18
- package/lib/components/auth/partials/registration-verification.component.d.ts +0 -17
- package/lib/components/auth/partials/verification-wrapper.component.d.ts +0 -31
- package/lib/components/auth/registration/registration.component.d.ts +0 -34
- package/lib/components/base-details/role-base-details.component.d.ts +0 -50
- package/lib/components/base-form/base-form copy.d.ts +0 -54
- package/lib/components/card-skeleton/card-skeleton.component.d.ts +0 -12
- package/lib/components/footer/footer.component.d.ts +0 -9
- package/lib/components/index-card/index-card.component.d.ts +0 -22
- package/lib/components/info-card/info-card.component.d.ts +0 -11
- package/lib/components/layout/layout-base.component.d.ts +0 -37
- package/lib/components/layout/sidebar/menuitem.component.d.ts +0 -43
- package/lib/components/layout/sidebar/sidebar-menu.component.d.ts +0 -23
- package/lib/components/layout/sidebar/sidebar-menu.service.d.ts +0 -12
- package/lib/components/layout/sidebar/sidebar.component.d.ts +0 -11
- package/lib/components/layout/topbar/topbar.component.d.ts +0 -45
- package/lib/components/not-found/not-found.component.d.ts +0 -9
- package/lib/components/required/required.component.d.ts +0 -6
- package/lib/components/spiderly-buttons/google-button/google-button.component.d.ts +0 -17
- package/lib/components/spiderly-buttons/return-button/return-button.component.d.ts +0 -10
- package/lib/components/spiderly-buttons/spiderly-button/spiderly-button.component.d.ts +0 -6
- package/lib/components/spiderly-buttons/spiderly-button-base/spiderly-button-base.d.ts +0 -27
- package/lib/components/spiderly-buttons/spiderly-split-button/spiderly-split-button.component.d.ts +0 -8
- package/lib/components/spiderly-data-table/spiderly-data-table.component.d.ts +0 -157
- package/lib/components/spiderly-delete-dialog/spiderly-delete-confirmation.component.d.ts +0 -11
- package/lib/components/spiderly-form-control/spiderly-form-control.d.ts +0 -37
- package/lib/components/spiderly-panels/panel-body/panel-body.component.d.ts +0 -9
- package/lib/components/spiderly-panels/panel-footer/panel-footer.component.d.ts +0 -8
- package/lib/components/spiderly-panels/panel-header/panel-header.component.d.ts +0 -29
- package/lib/components/spiderly-panels/spiderly-card/spiderly-card.component.d.ts +0 -10
- package/lib/components/spiderly-panels/spiderly-panel/spiderly-panel.component.d.ts +0 -25
- package/lib/components/spiderly-panels/spiderly-panels.module.d.ts +0 -13
- package/lib/controls/base-autocomplete-control.d.ts +0 -9
- package/lib/controls/base-control.d.ts +0 -23
- package/lib/controls/base-dropdown-control.d.ts +0 -18
- package/lib/controls/spiderly-autocomplete/spiderly-autocomplete.component.d.ts +0 -18
- package/lib/controls/spiderly-calendar/spiderly-calendar.component.d.ts +0 -13
- package/lib/controls/spiderly-checkbox/spiderly-checkbox.component.d.ts +0 -14
- package/lib/controls/spiderly-colorpick/spiderly-colorpick.component.d.ts +0 -11
- package/lib/controls/spiderly-controls.module.d.ts +0 -22
- package/lib/controls/spiderly-dropdown/spiderly-dropdown.component.d.ts +0 -14
- package/lib/controls/spiderly-editor/spiderly-editor.component.d.ts +0 -16
- package/lib/controls/spiderly-file/spiderly-file.component.d.ts +0 -36
- package/lib/controls/spiderly-multiautocomplete/spiderly-multiautocomplete.component.d.ts +0 -13
- package/lib/controls/spiderly-multiselect/spiderly-multiselect.component.d.ts +0 -11
- package/lib/controls/spiderly-number/spiderly-number.component.d.ts +0 -15
- package/lib/controls/spiderly-password/spiderly-password.component.d.ts +0 -12
- package/lib/controls/spiderly-textarea/spiderly-textarea.component.d.ts +0 -11
- package/lib/controls/spiderly-textbox/spiderly-textbox.component.d.ts +0 -15
- package/lib/entities/base-entity.d.ts +0 -14
- package/lib/entities/codebook.d.ts +0 -9
- package/lib/entities/init-company-auth-dialog-details.d.ts +0 -9
- package/lib/entities/init-top-bar-data.d.ts +0 -16
- package/lib/entities/is-authorized-for-save-event.d.ts +0 -9
- package/lib/entities/last-menu-icon-index-clicked.d.ts +0 -7
- package/lib/entities/lazy-load-selected-ids-result.d.ts +0 -9
- package/lib/entities/mime-type.d.ts +0 -11
- package/lib/entities/namebook.d.ts +0 -9
- package/lib/entities/primeng-option.d.ts +0 -9
- package/lib/entities/security-entities.d.ts +0 -211
- package/lib/entities/simple-save-result.d.ts +0 -7
- package/lib/entities/spiderly-button.d.ts +0 -13
- package/lib/entities/table-filter-sort-meta.d.ts +0 -4
- package/lib/entities/table-response.d.ts +0 -4
- package/lib/enums/security-enums.d.ts +0 -22
- package/lib/enums/verification-type-codes.d.ts +0 -4
- package/lib/guards/auth.guard.d.ts +0 -15
- package/lib/guards/not-auth.guard.d.ts +0 -12
- package/lib/handlers/spiderly-error-handler.d.ts +0 -14
- package/lib/handlers/spiderly-transloco-fallback-strategy.d.ts +0 -13
- package/lib/interceptors/http-loading.interceptor.d.ts +0 -11
- package/lib/interceptors/json-parser.interceptor.d.ts +0 -11
- package/lib/interceptors/jwt.interceptor.d.ts +0 -11
- package/lib/interceptors/unauthorized.interceptor.d.ts +0 -16
- package/lib/modules/core.module.d.ts +0 -13
- package/lib/modules/primeng.module.d.ts +0 -42
- package/lib/modules/spiderly-transloco.module.d.ts +0 -9
- package/lib/services/api.service.security.d.ts +0 -35
- package/lib/services/app-initializer.d.ts +0 -4
- package/lib/services/app-layout-base.service.d.ts +0 -60
- package/lib/services/auth-base.service.d.ts +0 -55
- package/lib/services/base-form.service.d.ts +0 -27
- package/lib/services/config-base.service.d.ts +0 -24
- package/lib/services/helper-functions.d.ts +0 -37
- package/lib/services/spiderly-message.service.d.ts +0 -17
- package/lib/services/spiderly-transloco-loader.d.ts +0 -10
- package/lib/services/translate-labels-abstract.service.d.ts +0 -7
- package/lib/services/validator-abstract.service.d.ts +0 -13
- package/styles/styles/layout/layout.scss +0 -13
- package/styles/styles/styles.scss +0 -6
- package/styles/styles/theme/base/_colors.scss +0 -18
- package/styles/styles/theme/base/_common.scss +0 -75
- package/styles/styles/theme/base/_components.scss +0 -106
- package/styles/styles/theme/base/_mixins.scss +0 -343
- package/styles/styles/theme/base/components/button/_button.scss +0 -564
- package/styles/styles/theme/base/components/button/_speeddial.scss +0 -96
- package/styles/styles/theme/base/components/button/_splitbutton.scss +0 -381
- package/styles/styles/theme/base/components/data/_carousel.scss +0 -37
- package/styles/styles/theme/base/components/data/_datatable.scss +0 -338
- package/styles/styles/theme/base/components/data/_dataview.scss +0 -55
- package/styles/styles/theme/base/components/data/_filter.scss +0 -138
- package/styles/styles/theme/base/components/data/_orderlist.scss +0 -103
- package/styles/styles/theme/base/components/data/_organizationchart.scss +0 -50
- package/styles/styles/theme/base/components/data/_paginator.scss +0 -92
- package/styles/styles/theme/base/components/data/_picklist.scss +0 -103
- package/styles/styles/theme/base/components/data/_timeline.scss +0 -81
- package/styles/styles/theme/base/components/data/_tree.scss +0 -149
- package/styles/styles/theme/base/components/data/_treetable.scss +0 -256
- package/styles/styles/theme/base/components/data/_virtualscroller.scss +0 -28
- package/styles/styles/theme/base/components/file/_fileupload.scss +0 -64
- package/styles/styles/theme/base/components/input/_autocomplete.scss +0 -118
- package/styles/styles/theme/base/components/input/_calendar.scss +0 -263
- package/styles/styles/theme/base/components/input/_cascadeselect.scss +0 -130
- package/styles/styles/theme/base/components/input/_checkbox.scss +0 -90
- package/styles/styles/theme/base/components/input/_chips.scss +0 -55
- package/styles/styles/theme/base/components/input/_colorpicker.scss +0 -26
- package/styles/styles/theme/base/components/input/_dropdown.scss +0 -152
- package/styles/styles/theme/base/components/input/_editor.scss +0 -122
- package/styles/styles/theme/base/components/input/_inputgroup.scss +0 -75
- package/styles/styles/theme/base/components/input/_inputmask.scss +0 -16
- package/styles/styles/theme/base/components/input/_inputnumber.scss +0 -28
- package/styles/styles/theme/base/components/input/_inputswitch.scss +0 -60
- package/styles/styles/theme/base/components/input/_inputtext.scss +0 -100
- package/styles/styles/theme/base/components/input/_listbox.scss +0 -82
- package/styles/styles/theme/base/components/input/_multiselect.scss +0 -173
- package/styles/styles/theme/base/components/input/_password.scss +0 -52
- package/styles/styles/theme/base/components/input/_radiobutton.scss +0 -78
- package/styles/styles/theme/base/components/input/_rating.scss +0 -55
- package/styles/styles/theme/base/components/input/_selectbutton.scss +0 -50
- package/styles/styles/theme/base/components/input/_slider.scss +0 -71
- package/styles/styles/theme/base/components/input/_togglebutton.scss +0 -48
- package/styles/styles/theme/base/components/input/_treeselect.scss +0 -139
- package/styles/styles/theme/base/components/menu/_breadcrumb.scss +0 -42
- package/styles/styles/theme/base/components/menu/_contextmenu.scss +0 -39
- package/styles/styles/theme/base/components/menu/_dock.scss +0 -95
- package/styles/styles/theme/base/components/menu/_megamenu.scss +0 -55
- package/styles/styles/theme/base/components/menu/_menu.scss +0 -37
- package/styles/styles/theme/base/components/menu/_menubar.scss +0 -141
- package/styles/styles/theme/base/components/menu/_panelmenu.scss +0 -153
- package/styles/styles/theme/base/components/menu/_slidemenu.scss +0 -59
- package/styles/styles/theme/base/components/menu/_steps.scss +0 -56
- package/styles/styles/theme/base/components/menu/_tabmenu.scss +0 -74
- package/styles/styles/theme/base/components/menu/_tieredmenu.scss +0 -43
- package/styles/styles/theme/base/components/messages/_inlinemessage.scss +0 -69
- package/styles/styles/theme/base/components/messages/_message.scss +0 -107
- package/styles/styles/theme/base/components/messages/_toast.scss +0 -103
- package/styles/styles/theme/base/components/misc/_avatar.scss +0 -30
- package/styles/styles/theme/base/components/misc/_badge.scss +0 -48
- package/styles/styles/theme/base/components/misc/_blockui.scss +0 -0
- package/styles/styles/theme/base/components/misc/_chip.scss +0 -42
- package/styles/styles/theme/base/components/misc/_inplace.scss +0 -17
- package/styles/styles/theme/base/components/misc/_progressbar.scss +0 -17
- package/styles/styles/theme/base/components/misc/_scrolltop.scss +0 -25
- package/styles/styles/theme/base/components/misc/_skeleton.scss +0 -8
- package/styles/styles/theme/base/components/misc/_tag.scss +0 -40
- package/styles/styles/theme/base/components/misc/_terminal.scss +0 -12
- package/styles/styles/theme/base/components/multimedia/_galleria.scss +0 -155
- package/styles/styles/theme/base/components/multimedia/_image.scss +0 -49
- package/styles/styles/theme/base/components/overlay/_confirmpopup.scss +0 -72
- package/styles/styles/theme/base/components/overlay/_dialog.scss +0 -73
- package/styles/styles/theme/base/components/overlay/_overlaypanel.scss +0 -64
- package/styles/styles/theme/base/components/overlay/_sidebar.scss +0 -27
- package/styles/styles/theme/base/components/overlay/_tooltip.scss +0 -33
- package/styles/styles/theme/base/components/panel/_accordion.scss +0 -119
- package/styles/styles/theme/base/components/panel/_card.scss +0 -30
- package/styles/styles/theme/base/components/panel/_divider.scss +0 -31
- package/styles/styles/theme/base/components/panel/_fieldset.scss +0 -47
- package/styles/styles/theme/base/components/panel/_panel.scss +0 -58
- package/styles/styles/theme/base/components/panel/_scrollpanel.scss +0 -6
- package/styles/styles/theme/base/components/panel/_splitter.scss +0 -19
- package/styles/styles/theme/base/components/panel/_tabview.scss +0 -82
- package/styles/styles/theme/base/components/panel/_toolbar.scss +0 -11
- package/styles/styles/theme/saga/_extensions.scss +0 -27
- package/styles/styles/theme/saga/_variables.scss +0 -1
- package/styles/styles/theme/saga/saga-blue/_extensions.scss +0 -2
- package/styles/styles/theme/saga/saga-blue/_fonts.scss +0 -1
- package/styles/styles/theme/saga/saga-blue/_variables.scss +0 -1
- package/styles/styles/theme/saga/saga-blue/theme.scss +0 -4
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { Action, Column } from "../components/spiderly-data-table/spiderly-data-table.component";
|
|
2
|
+
import { HttpResponse } from "@angular/common/http";
|
|
3
|
+
import { BaseEntity } from "../entities/base-entity";
|
|
4
|
+
import { SpiderlyFormGroup } from "../components/spiderly-form-control/spiderly-form-control";
|
|
5
|
+
import { map, Observable } from 'rxjs';
|
|
6
|
+
import * as FileSaver from 'file-saver';
|
|
7
|
+
import { TableFilter } from "../entities/table-filter";
|
|
8
|
+
import { Namebook } from "../entities/namebook";
|
|
9
|
+
import { Codebook } from "../entities/codebook";
|
|
10
|
+
import { PrimengOption } from "../entities/primeng-option";
|
|
11
|
+
import { SpiderlyTab } from "../components/spiderly-panels/panel-header/panel-header.component";
|
|
12
|
+
|
|
13
|
+
// Helper function for PrecisionScale validation (to be added in the TypeScript output):
|
|
14
|
+
export function validatePrecisionScale(value: any, precision: number, scale: number, ignoreTrailingZeros: boolean): boolean {
|
|
15
|
+
if (typeof value !== 'number') return false;
|
|
16
|
+
const [integerPart, decimalPart] = value.toString().split('.');
|
|
17
|
+
if (integerPart.length > precision - scale) return false;
|
|
18
|
+
if (decimalPart && decimalPart.length > scale) return false;
|
|
19
|
+
if (!ignoreTrailingZeros && decimalPart && decimalPart.replace(/0+$/, '').length > scale) return false;
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function getMimeTypeForFileName(fileName: string): string {
|
|
24
|
+
const mimeTypes: { [key: string]: string } = {
|
|
25
|
+
'.jpg': 'image/jpeg',
|
|
26
|
+
'.jpeg': 'image/jpeg',
|
|
27
|
+
'.png': 'image/png',
|
|
28
|
+
'.webp': 'image/webp',
|
|
29
|
+
'.gif': 'image/gif',
|
|
30
|
+
'.pdf': 'application/pdf',
|
|
31
|
+
'.txt': 'text/plain',
|
|
32
|
+
'.html': 'text/html',
|
|
33
|
+
'.css': 'text/css',
|
|
34
|
+
'.js': 'application/javascript',
|
|
35
|
+
'.json': 'application/json',
|
|
36
|
+
'.csv': 'text/csv',
|
|
37
|
+
'.xml': 'application/xml',
|
|
38
|
+
'.zip': 'application/zip',
|
|
39
|
+
'.mp4': 'video/mp4',
|
|
40
|
+
'.mp3': 'audio/mpeg',
|
|
41
|
+
'.wav': 'audio/wav',
|
|
42
|
+
'.avi': 'video/x-msvideo',
|
|
43
|
+
'.doc': 'application/msword',
|
|
44
|
+
'.docx': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
45
|
+
'.xls': 'application/vnd.ms-excel',
|
|
46
|
+
'.xlsx': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
|
47
|
+
// Add more as needed
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const extension = fileName.substring(fileName.lastIndexOf('.')).toLowerCase();
|
|
51
|
+
return mimeTypes[extension] || 'application/octet-stream'; // 'application/octet-stream' is a generic binary type
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function adjustColor(color: string, percent: number): string {
|
|
55
|
+
if (!/^#([0-9A-F]{3}){1,2}$/i.test(color)) {
|
|
56
|
+
console.error('Invalid hex color format');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
let r: number, g: number, b: number;
|
|
60
|
+
if (color.length === 7) {
|
|
61
|
+
r = parseInt(color.slice(1, 3), 16);
|
|
62
|
+
g = parseInt(color.slice(3, 5), 16);
|
|
63
|
+
b = parseInt(color.slice(5, 7), 16);
|
|
64
|
+
} else {
|
|
65
|
+
r = parseInt(color[1] + color[1], 16);
|
|
66
|
+
g = parseInt(color[2] + color[2], 16);
|
|
67
|
+
b = parseInt(color[3] + color[3], 16);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const adjust = (value: number, percent: number): number => {
|
|
71
|
+
const amount = (percent / 100) * 255;
|
|
72
|
+
const newValue = Math.min(Math.max(value + amount, 0), 255);
|
|
73
|
+
return Math.round(newValue);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
r = adjust(r, percent);
|
|
77
|
+
g = adjust(g, percent);
|
|
78
|
+
b = adjust(b, percent);
|
|
79
|
+
|
|
80
|
+
const toHex = (value: number): string => {
|
|
81
|
+
const hex = value.toString(16).padStart(2, '0');
|
|
82
|
+
return hex;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function getHtmlImgDisplayString64(base64String: string){
|
|
89
|
+
if (base64String == null)
|
|
90
|
+
return null;
|
|
91
|
+
|
|
92
|
+
const [header, base64Content] = base64String.split(';base64,');
|
|
93
|
+
const fileName = header.split('=')[1];
|
|
94
|
+
const mimeType = getMimeTypeForFileName(fileName);
|
|
95
|
+
return `data:${mimeType};base64, ${base64Content}`;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function nameof<TObject>(obj: TObject, key: keyof TObject): string;
|
|
99
|
+
export function nameof<TObject>(key: keyof TObject): string;
|
|
100
|
+
export function nameof(key1: any, key2?: any): any {
|
|
101
|
+
return key2 ?? key1;
|
|
102
|
+
}
|
|
103
|
+
export function nameOf<TObject extends {name:S}, S extends string>(funcOrClass: TObject): S {
|
|
104
|
+
return funcOrClass.name;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function getParentUrl(currentUrl: string){
|
|
108
|
+
const urlSegments = currentUrl.split('/');
|
|
109
|
+
urlSegments.pop();
|
|
110
|
+
const parentUrl = urlSegments.join('/');
|
|
111
|
+
return parentUrl;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function capitalizeFirstLetter(inputString: string): string {
|
|
115
|
+
return inputString.charAt(0).toUpperCase() + inputString.slice(1);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// export function getMonth(number: number): string {
|
|
119
|
+
// const months: string[] = [
|
|
120
|
+
// "January", "February", "March", "April", "May", "June",
|
|
121
|
+
// "July", "August", "September", "October", "November", "December"
|
|
122
|
+
// ];
|
|
123
|
+
|
|
124
|
+
// if (number < 1 || number > 12) {
|
|
125
|
+
// throw new Error("Invalid month number. It should be between 1 and 12.");
|
|
126
|
+
// }
|
|
127
|
+
|
|
128
|
+
// return months[number - 1];
|
|
129
|
+
// }
|
|
130
|
+
|
|
131
|
+
export function getMonth(numberOfTheMonth: number): string {
|
|
132
|
+
const meseci: string[] = [
|
|
133
|
+
"Januar", "Februar", "Mart", "April", "Maj", "Jun",
|
|
134
|
+
"Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"
|
|
135
|
+
];
|
|
136
|
+
|
|
137
|
+
if (numberOfTheMonth < 1 || numberOfTheMonth > 12) {
|
|
138
|
+
console.error("Nevažeći broj meseca. Broj treba biti između 1 i 12.");
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return meseci[numberOfTheMonth - 1];
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export function singleOrDefault <T>(array: T[], predicate: (item: T) => boolean): T | undefined {
|
|
145
|
+
const filtered = array.filter(predicate);
|
|
146
|
+
if (filtered.length > 1) {
|
|
147
|
+
throw new Error("Sequence contains more than one matching element.");
|
|
148
|
+
}
|
|
149
|
+
return filtered[0];
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
export function pushAction(cols: Column[], action: Action){
|
|
153
|
+
const actionsColumn = singleOrDefault(cols, x => x.actions != null);
|
|
154
|
+
if (actionsColumn) {
|
|
155
|
+
actionsColumn.actions = [...actionsColumn.actions, action];
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export function deleteAction(cols: Column[], actionField: string): void {
|
|
160
|
+
const actionsColumn = singleOrDefault(cols, x => x.actions != null);
|
|
161
|
+
|
|
162
|
+
if (actionsColumn && actionsColumn.actions) {
|
|
163
|
+
const index = actionsColumn.actions.findIndex(a => a.field === actionField);
|
|
164
|
+
if (index !== -1) {
|
|
165
|
+
actionsColumn.actions.splice(index, 1);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export function getFileNameFromContentDisposition(
|
|
171
|
+
resp: HttpResponse<Blob>,
|
|
172
|
+
defaultName: string
|
|
173
|
+
): string {
|
|
174
|
+
let fileName;
|
|
175
|
+
if (resp && resp.headers && resp.headers.get('Content-Disposition')) {
|
|
176
|
+
let val = resp.headers.get('Content-Disposition');
|
|
177
|
+
let start = val.indexOf('filename=');
|
|
178
|
+
if (start != -1) {
|
|
179
|
+
let end = val.indexOf(';', start);
|
|
180
|
+
fileName =
|
|
181
|
+
end != -1 ? val.substring(start + 9, end) : val.substring(start + 9);
|
|
182
|
+
fileName = fileName.split('"').join('');
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return fileName ?? defaultName;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export const getControl = <T extends BaseEntity>(formControlName: string & keyof T, formGroup: SpiderlyFormGroup<T>) => {
|
|
189
|
+
if (formGroup == null)
|
|
190
|
+
return null; // FT: When we initialized form group again this will happen
|
|
191
|
+
|
|
192
|
+
if(formGroup.controlNamesFromHtml.findIndex(x => x === formControlName) === -1)
|
|
193
|
+
formGroup.controlNamesFromHtml.push(formControlName);
|
|
194
|
+
|
|
195
|
+
let formControl = formGroup.controls[formControlName];
|
|
196
|
+
if (formControl == null) {
|
|
197
|
+
console.error(`FT: The property ${formControlName} in the form group ${formGroup.getRawValue().typeName} doesn't exist`);
|
|
198
|
+
return null;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return formControl;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export function toCommaSeparatedString<T>(input: T[]): string {
|
|
205
|
+
const stringList = input.map(item => (item?.toString() ?? ''));
|
|
206
|
+
|
|
207
|
+
if (stringList.length > 1) {
|
|
208
|
+
return `${stringList.slice(0, -1).join(', ')} and ${stringList[stringList.length - 1]}`;
|
|
209
|
+
} else {
|
|
210
|
+
return stringList[0] ?? '';
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export function isImageFileType(mimeType: string): boolean {
|
|
215
|
+
if (mimeType.startsWith('image/')) {
|
|
216
|
+
return true;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
return false;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export function isExcelFileType(mimeType: string): boolean {
|
|
223
|
+
if (mimeType === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' ||
|
|
224
|
+
mimeType === 'application/vnd.ms-excel'
|
|
225
|
+
) {
|
|
226
|
+
return true;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
return false;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export function exportListToExcel(exportTableDataToExcelObservableMethod: (tableFilter: TableFilter) => Observable<any>, tableFilter: TableFilter) {
|
|
233
|
+
exportTableDataToExcelObservableMethod(tableFilter).subscribe(res => {
|
|
234
|
+
let fileName = getFileNameFromContentDisposition(res, "ExcelExport.xlsx");
|
|
235
|
+
FileSaver.saveAs(res.body, decodeURIComponent(fileName));
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export function getPrimengDropdownNamebookOptions(getDropdownListObservable: (parentEntityId?: number) => Observable<Namebook[]>, parentEntityId?: number): Observable<PrimengOption[]>{
|
|
240
|
+
return getDropdownListObservable(parentEntityId ?? 0).pipe(
|
|
241
|
+
map(res => {
|
|
242
|
+
return res.map(x => ({ label: x.displayName, code: x.id }));
|
|
243
|
+
})
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export function getPrimengDropdownCodebookOptions(getDropdownListObservable: () => Observable<Codebook[]>): Observable<PrimengOption[]>{
|
|
248
|
+
return getDropdownListObservable().pipe(
|
|
249
|
+
map(res => {
|
|
250
|
+
return res.map(x => ({ label: x.displayName, code: x.code }));
|
|
251
|
+
})
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export function getPrimengAutocompleteNamebookOptions(getAutocompleteListObservable: (limit: number, query: string, parentEntityId?: number) => Observable<Namebook[]>, limit: number, query: string, parentEntityId?: number): Observable<PrimengOption[]>{
|
|
256
|
+
return getAutocompleteListObservable(limit, query, parentEntityId ?? 0).pipe(
|
|
257
|
+
map(res => {
|
|
258
|
+
return res.map(x => ({ label: x.displayName, code: x.id }));
|
|
259
|
+
})
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export function getPrimengAutocompleteCodebookOptions(getAutocompleteListObservable: (limit: number, query: string) => Observable<Codebook[]>, limit: number, query: string): Observable<PrimengOption[]>{
|
|
264
|
+
return getAutocompleteListObservable(limit, query).pipe(
|
|
265
|
+
map(res => {
|
|
266
|
+
return res.map(x => ({ label: x.displayName, code: x.code }));
|
|
267
|
+
})
|
|
268
|
+
);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export const isNullOrEmpty = (input: string) => {
|
|
272
|
+
if(input == null || input === ''){
|
|
273
|
+
return true;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
return false;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export const selectedTab = (tabs: SpiderlyTab[]): number => {
|
|
280
|
+
const tab = singleOrDefault(tabs, x => x.isSelected);
|
|
281
|
+
|
|
282
|
+
if (tab) {
|
|
283
|
+
return tab.id;
|
|
284
|
+
}
|
|
285
|
+
else{
|
|
286
|
+
return null;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { TranslocoService } from '@jsverse/transloco';
|
|
2
|
+
import { Injectable, NgZone } from '@angular/core';
|
|
3
|
+
import { MessageService } from 'primeng/api';
|
|
4
|
+
|
|
5
|
+
@Injectable({
|
|
6
|
+
providedIn: 'root',
|
|
7
|
+
})
|
|
8
|
+
export class SpiderlyMessageService { // TODO FT: nece da prikaze poruku ako je neki angular error koji se dogodi tek nakon api poziva
|
|
9
|
+
constructor(
|
|
10
|
+
private messageService: MessageService,
|
|
11
|
+
private translocoService: TranslocoService,
|
|
12
|
+
private ngZone: NgZone
|
|
13
|
+
) {
|
|
14
|
+
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
successMessage(detail: string, title: string = this.translocoService.translate('SuccessfulAction')) {
|
|
18
|
+
this.messageService.add({
|
|
19
|
+
severity: 'success',
|
|
20
|
+
summary: title,
|
|
21
|
+
detail: detail,
|
|
22
|
+
life: 10000,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
warningMessage(detail: string, title?: string, sticky?: boolean){
|
|
27
|
+
this.messageService.add({
|
|
28
|
+
severity: 'warn',
|
|
29
|
+
summary: title ?? this.translocoService.translate('Warning'),
|
|
30
|
+
detail: detail,
|
|
31
|
+
life: 10000,
|
|
32
|
+
sticky: sticky
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
warningMessageWithTimeout(detail: string, title: string = this.translocoService.translate('Warning')){
|
|
37
|
+
setTimeout(() => {
|
|
38
|
+
this.messageService.add({
|
|
39
|
+
severity: 'warn',
|
|
40
|
+
summary: title,
|
|
41
|
+
detail: detail,
|
|
42
|
+
life: 10000,
|
|
43
|
+
});
|
|
44
|
+
}, 100);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
errorMessage(detail: string, title: string = this.translocoService.translate('Error')){
|
|
48
|
+
this.messageService.add({
|
|
49
|
+
severity: 'error',
|
|
50
|
+
summary: title,
|
|
51
|
+
detail: detail,
|
|
52
|
+
life: 10000,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
infoMessage(detail: string, title?: string, sticky?: boolean){
|
|
57
|
+
this.messageService.add({
|
|
58
|
+
severity: 'info',
|
|
59
|
+
summary: title ?? this.translocoService.translate('Info'),
|
|
60
|
+
detail: detail,
|
|
61
|
+
life: 10000,
|
|
62
|
+
sticky: sticky,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { TranslocoLoader } from '@jsverse/transloco';
|
|
3
|
+
import { HttpClient } from '@angular/common/http';
|
|
4
|
+
|
|
5
|
+
@Injectable({
|
|
6
|
+
providedIn: 'root'
|
|
7
|
+
})
|
|
8
|
+
export class SpiderlyTranslocoLoader implements TranslocoLoader {
|
|
9
|
+
constructor(private http: HttpClient) {}
|
|
10
|
+
|
|
11
|
+
getTranslation(lang: string) {
|
|
12
|
+
return this.http.get(`./assets/i18n/${lang}.json`);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { TranslocoService } from '@jsverse/transloco';
|
|
2
|
+
import { Injectable } from "@angular/core";
|
|
3
|
+
import { SpiderlyFormArray, SpiderlyFormControl, SpiderlyValidatorFn } from "../components/spiderly-form-control/spiderly-form-control";
|
|
4
|
+
import { ValidationErrors } from "@angular/forms";
|
|
5
|
+
|
|
6
|
+
@Injectable({
|
|
7
|
+
providedIn: 'root',
|
|
8
|
+
})
|
|
9
|
+
export abstract class ValidatorAbstractService {
|
|
10
|
+
|
|
11
|
+
constructor(
|
|
12
|
+
protected translocoService: TranslocoService
|
|
13
|
+
) {
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
abstract setValidator (formControl: SpiderlyFormControl, className: string): SpiderlyValidatorFn;
|
|
17
|
+
|
|
18
|
+
isArrayEmpty = (control: SpiderlyFormControl): SpiderlyValidatorFn => {
|
|
19
|
+
const validator: SpiderlyValidatorFn = (): ValidationErrors | null => {
|
|
20
|
+
const value = control.value;
|
|
21
|
+
|
|
22
|
+
const notEmptyRule = typeof value !== 'undefined' && value !== null && value.length !== 0;
|
|
23
|
+
|
|
24
|
+
const arrayValid = notEmptyRule;
|
|
25
|
+
|
|
26
|
+
return arrayValid ? null : { _ : this.translocoService.translate('NotEmpty')};
|
|
27
|
+
};
|
|
28
|
+
validator.hasNotEmptyRule = true;
|
|
29
|
+
control.required = true;
|
|
30
|
+
return validator;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
notEmpty = (control: SpiderlyFormControl): void => {
|
|
34
|
+
const validator: SpiderlyValidatorFn = (): ValidationErrors | null => {
|
|
35
|
+
const value = control.value;
|
|
36
|
+
|
|
37
|
+
const notEmptyRule = typeof value !== 'undefined' && value !== null && value !== '';
|
|
38
|
+
|
|
39
|
+
const arrayValid = notEmptyRule;
|
|
40
|
+
|
|
41
|
+
return arrayValid ? null : { _ : this.translocoService.translate('NotEmpty')};
|
|
42
|
+
};
|
|
43
|
+
validator.hasNotEmptyRule = true;
|
|
44
|
+
control.required = true;
|
|
45
|
+
control.validator = validator;
|
|
46
|
+
control.updateValueAndValidity();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
isFormArrayEmpty = (control: SpiderlyFormArray): SpiderlyValidatorFn => {
|
|
50
|
+
const validator: SpiderlyValidatorFn = (): ValidationErrors | null => {
|
|
51
|
+
const value = control;
|
|
52
|
+
|
|
53
|
+
const notEmptyRule = typeof value !== 'undefined' && value !== null && value.length !== 0;
|
|
54
|
+
|
|
55
|
+
const arrayValid = notEmptyRule;
|
|
56
|
+
|
|
57
|
+
return arrayValid ? null : { _ : this.translocoService.translate('NotEmpty')};
|
|
58
|
+
};
|
|
59
|
+
validator.hasNotEmptyRule = true;
|
|
60
|
+
control.required = true;
|
|
61
|
+
return validator;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use './_variables' as *;
|
|
2
|
+
|
|
1
3
|
* {
|
|
2
4
|
box-sizing: border-box;
|
|
3
5
|
}
|
|
@@ -5,12 +7,13 @@
|
|
|
5
7
|
html {
|
|
6
8
|
height: 100%;
|
|
7
9
|
font-size: $scale;
|
|
10
|
+
scroll-behavior: smooth;
|
|
8
11
|
}
|
|
9
12
|
|
|
10
13
|
body {
|
|
11
14
|
font-family: var(--font-family);
|
|
12
|
-
color: var(--text-color);
|
|
13
|
-
background-color: var(--surface-
|
|
15
|
+
color: var(--p-text-color);
|
|
16
|
+
background-color: var(--p-surface-50);
|
|
14
17
|
margin: 0;
|
|
15
18
|
padding: 0;
|
|
16
19
|
min-height: 100%;
|
|
@@ -20,7 +23,7 @@ body {
|
|
|
20
23
|
|
|
21
24
|
a {
|
|
22
25
|
text-decoration: none;
|
|
23
|
-
color: var(--primary-color);
|
|
26
|
+
color: var(--p-primary-color);
|
|
24
27
|
}
|
|
25
28
|
|
|
26
29
|
.layout-wrapper {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
@use './_variables' as *;
|
|
2
|
+
@use './_mixins' as *;
|
|
3
|
+
|
|
1
4
|
.layout-sidebar {
|
|
2
5
|
position: fixed;
|
|
3
6
|
width: 300px;
|
|
@@ -8,8 +11,8 @@
|
|
|
8
11
|
top: 7rem;
|
|
9
12
|
left: 2rem;
|
|
10
13
|
transition: transform $transitionDuration, left $transitionDuration;
|
|
11
|
-
background-color: var(--
|
|
12
|
-
border-radius:
|
|
14
|
+
background-color: var(--p-content-background);
|
|
15
|
+
border-radius: var(--p-content-border-radius);
|
|
13
16
|
padding: 0.5rem 1.5rem;
|
|
14
17
|
box-shadow: 0px 3px 5px rgba(0, 0, 0, .02), 0px 0px 2px rgba(0, 0, 0, .05), 0px 1px 4px rgba(0, 0, 0, .08);
|
|
15
18
|
}
|
|
@@ -61,10 +64,10 @@
|
|
|
61
64
|
align-items: center;
|
|
62
65
|
position: relative;
|
|
63
66
|
outline: 0 none;
|
|
64
|
-
color: var(--text-color);
|
|
67
|
+
color: var(--p-text-color);
|
|
65
68
|
cursor: pointer;
|
|
66
69
|
padding: .75rem 1rem;
|
|
67
|
-
border-radius:
|
|
70
|
+
border-radius: var(--p-content-border-radius);
|
|
68
71
|
transition: background-color $transitionDuration, box-shadow $transitionDuration;
|
|
69
72
|
|
|
70
73
|
.layout-menuitem-icon {
|
|
@@ -79,11 +82,11 @@
|
|
|
79
82
|
|
|
80
83
|
&.active-route {
|
|
81
84
|
font-weight: 700;
|
|
82
|
-
color: var(--primary-color);
|
|
85
|
+
color: var(--p-primary-color);
|
|
83
86
|
}
|
|
84
87
|
|
|
85
88
|
&:hover {
|
|
86
|
-
background-color: var(--surface-
|
|
89
|
+
background-color: var(--p-surface-100);
|
|
87
90
|
}
|
|
88
91
|
|
|
89
92
|
&:focus {
|
|
@@ -93,7 +96,7 @@
|
|
|
93
96
|
|
|
94
97
|
ul {
|
|
95
98
|
overflow: hidden;
|
|
96
|
-
border-radius:
|
|
99
|
+
border-radius: var(--p-content-border-radius);
|
|
97
100
|
|
|
98
101
|
li {
|
|
99
102
|
a {
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
outline: 0 none;
|
|
3
3
|
outline-offset: 0;
|
|
4
4
|
transition: box-shadow .2s;
|
|
5
|
-
box-shadow: 0 0 0 0.2rem var(--primary-
|
|
5
|
+
box-shadow: 0 0 0 0.2rem var(--p-primary-400);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
@mixin focused-inset() {
|
|
9
9
|
outline: 0 none;
|
|
10
10
|
outline-offset: 0;
|
|
11
11
|
transition: box-shadow .2s;
|
|
12
|
-
box-shadow: inset 0 0 0 0.2rem var(--primary-
|
|
12
|
+
box-shadow: inset 0 0 0 0.2rem var(--p-primary-400);
|
|
13
13
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
@use './_variables' as *;
|
|
2
|
+
@use './_mixins' as *;
|
|
3
|
+
|
|
1
4
|
.layout-topbar {
|
|
2
5
|
position: fixed;
|
|
3
6
|
height: 5rem;
|
|
@@ -20,7 +23,7 @@
|
|
|
20
23
|
font-size: 1.5rem;
|
|
21
24
|
font-weight: 500;
|
|
22
25
|
width: 300px;
|
|
23
|
-
border-radius:
|
|
26
|
+
border-radius: var(--p-content-border-radius);
|
|
24
27
|
|
|
25
28
|
img {
|
|
26
29
|
height: 2.5rem;
|
|
@@ -37,7 +40,9 @@
|
|
|
37
40
|
justify-content: center;
|
|
38
41
|
align-items: center;
|
|
39
42
|
position: relative;
|
|
40
|
-
color: var(--text-color-secondary);
|
|
43
|
+
color: var(--p-text-color-secondary);
|
|
44
|
+
background-color: transparent;
|
|
45
|
+
border-color: transparent;
|
|
41
46
|
// border-radius: 50%;
|
|
42
47
|
// width: 3rem;
|
|
43
48
|
// height: 3rem;
|
|
@@ -45,8 +50,8 @@
|
|
|
45
50
|
transition: background-color $transitionDuration;
|
|
46
51
|
|
|
47
52
|
&:hover {
|
|
48
|
-
color: var(--text-color);
|
|
49
|
-
background-color: var(--surface-
|
|
53
|
+
color: var(--p-text-color);
|
|
54
|
+
background-color: var(--p-surface-100);
|
|
50
55
|
}
|
|
51
56
|
|
|
52
57
|
&:focus {
|
|
@@ -125,7 +130,7 @@
|
|
|
125
130
|
background-color: var(--surface-overlay);
|
|
126
131
|
box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.02),
|
|
127
132
|
0px 0px 2px rgba(0, 0, 0, 0.05), 0px 1px 4px rgba(0, 0, 0, 0.08);
|
|
128
|
-
border-radius:
|
|
133
|
+
border-radius: var(--p-content-border-radius);
|
|
129
134
|
padding: 1rem;
|
|
130
135
|
right: 2rem;
|
|
131
136
|
top: 5rem;
|
|
@@ -144,7 +149,7 @@
|
|
|
144
149
|
width: 100%;
|
|
145
150
|
height: auto;
|
|
146
151
|
justify-content: flex-start;
|
|
147
|
-
border-radius:
|
|
152
|
+
border-radius: var(--p-content-border-radius);
|
|
148
153
|
padding: 1rem;
|
|
149
154
|
|
|
150
155
|
i {
|
|
@@ -168,7 +173,7 @@
|
|
|
168
173
|
background-color: var(--surface-overlay);
|
|
169
174
|
box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.02), 0px 0px 2px rgba(0, 0, 0, 0.05),
|
|
170
175
|
0px 1px 4px rgba(0, 0, 0, 0.08);
|
|
171
|
-
border-radius:
|
|
176
|
+
border-radius: var(--p-content-border-radius);
|
|
172
177
|
padding: 1rem;
|
|
173
178
|
right: 2rem;
|
|
174
179
|
top: 5rem;
|
|
@@ -194,18 +199,18 @@
|
|
|
194
199
|
display: flex;
|
|
195
200
|
align-items: center;
|
|
196
201
|
position: relative;
|
|
197
|
-
color: var(--text-color-secondary);
|
|
202
|
+
color: var(--p-text-color-secondary);
|
|
198
203
|
width: 100%;
|
|
199
204
|
height: auto;
|
|
200
205
|
justify-content: flex-start;
|
|
201
|
-
border-radius:
|
|
206
|
+
border-radius: var(--p-content-border-radius);
|
|
202
207
|
padding: 1rem;
|
|
203
208
|
cursor: pointer;
|
|
204
209
|
transition: background-color $transitionDuration;
|
|
205
210
|
|
|
206
211
|
&:hover {
|
|
207
|
-
color: var(--text-color);
|
|
208
|
-
background-color: var(--surface-
|
|
212
|
+
color: var(--p-text-color);
|
|
213
|
+
background-color: var(--p-surface-100);
|
|
209
214
|
}
|
|
210
215
|
|
|
211
216
|
&:focus {
|