@public-ui/sample-react 1.7.15 → 1.7.16

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.
Files changed (83) hide show
  1. package/dist/104.js +1 -1
  2. package/dist/1296.js +1 -1
  3. package/dist/1461.js +1 -1
  4. package/dist/{4688.js → 1480.js} +1 -1
  5. package/dist/1684.js +1 -1
  6. package/dist/1720.js +1 -1
  7. package/dist/1888.js +1 -1
  8. package/dist/2120.js +1 -1
  9. package/dist/2240.js +1 -1
  10. package/dist/232.js +2 -0
  11. package/dist/2444.js +1 -1
  12. package/dist/2628.js +1 -1
  13. package/dist/2740.js +1 -1
  14. package/dist/2764.js +1 -1
  15. package/dist/2782.js +1 -1
  16. package/dist/2812.js +1 -1
  17. package/dist/3200.js +1 -1
  18. package/dist/3204.js +1 -1
  19. package/dist/352.js +1 -1
  20. package/dist/3564.js +1 -1
  21. package/dist/3920.js +1 -1
  22. package/dist/4064.js +1 -1
  23. package/dist/4136.js +1 -1
  24. package/dist/4184.js +1 -1
  25. package/dist/{7668.js → 4312.js} +2 -2
  26. package/dist/4544.js +1 -1
  27. package/dist/4728.js +1 -1
  28. package/dist/4915.js +1 -1
  29. package/dist/4988.js +1 -1
  30. package/dist/5376.js +1 -1
  31. package/dist/5456.js +1 -1
  32. package/dist/5615.js +1 -1
  33. package/dist/5628.js +1 -1
  34. package/dist/5744.js +1 -1
  35. package/dist/5768.js +1 -1
  36. package/dist/5839.js +1 -1
  37. package/dist/5956.js +1 -1
  38. package/dist/5972.js +1 -1
  39. package/dist/6040.js +1 -1
  40. package/dist/6272.js +1 -1
  41. package/dist/7192.js +1 -1
  42. package/dist/7312.js +1 -1
  43. package/dist/7344.js +1 -1
  44. package/dist/736.js +1 -1
  45. package/dist/7496.js +1 -1
  46. package/dist/7508.js +1 -1
  47. package/dist/7596.js +1 -1
  48. package/dist/7712.js +1 -1
  49. package/dist/7808.js +1 -1
  50. package/dist/8188.js +1 -1
  51. package/dist/8232.js +1 -1
  52. package/dist/8248.js +1 -1
  53. package/dist/828.js +1 -1
  54. package/dist/8476.js +1 -1
  55. package/dist/8524.js +1 -1
  56. package/dist/{1760.js → 9008.js} +2 -2
  57. package/dist/9088.js +1 -1
  58. package/dist/9404.js +1 -1
  59. package/dist/9424.js +1 -1
  60. package/dist/9496.js +1 -1
  61. package/dist/9544.js +1 -1
  62. package/dist/9680.js +1 -1
  63. package/dist/9888.js +1 -1
  64. package/dist/9984.js +1 -1
  65. package/dist/main.css +1 -1
  66. package/dist/main.js +1 -1
  67. package/package.json +13 -13
  68. package/src/App.tsx +5 -5
  69. package/src/scenarios/routes.ts +0 -2
  70. package/src/shares/store.ts +5 -5
  71. package/src/shares/theme.ts +6 -5
  72. package/dist/176.js +0 -2
  73. package/src/scenarios/complex-form/common/form/component.tsx +0 -25
  74. package/src/scenarios/complex-form/common/form/types.ts +0 -13
  75. package/src/scenarios/complex-form/component.tsx +0 -163
  76. package/src/scenarios/complex-form/kopfdaten/component.tsx +0 -50
  77. package/src/scenarios/complex-form/location/component.tsx +0 -16
  78. package/src/scenarios/complex-form/location/location.form.ts +0 -22
  79. package/src/scenarios/complex-form/schedule/component.tsx +0 -16
  80. package/src/scenarios/complex-form/schedule/schedule.form.ts +0 -34
  81. /package/dist/{176.js.LICENSE.txt → 232.js.LICENSE.txt} +0 -0
  82. /package/dist/{1760.js.LICENSE.txt → 4312.js.LICENSE.txt} +0 -0
  83. /package/dist/{7668.js.LICENSE.txt → 9008.js.LICENSE.txt} +0 -0
package/package.json CHANGED
@@ -1,25 +1,25 @@
1
1
  {
2
2
  "name": "@public-ui/sample-react",
3
- "version": "1.7.15",
3
+ "version": "1.7.16",
4
4
  "description": "This app contains samples for the KoliBri/Public UI",
5
5
  "license": "EUPL-1.2",
6
6
  "dependencies": {
7
7
  "@leanup/stack": "1.3.49",
8
8
  "@leanup/stack-react": "1.3.49",
9
9
  "@leanup/stack-webpack": "1.3.49",
10
- "@public-ui/components": "1.7.15",
11
- "@public-ui/react": "1.7.15",
12
- "@public-ui/themes": "1.7.15",
13
- "@types/node": "20.11.25",
14
- "@types/react": "18.2.64",
15
- "@types/react-dom": "18.2.21",
16
- "@unocss/preset-uno": "0.58.5",
17
- "@unocss/webpack": "0.58.5",
10
+ "@public-ui/components": "1.7.16",
11
+ "@public-ui/react": "1.7.16",
12
+ "@public-ui/themes": "1.7.16",
13
+ "@types/node": "ts5.4",
14
+ "@types/react": "18.2.68",
15
+ "@types/react-dom": "18.2.22",
16
+ "@unocss/preset-uno": "0.58.6",
17
+ "@unocss/webpack": "0.58.6",
18
18
  "ajv": "8.12.0",
19
- "chromedriver": "122.0.4",
19
+ "chromedriver": "122.0.6",
20
20
  "cpy-cli": "5.0.0",
21
21
  "eslint-plugin-jsx-a11y": "6.8.0",
22
- "eslint-plugin-react": "7.34.0",
22
+ "eslint-plugin-react": "7.34.1",
23
23
  "formik": "2.4.5",
24
24
  "nightwatch-axe-verbose": "2.3.0",
25
25
  "npm-run-all": "4.1.5",
@@ -27,9 +27,9 @@
27
27
  "react-dom": "18.2.0",
28
28
  "react-router": "6.22.3",
29
29
  "react-router-dom": "6.22.3",
30
- "rimraf": "3.0.2",
30
+ "rimraf": "5.0.5",
31
31
  "ts-prune": "0.10.3",
32
- "typescript": "5.4.2",
32
+ "typescript": "5.4.3",
33
33
  "world_countries_lists": "2.9.0",
34
34
  "yup": "1.4.0"
35
35
  },
package/src/App.tsx CHANGED
@@ -4,13 +4,13 @@ import { Route as MyRoute, Routes as MyRoutes } from './shares/types';
4
4
 
5
5
  import { Option } from '@public-ui/components';
6
6
  import PackageJson from '@public-ui/components/package.json';
7
- import { KolAlert, KolBadge } from '@public-ui/react';
7
+ import { KolBadge } from '@public-ui/react';
8
8
  import { useLocation } from 'react-router';
9
9
  import { Sidebar } from './components/Sidebar';
10
10
  import { HideMenusContext } from './shares/HideMenusContext';
11
11
  import { ROUTES } from './shares/routes';
12
12
  import { getTheme, getThemeName, setStorage, setTheme } from './shares/store';
13
- import { THEMES, THEME_OPTIONS, Theme, isDraftTheme } from './shares/theme';
13
+ import { THEMES, THEME_OPTIONS, Theme, ThemeAndUnstyled, isDraftTheme } from './shares/theme';
14
14
 
15
15
  import { BackPage } from './components/BackPage';
16
16
 
@@ -47,7 +47,7 @@ const getRouteTree = (routes: MyRoutes): ReturnType<typeof Route>[] => {
47
47
  element={
48
48
  <div className="d-grid gap-4">
49
49
  {THEME_OPTIONS.filter((theme) => THEMES.indexOf((theme as Option<Theme>).value) >= 0).map((theme) => (
50
- <div className="d-grid gap-2" key={(theme as Option<Theme>).value} data-theme={(theme as Option<Theme>).value}>
50
+ <div className="d-grid gap-2" key={(theme as Option<ThemeAndUnstyled>).value} data-theme={(theme as Option<ThemeAndUnstyled>).value}>
51
51
  <div className="mt-4">
52
52
  <strong>{theme.label}</strong>
53
53
  </div>
@@ -102,10 +102,10 @@ ROUTE_LIST.forEach((route) => {
102
102
  export const App: FC = () => {
103
103
  const routerLocation = useLocation();
104
104
  const [searchParams, setSearchParams] = useSearchParams();
105
- const theme: Theme = (searchParams.get('theme') as Theme) ?? getTheme();
105
+ const theme: ThemeAndUnstyled = (searchParams.get('theme') as ThemeAndUnstyled) ?? getTheme();
106
106
  const hideMenus = searchParams.has('hideMenus');
107
107
 
108
- setTheme(theme as Theme); // set for `getTheme` usages within the application
108
+ setTheme(theme); // set for `getTheme` usages within the application
109
109
 
110
110
  document.title = `KoliBri-Handout - ${getThemeName(getTheme())} | v${PackageJson.version}`;
111
111
  document.body.setAttribute('class', theme);
@@ -1,12 +1,10 @@
1
1
  import { Routes } from '../shares/types';
2
2
  import { AppointmentForm } from './appointment-form/AppointmentForm';
3
- import { TerminComponent } from './complex-form/component';
4
3
  import { CustomTooltipWidth } from './custom-tooltip-width';
5
4
  import { StaticForm } from './static-form';
6
5
 
7
6
  export const SCENARIO_ROUTES: Routes = {
8
7
  scenarios: {
9
- 'complex-form': TerminComponent,
10
8
  'appointment-form': AppointmentForm,
11
9
  'custom-tooltip-width': CustomTooltipWidth,
12
10
  'static-form': StaticForm,
@@ -1,4 +1,4 @@
1
- import { isTheme, Store, Theme } from './theme';
1
+ import { isTheme, Store, ThemeAndUnstyled } from './theme';
2
2
  import PackageJson from '@public-ui/components/package.json';
3
3
  import { THEME_OPTIONS } from './theme';
4
4
  import { Option } from '@public-ui/components';
@@ -63,7 +63,7 @@ export const getDarkMode = (): boolean => {
63
63
  return STORE.darkMode === true;
64
64
  };
65
65
 
66
- export const setTheme = (theme: Theme) => {
66
+ export const setTheme = (theme: ThemeAndUnstyled) => {
67
67
  if (isTheme(theme)) {
68
68
  STORE.theme = theme;
69
69
  setStore();
@@ -72,13 +72,13 @@ export const setTheme = (theme: Theme) => {
72
72
  }
73
73
  };
74
74
 
75
- export const getTheme = (): Theme => {
75
+ export const getTheme = (): ThemeAndUnstyled => {
76
76
  return `${STORE.theme}`;
77
77
  };
78
78
 
79
- export const getThemeName = (theme: Theme): string => {
79
+ export const getThemeName = (theme: ThemeAndUnstyled): string => {
80
80
  if (isTheme(theme)) {
81
- return THEME_OPTIONS.find((option) => (option as Option<Theme>).value === theme)?.label;
81
+ return THEME_OPTIONS.find((option) => (option as Option<ThemeAndUnstyled>).value === theme)?.label;
82
82
  } else {
83
83
  throw new Error(`The theme identifier "${theme}" is not valid or an available option.`);
84
84
  }
@@ -1,11 +1,12 @@
1
1
  import { SelectOption } from '@public-ui/components';
2
2
 
3
3
  export const THEMES = ['bmf', 'default', 'ecl-ec', 'ecl-eu', 'itzbund'] as const;
4
- export type Theme = (typeof THEMES)[number] | 'unstyled';
4
+ export type Theme = (typeof THEMES)[number];
5
+ export type ThemeAndUnstyled = Theme | 'unstyled';
5
6
 
6
- const drafts: Theme[] = ['ecl-ec', 'ecl-eu', 'itzbund'];
7
+ const drafts: ThemeAndUnstyled[] = ['ecl-ec', 'ecl-eu', 'itzbund'];
7
8
 
8
- export const isDraftTheme = (theme: Theme) => drafts.includes(theme);
9
+ export const isDraftTheme = (theme: ThemeAndUnstyled) => drafts.includes(theme);
9
10
 
10
11
  export const isTheme = (value: unknown) => {
11
12
  return (
@@ -16,10 +17,10 @@ export const isTheme = (value: unknown) => {
16
17
 
17
18
  export type Store = {
18
19
  darkMode: boolean;
19
- theme: Theme;
20
+ theme: ThemeAndUnstyled;
20
21
  };
21
22
 
22
- export const THEME_OPTIONS: SelectOption<Theme>[] = [
23
+ export const THEME_OPTIONS: SelectOption<ThemeAndUnstyled>[] = [
23
24
  {
24
25
  label: 'Unstyled (Uncolored)',
25
26
  value: 'unstyled',
package/dist/176.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 176.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[176],{6104:(t,e,o)=>{o.d(e,{A:()=>a});var i=o(7668),n=o(6084),s=o(8364);class a{constructor(t,e,o){var i,a,r,c;if(this.experimentalMode=(0,s.a)(),this.setFormAssociatedValue=t=>{var e;const o=null===(e=this.formAssociated)||void 0===e?void 0:e.getAttribute("name");null!==o&&""!==o||(0,n.d)(` The form field (${this.type}) must have a name attribute to be form-associated. Please define the _name attribute.`);const i=this.tryToStringifyValue(t);this.syncValue(t,i,this.formAssociated),this.syncValue(t,i,this.syncToOwnInput)},this.component=t,this.host=this.findHostWithShadowRoot(o),this.type=e,this.experimentalMode&&("KOL-BUTTON"===(c=null===(i=this.host)||void 0===i?void 0:i.tagName)||"KOL-INPUT-CHECKBOX"===c||"KOL-INPUT-COLOR"===c||"KOL-INPUT-DATE"===c||"KOL-INPUT-EMAIL"===c||"KOL-INPUT-FILE"===c||"KOL-INPUT-NUMBER"===c||"KOL-INPUT-PASSWORD"===c||"KOL-INPUT-RADIO"===c||"KOL-INPUT-RANGE"===c||"KOL-INPUT-TEXT"===c||"KOL-SELECT"===c||"KOL-TEXTAREA"===c)){switch(null===(a=this.host)||void 0===a||a.querySelectorAll("input,select,textarea").forEach((t=>{var e;null===(e=this.host)||void 0===e||e.removeChild(t)})),this.type){case"button":case"color":case"date":case"email":case"file":case"number":case"password":case"radio":case"range":case"text":this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type",this.type);break;case"select":this.formAssociated=document.createElement("select"),this.formAssociated.setAttribute("multiple","");break;case"textarea":this.formAssociated=document.createElement("textarea");break;default:this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type","hidden")}this.formAssociated.setAttribute("aria-hidden","true"),this.formAssociated.setAttribute("data-form-associated",""),this.formAssociated.setAttribute("hidden",""),null===(r=this.host)||void 0===r||r.appendChild(this.formAssociated)}}findHostWithShadowRoot(t){for(;null===(null==t?void 0:t.shadowRoot)&&t!==document.body;)(t=null==t?void 0:t.parentNode).host&&(t=t.host);return t}setAttribute(t,e,o){if(this.experimentalMode)try{if("boolean"!=typeof(o="object"==typeof o&&null!==o?JSON.stringify(o):o)&&"number"!=typeof o&&"string"!=typeof o)throw new Error("Invalid value type: "+typeof o);null==e||e.setAttribute(t,`${o}`)}catch(o){null==e||e.removeAttribute(t)}}tryToStringifyValue(t){try{return"object"==typeof t&&null!==t?JSON.stringify(t).toString():null==t?null:t.toString()}catch(t){return(0,n.h)(`The form field raw value is not able to stringify! ${t}`),""}}syncValue(t,e,o){if(o)switch(this.type){case"file":o.files=t;break;case"select":o.querySelectorAll("option").forEach((t=>{o.removeChild(t)})),Array.isArray(t)&&t.forEach((t=>{const e=this.tryToStringifyValue(t);if("string"==typeof e){const t=document.createElement("option");t.setAttribute("value",e),t.setAttribute("selected",""),o.appendChild(t)}}));break;default:"string"==typeof e?(o.setAttribute("value",e),o.value=e):(o.removeAttribute("value"),o.value="")}}validateName(t){((t,e,o)=>{(0,i.d)(t,"_name",e,o)})(this.component,t,{hooks:{afterPatch:()=>{this.setAttribute("name",this.formAssociated,this.component.state._name)}}}),void 0===t&&(0,n.d)("Ein Name am Eingabefeldern oder Schalter ist nicht zwingend erforderlich, kann aber für die Autocomplete-Funktion und für das statische Versenden des Eingabefeldes relevant sein.")}validateSyncValueBySelector(t){if(this.experimentalMode&&"string"==typeof t){const e=document.querySelector(t);e&&(this.syncToOwnInput=e)}}componentWillLoad(){this.validateName(this.component._name),this.validateSyncValueBySelector(this.component._syncValueBySelector)}}},6312:(t,e,o)=>{o.d(e,{I:()=>u,g:()=>h});var i=o(7668),n=o(8272),s=o(7608),a=o(6084),r=o(1500),c=o(7136),l=o(6104);const h=t=>{const e="string"==typeof t._error&&t._error.length>0&&!0===t._touched,o="string"==typeof t._hint&&t._hint.length>0,i=[];return!0===e&&i.push(`${t._id}-error`),!0===o&&i.push(`${t._id}-hint`),{hasError:e,hasHint:o,ariaDescribedBy:i}};class d extends l.A{constructor(t,e,o){super(t,e,o),this.component=t}validateAlert(t){(0,i.a)(this.component,"_alert",t)}validateTouched(t){((t,e)=>{(0,i.a)(t,"_touched",e)})(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAlert(this.component._alert),this.validateTouched(this.component._touched)}}class u extends d{constructor(t,e,o){super(t,e,o),this.valueChangeListeners=[],this.onFacade={onBlur:this.onBlur.bind(this),onChange:this.onChange.bind(this),onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this)},this.component=t}validateAccessKey(t){(0,i.d)(this.component,"_accessKey",t)}validateAdjustHeight(t){((t,e)=>{(0,i.a)(t,"_adjustHeight",e)})(this.component,t)}validateDisabled(t){(0,i.a)(this.component,"_disabled",t),!0===t&&(0,a.g)()}validateError(t){(0,i.d)(this.component,"_error",t)}validateHideError(t){((t,e,o)=>{(0,i.a)(t,"_hideError",e,o)})(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideError&&(0,a.a)("Property hide-error for inputs: Only use when the error message is shown outside of the input component.")}}})}validateHideLabel(t){(0,n.v)(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideLabel&&(0,a.a)("Property hide-label for inputs: Only use for exceptions like search inputs that are clearly identifiable by their context.")}}})}validateHint(t){(0,i.d)(this.component,"_hint",t)}validateId(t){(0,i.d)(this.component,"_id",t,{hooks:{afterPatch:()=>{this.setAttribute("id",this.formAssociated,this.component.state._id)}},minLength:1}),""!==t&&void 0!==t||(0,a.d)("Eine eindeutige ID an den Eingabefeldern ist nicht zwingend erforderlich, könnte aber für die E2E-Tests relevant sein.")}validateLabel(t){(0,s.a)(this.component,t,{required:!0})}validateOn(t){"object"==typeof t&&(0,i.s)(this.component,"_on",t)}validateSmartButton(t){(0,i.o)(t,(()=>{try{t=(0,i.p)(t)}catch(t){}(0,i.s)(this.component,"_smartButton",t)}))}validateTabIndex(t){(0,c.v)(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAccessKey(this.component._accessKey),this.validateAdjustHeight(this.component._adjustHeight),this.validateError(this.component._error),this.validateDisabled(this.component._disabled),this.validateHideError(this.component._hideError),this.validateHideLabel(this.component._hideLabel),this.validateHint(this.component._hint),this.validateId(this.component._id),this.validateLabel(this.component._label),this.validateSmartButton(this.component._smartButton),this.validateOn(this.component._on),this.validateTabIndex(this.component._tabIndex)}onBlur(t){var e;this.component._alert=!0,this.component._touched=!0,(0,r.s)(t),(0,r.t)("blur",this.host),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onBlur)&&this.component._on.onBlur(t)}onChange(t){var e;const o=t.target.value;(0,r.t)("change",this.host,o),this.setFormAssociatedValue(o),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onChange)&&this.component._on.onChange(t,o),this.valueChangeListeners.forEach((t=>t(o)))}onClick(t){var e;(0,r.s)(t),(0,r.t)("click",this.host),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onClick)&&this.component._on.onClick(t)}onFocus(t){var e;this.component._alert=!0,(0,r.s)(t),(0,r.t)("focus",this.host),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onFocus)&&this.component._on.onFocus(t)}setValue(t,e){var o;this.setFormAssociatedValue(e),"function"==typeof(null===(o=this.component._on)||void 0===o?void 0:o.onChange)&&this.component._on.onChange(t,e)}addValueChangeListener(t){this.valueChangeListeners.push(t)}}},176:(t,e,o)=>{o.d(e,{I:()=>c});var i=o(960),n=o(7668),s=o(5776),a=o(6312);const r=(t,e)=>{const o=t;"object"==typeof o&&null!==o&&((0,s.i)(o.right,1)&&(o.right={icon:o.right}),(0,s.i)(o.left,1)&&(o.left={icon:o.left}),e.set("_icons",o))};class c extends a.I{constructor(t,e,o){super(t,e,o),this.component=t}validateIcon(t){this.validateIcons(t)}validateIcons(t){(0,n.o)(t,(()=>{try{t=(0,n.p)(t)}catch(t){}(0,n.w)(this.component,"_icons",(t=>"object"==typeof t&&null!==t&&((0,s.i)(t.left,1)||(0,i.i)(t.left)||(0,s.i)(t.right,1)||(0,i.i)(t.right))),new Set(["KoliBriHorizontalIcon"]),t,{hooks:{beforePatch:r},required:!0})}))}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons||this.component._icon)}}},1500:(t,e,o)=>{function i(t){t.stopImmediatePropagation(),t.stopPropagation()}function n(t,e,o){e&&function(t,e,o){const i=t.dispatchEvent(function(t,e){return new CustomEvent(`kol-${t}`,{bubbles:!0,cancelable:!0,composed:!0,detail:e})}(e,o))}(e,t,o)}o.d(e,{s:()=>i,t:()=>n})},8272:(t,e,o)=>{o.d(e,{v:()=>n});var i=o(7668);const n=(t,e,o={})=>{(0,i.a)(t,"_hideLabel",e,o)}},960:(t,e,o)=>{o.d(e,{i:()=>r,v:()=>c,w:()=>l});var i=o(7668),n=o(5776);const s=(t,e,o)=>{(0,n.c)(o)?t[e]=o:(0,n.i)(o,1)&&(t[e]={icon:o})},a=t=>{var e,o,i;if(null===(e=t.nextState)||void 0===e?void 0:e.has("_icons")){const e=null===(o=t.nextState)||void 0===o?void 0:o.get("_icons");null===(i=t.nextState)||void 0===i||i.set("_icons",(t=>{let e={};return(0,n.i)(t,1)?e={left:{icon:t}}:"object"==typeof t&&null!==t&&(s(e,"top",t.top),s(e,"right",t.right),s(e,"bottom",t.bottom),s(e,"left",t.left)),e})(e))}},r=t=>"object"==typeof t&&null!==t&&(void 0===t.style||(0,n.b)(t.style))&&(0,n.i)(t.icon,1),c=(t,e,o={})=>{(0,i.o)(e,(()=>{var s;try{e=(0,i.p)(e)}catch(t){}(0,i.w)(t,"_icons",(t=>null===t||(0,n.i)(t,1)||"object"==typeof t&&null!==t&&((0,n.i)(t.left,1)||r(t.left)||(0,n.i)(t.right,1)||r(t.right)||(0,n.i)(t.top,1)||r(t.top)||(0,n.i)(t.bottom,1)||r(t.bottom))),new Set(["KoliBriIcon"]),e,Object.assign(Object.assign({},o),{defaultValue:{},hooks:{afterPatch:null===(s=o.hooks)||void 0===s?void 0:s.afterPatch,beforePatch:(t,e,i,n)=>{var s,r;"function"==typeof(null===(s=o.hooks)||void 0===s?void 0:s.beforePatch)&&(null===(r=o.hooks)||void 0===r||r.beforePatch(t,e,i,n)),a(i)}}}))}))},l=(t,e)=>{(0,i.w)(t,"_iconAlign",(t=>"left"===t||"right"===t),new Set(["Alignment {left, right, top, bottom}"]),e,{hooks:{beforePatch:()=>{a(t)}}})}},7608:(t,e,o)=>{o.d(e,{a:()=>d,c:()=>c,h:()=>r,v:()=>h});var i=o(6084),n=o(7668);const s=/[a-zA-Z0-9äöüÄÖÜß]/g,a=/^\d+$/;function r(t,e=1){return function(t){var e;return"string"==typeof t&&(null===(e=t.match(s))||void 0===e?void 0:e.length)||0}(t)>=e}function c(t){return a.test(t)}const l=new Set(["string"]),h=(t,e,o={})=>{(0,n.w)(t,"_label",(t=>"string"==typeof t),l,e,function(t){var e;return Object.assign(Object.assign({},t),{hooks:{afterPatch:(e,o,n,s)=>{var a,l;"function"==typeof(null===(a=t.hooks)||void 0===a?void 0:a.afterPatch)&&(null===(l=t.hooks)||void 0===l||l.afterPatch(e,o,n,s)),"string"==typeof e&&!1===r(e,3)&&!1===c(e)&&(0,i.a)(`The heading or label ("${e}") is not accessible. A label should consist of at least three readable characters.`),"string"==typeof e&&e.length>80&&(0,i.u)("A heading or label should not be longer than 80 characters.")},beforePatch:null===(e=t.hooks)||void 0===e?void 0:e.beforePatch}})}(o))},d=h},7136:(t,e,o)=>{o.d(e,{v:()=>a});var i=o(6084),n=o(7668);const s={hooks:{afterPatch:t=>{-1!==t&&0!==t&&(0,i.a)("Don’t Use Tabindex Greater than 0: https://adrianroselli.com/2014/11/dont-use-tabindex-greater-than-0.html")}}},a=(t,e)=>{(0,n.e)(t,"_tabIndex",e,s)}}}]);
@@ -1,25 +0,0 @@
1
- import React, { FC, ReactNode } from 'react';
2
-
3
- import { KolForm, KolLinkGroup } from '@public-ui/react';
4
-
5
- type Props = {
6
- submitted: boolean;
7
- children: ReactNode;
8
- onSubmit: (event: Event) => void;
9
- };
10
-
11
- export const FromComponent: FC<Props> = (props) => (
12
- <>
13
- {props.submitted === true && (
14
- <KolLinkGroup tabIndex={0} class="fehlerliste" data-removed-_label="Fehlerliste" _label="Fehlerliste" _level={3} _links={[]} />
15
- )}
16
- <KolForm
17
- className="block mb-2"
18
- _on={{
19
- onSubmit: props.onSubmit,
20
- }}
21
- >
22
- {props.children}
23
- </KolForm>
24
- </>
25
- );
@@ -1,13 +0,0 @@
1
- export type Fehler = {
2
- _label: string;
3
- _selector: string;
4
- };
5
-
6
- export type FormProps = {
7
- onSubmitted: (event: Event) => void;
8
- };
9
-
10
- export type FormState = {
11
- loader: boolean;
12
- touched: boolean;
13
- };
@@ -1,163 +0,0 @@
1
- import React, { FC } from 'react';
2
-
3
- import { KolHeading, KolProgress, KolTable, KolTabs } from '@public-ui/react';
4
-
5
- import { TerminKopfdatenComponent } from './kopfdaten/component';
6
- import { TerminLocationComponent } from './location/component';
7
- import { TerminScheduleComponent } from './schedule/component';
8
-
9
- type Zeiten = {
10
- stadtteil: string;
11
- zeiten: string;
12
- montag: string;
13
- dienstag: string;
14
- mittwoch: string;
15
- donnerstag: string;
16
- freitag: string;
17
- };
18
-
19
- export const TerminComponent: FC = () => (
20
- <>
21
- <div className="grid sm:grid-cols-1 gap-2 my-3">
22
- <KolHeading>Terminreservierung</KolHeading>
23
- <KolHeading _level={2}>Termine für Einwohnermelde- (incl. Pass- und Ausweisangelegenheiten) und Kraftfahrzeugangelegenheiten</KolHeading>
24
- <div style={{ fontFamily: 'Arial' }}>
25
- <p className="py-2">Derzeit kann generell nur mit vorheriger Terminvereinbarung bei den Bürgerdiensten vorgesprochen werden.</p>
26
- <p className="py-2">
27
- Die Termine für Einwohnermelde- und Kraftfahrzeugangelegenheiten werden täglich ab 07:00 Uhr für den gleichen Tag, für den gleichen Tag 7 Tage und für
28
- den gleichen Tag 14 Tage später freigegeben. So können Sie jeden Tag spontan Termine für den gleichen Tag und planbar Termine für eine Woche oder zwei
29
- Wochen später erhalten.
30
- </p>
31
- <p className="py-2">
32
- Sofern online keine Termine innerhalb der nächsten 14 Tage mehr verfügbar sind, führt auch eine darüber hinaus gehende telefonische Kontaktaufnahme
33
- leider zu keinem anderen Ergebnis. In diesem Fall versuchen Sie es bitte am nächsten Morgen erneut.
34
- </p>
35
- <p className="py-2">
36
- Bitte achten Sie darauf, den richtigen Kalender für Ihr Anliegen auszuwählen. Hinweis: Bitte geben Sie bei Ihrer Terminvereinbarung zur lückenlosen
37
- Kontaktverfolgung immer Ihre korrekte Telefonnummer und E-Mail Adresse an. Wir behalten uns vor, gebuchte Termine mit falschen Angaben zu löschen.
38
- </p>
39
- </div>
40
- </div>
41
- <div className="grid sm:grid-cols-1 gap-2">
42
- <KolTable
43
- _label="Öffnungszeiten"
44
- _data={
45
- [
46
- {
47
- stadtteil: 'Brackel',
48
- montag: '08:00 - 12:00, 14:00 - 16:00',
49
- dienstag: '08:00 - 12:00, 14:00 - 15:00',
50
- mittwoch: '08:00 - 12:00, 14:00 - 15:00',
51
- donnerstag: '08:00 - 12:00, 14:00 - 18:00',
52
- freitag: '08:00 - 12:00',
53
- },
54
- {
55
- stadtteil: 'Dorstfeld',
56
- montag: '09:00 - 12:00, 14:00 - 16:00',
57
- dienstag: '09:00 - 12:00, 14:00 - 15:00',
58
- mittwoch: '09:00 - 12:00, 14:00 - 15:00',
59
- donnerstag: '09:00 - 12:00, 14:00 - 18:00',
60
- freitag: '09:00 - 12:00',
61
- },
62
- {
63
- stadtteil: 'Aplerbeck',
64
- montag: '08:00 - 12:00, 14:00 - 16:00',
65
- dienstag: '08:00 - 12:00, 14:00 - 15:00',
66
- mittwoch: '08:00 - 12:00, 14:00 - 15:00',
67
- donnerstag: '08:00 - 12:00, 14:00 - 18:00',
68
- freitag: '08:00 - 12:00',
69
- },
70
- {
71
- stadtteil: 'Innenstadt Ost',
72
- montag: '07:00 - 12:00, 14:00 - 16:00',
73
- dienstag: '07:00 - 12:00, 14:00 - 15:00',
74
- mittwoch: '07:00 - 12:00, 14:00 - 15:00',
75
- donnerstag: '07:00 - 12:00, 14:00 - 18:00',
76
- freitag: '07:00 - 12:00, 13:00 - 16:00',
77
- },
78
- {
79
- stadtteil: 'Innenstadt West',
80
- montag: '07:00 - 12:00, 14:00 - 16:00',
81
- dienstag: '07:00 - 12:00, 14:00 - 15:00',
82
- mittwoch: '07:00 - 12:00, 14:00 - 15:00',
83
- donnerstag: '07:00 - 12:00, 14:00 - 18:00',
84
- freitag: '07:00 - 12:00, 13:00 - 16:00',
85
- /*render: (el, data) => {
86
- el.innerHTML = `<kol-badge _color="#ff0000" _label="NIX"></kol-badge>`;
87
- },*/
88
- },
89
- ] as Zeiten[]
90
- }
91
- _headers={{
92
- horizontal: [
93
- [
94
- { label: '', asTd: true },
95
- { label: 'Tag', colSpan: 5 },
96
- ],
97
- [
98
- {
99
- label: 'Stadtteil',
100
- key: 'stadtteil',
101
- textAlign: 'left',
102
- sort: (data: Zeiten[]) => {
103
- return data.sort((first, second) => {
104
- if (first.stadtteil < second.stadtteil) {
105
- return -1;
106
- }
107
- if (first.stadtteil > second.stadtteil) {
108
- return 1;
109
- }
110
- return 0;
111
- });
112
- },
113
- },
114
- { label: 'Montag', key: 'montag', textAlign: 'center' },
115
- { label: 'Dienstag', key: 'dienstag', textAlign: 'center' },
116
- { label: 'Mittwoch', key: 'mittwoch', textAlign: 'center' },
117
- { label: 'Donnerstag', key: 'donnerstag', textAlign: 'center' },
118
- { label: 'Freitag', key: 'freitag', textAlign: 'center' },
119
- ],
120
- ],
121
- }}
122
- _minWidth="50em"
123
- style={{
124
- display: 'inline-grid',
125
- width: '100%',
126
- }}
127
- ></KolTable>
128
- <KolTabs
129
- className="block mt-4"
130
- _ariaLabel="Registerkarten"
131
- _tabs={[
132
- {
133
- _label: '1. Einwohnermeldeämter',
134
- },
135
- {
136
- _label: '2. Freie Termine',
137
- },
138
- {
139
- _label: '3. Persönliche Daten',
140
- },
141
- ]}
142
- >
143
- <div>
144
- <KolHeading _level={2}>Wählen Sie einen Stadtteil aus</KolHeading>
145
- <TerminLocationComponent onSubmitted={() => {}} />
146
- </div>
147
- <div>
148
- <KolHeading _level={2}>Wählen Sie einen Termin aus</KolHeading>
149
- <TerminScheduleComponent onSubmitted={() => {}} />
150
- </div>
151
- <div>
152
- <KolHeading _level={2}>Geben Sie Ihre Kontaktdaten ein</KolHeading>
153
- <TerminKopfdatenComponent onSubmitted={() => {}} />
154
- </div>
155
- </KolTabs>
156
- </div>
157
- <div className="grid sm:grid-cols-1 gap-2">
158
- <div className="border-top"></div>
159
- <KolHeading _level={3}>Fortschritt</KolHeading>
160
- <KolProgress _value={0} _max={100} _unit="Prozent des Formulars"></KolProgress>
161
- </div>
162
- </>
163
- );
@@ -1,50 +0,0 @@
1
- import React, { FC } from 'react';
2
-
3
- import { KolAbbr, KolButton, KolInputEmail, KolInputRadio, KolInputText, KolSpin } from '@public-ui/react';
4
- import { FormProps } from '../common/form/types';
5
- import { FromComponent } from '../common/form/component';
6
-
7
- export const TerminKopfdatenComponent: FC<FormProps> = (props) => (
8
- <FromComponent submitted={true} onSubmit={() => {}}>
9
- <div className="grid grid-cols-2 gap-4">
10
- <KolInputRadio
11
- _id="anrede"
12
- _list={[
13
- { label: 'Herr', value: 'Herr' },
14
- { label: 'Frau', value: 'Frau' },
15
- ]}
16
- _touched={true}
17
- ></KolInputRadio>
18
- <KolInputText _id="termin_kopfdaten_vorname" _type="text" _autoComplete="on" _touched={true}></KolInputText>
19
- <KolInputText _id="termin_kopfdaten_nachname" _type="text" _autoComplete="on" _touched={true}></KolInputText>
20
- <KolInputText _id="termin_kopfdaten_strasse" _type="text" _autoComplete="on" _touched={true}></KolInputText>
21
- <div className="grid grid-cols-6 gap-4">
22
- <KolInputText _id="termin_kopfdaten_plz" _type="text" _autoComplete="on" _touched={true}>
23
- <KolAbbr _title="Postleitzahl" _tooltipAlign="right">
24
- PLZ
25
- </KolAbbr>
26
- </KolInputText>
27
- <KolInputText _id="termin_kopfdaten_ort" _type="text" _autoComplete="on" _touched={true}></KolInputText>
28
- </div>
29
- <KolInputText
30
- _id="termin_kopfdaten_telefon"
31
- _icon="icofont-phone"
32
- _list={['01234 / 567890']}
33
- _type="tel"
34
- _autoComplete="on"
35
- _touched={true}
36
- ></KolInputText>
37
- <KolInputEmail
38
- _id="termin_kopfdaten_email"
39
- _icon="icofont-email"
40
- _list={['elke.mustermann@test.de', 'max.mustermann@test.de']}
41
- _touched={true}
42
- _autoComplete="on"
43
- ></KolInputEmail>
44
- <div>
45
- <KolButton className="inline-block my-1" _icon="icofont-paper-plane" _type="submit" _label="Terminanfrage absenden"></KolButton>
46
- <KolSpin _show={true} className="ml-4" />
47
- </div>
48
- </div>
49
- </FromComponent>
50
- );
@@ -1,16 +0,0 @@
1
- import React, { FC } from 'react';
2
-
3
- import { KolButton, KolSelect, KolSpin } from '@public-ui/react';
4
- import { LOCATION_OPTIONS } from './location.form';
5
- import { FormProps } from '../common/form/types';
6
- import { FromComponent } from '../common/form/component';
7
-
8
- export const TerminLocationComponent: FC<FormProps> = () => (
9
- <FromComponent submitted={true} onSubmit={() => {}}>
10
- <div className="grid sm:grid-cols-1 xl:grid-cols-2 gap-2 my-2">
11
- <KolSelect _id="termin-location-location" _list={LOCATION_OPTIONS} _touched={true}></KolSelect>
12
- </div>
13
- <KolButton className="inline-block my-1" _icon="icofont-arrow-right" _iconAlign="right" _label="Zur Terminauswahl" _type="submit"></KolButton>
14
- <KolSpin _show={true} className="ml-4" />
15
- </FromComponent>
16
- );
@@ -1,22 +0,0 @@
1
- export const LOCATION_OPTIONS = [
2
- {
3
- value: 'Aplerbeck',
4
- label: 'Aplerbeck',
5
- },
6
- {
7
- value: 'Brackel',
8
- label: 'Brackel',
9
- },
10
- {
11
- value: 'Dorstfeld',
12
- label: 'Dorstfeld',
13
- },
14
- {
15
- value: 'Innenstadt Ost',
16
- label: 'Innenstadt Ost',
17
- },
18
- {
19
- value: 'Innenstadt West',
20
- label: 'Innenstadt West',
21
- },
22
- ];
@@ -1,16 +0,0 @@
1
- import React, { FC } from 'react';
2
-
3
- import { KolButton, KolInputDate, KolSpin } from '@public-ui/react';
4
- import { FromComponent } from '../common/form/component';
5
- import { FormProps } from '../common/form/types';
6
-
7
- export const TerminScheduleComponent: FC<FormProps> = (props) => (
8
- <FromComponent submitted={true} onSubmit={() => {}}>
9
- <div className="grid sm:grid-cols-1 xl:grid-cols-2 gap-2 my-2">
10
- <KolInputDate _id="termin-schedule-schedule" _type="date" _touched={true}></KolInputDate>
11
- <KolInputDate _id="termin-schedule-time" _type="time" _touched={true}></KolInputDate>
12
- </div>
13
- <KolButton className="inline-block my-1" _icon="icofont-arrow-right" _iconAlign="right" _label="Zu den Kontaktdaten" _type="submit"></KolButton>
14
- <KolSpin _show={true} className="ml-4" />
15
- </FromComponent>
16
- );
@@ -1,34 +0,0 @@
1
- import { FormControl, InputControl, RequiredValidator, ValidationHandler } from '@leanup/form';
2
-
3
- export interface Schedule {
4
- schedule: string;
5
- time: string;
6
- }
7
-
8
- export class ScheduleForm extends FormControl {
9
- public constructor() {
10
- super('schedule');
11
-
12
- this.addControl(
13
- new InputControl('schedule', {
14
- label: 'Datum',
15
- mandatory: true,
16
- }),
17
- );
18
-
19
- this.addControl(
20
- new InputControl('time', {
21
- label: 'Uhrzeit',
22
- mandatory: true,
23
- }),
24
- );
25
-
26
- const validationHandler = new ValidationHandler();
27
- validationHandler.validators.add([new RequiredValidator('Bitte wählen Sie ein Datum aus.')]);
28
- this.getInput('schedule')?.setValidationHandler(validationHandler);
29
-
30
- const timeHandler = new ValidationHandler();
31
- timeHandler.validators.add([new RequiredValidator('Bitte wählen Sie eine Uhrzeit aus.')]);
32
- this.getInput('time')?.setValidationHandler(timeHandler);
33
- }
34
- }
File without changes